Tidier output in configure when php is not found

This commit is contained in:
William S Fulton 2017-01-27 08:36:03 +00:00
commit c766bf334a

View file

@ -1950,29 +1950,31 @@ else
PHP5=$PHP5BIN PHP5=$PHP5BIN
fi fi
AC_MSG_CHECKING(for PHP5 header files) if test -n "$PHP5"; then
dnl /usr/bin/php5 -> /usr/bin/php-config5 AC_MSG_CHECKING(for PHP5 header files)
case $PHP5 in dnl /usr/bin/php5 -> /usr/bin/php-config5
*5) case $PHP5 in
PHP5CONFIG=`echo "$PHP5"|sed 's/5$/-config5/'` ;; *5)
*) PHP5CONFIG=`echo "$PHP5"|sed 's/5$/-config5/'` ;;
PHP5CONFIG=$PHP5-config ;; *)
esac PHP5CONFIG=$PHP5-config ;;
php5_version=`$PHP5CONFIG --version 2>/dev/null` esac
case $php5_version in php5_version=`$PHP5CONFIG --version 2>/dev/null`
5*) case $php5_version in
PHP5INC=`$PHP5CONFIG --includes 2>/dev/null` 5*)
if test -n "$PHP5INC"; then PHP5INC=`$PHP5CONFIG --includes 2>/dev/null`
AC_MSG_RESULT($PHP5INC) if test -n "$PHP5INC"; then
else AC_MSG_RESULT($PHP5INC)
AC_MSG_RESULT(not found) else
fi AC_MSG_RESULT(not found)
;; fi
"") ;;
"")
AC_MSG_RESULT([could not find $PHP5CONFIG or obtain PHP5 version from it]) ;; AC_MSG_RESULT([could not find $PHP5CONFIG or obtain PHP5 version from it]) ;;
*) *)
AC_MSG_RESULT([found PHP $php_version - not PHP 5]) ;; AC_MSG_RESULT([found PHP $php_version - not PHP 5]) ;;
esac esac
fi
fi fi
AC_SUBST(PHP5) AC_SUBST(PHP5)
AC_SUBST(PHP5INC) AC_SUBST(PHP5INC)
@ -1997,29 +1999,31 @@ else
PHP=$PHPBIN PHP=$PHPBIN
fi fi
AC_MSG_CHECKING(for PHP header files) if test -n "$PHP"; then
dnl /usr/bin/php7.0 -> /usr/bin/php-config7.0 AC_MSG_CHECKING(for PHP header files)
case $PHP in dnl /usr/bin/php7.0 -> /usr/bin/php-config7.0
*7.*) case $PHP in
PHPCONFIG=`echo "$PHP"|sed 's/7\...*$/-config&/'` ;; *7.*)
*) PHPCONFIG=`echo "$PHP"|sed 's/7\...*$/-config&/'` ;;
PHPCONFIG=$PHP-config ;; *)
esac PHPCONFIG=$PHP-config ;;
php_version=`$PHPCONFIG --version 2>/dev/null` esac
case $php_version in php_version=`$PHPCONFIG --version 2>/dev/null`
7.*) case $php_version in
PHPINC=`$PHPCONFIG --includes 2>/dev/null` 7.*)
if test -n "$PHPINC"; then PHPINC=`$PHPCONFIG --includes 2>/dev/null`
AC_MSG_RESULT($PHPINC) if test -n "$PHPINC"; then
else AC_MSG_RESULT($PHPINC)
AC_MSG_RESULT(not found) else
fi AC_MSG_RESULT(not found)
;; fi
"") ;;
"")
AC_MSG_RESULT([could not find $PHPCONFIG or obtain PHP version from it]) ;; AC_MSG_RESULT([could not find $PHPCONFIG or obtain PHP version from it]) ;;
*) *)
AC_MSG_RESULT([found PHP $php_version - not PHP 7]) ;; AC_MSG_RESULT([found PHP $php_version - not PHP 7]) ;;
esac esac
fi
fi fi
AC_SUBST(PHP) AC_SUBST(PHP)
AC_SUBST(PHPINC) AC_SUBST(PHPINC)