X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/e31560f1ddd11c0c65c7a44afdecfe4d78cf3aff..b23692f3038296c94d25c84c55ed4c1bb49619cf:/configure.ac diff --git a/configure.ac b/configure.ac index de80c53..88e3230 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 @@ -148,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`]) @@ -191,6 +196,10 @@ AC_DEFUN([CY_CHECK_PKG_CONFIG_LIBFFI], [ AM_CONDITIONAL([CY_EXECUTE], [test "x$CY_EXECUTE" = x1]) AS_CASE([$CY_EXECUTE], [1], [ + CY_LT_LIB([LTLIBUV], [AC_CHECK_HEADERS([uv.h], [ + AC_SEARCH_LIBS([uv_loop_init], [uv]) + ])]) + AC_CHECK_HEADERS([ffi.h ffi/ffi.h], [break]) CY_LT_LIB([LTLIBFFI], AS_IF([test "x$ac_cv_header_ffi_h" = xno && test "x$ac_cv_header_ffi_ffi_h" = xno], [ @@ -200,13 +209,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++])