diff --git a/configure.ac b/configure.ac index 53a96763e16e89bb744201bb2ffbc56b1123fce3..7bd6a6490b8faa8998c97ab33a7f2a46644d6d8f 100644 --- a/configure.ac +++ b/configure.ac @@ -926,12 +926,12 @@ else if test `$SWIG -help 2>&1 | $EGREP -c "(-php|-php7) *- Generate"` = 0 ; then use_php="No (swig does not support -php or -php7 option)" else - AC_CHECK_PROGS(PHP,php7.2,php7,php) - if test "$PHP" = ""; then + AC_CHECK_PROGS(PHP,[php7.2 php7 php], "false") + if test "$PHP" = "false"; then use_php="No (php not available)" else - AC_CHECK_PROGS(PHPCONFIG,${PHP}-config,php-config) - if test "$PHPCONFIG" = ""; then + AC_CHECK_PROGS(PHPCONFIG,[${PHP}-config php-config], "false") + if test "$PHPCONFIG" = "false"; then use_php="No (php-config not available)" else PHP_INCLUDES="`$PHPCONFIG --includes`" @@ -947,7 +947,7 @@ else CPPFLAGS=$save_CPPFLAGS fi fi - if test "$PHP" != ""; then + if test "$PHP" != "false"; then use_php="Yes" AC_SUBST([PHP_INCLUDES]) AC_SUBST([PHP_INSTALL_DIR])