]> git.saurik.com Git - cycript.git/blame_incremental - configure.ac
Check the version of flex; check for libffi further after pkg-config fails us.
[cycript.git] / configure.ac
... / ...
CommitLineData
1#AC_PREREQ([2.65])
2AC_INIT([Cycript], [0.9], [saurik@saurik.com], [cycript], [http://www.cycript.org/])
3AC_CONFIG_SRCDIR([Console.cpp])
4AC_CONFIG_AUX_DIR([.])
5AX_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])])
9AC_PROG_AWK
10AC_MSG_CHECKING([if bison is >= 2.4])
11AS_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])])
15AC_SUBST([BISON])
16AX_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])
22AC_MSG_CHECKING([if flex is >= 2.5.35])
23AS_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])])
27AC_SUBST([FLEX])
28APR_FIND_APR([], [], [1], [1])
29AS_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])])
33AC_PROG_CXX
34AC_PROG_INSTALL
35AM_ICONV
36AS_CASE([$am_cv_func_iconv], [yes], [], [AC_MSG_ERROR([You need iconv])])
37PKG_CHECK_MODULES([WEBKIT], [webkit-1.0], [WEBKIT=yes], [
38 PKG_CHECK_MODULES([WEBKIT], [WebKitGtk], [WEBKIT=yes], [WEBKIT=no])
39])
40AS_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!)])
52CHECK_GNU_MAKE
53AS_IF([test "x$_cv_gnu_make_command" = x], [AC_MSG_ERROR([You need GNU make])])
54# XXX: gnustep
55#AC_PROG_OBJCXX