LDFLAGS="-L$PHP_ICONV_PREFIX/lib $LDFLAGS"
if test -r $PHP_ICONV_PREFIX/include/giconv.h; then
- PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h"
+ PHP_ICONV_H="giconv.h"
else
- PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h"
- fi
+ PHP_ICONV_H="iconv.h"
+ fi
if test -z "$iconv_lib_name"; then
AC_MSG_CHECKING([if iconv is glibc's])
AC_MSG_CHECKING([if iconv supports errno])
AC_TRY_RUN([
-#include <$PHP_ICONV_H_PATH>
+#include <$PHP_ICONV_H>
#include <errno.h>
int main() {
if (cd == (iconv_t)(-1)) {
if (errno == EINVAL) {
return 0;
- } else {
+ } else {
return 1;
}
}
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_SUBST(ICONV_SHARED_LIBADD)
else
#include "php_ini.h"
#include <errno.h>
-
#include "php_iconv.h"
#ifdef HAVE_ICONV
-#ifndef PHP_ICONV_H_PATH
-#define PHP_ICONV_H_PATH <iconv.h>
+#ifdef HAVE_GICONV_H
+#include <giconv.h>
+#else
+#include <iconv.h>
#endif
-#include PHP_ICONV_H_PATH
-
#ifdef HAVE_GLIBC_ICONV
#include <gnu/libc-version.h>
#endif
#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"
#endif