last-svn-commit-529-g4964cd1 Have Swilena be in charge of its own configuration.

* configure.ac: Here. * m4/pypath.m4, m4/swig.m4: Remove. --- ChangeLog | 7 +++ configure.ac | 38 +-------------- m4/pypath.m4 | 6 -- m4/swig.m4 | 152 ---------------------------------------------------------- 4 files changed, 8 insertions(+), 195 deletions(-) delete mode 100644 m4/pypath.m4 delete mode 100644 m4/swig.m4 diff --git a/ChangeLog b/ChangeLog index 3155d63..d83c303 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-10-25 Roland Levillain <roland@lrde.epita.fr> + + Have Swilena be in charge of its own configuration. + + * configure.ac: Here. + * m4/pypath.m4, m4/swig.m4: Remove. + 2010-10-27 Roland Levillain <roland@lrde.epita.fr> Remove a superfluous invocation of AM_CONDITIONAL regarding Magick++. diff --git a/configure.ac b/configure.ac index 1febf2c..ff423e5 100644 --- a/configure.ac +++ b/configure.ac @@ -264,45 +264,9 @@ AC_CONFIG_SUBDIRS([external/trimesh]) AC_ARG_ENABLE([swilena], [AS_HELP_STRING([--enable-swilena], [build Swilena Python bindings])]) -AS_IF([test "x$enable_swilena" = xyes], - [# Ensure dynamic libraries are enabled. - if test "x$enable_shared" = xno; then - AC_MSG_ERROR([`--enable-swilena' was given, but dynamic libraries are -disabled. Try to invoke configure with `--enable-shared'.]) - fi - # Check for SWIG. - AC_PROG_SWIG([1.3.35]) - if (eval "$SWIG -version") >/dev/null 2>&1; then :; else - AC_MSG_ERROR([SWIG 1.3.35 is required for Swilena]) - fi - # Check for Python. - AM_PATH_PYTHON([2.4], [], - [AC_MSG_ERROR([Python 2.4 is required for Swilena.])]) - AS_VERSION_COMPARE([2.5], [$am_cv_python_version], - [AC_MSG_WARN([Python 2.6 and greater may not work with Swilena.])]) - adl_CHECK_PYTHON - # Check for Python headers. - save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$PYTHONINC" - AC_CHECK_HEADERS([Python.h], [], - [AC_MSG_ERROR([`Python.h' is required for Swilena. -Try adding `-I <Python include path>' to `CPPFLAGS'.])]) - CPPFLAGS=$save_CPPFLAGS]) AM_CONDITIONAL([ENABLE_SWILENA], [test "x$enable_swilena" = xyes]) +AC_CONFIG_SUBDIRS([swilena]) -AC_CONFIG_FILES([swilena/Makefile - swilena/python/Makefile]) - -AC_CONFIG_FILES([swilena/run], [chmod +x swilena/run]) - -AC_CONFIG_FILES(m4_do([swilena/python/sps], - [:swilena/python/sps-common.in], - [:swilena/python/sps.in]), - [chmod +x swilena/python/sps]) -AC_CONFIG_FILES(m4_do([swilena/python/sps-local], - [:swilena/python/sps-common.in], - [:swilena/python/sps-local.in]), - [chmod +x swilena/python/sps-local]) dnl<<lrde ## -------- ## diff --git a/m4/pypath.m4 b/m4/pypath.m4 deleted file mode 100644 index 5af6736..0000000 --- a/m4/pypath.m4 +++ /dev/null @@ -1,6 +0,0 @@ -AC_DEFUN([adl_CHECK_PYTHON], - [AM_PATH_PYTHON([2.0]) - AC_CACHE_CHECK([for $am_display_PYTHON includes directory], - [adl_cv_python_inc], - [adl_cv_python_inc=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_inc()" 2>/dev/null`]) - AC_SUBST([PYTHONINC], [$adl_cv_python_inc])]) diff --git a/m4/swig.m4 b/m4/swig.m4 deleted file mode 100644 index 46672c5..0000000 --- a/m4/swig.m4 +++ /dev/null @@ -1,152 +0,0 @@ -dnl @synopsis AC_PROG_SWIG([major.minor.micro]) -dnl -dnl This macro searches for a SWIG installation on your system. If found you -dnl should call SWIG via $(SWIG). You can use the optional first argument to -dnl check if the version of the available SWIG is greater than or equal to the -dnl value of the argument. It should have the format: N[.N[.N]] (N is a -dnl number between 0 and 999. Only the first N is mandatory.) -dnl -dnl If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks that the -dnl swig package is this version number or higher. -dnl -dnl In configure.in, use as: -dnl -dnl AC_PROG_SWIG(1.3.17) -dnl SWIG_ENABLE_CXX -dnl SWIG_MULTI_MODULE_SUPPORT -dnl SWIG_PYTHON -dnl -dnl @author Sebastian Huber <sebastian-huber@web.de>, Alan W. Irwin <irwin@beluga.phys.uvic.ca>, Rafael Laboissiere <rafael@laboissiere.net>, and Andrew Collier <abcollier@yahoo.com>. -dnl @version $Id: ac_pkg_swig.m4,v 1.2 2004/12/24 01:20:01 guidod Exp $ -dnl -AC_DEFUN([AC_PROG_SWIG],[ - AC_PATH_PROG([SWIG],[swig]) - if test -z "$SWIG" ; then - AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org]) - SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false' - elif test -n "$1" ; then - AC_MSG_CHECKING([for SWIG version]) - [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] - AC_MSG_RESULT([$swig_version]) - if test -n "$swig_version" ; then - # Calculate the required version number components - [required=$1] - [required_major=`echo $required | sed 's/[^0-9].*//'`] - if test -z "$required_major" ; then - [required_major=0] - fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] - [required_minor=`echo $required | sed 's/[^0-9].*//'`] - if test -z "$required_minor" ; then - [required_minor=0] - fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] - [required_patch=`echo $required | sed 's/[^0-9].*//'`] - if test -z "$required_patch" ; then - [required_patch=0] - fi - # Calculate the available version number components - [available=$swig_version] - [available_major=`echo $available | sed 's/[^0-9].*//'`] - if test -z "$available_major" ; then - [available_major=0] - fi - [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] - [available_minor=`echo $available | sed 's/[^0-9].*//'`] - if test -z "$available_minor" ; then - [available_minor=0] - fi - [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] - [available_patch=`echo $available | sed 's/[^0-9].*//'`] - if test -z "$available_patch" ; then - [available_patch=0] - fi - if test \ - $available_major -lt $required_major \ - -o \( $available_major -eq $required_major \ - -a \( $available_minor -lt $required_minor \ - -o \( $available_minor -eq $required_minor \ - -a $available_patch -lt $required_patch \) \) \) ; then - AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org]) - SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false' - else - AC_MSG_NOTICE([SWIG executable is '$SWIG']) - SWIG_LIB=`$SWIG -swiglib` - AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB']) - fi - else - AC_MSG_WARN([cannot determine SWIG version]) - SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false' - fi - fi - AC_SUBST([SWIG_LIB]) -]) - -# SWIG_ENABLE_CXX() -# -# Enable SWIG C++ support. This affects all invocations of $(SWIG). -AC_DEFUN([SWIG_ENABLE_CXX],[ - AC_REQUIRE([AC_PROG_SWIG]) - AC_REQUIRE([AC_PROG_CXX]) - SWIG="$SWIG -c++" -]) - -# SWIG_MULTI_MODULE_SUPPORT() -# -# Enable support for multiple modules. This effects all invocations -# of $(SWIG). You have to link all generated modules against the -# appropriate SWIG runtime library. If you want to build Python -# modules for example, use the SWIG_PYTHON() macro and link the -# modules against $(SWIG_PYTHON_LIBS). -# -AC_DEFUN([SWIG_MULTI_MODULE_SUPPORT],[ - AC_REQUIRE([AC_PROG_SWIG]) - SWIG="$SWIG -noruntime" -]) - -# SWIG_PYTHON([use-shadow-classes = {no, yes}]) -# -# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS), -# and $(SWIG_PYTHON_OPT) output variables. -# -# $(SWIG_PYTHON_OPT) contains all necessary SWIG options to generate -# code for Python. Shadow classes are enabled unless the value of the -# optional first argument is exactly 'no'. If you need multi module -# support (provided by the SWIG_MULTI_MODULE_SUPPORT() macro) use -# $(SWIG_PYTHON_LIBS) to link against the appropriate library. It -# contains the SWIG Python runtime library that is needed by the type -# check system for example. -AC_DEFUN([SWIG_PYTHON],[ - AC_REQUIRE([AC_PROG_SWIG]) - AC_REQUIRE([AC_PYTHON_DEVEL]) - test "x$1" != "xno" || swig_shadow=" -noproxy" - AC_SUBST([SWIG_PYTHON_OPT],[-python$swig_shadow]) - AC_SUBST([SWIG_PYTHON_CPPFLAGS],[$PYTHON_CPPFLAGS]) -]) - - -dnl @synopsis AC_LIB_WAD -dnl -dnl This macro searches for installed WAD library. -dnl -AC_DEFUN([AC_LIB_WAD], -[ - AC_REQUIRE([AC_PYTHON_DEVEL]) - AC_ARG_ENABLE(wad, - AC_HELP_STRING([--enable-wad], [enable wad module]), - [ - case "${enableval}" in - no) ;; - *) if test "x${enableval}" = xyes; - then - check_wad="yes" - fi ;; - esac - ], []) - - if test -n "$check_wad"; - then - AC_CHECK_LIB(wadpy, _init, [WADPY=-lwadpy], [], $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS) - AC_SUBST(WADPY) - fi -]) -- 1.5.6.5
participants (1)
-
Roland Levillain