summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2003-08-28 06:04:48 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2003-08-28 06:04:48 +0000
commit86e2c16d9c6ed93c156e349b74aff770f0ce2db1 (patch)
tree374ab4720febf17b8ba7c276cc4e6d4684c516f8
parentcf1f6e3c4ca1bc5838101264e39e7ac145bb3b5c (diff)
downloadphp-git-86e2c16d9c6ed93c156e349b74aff770f0ce2db1.tar.gz
Add further check for "#include MACRO" style syntax
-rw-r--r--ext/iconv/config.m417
1 files changed, 13 insertions, 4 deletions
diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
index 5700cc91ad..f73da13eec 100644
--- a/ext/iconv/config.m4
+++ b/ext/iconv/config.m4
@@ -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.)