Re: Bug #16069
| From: | Moriyoshi Koizumi | Date: | Thu, 31 Oct 2002 19:49:03 +0000 |
| Subject: | Re: Bug #16069 | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-6517@lists.php.net to get a copy of this message | ||
Thanks, It seems I failed to write a correct config.m4 script.
Please try the attached patch. I hope it helps.
Moriyoshi
Melvyn Sopacua <msopacua@idg.nl> wrote:
> At 19:04 31-10-2002, Moriyoshi Koizumi wrote:
>
> >I've tested it both with libiconv 1.7 and 1.8, and it works.
> >
> >$ grep -A 10 "supports errno" config.log
>
> Well, that explains it:
> $ grep -A40 'supports errno' ./config.log
> configure:33609: checking if iconv supports errno
> configure:33645: gcc -o conftest -g -O2 -R/usr/local/lib -L/usr/local/lib
> conftest.c -liconv -lfreetype -lpng -lz -ljpeg -lz -lcrypt -lm -lcrypt 1>&5
> configure:33617: iconv.h: No such file or directory
>
> Change the line to include the -I statement and all is well:
> "conftest.c" 28L, 709C written
> mdev@ardvark.idg.nl ~/cvs/php4
> $ gcc -o conftest -g -O2 -I/usr/local/include -R/usr/local/lib
> -L/usr/local/lib conftest.c -liconv -lfreetype -lpng -lz -ljpeg -lz -lcrypt
> -lm -lcrypt
> mdev@ardvark.idg.nl ~/cvs/php4
>
> Now why are the includes missing?
>
>
>
> Met vriendelijke groeten / With kind regards,
>
> Webmaster IDG.nl
> Melvyn Sopacua
>
Index: config.m4 =================================================================== RCS file: /repository/php4/ext/iconv/config.m4,v retrieving revision 1.18 diff -u -r1.18 config.m4 --- config.m4 29 Oct 2002 16:18:12 -0000 1.18 +++ config.m4 31 Oct 2002 19:43:42 -0000 @@ -14,7 +14,8 @@ ]) if test "$iconv_avail" != "no"; then - + iconv_cflags_save="$CFLAGS" + CFLAGS="$CFLAGS $INCLUDES" AC_MSG_CHECKING([if iconv supports errno]) AC_TRY_RUN([ #define LIBICONV_PLUG @@ -106,6 +107,8 @@ AC_DEFINE([PHP_ICONV_IMPL],["glibc"],[Which iconv implementation to use]) ;; esac + + CFLAGS="$iconv_cflags_save" PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared) PHP_SUBST(ICONV_SHARED_LIBADD)
Index: config.m4 =================================================================== RCS file: /repository/php4/ext/iconv/config.m4,v retrieving revision 1.18 diff -u -r1.18 config.m4 --- config.m4 29 Oct 2002 16:18:12 -0000 1.18 +++ config.m4 31 Oct 2002 19:43:42 -0000 @@ -14,7 +14,8 @@ ]) if test "$iconv_avail" != "no"; then - + iconv_cflags_save="$CFLAGS" + CFLAGS="$CFLAGS $INCLUDES" AC_MSG_CHECKING([if iconv supports errno]) AC_TRY_RUN([ #define LIBICONV_PLUG @@ -106,6 +107,8 @@ AC_DEFINE([PHP_ICONV_IMPL],["glibc"],[Which iconv implementation to use]) ;; esac + + CFLAGS="$iconv_cflags_save" PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared) PHP_SUBST(ICONV_SHARED_LIBADD)