Created
January 23, 2015 22:02
-
-
Save bwoebi/aeb675ad37fea80f5658 to your computer and use it in GitHub Desktop.
Always check against optional flag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/acinclude.m4 b/acinclude.m4 | |
index a4d4d50..3f69968 100644 | |
--- a/acinclude.m4 | |
+++ b/acinclude.m4 | |
@@ -1031,24 +1031,26 @@ dnl The extension on which it depends must also have been configured. | |
dnl See ADD_EXTENSION_DEP in win32 build | |
dnl | |
AC_DEFUN([PHP_ADD_EXTENSION_DEP], [ | |
- am_i_shared=$[PHP_]translit($1,a-z_-,A-Z__)[_SHARED] | |
- is_it_shared=$[PHP_]translit($2,a-z_-,A-Z__)[_SHARED] | |
- is_it_enabled=$[PHP_]translit($2,a-z_-,A-Z__) | |
- if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then | |
- AC_MSG_ERROR([ | |
+ if test "x$3" != "xtrue"; then | |
+ am_i_shared=$[PHP_]translit($1,a-z_-,A-Z__)[_SHARED] | |
+ is_it_shared=$[PHP_]translit($2,a-z_-,A-Z__)[_SHARED] | |
+ is_it_enabled=$[PHP_]translit($2,a-z_-,A-Z__) | |
+ if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then | |
+ AC_MSG_ERROR([ | |
You've configured extension $1 to build statically, but it | |
depends on extension $2, which you've configured to build shared. | |
You either need to build $1 shared or build $2 statically for the | |
build to be successful. | |
]) | |
- fi | |
- if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then | |
- AC_MSG_ERROR([ | |
+ fi | |
+ if test "x$is_it_enabled" = "xno"; then | |
+ AC_MSG_ERROR([ | |
You've configured extension $1, which depends on extension $2, | |
but you've either not enabled $2, or have disabled it. | |
]) | |
+ fi | |
+ dnl Some systems require that we link $2 to $1 when building | |
fi | |
- dnl Some systems require that we link $2 to $1 when building | |
]) | |
dnl ------------------------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment