]> granicus.if.org Git - php/commitdiff
- Install the iconv extension headers to <installpath>/ext/iconv so that
authorDerick Rethans <derick@php.net>
Mon, 6 Dec 2004 20:37:56 +0000 (20:37 +0000)
committerDerick Rethans <derick@php.net>
Mon, 6 Dec 2004 20:37:56 +0000 (20:37 +0000)
  external extensions can use them.

acinclude.m4
configure.in
ext/iconv/config.m4
ext/iconv/php_iconv.h

index 1277a795eafc6b1d707faeb6292c92c27e39629b..42176f94447ba46aefe4875f2a4c30377e48aede 100644 (file)
@@ -20,12 +20,12 @@ AC_DEFUN(PHP_PROG_RE2C,[
   AC_CHECK_PROG(RE2C, re2c, re2c, [exit 0;])
 ])
 
-dnl PHP_DEFINE(WHAT[, value])
+dnl PHP_DEFINE(WHAT[, value[, directory]])
 dnl
 dnl Creates builddir/include/what.h and in there #define WHAT value
 dnl
 AC_DEFUN([PHP_DEFINE],[
-  [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > include/php_]translit($1,A-Z,a-z)[.h]
+  [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h]
 ])
 
 dnl PHP_INIT_BUILD_SYSTEM
@@ -1699,16 +1699,19 @@ AC_DEFUN([PHP_SETUP_ICONV], [
   found_iconv=no
   unset ICONV_DIR
 
+  echo > ext/iconv/php_have_libiconv.h
+  echo > ext/iconv/php_have_iconv.h
+
   dnl
   dnl Check libc first if no path is provided in --with-iconv
   dnl
   if test "$PHP_ICONV" = "yes"; then
     AC_CHECK_FUNC(iconv, [
-      PHP_DEFINE(HAVE_ICONV)
+      PHP_DEFINE(HAVE_ICONV,1,[ext/iconv])
       found_iconv=yes
     ],[
       AC_CHECK_FUNC(libiconv,[
-        PHP_DEFINE(HAVE_LIBICONV)
+        PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
         found_iconv=yes
       ])
     ])
@@ -1741,11 +1744,11 @@ AC_DEFUN([PHP_SETUP_ICONV], [
     then
       PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
         found_iconv=yes
-        PHP_DEFINE(HAVE_LIBICONV)
+        PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
       ], [
         PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
           found_iconv=yes
-          PHP_DEFINE(HAVE_ICONV)
+          PHP_DEFINE(HAVE_ICONV,1,[ext/iconv])
         ], [], [
           -L$ICONV_DIR/lib
         ])
index 6ca0363a78ad0471a0e5a46f19145ce441ac8756..a59d4f08350039aac8b07268f54c826766961adf 100644 (file)
@@ -919,7 +919,7 @@ fi
 
 if test "$abs_srcdir" != "$abs_builddir"; then
   INCLUDES="$INCLUDES -I\$(top_srcdir)/main -I\$(top_srcdir)/Zend"
-  INCLUDES="$INCLUDES -I\$(top_srcdir)/TSRM"
+  INCLUDES="$INCLUDES -I\$(top_srcdir)/TSRM -I\$(top_builddir)/"
 fi
 
 ZEND_EXTRA_LIBS="$LIBS"
index f73da13eec9ac0e2f1b5219ef1587e698dc32fa4..a913bcc27a22a115da3f424285a7c31dab8f5e96 100644 (file)
@@ -65,23 +65,26 @@ if test "$PHP_ICONV" != "no"; then
       esac
     fi 
 
+    echo > ext/iconv/php_have_bsd_iconv.h
+    echo > ext/iconv/php_have_glibc_iconv.h
+
     case "$iconv_impl_name" in
       gnu_libiconv [)]
-        PHP_DEFINE([PHP_ICONV_IMPL],[\"libiconv\"])
+        PHP_DEFINE([PHP_ICONV_IMPL],[\"libiconv\"],[ext/iconv])
         AC_DEFINE([PHP_ICONV_IMPL],["libiconv"],[Which iconv implementation to use])
         ;;
 
       bsd [)]
-        PHP_DEFINE([HAVE_BSD_ICONV],1)
+        PHP_DEFINE([HAVE_BSD_ICONV],1,[ext/iconv])
         AC_DEFINE([HAVE_BSD_ICONV],1,[Konstantin Chugeuv's iconv implementation])
-        PHP_DEFINE([PHP_ICONV_IMPL],[\"BSD iconv\"])
+        PHP_DEFINE([PHP_ICONV_IMPL],[\"BSD iconv\"],[ext/iconv])
         AC_DEFINE([PHP_ICONV_IMPL],["BSD iconv"],[Which iconv implementation to use])
         ;;
 
       glibc [)]
-        PHP_DEFINE([HAVE_GLIBC_ICONV],1)
+        PHP_DEFINE([HAVE_GLIBC_ICONV],1,[ext/iconv])
         AC_DEFINE([HAVE_GLIBC_ICONV],1,[glibc's iconv implementation])
-        PHP_DEFINE([PHP_ICONV_IMPL],[\"glibc\"])
+        PHP_DEFINE([PHP_ICONV_IMPL],[\"glibc\"],[ext/iconv])
         AC_DEFINE([PHP_ICONV_IMPL],["glibc"],[Which iconv implementation to use])
         ;;
     esac
@@ -106,11 +109,11 @@ int main() {
 }
     ],[
       AC_MSG_RESULT(yes)
-      PHP_DEFINE([ICONV_SUPPORTS_ERRNO],1)
+      PHP_DEFINE([ICONV_SUPPORTS_ERRNO],1,[ext/iconv])
       AC_DEFINE([ICONV_SUPPORTS_ERRNO],1,[Whether iconv supports error no or not])
     ],[
       AC_MSG_RESULT(no)
-      PHP_DEFINE([ICONV_SUPPORTS_ERRNO],0)
+      PHP_DEFINE([ICONV_SUPPORTS_ERRNO],0,[ext/iconv])
       AC_DEFINE([ICONV_SUPPORTS_ERRNO],0,[Whether iconv supports error no or not])
     ])
 
@@ -120,7 +123,7 @@ int main() {
 #include FOO
     ], [], [
       AC_MSG_RESULT([yes])
-      PHP_DEFINE([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>])
+      PHP_DEFINE([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>],[ext/iconv])
       AC_DEFINE_UNQUOTED([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>], [Path to iconv.h])
     ], [
       AC_MSG_RESULT([no])
index 8e835545ffcb24f9f57484f38125b6e3df1afdea..0bc7920f4bacb178f1ac95e3d5b7a85b2889f392 100644 (file)
 #endif
 
 #ifdef PHP_ATOM_INC
-#include "php_have_iconv.h"
-#include "php_have_libiconv.h"
-#include "php_have_glibc_iconv.h"
-#include "php_have_bsd_iconv.h"
-#include "php_iconv_supports_errno.h"
-#include "php_php_iconv_impl.h"
-#include "php_php_iconv_h_path.h"
+#include "ext/iconv/php_have_iconv.h"
+#include "ext/iconv/php_have_libiconv.h"
+#include "ext/iconv/php_have_glibc_iconv.h"
+#include "ext/iconv/php_have_bsd_iconv.h"
+#include "ext/iconv/php_iconv_supports_errno.h"
+#include "ext/iconv/php_php_iconv_impl.h"
+#include "ext/iconv/php_php_iconv_h_path.h"
 #endif