]> git.saurik.com Git - cycript.git/blobdiff - configure
Detect jni.h and link Android build against Dalvik.
[cycript.git] / configure
index ddf785ad97467557d5bc2bf690392e8cb55ba891..3a88c75e283e1c143d76b1563faf5e4f3717f025 100755 (executable)
--- a/configure
+++ b/configure
@@ -650,19 +650,23 @@ ac_ct__LIPO
 _LIPO
 SO
 LTFLAGS
+LTLIBGCC
 LTLIBTERMCAP
 LTLIBREADLINE
 CY_OBJECTIVEC_FALSE
 CY_OBJECTIVEC_TRUE
+CY_JAVA_FALSE
+CY_JAVA_TRUE
 LTOBJECTIVEC
 GNUSTEP_CONFIG
 CY_OBJECTIVEC
+LTJAVA
+CY_JAVA
 LTLIBFFI
 LIBFFI_LIBS
 LIBFFI_CFLAGS
 CY_EXECUTE_FALSE
 CY_EXECUTE_TRUE
-LTLIBAPR
 CY_CONSOLE_FALSE
 CY_CONSOLE_TRUE
 LTJAVASCRIPTCORE
@@ -823,7 +827,6 @@ with_sysroot
 enable_libtool_lock
 enable_javascript
 enable_console
-with_apr
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1498,8 +1501,6 @@ Optional Packages:
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-sysroot=DIR Search for dependent libraries within DIR
                         (or the compiler's sysroot if not specified).
-  --with-apr=PATH         prefix for installed APR or the full path to
-                             apr-config
 
 Some influential environment variables:
   CC          C compiler command
@@ -5907,7 +5908,7 @@ else
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
   fi
-  rm -f conftest*
+  rm -rf conftest*
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
 $as_echo "$lt_cv_nm_interface" >&6; }
@@ -7273,7 +7274,7 @@ for ac_symprfx in "" "_"; do
   # Check to see that the pipe works correctly.
   pipe_works=no
 
-  rm -f conftest*
+  rm -rf conftest*
   cat > conftest.$ac_ext <<_LT_EOF
 #ifdef __cplusplus
 extern "C" {
@@ -7789,7 +7790,7 @@ else
   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
     lt_cv_path_mainfest_tool=yes
   fi
-  rm -f conftest*
+  rm -rf conftest*
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
@@ -9174,7 +9175,7 @@ ac_outfile=conftest.$ac_objext
 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 _lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
+$RM -r conftest*
 
 ac_outfile=conftest.$ac_objext
 echo "$lt_simple_link_test_code" >conftest.$ac_ext
@@ -9231,7 +9232,7 @@ else
        lt_cv_prog_compiler_rtti_exceptions=yes
      fi
    fi
-   $RM conftest*
+   $RM -r conftest*
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
@@ -9608,7 +9609,7 @@ else
        lt_cv_prog_compiler_pic_works=yes
      fi
    fi
-   $RM conftest*
+   $RM -r conftest*
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
@@ -9720,14 +9721,14 @@ else
      fi
    fi
    chmod u+w . 2>&5
-   $RM conftest*
+   $RM -r conftest*
    # SGI C++ compiler will create directory out/ii_files/ for
    # template instantiation
    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
    $RM out/* && rmdir out
    cd ..
    $RM -r conftest
-   $RM conftest*
+   $RM -r conftest*
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
@@ -9775,14 +9776,14 @@ else
      fi
    fi
    chmod u+w . 2>&5
-   $RM conftest*
+   $RM -r conftest*
    # SGI C++ compiler will create directory out/ii_files/ for
    # template instantiation
    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
    $RM out/* && rmdir out
    cd ..
    $RM -r conftest
-   $RM conftest*
+   $RM -r conftest*
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
@@ -9797,7 +9798,7 @@ if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
 $as_echo_n "checking if we can lock with hard links... " >&6; }
   hard_links=yes
-  $RM conftest*
+  $RM -r conftest*
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   touch conftest.a
   ln conftest.a conftest.b 2>&5 || hard_links=no
@@ -11013,7 +11014,7 @@ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
 if ${lt_cv_archive_cmds_need_lc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  $RM conftest*
+  $RM -r conftest*
        echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -11048,7 +11049,7 @@ else
        else
          cat conftest.err 1>&5
        fi
-       $RM conftest*
+       $RM -r conftest*
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
@@ -12914,7 +12915,7 @@ compiler=$CC
 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 _lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
+$RM -r conftest*
 
   ac_outfile=conftest.$ac_objext
 echo "$lt_simple_link_test_code" >conftest.$ac_ext
@@ -14736,7 +14737,7 @@ else
        lt_cv_prog_compiler_pic_works_CXX=yes
      fi
    fi
-   $RM conftest*
+   $RM -r conftest*
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
@@ -14839,14 +14840,14 @@ else
      fi
    fi
    chmod u+w . 2>&5
-   $RM conftest*
+   $RM -r conftest*
    # SGI C++ compiler will create directory out/ii_files/ for
    # template instantiation
    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
    $RM out/* && rmdir out
    cd ..
    $RM -r conftest
-   $RM conftest*
+   $RM -r conftest*
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
@@ -14891,14 +14892,14 @@ else
      fi
    fi
    chmod u+w . 2>&5
-   $RM conftest*
+   $RM -r conftest*
    # SGI C++ compiler will create directory out/ii_files/ for
    # template instantiation
    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
    $RM out/* && rmdir out
    cd ..
    $RM -r conftest
-   $RM conftest*
+   $RM -r conftest*
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
@@ -14913,7 +14914,7 @@ if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
 $as_echo_n "checking if we can lock with hard links... " >&6; }
   hard_links=yes
-  $RM conftest*
+  $RM -r conftest*
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   touch conftest.a
   ln conftest.a conftest.b 2>&5 || hard_links=no
@@ -15000,7 +15001,7 @@ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
 if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  $RM conftest*
+  $RM -r conftest*
        echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -15035,7 +15036,7 @@ else
        else
          cat conftest.err 1>&5
        fi
-       $RM conftest*
+       $RM -r conftest*
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
@@ -15928,7 +15929,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
 
-
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
        if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
@@ -18331,7 +18331,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
 
-for cy_arch in ppc ppc64 i386 x86_64 armv6; do
+for cy_arch in ppc ppc64 i386 x86_64 armv6 arm64; do
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -arch $cy_arch" >&5
 $as_echo_n "checking for -arch $cy_arch... " >&6; }
 
@@ -18430,6 +18430,64 @@ if test "${enable_javascript+set}" = set; then :
 
     cy_save=$LIBS
     LIBS=
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing JSEvaluateScript" >&5
+$as_echo_n "checking for library containing JSEvaluateScript... " >&6; }
+if ${ac_cv_search_JSEvaluateScript+:} 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 JSEvaluateScript ();
+int
+main ()
+{
+return JSEvaluateScript ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' JavaScriptCore; 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_JSEvaluateScript=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_JSEvaluateScript+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_JSEvaluateScript+:} false; then :
+
+else
+  ac_cv_search_JSEvaluateScript=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_JSEvaluateScript" >&5
+$as_echo "$ac_cv_search_JSEvaluateScript" >&6; }
+ac_res=$ac_cv_search_JSEvaluateScript
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+        CY_EXECUTE=1
+
+
+else
 
                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
 $as_echo_n "checking for framework JavaScriptCore... " >&6; }
@@ -18516,7 +18574,6 @@ if test -n "$WEBKIT_CFLAGS"; then
   $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`
-                     test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -18533,7 +18590,6 @@ if test -n "$WEBKIT_LIBS"; then
   $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`
-                     test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -18553,9 +18609,9 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$cy_webkit_pkg" 2>&1`
+               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$cy_webkit_pkg" 2>&1`
         else
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$cy_webkit_pkg" 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
@@ -18624,6 +18680,8 @@ fi; if test "x$CY_EXECUTE" = x1; then break; fi
         done
 
 fi
+fi
+
     LTJAVASCRIPTCORE=$LIBS
     LIBS=$cy_save
 
 
     cy_save=$LIBS
     LIBS=
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing JSEvaluateScript" >&5
+$as_echo_n "checking for library containing JSEvaluateScript... " >&6; }
+if ${ac_cv_search_JSEvaluateScript+:} 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 JSEvaluateScript ();
+int
+main ()
+{
+return JSEvaluateScript ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' JavaScriptCore; 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_JSEvaluateScript=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_JSEvaluateScript+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_JSEvaluateScript+:} false; then :
+
+else
+  ac_cv_search_JSEvaluateScript=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_JSEvaluateScript" >&5
+$as_echo "$ac_cv_search_JSEvaluateScript" >&6; }
+ac_res=$ac_cv_search_JSEvaluateScript
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+        CY_EXECUTE=1
+
+
+else
 
                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
 $as_echo_n "checking for framework JavaScriptCore... " >&6; }
@@ -18725,7 +18841,6 @@ if test -n "$WEBKIT_CFLAGS"; then
   $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`
-                     test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -18742,7 +18857,6 @@ if test -n "$WEBKIT_LIBS"; then
   $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`
-                     test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -18762,9 +18876,9 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$cy_webkit_pkg" 2>&1`
+               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$cy_webkit_pkg" 2>&1`
         else
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$cy_webkit_pkg" 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
@@ -18833,6 +18947,8 @@ fi; if test "x$CY_EXECUTE" = x1; then break; fi
         done
 
 fi
+fi
+
     LTJAVASCRIPTCORE=$LIBS
     LIBS=$cy_save
 
@@ -18848,6 +18964,64 @@ else
 
     cy_save=$LIBS
     LIBS=
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing JSEvaluateScript" >&5
+$as_echo_n "checking for library containing JSEvaluateScript... " >&6; }
+if ${ac_cv_search_JSEvaluateScript+:} 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 JSEvaluateScript ();
+int
+main ()
+{
+return JSEvaluateScript ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' JavaScriptCore; 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_JSEvaluateScript=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_JSEvaluateScript+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_JSEvaluateScript+:} false; then :
+
+else
+  ac_cv_search_JSEvaluateScript=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_JSEvaluateScript" >&5
+$as_echo "$ac_cv_search_JSEvaluateScript" >&6; }
+ac_res=$ac_cv_search_JSEvaluateScript
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+        CY_EXECUTE=1
+
+
+else
 
                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
 $as_echo_n "checking for framework JavaScriptCore... " >&6; }
@@ -18934,7 +19108,6 @@ if test -n "$WEBKIT_CFLAGS"; then
   $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`
-                     test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -18951,7 +19124,6 @@ if test -n "$WEBKIT_LIBS"; then
   $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`
-                     test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -18971,9 +19143,9 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$cy_webkit_pkg" 2>&1`
+               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$cy_webkit_pkg" 2>&1`
         else
-               WEBKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$cy_webkit_pkg" 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
@@ -19042,6 +19214,8 @@ fi; if test "x$CY_EXECUTE" = x1; then break; fi
         done
 
 fi
+fi
+
     LTJAVASCRIPTCORE=$LIBS
     LIBS=$cy_save
 
@@ -19064,181 +19238,6 @@ else
 fi
 
 
-if test -z "$CY_CONSOLE_TRUE"; then :
-
-if test "x$LTLIBAPR" != x; then :
-
-
-
-else
-
-
-  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"
-
-  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 APR" >&5
-$as_echo_n "checking for APR... " >&6; }
-
-# 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
-
-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
-        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: $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
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      LTLIBAPR="${LTLIBAPR}${LTLIBAPR:+ }$element"
-    fi
-  done
-
-
- ;; #(
-  *) :
-
-    as_fn_error $? "missing \"libapr\"" "$LINENO" 5
- ;;
-esac
-fi
-
-fi
-
 
 
  if test "x$CY_EXECUTE" = x1; then
@@ -19292,7 +19291,6 @@ if test -n "$LIBFFI_CFLAGS"; then
   $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`
-                     test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -19309,7 +19307,6 @@ if test -n "$LIBFFI_LIBS"; then
   $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`
-                     test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -19329,9 +19326,9 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libffi" 2>&1`
+               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
         else
-               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libffi" 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 "$LIBFFI_PKG_ERRORS" >&5
@@ -19472,7 +19469,6 @@ if test -n "$LIBFFI_CFLAGS"; then
   $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`
-                     test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -19489,7 +19485,6 @@ if test -n "$LIBFFI_LIBS"; then
   $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`
-                     test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
 fi
@@ -19509,9 +19504,9 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libffi" 2>&1`
+               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
         else
-               LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libffi" 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 "$LIBFFI_PKG_ERRORS" >&5
 
 
 
+    ac_fn_cxx_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default"
+if test "x$ac_cv_header_jni_h" = xyes; then :
+
+        CY_JAVA=1
+
+
+    cy_save=$LIBS
+    LIBS=
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing JNI_GetCreatedJavaVMs" >&5
+$as_echo_n "checking for library containing JNI_GetCreatedJavaVMs... " >&6; }
+if ${ac_cv_search_JNI_GetCreatedJavaVMs+:} 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 JNI_GetCreatedJavaVMs ();
+int
+main ()
+{
+return JNI_GetCreatedJavaVMs ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dvm; 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_JNI_GetCreatedJavaVMs=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_JNI_GetCreatedJavaVMs+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_JNI_GetCreatedJavaVMs+:} false; then :
+
+else
+  ac_cv_search_JNI_GetCreatedJavaVMs=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_JNI_GetCreatedJavaVMs" >&5
+$as_echo "$ac_cv_search_JNI_GetCreatedJavaVMs" >&6; }
+ac_res=$ac_cv_search_JNI_GetCreatedJavaVMs
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+
+fi
+
+    LTJAVA=$LIBS
+    LIBS=$cy_save
+
+
+
+else
+
+        CY_JAVA=0
+
+
+fi
+
+
+
     ac_ext=mm
 ac_cpp='$OBJCXXCPP $CPPFLAGS'
 ac_compile='$OBJCXX -c $OBJCXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -19869,6 +19943,14 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
      ;;
 esac
 
+ if test "x$CY_JAVA" = x1; then
+  CY_JAVA_TRUE=
+  CY_JAVA_FALSE='#'
+else
+  CY_JAVA_TRUE='#'
+  CY_JAVA_FALSE=
+fi
+
  if test "x$CY_OBJECTIVEC" = x1; then
   CY_OBJECTIVEC_TRUE=
   CY_OBJECTIVEC_FALSE='#'
@@ -20085,6 +20167,8 @@ fi
 
 
 
+
+
 SO=$acl_shlibext
 
 
@@ -20565,6 +20649,10 @@ if test -z "${CY_EXECUTE_TRUE}" && test -z "${CY_EXECUTE_FALSE}"; then
   as_fn_error $? "conditional \"CY_EXECUTE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${CY_JAVA_TRUE}" && test -z "${CY_JAVA_FALSE}"; then
+  as_fn_error $? "conditional \"CY_JAVA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${CY_OBJECTIVEC_TRUE}" && test -z "${CY_OBJECTIVEC_FALSE}"; then
   as_fn_error $? "conditional \"CY_OBJECTIVEC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5