]> granicus.if.org Git - php/commitdiff
Cleanup a little bit.
authorfoobar <sniper@php.net>
Fri, 1 Jun 2001 06:40:15 +0000 (06:40 +0000)
committerfoobar <sniper@php.net>
Fri, 1 Jun 2001 06:40:15 +0000 (06:40 +0000)
ext/sablot/config.m4

index 9bf4324e1bdea1017ab1bdf25467ba0e6270c9a7..1710e13d5de8740f4b2b5ce9617987e5a470b5d5 100644 (file)
@@ -4,12 +4,13 @@ dnl config.m4 for extension Sablot
 PHP_ARG_WITH(sablot, for Sablotron XSL support,
 [  --with-sablot[=DIR]     Include Sablotron support])
 
+PHP_ARG_WITH(expat-dir, libexpat dir for Sablotron 0.50,
+[  --with-expat-dir=DIR    Sablotron: libexpat dir for Sablotron 0.50])
+
 if test "$PHP_SABLOT" != "no"; then
 
   PHP_EXTENSION(sablot, $ext_shared)
-
-  PHP_ARG_WITH(expat-dir, libexpat dir for Sablotron 0.50,
-  [  --with-expat-dir=DIR    Sablotron: libexpat dir for Sablotron 0.50])
+  PHP_SUBST(SABLOT_SHARED_LIBADD)
 
   if test -r $PHP_SABLOT/include/sablot.h; then
     SABLOT_DIR=$PHP_SABLOT
@@ -29,17 +30,11 @@ if test "$PHP_SABLOT" != "no"; then
   fi
 
   PHP_ADD_INCLUDE($SABLOT_DIR/include)
-
-  PHP_SUBST(SABLOT_SHARED_LIBADD)
   PHP_ADD_LIBRARY_WITH_PATH(sablot, $SABLOT_DIR/lib, SABLOT_SHARED_LIBADD)
 
-  if test -z "$PHP_EXPAT_DIR"; then
-    PHP_EXPAT_DIR=""
-  fi
-
   testval=no
   for i in $PHP_EXPAT_DIR $SABLOT_DIR; do
-    if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.so; then
+    if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.s?; then
       AC_DEFINE(HAVE_LIBEXPAT2,1,[ ])
       PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib)
       PHP_ADD_INCLUDE($i/include)
@@ -55,22 +50,20 @@ if test "$PHP_SABLOT" != "no"; then
 
   found_iconv=no
   AC_CHECK_LIB(c, iconv_open, found_iconv=yes)
-   if test "$found_iconv" = "no"; then
+  if test "$found_iconv" = "no"; then
     if test "$PHP_ICONV" = "no"; then
       for i in /usr /usr/local; do
-       if test -f $i/lib/libconv.a -o -f $i/lib/libiconv.so; then
-         PHP_ADD_LIBRARY_WITH_PATH(iconv, $i/lib)
-         found_iconv=yes
-       fi
+        if test -f $i/lib/libconv.a -o -f $i/lib/libiconv.s?; then
+          PHP_ADD_LIBRARY_WITH_PATH(iconv, $i/lib)
+          found_iconv=yes
+        fi
       done
     fi
-   fi
+  fi
   
-    if test "$found_iconv" = "no"; then
-      AC_MSG_ERROR(iconv not found, in order to build sablotron you need the iconv library)
-    fi
-
+  if test "$found_iconv" = "no"; then
+    AC_MSG_ERROR(iconv not found, in order to build sablotron you need the iconv library)
+  fi
   
   AC_DEFINE(HAVE_SABLOT,1,[ ])
-
 fi