2002-03-07 22:20:02 +08:00
|
|
|
dnl This file becomes configure.in for self-contained extensions.
|
1999-12-30 10:59:53 +08:00
|
|
|
|
2002-03-07 22:20:02 +08:00
|
|
|
AC_INIT(config.m4)
|
|
|
|
|
|
|
|
PHP_INIT_BUILD_SYSTEM
|
1999-12-30 10:59:53 +08:00
|
|
|
|
2004-12-30 15:08:39 +08:00
|
|
|
AC_DEFUN([PHP_WITH_PHP_CONFIG],[
|
1999-12-30 10:59:53 +08:00
|
|
|
AC_ARG_WITH(php-config,
|
2001-05-20 13:29:54 +08:00
|
|
|
[ --with-php-config=PATH],[
|
1999-12-30 10:59:53 +08:00
|
|
|
PHP_CONFIG=$withval
|
|
|
|
],[
|
|
|
|
PHP_CONFIG=php-config
|
|
|
|
])
|
|
|
|
|
|
|
|
prefix=`$PHP_CONFIG --prefix 2>/dev/null`
|
|
|
|
INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
|
2000-05-03 04:56:03 +08:00
|
|
|
EXTENSION_DIR=`$PHP_CONFIG --extension-dir`
|
1999-12-30 10:59:53 +08:00
|
|
|
|
|
|
|
if test -z "$prefix"; then
|
2000-10-31 02:27:46 +08:00
|
|
|
AC_MSG_ERROR(Cannot find php-config. Please use --with-php-config=PATH)
|
1999-12-30 10:59:53 +08:00
|
|
|
fi
|
2000-05-03 04:56:03 +08:00
|
|
|
AC_MSG_CHECKING(for PHP prefix)
|
1999-12-30 10:59:53 +08:00
|
|
|
AC_MSG_RESULT($prefix)
|
2000-05-03 04:56:03 +08:00
|
|
|
AC_MSG_CHECKING(for PHP includes)
|
1999-12-30 10:59:53 +08:00
|
|
|
AC_MSG_RESULT($INCLUDES)
|
2000-05-03 04:56:03 +08:00
|
|
|
AC_MSG_CHECKING(for PHP extension directory)
|
|
|
|
AC_MSG_RESULT($EXTENSION_DIR)
|
1999-12-30 10:59:53 +08:00
|
|
|
])
|
2002-03-13 17:20:49 +08:00
|
|
|
dnl
|
2004-12-30 15:08:39 +08:00
|
|
|
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],[
|
2002-03-13 20:30:49 +08:00
|
|
|
ext_output="yes, shared"
|
|
|
|
ext_shared=yes
|
|
|
|
test "[$]$1" = "no" && $1=yes
|
|
|
|
])dnl
|
2002-03-13 17:20:49 +08:00
|
|
|
dnl
|
2000-05-03 05:20:56 +08:00
|
|
|
abs_srcdir=`(cd $srcdir && pwd)`
|
2002-03-07 22:20:02 +08:00
|
|
|
abs_builddir=`pwd`
|
2000-05-03 05:20:56 +08:00
|
|
|
|
2001-12-13 04:26:13 +08:00
|
|
|
PHP_CONFIG_NICE(config.nice)
|
|
|
|
|
1999-12-30 10:59:53 +08:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CC_C_O
|
|
|
|
|
2005-01-20 08:54:18 +08:00
|
|
|
dnl Support systems with system libraries in e.g. /usr/lib64
|
|
|
|
AC_ARG_WITH(libdir,
|
|
|
|
[ --with-libdir=NAME Look for libraries in .../NAME rather than .../lib],
|
|
|
|
[PHP_LIBDIR=$withval], [PHP_LIBDIR=lib])
|
|
|
|
|
2002-10-17 13:05:01 +08:00
|
|
|
PHP_RUNPATH_SWITCH
|
2002-03-20 10:07:11 +08:00
|
|
|
PHP_SHLIB_SUFFIX_NAME
|
1999-12-30 10:59:53 +08:00
|
|
|
PHP_WITH_PHP_CONFIG
|
|
|
|
|
2002-03-07 22:20:02 +08:00
|
|
|
PHP_BUILD_SHARED
|
|
|
|
|
1999-12-30 10:59:53 +08:00
|
|
|
AC_PREFIX_DEFAULT()
|
|
|
|
|
2003-09-03 03:42:17 +08:00
|
|
|
PHP_PROG_RE2C
|
2005-02-25 02:11:36 +08:00
|
|
|
PHP_PROG_AWK
|
2002-03-20 10:07:11 +08:00
|
|
|
|
1999-12-30 10:59:53 +08:00
|
|
|
sinclude(config.m4)
|
|
|
|
|
|
|
|
enable_static=no
|
|
|
|
enable_shared=yes
|
|
|
|
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
2002-11-12 00:32:17 +08:00
|
|
|
all_targets='$(PHP_MODULES)'
|
|
|
|
install_targets=install-modules
|
1999-12-30 10:59:53 +08:00
|
|
|
phplibdir="`pwd`/modules"
|
2001-05-20 13:29:54 +08:00
|
|
|
CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H"
|
2003-09-03 16:08:12 +08:00
|
|
|
CFLAGS_CLEAN='$(CFLAGS)'
|
1999-12-30 10:59:53 +08:00
|
|
|
|
|
|
|
test "$prefix" = "NONE" && prefix="/usr/local"
|
|
|
|
test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
|
|
|
|
|
2002-03-07 22:20:02 +08:00
|
|
|
PHP_SUBST(PHP_MODULES)
|
|
|
|
PHP_SUBST(all_targets)
|
|
|
|
PHP_SUBST(install_targets)
|
|
|
|
|
1999-12-30 10:59:53 +08:00
|
|
|
PHP_SUBST(prefix)
|
|
|
|
PHP_SUBST(exec_prefix)
|
|
|
|
PHP_SUBST(libdir)
|
|
|
|
PHP_SUBST(prefix)
|
|
|
|
PHP_SUBST(phplibdir)
|
|
|
|
|
|
|
|
PHP_SUBST(CC)
|
|
|
|
PHP_SUBST(CFLAGS)
|
2002-12-16 21:39:27 +08:00
|
|
|
PHP_SUBST(CFLAGS_CLEAN)
|
1999-12-30 10:59:53 +08:00
|
|
|
PHP_SUBST(CPP)
|
|
|
|
PHP_SUBST(CPPFLAGS)
|
|
|
|
PHP_SUBST(CXX)
|
|
|
|
PHP_SUBST(DEFS)
|
2000-05-03 04:10:46 +08:00
|
|
|
PHP_SUBST(EXTENSION_DIR)
|
1999-12-30 10:59:53 +08:00
|
|
|
PHP_SUBST(EXTRA_LDFLAGS)
|
|
|
|
PHP_SUBST(EXTRA_LIBS)
|
|
|
|
PHP_SUBST(INCLUDES)
|
|
|
|
PHP_SUBST(LFLAGS)
|
2002-03-20 10:07:11 +08:00
|
|
|
PHP_SUBST(LDFLAGS)
|
2000-05-03 04:10:46 +08:00
|
|
|
PHP_SUBST(SHARED_LIBTOOL)
|
1999-12-30 10:59:53 +08:00
|
|
|
PHP_SUBST(LIBTOOL)
|
|
|
|
PHP_SUBST(SHELL)
|
|
|
|
|
2002-03-07 22:20:02 +08:00
|
|
|
PHP_GEN_BUILD_DIRS
|
|
|
|
PHP_GEN_GLOBAL_MAKEFILE
|
1999-12-30 10:59:53 +08:00
|
|
|
|
2000-05-03 04:10:46 +08:00
|
|
|
test -d modules || mkdir modules
|
2000-05-03 04:56:03 +08:00
|
|
|
touch .deps
|
2000-05-03 04:10:46 +08:00
|
|
|
|
2001-03-12 17:54:26 +08:00
|
|
|
AC_CONFIG_HEADER(config.h)
|
1999-12-30 10:59:53 +08:00
|
|
|
|
|
|
|
AC_OUTPUT()
|