From: Jay Freeman (saurik) Date: Thu, 20 Jun 2013 14:35:06 +0000 (-0700) Subject: Add pkg-config --cflags to CPPFLAGS, not C*FLAGS. X-Git-Tag: v0.9.500%b1~68 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/d70419f1e019cea3fab8c051263398bd320374a9 Add pkg-config --cflags to CPPFLAGS, not C*FLAGS. --- diff --git a/configure b/configure index fd56f77..8641c3f 100755 --- a/configure +++ b/configure @@ -16438,8 +16438,6 @@ rm -f conftest.y - - if ${CFLAGS+:} false; then : case " $CFLAGS " in *" "*) @@ -18148,56 +18146,9 @@ $as_echo "yes" >&6; } CY_EXECUTE=1 - - for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; do - haveit= - for x in $CFLAGS; 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 - CFLAGS="${CFLAGS}${CFLAGS:+ }$element" - fi - done - - - for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; 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 --cflags $cy_webkit_pkg`; do haveit= - for x in $OBJCXXFLAGS; do + for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -18213,12 +18164,11 @@ $as_echo "yes" >&6; } fi done if test -z "$haveit"; then - OBJCXXFLAGS="${OBJCXXFLAGS}${OBJCXXFLAGS:+ }$element" + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done - for element in `$PKG_CONFIG --libs $cy_webkit_pkg`; do haveit= for x in $LIBS; do @@ -18396,56 +18346,9 @@ $as_echo "yes" >&6; } CY_EXECUTE=1 - for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; do haveit= - for x in $CFLAGS; 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 - CFLAGS="${CFLAGS}${CFLAGS:+ }$element" - fi - done - - - for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; 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 --cflags $cy_webkit_pkg`; do - haveit= - for x in $OBJCXXFLAGS; do + for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -18461,12 +18364,11 @@ $as_echo "yes" >&6; } fi done if test -z "$haveit"; then - OBJCXXFLAGS="${OBJCXXFLAGS}${OBJCXXFLAGS:+ }$element" + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done - for element in `$PKG_CONFIG --libs $cy_webkit_pkg`; do haveit= for x in $LIBS; do @@ -18644,56 +18546,9 @@ $as_echo "yes" >&6; } CY_EXECUTE=1 - - for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; do - haveit= - for x in $CFLAGS; 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 - CFLAGS="${CFLAGS}${CFLAGS:+ }$element" - fi - done - - - for element in `$PKG_CONFIG --cflags $cy_webkit_pkg`; 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 --cflags $cy_webkit_pkg`; do haveit= - for x in $OBJCXXFLAGS; do + for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -18709,12 +18564,11 @@ $as_echo "yes" >&6; } fi done if test -z "$haveit"; then - OBJCXXFLAGS="${OBJCXXFLAGS}${OBJCXXFLAGS:+ }$element" + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done - for element in `$PKG_CONFIG --libs $cy_webkit_pkg`; do haveit= for x in $LIBS; do @@ -19015,56 +18869,9 @@ else $as_echo "yes" >&6; } - - for element in `$PKG_CONFIG --cflags libffi`; do - haveit= - for x in $CFLAGS; 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 - CFLAGS="${CFLAGS}${CFLAGS:+ }$element" - fi - done - - 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 --cflags libffi`; do - haveit= - for x in $OBJCXXFLAGS; do + for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -19080,12 +18887,11 @@ $as_echo "yes" >&6; } fi done if test -z "$haveit"; then - OBJCXXFLAGS="${OBJCXXFLAGS}${OBJCXXFLAGS:+ }$element" + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done - for element in `$PKG_CONFIG --libs libffi`; do haveit= for x in $LIBS; do @@ -19241,56 +19047,9 @@ else $as_echo "yes" >&6; } - for element in `$PKG_CONFIG --cflags libffi`; do haveit= - for x in $CFLAGS; 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 - CFLAGS="${CFLAGS}${CFLAGS:+ }$element" - fi - done - - - 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 --cflags libffi`; do - haveit= - for x in $OBJCXXFLAGS; do + for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" @@ -19306,12 +19065,11 @@ $as_echo "yes" >&6; } fi done if test -z "$haveit"; then - OBJCXXFLAGS="${OBJCXXFLAGS}${OBJCXXFLAGS:+ }$element" + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done - for element in `$PKG_CONFIG --libs libffi`; do haveit= for x in $LIBS; do diff --git a/configure.ac b/configure.ac index 82821d5..b694b61 100644 --- a/configure.ac +++ b/configure.ac @@ -101,12 +101,6 @@ AC_DEFUN([CY_TRY], [ AS_IF([test "x$cy_good" = x1], ]$4[, ]$5[) ]) dnl }}} -AC_DEFUN([CY_COMPILE_FLAG], [ - AC_LIB_APPENDTOVAR([CFLAGS], ]$1[) - AC_LIB_APPENDTOVAR([CXXFLAGS], ]$1[) - AC_LIB_APPENDTOVAR([OBJCXXFLAGS], ]$1[) -]) - AC_DEFUN([CY_TEST_FLAG_], [ AC_LANG_PUSH(]$2[) AC_MSG_CHECKING([for ]]$4[[ ]]$1[) @@ -171,7 +165,7 @@ AC_DEFUN([CY_CHECK_JAVASCRIPTCORE], [ for cy_webkit_pkg in "webkit-1.0" "WebKitGtk"; do PKG_CHECK_MODULES([WEBKIT], [$cy_webkit_pkg], [ AC_SUBST([CY_EXECUTE], [1]) - CY_COMPILE_FLAG([`$PKG_CONFIG --cflags $cy_webkit_pkg`]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [`$PKG_CONFIG --cflags $cy_webkit_pkg`]) AC_LIB_APPENDTOVAR([LIBS], [`$PKG_CONFIG --libs $cy_webkit_pkg`]) ], [:]); if test "x$CY_EXECUTE" = x1; then break; fi done @@ -207,7 +201,7 @@ dnl }}} AC_DEFUN([CY_CHECK_PKG_CONFIG_LIBFFI], [ PKG_CHECK_MODULES([LIBFFI], [libffi], [ - CY_COMPILE_FLAG([`$PKG_CONFIG --cflags libffi`]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [`$PKG_CONFIG --cflags libffi`]) AC_LIB_APPENDTOVAR([LIBS], [`$PKG_CONFIG --libs libffi`]) ], [AC_MSG_ERROR([missing "libffi"])])])