## [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
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)"
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#
$(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