Index: ChangeLog
from Damien Thivolle <damien(a)lrde.epita.fr>
* configure.ac: Check the swig version to choose between -c and
-noruntime flag.
Make the python and ruby libraries path detection more efficient.
* config/oln.m4: Add `AC_CHECK_SWIG_FLAGS' macros.
* tools/swilena/expand.sh: Use `SWIG_FLAGS' variable.
+2004-04-11 Damien Thivolle <damien(a)lrde.epita.fr>
+
* configure.ac: Add support for ruby-1.7, ruby-1.8.
2004-04-09 Damien Thivolle <damien(a)lrde.epita.fr>
Index: configure.ac
--- configure.ac Sun, 11 Apr 2004 19:23:53 +0200 thivol_d (oln/3_configure.
1.47.1.1.1.1.1.4.1.15.1.16.1.2 600)
+++ configure.ac Mon, 12 Apr 2004 19:17:34 +0200 thivol_d (oln/3_configure.
1.47.1.1.1.1.1.4.1.15.1.16.1.2 600)
@@ -371,6 +371,8 @@
AC_MSG_ERROR([You need swig >= 1.3 to compile swilena. You can disable swilena
by specifying --without-swilena to configure.])
fi
+ AC_CHECK_SWIG_FLAGS
+
AC_ARG_VAR([DVIPS], [program to make Postscript from TeX DVI files])
AC_CHECK_PROGS([DVIPS], [dvips], [$am_aux_dir/missing dvips])
AC_ARG_VAR([TEXI2DVI], [program to create DVI from Texinfo files])
@@ -390,7 +392,7 @@
AC_ARG_VAR([PYTHON_CPPFLAGS], [Path to Python.h])
AC_ARG_WITH([python-includedir], [Include path for Python.h],
[PYTHON_CPPFLAGS="-I $withval"],
- [PYTHON_CPPFLAGS="-I/usr/include/python$PYTHON_VERSION"])
+ [PYTHON_CPPFLAGS="-I"`echo "import sys; print
sys.prefix" | python`"/include/python$PYTHON_VERSION"])
CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
AC_CHECK_HEADERS([Python.h],,
@@ -416,8 +418,11 @@
AC_ARG_VAR([RUBY_CPPFLAGS], [Path to ruby.h])
AC_ARG_WITH([ruby-includedir], [Include path for ruby.h],
[RUBY_CPPFLAGS="-I$withval"],
- [RUBY_CPPFLAGS="-I/usr/lib/ruby/1.6/i386-linux
-I/usr/lib/ruby/1.7/i386-linux -I/usr/lib/ruby/1.8/i386-linux"])
-
+ [RUBY_CPPFLAGS="-I`ruby -e 'puts
$:.join("\n")' | while read line; do
+ if [[ -f ${line}/ruby.h ]]; then
+ echo $line
+ fi
+ done`"])
CPPFLAGS="$CPPFLAGS $RUBY_CPPFLAGS"
AC_CHECK_HEADERS([ruby.h],,
AC_MSG_ERROR(
Index: config/oln.m4
--- config/oln.m4 Fri, 09 Apr 2004 18:30:54 +0200 thivol_d (oln/j/15_oln.m4 1.38.1.1 600)
+++ config/oln.m4 Mon, 12 Apr 2004 19:20:51 +0200 thivol_d (oln/j/15_oln.m4 1.38.1.1 600)
@@ -319,6 +319,29 @@
AC_LANG_POP([C++])
])
+# Recent versions of SWIG use -nountime instead of -c
+
+AC_DEFUN([AC_CHECK_SWIG_FLAGS],
+[dnl
+ AC_CACHE_CHECK([for SWIG supports for -noruntime],
+ [ac_cv_swig_flags],
+ [if swig -help 2>&1 | grep -- "-noruntime" >
/dev/null 2>&1; then
+ ac_cv_swig_flags=recent
+ else
+ ac_cv_swig_flags=old
+ fi])
+ case "$ac_cv_swig_flags" in
+ recent)
+ SWIG_FLAGS="-noruntime"
+ ;;
+ old)
+ SWIG_FLAGS="-c"
+ ;;
+ esac
+
+ AC_SUBST([SWIG_FLAGS])
+])
+
# AC_CXX_CHECK_MATH([FUNCTION], [MACRO_NAME], [TEST])
# Checks for the availability of a particular math function
Index: tools/swilena/expand.sh
--- tools/swilena/expand.sh Mon, 12 Apr 2004 01:16:17 +0200 thivol_d (oln/s/25_expand.sh
1.14 700)
+++ tools/swilena/expand.sh Mon, 12 Apr 2004 19:13:29 +0200 thivol_d (oln/s/25_expand.sh
1.14 700)
@@ -125,7 +125,7 @@
sdir=meta
fi
echo "swilena_${mod}_wrap.cxx swilena_${mod}.py:
\$(srcdir)/../$sdir/swilena_${mod}.i"
- echo -e "\t\$(SWIG) -noruntime -c++ -python -I\$(srcdir)/../src
-I\$(srcdir)/../meta \$(CPPFLAGS) -o swilena_${mod}_wrap.cxx
\$(srcdir)/../$sdir/swilena_${mod}.i"
+ echo -e "\t\$(SWIG) \$(SWIG_FLAGS) -c++ -python -I\$(srcdir)/../src
-I\$(srcdir)/../meta \$(CPPFLAGS) -o swilena_${mod}_wrap.cxx
\$(srcdir)/../$sdir/swilena_${mod}.i"
echo
done
}
@@ -173,7 +173,7 @@
sdir=meta
fi
echo "swilena_${mod}_wrap.cxx: \$(srcdir)/../$sdir/swilena_${mod}.i"
- echo -e "\t\$(SWIG) -c -c++ -ruby -I\$(srcdir)/../src -I\$(srcdir)/../meta
\$(CPPFLAGS) -o swilena_${mod}_wrap.cxx \$(srcdir)/../$sdir/swilena_${mod}.i"
+ echo -e "\t\$(SWIG) \$(SWIG_FLAGS) -c++ -ruby -I\$(srcdir)/../src
-I\$(srcdir)/../meta \$(CPPFLAGS) -o swilena_${mod}_wrap.cxx
\$(srcdir)/../$sdir/swilena_${mod}.i"
echo
done
}
--
Damien Thivolle
damien.thivolle(a)lrde.epita.fr