2 AC_INIT([Cycript], [0.9], [saurik@saurik.com], [cycript], [http://www.cycript.org/])
3 AC_CONFIG_SRCDIR([Console.cpp])
5 LT_INIT([disable-static])
7 BISON=`echo $YACC | $SED -e 's/ -y//'`
8 BISON_VERSION=`$BISON -V | $SED -e 's/^bison (GNU Bison) \(.*\)$/\1/p;d'`
9 ], [AC_MSG_ERROR([You need bison 2.4 or greater])])
11 AC_MSG_CHECKING([if bison is >= 2.4])
12 AS_VERSION_COMPARE([$BISON_VERSION], [2.4], [
14 AC_MSG_ERROR([You need bison 2.4 or greater])
15 ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])])
19 FLEX_VERSION=`$FLEX --version | $SED -e 's/^.* \(.*\)$/\1/p;d'`
21 AC_MSG_ERROR([You need flex 2.5.33 or greater])
23 AC_MSG_CHECKING([if flex is >= 2.5.33])
24 AS_VERSION_COMPARE([$FLEX_VERSION], [2.5.33], [
26 AC_MSG_ERROR([You need flex 2.5.33 or greater])
27 ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])])
29 AC_CHECK_PROGS([_BASH], [bash])
30 AC_CHECK_PROGS([GPERF], [gperf])
31 AC_CHECK_PROGS([TIME], [time])
32 APR_FIND_APR([], [], [1], [1])
33 AS_CASE([$apr_found], [yes], [
34 AC_LIB_APPENDTOVAR([CPPFLAGS], [`$apr_config --includes`])
35 AC_SUBST([LTLIBAPR], [`$apr_config --link-libtool`])
36 ], [AC_MSG_ERROR([You need apr])])
41 AS_CASE([$am_cv_func_iconv], [yes], [], [AC_MSG_ERROR([You need iconv])])
42 PKG_CHECK_MODULES([WEBKIT], [webkit-1.0], [WEBKIT=yes], [
43 PKG_CHECK_MODULES([WEBKIT], [WebKitGtk], [WEBKIT=yes], [WEBKIT=no])
45 AS_CASE([$WEBKIT], [yes], [
46 PKG_CHECK_MODULES([LIBFFI], [libffi], [], [
47 AC_CHECK_HEADERS([ffi.h ffi/ffi.h], [break])
48 AS_IF([test "x$ac_cv_header_ffi_h" = xno && test "x$ac_cv_header_ffi_ffi_h" = xno], [
49 AC_MSG_ERROR([You need libffi])
51 AC_SEARCH_LIBS([ffi_call], [ffi])
52 AS_CASE([$ac_cv_search_ffi_call], [no], [
53 AC_MSG_ERROR([You need libffi])
56 ], [AC_MSG_WARN(No JavaScript engine!)])
58 AS_IF([test "x$_cv_gnu_make_command" = x], [AC_MSG_ERROR([You need GNU make])])
61 AC_CONFIG_FILES([GNUmakefile])