1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
Description: Find the custom InterViews in standard Debian paths
We embed upstream's special version of InterViews. Unfortunately,
the detection of Debian's multiarch paths does not work well,
so we trick it (In future, a more generic solution to this should
ideally be upstreamed)
Forwarded: no
Author: Matthias Klumpp <mak@debian.org>
--- a/m4/ivcheck.m4
+++ b/m4/ivcheck.m4
@@ -113,14 +113,13 @@
echo "Assuming InterViews in a standard? place."
fi
else # Location specified
- IV_DIR=$with_iv
- IV_LIBDIR="$IV_DIR"/"$host_cpu"/lib
+ IV_LIBDIR=$with_iv
if test ! -d $IV_LIBDIR ; then
- IV_LIBDIR="$IV_DIR"/lib
+ IV_LIBDIR="$IV_DIR"
fi
IV_LIBS="-L$IV_LIBDIR -lIVhines $X_LIBS"
IV_LIBS_LIBTOOL="$IV_LIBDIR/libIVhines.la"
- IV_INCLUDE=-I$IV_DIR/include
+ IV_INCLUDE=-I$IV_LIBDIR/../../include
fi
if test "$enable_carbon" = "yes" ; then
--- a/configure.ac
+++ b/configure.ac
@@ -522,7 +522,7 @@
AC_SUBST(modsubdir)
AC_DEFINE_UNQUOTED(NRNHOSTCPU,"$host_cpu",[cpu type consistent with nrnivmodl])
-NRN_LIBDIR=$exec_prefix/lib
+adl_RECURSIVE_EVAL([$libdir], [NRN_LIBDIR])
AC_SUBST(NRN_LIBDIR)
AC_SUBST(nrndef_unix)
--- /dev/null
+++ b/m4/adl_recursive_eval.m4
@@ -0,0 +1,15 @@
+dnl adl_RECURSIVE_EVAL(VALUE, RESULT)
+dnl =================================
+dnl Interpolate the VALUE in loop until it doesn't change,
+dnl and set the result to $RESULT.
+dnl WARNING: It's easy to get an infinite loop with some unsane input.
+AC_DEFUN([adl_RECURSIVE_EVAL],
+[_lcl_receval="$1"
+$2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+ _lcl_receval_old=''
+ while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do
+ _lcl_receval_old="[$]_lcl_receval"
+ eval _lcl_receval="\"[$]_lcl_receval\""
+ done
+ echo "[$]_lcl_receval")`])
|