Commit 9c2093e5 authored by Jolien Creighton's avatar Jolien Creighton

make toplevel build work with lalstochastic split

Original: 40110eb6c96bebfb0beab37bbe4efcf21e462d07
parent 81d015ca
......@@ -8,7 +8,7 @@ fail () {
}
## Run 00boot in subdirs
for d in lal lalapps; do
for d in lal lalstochastic lalapps; do
echo "00boot: running 00boot in $d"
(cd "$d" && ./00boot 1>/dev/null) || fail "00boot in $d"
done
......
ACLOCAL_AMFLAGS = -I lal/misc
SUBDIRS = @subdirs@
distcleancheck_listfiles = find . -type f \! -name "LALVCSInfo.h" -print
MAINTAINERCLEANFILES = lalsuite.spec
vcs-clean: cvs-clean
cvs-clean: maintainer-clean
......
......@@ -14,14 +14,17 @@ LAL_ENABLE_XML
AM_PROG_LIBTOOL
lalsuite_top_builddir='$(top_builddir)/..'
lalsuite_top_srcdir='$(top_srcdir)/..'
LALSUITE_BUILD="true"
LAL_LIBS="${lalsuite_top_builddir}/lal/lib/liblal.la"
LAL_CFLAGS="-I${lalsuite_top_builddir}/lal/include"
export LALSUITE_BUILD LAL_LIBS LAL_CFLAGS
LAL_TOP_SRCDIR="${lalsuite_top_srcdir}/lal"
export LALSUITE_BUILD LAL_LIBS LAL_CFLAGS LAL_TOP_SRCDIR
LALSUPPORT_LIBS="${lalsuite_top_builddir}/lal/packages/support/src/liblalsupport.la"
export LALSUPPORT_LIBS
LALSTOCHASTIC_LIBS="${lalsuite_top_builddir}/lal/packages/stochastic/src/liblalstochastic.la"
export LALSTOCHASTIC_LIBS
LALSTOCHASTIC_LIBS="${lalsuite_top_builddir}/lalstochastic/src/liblalstochastic.la"
LALSTOCHASTIC_CFLAGS="-I${lalsuite_top_builddir}/lalstochastic/include"
export LALSTOCHASTIC_LIBS LALSTOCHASTIC_CFLAGS
if test "$frame" = "true" ; then
LIBS_save="$LIBS"
......@@ -72,6 +75,7 @@ if test "$xml" = "true" ; then
fi
AC_CONFIG_SUBDIRS([lal])
AC_CONFIG_SUBDIRS([lalstochastic])
AC_CONFIG_SUBDIRS([lalapps])
AC_OUTPUT
......@@ -44,6 +44,7 @@ AC_CONFIG_FILES([\
])
AM_INIT_AUTOMAKE([])
AC_ARG_VAR(LALSUITE_BUILD,[Set if part of lalsuite build])
AC_ARG_VAR(LAL_TOP_SRCDIR,[Set to top source directory of lal])
AH_TOP([
#ifndef CONFIG_H
#define CONFIG_H])
......@@ -154,8 +155,8 @@ AC_CHECK_LIB(z, compress)
PKG_CHECK_MODULES(LAL, lal, [ true ], [ false ])
PKG_CHECK_MODULES(LALSUPPORT, lalsupport , [ true ], [ false ])
if test "$LALSUITE_BUILD" != "true" ; then
CPPFLAGS="$CPPFLAGS $LAL_CFLAGS $LALSUPPORT_CFLAGS $LALSTOCHASTIC_CFLAGS"
LIBS="$LALSUPPORT_LIBS $LAL_LIBS $LALSTOCHASTIC_LIBS $LIBS"
CPPFLAGS="$CPPFLAGS $LAL_CFLAGS $LALSUPPORT_CFLAGS"
LIBS="$LALSUPPORT_LIBS $LAL_LIBS $LIBS"
AC_CHECK_LIB(lal, LALVersion, , AC_MSG_ERROR(could not find the LAL library))
AC_CHECK_LIB(lalsupport, LALOpenDataFile, , AC_MSG_ERROR(could not find the LAL support library))
fi
......@@ -292,6 +293,9 @@ AC_CHECK_FUNCS(setenv)
if test "$LALSUITE_BUILD" = "true"; then
LIBS="$LAL_LIBS $LALSUPPORT_LIBS $LALSTOCHASTIC_LIBS $LALFRAME_LIBS $LALMETAIO_LIBS $LALXML_LIBS $LIBS"
CPPFLAGS="$LAL_CFLAGS $LALSUPPORT_CFLAGS $LALSTOCHASTIC_CFLAGS $LALFRAME_CFLAGS $LALMETAIO_CFLAGS $LALXML_CFLAGS $CPPFLAGS"
echo "LAL_TOP_SRCDIR=$LAL_LIBS"
echo "LAL_TOP_SRCDIR=$LAL_TOP_SRCDIR"
AC_SUBST(LAL_TOP_SRCDIR)
lalframe="false"
lalmetaio="false"
lalxml="false"
......
......@@ -59,6 +59,11 @@ lalapps_ComputeFStatAnalyticMonteCarloUpperLimit_SOURCES = ComputeFStatAnalyticM
lalapps_synthesizeBstatMC_SOURCES = synthesizeBstatMC.c
EXTRA_DIST = testFStat.sh testCFSv2.sh testGridv2.sh Fstats.ref1 Fstats.ref2 testPredictFStat.sh
TESTS = testFStat.sh testCFSv2.sh testGridv2.sh testPredictFStat.sh
TESTS_ENVIRONMENT = \
LAL_TOP_SRCDIR=$(LAL_TOP_SRCDIR) \
LAL_PREFIX=$(LAL_PREFIX) \
LAL_DATA_PATH=.:$${LAL_TOP_SRCDIR:+"$${LAL_TOP_SRCDIR}/packages/pulsar/test"}:$${LAL_PREFIX:+"$${LAL_PREFIX}/share/lal"}
CLEANFILES =
......@@ -42,5 +42,10 @@ psinject_SOURCES = psinject.c
EXTRA_DIST = testMakefakedata.sh testMFDv4.sh testMFDv4-HW.sh testT8_1800
TESTS = testMakefakedata.sh testMFDv4.sh testMFDv4-HW.sh
TESTS_ENVIRONMENT = \
LAL_TOP_SRCDIR=$(LAL_TOP_SRCDIR) \
LAL_PREFIX=$(LAL_PREFIX) \
LAL_DATA_PATH=.:$${LAL_TOP_SRCDIR:+"$${LAL_TOP_SRCDIR}/packages/pulsar/test"}:$${LAL_PREFIX:+"$${LAL_PREFIX}/share/lal"}
CLEANFILES =
......@@ -28,7 +28,7 @@ tol=1e-4 ## error tolerance for v2-v4 strain comparison
if [ -z "$LAL_DATA_PATH" ]; then
if [ -n "$LAL_PREFIX" ]; then
export LAL_DATA_PATH=".:${LAL_PREFIX}/share/lal";
LAL_DATA_PATH=".:${LAL_PREFIX}/share/lal";
else
echo
echo "Need environment-variable LAL_PREFIX, or LAL_DATA_PATH to be set"
......@@ -38,6 +38,7 @@ if [ -z "$LAL_DATA_PATH" ]; then
exit 1
fi
fi
export LAL_DATA_PATH
#prepare test subdirectory
if [ ! -d "$testDIR" ]; then
......@@ -47,7 +48,12 @@ else
rm -f $testDIR/* || true
fi
ephemdir=$LAL_PREFIX/share/lal
#ephemdir=$LAL_PREFIX/share/lal
# determine ephemdir from LAL_DATA_PATH
SAVEIFS="$IFS"
IFS=:
for ephemdir in $LAL_DATA_PATH; do test -r $ephemdir/earth00-04.dat && break; done
IFS="$SAVEIFS"
# input parameters
Tsft=20
......
......@@ -15,7 +15,7 @@ compCode="${builddir}lalapps_compareSFTs"
if [ -z "$LAL_DATA_PATH" ]; then
if [ -n "$LAL_PREFIX" ]; then
export LAL_DATA_PATH=".:${LAL_PREFIX}/share/lal";
LAL_DATA_PATH=".:${LAL_PREFIX}/share/lal";
else
echo
echo "Need environment-variable LAL_PREFIX, or LAL_DATA_PATH to be set"
......@@ -25,6 +25,7 @@ if [ -z "$LAL_DATA_PATH" ]; then
exit 1
fi
fi
export LAL_DATA_PATH
if [ -z "$1" ]; then
newcode=${newcodeDEFAULT}
......@@ -45,7 +46,13 @@ fi
tol="1e-4"; ## tolerance on relative difference between SFTs in comparison
# input parameters
## FIXED
ephemdir=$LAL_PREFIX/share/lal
#ephemdir=$LAL_PREFIX/share/lal
# determine ephemdir from LAL_DATA_PATH
SAVEIFS="$IFS"
IFS=:
for ephemdir in $LAL_DATA_PATH; do test -r $ephemdir/earth00-04.dat && break; done
IFS="$SAVEIFS"
Tsft=1800
nTsft=20
timestamps="$srcdir/testT8_1800"
......
......@@ -85,11 +85,19 @@ AC_CHECK_LIB([m],[main],,[AC_MSG_ERROR([cannot find the math library])])
PKG_CHECK_MODULES([LAL],[lal >= 6.3],[true],[false])
CPPFLAGS="$CPPFLAGS $LAL_CFLAGS"
LIBS="$LIBS $LAL_LIBS"
AC_CHECK_LIB([lal],[main],,[AC_MSG_ERROR(cannot find lal library)])
# check for lalsupport, needed for test suite
PKG_CHECK_MODULES([LALSUPPORT],[lalsupport],[true],[false])
AC_CHECK_LIB([lalsupport],[LALOpenDataFile],[lalsupport=true],[lalsupport=false])
# check libraries if not a top-level build
CPPFLAGS="$CPPFLAGS $LAL_CFLAGS $LALSUPPORT_CFLAGS"
LIBS="$LALSUPPORT_LIBS $LAL_LIBS $LIBS"
if test "$LALSUITE_BUILD" = "true" ; then
test -n "$LALSUPPORT_LIBS" && lalsupport="true"
else
AC_CHECK_LIB([lal],[main],,[AC_MSG_ERROR(cannot find lal library)])
AC_CHECK_LIB([lalsupport],[LALOpenDataFile],[lalsupport=true],[lalsupport=false])
fi
AM_CONDITIONAL([LALSUPPORT], [test x$lalsupport = xtrue])
# add gcc specific flags
......
# Process this file with automake to produce Makefile.in
AMCFLAGS = $(LALSUPPORT_CFLAGS)
LIBS := $(LIBS) $(LALSUPPORT_LIBS)
if LALSUPPORT
check_PROGRAMS = StochasticCrossCorrelationStatisticTest \
......@@ -18,49 +17,62 @@ endif
StochasticCrossCorrelationStatisticTest_SOURCES = \
StochasticCrossCorrelationStatisticTest.c CheckStatus.c
StochasticCrossCorrelationStatisticTest_LDADD = \
$(LALSUPPORT_LIBS) \
$(top_builddir)/src/liblalstochastic.la
StochasticHeterodynedCrossCorrelationStatisticTest_SOURCES = \
StochasticHeterodynedCrossCorrelationStatisticTest.c CheckStatus.c
StochasticHeterodynedCrossCorrelationStatisticTest_LDADD = \
$(LALSUPPORT_LIBS) \
$(top_builddir)/src/liblalstochastic.la
StochasticCrossCorrelationSpectrumTest_SOURCES = \
StochasticCrossCorrelationSpectrumTest.c CheckStatus.c
StochasticCrossCorrelationSpectrumTest_LDADD = \
$(LALSUPPORT_LIBS) \
$(top_builddir)/src/liblalstochastic.la
SZeroPadAndFFTTest_SOURCES = SZeroPadAndFFTTest.c CheckStatus.c
SZeroPadAndFFTTest_LDADD = \
$(LALSUPPORT_LIBS) \
$(top_builddir)/src/liblalstochastic.la
CZeroPadAndFFTTest_SOURCES = CZeroPadAndFFTTest.c CheckStatus.c
CZeroPadAndFFTTest_LDADD = \
$(LALSUPPORT_LIBS) \
$(top_builddir)/src/liblalstochastic.la
StochasticOptimalFilterTest_SOURCES = \
StochasticOptimalFilterTest.c CheckStatus.c
StochasticOptimalFilterTest_LDADD = \
$(LALSUPPORT_LIBS) \
$(top_builddir)/src/liblalstochastic.la
StochasticOptimalFilterNormalizationTest_SOURCES = \
StochasticOptimalFilterNormalizationTest.c CheckStatus.c
StochasticOptimalFilterNormalizationTest_LDADD = \
$(LALSUPPORT_LIBS) \
$(top_builddir)/src/liblalstochastic.la
StochasticOmegaGWTest_SOURCES = \
StochasticOmegaGWTest.c CheckStatus.c
StochasticOmegaGWTest_LDADD = \
$(LALSUPPORT_LIBS) \
$(top_builddir)/src/liblalstochastic.la
OverlapReductionFunctionTest_SOURCES = \
OverlapReductionFunctionTest.c CheckStatus.c
OverlapReductionFunctionTest_LDADD = \
$(LALSUPPORT_LIBS) \
$(top_builddir)/src/liblalstochastic.la
StochasticInverseNoiseTest_SOURCES = \
StochasticInverseNoiseTest.c CheckStatus.c
StochasticInverseNoiseTest_LDADD = \
$(LALSUPPORT_LIBS) \
$(top_builddir)/src/liblalstochastic.la
SimulateSBTest_SOURCES = SimulateSBTest.c CheckStatus.c
SimulateSBTest_LDADD = \
$(LALSUPPORT_LIBS) \
$(top_builddir)/src/liblalstochastic.la
SimulatePopcornTest_SOURCES = SimulatePopcornTest.c
SimulatePopcornTest_LDADD = \
$(LALSUPPORT_LIBS) \
$(top_builddir)/src/liblalstochastic.la
AstroOmegaTest_SOURCES = AstroOmegaTest.c
AstroOmegaTest_LDADD = \
$(LALSUPPORT_LIBS) \
$(top_builddir)/src/liblalstochastic.la
INCLUDES = -I../include
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment