Commit 0bf9add4 authored by Jolien Creighton's avatar Jolien Creighton Committed by Adam Mercer

top-level lalsuite configure functionality

Adds functionality so that you can configure both lal and lalapps from a
top level configure script.  There is a 00boot that calls lal/00boot
and lalapps/00boot and then there is a top level configure which will
configure both lal and lalapps.  The top level Makefile then makes both
lal and lalapps so that they can be installed together.  The lalapps
configure script is significantly modified to allow this.
Original: ae2e5c98f3832d544098910ae2c0ebed83232f60
parent 670919d5
*.swp
*~
.DS_Store
Makefile
Makefile.in
aclocal.m4
autom4te.cache/
config.log
config.status
configure
lalsuite-*.tar.gz
lalsuite.spec
libtool
#!/bin/sh
## Function to report failure
fail () {
echo "!!! 00boot: $1 failed" >&2
echo "!!! 00boot: consult the file 'README' for help" >&2
exit 1
}
## Run 00boot in subdirs
for d in lal lalapps; do
echo "00boot: running 00boot in $d"
(cd "$d" && ./00boot 1>/dev/null) || fail "00boot in $d"
done
echo "00boot: running autoreconf"
autoreconf || fail "autoreconf"
echo "00boot: success"
echo "
=================================================================
00boot has been run.
Now run './configure' with appropriate options
to configure LALSuite.
================================================================="
ACLOCAL_AMFLAGS = -I lal/misc
SUBDIRS = @subdirs@
MAINTAINERCLEANFILES = lalsuite.spec
vcs-clean: cvs-clean
cvs-clean: maintainer-clean
rm -f Makefile.in
rm -f configure
rm -f aclocal.m4
rm -f config.cache
rm -f config.status
rm -f config.log
AC_INIT([lalsuite],[6.0],[lal-discuss@gravity.phys.uwm.edu])
AC_CONFIG_SRCDIR([lal/configure.ac])
AC_CONFIG_AUX_DIR([lal/misc])
AC_CONFIG_MACRO_DIR([lal/misc])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([lalsuite.spec])
AM_INIT_AUTOMAKE([foreign])
AC_PREFIX_DEFAULT([/opt/lscsoft/lalsuite])
LAL_ENABLE_FRAME
LAL_ENABLE_METAIO
LAL_ENABLE_XML
AM_PROG_LIBTOOL
lalsuite_top_builddir='$(top_builddir)/..'
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
LALSUPPORT_LIBS="${lalsuite_top_builddir}/lal/packages/support/src/liblalsupport.la"
export LALSUPPORT_LIBS
if test "$frame" = "true" ; then
LIBS_save="$LIBS"
CPPFLAGS_save="$CPPFLAGS"
PKG_CHECK_MODULES(FRAME, libframe, [ true ], [ false ])
LIBS="$FRAME_LIBS $LIBS"
CPPFLAGS="$CPPFLAGS $FRAME_CFLAGS"
AC_SEARCH_LIBS(FrLibIni, Frame, , [AC_MSG_WARN(disabling framelib support)]
[frame="false"])
CPPFLAGS="$CPPFLAGS_save"
LIBS="$LIBS_save"
fi
if test "$metaio" = "true" ; then
LIBS_save="$LIBS"
CPPFLAGS_save="$CPPFLAGS"
PKG_CHECK_MODULES(METAIO, libmetaio, [ true ], [ false ])
LIBS="$METAIO_LIBS $LIBS"
CPPFLAGS="$CPPFLAGS $METAIO_CFLAGS"
AC_SEARCH_LIBS(MetaioOpen, metaio dataflow, , [AC_MSG_WARN(disabling metaio support)]
[metaio="false"])
CPPFLAGS="$CPPFLAGS_save"
LIBS="$LIBS_save"
LIBS_save="$LIBS"
CPPFLAGS_save="$CPPFLAGS"
fi
if test "$xml" = "true" ; then
PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.6, [ true ], [ false ])
LIBS="$LIBXML2_LIBS $LIBS"
CPPFLAGS="$CPPFLAGS $LIBXML2_CFLAGS"
AC_SEARCH_LIBS(xmlInitParser, xml2, , [AC_MSG_WARN(disabling xml support)]
[xml="false"])
CPPFLAGS="$CPPFLAGS_save"
LIBS="$LIBS_save"
fi
if test "$frame" = "true" ; then
LALFRAME_LIBS="${lalsuite_top_builddir}/lal/packages/framedata/src/liblalframe.la"
export LALFRAME_LIBS
fi
if test "$metaio" = "true" ; then
LALMETAIO_LIBS="${lalsuite_top_builddir}/lal/packages/support/src/liblalmetaio.la"
export LALMETAIO_LIBS
fi
if test "$xml" = "true" ; then
LALXML_LIBS="${lalsuite_top_builddir}/lal/packages/support/src/liblalxml.la"
export LALXML_LIBS
fi
AC_CONFIG_SUBDIRS([lal])
AC_CONFIG_SUBDIRS([lalapps])
AC_OUTPUT
......@@ -10,6 +10,7 @@ sysconf_DATA = lal-user-env.sh lal-user-env.csh
BUILT_SOURCES = lal-user-env.sh lal-user-env.csh
pkginclude_HEADERS = lalGitID.h
all-local: include-link
lalGitID.h: gitID
install-exec-local: uninstall-lal-sh-target
......@@ -63,3 +64,5 @@ gitID:
if test -f $(top_srcdir)/misc/generateGitID.sh; then \
$(SHELL) $(top_srcdir)/misc/generateGitID.sh $(top_srcdir) lal; \
fi
@INCLUDEMKFILE@
......@@ -43,6 +43,7 @@ AC_CONFIG_FILES([\
src/tracksearch/Makefile \
])
AM_INIT_AUTOMAKE([])
AC_ARG_VAR(LALSUITE_BUILD,[Set if part of lalsuite build])
AH_TOP([
#ifndef CONFIG_H
#define CONFIG_H])
......@@ -99,6 +100,7 @@ AC_PROG_AWK
AC_PROG_CC_STDC
AC_PROG_CPP
AC_ENABLE_SHARED
if test "x$condor" = "xtrue"; then
AC_CHECK_PROGS(CONDOR_COMPILE, condor_compile)
CC="$CONDOR_COMPILE $CC"
......@@ -125,44 +127,38 @@ dnl Checks for libraries.
AC_CHECK_LIB(m, sin)
AC_CHECK_LIB(z, compress)
dnl LAL and LALSupport (required unless part of a lal build).
if test "${LAL_BUILD:="false"}" = "true" ; then
AC_MSG_NOTICE([building lalapps as part of lal])
else
if test -n "$LAL_PREFIX" ; then
PKG_CONFIG_PATH="$LAL_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
LAL_CFLAGS="-I$LAL_PREFIX/include"
LAL_LIBS="-L$LAL_PREFIX/lib -llal"
LALSUPPORT_CFLAGS="-I$LAL_PREFIX/include"
LALSUPPORT_LIBS="-L$LAL_PREFIX/lib -llalsupport"
fi
PKG_CHECK_MODULES(LAL, lal, [ true ], [ false ])
PKG_CHECK_MODULES(LALSUPPORT, lalsupport , [ true ], [ false ])
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))
dnl LALFrame, LALMetaIo, and LALXML (optional).
lalframe="true"
lalmetaio="true"
lalxml="true"
PKG_CHECK_MODULES(LALFRAME, lalframe, [ true ], [ false ])
PKG_CHECK_MODULES(LALMETAIO, lalmetaio, [ true ], [ false ])
PKG_CHECK_MODULES(LALXML, lalxml, [ true ], [ false ])
CPPFLAGS="$CPPFLAGS $LALFRAME_CFLAGS $LALMETAIO_CFLAGS $LALXML_CFLAGS"
LIBS="$LIBS $LALFRAME_LIBS $LALMETAIO_LIBS $LALXML_LIBS"
dnl do actual checks for libraries after checking for gsl and FrameL
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"
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
dnl LALFrame, LALMetaIo, and LALXML (optional).
lalframe="true"
lalmetaio="true"
lalxml="true"
PKG_CHECK_MODULES(LALFRAME, lalframe, [ true ], [ false ])
PKG_CHECK_MODULES(LALMETAIO, lalmetaio, [ true ], [ false ])
PKG_CHECK_MODULES(LALXML, lalxml, [ true ], [ false ])
if test "$LALSUITE_BUILD" != "true" ; then
CPPFLAGS="$CPPFLAGS $LALFRAME_CFLAGS $LALMETAIO_CFLAGS $LALXML_CFLAGS"
LIBS="$LALFRAME_LIBS $LALMETAIO_LIBS $LALXML_LIBS $LIBS"
fi
dnl cfitsio
PKG_CHECK_MODULES(CFITSIO, cfitsio, [ true ], [ false ])
CPPFLAGS="$CPPFLAGS $CFITSIO_CFLAGS"
LIBS="$LIBS $CFITSIO_LIBS"
LIBS="$CFITSIO_LIBS $LIBS"
dnl GSL
PKG_CHECK_MODULES(GSL, gsl, [ true ], [ false ])
CPPFLAGS="$CPPFLAGS $GSL_CFLAGS"
LIBS="$LIBS $GSL_LIBS"
LIBS="$GSL_LIBS $LIBS"
extra_CPPFLAGS="$extra_CPPFLAGS $GSL_CFLAGS"
extra_LIBS="$GSL_LIBS $extra_LIBS"
AC_CHECK_LIB(gslcblas, main)
AC_CHECK_LIB(gsl, gsl_version)
......@@ -205,7 +201,7 @@ if test "${cfitsio}" = "true"; then
fi
dnl Now check for LALFrame and LALMetaIo
if test "$LAL_BUILD" != "true" ; then
if test "$LALSUITE_BUILD" != "true" ; then
AC_CHECK_LIB(lalframe, LALFrOpen, , lalframe="false")
AC_CHECK_LIB(lalmetaio, LALSnglInspiralTableFromLIGOLw, , lalmetaio="false")
AC_CHECK_LIB(lalxml, XLALXMLFilePrintElements, , lalxml="false")
......@@ -216,7 +212,7 @@ AC_HEADER_STDC
AC_CHECK_HEADERS(getopt.h)
AC_CHECK_HEADERS([gsl/gsl_fft_real.h])
AC_CHECK_HEADERS(mpi.h)
if test "$LAL_BUILD" != "true" ; then
if test "$LALSUITE_BUILD" != "true" ; then
AC_CHECK_HEADERS([lal/LALStdlib.h])
fi
AC_CHECK_HEADERS(glob.h)
......@@ -267,19 +263,16 @@ AC_MSG_RESULT(no))
AC_CHECK_FUNCS(setenv)
if test "$LAL_BUILD" = "true"; then
LIBS="$LALXML_LIBS $LALFRAME_LIBS $LALMETAIO_LIBS $LALSUPPORT_LIBS $LAL_LIBS $CFITSIO_LIBS $LIBS"
CPPFLAGS="$CPPFLAGS $CFITSIO_CFLAGS $LAL_CFLAGS $LALSUPPORT_CFLAGS $LALFRAME_CFLAGS $LALMETAIO_CFLAGS $LALXML_LIBS"
if test "$LALSUITE_BUILD" = "true"; then
LIBS="$LALXML_LIBS $LALFRAME_LIBS $LALMETAIO_LIBS $LALSUPPORT_LIBS $LAL_LIBS $LIBS"
CPPFLAGS="$CPPFLAGS $LAL_CFLAGS $LALSUPPORT_CFLAGS $LALFRAME_CFLAGS $LALMETAIO_CFLAGS $LALXML_LIBS"
lalframe="false"
lalmetaio="false"
lalxml="false"
cfitsio="false"
test -z "$LALFRAME_LIBS" && test -z "$LALFRAME_CFLAGS" && lalframe="true"
test -z "$LALMETAIO_LIBS" && test -z "$LALMETAIO_CFLAGS" && lalmetaio="true"
test -z "$LALXML_LIBS" && test -z "$LALXML_CFLAGS" && lalxml="true"
test -z "$CFITSIO_LIBS" && test -z "$CFITSIO_CFLAGS" && cfitsio="true"
test -n "$LALFRAME_LIBS" && lalframe="true"
test -n "$LALMETAIO_LIBS" && lalmetaio="true"
test -n "$LALXML_LIBS" && lalxml="true"
fi
AC_ARG_VAR(LAL_BUILD,[set to "true" if lalapps is built as part of a lal build])
AM_CONDITIONAL(FRAME, test x$frame = xtrue)
AM_CONDITIONAL(LALFRAME, test x$lalframe = xtrue)
......
......@@ -12,7 +12,7 @@ bin_PROGRAMS = lalapps_version lalapps_tconvert lalapps_cache
lalapps_version_SOURCES = version.c lalapps.h
lalapps_tconvert_SOURCES = tconvert.c getdate.c getdate.h
lalapps_cache_SOURCES = cache.c
LDADD = liblalapps.la
LDADD = liblalapps.la @LAL_LIBS@
INCLUDES = -I$(top_srcdir)/src
if HAVE_PYTHON
pkgpython_DATA = __init__.py
......
%define _prefix @prefix@
%define _mandir %{_prefix}/share/man
%define _sysconfdir %{_prefix}/etc
Name: @PACKAGE@
Version: @VERSION@
Release: 1
Summary: LSC Algorithm Library Suite
License: GPL
Group: LAL
Source: %{name}-%{version}.tar.gz
URL: http://www.lsc-group.phys.uwm.edu/lal
Packager: Jolien Creighton <jolien@uwm.edu>
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: gsl fftw libframe libmetaio libxml2
Prefix: %{_prefix}
%description
The LSC Algorithm Library for gravitational wave data analysis.
This package contains the shared-object libraries and applications.
%package devel
Summary: Files and documentation needed for compiling programs that use LAL
Group: LAL
Requires: %{name} = %{version}
Requires: gsl-devel libframe-devel libmetaio-devel libxml2-devel
%description devel
The LSC Algorithm Library for gravitational wave data analysis.
This package contains files needed build applications that use the LAL library
as well as the documentation for the library.
%package apps
Summary: Application programs that use LAL
Group: LAL
Requires: %{name} = %{version}
Requires: cfitsio python
%description apps
The LSC Algorithm Library for gravitational wave data analysis.
This package contains the application programs that use the LAL library.
%prep
%setup -q
%build
source /opt/lscsoft/lscsoft-user-env.sh
nightly_version=@NIGHTLY_VERSION@
%configure --enable-nightly=${nightly_version:-no} --disable-debug
%{__make}
%install
%makeinstall
%post
ldconfig
%postun
ldconfig
%clean
[ ${RPM_BUILD_ROOT} != "/" ] && rm -Rf ${RPM_BUILD_ROOT}
rm -Rf ${RPM_BUILD_DIR}/%{name}-%{version}
%files
%defattr(-,root,root)
%{_bindir}/lal-version
%{_sbindir}/uninstall-lal.sh
%{_libdir}/*.so*
%{_sysconfdir}/lal-user-env.*
%files devel
%defattr(-,root,root)
%{_bindir}/lal-config
%{_libdir}/*a
%{_libdir}/pkgconfig/*
%{_includedir}/lal
%{_datadir}/*
%{_mandir}/man1/lal-config.1*
%{_mandir}/man3/lal.3*
%files apps
%defattr(-,root,root)
%{_bindir}/*
%{_pkgpythondir}/*
%{_mandir}/man1/*
%{_datadir}/lalapps/*
%{_sysconfdir}/lalapps-user-env.*
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