Commit 66a92bad authored by Karl Wette's avatar Karl Wette
Browse files

Define extra CPPFLAGS in configure.ac instead of in each Makefile.am

Original: 7263e41573081ba945e8c57a6b77dc19954a9d4f
parent 8155b293
...@@ -347,6 +347,11 @@ AM_CONDITIONAL([QTHREAD],[test x$qthread = xtrue]) ...@@ -347,6 +347,11 @@ AM_CONDITIONAL([QTHREAD],[test x$qthread = xtrue])
# add gcc specific flags --- must be done at end or tests will break! # add gcc specific flags --- must be done at end or tests will break!
LALSUITE_ADD_GCC_FLAGS LALSUITE_ADD_GCC_FLAGS
# add extra preprocessor flags
AM_CPPFLAGS="\$(TEST_CPPFLAGS) ${AM_CPPFLAGS}"
AM_CPPFLAGS="-DPKG_DATA_DIR='\"\$(pkgdatadir)/\"' ${AM_CPPFLAGS}"
AM_CPPFLAGS="-I\$(top_builddir)/include ${AM_CPPFLAGS}"
# force all python modules into the exec dir to prevent mixed C and # force all python modules into the exec dir to prevent mixed C and
# pure-python library code from being split across lib and lib64 on # pure-python library code from being split across lib and lib64 on
# RedHat-derived systems. # RedHat-derived systems.
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
* *
*/ */
#include "config.h" #include <config.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
#define localtime_r(timep, result) memcpy((result), localtime(timep), sizeof(struct tm)) #define localtime_r(timep, result) memcpy((result), localtime(timep), sizeof(struct tm))
#endif #endif
#include "LogPrintf.h" #include <lal/LogPrintf.h>
/* output file for log messages, default to standard error */ /* output file for log messages, default to standard error */
#define LogOutputDefault stderr #define LogOutputDefault stderr
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include -DPKG_DATA_DIR='"$(pkgdatadir)/"' @AM_CPPFLAGS@
lib_LTLIBRARIES = liblalsupport.la lib_LTLIBRARIES = liblalsupport.la
liblalsupport_la_SOURCES = \ liblalsupport_la_SOURCES = \
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include -DTEST_DATA_DIR='"$(abs_srcdir)/"' @AM_CPPFLAGS@ TEST_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"'
LDADD = \ LDADD = \
$(top_builddir)/lib/lal/liblal.la \ $(top_builddir)/lib/lal/liblal.la \
$(top_builddir)/lib/lalsupport/src/liblalsupport.la $(top_builddir)/lib/lalsupport/src/liblalsupport.la
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@
noinst_LTLIBRARIES = libdate.la noinst_LTLIBRARIES = libdate.la
libdate_la_SOURCES = \ libdate_la_SOURCES = \
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include -I$(srcdir)/../src @AM_CPPFLAGS@ TEST_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"'
LDADD = \ LDADD = \
$(top_builddir)/lib/lal/liblal.la \ $(top_builddir)/lib/lal/liblal.la \
$(top_builddir)/lib/lalsupport/src/liblalsupport.la $(top_builddir)/lib/lalsupport/src/liblalsupport.la
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#include <lal/Date.h> #include <lal/Date.h>
#include <XLALLeapSeconds.h>
#include "../src/XLALLeapSeconds.h"
static int do_test(int gpssec, int tai_utc_before, int tai_utc_after) static int do_test(int gpssec, int tai_utc_before, int tai_utc_after)
......
#include <string.h> #include <string.h>
#include "lal/LALStdlib.h" #include <lal/LALStdlib.h>
#include "lal/AVFactories.h" #include <lal/AVFactories.h>
#define TYPECODE Z #define TYPECODE Z
#define TYPE COMPLEX16 #define TYPE COMPLEX16
......
#include "lal/LALStdlib.h" #include <lal/LALStdlib.h>
#include "lal/AVFactories.h" #include <lal/AVFactories.h>
#include "lal/SeqFactories.h" #include <lal/SeqFactories.h>
#define TYPECODE Z #define TYPECODE Z
#define TYPE COMPLEX16 #define TYPE COMPLEX16
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@
noinst_LTLIBRARIES = libfactories.la noinst_LTLIBRARIES = libfactories.la
libfactories_la_SOURCES = \ libfactories_la_SOURCES = \
......
...@@ -4,8 +4,8 @@ File Name: VectorFactories.c ...@@ -4,8 +4,8 @@ File Name: VectorFactories.c
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
#include "lal/LALStdlib.h" #include <lal/LALStdlib.h>
#include "lal/AVFactories.h" #include <lal/AVFactories.h>
#define TYPECODE Z #define TYPECODE Z
#define TYPE COMPLEX16 #define TYPE COMPLEX16
......
#include "lal/LALStdlib.h" #include <lal/LALStdlib.h>
#include "lal/SeqFactories.h" #include <lal/SeqFactories.h>
#define TYPECODE Z #define TYPECODE Z
#define TYPE COMPLEX16 #define TYPE COMPLEX16
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@ TEST_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"'
LDADD = \ LDADD = \
$(top_builddir)/lib/lal/liblal.la \ $(top_builddir)/lib/lal/liblal.la \
$(top_builddir)/lib/lalsupport/src/liblalsupport.la $(top_builddir)/lib/lalsupport/src/liblalsupport.la
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@
if QTHREAD if QTHREAD
QTHREADSRC = qthread.c QTHREADSRC = qthread.c
else else
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@ TEST_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"'
LDADD = \ LDADD = \
$(top_builddir)/lib/lal/liblal.la \ $(top_builddir)/lib/lal/liblal.la \
$(top_builddir)/lib/lalsupport/src/liblalsupport.la $(top_builddir)/lib/lalsupport/src/liblalsupport.la
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@
noinst_LTLIBRARIES = libinject.la noinst_LTLIBRARIES = libinject.la
libinject_la_SOURCES = \ libinject_la_SOURCES = \
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@ TEST_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"'
LDADD = \ LDADD = \
$(top_builddir)/lib/lal/liblal.la \ $(top_builddir)/lib/lal/liblal.la \
$(top_builddir)/lib/lalsupport/src/liblalsupport.la $(top_builddir)/lib/lalsupport/src/liblalsupport.la
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include @AM_CPPFLAGS@
noinst_LTLIBRARIES = libnoisemodels.la noinst_LTLIBRARIES = libnoisemodels.la
libnoisemodels_la_SOURCES = \ libnoisemodels_la_SOURCES = \
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@ TEST_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"'
LDADD = \ LDADD = \
$(top_builddir)/lib/lal/liblal.la \ $(top_builddir)/lib/lal/liblal.la \
$(top_builddir)/lib/lalsupport/src/liblalsupport.la $(top_builddir)/lib/lalsupport/src/liblalsupport.la
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@
noinst_LTLIBRARIES = libstats.la noinst_LTLIBRARIES = libstats.la
libstats_la_SOURCES = \ libstats_la_SOURCES = \
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@ TEST_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"'
LDADD = \ LDADD = \
$(top_builddir)/lib/lal/liblal.la \ $(top_builddir)/lib/lal/liblal.la \
$(top_builddir)/lib/lalsupport/src/liblalsupport.la $(top_builddir)/lib/lalsupport/src/liblalsupport.la
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@
noinst_LTLIBRARIES = libstd.la noinst_LTLIBRARIES = libstd.la
libstd_la_SOURCES = \ libstd_la_SOURCES = \
Grid.c \ Grid.c \
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@ TEST_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"'
LDADD = \ LDADD = \
$(top_builddir)/lib/lal/liblal.la \ $(top_builddir)/lib/lal/liblal.la \
$(top_builddir)/lib/lalsupport/src/liblalsupport.la $(top_builddir)/lib/lalsupport/src/liblalsupport.la
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@
noinst_LTLIBRARIES = libtdfilter.la noinst_LTLIBRARIES = libtdfilter.la
libtdfilter_la_SOURCES = \ libtdfilter_la_SOURCES = \
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@ TEST_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"'
LDADD = \ LDADD = \
$(top_builddir)/lib/lal/liblal.la \ $(top_builddir)/lib/lal/liblal.la \
$(top_builddir)/lib/lalsupport/src/liblalsupport.la $(top_builddir)/lib/lalsupport/src/liblalsupport.la
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@
noinst_LTLIBRARIES = libtools.la noinst_LTLIBRARIES = libtools.la
libtools_la_SOURCES = \ libtools_la_SOURCES = \
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include -DTEST_DATA_DIR='"$(abs_srcdir)/"' @AM_CPPFLAGS@ TEST_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"'
LDADD = \ LDADD = \
$(top_builddir)/lib/lal/liblal.la \ $(top_builddir)/lib/lal/liblal.la \
$(top_builddir)/lib/lalsupport/src/liblalsupport.la $(top_builddir)/lib/lalsupport/src/liblalsupport.la
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#include <lal/AVFactories.h> #include <lal/AVFactories.h>
#include <lal/LALRunningMedian.h> #include <lal/LALRunningMedian.h>
/* #include "LALRunningMedian.h" */
/*---------------------------------- /*----------------------------------
A structure to store values and indices A structure to store values and indices
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@
noinst_LTLIBRARIES = libutilities.la noinst_LTLIBRARIES = libutilities.la
libutilities_la_SOURCES = \ libutilities_la_SOURCES = \
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@ TEST_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"'
LDADD = \ LDADD = \
$(top_builddir)/lib/lal/liblal.la \ $(top_builddir)/lib/lal/liblal.la \
$(top_builddir)/lib/lalsupport/src/liblalsupport.la $(top_builddir)/lib/lalsupport/src/liblalsupport.la
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@
noinst_LTLIBRARIES = libvectorops.la noinst_LTLIBRARIES = libvectorops.la
libvectorops_la_SOURCES = \ libvectorops_la_SOURCES = \
......
#include <math.h> #include <math.h>
#include "Matrix.h" #include <lal/Matrix.h>
#define TYPECODE D #define TYPECODE D
#define TYPE REAL8 #define TYPE REAL8
......
#include <math.h> #include <math.h>
#include "Matrix.h" #include <lal/Matrix.h>
#define TYPECODE D #define TYPECODE D
#define TYPE REAL8 #define TYPE REAL8
......
#include <math.h> #include <math.h>
#include "Matrix.h" #include <lal/Matrix.h>
#define TYPECODE D #define TYPECODE D
#define TYPE REAL8 #define TYPE REAL8
......
/* -*- C -*- */ /* -*- C -*- */
#include <math.h> #include <math.h>
#include "VectorIndexRange.h" #include <lal/VectorIndexRange.h>
#define TYPECODE Z #define TYPECODE Z
#define TYPE COMPLEX16 #define TYPE COMPLEX16
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@ TEST_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"'
LDADD = \ LDADD = \
$(top_builddir)/lib/lal/liblal.la \ $(top_builddir)/lib/lal/liblal.la \
$(top_builddir)/lib/lalsupport/src/liblalsupport.la $(top_builddir)/lib/lalsupport/src/liblalsupport.la
......
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@
noinst_LTLIBRARIES = libwindow.la noinst_LTLIBRARIES = libwindow.la
libwindow_la_SOURCES = Window.c libwindow_la_SOURCES = Window.c
include $(top_srcdir)/gnuscripts/lallibs_header_links.am include $(top_srcdir)/gnuscripts/lallibs_header_links.am
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/../include @AM_CPPFLAGS@ TEST_CPPFLAGS = -DTEST_DATA_DIR='"$(abs_srcdir)/"'
LDADD = $(top_builddir)/lib/lal/liblal.la -lm LDADD = $(top_builddir)/lib/lal/liblal.la -lm
check_PROGRAMS = WindowTest check_PROGRAMS = WindowTest
......
...@@ -385,9 +385,6 @@ AC_CHECK_FUNCS([setenv]) ...@@ -385,9 +385,6 @@ AC_CHECK_FUNCS([setenv])
# set prefix # set prefix
AC_DEFINE_UNQUOTED([PREFIX],["$prefix"],[Install prefix]) AC_DEFINE_UNQUOTED([PREFIX],["$prefix"],[Install prefix])
# add gcc specific flags
LALSUITE_ADD_GCC_FLAGS
# define if CUDA is enabled # define if CUDA is enabled
if test "${cuda}" = "true"; then if test "${cuda}" = "true"; then
AC_DEFINE([LALAPPS_CUDA_ENABLED],[1],[Define if using cuda library]) AC_DEFINE([LALAPPS_CUDA_ENABLED],[1],[Define if using cuda library])
...@@ -407,6 +404,15 @@ if test "${static_binaries}" = "true"; then ...@@ -407,6 +404,15 @@ if test "${static_binaries}" = "true"; then
AC_DISABLE_SHARED AC_DISABLE_SHARED
fi fi
# add gcc specific flags
LALSUITE_ADD_GCC_FLAGS
# add extra preprocessor flags
AM_CPPFLAGS="-DPKG_DATA_DIR='\"\$(pkgdatadir)/\"' ${AM_CPPFLAGS}"
AM_CPPFLAGS="-I\$(top_builddir)/src/lalapps ${AM_CPPFLAGS}"
AM_CPPFLAGS="-I\$(top_srcdir)/src/lalapps ${AM_CPPFLAGS}"
AM_CPPFLAGS="-I\$(top_srcdir)/src ${AM_CPPFLAGS}"
# force all python modules into the exec dir to prevent mixed C and # force all python modules into the exec dir to prevent mixed C and
# pure-python library code from being split across lib and lib64 on # pure-python library code from being split across lib and lib64 on
# RedHat-derived systems. # RedHat-derived systems.
......
...@@ -8,7 +8,6 @@ bin_PROGRAMS = \ ...@@ -8,7 +8,6 @@ bin_PROGRAMS = \
lalapps_ComputeStrainDriver \ lalapps_ComputeStrainDriver \
lalapps_NoiseComparison lalapps_NoiseComparison
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/lalapps -I$(top_builddir)/src/lalapps -DPKG_DATA_DIR='"$(pkgdatadir)/"' @AM_CPPFLAGS@
LDADD = $(top_builddir)/src/lalapps/liblalapps.la LDADD = $(top_builddir)/src/lalapps/liblalapps.la
if HAVE_PYTHON if HAVE_PYTHON
......
...@@ -31,7 +31,6 @@ lalapps_BankEfficiency_SOURCES = BankEfficiency.c BankEfficiency.h ...@@ -31,7 +31,6 @@ lalapps_BankEfficiency_SOURCES = BankEfficiency.c BankEfficiency.h
endif endif
endif endif
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/lalapps -I$(top_builddir)/src/lalapps -DPKG_DATA_DIR='"$(pkgdatadir)/"' @AM_CPPFLAGS@
LDADD = $(top_builddir)/src/lalapps/liblalapps.la LDADD = $(top_builddir)/src/lalapps/liblalapps.la
EXTRA_DIST = \ EXTRA_DIST = \
......
...@@ -61,7 +61,6 @@ EXTRA_DIST = \ ...@@ -61,7 +61,6 @@ EXTRA_DIST = \
framestats.c \ framestats.c \
computespec.c computespec.c
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/lalapps -DPKG_DATA_DIR='"$(pkgdatadir)/"' @AM_CPPFLAGS@
LDADD = $(top_builddir)/src/lalapps/liblalapps.la LDADD = $(top_builddir)/src/lalapps/liblalapps.la
BUILT_SOURCES = BUILT_SOURCES =
......
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/lalapps -DPKG_DATA_DIR='"$(pkgdatadir)/"' @AM_CPPFLAGS@
LDADD = $(top_builddir)/src/lalapps/liblalapps.la LDADD =