]> git.saurik.com Git - cycript.git/blobdiff - configure
Prefer JSValueIsStrictEqual to compare prototypes.
[cycript.git] / configure
index b0f2ec2996464c324a677d12393692c1411021f5..f8c40e836fd3e21d912a809934f22e84f06ed0d4 100755 (executable)
--- a/configure
+++ b/configure
@@ -11,7 +11,7 @@
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 #
-# Copyright (C) 2009-2012  Jay Freeman (saurik)
+# Copyright (C) 2009-2014  Jay Freeman (saurik)
 ## -------------------- ##
 ## M4sh Initialization. ##
 ## -------------------- ##
@@ -655,9 +655,13 @@ 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
@@ -680,6 +684,7 @@ GIT
 PKG_CONFIG_LIBDIR
 PKG_CONFIG_PATH
 PKG_CONFIG
+HAVE_CXX11
 CXXCPP
 CPP
 OTOOL64
@@ -1601,7 +1606,7 @@ Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 
-Copyright (C) 2009-2012  Jay Freeman (saurik)
+Copyright (C) 2009-2014  Jay Freeman (saurik)
 _ACEOF
   exit
 fi
@@ -15919,6 +15924,146 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
+    ax_cxx_compile_cxx11_required=true
+  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
+  ac_success=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
+$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
+if ${ax_cv_cxx_compile_cxx11+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+    struct Base {
+    virtual void f() {}
+    };
+    struct Child : public Base {
+    virtual void f() override {}
+    };
+
+    typedef check<check<bool>> right_angle_brackets;
+
+    int a;
+    decltype(a) b;
+
+    typedef check<int> check_type;
+    check_type c;
+    check_type&& cr = static_cast<check_type&&>(c);
+
+    auto d = a;
+    auto l = [](){};
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ax_cv_cxx_compile_cxx11=yes
+else
+  ax_cv_cxx_compile_cxx11=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
+$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
+  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
+    ac_success=yes
+  fi
+
+    if test x$ac_success = xno; then
+    for switch in -std=gnu++11 -std=gnu++0x; do
+      cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
+if eval \${$cachevar+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_CXXFLAGS="$CXXFLAGS"
+         CXXFLAGS="$CXXFLAGS $switch"
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+    struct Base {
+    virtual void f() {}
+    };
+    struct Child : public Base {
+    virtual void f() override {}
+    };
+
+    typedef check<check<bool>> right_angle_brackets;
+
+    int a;
+    decltype(a) b;
+
+    typedef check<int> check_type;
+    check_type c;
+    check_type&& cr = static_cast<check_type&&>(c);
+
+    auto d = a;
+    auto l = [](){};
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval $cachevar=yes
+else
+  eval $cachevar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         CXXFLAGS="$ac_save_CXXFLAGS"
+fi
+eval ac_res=\$$cachevar
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+      if eval test x\$$cachevar = xyes; then
+        CXXFLAGS="$CXXFLAGS $switch"
+        ac_success=yes
+        break
+      fi
+    done
+  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
+
+  if test x$ax_cxx_compile_cxx11_required = xtrue; then
+    if test x$ac_success = xno; then
+      as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
+    fi
+  else
+    if test x$ac_success = xno; then
+      HAVE_CXX11=0
+      { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
+$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
+    else
+      HAVE_CXX11=1
+
+$as_echo "#define HAVE_CXX11 1" >>confdefs.h
+
+    fi
+
+
+  fi
+
+OBJCXXFLAGS="${OBJCXXFLAGS} ${CXXFLAGS##*' '}"
+
 
 
 
 
 
 
+    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'
@@ -19860,6 +20084,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='#'
@@ -20558,6 +20790,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