]> git.saurik.com Git - cycript.git/commitdiff
This seems to work a little better.
authorDouglas William Thrift <douglas@douglasthrift.net>
Fri, 2 Apr 2010 09:43:54 +0000 (09:43 +0000)
committerDouglas William Thrift <douglas@douglasthrift.net>
Fri, 2 Apr 2010 09:43:54 +0000 (09:43 +0000)
configure
configure.ac
framework.m4

index c3a72257138476cca7ed6fca657cb6bcf6b4c00c..2bf7d6be6e38a1223665c7824dbe3a3351ccbfa1 100755 (executable)
--- a/configure
+++ b/configure
@@ -806,8 +806,8 @@ ac_includes_default="\
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
 ifGNUmake
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
 ifGNUmake
-CY_OBJECTIVEC
 GNUSTEP_CONFIG
 GNUSTEP_CONFIG
+CY_OBJECTIVEC
 LIBFFI_LIBS
 LIBFFI_CFLAGS
 CY_EXECUTE
 LIBFFI_LIBS
 LIBFFI_CFLAGS
 CY_EXECUTE
@@ -2202,6 +2202,52 @@ fi
   as_fn_set_status $ac_retval
 
 } # ac_fn_objcxx_try_compile
   as_fn_set_status $ac_retval
 
 } # ac_fn_objcxx_try_compile
+
+# ac_fn_objcxx_try_link LINENO
+# ----------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_objcxx_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_objcxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_objcxx_try_link
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -4048,13 +4094,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:4051: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:4097: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4054: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:4100: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4057: output\"" >&5)
+  (eval echo "\"\$as_me:4103: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -5260,7 +5306,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5263 "configure"' > conftest.$ac_ext
+  echo '#line 5309 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -6785,11 +6831,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:6788: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:6834: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:6792: \$? = $ac_status" >&5
+   echo "$as_me:6838: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7124,11 +7170,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7127: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7173: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7131: \$? = $ac_status" >&5
+   echo "$as_me:7177: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7229,11 +7275,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7232: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7278: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7236: \$? = $ac_status" >&5
+   echo "$as_me:7282: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -7284,11 +7330,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7287: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7333: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7291: \$? = $ac_status" >&5
+   echo "$as_me:7337: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9668,7 +9714,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 9671 "configure"
+#line 9717 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9764,7 +9810,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 9767 "configure"
+#line 9813 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12512,11 +12558,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12515: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12561: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12519: \$? = $ac_status" >&5
+   echo "$as_me:12565: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -12611,11 +12657,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12614: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12660: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12618: \$? = $ac_status" >&5
+   echo "$as_me:12664: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -12663,11 +12709,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12666: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12712: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12670: \$? = $ac_status" >&5
+   echo "$as_me:12716: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-               for ac_header in JavaScriptCore/JSBase.h
-do :
-  ac_fn_cxx_check_header_mongrel "$LINENO" "JavaScriptCore/JSBase.h" "ac_cv_header_JavaScriptCore_JSBase_h" "$ac_includes_default"
-if test "x$ac_cv_header_JavaScriptCore_JSBase_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_JAVASCRIPTCORE_JSBASE_H 1
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
+$as_echo_n "checking for framework JavaScriptCore... " >&6; }
+if test "${ac_cv_framework_JavaScriptCore+set}" = set; 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
 _ACEOF
- CY_EXECUTE=1
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+                       ac_cv_framework_JavaScriptCore=yes
+
+else
+  ac_cv_framework_JavaScriptCore=no
 fi
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               LIBS=$ac_check_framework_save_LIBS
 
 
-done
+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
+    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
+
+fi
 
 elif test $pkg_failed = untried; then
 
 
 elif test $pkg_failed = untried; then
 
-               for ac_header in JavaScriptCore/JSBase.h
-do :
-  ac_fn_cxx_check_header_mongrel "$LINENO" "JavaScriptCore/JSBase.h" "ac_cv_header_JavaScriptCore_JSBase_h" "$ac_includes_default"
-if test "x$ac_cv_header_JavaScriptCore_JSBase_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_JAVASCRIPTCORE_JSBASE_H 1
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
+$as_echo_n "checking for framework JavaScriptCore... " >&6; }
+if test "${ac_cv_framework_JavaScriptCore+set}" = set; 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
 _ACEOF
- CY_EXECUTE=1
+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
 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 :
 
 
-done
 
 
+  for element in "-framework JavaScriptCore $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
+    done
+    if test -z "$haveit"; then
+      LIBS="${LIBS}${LIBS:+ }$element"
+    fi
+  done
+
+               CY_EXECUTE=1
+
+fi
 
 else
        WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
 
 else
        WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-               for ac_header in JavaScriptCore/JSBase.h
-do :
-  ac_fn_cxx_check_header_mongrel "$LINENO" "JavaScriptCore/JSBase.h" "ac_cv_header_JavaScriptCore_JSBase_h" "$ac_includes_default"
-if test "x$ac_cv_header_JavaScriptCore_JSBase_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_JAVASCRIPTCORE_JSBASE_H 1
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
+$as_echo_n "checking for framework JavaScriptCore... " >&6; }
+if test "${ac_cv_framework_JavaScriptCore+set}" = set; 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
 _ACEOF
- CY_EXECUTE=1
+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
 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 :
 
 
-done
 
 
+  for element in "-framework JavaScriptCore $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
+    done
+    if test -z "$haveit"; then
+      LIBS="${LIBS}${LIBS:+ }$element"
+    fi
+  done
+
+               CY_EXECUTE=1
+
+fi
 
 elif test $pkg_failed = untried; then
 
 
 elif test $pkg_failed = untried; then
 
-               for ac_header in JavaScriptCore/JSBase.h
-do :
-  ac_fn_cxx_check_header_mongrel "$LINENO" "JavaScriptCore/JSBase.h" "ac_cv_header_JavaScriptCore_JSBase_h" "$ac_includes_default"
-if test "x$ac_cv_header_JavaScriptCore_JSBase_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_JAVASCRIPTCORE_JSBASE_H 1
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework JavaScriptCore" >&5
+$as_echo_n "checking for framework JavaScriptCore... " >&6; }
+if test "${ac_cv_framework_JavaScriptCore+set}" = set; 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
 _ACEOF
- CY_EXECUTE=1
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+                       ac_cv_framework_JavaScriptCore=yes
+
+else
+  ac_cv_framework_JavaScriptCore=no
 fi
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+               LIBS=$ac_check_framework_save_LIBS
 
 
-done
+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
+    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
+
+fi
 
 else
        WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
 
 else
        WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS
@@ -16384,16 +16638,212 @@ else
 $as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 $as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       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$CY_OBJECTIVEC" = x1; then :
 
        if test "x$CY_OBJECTIVEC" = x1; then :
 
-               # TODO: Darwin
-               for ac_prog in gnustep-config
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework CoreFoundation" >&5
+$as_echo_n "checking for framework CoreFoundation... " >&6; }
+if test "${ac_cv_framework_CoreFoundation+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               ac_check_framework_save_LIBS=$LIBS
+               LIBS="-framework CoreFoundation  $LIBS"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+                       #include <CoreFoundation/CFBase.h>
+
+int
+main ()
+{
+CFAllocatorGetDefault();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_objcxx_try_link "$LINENO"; then :
+
+                       ac_cv_framework_CoreFoundation=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
+
+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 :
+
+
+  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
+    done
+    if test -z "$haveit"; then
+      LIBS="${LIBS}${LIBS:+ }$element"
+    fi
+  done
+
+
+
+
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework Foundation" >&5
+$as_echo_n "checking for framework Foundation... " >&6; }
+if test "${ac_cv_framework_Foundation+set}" = set; 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
+
+  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
+
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework WebKit" >&5
+$as_echo_n "checking for framework WebKit... " >&6; }
+if test "${ac_cv_framework_WebKit+set}" = set; 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.  */
+
+                               #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 "-framework WebKit $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
+    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
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -16435,7 +16885,7 @@ fi
   test -n "$GNUSTEP_CONFIG" && break
 done
 
   test -n "$GNUSTEP_CONFIG" && break
 done
 
-               if test "x$GNUSTEP_CONFIG" != x; then :
+                       if test "x$GNUSTEP_CONFIG" != x; then :
 
 
 
 
 
 
@@ -16485,9 +16935,20 @@ done
   done
 
 
   done
 
 
+else
+  CY_OBJECTIVEC=0
+
+fi
+
 fi
 
 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
+
  ;; #(
   *) :
 
  ;; #(
   *) :
 
index 452ab46b9f347065d2bf9cd7209724e81a59f996..ba646de74323dbe9fedeee5ab13afcd796a90386 100644 (file)
@@ -58,7 +58,9 @@ PKG_CHECK_MODULES([WEBKIT], [webkit-1.0], [
                AC_LIB_APPENDTOVAR([CXXFLAGS], [`$PKG_CONFIG --cflags WebKitGtk`])
                AC_LIB_APPENDTOVAR([LIBS], [`$PKG_CONFIG --libs WebKitGtk`])
        ], [
                AC_LIB_APPENDTOVAR([CXXFLAGS], [`$PKG_CONFIG --cflags WebKitGtk`])
                AC_LIB_APPENDTOVAR([LIBS], [`$PKG_CONFIG --libs WebKitGtk`])
        ], [
-               AC_CHECK_HEADERS([JavaScriptCore/JSBase.h], [CY_EXECUTE=1])
+               AC_CHECK_FRAMEWORK([JavaScriptCore], [
+                       #include <JavaScriptCore/JSBase.h>
+               ], [JSEvaluateScript(0, 0, 0, 0, 0, 0);], [CY_EXECUTE=1])
        ])
 ])
 AC_PROG_OBJCXX
        ])
 ])
 AC_PROG_OBJCXX
@@ -85,16 +87,27 @@ AS_CASE([$CY_EXECUTE], [1], [
                CY_OBJECTIVEC=1
                AC_MSG_RESULT([yes])
        ], [AC_MSG_RESULT([no])])
                CY_OBJECTIVEC=1
                AC_MSG_RESULT([yes])
        ], [AC_MSG_RESULT([no])])
-       AC_LANG_POP([Objective C++])
        AS_IF([test "x$CY_OBJECTIVEC" = x1], [
        AS_IF([test "x$CY_OBJECTIVEC" = x1], [
-               # TODO: Darwin
-               AC_CHECK_PROGS([GNUSTEP_CONFIG], [gnustep-config])
-               AS_IF([test "x$GNUSTEP_CONFIG" != x], [
+               AC_CHECK_FRAMEWORK([CoreFoundation], [
+                       #include <CoreFoundation/CFBase.h>
+               ], [CFAllocatorGetDefault();], [
                        AC_SUBST([CY_OBJECTIVEC])
                        AC_SUBST([CY_OBJECTIVEC])
-                       AC_LIB_APPENDTOVAR([OBJCXXFLAGS], [`$GNUSTEP_CONFIG --objc-flags`])
-                       AC_LIB_APPENDTOVAR([LIBS], [`$GNUSTEP_CONFIG --base-libs`])
+                       AC_CHECK_FRAMEWORK([Foundation], [
+                               #include <Foundation/NSObject.h>
+                       ], [[[[NSObject alloc] init];]])
+                       AC_CHECK_FRAMEWORK([WebKit], [
+                               #include <WebKit/WebScriptObject.h>
+                       ], [[[[WebScriptObject alloc] init];]])
+               ], [
+                       AC_CHECK_PROGS([GNUSTEP_CONFIG], [gnustep-config])
+                       AS_IF([test "x$GNUSTEP_CONFIG" != x], [
+                               AC_SUBST([CY_OBJECTIVEC])
+                               AC_LIB_APPENDTOVAR([OBJCXXFLAGS], [`$GNUSTEP_CONFIG --objc-flags`])
+                               AC_LIB_APPENDTOVAR([LIBS], [`$GNUSTEP_CONFIG --base-libs`])
+                       ], [AC_SUBST([CY_OBJECTIVEC], [0])])
                ])
        ])
                ])
        ])
+       AC_LANG_POP([Objective C++])
 ], [
        AC_MSG_WARN([No JavaScript engine!])
 ])
 ], [
        AC_MSG_WARN([No JavaScript engine!])
 ])
index ef7f375058a3e444d6c8ac8900376466b5c19c98..1de128fec9644b04fbe59d23110650b5d677ad49 100644 (file)
@@ -1,4 +1,4 @@
-# AC_CHECK_FRAMEWORK(FRAMEWORK, FUNCTION,
+# AC_CHECK_FRAMEWORK(FRAMEWORK, PROLOGUE, BODY,
 #              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
 #              [OTHER-LIBRARIES])
 # ------------------------------------------------------
 #              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
 #              [OTHER-LIBRARIES])
 # ------------------------------------------------------
@@ -8,7 +8,7 @@
 # just for framework $1.  Separate tests with the same $1 and different $2s
 # may have different results.
 #
 # just for framework $1.  Separate tests with the same $1 and different $2s
 # may have different results.
 #
-# Note that using directly AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1_$2])
+# Note that using directly AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])
 # is asking for troubles, since AC_CHECK_FRAMEWORK($framework, fun) would give
 # ac_cv_framework_$framework_fun, which is definitely not what was meant.  Hence
 # the AS_LITERAL_IF indirection.
 # is asking for troubles, since AC_CHECK_FRAMEWORK($framework, fun) would give
 # ac_cv_framework_$framework_fun, which is definitely not what was meant.  Hence
 # the AS_LITERAL_IF indirection.
 # changed but still want to use AC_CHECK_FRAMEWORK, so they save `LIBS'.
 # And ``ac_save_LIBS' is too tempting a name, so let's leave them some
 # freedom.
 # changed but still want to use AC_CHECK_FRAMEWORK, so they save `LIBS'.
 # And ``ac_save_LIBS' is too tempting a name, so let's leave them some
 # freedom.
-AC_DEFUN([AC_CHECK_FRAMEWORK],
-[m4_ifval([$3], , [AH_CHECK_FRAMEWORK([$1])])dnl
-AS_LITERAL_IF([$1],
-         [AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1_$2])],
-         [AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1''_$2])])dnl
-AC_CACHE_CHECK([for $2 in $1 framework], ac_Framework,
-[ac_check_framework_save_LIBS=$LIBS
-LIBS="-framework $1 $5 $LIBS"
-AC_LINK_IFELSE([AC_LANG_CALL([], [$2])],
-          [AS_VAR_SET(ac_Framework, yes)],
-          [AS_VAR_SET(ac_Framework, no)])
-LIBS=$ac_check_framework_save_LIBS])
-AS_IF([test AS_VAR_GET(ac_Framework) = yes],
-      [m4_default([$3], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FRAMEWORK_$1))
-  LIBS="-framework $1 $LIBS"
-])],
-      [$4])dnl
-AS_VAR_POPDEF([ac_Framework])dnl
+AC_DEFUN([AC_CHECK_FRAMEWORK], [
+       m4_ifval([$4], , [AH_CHECK_FRAMEWORK([$1])])dnl
+       AS_LITERAL_IF([$1], [AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])],
+               [AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1''])]
+       )dnl
+       AC_CACHE_CHECK([for framework $1], ac_Framework, [
+               ac_check_framework_save_LIBS=$LIBS
+               LIBS="-framework $1 $6 $LIBS"
+               AC_LINK_IFELSE([AC_LANG_PROGRAM([$2], [$3])],[
+                       AS_VAR_SET(ac_Framework, yes)
+               ], [AS_VAR_SET(ac_Framework, no)])
+               LIBS=$ac_check_framework_save_LIBS]
+       )
+       AS_IF([test AS_VAR_GET(ac_Framework) = yes], [
+               AC_LIB_APPENDTOVAR([LIBS], ["-framework $1 $LIBS"])
+               m4_default([$4], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FRAMEWORK_$1))])
+       ], [$5])dnl
+       AS_VAR_POPDEF([ac_Framework])dnl
 ])# AC_CHECK_FRAMEWORK
 
 # AH_CHECK_FRAMEWORK(FRAMEWORK)
 # ---------------------
 ])# AC_CHECK_FRAMEWORK
 
 # AH_CHECK_FRAMEWORK(FRAMEWORK)
 # ---------------------
-m4_define([AH_CHECK_FRAMEWORK],
-[AH_TEMPLATE(AS_TR_CPP(HAVE_FRAMEWORK_$1),
-        [Define to 1 if you have the `]$1[' framework (-framework ]$1[).])])
+m4_define([AH_CHECK_FRAMEWORK], [
+       AH_TEMPLATE(AS_TR_CPP(HAVE_FRAMEWORK_$1),
+       [Define to 1 if you have the `]$1[' framework (-framework ]$1[).]
+)])