diff --git a/ChangeLog b/ChangeLog index a91afc12c..6747eb3a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-12-23 Alexandre Duret-Lutz + + Use swig2.0 if available. + + * configure.ac: Search for swig2.0 and swig. + * wrap/python/Makefile.am: Use $(SWIG). + 2010-12-23 Alexandre Duret-Lutz Get rid of ltihooks.py. diff --git a/configure.ac b/configure.ac index f80aba023..44ed0dcd0 100644 --- a/configure.ac +++ b/configure.ac @@ -73,6 +73,9 @@ AC_CHECK_PROG([PERL], [perl], [perl]) AC_CHECK_PROG([SPIN], [spin], [spin]) AX_CHECK_VALGRIND AC_CHECK_PROG([WRING2LBTT], [wring2lbtt], [wring2lbtt]) +# Debian has a binary for SWIG 2.0 named swig2.0 and they kept swig as +# an alias for swig-1.3. Let's use the former when available. +AC_CHECK_PROGS([SWIG], [swig2.0 swig], [swig]) AC_CONFIG_FILES([ Makefile diff --git a/wrap/python/Makefile.am b/wrap/python/Makefile.am index f32db2d10..11cd4a9ca 100644 --- a/wrap/python/Makefile.am +++ b/wrap/python/Makefile.am @@ -40,7 +40,7 @@ _spot_la_LDFLAGS = -avoid-version -module _spot_la_LIBADD = $(top_builddir)/src/libspot.la $(srcdir)/spot_wrap.cxx: $(srcdir)/spot.i - swig -c++ -python -I$(srcdir) -I$(top_srcdir)/src $(srcdir)/spot.i + $(SWIG) -c++ -python -I$(srcdir) -I$(top_srcdir)/src $(srcdir)/spot.i $(srcdir)/spot.py: $(srcdir)/spot.i $(MAKE) $(AM_MAKEFLAGS) spot_wrap.cxx @@ -52,7 +52,7 @@ _buddy_la_SOURCES = $(srcdir)/buddy_wrap.cxx _buddy_la_LDFLAGS = -avoid-version -module $(BUDDY_LDFLAGS) $(srcdir)/buddy_wrap.cxx: $(srcdir)/buddy.i - swig -c++ -python $(BUDDY_CPPFLAGS) $(srcdir)/buddy.i + $(SWIG) -c++ -python $(BUDDY_CPPFLAGS) $(srcdir)/buddy.i $(srcdir)/buddy.py: $(srcdir)/buddy.i $(MAKE) $(AM_MAKEFLAGS) buddy_wrap.cxx