]> git.saurik.com Git - cycript.git/blame - configure.ac
Check the version of flex; check for libffi further after pkg-config fails us.
[cycript.git] / configure.ac
CommitLineData
35fa52c0 1#AC_PREREQ([2.65])
c7aa54aa 2AC_INIT([Cycript], [0.9], [saurik@saurik.com], [cycript], [http://www.cycript.org/])
35fa52c0 3AC_CONFIG_SRCDIR([Console.cpp])
6b66678a 4AC_CONFIG_AUX_DIR([.])
35fa52c0
DWT
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])
6b66678a 11AS_VERSION_COMPARE([$BISON_VERSION], [2.4], [
35fa52c0
DWT
12 AC_MSG_RESULT([no])
13 AC_MSG_ERROR([You need bison 2.4 or greater])
6b66678a 14], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])])
35fa52c0 15AC_SUBST([BISON])
6b66678a
DWT
16AX_PROG_FLEX([
17 FLEX=$LEX
18 FLEX_VERSION=`$FLEX --version | $SED -e 's/^.* \(.*\)$/\1/p;d'`
35fa52c0 19], [
6b66678a 20 AC_MSG_ERROR([You need flex 2.5.35 or greater])
35fa52c0 21])
6b66678a
DWT
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])
309b0535
DWT
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
35fa52c0
DWT
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], [
6b66678a
DWT
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 ])
35fa52c0 51], [AC_MSG_WARN(No JavaScript engine!)])
309b0535 52CHECK_GNU_MAKE
6b66678a 53AS_IF([test "x$_cv_gnu_make_command" = x], [AC_MSG_ERROR([You need GNU make])])
35fa52c0 54# XXX: gnustep
309b0535 55#AC_PROG_OBJCXX