auto 7ˆl–äY>” Êi?u8 [¸Ë7˜´o�þBÛmgÅŽ2±€ÏÎ „tM²ÏÍ¿Ë?÷dnl This file contains local autoconf macros. dnl ---------------------------------------------------------------------------- dnl Output stylize macros for configure (help/runtime). dnl ---------------------------------------------------------------------------- dnl dnl PHP_HELP_SEPARATOR(title) dnl dnl Adds separator title into the configure --help display. dnl AC_DEFUN([PHP_HELP_SEPARATOR],[ AC_ARG_ENABLE([],[ $1 ],[]) ]) dnl dnl PHP_CONFIGURE_PART(title) dnl dnl Adds separator title configure output (idea borrowed from mm). dnl AC_DEFUN([PHP_CONFIGURE_PART],[ AC_MSG_RESULT() AC_MSG_RESULT([${T_MD}$1${T_ME}]) ]) dnl ---------------------------------------------------------------------------- dnl Build system helper macros. dnl ---------------------------------------------------------------------------- dnl dnl PHP_DEF_HAVE(what) dnl dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [ ])'. dnl AC_DEFUN([PHP_DEF_HAVE],[AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___), 1, [ ])]) dnl dnl PHP_RUN_ONCE(namespace, variable, code) dnl dnl Execute code, if variable is not set in namespace. dnl AC_DEFUN([PHP_RUN_ONCE],[ changequote({,}) unique=`echo $2|$SED 's/[^a-zA-Z0-9]/_/g'` changequote([,]) cmd="echo $ac_n \"\$$1$unique$ac_c\"" if test -n "$unique" && test "`eval $cmd`" = "" ; then eval "$1$unique=set" $3 fi ]) dnl dnl PHP_EXPAND_PATH(path, variable) dnl dnl Expands path to an absolute path and assigns it to variable. dnl AC_DEFUN([PHP_EXPAND_PATH],[ if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then $2=$1 else changequote({,}) ep_dir=`echo $1|$SED 's%/*[^/][^/]*/*$%%'` changequote([,]) ep_realdir=`(cd "$ep_dir" && pwd)` $2="$ep_realdir"/`basename "$1"` fi ]) dnl dnl PHP_DEFINE(WHAT [, value[, directory]]) dnl dnl Creates builddir/include/what.h and in there #define WHAT value. dnl AC_DEFUN([PHP_DEFINE],[ [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h] ]) dnl dnl PHP_SUBST(varname) dnl dnl Adds variable with it's value into Makefile, e.g.: dnl CC = gcc dnl AC_DEFUN([PHP_SUBST],[ PHP_VAR_SUBST="$PHP_VAR_SUBST $1" ]) dnl dnl PHP_SUBST_OLD(varname) dnl dnl Same as PHP_SUBST() but also substitutes all @VARNAME@ instances in every dnl file passed to AC_OUTPUT. dnl AC_DEFUN([PHP_SUBST_OLD],[ PHP_SUBST($1) AC_SUBST($1) ]) dnl dnl PHP_OUTPUT(file) dnl dnl Adds "file" to the list of files generated by AC_OUTPUT. This macro can be dnl used several times. dnl AC_DEFUN([PHP_OUTPUT],[ PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1" ]) dnl ---------------------------------------------------------------------------- dnl Build system base macros. dnl ---------------------------------------------------------------------------- dnl dnl PHP_CANONICAL_HOST_TARGET dnl AC_DEFUN([PHP_CANONICAL_HOST_TARGET],[ AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_TARGET])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 dnl PHP_INIT_BUILD_SYSTEM dnl dnl Creates build directories and Makefile placeholders. dnl AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[ AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl test -d include || $php_shtool mkdir include > Makefile.objects > Makefile.fragments dnl We need to play tricks here to avoid matching the grep line itself. pattern=define $EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/dev/null ]) dnl dnl PHP_GEN_GLOBAL_MAKEFILE dnl dnl Generates the global makefile. dnl AC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[ cat >Makefile <> Makefile done cat $abs_srcdir/build/Makefile.global Makefile.fragments Makefile.objects >> Makefile ]) dnl dnl PHP_ADD_MAKEF