Commit 6cea1da1 authored by Karl Wette's avatar Karl Wette
Browse files

SWIG: more robust method of finding LAL library dependencies

- get LAL_CHECK_(OPT_)LIB to save list of enabled libraries in
  LALSUITE_CHECKED_LIBS, which are then parsed by SWIG setup
- works for package level builds where libraries are linked to
  with -l instead of as libtool libraries
Original: e661d5867fb1148b1fa21849a3c99d787d09d8b1
parent 194f421b
# lalsuite_build.m4 - top level build macros
#
# serial 62
# serial 63
AC_DEFUN([LALSUITE_CHECK_GIT_REPO],[
# check for git
......@@ -155,6 +155,7 @@ if test "$lowercase" = "true"; then
*) LIBS="$LIBS $arg";;
esac
done
LALSUITE_CHECKED_LIBS="${LALSUITE_CHECKED_LIBS} lowercase"
if test "$LALSUITE_BUILD" = "true"; then
AC_DEFINE([HAVE_LIB]uppercase,[1],[Define to 1 if you have the $1 library])
lowercase="true"
......@@ -193,6 +194,7 @@ if test "$lowercase" = "true"; then
*) LIBS="$LIBS $arg";;
esac
done
LALSUITE_CHECKED_LIBS="${LALSUITE_CHECKED_LIBS} lowercase"
if test "$LALSUITE_BUILD" = "true"; then
AC_DEFINE([HAVE_LIB]uppercase,[1],[Define to 1 if you have the $1 library])
lowercase="true"
......
# SWIG configuration
# Author: Karl Wette, 2011, 2012
#
# serial 35
# serial 36
# enable SWIG wrapping modules
AC_DEFUN([LALSUITE_ENABLE_SWIG],[
......@@ -244,13 +244,18 @@ AC_DEFUN([LALSUITE_USE_SWIG],[
AC_SUBST(SWIG_LD_LIBPATH_NAME)
# list of other LAL SWIG modules that this module depends on
AC_MSG_CHECKING([for SWIG module dependencies])
AC_SUBST(SWIG_MODULE_DEPENDS,[""])
for arg in ${swig_save_LIBS}; do
swig_module=["`echo ${arg} | ${SED} -n 's|^.*/lib\(lal[^.]*\)\.la$|\1|p'`"]
AS_IF([test "x${swig_module}" != x && test "x${swig_module}" != xlalsupport],[
SWIG_MODULE_DEPENDS="${SWIG_MODULE_DEPENDS} ${swig_module}"
for arg in ${LALSUITE_CHECKED_LIBS}; do
AS_IF([test "x`echo ${arg} | ${SED} -n '/^lalsupport$/d;/^lal/p'`" != x],[
SWIG_MODULE_DEPENDS="${SWIG_MODULE_DEPENDS} ${arg}"
])
done
AS_IF([test "x${SWIG_MODULE_DEPENDS}" = x],[
AC_MSG_RESULT([none])
],[
AC_MSG_RESULT([${SWIG_MODULE_DEPENDS}])
])
# scripting-language path to search for pre-installed SWIG modules
AC_SUBST(SWIG_PREINST_PATH,["\$(SWIG_OUTDIR)"])
......
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