2002-03-07 14:20:02 +00:00
|
|
|
dnl This file becomes configure.in for self-contained extensions.
|
1999-12-30 02:59:53 +00:00
|
|
|
|
2005-06-05 12:58:59 +00:00
|
|
|
divert(1)
|
|
|
|
|
|
|
|
AC_PREREQ(2.13)
|
2002-03-07 14:20:02 +00:00
|
|
|
AC_INIT(config.m4)
|
|
|
|
|
2005-05-27 13:15:47 +00:00
|
|
|
PHP_CONFIG_NICE(config.nice)
|
|
|
|
|
2004-12-30 07:08:39 +00:00
|
|
|
AC_DEFUN([PHP_WITH_PHP_CONFIG],[
|
1999-12-30 02:59:53 +00:00
|
|
|
AC_ARG_WITH(php-config,
|
2001-05-20 05:29:54 +00:00
|
|
|
[ --with-php-config=PATH],[
|
1999-12-30 02:59:53 +00:00
|
|
|
PHP_CONFIG=$withval
|
|
|
|
],[
|
|
|
|
PHP_CONFIG=php-config
|
|
|
|
])
|
|
|
|
|
|
|
|
prefix=`$PHP_CONFIG --prefix 2>/dev/null`
|
2005-11-21 23:07:36 +00:00
|
|
|
phpincludedir=`$PHP_CONFIG --include-dir 2>/dev/null`
|
1999-12-30 02:59:53 +00:00
|
|
|
INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
|
2000-05-02 20:56:03 +00:00
|
|
|
EXTENSION_DIR=`$PHP_CONFIG --extension-dir`
|
2005-08-08 16:06:49 +00:00
|
|
|
PHP_EXECUTABLE=`$PHP_CONFIG --php-binary`
|
1999-12-30 02:59:53 +00:00
|
|
|
|
|
|
|
if test -z "$prefix"; then
|
2000-10-30 18:27:46 +00:00
|
|
|
AC_MSG_ERROR(Cannot find php-config. Please use --with-php-config=PATH)
|
1999-12-30 02:59:53 +00:00
|
|
|
fi
|
2005-05-07 02:51:53 +00:00
|
|
|
|
|
|
|
php_shtool=$srcdir/build/shtool
|
|
|
|
PHP_INIT_BUILD_SYSTEM
|
|
|
|
|
2000-05-02 20:56:03 +00:00
|
|
|
AC_MSG_CHECKING(for PHP prefix)
|
1999-12-30 02:59:53 +00:00
|
|
|
AC_MSG_RESULT($prefix)
|
2000-05-02 20:56:03 +00:00
|
|
|
AC_MSG_CHECKING(for PHP includes)
|
1999-12-30 02:59:53 +00:00
|
|
|
AC_MSG_RESULT($INCLUDES)
|
2000-05-02 20:56:03 +00:00
|
|
|
AC_MSG_CHECKING(for PHP extension directory)
|
|
|
|
AC_MSG_RESULT($EXTENSION_DIR)
|
2005-11-21 23:07:36 +00:00
|
|
|
AC_MSG_CHECKING(for PHP installed headers prefix)
|
|
|
|
AC_MSG_RESULT($phpincludedir)
|
1999-12-30 02:59:53 +00:00
|
|
|
])
|
2002-03-13 09:20:49 +00:00
|
|
|
dnl
|
2004-12-30 07:08:39 +00: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 12:30:49 +00:00
|
|
|
ext_output="yes, shared"
|
|
|
|
ext_shared=yes
|
|
|
|
test "[$]$1" = "no" && $1=yes
|
|
|
|
])dnl
|
2002-03-13 09:20:49 +00:00
|
|
|
dnl
|
2000-05-02 21:20:56 +00:00
|
|
|
abs_srcdir=`(cd $srcdir && pwd)`
|
2002-03-07 14:20:02 +00:00
|
|
|
abs_builddir=`pwd`
|
2000-05-02 21:20:56 +00:00
|
|
|
|
1999-12-30 02:59:53 +00:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CC_C_O
|
|
|
|
|
2005-01-20 00:54:18 +00: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 05:05:01 +00:00
|
|
|
PHP_RUNPATH_SWITCH
|
2006-04-10 12:16:08 +00:00
|
|
|
PHP_SHLIB_SUFFIX_NAMES
|
1999-12-30 02:59:53 +00:00
|
|
|
PHP_WITH_PHP_CONFIG
|
|
|
|
|
2002-03-07 14:20:02 +00:00
|
|
|
PHP_BUILD_SHARED
|
|
|
|
|
1999-12-30 02:59:53 +00:00
|
|
|
AC_PREFIX_DEFAULT()
|
|
|
|
|
2003-09-02 19:42:17 +00:00
|
|
|
PHP_PROG_RE2C
|
2005-02-24 18:11:36 +00:00
|
|
|
PHP_PROG_AWK
|
2002-03-20 02:07:11 +00:00
|
|
|
|
1999-12-30 02:59:53 +00:00
|
|
|
sinclude(config.m4)
|
|
|
|
|
|
|
|
enable_static=no
|
|
|
|
enable_shared=yes
|
|
|
|
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
2002-11-11 16:32:17 +00:00
|
|
|
all_targets='$(PHP_MODULES)'
|
2005-11-21 23:07:36 +00:00
|
|
|
install_targets="install-modules install-headers"
|
1999-12-30 02:59:53 +00:00
|
|
|
phplibdir="`pwd`/modules"
|
2001-05-20 05:29:54 +00:00
|
|
|
CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H"
|
2003-09-03 08:08:12 +00:00
|
|
|
CFLAGS_CLEAN='$(CFLAGS)'
|
1999-12-30 02:59:53 +00:00
|
|
|
|
|
|
|
test "$prefix" = "NONE" && prefix="/usr/local"
|
|
|
|
test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
|
|
|
|
|
2002-03-07 14:20:02 +00:00
|
|
|
PHP_SUBST(PHP_MODULES)
|
|
|
|
PHP_SUBST(all_targets)
|
|
|
|
PHP_SUBST(install_targets)
|
|
|
|
|
1999-12-30 02:59:53 +00:00
|
|
|
PHP_SUBST(prefix)
|
|
|
|
PHP_SUBST(exec_prefix)
|
|
|
|
PHP_SUBST(libdir)
|
|
|
|
PHP_SUBST(prefix)
|
|
|
|
PHP_SUBST(phplibdir)
|
2005-11-21 23:07:36 +00:00
|
|
|
PHP_SUBST(phpincludedir)
|
1999-12-30 02:59:53 +00:00
|
|
|
|
|
|
|
PHP_SUBST(CC)
|
|
|
|
PHP_SUBST(CFLAGS)
|
2002-12-16 13:39:27 +00:00
|
|
|
PHP_SUBST(CFLAGS_CLEAN)
|
1999-12-30 02:59:53 +00:00
|
|
|
PHP_SUBST(CPP)
|
|
|
|
PHP_SUBST(CPPFLAGS)
|
|
|
|
PHP_SUBST(CXX)
|
2005-03-04 14:34:24 +00:00
|
|
|
PHP_SUBST(CXXFLAGS)
|
2000-05-02 20:10:46 +00:00
|
|
|
PHP_SUBST(EXTENSION_DIR)
|
2005-08-08 16:06:49 +00:00
|
|
|
PHP_SUBST(PHP_EXECUTABLE)
|
1999-12-30 02:59:53 +00:00
|
|
|
PHP_SUBST(EXTRA_LDFLAGS)
|
|
|
|
PHP_SUBST(EXTRA_LIBS)
|
|
|
|
PHP_SUBST(INCLUDES)
|
|
|
|
PHP_SUBST(LFLAGS)
|
2002-03-20 02:07:11 +00:00
|
|
|
PHP_SUBST(LDFLAGS)
|
2000-05-02 20:10:46 +00:00
|
|
|
PHP_SUBST(SHARED_LIBTOOL)
|
1999-12-30 02:59:53 +00:00
|
|
|
PHP_SUBST(LIBTOOL)
|
|
|
|
PHP_SUBST(SHELL)
|
2005-11-21 23:07:36 +00:00
|
|
|
PHP_SUBST(INSTALL_HEADERS)
|
1999-12-30 02:59:53 +00:00
|
|
|
|
2002-03-07 14:20:02 +00:00
|
|
|
PHP_GEN_BUILD_DIRS
|
|
|
|
PHP_GEN_GLOBAL_MAKEFILE
|
1999-12-30 02:59:53 +00:00
|
|
|
|
2005-05-07 02:51:53 +00:00
|
|
|
test -d modules || $php_shtool mkdir modules
|
2000-05-02 20:56:03 +00:00
|
|
|
touch .deps
|
2000-05-02 20:10:46 +00:00
|
|
|
|
2001-03-12 09:54:26 +00:00
|
|
|
AC_CONFIG_HEADER(config.h)
|
1999-12-30 02:59:53 +00:00
|
|
|
|
|
|
|
AC_OUTPUT()
|