From: Matthew Fernandez Date: Sat, 29 Oct 2022 21:15:39 +0000 (-0700) Subject: support SWIG 4.1.0 in the Autotools build system X-Git-Tag: 7.0.1~7^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e161d76809ac07a1c0f59a910aaedc77b251f929;p=graphviz support SWIG 4.1.0 in the Autotools build system Gitlab: closes #2277, closes #2303 --- diff --git a/CHANGELOG.md b/CHANGELOG.md index e2a0a4409..1b8208fff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/configure.ac b/configure.ac index 75410b07e..77ba70a23 100644 --- a/configure.ac +++ b/configure.ac @@ -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# diff --git a/tclpkg/gv/Makefile.am b/tclpkg/gv/Makefile.am index 5b79c265f..80039c888 100644 --- a/tclpkg/gv/Makefile.am +++ b/tclpkg/gv/Makefile.am @@ -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