echo 'Creating brew-patch.diff' cat << EOF >> brew-patch.diff diff --git a/acinclude.m4 b/acinclude.m4 index 168c465f8d..6c087d152f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -441,7 +441,11 @@ dnl dnl Adds a path to linkpath/runpath (LDFLAGS) dnl AC_DEFUN([PHP_ADD_LIBPATH],[ - if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then + case "$1" in + "/usr/$PHP_LIBDIR"|"/usr/lib"[)] ;; + /Library/Developer/CommandLineTools/SDKs/*/usr/lib[)] ;; + /Applications/Xcode*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*/usr/lib[)] ;; + *[)] PHP_EXPAND_PATH($1, ai_p) ifelse([$2],,[ _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) @@ -452,8 +456,8 @@ AC_DEFUN([PHP_ADD_LIBPATH],[ else _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) fi - ]) - fi + ]) ;; + esac ]) dnl @@ -487,7 +491,11 @@ dnl add an include path. dnl if before is 1, add in the beginning of INCLUDES. dnl AC_DEFUN([PHP_ADD_INCLUDE],[ - if test "$1" != "/usr/include"; then + case "$1" in + "/usr/include"[)] ;; + /Library/Developer/CommandLineTools/SDKs/*/usr/include[)] ;; + /Applications/Xcode*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*/usr/include[)] ;; + *[)] PHP_EXPAND_PATH($1, ai_p) PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [ if test "$2"; then @@ -495,8 +503,8 @@ AC_DEFUN([PHP_ADD_INCLUDE],[ else INCLUDES="$INCLUDES -I$ai_p" fi - ]) - fi + ]) ;; + esac ]) dnl internal, don't use @@ -2411,7 +2419,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [ fi if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a || - test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME + test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME || + test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.tbd then PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [ found_iconv=yes EOF