cvs: /php4 acinclude.m4 configure.in
| From: | Sascha Schumann | Date: | Thu, 30 Mar 2000 15:01:00 +0000 |
| Subject: | cvs: /php4 acinclude.m4 configure.in | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-12883@lists.php.net to get a copy of this message | ||
sas Thu Mar 30 07:01:00 2000 EDT
Modified files:
/php4 acinclude.m4 configure.in
Log:
* Add --enable-libgcc which explicitly links against libgcc.
* Some cleanup and increased use of PHP_ARG_[ENABLE|WITH]
Index: php4/acinclude.m4
diff -u php4/acinclude.m4:1.69 php4/acinclude.m4:1.70
--- php4/acinclude.m4:1.69 Mon Mar 27 15:33:36 2000
+++ php4/acinclude.m4 Thu Mar 30 07:00:30 2000
@@ -1,13 +1,32 @@
-dnl $Id: acinclude.m4,v 1.69 2000/03/27 23:33:36 sas Exp $
+dnl $Id: acinclude.m4,v 1.70 2000/03/30 15:00:30 sas Exp $
dnl
dnl This file contains local autoconf functions.
+dnl
+dnl PHP_LIBGCC_LIBPATH(gcc)
+dnl Stores the location of libgcc in libgcc_libpath
+dnl
+AC_DEFUN(PHP_LIBGCC_LIBPATH,[
+ ac_data="
$1 -v 2>&1|grep specs|sed 's/Reading specs from
//'"
+ libgcc_libpath="dirname $ac_data"
+])
+
+dnl
+dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val])
+dnl Sets PHP_ARG_NAME either to the user value or to the default value.
+dnl default-val defaults to no.
+dnl
AC_DEFUN(PHP_ARG_WITH,[
AC_MSG_CHECKING($2)
AC_ARG_WITH($1,[$3],PHP_[]translit($1,a-z-,A-Z_)=[$]withval,PHP_[]translit($1,a-z-,A-Z_)=ifelse($4,,no,$4))
AC_MSG_RESULT([$]PHP_[]translit($1,a-z-,A-Z_))
])
+dnl
+dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val])
+dnl Sets PHP_ARG_NAME either to the user value or to the default value.
+dnl default-val defaults to no.
+dnl
AC_DEFUN(PHP_ARG_ENABLE,[
AC_MSG_CHECKING($2)
AC_ARG_ENABLE($1,[$3],PHP_[]translit($1,a-z-,A-Z_)=[$]enableval,PHP_[]translit($1,a-z-,A-Z_)=ifelse($4,,no,$4))
@@ -272,14 +291,14 @@
dnl builds RPATH from PHP_RPATHS
dnl
AC_DEFUN(AC_BUILD_RPATH,[
- if test "$enable_rpath" = "yes" && test -n "$PHP_RPATHS";
then
+ if test "$PHP_RPATH" = "yes" && test -n "$PHP_RPATHS"; then
OLD_RPATHS="$PHP_RPATHS"
- PHP_RPATHS=""
- for i in $OLD_RPATHS; do
- PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
- PHP_RPATHS="$PHP_RPATHS -R $i"
- NATIVE_RPATHS="$NATIVE_RPATHS ${ld_runpath_switch}$i"
- done
+ PHP_RPATHS=""
+ for i in $OLD_RPATHS; do
+ PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
+ PHP_RPATHS="$PHP_RPATHS -R $i"
+ NATIVE_RPATHS="$NATIVE_RPATHS ${ld_runpath_switch}$i"
+ done
fi
])
Index: php4/configure.in
diff -u php4/configure.in:1.108 php4/configure.in:1.109
--- php4/configure.in:1.108 Wed Mar 29 20:09:56 2000
+++ php4/configure.in Thu Mar 30 07:00:30 2000
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.108 2000/03/30 04:09:56 sas Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.109 2000/03/30 15:00:30 sas Exp $ -*- sh -*-
dnl ## Process this file with autoconf to produce a configure script.
divert(1)
@@ -367,43 +367,25 @@
abs_srcdir=(cd $srcdir; pwd)
abs_builddir=pwd
-AC_MSG_CHECKING(whether to use a configuration file)
-AC_ARG_WITH(config-file-path,
+PHP_ARG_WITH(config-file-path,whether to use a configuration file,
[ --with-config-file-path=PATH
Sets the path in which to look for php.ini.
- defaults to /usr/local/lib],
-[
- if test "$withval" = "yes"; then
- AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "/usr/local/lib")
- AC_DEFINE(USE_CONFIG_FILE, 1)
- AC_MSG_RESULT(yes)
- else
- if test "$withval" != "no"; then
- AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "$withval")
- AC_DEFINE(USE_CONFIG_FILE, 1)
- AC_MSG_RESULT(yes)
- else
- AC_DEFINE(CONFIGURATION_FILE_PATH, 0)
- AC_DEFINE(USE_CONFIG_FILE, 0)
- AC_MSG_RESULT(no)
- fi
- fi
-],[
- AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "/usr/local/lib")
- AC_DEFINE(USE_CONFIG_FILE, 1)
- AC_MSG_RESULT(yes)
-])
+ defaults to /usr/local/lib], yes)
+if test "$PHP_CONFIG_FILE_PATH" = "yes"; then
+ PHP_CONFIG_FILE_PATH="/usr/local/lib"
+fi
-AC_ARG_ENABLE(debug,
-[ --disable-debug Compile without debugging symbols], [
- PHP_DEBUG=$enableval
-],[
- PHP_DEBUG=yes
-])
+if test "$PHP_CONFIG_FILE_PATH" != "no"; then
+ AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "$PHP_CONFIG_FILE_PATH")
+ AC_DEFINE(USE_CONFIG_FILE, 1)
+else
+ AC_DEFINE(CONFIGURATION_FILE_PATH, 0)
+ AC_DEFINE(USE_CONFIG_FILE, 0)
+fi
-AC_MSG_CHECKING(whether to include debugging symbols)
-AC_MSG_RESULT($PHP_DEBUG)
+PHP_ARG_ENABLE(debug, whether to include debugging symbols,
+[ --disable-debug Compile without debugging symbols.], yes)
if test "$PHP_DEBUG" = "yes"; then
PHP_DEBUG=1
@@ -415,24 +397,15 @@
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
-
-AC_MSG_CHECKING(whether to enable safe mode by default)
-AC_ARG_ENABLE(safe-mode,
-[ --enable-safe-mode Enable safe mode by default.],
-[
- if test "$enableval" = "yes"; then
- AC_DEFINE(PHP_SAFE_MODE, 1)
- AC_MSG_RESULT(yes)
- else
- AC_DEFINE(PHP_SAFE_MODE, 0)
- AC_MSG_RESULT(no)
- fi
-],[
- AC_DEFINE(PHP_SAFE_MODE, 0)
- AC_MSG_RESULT(no)
-])
+PHP_ARG_ENABLE(safe-mode, whether to enable safe mode by default,
+[ --enable-safe-mode Enable safe mode by default.])
+if test "$PHP_SAFE_MODE" = "yes"; then
+ AC_DEFINE(PHP_SAFE_MODE, 1)
+else
+ AC_DEFINE(PHP_SAFE_MODE, 0)
+fi
AC_MSG_CHECKING(for safe mode exec dir)
AC_ARG_WITH(exec-dir,
@@ -456,55 +429,39 @@
AC_MSG_RESULT(/usr/local/php/bin)
])
+PHP_ARG_ENABLE(track-vars,whether to enable track_vars variables by default,
+[ --enable-track-vars Enable GET/POST/Cookie track variables by default.],yes)
-AC_MSG_CHECKING(whether to enable track_vars variables by default)
-AC_ARG_ENABLE(track-vars,
-[ --enable-track-vars Enable GET/POST/Cookie track variables by default.],
-[
- if test "$enableval" = "yes"; then
- AC_DEFINE(PHP_TRACK_VARS, 1)
- AC_MSG_RESULT(yes)
- else
- AC_DEFINE(PHP_TRACK_VARS, 0)
- AC_MSG_RESULT(no)
- fi
-],[
- AC_DEFINE(PHP_TRACK_VARS, 0)
- AC_MSG_RESULT(no)
-])
-
+if test "$PHP_TRACK_VARS" = "yes"; then
+ AC_DEFINE(PHP_TRACK_VARS, 1)
+else
+ AC_DEFINE(PHP_TRACK_VARS, 0)
+fi
-AC_MSG_CHECKING(whether to enable magic quotes by default)
-AC_ARG_ENABLE(magic-quotes,
-[ --enable-magic-quotes Enable magic quotes by default.],
-[
- if test "$enableval" = "yes"; then
- AC_DEFINE(MAGIC_QUOTES, 1)
- AC_MSG_RESULT(yes)
- else
- AC_DEFINE(MAGIC_QUOTES, 0)
- AC_MSG_RESULT(no)
- fi
-],[
- AC_DEFINE(MAGIC_QUOTES, 0)
- AC_MSG_RESULT(no)
-])
+PHP_ARG_ENABLE(magic-quotes,whether to enable magic quotes by default,
+[ --enable-magic-quotes Enable magic quotes by default.])
+if test "$PHP_MAGIC_QUOTES" = "yes"; then
+ AC_DEFINE(MAGIC_QUOTES, 1)
+else
+ AC_DEFINE(MAGIC_QUOTES, 0)
+fi
-AC_MSG_CHECKING(whether to enable runpaths)
-AC_ARG_ENABLE(rpath,
+PHP_ARG_ENABLE(rpath, whether to enable runpaths,
[ --disable-rpath Disable passing additional runtime library
- search paths],
-[
- if test "$enableval" = "no"; then
- enable_rpath=no
- else
- enable_rpath=yes
+ search paths], yes)
+
+PHP_ARG_ENABLE(libgcc, whether to explicitly link against libgcc,
+[ --enable-libgcc Enable explicitly linking against libgcc])
+
+if test "$PHP_LIBGCC" = "yes"; then
+ PHP_LIBGCC_LIBPATH(gcc)
+ if test -z "$libgcc_libpath"; then
+ AC_MSG_ERROR(Cannot locate libgcc. Make sure that gcc is in your path)
fi
-],[
- enable_rpath=yes
-])
-AC_MSG_RESULT($enable_rpath)
+ AC_ADD_LIBPATH($libgcc_libpath)
+ AC_ADD_LIBRARY(gcc, yes)
+fi
AC_MSG_CHECKING(whether to enable short tags by default)
AC_ARG_ENABLE(short-tags,