]> granicus.if.org Git - php/commitdiff
KISS. And the search order must be reversed always. Last one counts.
authorfoobar <sniper@php.net>
Thu, 30 Aug 2001 16:29:36 +0000 (16:29 +0000)
committerfoobar <sniper@php.net>
Thu, 30 Aug 2001 16:29:36 +0000 (16:29 +0000)
ext/fdf/config.m4

index 62a51a0221fde40d31279e8cffb37e38f345bb8b..139458c8c54e803393537c1c74021c360cd18059 100644 (file)
@@ -4,21 +4,15 @@ PHP_ARG_WITH(fdftk, for fdftk support,
 [  --with-fdftk[=DIR]      Include fdftk support])
 
 if test "$PHP_FDFTK" != "no"; then
-  if test -r $PHP_FDFTK/include/FdfTk.h -o -r $PHP_FDFTK/fdftk.h; then
-    FDFTK_DIR=$PHP_FDFTK
-  else
-    AC_MSG_CHECKING(for fdftk in default path)
-    for i in /usr/local /usr; do
-      if test -r $i/include/FdfTk.h -o -r $i/include/fdftk.h; then
-        FDFTK_DIR=$i
-        AC_MSG_RESULT(found in $i)
-      fi
-    done
-  fi
+
+  for i in /usr /usr/local $PHP_FDFTK; do
+    if test -r $i/include/FdfTk.h -o -r $i/include/fdftk.h; then
+      FDFTK_DIR=$i
+    fi
+  done
 
   if test -z "$FDFTK_DIR"; then
-    AC_MSG_RESULT(not found)
-    AC_MSG_ERROR(Please reinstall the fdftk distribution)
+    AC_MSG_ERROR(FdfTk.h or fdftk.h not found. Please reinstall the fdftk distribution)
   fi
 
   PHP_ADD_INCLUDE($FDFTK_DIR/include)
@@ -38,4 +32,3 @@ if test "$PHP_FDFTK" != "no"; then
   PHP_SUBST(FDFTK_SHARED_LIBADD)
   PHP_EXTENSION(fdf, $ext_shared)
 fi
-