]> git.saurik.com Git - cycript.git/blob - configure.ac
Rename evildoom.sh to autogen.sh so we can fit in with the other crazy people who...
[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 PKG_PROG_PKG_CONFIG([0.22])
7 AX_PROG_BISON([
8 BISON=`echo $YACC | $SED -e 's/ -y//'`
9 BISON_VERSION=`$BISON -V | $SED -e 's/^bison (GNU Bison) \(.*\)$/\1/p;d'`
10 ], [AC_MSG_ERROR([You need bison 2.4 or greater])])
11 AC_PROG_AWK
12 AC_MSG_CHECKING([if bison is >= 2.4])
13 AS_VERSION_COMPARE([$BISON_VERSION], [2.4], [
14 AC_MSG_RESULT([no])
15 AC_MSG_ERROR([You need bison 2.4 or greater])
16 ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])])
17 AC_SUBST([BISON])
18 AX_PROG_FLEX([
19 FLEX=$LEX
20 FLEX_VERSION=[`$FLEX --version | $SED -e 's/^.* \([0-9.]*\)$/\1/p;d'`]
21 ], [AC_MSG_ERROR([You need flex 2.5.33 or greater])])
22 AC_MSG_CHECKING([if flex is >= 2.5.33])
23 AS_VERSION_COMPARE([$FLEX_VERSION], [2.5.33], [
24 AC_MSG_RESULT([no])
25 AC_MSG_ERROR([You need flex 2.5.33 or greater])
26 ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])])
27 AC_SUBST([FLEX])
28 AC_CHECK_PROGS([_BASH], [bash])
29 AC_CHECK_PROGS([GPERF], [gperf])
30 AC_MSG_CHECKING([if gperf >= 3.0.3])
31 GPERF_VERSION=[`$GPERF --version | $SED -e 's/^.* \([0-9.]*\)$/\1/p;d'`]
32 AS_VERSION_COMPARE([$GPERF_VERSION], [3.0.3], [
33 AC_MSG_RESULT([no])
34 AC_MSG_ERROR([You need gperf 3.0.3 or greater])
35 ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])])
36 AC_CHECK_PROGS([TIME], [time])
37 APR_FIND_APR([], [], [1], [1])
38 AS_CASE([$apr_found], [yes], [
39 AC_LIB_APPENDTOVAR([CPPFLAGS], [`$apr_config --includes`])
40 AC_SUBST([LTLIBAPR], [`$apr_config --link-libtool`])
41 ], [AC_MSG_ERROR([You need apr])])
42 VL_LIB_READLINE
43 AC_PROG_CXX
44 AC_PROG_INSTALL
45 AM_ICONV
46 AS_CASE([$am_cv_func_iconv], [yes], [], [AC_MSG_ERROR([You need iconv])])
47 PKG_CHECK_MODULES([WEBKIT], [webkit-1.0], [
48 WEBKIT=yes
49 AC_LIB_APPENDTOVAR([CXXFLAGS], [`$PKG_CONFIG --cflags webkit-1.0`])
50 AC_LIB_APPENDTOVAR([LIBS], [`$PKG_CONFIG --libs webkit-1.0`])
51 ], [
52 PKG_CHECK_MODULES([WEBKIT], [WebKitGtk], [
53 WEBKIT=yes
54 AC_LIB_APPENDTOVAR([CXXFLAGS], [`$PKG_CONFIG --cflags WebKitGtk`])
55 AC_LIB_APPENDTOVAR([LIBS], [`$PKG_CONFIG --libs WebKitGtk`])
56 ], [WEBKIT=no])
57 ])
58 AS_CASE([$WEBKIT], [yes], [
59 AC_SUBST([CY_EXECUTE], [1])
60 PKG_CHECK_MODULES([LIBFFI], [libffi], [
61 AC_LIB_APPENDTOVAR([CXXFLAGS], [`$PKG_CONFIG --cflags libffi`])
62 AC_LIB_APPENDTOVAR([LIBS], [`$PKG_CONFIG --libs libffi`])
63 ], [
64 AC_CHECK_HEADERS([ffi.h ffi/ffi.h], [break])
65 AS_IF([test "x$ac_cv_header_ffi_h" = xno && test "x$ac_cv_header_ffi_ffi_h" = xno], [
66 AC_MSG_ERROR([You need libffi])
67 ])
68 AC_SEARCH_LIBS([ffi_call], [ffi])
69 AS_CASE([$ac_cv_search_ffi_call], [no], [
70 AC_MSG_ERROR([You need libffi])
71 ])
72 ])
73 ], [
74 AC_SUBST([CY_EXECUTE], [0])
75 AC_MSG_WARN([No JavaScript engine!])
76 ])
77 CHECK_GNU_MAKE
78 AS_IF([test "x$_cv_gnu_make_command" = x], [AC_MSG_ERROR([You need GNU make])])
79 # XXX: gnustep
80 AC_PROG_OBJCXX
81 AC_CONFIG_FILES([GNUmakefile])
82 AC_OUTPUT