X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/1504c9b837a7561d8ae2c81f1c4d57fe0f138781..9777bd50251d7e72c44bfbee7fbad2d8df148e47:/configure.ac diff --git a/configure.ac b/configure.ac index 91fd7ff..43ca975 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,7 @@ LT_INIT([disable-static]) PKG_PROG_PKG_CONFIG([0.22]) CHECK_GNU_MAKE AC_SUBST([GMAKE], [$_cv_gnu_make_command]) +AC_SUBST([LTFLAGS]) AS_IF([test "x$GMAKE" = x], [AC_MSG_ERROR([You need GNU make])]) AC_PATH_PROGS([_BASH], [bash]) AS_IF([test "x$_BASH" = x], [AC_MSG_ERROR([You need GNU bash])]) @@ -56,11 +57,12 @@ AC_CHECK_PROGS([SVN], [svn]) AC_CHECK_PROGS([SVNVERSION], [svnversion]) AC_PROG_CXX AC_PROG_OBJCXX +AC_LANG([C++]) AC_DEFUN([CY_CHECK_UNIVERSAL], [ AC_MSG_CHECKING([for universal binary support]) AS_CASE([$host_vendor], [apple], [ - AS_CASE([$host_cpu], [i386|x86_64], [ - for cy_arch in i386 x86_64; do + AS_CASE([$host_cpu], [armv6|i386|x86_64], [ + for cy_arch in armv6 i386 x86_64; do cy_save_CXXFLAGS=$CXXFLAGS AC_LIB_APPENDTOVAR([CXXFLAGS], ["-arch $cy_arch"]) AC_TRY_LINK([], [], [ @@ -92,7 +94,6 @@ AC_ARG_WITH([frameworks], [AS_HELP_STRING( AC_LIB_APPENDTOVAR([OBJCCXXFLAGS], [-F$cy_framework]) done ]) -AC_LANG([C++]) APR_FIND_APR([], [], [1], [1]) AS_CASE([$apr_found], [yes], [ AC_LIB_APPENDTOVAR([CPPFLAGS], [`$apr_config --includes`]) @@ -196,9 +197,17 @@ AS_CASE([$am_cv_func_iconv], [yes], [], [ ]) AS_CASE([$am_cv_func_iconv], [yes], [], [AC_MSG_ERROR([You need iconv])]) AC_LANG_POP([C]) +AC_SUBST([SO], [$acl_shlibext]) AS_IF([test "x$CY_OBJECTIVEC" = x1], [ AC_CHECK_HEADER([mach/mach.h], [ - AS_CASE([$OTOOL], [:], [AC_MSG_WARN([Missing otool?])], [AC_SUBST([CY_OBJECTIVEC_MACH], [1])]) + AC_CHECK_TOOLS([_OTOOL], [otool]) + AS_IF([test "x$_OTOOL" = x], [AC_MSG_ERROR([You need otool])]) + AC_CHECK_TOOLS([_LIPO], [lipo]) + AS_IF([test "x$_LIPO" = x], [AC_MSG_ERROR([You need lipo])]) + AC_CHECK_TOOLS([_NM], [nm]) + AS_IF([test "x$_NM" = x], [AC_MSG_ERROR([You need nm])]) + AC_SUBST([CY_OBJECTIVEC_MACH], [1]) + AC_SUBST([CY_ATTACH_GROUP], [procmod]) ]) ]) AS_IF([test "x$GMAKE" != xmake], [