]> git.saurik.com Git - cycript.git/blobdiff - configure
Only link libcycript against libffi (not cycript).
[cycript.git] / configure
index c8099d6c1ec87aa9431c01861198a05563b87f45..2c0cef041a2f8d6c0add61a4b20a40c2c57c82c5 100755 (executable)
--- a/configure
+++ b/configure
@@ -640,8 +640,8 @@ LTLIBOBJS
 LIBOBJS
 CY_MACH_FALSE
 CY_MACH_TRUE
-CY_ATTACH_GROUP
 CY_MACH
+CY_ATTACH_GROUP
 ac_ct__OTOOL
 _OTOOL
 ac_ct__NM
@@ -652,6 +652,8 @@ SO
 LTFLAGS
 LTLIBICONV
 LIBICONV
+LTLIBTERMCAP
+LTLIBREADLINE
 CY_OBJECTIVEC_FALSE
 CY_OBJECTIVEC_TRUE
 GNUSTEP_CONFIG
@@ -661,10 +663,11 @@ LIBFFI_CFLAGS
 CY_EXECUTE_FALSE
 CY_EXECUTE_TRUE
 LTLIBAPR
-CY_EXECUTE
 WEBKIT_LIBS
 WEBKIT_CFLAGS
+CY_EXECUTE
 CY_ARCH
+CY_FILTERS
 GNUTAR
 GPERF
 FLEX
@@ -672,8 +675,6 @@ BISON
 TIME
 GIT
 _BASH
-GMAKE
-ifGNUmake
 PKG_CONFIG_LIBDIR
 PKG_CONFIG_PATH
 PKG_CONFIG
@@ -15900,38 +15901,6 @@ $as_echo "no" >&6; }
        fi
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5
-$as_echo_n "checking for GNU make... " >&6; }
-if ${_cv_gnu_make_command+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  _cv_gnu_make_command='' ;
-                for a in "$MAKE" make gmake gnumake ; do
-                        if test -z "$a" ; then continue ; fi ;
-                        if  ( sh -c "$a --version" 2> /dev/null | grep GNU  2>&1 > /dev/null ) ;  then
-                                _cv_gnu_make_command=$a ;
-                                break;
-                        fi
-                done ;
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5
-$as_echo "$_cv_gnu_make_command" >&6; } ;
-        if test  "x$_cv_gnu_make_command" != "x"  ; then
-                ifGNUmake='' ;
-        else
-                ifGNUmake='#' ;
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5
-$as_echo "\"Not found\"" >&6; };
-        fi
-
-
-GMAKE=$_cv_gnu_make_command
-
-if test "x$GMAKE" = x; then :
-  as_fn_error $? "You need GNU make" "$LINENO" 5
-fi
-
 # Extract the first word of "bash", so it can be a program name with args.
 set dummy bash; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking bison for %code{}" >&5
+$as_echo_n "checking bison for %code{}... " >&6; }
+echo '%code{}%%_:' >conftest.y
+if $BISON conftest.y -o/dev/null 2>/dev/null; then
+
+  for element in Bison24; do
+    haveit=
+    for x in $CY_FILTERS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CY_FILTERS="${CY_FILTERS}${CY_FILTERS:+ }$element"
+    fi
+  done
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+
+  for element in Bison23; do
+    haveit=
+    for x in $CY_FILTERS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CY_FILTERS="${CY_FILTERS}${CY_FILTERS:+ }$element"
+    fi
+  done
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+rm -f conftest.y
+
+
 
 
 
@@ -17120,122 +17149,6 @@ if test "${enable_javascript+set}" = set; then :
 
 
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WEBKIT" >&5
-$as_echo_n "checking for WEBKIT... " >&6; }
-
-if test -n "$WEBKIT_CFLAGS"; then
-    pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"webkit-1.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "webkit-1.0") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "webkit-1.0" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$WEBKIT_LIBS"; then
-    pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"webkit-1.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "webkit-1.0") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "webkit-1.0" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "webkit-1.0" 2>&1`
-        else
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "webkit-1.0" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$WEBKIT_PKG_ERRORS" >&5
-
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WEBKIT" >&5
-$as_echo_n "checking for WEBKIT... " >&6; }
-
-if test -n "$WEBKIT_CFLAGS"; then
-    pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"WebKitGtk\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "WebKitGtk") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "WebKitGtk" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$WEBKIT_LIBS"; then
-    pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"WebKitGtk\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "WebKitGtk") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "WebKitGtk" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "WebKitGtk" 2>&1`
-        else
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "WebKitGtk" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$WEBKIT_PKG_ERRORS" >&5
-
-
-
                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
 $as_echo_n "checking for framework JavaScriptCore... " >&6; }
 if ${ac_cv_framework_JavaScriptCore+:} false; then :
@@ -17247,13 +17160,13 @@ else
                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-                #include <JavaScriptCore/JSBase.h>
+        #include <JavaScriptCore/JSBase.h>
 
 int
 main ()
 {
 
-                JSEvaluateScript(0, 0, 0, 0, 0, 0);
+        JSEvaluateScript(0, 0, 0, 0, 0, 0);
 
   ;
   return 0;
@@ -17276,7 +17189,7 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
        if test $ac_cv_framework_JavaScriptCore = yes; then :
 
 
-  for element in "-framework JavaScriptCore $LIBS"; do
+  for element in "-framework JavaScriptCore"; do
     haveit=
     for x in $LIBS; do
 
@@ -17299,60 +17212,88 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
   done
 
 
-                CY_EXECUTE=1
-
-
-
-fi
+        CY_EXECUTE=1
 
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
-$as_echo_n "checking for framework JavaScriptCore... " >&6; }
-if ${ac_cv_framework_JavaScriptCore+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
 
-               ac_check_framework_save_LIBS=$LIBS
-               LIBS="-framework JavaScriptCore  $LIBS"
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+        for cy_webkit_pkg in "webkit-1.0" "WebKitGtk"; do
 
-                #include <JavaScriptCore/JSBase.h>
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WEBKIT" >&5
+$as_echo_n "checking for WEBKIT... " >&6; }
 
-int
-main ()
-{
+if test -n "$WEBKIT_CFLAGS"; then
+    pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$cy_webkit_pkg\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$cy_webkit_pkg") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "$cy_webkit_pkg" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$WEBKIT_LIBS"; then
+    pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$cy_webkit_pkg\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$cy_webkit_pkg") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "$cy_webkit_pkg" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
 
-                JSEvaluateScript(0, 0, 0, 0, 0, 0);
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
 
-                       ac_cv_framework_JavaScriptCore=yes
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-  ac_cv_framework_JavaScriptCore=no
+        _pkg_short_errors_supported=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-               LIBS=$ac_check_framework_save_LIBS
+        if test $_pkg_short_errors_supported = yes; then
+               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$cy_webkit_pkg" 2>&1`
+        else
+               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "$cy_webkit_pkg" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$WEBKIT_PKG_ERRORS" >&5
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_JavaScriptCore" >&5
-$as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
-       if test $ac_cv_framework_JavaScriptCore = yes; then :
+       :
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       :
+else
+       WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
+       WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+                CY_EXECUTE=1
 
 
-  for element in "-framework JavaScriptCore $LIBS"; do
+
+  for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; do
     haveit=
-    for x in $LIBS; do
+    for x in $CFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -17368,27 +17309,12 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
+      CFLAGS="${CFLAGS}${CFLAGS:+ }$element"
     fi
   done
 
 
-                CY_EXECUTE=1
-
-
-
-fi
-
-else
-       WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
-       WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-            CY_EXECUTE=1
-
-
-  for element in `$PKG_CONFIG --cflags WebKitGtk`; do
+  for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; do
     haveit=
     for x in $CXXFLAGS; do
 
@@ -17411,9 +17337,9 @@ $as_echo "yes" >&6; }
   done
 
 
-  for element in `$PKG_CONFIG --libs WebKitGtk`; do
+  for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; do
     haveit=
-    for x in $LIBS; do
+    for x in $OBJCCXXFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -17429,117 +17355,13 @@ $as_echo "yes" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
+      OBJCCXXFLAGS="${OBJCCXXFLAGS}${OBJCCXXFLAGS:+ }$element"
     fi
   done
 
 
-fi
-
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WEBKIT" >&5
-$as_echo_n "checking for WEBKIT... " >&6; }
-
-if test -n "$WEBKIT_CFLAGS"; then
-    pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"WebKitGtk\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "WebKitGtk") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "WebKitGtk" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$WEBKIT_LIBS"; then
-    pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"WebKitGtk\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "WebKitGtk") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "WebKitGtk" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "WebKitGtk" 2>&1`
-        else
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "WebKitGtk" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$WEBKIT_PKG_ERRORS" >&5
-
-
-
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
-$as_echo_n "checking for framework JavaScriptCore... " >&6; }
-if ${ac_cv_framework_JavaScriptCore+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-               ac_check_framework_save_LIBS=$LIBS
-               LIBS="-framework JavaScriptCore  $LIBS"
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                #include <JavaScriptCore/JSBase.h>
-
-int
-main ()
-{
-
-                JSEvaluateScript(0, 0, 0, 0, 0, 0);
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-                       ac_cv_framework_JavaScriptCore=yes
-
-else
-  ac_cv_framework_JavaScriptCore=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-               LIBS=$ac_check_framework_save_LIBS
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_JavaScriptCore" >&5
-$as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
-       if test $ac_cv_framework_JavaScriptCore = yes; then :
-
 
-  for element in "-framework JavaScriptCore $LIBS"; do
+  for element in `$PKG_CONFIG --libs $cy_webkit_pkg`; do
     haveit=
     for x in $LIBS; do
 
@@ -17562,15 +17384,17 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
   done
 
 
-                CY_EXECUTE=1
-
-
+fi; if test "x$CY_EXECUTE" = x1; then break; fi
+        done
 
 fi
+ ;; #(
+  no) :
+
+            CY_EXECUTE=0
+ ;; #(
+  JavaScriptCore) :
 
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 
                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
@@ -17584,13 +17408,13 @@ else
                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-                #include <JavaScriptCore/JSBase.h>
+        #include <JavaScriptCore/JSBase.h>
 
 int
 main ()
 {
 
-                JSEvaluateScript(0, 0, 0, 0, 0, 0);
+        JSEvaluateScript(0, 0, 0, 0, 0, 0);
 
   ;
   return 0;
@@ -17613,7 +17437,7 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
        if test $ac_cv_framework_JavaScriptCore = yes; then :
 
 
-  for element in "-framework JavaScriptCore $LIBS"; do
+  for element in "-framework JavaScriptCore"; do
     haveit=
     for x in $LIBS; do
 
@@ -17636,24 +17460,88 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
   done
 
 
-                CY_EXECUTE=1
+        CY_EXECUTE=1
+
+
+
+else
+
+        for cy_webkit_pkg in "webkit-1.0" "WebKitGtk"; do
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WEBKIT" >&5
+$as_echo_n "checking for WEBKIT... " >&6; }
+
+if test -n "$WEBKIT_CFLAGS"; then
+    pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$cy_webkit_pkg\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$cy_webkit_pkg") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "$cy_webkit_pkg" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$WEBKIT_LIBS"; then
+    pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$cy_webkit_pkg\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$cy_webkit_pkg") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "$cy_webkit_pkg" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
 
 
 
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
 fi
+        if test $_pkg_short_errors_supported = yes; then
+               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$cy_webkit_pkg" 2>&1`
+        else
+               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "$cy_webkit_pkg" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$WEBKIT_PKG_ERRORS" >&5
 
+       :
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       :
 else
        WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
        WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-            CY_EXECUTE=1
+                CY_EXECUTE=1
+
 
 
-  for element in `$PKG_CONFIG --cflags WebKitGtk`; do
+  for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; do
     haveit=
-    for x in $CXXFLAGS; do
+    for x in $CFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -17669,14 +17557,14 @@ $as_echo "yes" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element"
+      CFLAGS="${CFLAGS}${CFLAGS:+ }$element"
     fi
   done
 
 
-  for element in `$PKG_CONFIG --libs WebKitGtk`; do
+  for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; do
     haveit=
-    for x in $LIBS; do
+    for x in $CXXFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -17692,25 +17580,14 @@ $as_echo "yes" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
+      CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element"
     fi
   done
 
 
-fi
-
-else
-       WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
-       WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-        CY_EXECUTE=1
-
-
-  for element in `$PKG_CONFIG --cflags webkit-1.0`; do
+  for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; do
     haveit=
-    for x in $CXXFLAGS; do
+    for x in $OBJCCXXFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -17726,12 +17603,13 @@ $as_echo "yes" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element"
+      OBJCCXXFLAGS="${OBJCCXXFLAGS}${OBJCCXXFLAGS:+ }$element"
     fi
   done
 
 
-  for element in `$PKG_CONFIG --libs webkit-1.0`; do
+
+  for element in `$PKG_CONFIG --libs $cy_webkit_pkg`; do
     haveit=
     for x in $LIBS; do
 
@@ -17754,73 +17632,89 @@ $as_echo "yes" >&6; }
   done
 
 
-fi
- ;; #(
-  no) :
+fi; if test "x$CY_EXECUTE" = x1; then break; fi
+        done
 
-            CY_EXECUTE=0
+fi
  ;; #(
-  JavaScriptCore) :
+  *) :
+    as_fn_error $? "Unknown JavaScript engine: $enableval" "$LINENO" 5 ;;
+esac
 
+else
 
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WEBKIT" >&5
-$as_echo_n "checking for WEBKIT... " >&6; }
 
-if test -n "$WEBKIT_CFLAGS"; then
-    pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"webkit-1.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "webkit-1.0") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "webkit-1.0" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$WEBKIT_LIBS"; then
-    pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"webkit-1.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "webkit-1.0") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "webkit-1.0" 2>/dev/null`
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
+$as_echo_n "checking for framework JavaScriptCore... " >&6; }
+if ${ac_cv_framework_JavaScriptCore+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
 
+               ac_check_framework_save_LIBS=$LIBS
+               LIBS="-framework JavaScriptCore  $LIBS"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+        #include <JavaScriptCore/JSBase.h>
 
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+int
+main ()
+{
+
+        JSEvaluateScript(0, 0, 0, 0, 0, 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+                       ac_cv_framework_JavaScriptCore=yes
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
 else
-        _pkg_short_errors_supported=no
+  ac_cv_framework_JavaScriptCore=no
 fi
-        if test $_pkg_short_errors_supported = yes; then
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "webkit-1.0" 2>&1`
-        else
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "webkit-1.0" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$WEBKIT_PKG_ERRORS" >&5
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               LIBS=$ac_check_framework_save_LIBS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_JavaScriptCore" >&5
+$as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
+       if test $ac_cv_framework_JavaScriptCore = yes; then :
+
+
+  for element in "-framework JavaScriptCore"; do
+    haveit=
+    for x in $LIBS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      LIBS="${LIBS}${LIBS:+ }$element"
+    fi
+  done
+
+
+        CY_EXECUTE=1
+
+
 
+else
 
+        for cy_webkit_pkg in "webkit-1.0" "WebKitGtk"; do
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WEBKIT" >&5
@@ -17830,12 +17724,12 @@ if test -n "$WEBKIT_CFLAGS"; then
     pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"WebKitGtk\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "WebKitGtk") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$cy_webkit_pkg\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$cy_webkit_pkg") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "WebKitGtk" 2>/dev/null`
+  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "$cy_webkit_pkg" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -17846,12 +17740,12 @@ if test -n "$WEBKIT_LIBS"; then
     pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"WebKitGtk\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "WebKitGtk") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$cy_webkit_pkg\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$cy_webkit_pkg") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "WebKitGtk" 2>/dev/null`
+  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "$cy_webkit_pkg" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -17871,58 +17765,31 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "WebKitGtk" 2>&1`
+               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$cy_webkit_pkg" 2>&1`
         else
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "WebKitGtk" 2>&1`
+               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "$cy_webkit_pkg" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
        echo "$WEBKIT_PKG_ERRORS" >&5
 
-
-
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
-$as_echo_n "checking for framework JavaScriptCore... " >&6; }
-if ${ac_cv_framework_JavaScriptCore+:} false; then :
-  $as_echo_n "(cached) " >&6
+       :
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       :
 else
+       WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
+       WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-               ac_check_framework_save_LIBS=$LIBS
-               LIBS="-framework JavaScriptCore  $LIBS"
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                #include <JavaScriptCore/JSBase.h>
-
-int
-main ()
-{
-
-                JSEvaluateScript(0, 0, 0, 0, 0, 0);
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-                       ac_cv_framework_JavaScriptCore=yes
-
-else
-  ac_cv_framework_JavaScriptCore=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-               LIBS=$ac_check_framework_save_LIBS
+                CY_EXECUTE=1
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_JavaScriptCore" >&5
-$as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
-       if test $ac_cv_framework_JavaScriptCore = yes; then :
 
 
-  for element in "-framework JavaScriptCore $LIBS"; do
+  for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; do
     haveit=
-    for x in $LIBS; do
+    for x in $CFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -17938,65 +17805,14 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
+      CFLAGS="${CFLAGS}${CFLAGS:+ }$element"
     fi
   done
 
 
-                CY_EXECUTE=1
-
-
-
-fi
-
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
-$as_echo_n "checking for framework JavaScriptCore... " >&6; }
-if ${ac_cv_framework_JavaScriptCore+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-               ac_check_framework_save_LIBS=$LIBS
-               LIBS="-framework JavaScriptCore  $LIBS"
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                #include <JavaScriptCore/JSBase.h>
-
-int
-main ()
-{
-
-                JSEvaluateScript(0, 0, 0, 0, 0, 0);
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-                       ac_cv_framework_JavaScriptCore=yes
-
-else
-  ac_cv_framework_JavaScriptCore=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-               LIBS=$ac_check_framework_save_LIBS
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_JavaScriptCore" >&5
-$as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
-       if test $ac_cv_framework_JavaScriptCore = yes; then :
-
-
-  for element in "-framework JavaScriptCore $LIBS"; do
+  for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; do
     haveit=
-    for x in $LIBS; do
+    for x in $CXXFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -18012,29 +17828,14 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
+      CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element"
     fi
   done
 
 
-                CY_EXECUTE=1
-
-
-
-fi
-
-else
-       WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
-       WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-            CY_EXECUTE=1
-
-
-  for element in `$PKG_CONFIG --cflags WebKitGtk`; do
+  for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; do
     haveit=
-    for x in $CXXFLAGS; do
+    for x in $OBJCCXXFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -18050,12 +17851,13 @@ $as_echo "yes" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element"
+      OBJCCXXFLAGS="${OBJCCXXFLAGS}${OBJCCXXFLAGS:+ }$element"
     fi
   done
 
 
-  for element in `$PKG_CONFIG --libs WebKitGtk`; do
+
+  for element in `$PKG_CONFIG --libs $cy_webkit_pkg`; do
     haveit=
     for x in $LIBS; do
 
@@ -18078,114 +17880,128 @@ $as_echo "yes" >&6; }
   done
 
 
-fi
-
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WEBKIT" >&5
-$as_echo_n "checking for WEBKIT... " >&6; }
+fi; if test "x$CY_EXECUTE" = x1; then break; fi
+        done
 
-if test -n "$WEBKIT_CFLAGS"; then
-    pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"WebKitGtk\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "WebKitGtk") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "WebKitGtk" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$WEBKIT_LIBS"; then
-    pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"WebKitGtk\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "WebKitGtk") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "WebKitGtk" 2>/dev/null`
-else
-  pkg_failed=yes
 fi
- else
-    pkg_failed=untried
+
 fi
 
 
 
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  apr_found="no"
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "WebKitGtk" 2>&1`
-        else
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "WebKitGtk" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$WEBKIT_PKG_ERRORS" >&5
+  if test "$target_os" = "os2-emx"; then
+    # Scripts don't pass test -x on OS/2
+    TEST_X="test -f"
+  else
+    TEST_X="test -x"
+  fi
 
+  acceptable_majors="1"
 
+  apr_temp_acceptable_apr_config=""
+  for apr_temp_major in $acceptable_majors
+  do
+    case $apr_temp_major in
+      0)
+      apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-config"
+      ;;
+      *)
+      apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-$apr_temp_major-config"
+      ;;
+    esac
+  done
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
-$as_echo_n "checking for framework JavaScriptCore... " >&6; }
-if ${ac_cv_framework_JavaScriptCore+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for APR" >&5
+$as_echo_n "checking for APR... " >&6; }
 
-               ac_check_framework_save_LIBS=$LIBS
-               LIBS="-framework JavaScriptCore  $LIBS"
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                #include <JavaScriptCore/JSBase.h>
+# Check whether --with-apr was given.
+if test "${with_apr+set}" = set; then :
+  withval=$with_apr;
+    if test "$withval" = "no" || test "$withval" = "yes"; then
+      as_fn_error $? "--with-apr requires a directory or file to be provided" "$LINENO" 5
+    fi
 
-int
-main ()
-{
+    for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
+    do
+      for lookdir in "$withval/bin" "$withval"
+      do
+        if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then
+          apr_config="$lookdir/$apr_temp_apr_config_file"
 
-                JSEvaluateScript(0, 0, 0, 0, 0, 0);
+          apr_found="yes"
+          break 2
+        fi
+      done
+    done
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+    if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
+      apr_config="$withval"
+      apr_found="yes"
+    fi
 
-                       ac_cv_framework_JavaScriptCore=yes
+            if test "$apr_found" != "yes"; then
+      as_fn_error $? "the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file." "$LINENO" 5
+    fi
 
 else
-  ac_cv_framework_JavaScriptCore=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-               LIBS=$ac_check_framework_save_LIBS
+
+        if test -n "1" && test "1" = "1"; then
+      for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
+      do
+        if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
+          apr_config="$apr_temp_apr_config_file"
+
+          apr_found="yes"
+          break
+        else
+                    for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
+            if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
+              apr_config="$lookdir/bin/$apr_temp_apr_config_file"
+
+              apr_found="yes"
+              break 2
+            fi
+          done
+        fi
+      done
+    fi
+        if test "$apr_found" = "no" && test -d ""; then
+      apr_temp_abs_srcdir="`cd  && pwd`"
+      apr_found="reconfig"
+      apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"/include/apr_version.h\"`"
+      case $apr_bundled_major in
+        "")
+          as_fn_error $? "failed to find major version of bundled APR" "$LINENO" 5
+        ;;
+        0)
+          apr_temp_apr_config_file="apr-config"
+        ;;
+        *)
+          apr_temp_apr_config_file="apr-$apr_bundled_major-config"
+        ;;
+      esac
+      if test -n ""; then
+        apr_config="/$apr_temp_apr_config_file"
+      else
+        apr_config="/$apr_temp_apr_config_file"
+      fi
+    fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_JavaScriptCore" >&5
-$as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
-       if test $ac_cv_framework_JavaScriptCore = yes; then :
 
 
-  for element in "-framework JavaScriptCore $LIBS"; do
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_found" >&5
+$as_echo "$apr_found" >&6; }
+
+case $apr_found in #(
+  yes) :
+
+
+  for element in `$apr_config --includes`; do
     haveit=
-    for x in $LIBS; do
+    for x in $CPPFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -18201,65 +18017,144 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
     fi
   done
 
 
-                CY_EXECUTE=1
+  for element in `$apr_config --link-libtool`; do
+    haveit=
+    for x in $LTLIBAPR; do
 
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      LTLIBAPR="${LTLIBAPR}${LTLIBAPR:+ }$element"
+    fi
+  done
 
-fi
 
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ ;; #(
+  *) :
+    as_fn_error $? "missing \"libapr\"" "$LINENO" 5 ;;
+esac
 
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
-$as_echo_n "checking for framework JavaScriptCore... " >&6; }
-if ${ac_cv_framework_JavaScriptCore+:} false; then :
-  $as_echo_n "(cached) " >&6
+
+ if test "x$CY_EXECUTE" = x1; then
+  CY_EXECUTE_TRUE=
+  CY_EXECUTE_FALSE='#'
 else
+  CY_EXECUTE_TRUE='#'
+  CY_EXECUTE_FALSE=
+fi
 
-               ac_check_framework_save_LIBS=$LIBS
-               LIBS="-framework JavaScriptCore  $LIBS"
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-                #include <JavaScriptCore/JSBase.h>
 
-int
-main ()
-{
 
-                JSEvaluateScript(0, 0, 0, 0, 0, 0);
+case $CY_EXECUTE in #(
+  1) :
 
-  ;
-  return 0;
-}
+    for ac_header in ffi.h ffi/ffi.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+ break
+fi
 
-                       ac_cv_framework_JavaScriptCore=yes
+done
+
+    if test "x$ac_cv_header_ffi_h" = xno && test "x$ac_cv_header_ffi_ffi_h" = xno; then :
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
+$as_echo_n "checking for LIBFFI... " >&6; }
 
+if test -n "$LIBFFI_CFLAGS"; then
+    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
 else
-  ac_cv_framework_JavaScriptCore=no
+  pkg_failed=yes
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-               LIBS=$ac_check_framework_save_LIBS
+ else
+    pkg_failed=untried
+fi
+if test -n "$LIBFFI_LIBS"; then
+    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_JavaScriptCore" >&5
-$as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
-       if test $ac_cv_framework_JavaScriptCore = yes; then :
+        if test $_pkg_short_errors_supported = yes; then
+               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
+        else
+               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$LIBFFI_PKG_ERRORS" >&5
+
+       as_fn_error $? "missing \"libffi\"" "$LINENO" 5
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       as_fn_error $? "missing \"libffi\"" "$LINENO" 5
+else
+       LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
+       LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
 
-  for element in "-framework JavaScriptCore $LIBS"; do
+
+  for element in `$PKG_CONFIG --cflags libffi`; do
     haveit=
-    for x in $LIBS; do
+    for x in $CFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -18275,27 +18170,12 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
+      CFLAGS="${CFLAGS}${CFLAGS:+ }$element"
     fi
   done
 
 
-                CY_EXECUTE=1
-
-
-
-fi
-
-else
-       WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
-       WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-            CY_EXECUTE=1
-
-
-  for element in `$PKG_CONFIG --cflags WebKitGtk`; do
+  for element in `$PKG_CONFIG --cflags libffi`; do
     haveit=
     for x in $CXXFLAGS; do
 
@@ -18318,9 +18198,9 @@ $as_echo "yes" >&6; }
   done
 
 
-  for element in `$PKG_CONFIG --libs WebKitGtk`; do
+  for element in `$PKG_CONFIG --cflags libffi`; do
     haveit=
-    for x in $LIBS; do
+    for x in $OBJCCXXFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -18336,46 +18216,13 @@ $as_echo "yes" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
+      OBJCCXXFLAGS="${OBJCCXXFLAGS}${OBJCCXXFLAGS:+ }$element"
     fi
   done
 
 
-fi
-
-else
-       WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
-       WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-        CY_EXECUTE=1
-
-
-  for element in `$PKG_CONFIG --cflags webkit-1.0`; do
-    haveit=
-    for x in $CXXFLAGS; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element"
-    fi
-  done
-
 
-  for element in `$PKG_CONFIG --libs webkit-1.0`; do
+  for element in `$PKG_CONFIG --libs libffi`; do
     haveit=
     for x in $LIBS; do
 
@@ -18399,103 +18246,99 @@ $as_echo "yes" >&6; }
 
 
 fi
- ;; #(
-  *) :
-    as_fn_error $? "Unknown JavaScript engine: $enableval" "$LINENO" 5 ;;
-esac
 
 else
 
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WEBKIT" >&5
-$as_echo_n "checking for WEBKIT... " >&6; }
-
-if test -n "$WEBKIT_CFLAGS"; then
-    pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"webkit-1.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "webkit-1.0") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "webkit-1.0" 2>/dev/null`
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ffi_call" >&5
+$as_echo_n "checking for library containing ffi_call... " >&6; }
+if ${ac_cv_search_ffi_call+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  pkg_failed=yes
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ffi_call ();
+int
+main ()
+{
+return ffi_call ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' ffi; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_search_ffi_call=$ac_res
 fi
- else
-    pkg_failed=untried
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_ffi_call+:} false; then :
+  break
 fi
-if test -n "$WEBKIT_LIBS"; then
-    pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"webkit-1.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "webkit-1.0") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "webkit-1.0" 2>/dev/null`
+done
+if ${ac_cv_search_ffi_call+:} false; then :
+
 else
-  pkg_failed=yes
+  ac_cv_search_ffi_call=no
 fi
- else
-    pkg_failed=untried
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ffi_call" >&5
+$as_echo "$ac_cv_search_ffi_call" >&6; }
+ac_res=$ac_cv_search_ffi_call
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-
-
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
 fi
-        if test $_pkg_short_errors_supported = yes; then
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "webkit-1.0" 2>&1`
-        else
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "webkit-1.0" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$WEBKIT_PKG_ERRORS" >&5
 
+        case $ac_cv_search_ffi_call in #(
+  no) :
 
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WEBKIT" >&5
-$as_echo_n "checking for WEBKIT... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
+$as_echo_n "checking for LIBFFI... " >&6; }
 
-if test -n "$WEBKIT_CFLAGS"; then
-    pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
+if test -n "$LIBFFI_CFLAGS"; then
+    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"WebKitGtk\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "WebKitGtk") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "WebKitGtk" 2>/dev/null`
+  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
 else
   pkg_failed=yes
 fi
  else
     pkg_failed=untried
 fi
-if test -n "$WEBKIT_LIBS"; then
-    pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
+if test -n "$LIBFFI_LIBS"; then
+    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"WebKitGtk\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "WebKitGtk") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "WebKitGtk" 2>/dev/null`
+  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -18515,58 +18358,29 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "WebKitGtk" 2>&1`
+               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
         else
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "WebKitGtk" 2>&1`
+               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
-       echo "$WEBKIT_PKG_ERRORS" >&5
-
-
-
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
-$as_echo_n "checking for framework JavaScriptCore... " >&6; }
-if ${ac_cv_framework_JavaScriptCore+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-               ac_check_framework_save_LIBS=$LIBS
-               LIBS="-framework JavaScriptCore  $LIBS"
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                #include <JavaScriptCore/JSBase.h>
-
-int
-main ()
-{
-
-                JSEvaluateScript(0, 0, 0, 0, 0, 0);
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-                       ac_cv_framework_JavaScriptCore=yes
+       echo "$LIBFFI_PKG_ERRORS" >&5
 
+       as_fn_error $? "missing \"libffi\"" "$LINENO" 5
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       as_fn_error $? "missing \"libffi\"" "$LINENO" 5
 else
-  ac_cv_framework_JavaScriptCore=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-               LIBS=$ac_check_framework_save_LIBS
+       LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
+       LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_JavaScriptCore" >&5
-$as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
-       if test $ac_cv_framework_JavaScriptCore = yes; then :
 
 
-  for element in "-framework JavaScriptCore $LIBS"; do
+  for element in `$PKG_CONFIG --cflags libffi`; do
     haveit=
-    for x in $LIBS; do
+    for x in $CFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -18582,65 +18396,14 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
+      CFLAGS="${CFLAGS}${CFLAGS:+ }$element"
     fi
   done
 
 
-                CY_EXECUTE=1
-
-
-
-fi
-
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
-$as_echo_n "checking for framework JavaScriptCore... " >&6; }
-if ${ac_cv_framework_JavaScriptCore+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-               ac_check_framework_save_LIBS=$LIBS
-               LIBS="-framework JavaScriptCore  $LIBS"
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                #include <JavaScriptCore/JSBase.h>
-
-int
-main ()
-{
-
-                JSEvaluateScript(0, 0, 0, 0, 0, 0);
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-                       ac_cv_framework_JavaScriptCore=yes
-
-else
-  ac_cv_framework_JavaScriptCore=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-               LIBS=$ac_check_framework_save_LIBS
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_JavaScriptCore" >&5
-$as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
-       if test $ac_cv_framework_JavaScriptCore = yes; then :
-
-
-  for element in "-framework JavaScriptCore $LIBS"; do
+  for element in `$PKG_CONFIG --cflags libffi`; do
     haveit=
-    for x in $LIBS; do
+    for x in $CXXFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -18656,29 +18419,14 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
+      CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element"
     fi
   done
 
 
-                CY_EXECUTE=1
-
-
-
-fi
-
-else
-       WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
-       WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-            CY_EXECUTE=1
-
-
-  for element in `$PKG_CONFIG --cflags WebKitGtk`; do
+  for element in `$PKG_CONFIG --cflags libffi`; do
     haveit=
-    for x in $CXXFLAGS; do
+    for x in $OBJCCXXFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -18694,12 +18442,13 @@ $as_echo "yes" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element"
+      OBJCCXXFLAGS="${OBJCCXXFLAGS}${OBJCCXXFLAGS:+ }$element"
     fi
   done
 
 
-  for element in `$PKG_CONFIG --libs WebKitGtk`; do
+
+  for element in `$PKG_CONFIG --libs libffi`; do
     haveit=
     for x in $LIBS; do
 
@@ -18722,112 +18471,80 @@ $as_echo "yes" >&6; }
   done
 
 
-fi
-
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+fi ;; #(
+  *) :
+     ;;
+esac
 
+fi
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WEBKIT" >&5
-$as_echo_n "checking for WEBKIT... " >&6; }
+    ac_ext=mm
+ac_cpp='$OBJCXXCPP $CPPFLAGS'
+ac_compile='$OBJCXX -c $OBJCXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$OBJCXX -o conftest$ac_exeext $OBJCXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_objcxx_compiler_gnu
 
-if test -n "$WEBKIT_CFLAGS"; then
-    pkg_cv_WEBKIT_CFLAGS="$WEBKIT_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"WebKitGtk\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "WebKitGtk") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_CFLAGS=`$PKG_CONFIG --cflags "WebKitGtk" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$WEBKIT_LIBS"; then
-    pkg_cv_WEBKIT_LIBS="$WEBKIT_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"WebKitGtk\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "WebKitGtk") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_WEBKIT_LIBS=`$PKG_CONFIG --libs "WebKitGtk" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we really have Objective C++" >&5
+$as_echo_n "checking if we really have Objective C++... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+_ACEOF
+if ac_fn_objcxx_try_compile "$LINENO"; then :
 
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+        CY_OBJECTIVEC=1
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
 else
-        _pkg_short_errors_supported=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-        if test $_pkg_short_errors_supported = yes; then
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "WebKitGtk" 2>&1`
-        else
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "WebKitGtk" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$WEBKIT_PKG_ERRORS" >&5
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+    if test "x$CY_OBJECTIVEC" = x1; then :
 
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
-$as_echo_n "checking for framework JavaScriptCore... " >&6; }
-if ${ac_cv_framework_JavaScriptCore+:} false; then :
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework CoreFoundation" >&5
+$as_echo_n "checking for framework CoreFoundation... " >&6; }
+if ${ac_cv_framework_CoreFoundation+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
                ac_check_framework_save_LIBS=$LIBS
-               LIBS="-framework JavaScriptCore  $LIBS"
+               LIBS="-framework CoreFoundation  $LIBS"
                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-                #include <JavaScriptCore/JSBase.h>
+            #include <CoreFoundation/CFBase.h>
 
 int
 main ()
 {
-
-                JSEvaluateScript(0, 0, 0, 0, 0, 0);
-
+CFAllocatorGetDefault();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_objcxx_try_link "$LINENO"; then :
 
-                       ac_cv_framework_JavaScriptCore=yes
+                       ac_cv_framework_CoreFoundation=yes
 
 else
-  ac_cv_framework_JavaScriptCore=no
+  ac_cv_framework_CoreFoundation=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
                LIBS=$ac_check_framework_save_LIBS
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_JavaScriptCore" >&5
-$as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
-       if test $ac_cv_framework_JavaScriptCore = yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_CoreFoundation" >&5
+$as_echo "$ac_cv_framework_CoreFoundation" >&6; }
+       if test $ac_cv_framework_CoreFoundation = yes; then :
 
 
-  for element in "-framework JavaScriptCore $LIBS"; do
+  for element in "-framework CoreFoundation"; do
     haveit=
     for x in $LIBS; do
 
@@ -18850,58 +18567,49 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
   done
 
 
-                CY_EXECUTE=1
-
-
 
-fi
 
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
-$as_echo_n "checking for framework JavaScriptCore... " >&6; }
-if ${ac_cv_framework_JavaScriptCore+:} false; then :
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework Foundation" >&5
+$as_echo_n "checking for framework Foundation... " >&6; }
+if ${ac_cv_framework_Foundation+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
                ac_check_framework_save_LIBS=$LIBS
-               LIBS="-framework JavaScriptCore  $LIBS"
+               LIBS="-framework Foundation  $LIBS"
                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-                #include <JavaScriptCore/JSBase.h>
+                #include <Foundation/NSObject.h>
 
 int
 main ()
 {
-
-                JSEvaluateScript(0, 0, 0, 0, 0, 0);
-
+[[NSObject alloc] init];
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_objcxx_try_link "$LINENO"; then :
 
-                       ac_cv_framework_JavaScriptCore=yes
+                       ac_cv_framework_Foundation=yes
 
 else
-  ac_cv_framework_JavaScriptCore=no
+  ac_cv_framework_Foundation=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
                LIBS=$ac_check_framework_save_LIBS
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_JavaScriptCore" >&5
-$as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
-       if test $ac_cv_framework_JavaScriptCore = yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_Foundation" >&5
+$as_echo "$ac_cv_framework_Foundation" >&6; }
+       if test $ac_cv_framework_Foundation = yes; then :
 
 
-  for element in "-framework JavaScriptCore $LIBS"; do
+  for element in "-framework Foundation"; do
     haveit=
     for x in $LIBS; do
 
@@ -18923,25 +18631,56 @@ $as_echo "$ac_cv_framework_JavaScriptCore" >&6; }
     fi
   done
 
+               cat >>confdefs.h <<_ACEOF
+#define HAVE_FRAMEWORK_FOUNDATION 1
+_ACEOF
 
-                CY_EXECUTE=1
 
+fi
 
 
-fi
 
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework WebKit" >&5
+$as_echo_n "checking for framework WebKit... " >&6; }
+if ${ac_cv_framework_WebKit+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-       WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
-       WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-            CY_EXECUTE=1
+               ac_check_framework_save_LIBS=$LIBS
+               LIBS="-framework WebKit  $LIBS"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+                #include <WebKit/WebScriptObject.h>
+
+int
+main ()
+{
+[[WebScriptObject alloc] init];
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_objcxx_try_link "$LINENO"; then :
+
+                       ac_cv_framework_WebKit=yes
+
+else
+  ac_cv_framework_WebKit=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               LIBS=$ac_check_framework_save_LIBS
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_WebKit" >&5
+$as_echo "$ac_cv_framework_WebKit" >&6; }
+       if test $ac_cv_framework_WebKit = yes; then :
 
-  for element in `$PKG_CONFIG --cflags WebKitGtk`; do
+
+  for element in "-framework WebKit"; do
     haveit=
-    for x in $CXXFLAGS; do
+    for x in $LIBS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -18957,14 +18696,71 @@ $as_echo "yes" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element"
+      LIBS="${LIBS}${LIBS:+ }$element"
     fi
   done
 
+               cat >>confdefs.h <<_ACEOF
+#define HAVE_FRAMEWORK_WEBKIT 1
+_ACEOF
+
+
+fi
+
+
+else
+
+
+            for ac_prog in gnustep-config
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_GNUSTEP_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$GNUSTEP_CONFIG"; then
+  ac_cv_prog_GNUSTEP_CONFIG="$GNUSTEP_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_GNUSTEP_CONFIG="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+GNUSTEP_CONFIG=$ac_cv_prog_GNUSTEP_CONFIG
+if test -n "$GNUSTEP_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUSTEP_CONFIG" >&5
+$as_echo "$GNUSTEP_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$GNUSTEP_CONFIG" && break
+done
+
+
+            if test "x$GNUSTEP_CONFIG" != x; then :
+
+
 
-  for element in `$PKG_CONFIG --libs WebKitGtk`; do
+  for element in `$GNUSTEP_CONFIG --objc-flags`; do
     haveit=
-    for x in $LIBS; do
+    for x in $OBJCXXFLAGS; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -18980,46 +18776,12 @@ $as_echo "yes" >&6; }
       fi
     done
     if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
+      OBJCXXFLAGS="${OBJCXXFLAGS}${OBJCXXFLAGS:+ }$element"
     fi
   done
 
 
-fi
-
-else
-       WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
-       WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-        CY_EXECUTE=1
-
-
-  for element in `$PKG_CONFIG --cflags webkit-1.0`; do
-    haveit=
-    for x in $CXXFLAGS; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element"
-    fi
-  done
-
-
-  for element in `$PKG_CONFIG --libs webkit-1.0`; do
+  for element in `$GNUSTEP_CONFIG --base-libs`; do
     haveit=
     for x in $LIBS; do
 
@@ -19042,190 +18804,102 @@ $as_echo "yes" >&6; }
   done
 
 
-fi
+else
+  CY_OBJECTIVEC=0
 
 fi
 
+fi
 
+fi
 
-  apr_found="no"
-
-  if test "$target_os" = "os2-emx"; then
-    # Scripts don't pass test -x on OS/2
-    TEST_X="test -f"
-  else
-    TEST_X="test -x"
-  fi
-
-  acceptable_majors="1"
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-  apr_temp_acceptable_apr_config=""
-  for apr_temp_major in $acceptable_majors
-  do
-    case $apr_temp_major in
-      0)
-      apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-config"
-      ;;
-      *)
-      apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-$apr_temp_major-config"
-      ;;
-    esac
-  done
+ ;; #(
+  *) :
+     ;;
+esac
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for APR" >&5
-$as_echo_n "checking for APR... " >&6; }
+ if test "x$CY_OBJECTIVEC" = x1; then
+  CY_OBJECTIVEC_TRUE=
+  CY_OBJECTIVEC_FALSE='#'
+else
+  CY_OBJECTIVEC_TRUE='#'
+  CY_OBJECTIVEC_FALSE=
+fi
 
-# Check whether --with-apr was given.
-if test "${with_apr+set}" = set; then :
-  withval=$with_apr;
-    if test "$withval" = "no" || test "$withval" = "yes"; then
-      as_fn_error $? "--with-apr requires a directory or file to be provided" "$LINENO" 5
-    fi
 
-    for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
-    do
-      for lookdir in "$withval/bin" "$withval"
-      do
-        if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then
-          apr_config="$lookdir/$apr_temp_apr_config_file"
 
-          apr_found="yes"
-          break 2
-        fi
-      done
-    done
 
-    if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
-      apr_config="$withval"
-      apr_found="yes"
-    fi
 
-            if test "$apr_found" != "yes"; then
-      as_fn_error $? "the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file." "$LINENO" 5
-    fi
+    cy_save=$LIBS
+    LIBS=
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a readline compatible library" >&5
+$as_echo_n "checking for a readline compatible library... " >&6; }
+if ${ax_cv_lib_readline+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-        if test -n "1" && test "1" = "1"; then
-      for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
-      do
-        if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
-          apr_config="$apr_temp_apr_config_file"
-
-          apr_found="yes"
-          break
+    ORIG_LIBS="$LIBS"
+    for readline_lib in readline edit editline; do
+      for termcap_lib in "" termcap curses ncurses; do
+        if test -z "$termcap_lib"; then
+          TRY_LIB="-l$readline_lib"
         else
-                    for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
-            if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
-              apr_config="$lookdir/bin/$apr_temp_apr_config_file"
-
-              apr_found="yes"
-              break 2
-            fi
-          done
+          TRY_LIB="-l$readline_lib -l$termcap_lib"
         fi
-      done
-    fi
-        if test "$apr_found" = "no" && test -d ""; then
-      apr_temp_abs_srcdir="`cd  && pwd`"
-      apr_found="reconfig"
-      apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"/include/apr_version.h\"`"
-      case $apr_bundled_major in
-        "")
-          as_fn_error $? "failed to find major version of bundled APR" "$LINENO" 5
-        ;;
-        0)
-          apr_temp_apr_config_file="apr-config"
-        ;;
-        *)
-          apr_temp_apr_config_file="apr-$apr_bundled_major-config"
-        ;;
-      esac
-      if test -n ""; then
-        apr_config="/$apr_temp_apr_config_file"
-      else
-        apr_config="/$apr_temp_apr_config_file"
-      fi
-    fi
+        LIBS="$ORIG_LIBS $TRY_LIB"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline ();
+int
+main ()
+{
+return readline ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ax_cv_lib_readline="$TRY_LIB"
 fi
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_found" >&5
-$as_echo "$apr_found" >&6; }
-
-case $apr_found in #(
-  yes) :
-
-
-  for element in `$apr_config --includes`; do
-    haveit=
-    for x in $CPPFLAGS; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
-    fi
-  done
-
-
-  for element in `$apr_config --link-libtool`; do
-    haveit=
-    for x in $LTLIBAPR; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      if test "X$x" = "X$element"; then
-        haveit=yes
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        if test -n "$ax_cv_lib_readline"; then
+          break
+        fi
+      done
+      if test -n "$ax_cv_lib_readline"; then
         break
       fi
     done
-    if test -z "$haveit"; then
-      LTLIBAPR="${LTLIBAPR}${LTLIBAPR:+ }$element"
+    if test -z "$ax_cv_lib_readline"; then
+      ax_cv_lib_readline="no"
     fi
-  done
-
-
- ;; #(
-  *) :
-    as_fn_error $? "missing \"libapr\"" "$LINENO" 5 ;;
-esac
-
-
+    LIBS="$ORIG_LIBS"
 
- if test "x$CY_EXECUTE" = x1; then
-  CY_EXECUTE_TRUE=
-  CY_EXECUTE_FALSE='#'
-else
-  CY_EXECUTE_TRUE='#'
-  CY_EXECUTE_FALSE=
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lib_readline" >&5
+$as_echo "$ax_cv_lib_readline" >&6; }
 
+  if test "$ax_cv_lib_readline" != "no"; then
+    LIBS="$LIBS $ax_cv_lib_readline"
 
+$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
 
-
-case $CY_EXECUTE in #(
-  1) :
-
-    for ac_header in ffi.h ffi/ffi.h
+    for ac_header in readline.h readline/readline.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -19233,136 +18907,82 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
- break
+
 fi
 
 done
 
-    if test "x$ac_cv_header_ffi_h" = xno && test "x$ac_cv_header_ffi_ffi_h" = xno; then :
-
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
-$as_echo_n "checking for LIBFFI... " >&6; }
-
-if test -n "$LIBFFI_CFLAGS"; then
-    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$LIBFFI_LIBS"; then
-    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
+$as_echo_n "checking whether readline supports history... " >&6; }
+if ${ax_cv_lib_readline_history+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
 
+      ax_cv_lib_readline_history="no"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char add_history ();
+int
+main ()
+{
+return add_history ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ax_cv_lib_readline_history="yes"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
 fi
-        if test $_pkg_short_errors_supported = yes; then
-               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
-        else
-               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$LIBFFI_PKG_ERRORS" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lib_readline_history" >&5
+$as_echo "$ax_cv_lib_readline_history" >&6; }
+    if test "$ax_cv_lib_readline_history" = "yes"; then
 
-       as_fn_error $? "missing \"libffi\"" "$LINENO" 5
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-       as_fn_error $? "missing \"libffi\"" "$LINENO" 5
-else
-       LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
-       LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+$as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
 
+      for ac_header in history.h readline/history.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-  for element in `$PKG_CONFIG --cflags libffi`; do
-    haveit=
-    for x in $CXXFLAGS; do
+fi
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+done
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element"
     fi
-  done
-
-
-  for element in `$PKG_CONFIG --libs libffi`; do
-    haveit=
-    for x in $LIBS; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+  fi
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
-    fi
-  done
+    LTLIBREADLINE=$LIBS
+    LIBS=$cy_save
 
 
-fi
+case $ax_cv_lib_readline in #(
+  no) :
+    as_fn_error $? "missing \"libreadline\"" "$LINENO" 5 ;; #(
+  *) :
+     ;;
+esac
 
-else
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ffi_call" >&5
-$as_echo_n "checking for library containing ffi_call... " >&6; }
-if ${ac_cv_search_ffi_call+:} false; then :
+    cy_save=$LIBS
+    LIBS=
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cur_term" >&5
+$as_echo_n "checking for library containing cur_term... " >&6; }
+if ${ac_cv_search_cur_term+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -19375,16 +18995,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char ffi_call ();
+char cur_term ();
 int
 main ()
 {
-return ffi_call ();
+return cur_term ();
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' ffi; do
+for ac_lib in '' termcap; do
   if test -z "$ac_lib"; then
     ac_res="none required"
   else
@@ -19392,358 +19012,416 @@ for ac_lib in '' ffi; do
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
   if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_search_ffi_call=$ac_res
+  ac_cv_search_cur_term=$ac_res
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if ${ac_cv_search_ffi_call+:} false; then :
+  if ${ac_cv_search_cur_term+:} false; then :
   break
 fi
 done
-if ${ac_cv_search_ffi_call+:} false; then :
+if ${ac_cv_search_cur_term+:} false; then :
 
 else
-  ac_cv_search_ffi_call=no
+  ac_cv_search_cur_term=no
 fi
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ffi_call" >&5
-$as_echo "$ac_cv_search_ffi_call" >&6; }
-ac_res=$ac_cv_search_ffi_call
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cur_term" >&5
+$as_echo "$ac_cv_search_cur_term" >&6; }
+ac_res=$ac_cv_search_cur_term
 if test "$ac_res" != no; then :
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
 fi
 
-        case $ac_cv_search_ffi_call in #(
-  no) :
+    LTLIBTERMCAP=$LIBS
+    LIBS=$cy_save
 
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
-$as_echo_n "checking for LIBFFI... " >&6; }
 
-if test -n "$LIBFFI_CFLAGS"; then
-    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$LIBFFI_LIBS"; then
-    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
 
+      if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
 
 
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
 else
-        _pkg_short_errors_supported=no
+  with_gnu_ld=no
 fi
-        if test $_pkg_short_errors_supported = yes; then
-               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
-        else
-               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$LIBFFI_PKG_ERRORS" >&5
 
-       as_fn_error $? "missing \"libffi\"" "$LINENO" 5
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-       as_fn_error $? "missing \"libffi\"" "$LINENO" 5
-else
-       LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
-       LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-
-  for element in `$PKG_CONFIG --cflags libffi`; do
-    haveit=
-    for x in $CXXFLAGS; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element"
-    fi
-  done
-
-
-  for element in `$PKG_CONFIG --libs libffi`; do
-    haveit=
-    for x in $LIBS; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
+      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
+        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${acl_cv_path_LD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$acl_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+        test "$with_gnu_ld" != no && break
+        ;;
+      *)
+        test "$with_gnu_ld" != yes && break
+        ;;
+      esac
     fi
   done
+  IFS="$acl_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
 
-
-fi ;; #(
-  *) :
-     ;;
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${acl_cv_prog_gnu_ld+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes
+  ;;
+*)
+  acl_cv_prog_gnu_ld=no
+  ;;
 esac
-
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
 
-    ac_ext=mm
-ac_cpp='$OBJCXXCPP $CPPFLAGS'
-ac_compile='$OBJCXX -c $OBJCXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$OBJCXX -o conftest$ac_exeext $OBJCXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_objcxx_compiler_gnu
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we really have Objective C++" >&5
-$as_echo_n "checking if we really have Objective C++... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-_ACEOF
-if ac_fn_objcxx_try_compile "$LINENO"; then :
+                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
+if ${acl_cv_rpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-        CY_OBJECTIVEC=1
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
+  wl="$acl_cv_wl"
+  acl_libext="$acl_cv_libext"
+  acl_shlibext="$acl_cv_shlibext"
+  acl_libname_spec="$acl_cv_libname_spec"
+  acl_library_names_spec="$acl_cv_library_names_spec"
+  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  acl_hardcode_direct="$acl_cv_hardcode_direct"
+  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+    # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+  enableval=$enable_rpath; :
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  enable_rpath=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-    if test "x$CY_OBJECTIVEC" = x1; then :
 
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework CoreFoundation" >&5
-$as_echo_n "checking for framework CoreFoundation... " >&6; }
-if ${ac_cv_framework_CoreFoundation+:} false; then :
+
+  acl_libdirstem=lib
+  acl_libdirstem2=
+  case "$host_os" in
+    solaris*)
+                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
+$as_echo_n "checking for 64-bit host... " >&6; }
+if ${gl_cv_solaris_64bit+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-
-               ac_check_framework_save_LIBS=$LIBS
-               LIBS="-framework CoreFoundation  $LIBS"
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-            #include <CoreFoundation/CFBase.h>
+#ifdef _LP64
+sixtyfour bits
+#endif
 
-int
-main ()
-{
-CFAllocatorGetDefault();
-  ;
-  return 0;
-}
 _ACEOF
-if ac_fn_objcxx_try_link "$LINENO"; then :
-
-                       ac_cv_framework_CoreFoundation=yes
-
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
+  gl_cv_solaris_64bit=yes
 else
-  ac_cv_framework_CoreFoundation=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-               LIBS=$ac_check_framework_save_LIBS
-
+  gl_cv_solaris_64bit=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_CoreFoundation" >&5
-$as_echo "$ac_cv_framework_CoreFoundation" >&6; }
-       if test $ac_cv_framework_CoreFoundation = yes; then :
-
+rm -f conftest*
 
-  for element in "-framework CoreFoundation $LIBS"; do
-    haveit=
-    for x in $LIBS; do
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
+$as_echo "$gl_cv_solaris_64bit" >&6; }
+      if test $gl_cv_solaris_64bit = yes; then
+        acl_libdirstem=lib/64
+        case "$host_cpu" in
+          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
+          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+        esac
       fi
-    done
-    if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
-    fi
-  done
-
-
+      ;;
+    *)
+      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+      if test -n "$searchpath"; then
+        acl_save_IFS="${IFS=   }"; IFS=":"
+        for searchdir in $searchpath; do
+          if test -d "$searchdir"; then
+            case "$searchdir" in
+              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+              */../ | */.. )
+                # Better ignore directories of this form. They are misleading.
+                ;;
+              *) searchdir=`cd "$searchdir" && pwd`
+                 case "$searchdir" in
+                   */lib64 ) acl_libdirstem=lib64 ;;
+                 esac ;;
+            esac
+          fi
+        done
+        IFS="$acl_save_IFS"
+      fi
+      ;;
+  esac
+  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
 
 
 
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework Foundation" >&5
-$as_echo_n "checking for framework Foundation... " >&6; }
-if ${ac_cv_framework_Foundation+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-               ac_check_framework_save_LIBS=$LIBS
-               LIBS="-framework Foundation  $LIBS"
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-                #include <Foundation/NSObject.h>
 
-int
-main ()
-{
-[[NSObject alloc] init];
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_objcxx_try_link "$LINENO"; then :
 
-                       ac_cv_framework_Foundation=yes
 
-else
-  ac_cv_framework_Foundation=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-               LIBS=$ac_check_framework_save_LIBS
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_Foundation" >&5
-$as_echo "$ac_cv_framework_Foundation" >&6; }
-       if test $ac_cv_framework_Foundation = yes; then :
 
 
-  for element in "-framework Foundation $LIBS"; do
-    haveit=
-    for x in $LIBS; do
+    use_additional=yes
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
   acl_save_exec_prefix="$exec_prefix"
   exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
-    fi
-  done
-
-               cat >>confdefs.h <<_ACEOF
-#define HAVE_FRAMEWORK_FOUNDATION 1
-_ACEOF
-
-
-fi
 
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
 
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework WebKit" >&5
-$as_echo_n "checking for framework WebKit... " >&6; }
-if ${ac_cv_framework_WebKit+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-               ac_check_framework_save_LIBS=$LIBS
-               LIBS="-framework WebKit  $LIBS"
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+# Check whether --with-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then :
+  withval=$with_libiconv_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
 
-                #include <WebKit/WebScriptObject.h>
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
 
-int
-main ()
-{
-[[WebScriptObject alloc] init];
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_objcxx_try_link "$LINENO"; then :
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
 
-                       ac_cv_framework_WebKit=yes
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
-else
-  ac_cv_framework_WebKit=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-               LIBS=$ac_check_framework_save_LIBS
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
+      fi
+    fi
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_framework_WebKit" >&5
-$as_echo "$ac_cv_framework_WebKit" >&6; }
-       if test $ac_cv_framework_WebKit = yes; then :
 
-
-  for element in "-framework WebKit $LIBS"; do
-    haveit=
-    for x in $LIBS; do
+      LIBICONV=
+  LTLIBICONV=
+  INCICONV=
+  LIBICONV_PREFIX=
+      HAVE_LIBICONV=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='iconv '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+                                    if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+                        if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBICONV; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -19753,77 +19431,90 @@ $as_echo "$ac_cv_framework_WebKit" >&6; }
   exec_prefix="$acl_save_exec_prefix"
   prefix="$acl_save_prefix"
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
-    fi
-  done
-
-               cat >>confdefs.h <<_ACEOF
-#define HAVE_FRAMEWORK_WEBKIT 1
-_ACEOF
-
-
-fi
-
-
-else
-
-
-            for ac_prog in gnustep-config
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_GNUSTEP_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$GNUSTEP_CONFIG"; then
-  ac_cv_prog_GNUSTEP_CONFIG="$GNUSTEP_CONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_GNUSTEP_CONFIG="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-GNUSTEP_CONFIG=$ac_cv_prog_GNUSTEP_CONFIG
-if test -n "$GNUSTEP_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUSTEP_CONFIG" >&5
-$as_echo "$GNUSTEP_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$GNUSTEP_CONFIG" && break
-done
-
-
-            if test "x$GNUSTEP_CONFIG" != x; then :
-
-
-
-  for element in `$GNUSTEP_CONFIG --objc-flags`; do
-    haveit=
-    for x in $OBJCXXFLAGS; do
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$acl_hardcode_direct" = yes; then
+                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBICONV; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
@@ -19833,20 +19524,105 @@ done
   exec_prefix="$acl_save_exec_prefix"
   prefix="$acl_save_prefix"
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      OBJCXXFLAGS="${OBJCXXFLAGS}${OBJCXXFLAGS:+ }$element"
-    fi
-  done
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+              else
+                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = 'iconv'; then
+                  LIBICONV_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = 'iconv'; then
+                  LIBICONV_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCICONV; do
 
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
-  for element in `$GNUSTEP_CONFIG --base-libs`; do
-    haveit=
-    for x in $LIBS; do
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBICONV; do
 
   acl_save_prefix="$prefix"
   prefix="$acl_final_prefix"
   exec_prefix="$acl_save_exec_prefix"
   prefix="$acl_save_prefix"
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+          fi
+        fi
+      fi
     done
-    if test -z "$haveit"; then
-      LIBS="${LIBS}${LIBS:+ }$element"
-    fi
   done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+    done
+  fi
 
 
-else
-  CY_OBJECTIVEC=0
 
-fi
 
-fi
 
-fi
 
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
- ;; #(
-  *) :
-     ;;
-esac
 
- if test "x$CY_OBJECTIVEC" = x1; then
-  CY_OBJECTIVEC_TRUE=
-  CY_OBJECTIVEC_FALSE='#'
-else
-  CY_OBJECTIVEC_TRUE='#'
-  CY_OBJECTIVEC_FALSE=
-fi
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a readline compatible library" >&5
-$as_echo_n "checking for a readline compatible library... " >&6; }
-if ${ax_cv_lib_readline+:} false; then :
+
+          am_save_CPPFLAGS="$CPPFLAGS"
+
+  for element in $INCICONV; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if ${am_cv_func_iconv+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-    ORIG_LIBS="$LIBS"
-    for readline_lib in readline edit editline; do
-      for termcap_lib in "" termcap curses ncurses; do
-        if test -z "$termcap_lib"; then
-          TRY_LIB="-l$readline_lib"
-        else
-          TRY_LIB="-l$readline_lib -l$termcap_lib"
-        fi
-        LIBS="$ORIG_LIBS $TRY_LIB"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char readline ();
+#include <stdlib.h>
+#include <iconv.h>
+
 int
 main ()
 {
-return readline ();
+iconv_t cd = iconv_open("","");
+           iconv(cd,NULL,NULL,NULL,NULL);
+           iconv_close(cd);
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ax_cv_lib_readline="$TRY_LIB"
+if ac_fn_c_try_link "$LINENO"; then :
+  am_cv_func_iconv=yes
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-        if test -n "$ax_cv_lib_readline"; then
-          break
-        fi
-      done
-      if test -n "$ax_cv_lib_readline"; then
-        break
-      fi
-    done
-    if test -z "$ax_cv_lib_readline"; then
-      ax_cv_lib_readline="no"
-    fi
-    LIBS="$ORIG_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lib_readline" >&5
-$as_echo "$ax_cv_lib_readline" >&6; }
-
-  if test "$ax_cv_lib_readline" != "no"; then
-    LIBS="$LIBS $ax_cv_lib_readline"
-
-$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
-
-    for ac_header in readline.h readline/readline.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
-$as_echo_n "checking whether readline supports history... " >&6; }
-if ${ax_cv_lib_readline_history+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-      ax_cv_lib_readline_history="no"
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char add_history ();
+#include <stdlib.h>
+#include <iconv.h>
+
 int
 main ()
 {
-return add_history ();
+iconv_t cd = iconv_open("","");
+             iconv(cd,NULL,NULL,NULL,NULL);
+             iconv_close(cd);
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ax_cv_lib_readline_history="yes"
+if ac_fn_c_try_link "$LINENO"; then :
+  am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lib_readline_history" >&5
-$as_echo "$ax_cv_lib_readline_history" >&6; }
-    if test "$ax_cv_lib_readline_history" = "yes"; then
-
-$as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
-
-      for ac_header in history.h readline/history.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-    fi
-  fi
-
-case $vl_cv_lib_readline in #(
-  no) :
-    as_fn_error $? "missing \"libreadline\"" "$LINENO" 5 ;; #(
-  *) :
-     ;;
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cur_term" >&5
-$as_echo_n "checking for library containing cur_term... " >&6; }
-if ${ac_cv_search_cur_term+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cur_term ();
-int
-main ()
-{
-return cur_term ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' termcap; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_search_cur_term=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_cur_term+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_cur_term+:} false; then :
-
-else
-  ac_cv_search_cur_term=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cur_term" >&5
-$as_echo "$ac_cv_search_cur_term" >&6; }
-ac_res=$ac_cv_search_cur_term
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-      if test "X$prefix" = "XNONE"; then
-    acl_final_prefix="$ac_default_prefix"
-  else
-    acl_final_prefix="$prefix"
-  fi
-  if test "X$exec_prefix" = "XNONE"; then
-    acl_final_exec_prefix='${prefix}'
-  else
-    acl_final_exec_prefix="$exec_prefix"
-  fi
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
-  prefix="$acl_save_prefix"
-
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi
-
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
-  # contains only /bin. Note that ksh looks also at the FPATH variable,
-  # so we have to set that as well for the test.
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
-    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
-           || PATH_SEPARATOR=';'
-       }
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [\\/]* | ?:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
-      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
-        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if ${acl_cv_path_LD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$LD"; then
-  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$acl_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      acl_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-        test "$with_gnu_ld" != no && break
-        ;;
-      *)
-        test "$with_gnu_ld" != yes && break
-        ;;
-      esac
+      LIBS="$am_save_LIBS"
     fi
-  done
-  IFS="$acl_save_ifs"
-else
-  acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
 
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 fi
-test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${acl_cv_prog_gnu_ld+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+  if test "$am_cv_func_iconv" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+$as_echo_n "checking for working iconv... " >&6; }
+if ${am_cv_func_iconv_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes
-  ;;
-*)
-  acl_cv_prog_gnu_ld=no
-  ;;
-esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
-$as_echo "$acl_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$acl_cv_prog_gnu_ld
-
 
+                  am_save_LIBS="$LIBS"
+      if test $am_cv_lib_iconv = yes; then
+        LIBS="$LIBS $LIBICONV"
+      fi
+      if test "$cross_compiling" = yes; then :
 
+         case "$host_os" in
+           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+           *)            am_cv_func_iconv_works="guessing yes" ;;
+         esac
 
-                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
-$as_echo_n "checking for shared library run path origin... " >&6; }
-if ${acl_cv_rpath+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
-    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
-    . ./conftest.sh
-    rm -f ./conftest.sh
-    acl_cv_rpath=done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
-$as_echo "$acl_cv_rpath" >&6; }
-  wl="$acl_cv_wl"
-  acl_libext="$acl_cv_libext"
-  acl_shlibext="$acl_cv_shlibext"
-  acl_libname_spec="$acl_cv_libname_spec"
-  acl_library_names_spec="$acl_cv_library_names_spec"
-  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-  acl_hardcode_direct="$acl_cv_hardcode_direct"
-  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
-    # Check whether --enable-rpath was given.
-if test "${enable_rpath+set}" = set; then :
-  enableval=$enable_rpath; :
-else
-  enable_rpath=yes
-fi
-
-
-
-
-  acl_libdirstem=lib
-  acl_libdirstem2=
-  case "$host_os" in
-    solaris*)
-                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
-$as_echo_n "checking for 64-bit host... " >&6; }
-if ${gl_cv_solaris_64bit+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef _LP64
-sixtyfour bits
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
-  gl_cv_solaris_64bit=yes
-else
-  gl_cv_solaris_64bit=no
-fi
-rm -f conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
-$as_echo "$gl_cv_solaris_64bit" >&6; }
-      if test $gl_cv_solaris_64bit = yes; then
-        acl_libdirstem=lib/64
-        case "$host_cpu" in
-          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
-          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
-        esac
-      fi
-      ;;
-    *)
-      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
-      if test -n "$searchpath"; then
-        acl_save_IFS="${IFS=   }"; IFS=":"
-        for searchdir in $searchpath; do
-          if test -d "$searchdir"; then
-            case "$searchdir" in
-              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
-              */../ | */.. )
-                # Better ignore directories of this form. They are misleading.
-                ;;
-              *) searchdir=`cd "$searchdir" && pwd`
-                 case "$searchdir" in
-                   */lib64 ) acl_libdirstem=lib64 ;;
-                 esac ;;
-            esac
-          fi
-        done
-        IFS="$acl_save_IFS"
-      fi
-      ;;
-  esac
-  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
-
-
-
-
-
-
-
-
-
-
-
-
-    use_additional=yes
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-
-# Check whether --with-libiconv-prefix was given.
-if test "${with_libiconv_prefix+set}" = set; then :
-  withval=$with_libiconv_prefix;
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-        if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && ! test -d "$withval/$acl_libdirstem"; then
-          additional_libdir="$withval/$acl_libdirstem2"
-        fi
-      fi
-    fi
-
-fi
-
-      LIBICONV=
-  LTLIBICONV=
-  INCICONV=
-  LIBICONV_PREFIX=
-      HAVE_LIBICONV=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='iconv '
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
-          else
-                                    :
-          fi
-        else
-                              found_dir=
-          found_la=
-          found_so=
-          found_a=
-          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
-          if test -n "$acl_shlibext"; then
-            shrext=".$acl_shlibext"             # typically: shrext=.so
-          else
-            shrext=
-          fi
-          if test $use_additional = yes; then
-            dir="$additional_libdir"
-                                    if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
-                  fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
-                      found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
-                    fi
-                  done
-                fi
-              fi
-            fi
-                        if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIBICONV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                                    if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
-                      found_dir="$dir"
-                      found_so="$dir/$libname$shrext"
-                    else
-                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                        ver=`(cd "$dir" && \
-                              for f in "$libname$shrext".*; do echo "$f"; done \
-                              | sed -e "s,^$libname$shrext\\\\.,," \
-                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                              | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                          found_dir="$dir"
-                          found_so="$dir/$libname$shrext.$ver"
-                        fi
-                      else
-                        eval library_names=\"$acl_library_names_spec\"
-                        for f in $library_names; do
-                          if test -f "$dir/$f"; then
-                            found_dir="$dir"
-                            found_so="$dir/$f"
-                            break
-                          fi
-                        done
-                      fi
-                    fi
-                  fi
-                                    if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/$libname.$acl_libext"
-                    fi
-                  fi
-                  if test "X$found_dir" != "X"; then
-                    if test -f "$dir/$libname.la"; then
-                      found_la="$dir/$libname.la"
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-                                                        if test "$enable_rpath" = no \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
-                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
-              else
-                                                                                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                                if test "$acl_hardcode_direct" = yes; then
-                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
-                else
-                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
-                                                            haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                                                                                haveit=
-                    for x in $LDFLAGS $LIBICONV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
-                    fi
-                    if test "$acl_hardcode_minus_L" != no; then
-                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
-                    else
-                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
-              else
-                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
-              fi
-            fi
-                        additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                if test "$name" = 'iconv'; then
-                  LIBICONV_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-              */$acl_libdirstem2 | */$acl_libdirstem2/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
-                if test "$name" = 'iconv'; then
-                  LIBICONV_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INCICONV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                    if test "X$x" = "X-I$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-                        if test -n "$found_la"; then
-                                                        save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-                            for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
-                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
-                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIBICONV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIBICONV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                                                                  haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                                                                  haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
-                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
-            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$acl_hardcode_libdir_separator"; then
-                        alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
-      done
-            acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$acl_hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
-    else
-            for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$acl_hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-            for found_dir in $ltrpathdirs; do
-      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
-    done
-  fi
-
-
-
-
-
-
-
-
-
-
-
-
-          am_save_CPPFLAGS="$CPPFLAGS"
-
-  for element in $INCICONV; do
-    haveit=
-    for x in $CPPFLAGS; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
-    fi
-  done
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
-$as_echo_n "checking for iconv... " >&6; }
-if ${am_cv_func_iconv+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-    am_cv_func_iconv="no, consider installing GNU libiconv"
-    am_cv_lib_iconv=no
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <iconv.h>
-
-int
-main ()
-{
-iconv_t cd = iconv_open("","");
-           iconv(cd,NULL,NULL,NULL,NULL);
-           iconv_close(cd);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  am_cv_func_iconv=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    if test "$am_cv_func_iconv" != yes; then
-      am_save_LIBS="$LIBS"
-      LIBS="$LIBS $LIBICONV"
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <iconv.h>
-
-int
-main ()
-{
-iconv_t cd = iconv_open("","");
-             iconv(cd,NULL,NULL,NULL,NULL);
-             iconv_close(cd);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  am_cv_lib_iconv=yes
-        am_cv_func_iconv=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-      LIBS="$am_save_LIBS"
-    fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
-$as_echo "$am_cv_func_iconv" >&6; }
-  if test "$am_cv_func_iconv" = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
-$as_echo_n "checking for working iconv... " >&6; }
-if ${am_cv_func_iconv_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-                  am_save_LIBS="$LIBS"
-      if test $am_cv_lib_iconv = yes; then
-        LIBS="$LIBS $LIBICONV"
-      fi
-      if test "$cross_compiling" = yes; then :
-
-         case "$host_os" in
-           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
-           *)            am_cv_func_iconv_works="guessing yes" ;;
-         esac
-
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <iconv.h>
-#include <string.h>
-int main ()
-{
-  int result = 0;
-  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
-     returns.  */
-  {
-    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
-    if (cd_utf8_to_88591 != (iconv_t)(-1))
-      {
-        static const char input[] = "\342\202\254"; /* EURO SIGN */
-        char buf[10];
-        const char *inptr = input;
-        size_t inbytesleft = strlen (input);
-        char *outptr = buf;
-        size_t outbytesleft = sizeof (buf);
-        size_t res = iconv (cd_utf8_to_88591,
-                            (char **) &inptr, &inbytesleft,
-                            &outptr, &outbytesleft);
-        if (res == 0)
-          result |= 1;
-        iconv_close (cd_utf8_to_88591);
-      }
-  }
-  /* Test against Solaris 10 bug: Failures are not distinguishable from
-     successful returns.  */
-  {
-    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
-    if (cd_ascii_to_88591 != (iconv_t)(-1))
-      {
-        static const char input[] = "\263";
-        char buf[10];
-        const char *inptr = input;
-        size_t inbytesleft = strlen (input);
-        char *outptr = buf;
-        size_t outbytesleft = sizeof (buf);
-        size_t res = iconv (cd_ascii_to_88591,
-                            (char **) &inptr, &inbytesleft,
-                            &outptr, &outbytesleft);
-        if (res == 0)
-          result |= 2;
-        iconv_close (cd_ascii_to_88591);
-      }
-  }
-  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
-  {
-    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
-    if (cd_88591_to_utf8 != (iconv_t)(-1))
-      {
-        static const char input[] = "\304";
-        static char buf[2] = { (char)0xDE, (char)0xAD };
-        const char *inptr = input;
-        size_t inbytesleft = 1;
-        char *outptr = buf;
-        size_t outbytesleft = 1;
-        size_t res = iconv (cd_88591_to_utf8,
-                            (char **) &inptr, &inbytesleft,
-                            &outptr, &outbytesleft);
-        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
-          result |= 4;
-        iconv_close (cd_88591_to_utf8);
-      }
-  }
-#if 0 /* This bug could be worked around by the caller.  */
-  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
-  {
-    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
-    if (cd_88591_to_utf8 != (iconv_t)(-1))
-      {
-        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
-        char buf[50];
-        const char *inptr = input;
-        size_t inbytesleft = strlen (input);
-        char *outptr = buf;
-        size_t outbytesleft = sizeof (buf);
-        size_t res = iconv (cd_88591_to_utf8,
-                            (char **) &inptr, &inbytesleft,
-                            &outptr, &outbytesleft);
-        if ((int)res > 0)
-          result |= 8;
-        iconv_close (cd_88591_to_utf8);
-      }
-  }
-#endif
-  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
-     provided.  */
-  if (/* Try standardized names.  */
-      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
-      /* Try IRIX, OSF/1 names.  */
-      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
-      /* Try AIX names.  */
-      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
-      /* Try HP-UX names.  */
-      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
-    result |= 16;
-  return result;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  am_cv_func_iconv_works=yes
-else
-  am_cv_func_iconv_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-      LIBS="$am_save_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
-$as_echo "$am_cv_func_iconv_works" >&6; }
-    case "$am_cv_func_iconv_works" in
-      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
-      *)   am_func_iconv=yes ;;
-    esac
-  else
-    am_func_iconv=no am_cv_lib_iconv=no
-  fi
-  if test "$am_func_iconv" = yes; then
-
-$as_echo "#define HAVE_ICONV 1" >>confdefs.h
-
-  fi
-  if test "$am_cv_lib_iconv" = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
-$as_echo_n "checking how to link with libiconv... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
-$as_echo "$LIBICONV" >&6; }
-  else
-            CPPFLAGS="$am_save_CPPFLAGS"
-    LIBICONV=
-    LTLIBICONV=
-  fi
-
-
-
-  if test "$am_cv_func_iconv" = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
-$as_echo_n "checking for iconv declaration... " >&6; }
-    if ${am_cv_proto_iconv+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <iconv.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
-size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
-#endif
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  am_cv_proto_iconv_arg1=""
-else
-  am_cv_proto_iconv_arg1="const"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
-fi
-
-    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result:
-         $am_cv_proto_iconv" >&5
-$as_echo "
-         $am_cv_proto_iconv" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define ICONV_CONST $am_cv_proto_iconv_arg1
-_ACEOF
-
-
-  fi
-
-case $am_cv_func_iconv in #(
-  yes) :
-     ;; #(
-  *) :
-
-    for cy_iconv_prefix_arg in $CFLAGS $CXXFLAGS $OBJCXXFLAGS $LDFLAGS $LIBS; do
-        case $cy_iconv_prefix_arg in #(
-  -I*) :
-
-
-  for element in `echo $cy_iconv_prefix_arg | sed -e 's/^-I//;s|/include$||'`; do
-    haveit=
-    for x in $cy_iconv_prefixes; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      cy_iconv_prefixes="${cy_iconv_prefixes}${cy_iconv_prefixes:+ }$element"
-    fi
-  done
-
-         ;; #(
-  -L*) :
-
-
-  for element in `echo $cy_iconv_prefix_arg | sed -e 's/^-L//;s|/lib$||'`; do
-    haveit=
-    for x in $cy_iconv_prefixes; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      cy_iconv_prefixes="${cy_iconv_prefixes}${cy_iconv_prefixes:+ }$element"
-    fi
-  done
-
-         ;; #(
-  *) :
-     ;;
-esac
-    done
-    for with_libiconv_prefix in $cy_iconv_prefixes; do
-        { am_cv_func_iconv=; unset am_cv_func_iconv;}
-
-
-
-
-
-
-
-
-
-
-
-    use_additional=yes
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-
-# Check whether --with-libiconv-prefix was given.
-if test "${with_libiconv_prefix+set}" = set; then :
-  withval=$with_libiconv_prefix;
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-        if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && ! test -d "$withval/$acl_libdirstem"; then
-          additional_libdir="$withval/$acl_libdirstem2"
-        fi
-      fi
-    fi
-
-fi
-
-      LIBICONV=
-  LTLIBICONV=
-  INCICONV=
-  LIBICONV_PREFIX=
-      HAVE_LIBICONV=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='iconv '
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
-          else
-                                    :
-          fi
-        else
-                              found_dir=
-          found_la=
-          found_so=
-          found_a=
-          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
-          if test -n "$acl_shlibext"; then
-            shrext=".$acl_shlibext"             # typically: shrext=.so
-          else
-            shrext=
-          fi
-          if test $use_additional = yes; then
-            dir="$additional_libdir"
-                                    if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
-                  fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
-                      found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
-                    fi
-                  done
-                fi
-              fi
-            fi
-                        if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIBICONV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                                    if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
-                      found_dir="$dir"
-                      found_so="$dir/$libname$shrext"
-                    else
-                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                        ver=`(cd "$dir" && \
-                              for f in "$libname$shrext".*; do echo "$f"; done \
-                              | sed -e "s,^$libname$shrext\\\\.,," \
-                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                              | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                          found_dir="$dir"
-                          found_so="$dir/$libname$shrext.$ver"
-                        fi
-                      else
-                        eval library_names=\"$acl_library_names_spec\"
-                        for f in $library_names; do
-                          if test -f "$dir/$f"; then
-                            found_dir="$dir"
-                            found_so="$dir/$f"
-                            break
-                          fi
-                        done
-                      fi
-                    fi
-                  fi
-                                    if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/$libname.$acl_libext"
-                    fi
-                  fi
-                  if test "X$found_dir" != "X"; then
-                    if test -f "$dir/$libname.la"; then
-                      found_la="$dir/$libname.la"
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-                                                        if test "$enable_rpath" = no \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
-                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
-              else
-                                                                                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                                if test "$acl_hardcode_direct" = yes; then
-                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
-                else
-                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
-                                                            haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                                                                                haveit=
-                    for x in $LDFLAGS $LIBICONV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
-                    fi
-                    if test "$acl_hardcode_minus_L" != no; then
-                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
-                    else
-                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
-              else
-                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
-              fi
-            fi
-                        additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                if test "$name" = 'iconv'; then
-                  LIBICONV_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-              */$acl_libdirstem2 | */$acl_libdirstem2/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
-                if test "$name" = 'iconv'; then
-                  LIBICONV_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INCICONV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                    if test "X$x" = "X-I$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-                        if test -n "$found_la"; then
-                                                        save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-                            for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
-                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
-                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIBICONV; do
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+  int result = 0;
+  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+     returns.  */
+  {
+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+    if (cd_utf8_to_88591 != (iconv_t)(-1))
+      {
+        static const char input[] = "\342\202\254"; /* EURO SIGN */
+        char buf[10];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_utf8_to_88591,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          result |= 1;
+        iconv_close (cd_utf8_to_88591);
+      }
+  }
+  /* Test against Solaris 10 bug: Failures are not distinguishable from
+     successful returns.  */
+  {
+    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+    if (cd_ascii_to_88591 != (iconv_t)(-1))
+      {
+        static const char input[] = "\263";
+        char buf[10];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_ascii_to_88591,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          result |= 2;
+        iconv_close (cd_ascii_to_88591);
+      }
+  }
+  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static const char input[] = "\304";
+        static char buf[2] = { (char)0xDE, (char)0xAD };
+        const char *inptr = input;
+        size_t inbytesleft = 1;
+        char *outptr = buf;
+        size_t outbytesleft = 1;
+        size_t res = iconv (cd_88591_to_utf8,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
+          result |= 4;
+        iconv_close (cd_88591_to_utf8);
+      }
+  }
+#if 0 /* This bug could be worked around by the caller.  */
+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+        char buf[50];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_88591_to_utf8,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if ((int)res > 0)
+          result |= 8;
+        iconv_close (cd_88591_to_utf8);
+      }
+  }
+#endif
+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+     provided.  */
+  if (/* Try standardized names.  */
+      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+      /* Try IRIX, OSF/1 names.  */
+      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+      /* Try AIX names.  */
+      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+      /* Try HP-UX names.  */
+      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+    result |= 16;
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  am_cv_func_iconv_works=yes
+else
+  am_cv_func_iconv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+      LIBS="$am_save_LIBS"
 
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIBICONV; do
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+$as_echo "$am_cv_func_iconv_works" >&6; }
+    case "$am_cv_func_iconv_works" in
+      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+      *)   am_func_iconv=yes ;;
+    esac
+  else
+    am_func_iconv=no am_cv_lib_iconv=no
+  fi
+  if test "$am_func_iconv" = yes; then
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+$as_echo "#define HAVE_ICONV 1" >>confdefs.h
 
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                                                                  haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                                                                  haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
-                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
-            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$acl_hardcode_libdir_separator"; then
-                        alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
-      done
-            acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$acl_hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
-    else
-            for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$acl_hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
-      done
-    fi
   fi
-  if test "X$ltrpathdirs" != "X"; then
-            for found_dir in $ltrpathdirs; do
-      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
-    done
+  if test "$am_cv_lib_iconv" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+  else
+            CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
   fi
 
 
 
+  if test "$am_cv_func_iconv" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
+$as_echo_n "checking for iconv declaration... " >&6; }
+    if ${am_cv_proto_iconv+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  am_cv_proto_iconv_arg1=""
+else
+  am_cv_proto_iconv_arg1="const"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+fi
 
+    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result:
+         $am_cv_proto_iconv" >&5
+$as_echo "
+         $am_cv_proto_iconv" >&6; }
 
+cat >>confdefs.h <<_ACEOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
+_ACEOF
 
 
+  fi
 
-    done
- ;;
-esac
 case $am_cv_func_iconv in #(
   yes) :
      ;; #(
@@ -21646,10 +20064,12 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 SO=$acl_shlibext
 
 
-ac_fn_cxx_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
+if test "x$CY_EXECUTE" = x1; then :
+
+    ac_fn_cxx_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
 if test "x$ac_cv_header_mach_mach_h" = xyes; then :
 
-    if test -n "$ac_tool_prefix"; then
+        if test -n "$ac_tool_prefix"; then
   for ac_prog in lipo
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
@@ -21749,7 +20169,7 @@ esac
   fi
 fi
 
-    if test -n "$ac_tool_prefix"; then
+        if test -n "$ac_tool_prefix"; then
   for ac_prog in nm
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
@@ -21849,7 +20269,7 @@ esac
   fi
 fi
 
-    if test -n "$ac_tool_prefix"; then
+        if test -n "$ac_tool_prefix"; then
   for ac_prog in otool
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
@@ -21949,15 +20369,14 @@ esac
   fi
 fi
 
-    CY_MACH=1
-
-    CY_ATTACH_GROUP=procmod
+        CY_ATTACH_GROUP=procmod
 
+        CY_MACH=1
 
 fi
 
 
-
+fi
  if test "x$CY_MACH" = x1; then
   CY_MACH_TRUE=
   CY_MACH_FALSE='#'