0002-no-iconv-search.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. Tweak PHP_SETUP_ICONV from aclocal/acinclude.m4 to not
  2. PHP_ADD_INCLUDE $ICONV_DIR/include since the tests use
  3. test instead of AC_TRY_LINK to find headers which is bad,
  4. specially when adding /usr and /usr/local to the mix.
  5. Do basically the same with ext/iconv/config.m4 by tweaking
  6. PHP_ICONV_H_PATH which, again, uses test and absolute paths.
  7. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  8. [Gustavo: convert to nice m4 instead of patching configure]
  9. [Gustavo: update for 5.6.10]
  10. diff -Nura php-5.6.10.orig/acinclude.m4 php-5.6.10/acinclude.m4
  11. --- php-5.6.10.orig/acinclude.m4 2015-06-12 16:09:06.274355813 -0300
  12. +++ php-5.6.10/acinclude.m4 2015-06-12 16:10:10.884544865 -0300
  13. @@ -2474,7 +2474,7 @@
  14. dnl
  15. if test "$found_iconv" = "no"; then
  16. - for i in $PHP_ICONV /usr/local /usr; do
  17. + for i in $PHP_ICONV; do
  18. if test -r $i/include/giconv.h; then
  19. AC_DEFINE(HAVE_GICONV_H, 1, [ ])
  20. ICONV_DIR=$i
  21. diff -Nura php-5.6.10.orig/ext/iconv/config.m4 php-5.6.10/ext/iconv/config.m4
  22. --- php-5.6.10.orig/ext/iconv/config.m4 2015-06-12 16:09:07.792407246 -0300
  23. +++ php-5.6.10/ext/iconv/config.m4 2015-06-12 16:11:07.752471600 -0300
  24. @@ -14,28 +14,6 @@
  25. ])
  26. if test "$iconv_avail" != "no"; then
  27. - if test -z "$ICONV_DIR"; then
  28. - for i in /usr/local /usr; do
  29. - if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
  30. - PHP_ICONV_PREFIX="$i"
  31. - break
  32. - fi
  33. - done
  34. - if test -z "$PHP_ICONV_PREFIX"; then
  35. - PHP_ICONV_PREFIX="/usr"
  36. - fi
  37. - else
  38. - PHP_ICONV_PREFIX="$ICONV_DIR"
  39. - fi
  40. -
  41. - CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS"
  42. - LDFLAGS="-L$PHP_ICONV_PREFIX/$PHP_LIBDIR $LDFLAGS"
  43. -
  44. - if test -r "$PHP_ICONV_PREFIX/include/giconv.h"; then
  45. - PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h"
  46. - else
  47. - PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h"
  48. - fi
  49. AC_MSG_CHECKING([if iconv is glibc's])
  50. AC_TRY_LINK([#include <gnu/libc-version.h>],[gnu_get_libc_version();],