diff options
author | foobar <sniper@php.net> | 2005-01-07 06:21:42 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2005-01-07 06:21:42 +0000 |
commit | 155e725a5ea75c612fd7914f94da5e76c980da71 (patch) | |
tree | cde5ea0479a8231cec3964060e3725095e69233f | |
parent | 040729e867ab4e10857acc06f497506e23a41480 (diff) | |
download | php-git-155e725a5ea75c612fd7914f94da5e76c980da71.tar.gz |
MFH: - Make sure $host_alias is never empty
-rw-r--r-- | acinclude.m4 | 15 | ||||
-rw-r--r-- | configure.in | 7 | ||||
-rw-r--r-- | scripts/phpize.m4 | 2 |
3 files changed, 16 insertions, 8 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 11ed137515..760d2b2a61 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -28,9 +28,23 @@ AC_DEFUN([PHP_DEFINE],[ [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h] ]) +dnl PHP_CANONICAL_HOST +dnl +AC_DEFUN([PHP_CANONICAL_HOST],[ + AC_REQUIRE([AC_CANONICAL_HOST])dnl + dnl Make sure we do not continue if host_alias is empty. + if test -z "$host_alias" && test -n "$host"; then + host_alias=$host + fi + if test -z "$host_alias"; then + AC_MSG_ERROR([host_alias is not set!]) + fi +]) + dnl PHP_INIT_BUILD_SYSTEM dnl AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[ +AC_REQUIRE([PHP_CANONICAL_HOST])dnl test -d include || mkdir include > Makefile.objects > Makefile.fragments @@ -277,6 +291,7 @@ int readdir_r(DIR *, struct dirent *); ]) AC_DEFUN([PHP_SHLIB_SUFFIX_NAME],[ + AC_REQUIRE([PHP_CANONICAL_HOST])dnl PHP_SUBST(SHLIB_SUFFIX_NAME) SHLIB_SUFFIX_NAME=so case $host_alias in diff --git a/configure.in b/configure.in index 6ffa70762e..85e16e3877 100644 --- a/configure.in +++ b/configure.in @@ -35,7 +35,7 @@ for arg in $0 "$@"; do CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$arg'" done -AC_CANONICAL_HOST +PHP_CANONICAL_HOST AC_CONFIG_HEADER(main/php_config.h) MAJOR_VERSION=4 @@ -177,11 +177,6 @@ PHP_C_BIGENDIAN dnl Platform-specific compile settings. dnl ------------------------------------------------------------------------- -dnl if host_alias is empty, ac_cv_host_alias may still have the info -if test -z "$host_alias"; then - host_alias=$ac_cv_host_alias -fi - case $host_alias in *solaris*) CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" diff --git a/scripts/phpize.m4 b/scripts/phpize.m4 index 123acaef7f..ea286179d4 100644 --- a/scripts/phpize.m4 +++ b/scripts/phpize.m4 @@ -2,8 +2,6 @@ dnl This file becomes configure.in for self-contained extensions. AC_INIT(config.m4) -AC_CANONICAL_HOST - PHP_INIT_BUILD_SYSTEM AC_DEFUN([PHP_WITH_PHP_CONFIG],[ |