]> git.saurik.com Git - cycript.git/blob - configure.ac
7080b9c6f5a1e04ad86356137deb98ade30730bc
[cycript.git] / configure.ac
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 LT_INIT([disable-static])
6 AX_PROG_BISON([
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])])
10 AC_PROG_AWK
11 AC_MSG_CHECKING([if bison is >= 2.4])
12 AS_VERSION_COMPARE([$BISON_VERSION], [2.4], [
13 AC_MSG_RESULT([no])
14 AC_MSG_ERROR([You need bison 2.4 or greater])
15 ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])])
16 AC_SUBST([BISON])
17 AX_PROG_FLEX([
18 FLEX=$LEX
19 FLEX_VERSION=`$FLEX --version | $SED -e 's/^.* \(.*\)$/\1/p;d'`
20 ], [
21 AC_MSG_ERROR([You need flex 2.5.33 or greater])
22 ])
23 AC_MSG_CHECKING([if flex is >= 2.5.33])
24 AS_VERSION_COMPARE([$FLEX_VERSION], [2.5.33], [
25 AC_MSG_RESULT([no])
26 AC_MSG_ERROR([You need flex 2.5.33 or greater])
27 ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])])
28 AC_SUBST([FLEX])
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])])
37 VL_LIB_READLINE
38 AC_PROG_CXX
39 AC_PROG_INSTALL
40 AM_ICONV
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])
44 ])
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])
50 ])
51 AC_SEARCH_LIBS([ffi_call], [ffi])
52 AS_CASE([$ac_cv_search_ffi_call], [no], [
53 AC_MSG_ERROR([You need libffi])
54 ])
55 ])
56 ], [AC_MSG_WARN(No JavaScript engine!)])
57 CHECK_GNU_MAKE
58 AS_IF([test "x$_cv_gnu_make_command" = x], [AC_MSG_ERROR([You need GNU make])])
59 # XXX: gnustep
60 AC_PROG_OBJCXX
61 AC_CONFIG_FILES([GNUmakefile])
62 AC_OUTPUT