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
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([.])
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[)
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
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], [
], [
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`])
AS_CASE([$ac_cv_search_ffi_call], [no], [CY_CHECK_PKG_CONFIG_LIBFFI])
]))
- AC_CHECK_HEADER([jni.h], [
+ AC_CHECK_FRAMEWORK([JavaVM], [
+ #include <JavaVM/jni.h>
+ ], [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++])