]> granicus.if.org Git - php/commitdiff
Add further check for "#include MACRO" style syntax
authorMoriyoshi Koizumi <moriyoshi@php.net>
Thu, 28 Aug 2003 06:04:48 +0000 (06:04 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Thu, 28 Aug 2003 06:04:48 +0000 (06:04 +0000)
ext/iconv/config.m4

index 5700cc91adc2d5396e94957acef6782263b1f206..f73da13eec9ac0e2f1b5219ef1587e698dc32fa4 100644 (file)
@@ -114,13 +114,22 @@ int main() {
       AC_DEFINE([ICONV_SUPPORTS_ERRNO],0,[Whether iconv supports error no or not])
     ])
 
+    AC_MSG_CHECKING([if your cpp allows macro usage in include lines])
+    AC_TRY_COMPILE([
+#define FOO <$PHP_ICONV_H_PATH>
+#include FOO
+    ], [], [
+      AC_MSG_RESULT([yes])
+      PHP_DEFINE([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>])
+      AC_DEFINE_UNQUOTED([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>], [Path to iconv.h])
+    ], [
+      AC_MSG_RESULT([no])
+    ])
+
     CFLAGS="$iconv_cflags_save"
     LDFLAGS="$iconv_ldflags_save"
 
-    PHP_DEFINE([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>])
-    AC_DEFINE_UNQUOTED([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>], [Path to iconv.h])
-
-    PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared)
+    PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared,, [-I\"$PHP_ICONV_PREFIX/include\"])
     PHP_SUBST(ICONV_SHARED_LIBADD)
   else
     AC_MSG_ERROR(Please reinstall the iconv library.)