]> granicus.if.org Git - graphviz/commitdiff
support SWIG 4.1.0 in the Autotools build system
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 29 Oct 2022 21:15:39 +0000 (14:15 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 3 Nov 2022 15:43:06 +0000 (08:43 -0700)
Gitlab: closes #2277, closes #2303

CHANGELOG.md
configure.ac
tclpkg/gv/Makefile.am

index e2a0a4409405d2a9d3c6ba879ed1f5a5697f6dd0..1b8208fffb5f9e8e10033178e82ded5fce8e2609 100644 (file)
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased (7.0.1)]
 
+### Added
+
+- SWIG 4.1.0 is now supported in the Autotools build system. #2277, #2303
+
 ### Changed
 
 - When built with zlib support, Graphviz will unconditionally use
index 75410b07efd38e564c82a19bdcfd22c2cfde6398..77ba70a23679e282de4e0a2ee97ddaa77801d4e5 100644 (file)
@@ -558,6 +558,13 @@ else
         fi
       fi
     fi
+    AX_COMPARE_VERSION([$SWIG_VERSION], [lt], [4.1.0], [
+      SWIG_PHP_DATA=gv.php
+    ], [
+      # SWIG ≥ 4.1.0 no longer generates any PHP code for the bindings
+      SWIG_PHP_DATA=
+    ])
+    AC_SUBST([SWIG_PHP_DATA])
     if test "x$SWIG" = "x"; then
       AC_MSG_WARN([The version of swig is too old.])
       use_swig="No (swig too old)"
@@ -567,6 +574,8 @@ else
   fi
 fi
 AM_CONDITIONAL(WITH_SWIG, [test "x$SWIG" != "x"])
+AM_CONDITIONAL(WITH_SWIG_PHP_DATA,
+               [test "x$SWIG" != "x" -a "x$SWIG_PHP_DATA" != "x"])
 
 dnl -----------------------------------
 dnl INCLUDES and LIBS for C#
index 5b79c265f2f2159b568cb58e1a57384c562a55dd..80039c888a637d813c3ea5a2ae5804627ffa9416 100644 (file)
@@ -186,14 +186,16 @@ gv_perl.cpp: gv.i
        $(SWIG) -c++ $(SWIG_PERL_OPT) -o $@ $(srcdir)/gv.i
 
 pkgphpdir = $(pkglibdir)/php
-PHP_data = gv.php
+PHP_data = $(SWIG_PHP_DATA)
 nodist_libgv_php_la_SOURCES = gv_php.cpp php_gv.h
 libgv_php_la_SOURCES = $(BASESOURCES) gv_php_init.c
 libgv_php_la_LIBADD = $(BASELIBS) $(PHP_LIBS)
 libgv_php_la_LDFLAGS = -module -avoid-version
 libgv_php_la_CPPFLAGS = $(BASECPPFLAGS) $(PHP_INCLUDES:-I%=-isystem%)
 libgv_php_la_CXXFLAGS = $(AM_CXXFLAGS) -Wno-unused-label -Wno-unused-parameter
+if WITH_SWIG_PHP_DATA
 gv.php: gv_php.cpp
+endif
 php_gv.h: gv_php.cpp
 gv_php.cpp: gv.i
        $(SWIG) -c++ $(SWIG_PHP_OPT) -o $@ $(srcdir)/gv.i