OSDN Git Service

2006-12-11 Benjamin Kosnik <bkoz@redhat.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Dec 2006 22:17:09 +0000 (22:17 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Dec 2006 22:17:09 +0000 (22:17 +0000)
PR libstdc++/28125
* acinclude.m4 (GLIBCXX_CHECK_ICONV_SUPPORT): Remove link test, ie
AC_CHECK_LIB for libiconv. Instead, use bits of AM_ICONV.
        * configure: Regenerate.
        * scripts/testsuite_flags.in (cxxldflags): Add LIBICONV bits.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119749 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/acinclude.m4
libstdc++-v3/configure
libstdc++-v3/scripts/testsuite_flags.in

index 0b85ead..2da37fc 100644 (file)
@@ -1,3 +1,11 @@
+2006-12-11  Benjamin Kosnik  <bkoz@redhat.com>
+
+       PR libstdc++/28125
+       * acinclude.m4 (GLIBCXX_CHECK_ICONV_SUPPORT): Remove link test, ie
+       AC_CHECK_LIB for libiconv. Instead, use bits of AM_ICONV.
+        * configure: Regenerate.
+        * scripts/testsuite_flags.in (cxxldflags): Add LIBICONV bits.
 2006-12-11  Richard Guenther  <rguenther@suse.de>
            Paolo Carlini  <pcarlini@suse.de>
 
index 38345fa..660447b 100644 (file)
@@ -324,20 +324,30 @@ AC_DEFUN([GLIBCXX_CHECK_ICONV_SUPPORT], [
   # Only continue checking if the ISO C99 headers exist and support is on.
   if test x"$enable_wchar_t" = xyes; then
 
+    # From Bruno Haible's AM_ICONV, but without link tests.
+    # Check for existence of libiconv.a providing XPG2 wchar_t support.
+    # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+    # those with the standalone portable GNU libiconv installed).
+    AC_ARG_WITH([libiconv-prefix],
+[  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib], [  for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LIBICONV="$LIBICONV -L$dir/lib"; fi
+    done
+    LIBICONV="$LIBICONV -liconv"
+   ])
+   if test x"$LIBICONV" != x; then
+     AC_MSG_NOTICE([--with-libiconv-prefix is $LIBICONV])
+   fi
+
     # Use iconv for wchar_t to char conversions. As such, check for
     # X/Open Portability Guide, version 2 features (XPG2).
     AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
     AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
 
-    # Check for existence of libiconv.a providing XPG2 wchar_t support.
-    AC_CHECK_LIB(iconv, iconv, LIBICONV="-liconv")
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS $LIBICONV"
-    AC_SUBST(LIBICONV)
-
     AC_CHECK_FUNCS([iconv_open iconv_close iconv nl_langinfo],
     [ac_XPG2funcs=yes], [ac_XPG2funcs=no])
-
     LIBS="$ac_save_LIBS"
 
     if test x"$ac_has_iconv_h" = xyes &&
@@ -347,6 +357,7 @@ AC_DEFUN([GLIBCXX_CHECK_ICONV_SUPPORT], [
       AC_DEFINE([_GLIBCXX_USE_ICONV],1,
                [Define if iconv and related functions exist and are usable.])
       enable_iconv=yes
+      AC_SUBST(LIBICONV)
     fi
   fi
   AC_MSG_CHECKING([for enabled iconv specializations])
index ae4e09e..2c88675 100755 (executable)
@@ -904,6 +904,7 @@ Optional Packages:
   --with-newlib           assume newlib as a system C library
   --with-gnu-ld           assume the C compiler uses GNU ld default=no
   --with-pic              try to use only PIC/non-PIC objects default=use both
+  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib
   --with-gxx-include-dir=DIR
                           installation directory for include files
 
@@ -4739,7 +4740,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
 case $host in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 4742 "configure"' > conftest.$ac_ext
+  echo '#line 4743 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -5359,7 +5360,7 @@ fi;
     #
     # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
     cat > conftest.$ac_ext << EOF
-#line 5362 "configure"
+#line 5363 "configure"
 struct S { ~S(); };
 void bar();
 void foo()
@@ -8015,7 +8016,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
   # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
     cat > conftest.$ac_ext << EOF
-#line 8018 "configure"
+#line 8019 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -28507,6 +28508,26 @@ done
   # Only continue checking if the ISO C99 headers exist and support is on.
   if test x"$enable_wchar_t" = xyes; then
 
+    # From Bruno Haible's AM_ICONV, but without link tests.
+    # Check for existence of libiconv.a providing XPG2 wchar_t support.
+    # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+    # those with the standalone portable GNU libiconv installed).
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LIBICONV="$LIBICONV -L$dir/lib"; fi
+    done
+    LIBICONV="$LIBICONV -liconv"
+
+fi;
+   if test x"$LIBICONV" != x; then
+     { echo "$as_me:$LINENO: --with-libiconv-prefix is $LIBICONV" >&5
+echo "$as_me: --with-libiconv-prefix is $LIBICONV" >&6;}
+   fi
+
     # Use iconv for wchar_t to char conversions. As such, check for
     # X/Open Portability Guide, version 2 features (XPG2).
     if test "${ac_cv_header_iconv_h+set}" = set; then
 
 
 
-    # Check for existence of libiconv.a providing XPG2 wchar_t support.
-    echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
-if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv  $LIBS"
-if test x$gcc_no_link = xyes; then
-  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char iconv ();
-int
-main ()
-{
-iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_iconv_iconv=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iconv_iconv=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
-if test $ac_cv_lib_iconv_iconv = yes; then
-  LIBICONV="-liconv"
-fi
-
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS $LIBICONV"
 
 
 
 
-
-
 for ac_func in iconv_open iconv_close iconv nl_langinfo
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -28988,7 +28933,6 @@ else
 fi
 done
 
-
     LIBS="$ac_save_LIBS"
 
     if test x"$ac_has_iconv_h" = xyes &&
@@ -29001,6 +28945,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
       enable_iconv=yes
+
     fi
   fi
   echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
@@ -31326,9 +31271,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-                    save_LDFLAGS="$LDFLAGS"
+                      save_LDFLAGS="$LDFLAGS"
       LDFLAGS="-static $LDFLAGS"
-      if test "$cross_compiling" = yes; then
+      if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+int main() { return 0; }
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  if test "$cross_compiling" = yes; then
   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 See \`config.log' for more details." >&5
 echo "$as_me: error: cannot run test program while cross compiling
@@ -31360,6 +31335,14 @@ have_tls=no
 fi
 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_tls=yes
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
       LDFLAGS="$save_LDFLAGS"
 else
   echo "$as_me: program exited with status $ac_status" >&5
@@ -52515,6 +52498,26 @@ done
   # Only continue checking if the ISO C99 headers exist and support is on.
   if test x"$enable_wchar_t" = xyes; then
 
+    # From Bruno Haible's AM_ICONV, but without link tests.
+    # Check for existence of libiconv.a providing XPG2 wchar_t support.
+    # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+    # those with the standalone portable GNU libiconv installed).
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LIBICONV="$LIBICONV -L$dir/lib"; fi
+    done
+    LIBICONV="$LIBICONV -liconv"
+
+fi;
+   if test x"$LIBICONV" != x; then
+     { echo "$as_me:$LINENO: --with-libiconv-prefix is $LIBICONV" >&5
+echo "$as_me: --with-libiconv-prefix is $LIBICONV" >&6;}
+   fi
+
     # Use iconv for wchar_t to char conversions. As such, check for
     # X/Open Portability Guide, version 2 features (XPG2).
     if test "${ac_cv_header_iconv_h+set}" = set; then
 
 
 
-    # Check for existence of libiconv.a providing XPG2 wchar_t support.
-    echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
-if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv  $LIBS"
-if test x$gcc_no_link = xyes; then
-  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char iconv ();
-int
-main ()
-{
-iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_iconv_iconv=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iconv_iconv=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
-if test $ac_cv_lib_iconv_iconv = yes; then
-  LIBICONV="-liconv"
-fi
-
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS $LIBICONV"
 
 
 
 
-
-
 for ac_func in iconv_open iconv_close iconv nl_langinfo
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -52996,7 +52923,6 @@ else
 fi
 done
 
-
     LIBS="$ac_save_LIBS"
 
     if test x"$ac_has_iconv_h" = xyes &&
@@ -53009,6 +52935,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
       enable_iconv=yes
+
     fi
   fi
   echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
@@ -74385,6 +74312,26 @@ done
   # Only continue checking if the ISO C99 headers exist and support is on.
   if test x"$enable_wchar_t" = xyes; then
 
+    # From Bruno Haible's AM_ICONV, but without link tests.
+    # Check for existence of libiconv.a providing XPG2 wchar_t support.
+    # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+    # those with the standalone portable GNU libiconv installed).
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LIBICONV="$LIBICONV -L$dir/lib"; fi
+    done
+    LIBICONV="$LIBICONV -liconv"
+
+fi;
+   if test x"$LIBICONV" != x; then
+     { echo "$as_me:$LINENO: --with-libiconv-prefix is $LIBICONV" >&5
+echo "$as_me: --with-libiconv-prefix is $LIBICONV" >&6;}
+   fi
+
     # Use iconv for wchar_t to char conversions. As such, check for
     # X/Open Portability Guide, version 2 features (XPG2).
     if test "${ac_cv_header_iconv_h+set}" = set; then
 
 
 
-    # Check for existence of libiconv.a providing XPG2 wchar_t support.
-    echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
-if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv  $LIBS"
-if test x$gcc_no_link = xyes; then
-  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char iconv ();
-int
-main ()
-{
-iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_iconv_iconv=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iconv_iconv=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
-if test $ac_cv_lib_iconv_iconv = yes; then
-  LIBICONV="-liconv"
-fi
-
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS $LIBICONV"
 
 
 
 
-
-
 for ac_func in iconv_open iconv_close iconv nl_langinfo
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -74866,7 +74737,6 @@ else
 fi
 done
 
-
     LIBS="$ac_save_LIBS"
 
     if test x"$ac_has_iconv_h" = xyes &&
@@ -74879,6 +74749,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
       enable_iconv=yes
+
     fi
   fi
   echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
@@ -76269,6 +76140,26 @@ done
   # Only continue checking if the ISO C99 headers exist and support is on.
   if test x"$enable_wchar_t" = xyes; then
 
+    # From Bruno Haible's AM_ICONV, but without link tests.
+    # Check for existence of libiconv.a providing XPG2 wchar_t support.
+    # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+    # those with the standalone portable GNU libiconv installed).
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LIBICONV="$LIBICONV -L$dir/lib"; fi
+    done
+    LIBICONV="$LIBICONV -liconv"
+
+fi;
+   if test x"$LIBICONV" != x; then
+     { echo "$as_me:$LINENO: --with-libiconv-prefix is $LIBICONV" >&5
+echo "$as_me: --with-libiconv-prefix is $LIBICONV" >&6;}
+   fi
+
     # Use iconv for wchar_t to char conversions. As such, check for
     # X/Open Portability Guide, version 2 features (XPG2).
     if test "${ac_cv_header_iconv_h+set}" = set; then
 
 
 
-    # Check for existence of libiconv.a providing XPG2 wchar_t support.
-    echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
-if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv  $LIBS"
-if test x$gcc_no_link = xyes; then
-  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char iconv ();
-int
-main ()
-{
-iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_iconv_iconv=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iconv_iconv=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
-if test $ac_cv_lib_iconv_iconv = yes; then
-  LIBICONV="-liconv"
-fi
-
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS $LIBICONV"
 
 
 
 
-
-
 for ac_func in iconv_open iconv_close iconv nl_langinfo
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -76750,7 +76565,6 @@ else
 fi
 done
 
-
     LIBS="$ac_save_LIBS"
 
     if test x"$ac_has_iconv_h" = xyes &&
@@ -76763,6 +76577,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
       enable_iconv=yes
+
     fi
   fi
   echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
@@ -77792,6 +77607,26 @@ done
   # Only continue checking if the ISO C99 headers exist and support is on.
   if test x"$enable_wchar_t" = xyes; then
 
+    # From Bruno Haible's AM_ICONV, but without link tests.
+    # Check for existence of libiconv.a providing XPG2 wchar_t support.
+    # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+    # those with the standalone portable GNU libiconv installed).
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LIBICONV="$LIBICONV -L$dir/lib"; fi
+    done
+    LIBICONV="$LIBICONV -liconv"
+
+fi;
+   if test x"$LIBICONV" != x; then
+     { echo "$as_me:$LINENO: --with-libiconv-prefix is $LIBICONV" >&5
+echo "$as_me: --with-libiconv-prefix is $LIBICONV" >&6;}
+   fi
+
     # Use iconv for wchar_t to char conversions. As such, check for
     # X/Open Portability Guide, version 2 features (XPG2).
     if test "${ac_cv_header_iconv_h+set}" = set; then
 
 
 
-    # Check for existence of libiconv.a providing XPG2 wchar_t support.
-    echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
-if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv  $LIBS"
-if test x$gcc_no_link = xyes; then
-  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char iconv ();
-int
-main ()
-{
-iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_iconv_iconv=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iconv_iconv=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
-if test $ac_cv_lib_iconv_iconv = yes; then
-  LIBICONV="-liconv"
-fi
-
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS $LIBICONV"
 
 
 
 
-
-
 for ac_func in iconv_open iconv_close iconv nl_langinfo
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -78273,7 +78032,6 @@ else
 fi
 done
 
-
     LIBS="$ac_save_LIBS"
 
     if test x"$ac_has_iconv_h" = xyes &&
@@ -78286,6 +78044,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
       enable_iconv=yes
+
     fi
   fi
   echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
@@ -98759,6 +98518,26 @@ done
   # Only continue checking if the ISO C99 headers exist and support is on.
   if test x"$enable_wchar_t" = xyes; then
 
+    # From Bruno Haible's AM_ICONV, but without link tests.
+    # Check for existence of libiconv.a providing XPG2 wchar_t support.
+    # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+    # those with the standalone portable GNU libiconv installed).
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LIBICONV="$LIBICONV -L$dir/lib"; fi
+    done
+    LIBICONV="$LIBICONV -liconv"
+
+fi;
+   if test x"$LIBICONV" != x; then
+     { echo "$as_me:$LINENO: --with-libiconv-prefix is $LIBICONV" >&5
+echo "$as_me: --with-libiconv-prefix is $LIBICONV" >&6;}
+   fi
+
     # Use iconv for wchar_t to char conversions. As such, check for
     # X/Open Portability Guide, version 2 features (XPG2).
     if test "${ac_cv_header_iconv_h+set}" = set; then
 
 
 
-    # Check for existence of libiconv.a providing XPG2 wchar_t support.
-    echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
-if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv  $LIBS"
-if test x$gcc_no_link = xyes; then
-  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char iconv ();
-int
-main ()
-{
-iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_iconv_iconv=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iconv_iconv=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
-if test $ac_cv_lib_iconv_iconv = yes; then
-  LIBICONV="-liconv"
-fi
-
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS $LIBICONV"
 
 
 
 
-
-
 for ac_func in iconv_open iconv_close iconv nl_langinfo
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -99240,7 +98943,6 @@ else
 fi
 done
 
-
     LIBS="$ac_save_LIBS"
 
     if test x"$ac_has_iconv_h" = xyes &&
@@ -99253,6 +98955,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
       enable_iconv=yes
+
     fi
   fi
   echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
@@ -101086,6 +100789,26 @@ done
   # Only continue checking if the ISO C99 headers exist and support is on.
   if test x"$enable_wchar_t" = xyes; then
 
+    # From Bruno Haible's AM_ICONV, but without link tests.
+    # Check for existence of libiconv.a providing XPG2 wchar_t support.
+    # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+    # those with the standalone portable GNU libiconv installed).
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LIBICONV="$LIBICONV -L$dir/lib"; fi
+    done
+    LIBICONV="$LIBICONV -liconv"
+
+fi;
+   if test x"$LIBICONV" != x; then
+     { echo "$as_me:$LINENO: --with-libiconv-prefix is $LIBICONV" >&5
+echo "$as_me: --with-libiconv-prefix is $LIBICONV" >&6;}
+   fi
+
     # Use iconv for wchar_t to char conversions. As such, check for
     # X/Open Portability Guide, version 2 features (XPG2).
     if test "${ac_cv_header_iconv_h+set}" = set; then
 
 
 
-    # Check for existence of libiconv.a providing XPG2 wchar_t support.
-    echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
-if test "${ac_cv_lib_iconv_iconv+set}" = set; then
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $LIBICONV"
+
+
+
+
+for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv  $LIBS"
-if test x$gcc_no_link = xyes; then
+  if test x$gcc_no_link = xyes; then
   { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
    { (exit 1); exit 1; }; }
@@ -101396,129 +101125,47 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
 
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
+{
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char iconv ();
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
 int
 main ()
 {
-iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_iconv_iconv=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iconv_iconv=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
-if test $ac_cv_lib_iconv_iconv = yes; then
-  LIBICONV="-liconv"
-fi
-
-    ac_save_LIBS="$LIBS"
-    LIBS="$LIBS $LIBICONV"
-
-
-
-
-
-
-for ac_func in iconv_open iconv_close iconv nl_langinfo
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test x$gcc_no_link = xyes; then
-  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
+return f != $ac_func;
   ;
   return 0;
 }
@@ -101567,7 +101214,6 @@ else
 fi
 done
 
-
     LIBS="$ac_save_LIBS"
 
     if test x"$ac_has_iconv_h" = xyes &&
@@ -101580,6 +101226,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
       enable_iconv=yes
+
     fi
   fi
   echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
@@ -102438,6 +102085,26 @@ done
   # Only continue checking if the ISO C99 headers exist and support is on.
   if test x"$enable_wchar_t" = xyes; then
 
+    # From Bruno Haible's AM_ICONV, but without link tests.
+    # Check for existence of libiconv.a providing XPG2 wchar_t support.
+    # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+    # those with the standalone portable GNU libiconv installed).
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LIBICONV="$LIBICONV -L$dir/lib"; fi
+    done
+    LIBICONV="$LIBICONV -liconv"
+
+fi;
+   if test x"$LIBICONV" != x; then
+     { echo "$as_me:$LINENO: --with-libiconv-prefix is $LIBICONV" >&5
+echo "$as_me: --with-libiconv-prefix is $LIBICONV" >&6;}
+   fi
+
     # Use iconv for wchar_t to char conversions. As such, check for
     # X/Open Portability Guide, version 2 features (XPG2).
     if test "${ac_cv_header_iconv_h+set}" = set; then
 
 
 
-    # Check for existence of libiconv.a providing XPG2 wchar_t support.
-    echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
-if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv  $LIBS"
-if test x$gcc_no_link = xyes; then
-  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char iconv ();
-int
-main ()
-{
-iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_iconv_iconv=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iconv_iconv=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
-if test $ac_cv_lib_iconv_iconv = yes; then
-  LIBICONV="-liconv"
-fi
-
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS $LIBICONV"
 
 
 
 
-
-
 for ac_func in iconv_open iconv_close iconv nl_langinfo
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -102919,7 +102510,6 @@ else
 fi
 done
 
-
     LIBS="$ac_save_LIBS"
 
     if test x"$ac_has_iconv_h" = xyes &&
@@ -102932,6 +102522,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
       enable_iconv=yes
+
     fi
   fi
   echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
@@ -103839,6 +103430,26 @@ done
   # Only continue checking if the ISO C99 headers exist and support is on.
   if test x"$enable_wchar_t" = xyes; then
 
+    # From Bruno Haible's AM_ICONV, but without link tests.
+    # Check for existence of libiconv.a providing XPG2 wchar_t support.
+    # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+    # those with the standalone portable GNU libiconv installed).
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LIBICONV="$LIBICONV -L$dir/lib"; fi
+    done
+    LIBICONV="$LIBICONV -liconv"
+
+fi;
+   if test x"$LIBICONV" != x; then
+     { echo "$as_me:$LINENO: --with-libiconv-prefix is $LIBICONV" >&5
+echo "$as_me: --with-libiconv-prefix is $LIBICONV" >&6;}
+   fi
+
     # Use iconv for wchar_t to char conversions. As such, check for
     # X/Open Portability Guide, version 2 features (XPG2).
     if test "${ac_cv_header_iconv_h+set}" = set; then
 
 
 
-    # Check for existence of libiconv.a providing XPG2 wchar_t support.
-    echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
-if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv  $LIBS"
-if test x$gcc_no_link = xyes; then
-  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char iconv ();
-int
-main ()
-{
-iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_iconv_iconv=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iconv_iconv=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
-if test $ac_cv_lib_iconv_iconv = yes; then
-  LIBICONV="-liconv"
-fi
-
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS $LIBICONV"
 
 
 
 
-
-
 for ac_func in iconv_open iconv_close iconv nl_langinfo
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -104320,7 +103855,6 @@ else
 fi
 done
 
-
     LIBS="$ac_save_LIBS"
 
     if test x"$ac_has_iconv_h" = xyes &&
@@ -104333,6 +103867,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
       enable_iconv=yes
+
     fi
   fi
   echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
@@ -105632,6 +105167,26 @@ done
   # Only continue checking if the ISO C99 headers exist and support is on.
   if test x"$enable_wchar_t" = xyes; then
 
+    # From Bruno Haible's AM_ICONV, but without link tests.
+    # Check for existence of libiconv.a providing XPG2 wchar_t support.
+    # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+    # those with the standalone portable GNU libiconv installed).
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LIBICONV="$LIBICONV -L$dir/lib"; fi
+    done
+    LIBICONV="$LIBICONV -liconv"
+
+fi;
+   if test x"$LIBICONV" != x; then
+     { echo "$as_me:$LINENO: --with-libiconv-prefix is $LIBICONV" >&5
+echo "$as_me: --with-libiconv-prefix is $LIBICONV" >&6;}
+   fi
+
     # Use iconv for wchar_t to char conversions. As such, check for
     # X/Open Portability Guide, version 2 features (XPG2).
     if test "${ac_cv_header_iconv_h+set}" = set; then
 
 
 
-    # Check for existence of libiconv.a providing XPG2 wchar_t support.
-    echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
-if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv  $LIBS"
-if test x$gcc_no_link = xyes; then
-  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char iconv ();
-int
-main ()
-{
-iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_iconv_iconv=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iconv_iconv=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
-if test $ac_cv_lib_iconv_iconv = yes; then
-  LIBICONV="-liconv"
-fi
-
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS $LIBICONV"
 
 
 
 
-
-
 for ac_func in iconv_open iconv_close iconv nl_langinfo
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -106113,7 +105592,6 @@ else
 fi
 done
 
-
     LIBS="$ac_save_LIBS"
 
     if test x"$ac_has_iconv_h" = xyes &&
@@ -106126,6 +105604,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
       enable_iconv=yes
+
     fi
   fi
   echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
@@ -106251,6 +105730,26 @@ _ACEOF
   # Only continue checking if the ISO C99 headers exist and support is on.
   if test x"$enable_wchar_t" = xyes; then
 
+    # From Bruno Haible's AM_ICONV, but without link tests.
+    # Check for existence of libiconv.a providing XPG2 wchar_t support.
+    # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+    # those with the standalone portable GNU libiconv installed).
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LIBICONV="$LIBICONV -L$dir/lib"; fi
+    done
+    LIBICONV="$LIBICONV -liconv"
+
+fi;
+   if test x"$LIBICONV" != x; then
+     { echo "$as_me:$LINENO: --with-libiconv-prefix is $LIBICONV" >&5
+echo "$as_me: --with-libiconv-prefix is $LIBICONV" >&6;}
+   fi
+
     # Use iconv for wchar_t to char conversions. As such, check for
     # X/Open Portability Guide, version 2 features (XPG2).
     if test "${ac_cv_header_iconv_h+set}" = set; then
 
 
 
-    # Check for existence of libiconv.a providing XPG2 wchar_t support.
-    echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
-if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv  $LIBS"
-if test x$gcc_no_link = xyes; then
-  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char iconv ();
-int
-main ()
-{
-iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_iconv_iconv=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iconv_iconv=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
-if test $ac_cv_lib_iconv_iconv = yes; then
-  LIBICONV="-liconv"
-fi
-
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS $LIBICONV"
 
 
 
 
-
-
 for ac_func in iconv_open iconv_close iconv nl_langinfo
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -106732,7 +106155,6 @@ else
 fi
 done
 
-
     LIBS="$ac_save_LIBS"
 
     if test x"$ac_has_iconv_h" = xyes &&
@@ -106745,6 +106167,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
       enable_iconv=yes
+
     fi
   fi
   echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
@@ -107746,6 +107169,26 @@ done
   # Only continue checking if the ISO C99 headers exist and support is on.
   if test x"$enable_wchar_t" = xyes; then
 
+    # From Bruno Haible's AM_ICONV, but without link tests.
+    # Check for existence of libiconv.a providing XPG2 wchar_t support.
+    # Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+    # those with the standalone portable GNU libiconv installed).
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LIBICONV="$LIBICONV -L$dir/lib"; fi
+    done
+    LIBICONV="$LIBICONV -liconv"
+
+fi;
+   if test x"$LIBICONV" != x; then
+     { echo "$as_me:$LINENO: --with-libiconv-prefix is $LIBICONV" >&5
+echo "$as_me: --with-libiconv-prefix is $LIBICONV" >&6;}
+   fi
+
     # Use iconv for wchar_t to char conversions. As such, check for
     # X/Open Portability Guide, version 2 features (XPG2).
     if test "${ac_cv_header_iconv_h+set}" = set; then
 
 
 
-    # Check for existence of libiconv.a providing XPG2 wchar_t support.
-    echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
-if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv  $LIBS"
-if test x$gcc_no_link = xyes; then
-  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char iconv ();
-int
-main ()
-{
-iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_iconv_iconv=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iconv_iconv=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-echo "${ECHO_T}$ac_cv_lib_iconv_iconv" >&6
-if test $ac_cv_lib_iconv_iconv = yes; then
-  LIBICONV="-liconv"
-fi
-
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS $LIBICONV"
 
 
 
 
-
-
 for ac_func in iconv_open iconv_close iconv nl_langinfo
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -108227,7 +107594,6 @@ else
 fi
 done
 
-
     LIBS="$ac_save_LIBS"
 
     if test x"$ac_has_iconv_h" = xyes &&
@@ -108240,6 +107606,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
       enable_iconv=yes
+
     fi
   fi
   echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
index 4b841ca..13984fa 100755 (executable)
@@ -58,7 +58,7 @@ case ${query} in
       echo ${PCHFLAGS}
       ;;
     --cxxldflags)
-      SECTIONLDFLAGS="@SECTION_LDFLAGS@"
+      SECTIONLDFLAGS="@SECTION_LDFLAGS@ @LIBICONV@"
       echo ${SECTIONLDFLAGS}
       ;;
     *)