Gitlab will migrate to a new storage backend starting 0300 UTC on 2020-04-04. We do not anticipate a maintenance window for this migration. Performance may be impacted over the weekend. Thanks for your patience.

Commit 12604818 authored by Karl Wette's avatar Karl Wette

Top-level build: use pkg-config to determine inter-library dependencies

- and paths to uninstalled data files, and Octave and Python modules
- use Automake AM_CFLAGS, etc. variables for compiler/linker flags,
  reserving CFLAGS, etc. for the user per GNU coding standards
- new macro LALSUITE_CHECK_LIBRARY_FOR_SUPPORT for checking config headers
- refs #1071
Original: 349a041f22bf68574ed37238c5fb205d71929706
parent 4d5ca304
ACLOCAL_AMFLAGS = -I gnuscripts
SUBDIRS = @subdirs@
# Override automake's default rule for rebuilding aclocal.m4, to ensure that
# ./configure is successfully recreated after certain build system changes which
# require other autotools (e.g. autoheader) to be re-run. See Redmine issue #728.
......@@ -11,7 +13,3 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
# exports) are propagated to the library-level configurations. See Redmine issue #728.
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) $(top_srcdir)/configure $(ac_configure_args)
SUBDIRS = \
gnuscripts \
@subdirs@
#!/bin/bash
# top-level build script for LALSuite
# autoconf variables
MKDIR_P="@MKDIR_P@"
builddir="@abs_builddir@"
configure_args="@configure_args@"
prefix="@prefix@"
srcdir="@abs_srcdir@"
subdirs="@subdirs@"
# function to print a message
msg () {
echo "$0: $1"
}
# function to print an error message and exit
fail () {
echo "!!! $0: $1" >&2
exit 1
}
# function to clean up files if a command fails or is interrupted
cleanup() {
[ -n "${cleanup_files}" ] && rm -rf ${cleanup_files}
}
cleanup_files=""
trap cleanup 1 2 13 15
# function to run a command, or print an error message
run() {
msg "running (cd ${PWD} && $1)"
eval "( $1 ) ${mute_redirect}" || { cleanup; fail "(cd ${PWD} && $1) failed"; }
}
# function to check whether $1 is out of date relative to $2
outofdate() {
[ -f "$2" ] || fail "missing $2, required for building $1"
[ "$2" -nt "$1" ]
}
# function to remove duplicates from a list of words in variable $1
uniquify() {
local uniq arg
for arg in ${!1}; do
case " ${uniq} " in
(*${arg}*)
;;
(*)
uniq="${uniq} ${arg}"
;;
esac
done
eval "$1='${uniq}'"
}
# parse command line
make_cmd="${MAKE-make}"
mute_redirect=""
any_targets=no
make_targets=""
make_clean_targets=""
for arg in "$@"; do
case ${arg} in
# print help
(-h|--help)
cat <<EOF
$0: top-level build script for LALSuite
Usage:
$0 [--mute] [make-options...] [make-targets...]
Options:
--mute only print error messages from build processes
make-options options for make, e.g. -j<jobs>, -k, V=1, etc.
make-targets targets for make, e.g. all, check, distcheck, clean, etc.
EOF
exit 1
;;
# only print error messages from build processes
(--mute)
mute_redirect=">/dev/null"
;;
# pass all options and variable definitions to make
(-*|*=*)
make_cmd="${make_cmd} ${arg}"
;;
# pass any argument beginning with a digit to make
([0-9]*)
make_cmd="${make_cmd} ${arg}"
;;
# save list of make clean targets
(*clean*)
any_targets=yes
make_clean_targets="${make_clean_targets} ${arg}"
;;
# save list of other make targets
(*)
any_targets=yes
make_targets="${make_targets} ${arg}"
;;
esac
done
# if no targets were given, use 'all'
if [ ${any_targets} = no ]; then
make_targets="all"
fi
# always add 'all' and 'install' as make targets
if [ -n "${make_targets}" ]; then
make_targets="all ${make_targets} install"
fi
# remove duplicates from lists of make targets
uniquify make_targets
uniquify make_clean_targets
# save current directory
oldpwd="${PWD}"
# change to top-level build directory
cd "${builddir}"
# rebuild top-level ./configure, if out of date
if outofdate "${srcdir}/configure" "${srcdir}/configure.ac"; then
run "cd ${srcdir} && ./00boot"
fi
# rebuild top-level ./config.status, if out of date
if outofdate "./config.status" "${srcdir}/configure"; then
run "./config.status --recheck"
fi
# rebuild ./build and reload this script, if out of date
if outofdate "./build" "${srcdir}/build.in" || outofdate "./build" "./config.status"; then
run "./config.status"
msg "reloading ..."
cd "${oldpwd}"
exec "${SHELL}" "$0" "$@"
fi
# build make targets in subdirectories
if [ -n "${make_targets}" ]; then
for subdir in ${subdirs}; do
# build and source subdirectories
buildsubdir="${builddir}/${subdir}"
srcsubdir="${srcdir}/${subdir}"
# create build subdirectory, if it does not exist
if [ ! -d "${buildsubdir}" ]; then
run "${MKDIR_P} ${buildsubdir}"
fi
# change to build subdirectory
cd "${buildsubdir}"
# rebuild subdirectory ./configure, if out of date
if outofdate "${srcsubdir}/configure" "${srcsubdir}/configure.ac"; then
run "cd ${srcsubdir} && ./00boot"
fi
# rebuild subdirectory ./config.status, if out of date
if outofdate "./config.status" "${srcsubdir}/configure"; then
cleanup_files="${buildsubdir}/config.status"
run "${srcsubdir}/configure --disable-option-checking ${configure_args}"
cleanup_files=""
fi
# build each target
for target in ${make_targets}; do
run "${make_cmd} ${target}"
done
# change to top-level build directory
cd "${builddir}"
# source environment script for this subdirectory, if it exists
userenv="${prefix}/etc/${subdir}-user-env.sh"
if [ -f "${userenv}" ]; then
msg "sourcing ${userenv}"
source "${userenv}"
fi
done
fi
# perform top-level tasks for specific targets
for target in ${make_targets}; do
case ${target} in
# make top-level tags file
(tags)
msg "generating ${builddir}/TAGS"
rm -f "${builddir}/TAGS"
for subdir in ${subdirs}; do
buildsubdir="${builddir}/${subdir}"
if [ -f "${buildsubdir}/TAGS" ]; then
cat "${buildsubdir}/TAGS" >> "${builddir}/TAGS"
fi
done
;;
esac
done
# reverse list of subdirectories
reverse_subdirs=""
for subdir in ${subdirs}; do
reverse_subdirs="${subdir} ${reverse_subdirs}"
done
# iterate over subdirectories and make clean targets
if [ -n "${make_clean_targets}" ]; then
for subdir in ${reverse_subdirs}; do
# build and source subdirectories
buildsubdir="${builddir}/${subdir}"
srcsubdir="${srcdir}/${subdir}"
# change to build subdirectory
cd "${buildsubdir}"
# build each clean target
for target in ${make_clean_targets}; do
run "${make_cmd} ${target}"
done
# change to top-level build directory
cd "${builddir}"
done
fi
AC_PREREQ([2.63])
AC_INIT([lalsuite],[6.20.1],[lal-discuss@ligo.org])
AC_INIT([LALSuite],[6.20.1],[lal-discuss@ligo.org])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_AUX_DIR([gnuscripts])
AC_CONFIG_MACRO_DIR([gnuscripts])
AC_PREFIX_DEFAULT(["${PWD}/_inst"])
AC_DISABLE_OPTION_CHECKING
AC_PREFIX_DEFAULT(["`pwd`/_inst"])
AC_CONFIG_FILES([Makefile])
AM_INIT_AUTOMAKE([1.11 foreign subdir-objects color-tests parallel-tests])
AM_INIT_AUTOMAKE([1.11 foreign color-tests parallel-tests])
AC_ARG_WITH(
[build-script],
AC_HELP_STRING(
[--with-build-script],
[use top-level build script instead of Makefile]
),[
AS_CASE([${withval}],
[no],[build_script=false],
[yes],[build_script=true],
AC_MSG_ERROR([bad value for --with-build-script: ${withval}])
)
],[
build_script=false
]
)
AS_IF([test "${build_script}" = true],[
##### using top-level build script #####
rm -f ./Makefile
AC_CONFIG_FILES([build],[chmod +x build])
# substitute these variables
AC_SUBST([configure_args])
AC_SUBST([subdirs])
# ensure ./configure arguments include a prefix
configure_args="${ac_configure_args}"
AS_IF([test "x${prefix}" = xNONE],[
configure_args="'--prefix=${ac_default_prefix}' ${configure_args}"
])
LALSUITE_DISTCHECK_CONFIGURE_FLAGS
# check for required programs
AC_PROG_MKDIR_P
# always prefer uninstalled LAL libraries
LALSUITE_PKG_SUFFIX="-uninstalled"
export LALSUITE_PKG_SUFFIX
# provide LAL library enable/disable options
LALSUITE_ENABLE_ALL_LAL
......@@ -61,19 +30,19 @@ LALSUITE_ENABLE_LALINFERENCE
LALSUITE_ENABLE_LALAPPS
# determine subdirectories to configure/build
subdirs=""
AC_DEFUN([lalsuite_config_subdir],[
m4_pushdef([lowercase],translit([[$1]], [A-Z], [a-z]))
m4_pushdef([uppercase],translit([[$1]], [a-z], [A-Z]))
m4_pushdef([lowercase],m4_translit([[$1]], [A-Z], [a-z]))
m4_pushdef([uppercase],m4_translit([[$1]], [a-z], [A-Z]))
# if subdirectory is enabled
# if $1 is enabled
AS_IF([test "x${lowercase}" = xtrue],[
# add to list of subdirectories
subdirs="${subdirs} lowercase"
# add $1 build directory to PKG_CONFIG_PATH
LALSUITE_ADD_PATH(PKG_CONFIG_PATH,"`pwd`/lowercase")
export PKG_CONFIG_PATH
# ensure subdirectory is properly configured
rm -f "lowercase/config.status"
# configure $1
AC_CONFIG_SUBDIRS(lowercase)
# set enable/disable string
uppercase[]_ENABLE_VAL=ENABLED
......@@ -98,6 +67,7 @@ lalsuite_config_subdir([lalpulsar])
lalsuite_config_subdir([lalinference])
lalsuite_config_subdir([lalapps])
AC_SUBST([ac_configure_args])
AC_OUTPUT
echo "
==================================================
......@@ -119,167 +89,7 @@ and will be installed under the directory:
${prefix}
Now run './build' to build and install LALSuite.
Now run 'make' to build LALSuite,
and run 'make install' to install LALSuite.
==================================================
"
],[ dnl test "${build_script}" = true
##### using top-level Makefile #####
rm -f ./build
AC_CONFIG_FILES([Makefile gnuscripts/Makefile])
LALSUITE_DISTCHECK_CONFIGURE_FLAGS
LALSUITE_ENABLE_ALL_LAL
LALSUITE_ENABLE_LALFRAME
LALSUITE_ENABLE_LALMETAIO
LALSUITE_ENABLE_LALXML
LALSUITE_ENABLE_LALSIMULATION
LALSUITE_ENABLE_LALBURST
LALSUITE_ENABLE_LALDETCHAR
LALSUITE_ENABLE_LALINSPIRAL
LALSUITE_ENABLE_LALSTOCHASTIC
LALSUITE_ENABLE_LALPULSAR
LALSUITE_ENABLE_LALINFERENCE
LALSUITE_ENABLE_LALAPPS
lalsuite_top_builddir='$(top_builddir)/..'
lalsuite_top_srcdir='$(top_srcdir)/..'
LALSUITE_BUILD="true"
LALSUITE_SUBDIRS="`echo ${ac_subdirs_all}`"
export LALSUITE_BUILD LALSUITE_SUBDIRS
LAL_LIBS="-L${libdir} ${lalsuite_top_builddir}/lal/lib/lal/liblal.la"
LAL_CFLAGS="-I${lalsuite_top_builddir}/lal/include"
LAL_DATADIR="${lalsuite_top_srcdir}/lal/test"
export LAL_LIBS LAL_CFLAGS LAL_DATADIR
LALSUPPORT_LIBS="-L${libdir} ${lalsuite_top_builddir}/lal/lib/lalsupport/src/liblalsupport.la"
LALSUPPORT_CFLAGS="-I${lalsuite_top_builddir}/lal/include"
export LALSUPPORT_LIBS LALSUPPORT_CFLAGS
if test "$lalframe" = "true"; then
LALFRAME_LIBS="-L${libdir} ${lalsuite_top_builddir}/lalframe/src/liblalframe.la"
LALFRAME_CFLAGS="-I${lalsuite_top_builddir}/lalframe/include"
LALFRAME_DATADIR="${lalsuite_top_srcdir}/lalframe/test"
export LALFRAME_LIBS LALFRAME_CFLAGS LALFRAME_DATADIR
fi
if test "$lalmetaio" = "true"; then
LALMETAIO_LIBS="-L${libdir} ${lalsuite_top_builddir}/lalmetaio/src/liblalmetaio.la"
LALMETAIO_CFLAGS="-I${lalsuite_top_builddir}/lalmetaio/include"
LALMETAIO_DATADIR="${lalsuite_top_srcdir}/lalmetaio/test"
export LALMETAIO_LIBS LALMETAIO_CFLAGS LALMETAIO_DATADIR
fi
if test "$lalxml" = "true"; then
LALXML_LIBS="-L${libdir} ${lalsuite_top_builddir}/lalxml/src/liblalxml.la"
LALXML_CFLAGS="-I${lalsuite_top_builddir}/lalxml/include"
LALXML_DATADIR="${lalsuite_top_srcdir}/lalxml/test"
export LALXML_LIBS LALXML_CFLAGS LALXML_DATADIR
fi
if test "$lalsimulation" = "true"; then
LALSIMULATION_LIBS="-L${libdir} ${lalsuite_top_builddir}/lalsimulation/src/liblalsimulation.la"
LALSIMULATION_CFLAGS="-I${lalsuite_top_builddir}/lalsimulation/include"
LALSIMULATION_DATADIR="${lalsuite_top_srcdir}/lalsimulation/test"
export LALSIMULATION_LIBS LALSIMULATION_CFLAGS LALSIMULATION_DATADIR
fi
if test "$lalburst" = "true"; then
LALBURST_LIBS="-L${libdir} ${lalsuite_top_builddir}/lalburst/src/liblalburst.la"
LALBURST_CFLAGS="-I${lalsuite_top_builddir}/lalburst/include"
LALBURST_DATADIR="${lalsuite_top_srcdir}/lalburst/test"
export LALBURST_LIBS LALBURST_CFLAGS LALBURST_DATADIR
fi
if test "$laldetchar" = "true"; then
LALDETCHAR_LIBS="-L${libdir} ${lalsuite_top_builddir}/laldetchar/src/liblaldetchar.la"
LALDETCHAR_CFLAGS="-I${lalsuite_top_builddir}/laldetchar/include"
LALDETCHAR_DATADIR="${lalsuite_top_srcdir}/laldetchar/test"
export LALDETCHAR_LIBS LALDETCHAR_CFLAGS LALDETCHAR_DATADIR
fi
if test "$lalinspiral" = "true"; then
LALINSPIRAL_LIBS="-L${libdir} ${lalsuite_top_builddir}/lalinspiral/src/liblalinspiral.la"
LALINSPIRAL_CFLAGS="-I${lalsuite_top_builddir}/lalinspiral/include"
LALINSPIRAL_DATADIR="${lalsuite_top_srcdir}/lalinspiral/test"
export LALINSPIRAL_LIBS LALINSPIRAL_CFLAGS LALINSPIRAL_DATADIR
fi
if test "$lalstochastic" = "true"; then
LALSTOCHASTIC_LIBS="-L${libdir} ${lalsuite_top_builddir}/lalstochastic/src/liblalstochastic.la"
LALSTOCHASTIC_CFLAGS="-I${lalsuite_top_builddir}/lalstochastic/include"
LALSTOCHASTIC_DATADIR="${lalsuite_top_srcdir}/lalstochastic/test"
export LALSTOCHASTIC_LIBS LALSTOCHASTIC_CFLAGS LALSTOCHASTIC_DATADIR
fi
if test "$lalpulsar" = "true"; then
LALPULSAR_LIBS="-L${libdir} ${lalsuite_top_builddir}/lalpulsar/src/liblalpulsar.la"
LALPULSAR_CFLAGS="-I${lalsuite_top_builddir}/lalpulsar/include"
LALPULSAR_DATADIR="${lalsuite_top_srcdir}/lalpulsar/test"
export LALPULSAR_LIBS LALPULSAR_CFLAGS LALPULSAR_DATADIR
fi
if test "$lalinference" = "true"; then
LALINFERENCE_LIBS="-L${libdir} ${lalsuite_top_builddir}/lalinference/src/liblalinference.la"
LALINFERENCE_CFLAGS="-I${lalsuite_top_builddir}/lalinference/include"
LALINFERENCE_DATADIR="${lalsuite_top_srcdir}/lalinference/test"
export LALINFERENCE_LIBS LALINFERENCE_CFLAGS LALINFERENCE_DATADIR
fi
AC_CONFIG_SUBDIRS([doxygen])
AC_CONFIG_SUBDIRS([lal])
if test "$lalframe" = "true"; then
AC_CONFIG_SUBDIRS([lalframe])
fi
if test "$lalmetaio" = "true"; then
AC_CONFIG_SUBDIRS([lalmetaio])
fi
if test "$lalxml" = "true"; then
AC_CONFIG_SUBDIRS([lalxml])
fi
if test "$lalsimulation" = "true"; then
AC_CONFIG_SUBDIRS([lalsimulation])
fi
if test "$lalburst" = "true"; then
AC_CONFIG_SUBDIRS([lalburst])
fi
if test "$laldetchar" = "true"; then
AC_CONFIG_SUBDIRS([laldetchar])
fi
if test "$lalinspiral" = "true"; then
AC_CONFIG_SUBDIRS([lalinspiral])
fi
if test "$lalstochastic" = "true"; then
AC_CONFIG_SUBDIRS([lalstochastic])
fi
if test "$lalpulsar" = "true"; then
AC_CONFIG_SUBDIRS([lalpulsar])
fi
if test "$lalinference" = "true"; then
AC_CONFIG_SUBDIRS([lalinference])
fi
if test "$lalapps" = "true"; then
AC_CONFIG_SUBDIRS([lalapps])
fi
AC_SUBST([ac_configure_args])
AC_OUTPUT
]) dnl test "${build_script}" = true
EXTRA_DIST = \
ax_pthread.m4 \
cuda.common \
install-sh \
lalsuite_build.m4 \
lalsuite_gccflags.m4 \
missing
This diff is collapsed.
# -*- mode: autoconf; -*-
# lalsuite_gccflags.m4 - macros to set strict gcc flags
#
# serial 16
AC_DEFUN([LALSUITE_ENABLE_GCC_FLAGS],
[AC_ARG_ENABLE([gcc_flags],
AC_HELP_STRING([--enable-gcc-flags],[turn on strict gcc warning flags (default=yes)]),
[AS_CASE(["${enableval}"],
[yes], [DO_ENABLE_LALSUITE_GCC_FLAGS],
[no],,
[DO_ENABLE_LALSUITE_GCC_FLAGS])],
[DO_ENABLE_LALSUITE_GCC_FLAGS])
# serial 17
AC_DEFUN([LALSUITE_ENABLE_GCC_FLAGS],[
# $0: enable GCC warning flags
AC_ARG_ENABLE([gcc_flags],
AC_HELP_STRING([--enable-gcc-flags],[turn on strict GCC warning flags [default=yes]]),
AS_CASE(["${enableval}"],
[yes|no],[:],
AC_MSG_ERROR([bad value '${enableval}' for --enable-gcc-flags])
),[
enable_gcc_flags=yes
]
)
# end $0
])
AC_DEFUN([DO_ENABLE_LALSUITE_GCC_FLAGS],
[
lal_gcc_flags="-g3 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fno-common -Wnested-externs -Wno-format-zero-length -fno-strict-aliasing"
# check if compiler supports -Wno-unused-result
my_save_cflags="$CFLAGS"
CFLAGS=-Wno-unused-result
AC_MSG_CHECKING([whether compiler supports -Wno-unused-result])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[lal_gcc_flags="${lal_gcc_flags} -Wno-unused-result"],
[AC_MSG_RESULT([no])])
CFLAGS="$my_save_cflags"
# don't use -Werror in LALApps
AS_CASE([${PACKAGE}],
[lalapps],,
[lal_gcc_flags="${lal_gcc_flags} -Werror"])
AC_DEFUN([LALSUITE_ADD_GCC_FLAGS],[
# $0: add GCC warning flags
AS_IF([test "x${GCC}" = xyes && test "x${enable_gcc_flags}" = xyes],[
gcc_flags="-g3 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fno-common -Wnested-externs -Wno-format-zero-length -fno-strict-aliasing"
# check if compiler supports -Wno-unused-result
LALSUITE_PUSH_UVARS
LALSUITE_CLEAR_UVARS
CFLAGS="-Wno-unused-result"
AC_MSG_CHECKING([whether compiler supports -Wno-unused-result])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([])
],[
AC_MSG_RESULT([yes])
gcc_flags="${gcc_flags} -Wno-unused-result"
],[
AC_MSG_RESULT([no])
])
LALSUITE_POP_UVARS
# don't use -Werror in LALApps
AS_CASE([${PACKAGE}],
[lalapps],[:],
[gcc_flags="${gcc_flags} -Werror"]
)
# comment out usage of -pedantic flag due to gcc bug 7263
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7263
#
# AS_CASE(["${host_cpu}-${host_os}"],
# [*i386-darwin*], [lal_gcc_flags="${lal_gcc_flags} -pedantic"],
# [*x86_64-darwin*], [lal_gcc_flags="${lal_gcc_flags} -pedantic"],
# [lal_gcc_flags="${lal_gcc_flags} -pedantic-errors"])
])
AC_DEFUN([LALSUITE_ADD_GCC_FLAGS],
[AS_IF([test "x${GCC}" = "xyes"],
[
# don't use gcc flags when cuda is enabled
AS_IF([test "x${cuda}" = "xtrue"],
[AC_MSG_NOTICE([CUDA support is enabled, disabling GCC flags])],
[CFLAGS="${CFLAGS} ${lal_gcc_flags}"])
# [*i386-darwin*], [gcc_flags="${gcc_flags} -pedantic"],
# [*x86_64-darwin*], [gcc_flags="${gcc_flags} -pedantic"],
# [gcc_flags="${gcc_flags} -pedantic-errors"])
# add mac os x specific flags
AS_IF([test "x${MACOSX_VERSION}" != "x"], [CFLAGS="${CFLAGS} -mmacosx-version-min=10.4"])
AS_IF([test "x${MACOSX_VERSION}" != "x"],[
gcc_flags="${gcc_flags} -mmacosx-version-min=10.4"
])
gcc_cflags="${gcc_flags}"
gcc_cxxflags="${gcc_cxxflags}"
# don't warn about unknown warning options for clang/clang++
AS_IF([test -n "${CLANG_CC}"], [CFLAGS="-Wno-unknown-warning-option ${CFLAGS}"])
AS_IF([test -n "${CLANG_CXX}"], [CXXFLAGS="-Wno-unknown-warning-option ${CXXFLAGS}"])
AS_IF([test -n "${CLANG_CC}"], [gcc_cflags="-Wno-unknown-warning-option ${gcc_cflags}"])
AS_IF([test -n "${CLANG_CXX}"], [gcc_cxxflags="-Wno-unknown-warning-option ${gcc_cxxflags}"])
# ignore unused flags with clang/clang++
AS_IF([test -n "${CLANG_CC}"], [CFLAGS="${CFLAGS} -Xcompiler -Qunused-arguments"])
AS_IF([test -n "${CLANG_CXX}"], [CXXFLAGS="${CXXFLAGS} -Xcompiler -Qunused-arguments"])
AS_IF([test -n "${CLANG_CC}"], [gcc_cflags="${gcc_cflags} -Xcompiler -Qunused-arguments"])
AS_IF([test -n "${CLANG_CXX}"], [gcc_cxxflags="${gcc_cxxflags} -Xcompiler -Qunused-arguments"])
# don't use gcc flags when cuda is enabled
AS_IF([test "x${cuda}" = "xtrue"],[
AC_MSG_NOTICE([CUDA support is enabled, disabling GCC flags])
],[
LALSUITE_ADD_FLAGS([C],[${gcc_cflags}],[])
LALSUITE_ADD_FLAGS([CXX],[${gcc_cxxflags}],[])
])
])
# end $0
])
# SWIG configuration
# -*- mode: autoconf; -*-
# lalsuite_swig.m4 - SWIG configuration
# Author: Karl Wette, 2011, 2012
#
# serial 49
# serial 50
# enable SWIG wrapping modules
AC_DEFUN([LALSUITE_ENABLE_SWIG],[
......@@ -150,7 +151,7 @@ AC_DEFUN([LALSUITE_USE_SWIG],[
SWIG_SWIGFLAGS="${SWIG_SWIGFLAGS} -outdir \$(SWIG_OUTDIR)"
# flags for generating/compiling SWIG wrapping module sources
AC_SUBST(SWIG_CPPFLAGS,["-I\$(abs_top_builddir)/include -I\$(abs_top_builddir)/src ${swig_save_CPPFLAGS} -I/usr/include"])
AC_SUBST(SWIG_CPPFLAGS,["-I\$(abs_top_builddir)/include -I\$(abs_top_builddir)/src ${swig_save_CPPFLAGS} ${LAL_INCLUDES_WITH_SYS_DIRS}"])
# are we (not) in debugging mode?
AS_IF([test "x${enable_debug}" = xno],[
......@@ -221,24 +222,22 @@ AC_DEFUN([LALSUITE_USE_SWIG],[
])
# dynamic linker search path for pre-installed LAL libraries
AS_IF([test "x${LALSUITE_BUILD}" = xtrue],[
AC_SUBST(SWIG_LD_LIBRARY_PATH,[])
for arg in ${swig_save_LIBS} ${SWIG_LIBS}; do
SWIG_LD_LIBRARY_PATH=["${SWIG_LD_LIBRARY_PATH} "`echo ${arg} | ${SED} -n 's|/liblal[^.]*\.la|/'"${objdir}"'|p'`]
done
SWIG_LD_LIBRARY_PATH=[`echo ${SWIG_LD_LIBRARY_PATH} | ${SED} 's|(top_builddir)|(abs_top_builddir)|g;s| *|:|g'`]
AS_IF([test "${build_vendor}" = apple],[
SWIG_LD_LIBPATH_NAME=DYLD_LIBRARY_PATH
],[
SWIG_LD_LIBPATH_NAME=LD_LIBRARY_PATH
])
AC_SUBST(SWIG_LD_LIBPATH_NAME)
AC_SUBST(SWIG_LD_LIBRARY_PATH,[])
for arg in ${swig_save_LIBS} ${SWIG_LIBS}; do
SWIG_LD_LIBRARY_PATH=["${SWIG_LD_LIBRARY_PATH} "`echo ${arg} | ${SED} -n 's|/liblal[^.]*\.la|/'"${objdir}"'|p'`]
done
SWIG_LD_LIBRARY_PATH=[`echo ${SWIG_LD_LIBRARY_PATH} | ${SED} 's|(top_builddir)|(abs_top_builddir)|g;s| *|:|g'`]
AS_IF([test "${build_vendor}" = apple],[
SWIG_LD_LIBPATH_NAME=DYLD_LIBRARY_PATH
],[
SWIG_LD_LIBPATH_NAME=LD_LIBRARY_PATH
])
AC_SUBST(SWIG_LD_LIBPATH_NAME)