From: John Ellson Date: Wed, 19 Feb 2014 16:33:31 +0000 (-0500) Subject: attempt to support older swig without -php5 option X-Git-Tag: 2.38.0~67^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78c2cbf8cec2b27bc03e19028403a1493668aec3;p=graphviz attempt to support older swig without -php5 option --- diff --git a/configure.ac b/configure.ac index 637245ce5..0576c9ba6 100644 --- a/configure.ac +++ b/configure.ac @@ -1093,6 +1093,11 @@ else if test "x$use_swig" != "xYes"; then use_php="No (swig not available)" else + if test `$SWIG -php5 2>&1 | $EGREP -c 'Unable` = 1; then + SWIG_PHP_OPT='-php' + else + SWIG_PHP_OPT='-php5' + fi if test `$SWIG -help 2>&1 | $EGREP -c '\-php5* *- Generate'` = 0 ; then use_php="No (swig does not support -php or -php5 option)" else @@ -1121,6 +1126,7 @@ else AC_SUBST([PHP_INSTALL_DIR]) AC_SUBST([PHP_INCLUDES]) AC_SUBST([PHP_LIBS]) + AC_SUBST([SWIG_PHP_OPT]) fi fi fi diff --git a/tclpkg/gv/Makefile.am b/tclpkg/gv/Makefile.am index 53d2bb364..3fdc77533 100644 --- a/tclpkg/gv/Makefile.am +++ b/tclpkg/gv/Makefile.am @@ -168,7 +168,7 @@ libgv_php_la_CPPFLAGS = $(BASECPPFLAGS) $(PHP_INCLUDES) gv.php: gv_php.cpp php_gv.h: gv_php.cpp gv_php.cpp: gv.i - $(SWIG) -c++ -php5 -o gv_php.cpp $(srcdir)/gv.i + $(SWIG) -c++ $(SWIG_PHP_OPT) -o gv_php.cpp $(srcdir)/gv.i pkgpythondir = $(pkglibdir)/python PYTHON_data = gv.py