]> git.saurik.com Git - cycript.git/blame - configure.ac
Add a valueOf to Instance.
[cycript.git] / configure.ac
CommitLineData
9c60689e 1AC_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([.])
549f29b5 5LT_INIT([disable-static])
3fd51f51 6PKG_PROG_PKG_CONFIG([0.22])
35fa52c0
DWT
7AX_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])])
11AC_PROG_AWK
12AC_MSG_CHECKING([if bison is >= 2.4])
6b66678a 13AS_VERSION_COMPARE([$BISON_VERSION], [2.4], [
35fa52c0
DWT
14 AC_MSG_RESULT([no])
15 AC_MSG_ERROR([You need bison 2.4 or greater])
6b66678a 16], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])])
35fa52c0 17AC_SUBST([BISON])
6b66678a
DWT
18AX_PROG_FLEX([
19 FLEX=$LEX
3fd51f51
DWT
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])])
50ac250c
DWT
22AC_MSG_CHECKING([if flex is >= 2.5.33])
23AS_VERSION_COMPARE([$FLEX_VERSION], [2.5.33], [
6b66678a 24 AC_MSG_RESULT([no])
50ac250c 25 AC_MSG_ERROR([You need flex 2.5.33 or greater])
6b66678a
DWT
26], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])])
27AC_SUBST([FLEX])
9c60689e
DWT
28AC_CHECK_PROGS([_BASH], [bash])
29AC_CHECK_PROGS([GPERF], [gperf])
3fd51f51
DWT
30AC_MSG_CHECKING([if gperf >= 3.0.3])
31GPERF_VERSION=[`$GPERF --version | $SED -e 's/^.* \([0-9.]*\)$/\1/p;d'`]
32AS_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])])
3530897b 36AC_CHECK_PROGS([TIME], [time])
309b0535
DWT
37APR_FIND_APR([], [], [1], [1])
38AS_CASE([$apr_found], [yes], [
39 AC_LIB_APPENDTOVAR([CPPFLAGS], [`$apr_config --includes`])
549f29b5 40 AC_SUBST([LTLIBAPR], [`$apr_config --link-libtool`])
309b0535 41], [AC_MSG_ERROR([You need apr])])
9c60689e 42VL_LIB_READLINE
309b0535 43AC_PROG_CXX
35fa52c0
DWT
44AC_PROG_INSTALL
45AM_ICONV
46AS_CASE([$am_cv_func_iconv], [yes], [], [AC_MSG_ERROR([You need iconv])])
3fd51f51
DWT
47PKG_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])
35fa52c0
DWT
57])
58AS_CASE([$WEBKIT], [yes], [
3fd51f51
DWT
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 ], [
6b66678a
DWT
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 ])
3fd51f51
DWT
73], [
74 AC_SUBST([CY_EXECUTE], [0])
75 AC_MSG_WARN([No JavaScript engine!])
76])
309b0535 77CHECK_GNU_MAKE
6b66678a 78AS_IF([test "x$_cv_gnu_make_command" = x], [AC_MSG_ERROR([You need GNU make])])
35fa52c0 79# XXX: gnustep
9c60689e
DWT
80AC_PROG_OBJCXX
81AC_CONFIG_FILES([GNUmakefile])
82AC_OUTPUT