From: Douglas William Thrift Date: Wed, 3 Mar 2010 07:19:36 +0000 (+0000) Subject: Rename evildoom.sh to autogen.sh so we can fit in with the other crazy people who... X-Git-Tag: v0.9.432~113 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/3fd51f5146691fdea6625d3875bb4363bc94a5b9 Rename evildoom.sh to autogen.sh so we can fit in with the other crazy people who use autoconf; get WebKit stuff working! --- diff --git a/GNUmakefile.in b/GNUmakefile.in index f1ecba5..7d23832 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -19,6 +19,7 @@ cflags := @CPPFLAGS@ @CXXFLAGS@ -DYYDEBUG=1 ldflags := @LDFLAGS@ library := @LIBS@ @LTLIBAPR@ @LTLIBICONV@ time := $(shell which @TIME@) +gperf := @GPERF@ INSTALL := @INSTALL@ INSTALL_PROGRAM := @INSTALL_PROGRAM@ @@ -47,6 +48,8 @@ libdir := @libdir@ localedir := @localedir@ mandir := @mandir@ +CY_EXECUTE := @CY_EXECUTE@ + paths := $(foreach path,$(paths),$(wildcard $(path))) cflags += $(foreach path,$(paths),-I$(path) -L$(path)) @@ -81,15 +84,16 @@ restart ?= $(MAKE) uname_s ?= $(shell uname -s) uname_p ?= $(shell uname -p) --include $(uname_s).mk --include $(uname_s)-$(uname_p).mk - -ifdef CY_EXECUTE -ifeq ($(filter ObjectiveC,$(filters)),) -ifneq ($(shell which gnustep-config 2>/dev/null),) -include GNUstep.mk -endif -endif +ifeq ($(CY_EXECUTE),1) +cflags += -DCY_EXECUTE +code += sig/ffi_type.lo sig/parse.lo sig/copy.lo +code += Execute.lo Bridge.lo +filters += C +#ifeq ($(filter ObjectiveC,$(filters)),) +#ifneq ($(shell which gnustep-config 2>/dev/null),) +#include GNUstep.mk +#endif +#endif endif cflags += -Wall -Werror -Wno-parentheses #-Wno-unused @@ -138,10 +142,21 @@ $(deb): $(all) control dpkg-deb -b package $(deb) endif +ifeq ($(CY_EXECUTE),1) +Bridge.gperf: Bridge.def Bridge.sh + $(srcdir)/Bridge.sh $< >$@ + +Bridge.hpp: Bridge.gperf + $(gperf) $< | sed -e 's/defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__/0/' >$@ + +Bridge.lo: Bridge.hpp +endif + all: $(all) clean:: - rm -rf *.lo *.o .libs $(lib)cycript.$(dll) $(lib)cycript.la $(all) Struct.hpp lex.cy.c Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh cyrver Cycript.yy Cycript.l control Bridge.hpp Cycript.output + rm -rf *.lo *.o .libs $(lib)cycript.$(dll) $(lib)cycript.la $(all) Struct.hpp lex.cy.c Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh cyrver Cycript.yy Cycript.l control Bridge.gperf Bridge.hpp Cycript.output sig/*.lo sig/.libs + -rmdir sig distclean: clean rm -f GNUmakefile config.log config.status libtool diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..b10be3f --- /dev/null +++ b/autogen.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +set -e +shopt -s expand_aliases +unalias -a +case `uname` in +(Linux) + libdirs=('/usr/share/gettext') + ;; +(FreeBSD) + alias sed=gsed + libdirs=() + ;; +esac +aclocal +sed -e 's/AC_PROG_AWK/dnl &/' -i aclocal.m4 +cat `aclocal --print-ac-dir`/check_gnu_make.m4 find_apr.m4 >> aclocal.m4 +function filter() +{ + sed -e '/no proper invocation of AM_INIT_AUTOMAKE was found\./d' \ + -e '/You should verify that configure\.ac invokes AM_INIT_AUTOMAKE,/d' \ + -e '/that aclocal\.m4 is present in the top-level directory,/d' \ + -e '/and that aclocal\.m4 was recently regenerated (using aclocal)\./d' \ + -e "/no \`Makefile\.am' found for any configure output/d" \ + -e "/Consider adding \`AC_CONFIG_MACRO_DIR(\[m4\])' to configure\.ac and/d" \ + -e '/rerunning libtoolize, to keep the correct libtool macros in-tree\./d' \ + -e "/Consider adding \`-I m4' to ACLOCAL_AMFLAGS in Makefile\.am\./d" +} +automake -acf 2>&1 | filter +for libdir in ${libdirs[*]}; do + automake -acf --libdir $libdir 2>&1 | filter +done +libtoolize -ci | filter +autoconf diff --git a/configure b/configure index cd6927f..02429b8 100755 --- a/configure +++ b/configure @@ -811,9 +811,9 @@ OBJCXX ifGNUmake LIBFFI_LIBS LIBFFI_CFLAGS +CY_EXECUTE WEBKIT_LIBS WEBKIT_CFLAGS -PKG_CONFIG LTLIBICONV LIBICONV INSTALL_DATA @@ -835,6 +835,7 @@ BISON AWK YFLAGS YACC +PKG_CONFIG CPP OTOOL64 OTOOL @@ -931,13 +932,13 @@ LDFLAGS LIBS CPPFLAGS CPP +PKG_CONFIG YACC YFLAGS CXX CXXFLAGS CCC CXXCPP -PKG_CONFIG WEBKIT_CFLAGS WEBKIT_LIBS LIBFFI_CFLAGS @@ -1586,6 +1587,7 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor + PKG_CONFIG path to pkg-config utility YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. @@ -1594,7 +1596,6 @@ Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor - PKG_CONFIG path to pkg-config utility WEBKIT_CFLAGS C compiler flags for WEBKIT, overriding pkg-config WEBKIT_LIBS linker flags for WEBKIT, overriding pkg-config @@ -4043,13 +4044,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4046: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4047: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4049: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4050: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4052: output\"" >&5) + (eval echo "\"\$as_me:4053: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5255,7 +5256,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5258 "configure"' > conftest.$ac_ext + echo '#line 5259 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6780,11 +6781,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6783: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6784: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6787: \$? = $ac_status" >&5 + echo "$as_me:6788: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7119,11 +7120,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7122: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7123: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7126: \$? = $ac_status" >&5 + echo "$as_me:7127: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7224,11 +7225,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7227: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7228: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7231: \$? = $ac_status" >&5 + echo "$as_me:7232: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -7279,11 +7280,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7282: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7283: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7286: \$? = $ac_status" >&5 + echo "$as_me:7287: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9663,7 +9664,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 9666 "configure" +#line 9667 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9759,7 +9760,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 9762 "configure" +#line 9763 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9986,6 +9987,122 @@ CC="$lt_save_CC" # Only expand once: + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.22 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi + +fi for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -10339,15 +10456,13 @@ $as_echo "$ax_cv_prog_flex" >&6; } : FLEX=$LEX - FLEX_VERSION=`$FLEX --version | $SED -e 's/^.* \(.*\)$/\1/p;d'` + FLEX_VERSION=`$FLEX --version | $SED -e 's/^.* \([0-9.]*\)$/\1/p;d'` else : - - as_fn_error "You need flex 2.5.33 or greater" "$LINENO" 5 - + as_fn_error "You need flex 2.5.33 or greater" "$LINENO" 5 fi @@ -10457,6 +10572,28 @@ fi test -n "$GPERF" && break done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if gperf >= 3.0.3" >&5 +$as_echo_n "checking if gperf >= 3.0.3... " >&6; } +GPERF_VERSION=`$GPERF --version | $SED -e 's/^.* \([0-9.]*\)$/\1/p;d'` +as_arg_v1=$GPERF_VERSION +as_arg_v2=3.0.3 +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error "You need gperf 3.0.3 or greater" "$LINENO" 5 + ;; #( + 0) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ;; #( + 2) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ;; #( + *) : + ;; +esac for ac_prog in time do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -13172,11 +13309,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13175: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13312: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13179: \$? = $ac_status" >&5 + echo "$as_me:13316: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13271,11 +13408,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13274: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13411: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13278: \$? = $ac_status" >&5 + echo "$as_me:13415: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13323,11 +13460,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13326: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13463: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13330: \$? = $ac_status" >&5 + echo "$as_me:13467: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15246,122 +15383,6 @@ case $am_cv_func_iconv in #( as_fn_error "You need iconv" "$LINENO" 5 ;; esac - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi - -fi - pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WEBKIT" >&5 $as_echo_n "checking for WEBKIT... " >&6; } @@ -15492,7 +15513,55 @@ else WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - WEBKIT=yes + + WEBKIT=yes + + for element in `$PKG_CONFIG --cflags WebKitGtk`; do + haveit= + for x in $CXXFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element" + fi + done + + + for element in `$PKG_CONFIG --libs WebKitGtk`; do + haveit= + for x in $LIBS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBS="${LIBS}${LIBS:+ }$element" + fi + done + + fi elif test $pkg_failed = untried; then @@ -15566,7 +15635,55 @@ else WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - WEBKIT=yes + + WEBKIT=yes + + for element in `$PKG_CONFIG --cflags WebKitGtk`; do + haveit= + for x in $CXXFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element" + fi + done + + + for element in `$PKG_CONFIG --libs WebKitGtk`; do + haveit= + for x in $LIBS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBS="${LIBS}${LIBS:+ }$element" + fi + done + + fi else @@ -15574,11 +15691,61 @@ else WEBKIT_LIBS=$pkg_cv_WEBKIT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } + WEBKIT=yes + + for element in `$PKG_CONFIG --cflags webkit-1.0`; do + haveit= + for x in $CXXFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element" + fi + done + + + for element in `$PKG_CONFIG --libs webkit-1.0`; do + haveit= + for x in $LIBS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBS="${LIBS}${LIBS:+ }$element" + fi + done + + fi case $WEBKIT in #( yes) : + CY_EXECUTE=1 + pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5 @@ -15816,12 +15983,63 @@ else LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + + + for element in `$PKG_CONFIG --cflags libffi`; do + haveit= + for x in $CXXFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }$element" + fi + done + + + for element in `$PKG_CONFIG --libs libffi`; do + haveit= + for x in $LIBS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBS="${LIBS}${LIBS:+ }$element" + fi + done + + fi ;; #( *) : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No JavaScript engine!" >&5 -$as_echo "$as_me: WARNING: No JavaScript engine!" >&2;} ;; + + CY_EXECUTE=0 + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No JavaScript engine!" >&5 +$as_echo "$as_me: WARNING: No JavaScript engine!" >&2;} + ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 $as_echo_n "checking for GNU make... " >&6; } diff --git a/configure.ac b/configure.ac index 7080b9c..7d40d50 100644 --- a/configure.ac +++ b/configure.ac @@ -3,6 +3,7 @@ AC_INIT([Cycript], [0.9], [saurik@saurik.com], [cycript], [http://www.cycript.or AC_CONFIG_SRCDIR([Console.cpp]) AC_CONFIG_AUX_DIR([.]) LT_INIT([disable-static]) +PKG_PROG_PKG_CONFIG([0.22]) AX_PROG_BISON([ BISON=`echo $YACC | $SED -e 's/ -y//'` BISON_VERSION=`$BISON -V | $SED -e 's/^bison (GNU Bison) \(.*\)$/\1/p;d'` @@ -16,10 +17,8 @@ AS_VERSION_COMPARE([$BISON_VERSION], [2.4], [ AC_SUBST([BISON]) AX_PROG_FLEX([ FLEX=$LEX - FLEX_VERSION=`$FLEX --version | $SED -e 's/^.* \(.*\)$/\1/p;d'` -], [ - AC_MSG_ERROR([You need flex 2.5.33 or greater]) -]) + FLEX_VERSION=[`$FLEX --version | $SED -e 's/^.* \([0-9.]*\)$/\1/p;d'`] +], [AC_MSG_ERROR([You need flex 2.5.33 or greater])]) AC_MSG_CHECKING([if flex is >= 2.5.33]) AS_VERSION_COMPARE([$FLEX_VERSION], [2.5.33], [ AC_MSG_RESULT([no]) @@ -28,6 +27,12 @@ AS_VERSION_COMPARE([$FLEX_VERSION], [2.5.33], [ AC_SUBST([FLEX]) AC_CHECK_PROGS([_BASH], [bash]) AC_CHECK_PROGS([GPERF], [gperf]) +AC_MSG_CHECKING([if gperf >= 3.0.3]) +GPERF_VERSION=[`$GPERF --version | $SED -e 's/^.* \([0-9.]*\)$/\1/p;d'`] +AS_VERSION_COMPARE([$GPERF_VERSION], [3.0.3], [ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([You need gperf 3.0.3 or greater]) +], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])]) AC_CHECK_PROGS([TIME], [time]) APR_FIND_APR([], [], [1], [1]) AS_CASE([$apr_found], [yes], [ @@ -39,11 +44,23 @@ AC_PROG_CXX AC_PROG_INSTALL AM_ICONV AS_CASE([$am_cv_func_iconv], [yes], [], [AC_MSG_ERROR([You need iconv])]) -PKG_CHECK_MODULES([WEBKIT], [webkit-1.0], [WEBKIT=yes], [ - PKG_CHECK_MODULES([WEBKIT], [WebKitGtk], [WEBKIT=yes], [WEBKIT=no]) +PKG_CHECK_MODULES([WEBKIT], [webkit-1.0], [ + WEBKIT=yes + AC_LIB_APPENDTOVAR([CXXFLAGS], [`$PKG_CONFIG --cflags webkit-1.0`]) + AC_LIB_APPENDTOVAR([LIBS], [`$PKG_CONFIG --libs webkit-1.0`]) +], [ + PKG_CHECK_MODULES([WEBKIT], [WebKitGtk], [ + WEBKIT=yes + AC_LIB_APPENDTOVAR([CXXFLAGS], [`$PKG_CONFIG --cflags WebKitGtk`]) + AC_LIB_APPENDTOVAR([LIBS], [`$PKG_CONFIG --libs WebKitGtk`]) + ], [WEBKIT=no]) ]) AS_CASE([$WEBKIT], [yes], [ - PKG_CHECK_MODULES([LIBFFI], [libffi], [], [ + AC_SUBST([CY_EXECUTE], [1]) + PKG_CHECK_MODULES([LIBFFI], [libffi], [ + AC_LIB_APPENDTOVAR([CXXFLAGS], [`$PKG_CONFIG --cflags libffi`]) + AC_LIB_APPENDTOVAR([LIBS], [`$PKG_CONFIG --libs libffi`]) + ], [ AC_CHECK_HEADERS([ffi.h ffi/ffi.h], [break]) AS_IF([test "x$ac_cv_header_ffi_h" = xno && test "x$ac_cv_header_ffi_ffi_h" = xno], [ AC_MSG_ERROR([You need libffi]) @@ -53,7 +70,10 @@ AS_CASE([$WEBKIT], [yes], [ AC_MSG_ERROR([You need libffi]) ]) ]) -], [AC_MSG_WARN(No JavaScript engine!)]) +], [ + AC_SUBST([CY_EXECUTE], [0]) + AC_MSG_WARN([No JavaScript engine!]) +]) CHECK_GNU_MAKE AS_IF([test "x$_cv_gnu_make_command" = x], [AC_MSG_ERROR([You need GNU make])]) # XXX: gnustep diff --git a/evildoom.sh b/evildoom.sh deleted file mode 100755 index b10be3f..0000000 --- a/evildoom.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -set -e -shopt -s expand_aliases -unalias -a -case `uname` in -(Linux) - libdirs=('/usr/share/gettext') - ;; -(FreeBSD) - alias sed=gsed - libdirs=() - ;; -esac -aclocal -sed -e 's/AC_PROG_AWK/dnl &/' -i aclocal.m4 -cat `aclocal --print-ac-dir`/check_gnu_make.m4 find_apr.m4 >> aclocal.m4 -function filter() -{ - sed -e '/no proper invocation of AM_INIT_AUTOMAKE was found\./d' \ - -e '/You should verify that configure\.ac invokes AM_INIT_AUTOMAKE,/d' \ - -e '/that aclocal\.m4 is present in the top-level directory,/d' \ - -e '/and that aclocal\.m4 was recently regenerated (using aclocal)\./d' \ - -e "/no \`Makefile\.am' found for any configure output/d" \ - -e "/Consider adding \`AC_CONFIG_MACRO_DIR(\[m4\])' to configure\.ac and/d" \ - -e '/rerunning libtoolize, to keep the correct libtool macros in-tree\./d' \ - -e "/Consider adding \`-I m4' to ACLOCAL_AMFLAGS in Makefile\.am\./d" -} -automake -acf 2>&1 | filter -for libdir in ${libdirs[*]}; do - automake -acf --libdir $libdir 2>&1 | filter -done -libtoolize -ci | filter -autoconf