diff options
author | foobar <sniper@php.net> | 2003-01-28 10:59:12 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2003-01-28 10:59:12 +0000 |
commit | 20c43285f78f745f88faf70062b04ed26a8c3c11 (patch) | |
tree | 6572fbdd36b5ba7202debca5cc7dfd1ef67d2901 /scripts/phpize.m4 | |
parent | 41d6e9af8daadf1ce16dcbbbe085452e38d17618 (diff) | |
download | php-git-20c43285f78f745f88faf70062b04ed26a8c3c11.tar.gz |
- Fixed bug: #13561 (--without-pear prevents install of phpize, php-config)
Diffstat (limited to 'scripts/phpize.m4')
-rw-r--r-- | scripts/phpize.m4 | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/scripts/phpize.m4 b/scripts/phpize.m4 new file mode 100644 index 0000000000..9f1371716e --- /dev/null +++ b/scripts/phpize.m4 @@ -0,0 +1,123 @@ +dnl This file becomes configure.in for self-contained extensions. + +AC_INIT(config.m4) + +PHP_INIT_BUILD_SYSTEM + +AC_DEFUN(PHP_WITH_PHP_CONFIG,[ + AC_ARG_WITH(php-config, +[ --with-php-config=PATH],[ + PHP_CONFIG=$withval +],[ + PHP_CONFIG=php-config +]) + + prefix=`$PHP_CONFIG --prefix 2>/dev/null` + INCLUDES=`$PHP_CONFIG --includes 2>/dev/null` + EXTENSION_DIR=`$PHP_CONFIG --extension-dir` + + if test -z "$prefix"; then + AC_MSG_ERROR(Cannot find php-config. Please use --with-php-config=PATH) + fi + AC_MSG_CHECKING(for PHP prefix) + AC_MSG_RESULT($prefix) + AC_MSG_CHECKING(for PHP includes) + AC_MSG_RESULT($INCLUDES) + AC_MSG_CHECKING(for PHP extension directory) + AC_MSG_RESULT($EXTENSION_DIR) +]) +dnl +AC_DEFUN(PHP_EXT_BUILDDIR,[.])dnl +AC_DEFUN(PHP_EXT_DIR,[""])dnl +AC_DEFUN(PHP_EXT_SRCDIR,[$abs_srcdir])dnl +AC_DEFUN(PHP_ALWAYS_SHARED,[ + ext_output="yes, shared" + ext_shared=yes + test "[$]$1" = "no" && $1=yes +])dnl +dnl +abs_srcdir=`(cd $srcdir && pwd)` +abs_builddir=`pwd` + +PHP_CONFIG_NICE(config.nice) + +AC_PROG_CC +AC_PROG_CC_C_O + +PHP_RUNPATH_SWITCH +PHP_SHLIB_SUFFIX_NAME +PHP_WITH_PHP_CONFIG + +PHP_BUILD_SHARED + +AC_PREFIX_DEFAULT() + +AC_ARG_WITH(openssl, +[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.5) ], +[ + if test "$withval" != "no"; then + PHP_WITH_SHARED + PHP_OPENSSL=$withval + ext_openssl_shared=yes + ext_shared=yes + PHP_SETUP_OPENSSL + fi +]) + +sinclude(config.m4) + +enable_static=no +enable_shared=yes + +AC_PROG_LIBTOOL +AC_PROG_AWK + +all_targets='$(PHP_MODULES)' +install_targets=install-modules +phplibdir="`pwd`/modules" +CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H" +CFLAGS_CLEAN=$CFLAGS + +test "$prefix" = "NONE" && prefix="/usr/local" +test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)' + +PHP_SUBST(PHP_MODULES) +PHP_SUBST(all_targets) +PHP_SUBST(install_targets) + +PHP_SUBST(prefix) +PHP_SUBST(exec_prefix) +PHP_SUBST(libdir) +PHP_SUBST(prefix) +PHP_SUBST(phplibdir) + +PHP_SUBST(PHP_COMPILE) +PHP_SUBST(CC) +PHP_SUBST(CFLAGS) +PHP_SUBST(CFLAGS_CLEAN) +PHP_SUBST(CPP) +PHP_SUBST(CPPFLAGS) +PHP_SUBST(CXX) +PHP_SUBST(DEFS) +PHP_SUBST(EXTENSION_DIR) +PHP_SUBST(EXTRA_LDFLAGS) +PHP_SUBST(EXTRA_LIBS) +PHP_SUBST(INCLUDES) +PHP_SUBST(LEX) +PHP_SUBST(LEX_OUTPUT_ROOT) +PHP_SUBST(LFLAGS) +PHP_SUBST(LDFLAGS) +PHP_SUBST(SHARED_LIBTOOL) +PHP_SUBST(LIBTOOL) +PHP_SUBST(SHELL) +PHP_SUBST(AWK) + +PHP_GEN_BUILD_DIRS +PHP_GEN_GLOBAL_MAKEFILE + +test -d modules || mkdir modules +touch .deps + +AC_CONFIG_HEADER(config.h) + +AC_OUTPUT() |