]>
Commit | Line | Data |
---|---|---|
1 | #AC_PREREQ([2.65]) | |
2 | AC_INIT([Cycript], [0.9], [saurik@saurik.com], [cycript], [http://www.cycript.org/]) | |
3 | AC_CONFIG_SRCDIR([Console.cpp]) | |
4 | AC_CONFIG_AUX_DIR([.]) | |
5 | AX_PROG_BISON([ | |
6 | BISON=`echo $YACC | $SED -e 's/ -y//'` | |
7 | BISON_VERSION=`$BISON -V | $SED -e 's/^bison (GNU Bison) \(.*\)$/\1/p;d'` | |
8 | ], [AC_MSG_ERROR([You need bison 2.4 or greater])]) | |
9 | AC_PROG_AWK | |
10 | AC_MSG_CHECKING([if bison is >= 2.4]) | |
11 | AS_VERSION_COMPARE([$BISON_VERSION], [2.4], [ | |
12 | AC_MSG_RESULT([no]) | |
13 | AC_MSG_ERROR([You need bison 2.4 or greater]) | |
14 | ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])]) | |
15 | AC_SUBST([BISON]) | |
16 | AX_PROG_FLEX([ | |
17 | FLEX=$LEX | |
18 | FLEX_VERSION=`$FLEX --version | $SED -e 's/^.* \(.*\)$/\1/p;d'` | |
19 | ], [ | |
20 | AC_MSG_ERROR([You need flex 2.5.35 or greater]) | |
21 | ]) | |
22 | AC_MSG_CHECKING([if flex is >= 2.5.35]) | |
23 | AS_VERSION_COMPARE([$FLEX_VERSION], [2.5.35], [ | |
24 | AC_MSG_RESULT([no]) | |
25 | AC_MSG_ERROR([You need flex 2.5.35 or greater]) | |
26 | ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])]) | |
27 | AC_SUBST([FLEX]) | |
28 | APR_FIND_APR([], [], [1], [1]) | |
29 | AS_CASE([$apr_found], [yes], [ | |
30 | AC_LIB_APPENDTOVAR([CPPFLAGS], [`$apr_config --includes`]) | |
31 | AC_SUBST([APR], [`$apr_config --link-ld`]) | |
32 | ], [AC_MSG_ERROR([You need apr])]) | |
33 | AC_PROG_CXX | |
34 | AC_PROG_INSTALL | |
35 | AM_ICONV | |
36 | AS_CASE([$am_cv_func_iconv], [yes], [], [AC_MSG_ERROR([You need iconv])]) | |
37 | PKG_CHECK_MODULES([WEBKIT], [webkit-1.0], [WEBKIT=yes], [ | |
38 | PKG_CHECK_MODULES([WEBKIT], [WebKitGtk], [WEBKIT=yes], [WEBKIT=no]) | |
39 | ]) | |
40 | AS_CASE([$WEBKIT], [yes], [ | |
41 | PKG_CHECK_MODULES([LIBFFI], [libffi], [], [ | |
42 | AC_CHECK_HEADERS([ffi.h ffi/ffi.h], [break]) | |
43 | AS_IF([test "x$ac_cv_header_ffi_h" = xno && test "x$ac_cv_header_ffi_ffi_h" = xno], [ | |
44 | AC_MSG_ERROR([You need libffi]) | |
45 | ]) | |
46 | AC_SEARCH_LIBS([ffi_call], [ffi]) | |
47 | AS_CASE([$ac_cv_search_ffi_call], [no], [ | |
48 | AC_MSG_ERROR([You need libffi]) | |
49 | ]) | |
50 | ]) | |
51 | ], [AC_MSG_WARN(No JavaScript engine!)]) | |
52 | CHECK_GNU_MAKE | |
53 | AS_IF([test "x$_cv_gnu_make_command" = x], [AC_MSG_ERROR([You need GNU make])]) | |
54 | # XXX: gnustep | |
55 | #AC_PROG_OBJCXX |