[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Selectively enabling SWIG binding build targets

From: Erik Huelsmann <e.huelsmann_at_gmx.net>
Date: 2003-12-22 16:40:08 CET

Hi Chia-Liang,

Sending the patch I promised you on IRC.

If it wrapped you can also find it
at:
http://encorps.dnsalias.com/svn-public/patches/svn-swig-selectable-targets.patch

I can't apply it to the subversion repository, since it is (almost) my first
experience with autoconf.

Sending CC to the dev list so others can profit from it if they want to.

bye,

Erik.

Log:
[[[
Add selectable swig targets to configure.

* build/ac-macros/swig.m4
  add --enable-swig-bindings option to select build targets
  included in standard make.

]]]

Index: build/ac-macros/swig.m4
===================================================================
--- build/ac-macros/swig.m4 (revision 8067)
+++ build/ac-macros/swig.m4 (working copy)
@@ -7,6 +7,26 @@
 
 AC_DEFUN(SVN_CHECK_SWIG,
 [
+ AC_ARG_ENABLE(swig-bindings,
+ AC_HELP_STRING([--enable-swig-bindings=LIST],
+ [When building swig support, only build
+ for languages in LIST]),
+ [
+ case "$enableval" in
+ "yes")
+ SWIG_BINDINGS_ENABLE(all)
+ ;;
+ "no")
+ ;;
+ *)
+ SWIG_BINDINGS_ENABLE($enableval)
+ ;;
+ esac
+ ],
+ [
+ SWIG_BINDINGS_ENABLE(all)
+ ])
+
   AC_ARG_WITH(swig,
               AC_HELP_STRING([--with-swig=PATH],
                              [Try to use 'PATH/bin/swig' to build the
@@ -30,6 +50,20 @@
   ])
 ])
 
+AC_DEFUN(SWIG_BINDINGS_ENABLE,
+[
+ bindings=$1
+
+ if test "$bindings" = "all"; then
+ bindings="perl,python,java"
+ fi
+
+ for binding in `echo "$bindings" | sed -e "s/,/ /g"`; do
+ eval "svn_swig_bindings_enable_$binding='yes'"
+ AC_MSG_NOTICE([Enabled swig binding: $binding])
+ done
+])
+
 AC_DEFUN(SVN_FIND_SWIG,
 [
   where=$1
@@ -59,7 +93,8 @@
           AC_MSG_WARN([swig bindings require 1.3.19.])
           ;;
     esac
- if test "$PYTHON" != "none" -a "$SWIG_SUITABLE" = "yes"; then
+ if test "$PYTHON" != "none" -a "$SWIG_SUITABLE" = "yes" -a
"$svn_swig_bindings_enable_python" = "yes"; then
+ AC_MSG_NOTICE("Configuring python swig binding")
       ### TODO: When it's ready, add the swig-java-lib rule here.
       SWIG_BUILD_RULES="$SWIG_BUILD_RULES swig-py-lib"
       SWIG_INSTALL_RULES="$SWIG_INSTALL_RULES install-swig-py-lib"
@@ -99,7 +134,7 @@
       SWIG_PY_LINK="$ac_cv_python_link"
     fi
 
- if test "$JDK" != "none" -a "$SWIG_SUITABLE" = "yes"; then
+ if test "$JDK" != "none" -a "$SWIG_SUITABLE" = "yes" -a
"$svn_swig_bindings_enable_java" = "yes"; then
       SWIG_JAVA_INCLUDES='-I$(JDK)/include'
       list="`find "$JDK/include" -type d -print`"
       for dir in $list; do
@@ -110,7 +145,7 @@
       SWIG_JAVA_LINK="$SWIG_PY_LINK"
     fi
 
- if test "$PERL" != "none" -a "$SWIG_SUITABLE" = "yes"; then
+ if test "$PERL" != "none" -a "$SWIG_SUITABLE" = "yes" -a
"$svn_swig_bindings_enable_perl" = "yes"; then
       SWIG_PL_INCLUDES="`$PERL -MExtUtils::Embed -e ccopts`"
       SWIG_PL_COMPILE="`$PERL -MConfig -e 'print $Config{cc}'`
\$(SWIG_PL_INCLUDES)"
       SWIG_PL_LINK="`$PERL -MConfig -e 'print $Config{ld}'` `$PERL -MConfig
-e 'print $Config{lddlflags}'` `$PERL -MExtUtils::Embed -e ldopts`"

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 22 16:40:47 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.