]> granicus.if.org Git - php/commitdiff
Allow different things to be done when found / not-found
authorfoobar <sniper@php.net>
Tue, 14 Jun 2005 01:43:53 +0000 (01:43 +0000)
committerfoobar <sniper@php.net>
Tue, 14 Jun 2005 01:43:53 +0000 (01:43 +0000)
acinclude.m4

index 1c94878aabfde5e51fc4068bb5cb4cd552a47a3d..c4018c6a94adf0e1476a60a6aa113ec18aadbe08 100644 (file)
@@ -2471,7 +2471,7 @@ AC_DEFUN([PHP_REGEX],[
 ])
 
 dnl
-dnl PHP_CHECK_PDO_INCLUDES
+dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])
 dnl
 AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[
   AC_CACHE_CHECK([for PDO includes], pdo_inc_path, [
@@ -2482,8 +2482,11 @@ AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[
       pdo_inc_path=$abs_srcdir/ext
     elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
       pdo_inc_path=$prefix/include/php/ext
-    else
-      AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
     fi
   ])
+  if test -n "$pdo_inc_path"; then
+ifelse([$1],[],:,[$1])
+  else
+ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
+  fi
 ])