* m4/oln-with-lib.m4 (_OLN_WITH_LIB): Set $5_CPPFLAGS instead of
$5_CXXFLAGS before performing tests, but still set $5_CXXFLAGS
before exiting.
Reported by Guillaume Lazzara <lazzara(a)lrde.epita.fr>fr>.
---
ChangeLog | 9 +++++++++
m4/oln-with-lib.m4 | 12 ++++++------
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 69de0bf..770c6c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2009-06-09 Roland Levillain <roland(a)lrde.epita.fr>
+ Fix Automake macro OLN_WITH_LIB.
+
+ * m4/oln-with-lib.m4 (_OLN_WITH_LIB): Set $5_CPPFLAGS instead of
+ $5_CXXFLAGS before performing tests, but still set $5_CXXFLAGS
+ before exiting.
+ Reported by Guillaume Lazzara <lazzara(a)lrde.epita.fr>fr>.
+
+2009-06-09 Roland Levillain <roland(a)lrde.epita.fr>
+
* configure.ac (HAVE_SWIG_1_3_39): Remove conditional.
2009-06-08 Roland Levillain <roland(a)lrde.epita.fr>
diff --git a/m4/oln-with-lib.m4 b/m4/oln-with-lib.m4
index 16997c9..11bd5d5 100644
--- a/m4/oln-with-lib.m4
+++ b/m4/oln-with-lib.m4
@@ -46,16 +46,16 @@ AC_DEFUN([_OLN_WITH_LIB],
AC_ARG_WITH([$4],
[AC_HELP_STRING([--with-$4@<:@=DIR@:>@],
[use $1 (DIR = prefix for $1 installation)])])
- $5_CXXFLAGS=''
+ $5_CPPFLAGS=''
$5_LDFLAGS=''
if test "x$with_$4" != xno; then
if test -n "$with_$4"; then
- $5_CXXFLAGS="-I${with_$4}/include"
+ $5_CPPFLAGS="-I${with_$4}/include"
$5_LDFLAGS="-L${with_$4}/lib"
fi
- oln_save_CXXFLAGS=$CXXFLAGS
+ oln_save_CPPFLAGS=$CPPFLAGS
oln_save_LDFLAGS=$LDFLAGS
- CXXFLAGS="$CXXFLAGS $$5_CXXFLAGS"
+ CPPFLAGS="$CPPFLAGS $$5_CPPFLAGS"
LDFLAGS="$LDFLAGS $$5_LDFLAGS"
oln_have_$4=no
AC_CHECK_HEADER([$2],
@@ -67,11 +67,11 @@ AC_DEFUN([_OLN_WITH_LIB],
]
)]
)
- CXXFLAGS=$oln_save_CXXFLAGS
+ CPPFLAGS=$oln_save_CPPFLAGS
LDFLAGS=$oln_save_LDFLAGS
TOOLS_LDFLAGS="$TOOLS_LDFLAGS $$5_LDFLAGS"
fi
- AC_SUBST([$5_CXXFLAGS])
+ AC_SUBST([$5_CXXFLAGS], [$5_CPPFLAGS])
AC_SUBST([$5_LDFLAGS])
AM_CONDITIONAL([HAVE_$5], [test x$oln_have_$4 = xyes])
AC_LANG_POP([C++])
--
1.6.2.4