X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/a42871173b94b0ca82c1db9b97c5da82fc3867cb..77578fdd2c1bc23b7847d03d63eb8d63d283fc16:/configure.ac diff --git a/configure.ac b/configure.ac index 7f23cf3..b482870 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl Cycript - Optimizing JavaScript Compiler/Runtime -dnl Copyright (C) 2009-2014 Jay Freeman (saurik) +dnl Copyright (C) 2009-2015 Jay Freeman (saurik) dnl GNU Affero General Public License, Version 3 {{{ dnl @@ -19,7 +19,7 @@ dnl }}} AC_PREREQ([2.65]) AC_INIT([Cycript], [0.9], [saurik@saurik.com], [cycript], [http://www.cycript.org/]) -AC_COPYRIGHT([Copyright (C) 2009-2014 Jay Freeman (saurik)]) +AC_COPYRIGHT([Copyright (C) 2009-2015 Jay Freeman (saurik)]) AC_CONFIG_SRCDIR([Console.cpp]) AC_CONFIG_AUX_DIR([.]) @@ -93,6 +93,9 @@ AC_DEFUN([CY_TRY], [ AS_IF([test "x$cy_good" = x1], ]$4[, ]$5[) ]) dnl }}} +AC_ARG_VAR([LFLAGS], [flex flags]) +AS_IF([test "x$LFLAGS" = x], [LFLAGS="--full --ecs"]) + AC_DEFUN([CY_TEST_FLAG_], [ AC_LANG_PUSH(]$2[) AC_MSG_CHECKING([for ]]$4[[ ]]$1[) @@ -122,8 +125,10 @@ dnl XXX: this is used to support GNU Objective-C struct objc_method CY_TEST_FLAG([-Wno-deprecated-declarations]) CY_TEST_FLAG([-Wno-dangling-else]) +CY_TEST_FLAG([-Wno-empty-body]) CY_TEST_FLAG([-Wno-overloaded-virtual]) CY_TEST_FLAG([-Wno-parentheses]) +CY_TEST_FLAG([-Wno-tautological-undefined-compare]) CY_TEST_FLAG([-Wno-unneeded-internal-declaration]) AX_PTHREAD @@ -137,19 +142,6 @@ AC_DEFUN([CY_LT_LIB], [ AC_SUBST(]$1[) ]) -dnl -arch * {{{ -for cy_arch in ppc ppc64 i386 x86_64 armv6 arm64; do - AC_MSG_CHECKING([for -arch $cy_arch]) - CY_TRY([CXXFLAGS], ["-arch $cy_arch"], [ - AC_TRY_LINK([], [], [CY_SUCCESS], [CY_FAILURE]) - ], [ - AC_MSG_RESULT([yes]) - AC_LIB_APPENDTOVAR([CY_ARCH], ["-arch $cy_arch"]) - ], [AC_MSG_RESULT([no])]) -done -AC_SUBST([CY_ARCH]) -dnl }}} - dnl --enable-javascript {{{ AC_DEFUN([CY_CHECK_JAVASCRIPTCORE], [ CY_LT_LIB([LTJAVASCRIPTCORE], [AC_SEARCH_LIBS([JSEvaluateScript], [JavaScriptCore], [ @@ -161,7 +153,7 @@ AC_DEFUN([CY_CHECK_JAVASCRIPTCORE], [ ], [ AC_SUBST([CY_EXECUTE], [1]) ], [ - for cy_webkit_pkg in "webkit-1.0" "WebKitGtk"; do + for cy_webkit_pkg in "javascriptcoregtk-4.0"; do PKG_CHECK_MODULES([WEBKIT], [$cy_webkit_pkg], [ AC_SUBST([CY_EXECUTE], [1]) AC_LIB_APPENDTOVAR([CPPFLAGS], [`$PKG_CONFIG --cflags $cy_webkit_pkg`]) @@ -213,13 +205,17 @@ AS_CASE([$CY_EXECUTE], [1], [ AS_CASE([$ac_cv_search_ffi_call], [no], [CY_CHECK_PKG_CONFIG_LIBFFI]) ])) - AC_CHECK_HEADER([jni.h], [ + AC_CHECK_FRAMEWORK([JavaVM], [ + #include + ], [JNI_GetCreatedJavaVMs(NULL, 0, NULL);], [ + AC_SUBST([CY_JAVA], [1]) + ], [AC_CHECK_HEADER([jni.h], [ AC_SUBST([CY_JAVA], [1]) CY_LT_LIB([LTJAVA], [AC_SEARCH_LIBS([JNI_GetCreatedJavaVMs], [dvm], [ ])]) ], [ AC_SUBST([CY_JAVA], [0]) - ]) + ])]) AC_LANG_PUSH([Objective C++])