summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2005-01-10 01:11:09 (GMT)
committerfoobar <sniper@php.net>2005-01-10 01:11:09 (GMT)
commit931810629c140955104306fe5b9867e4d738421c (patch)
tree3f27da395c4be0007c98763b35cbca08f100845f /configure.in
parenta139dbf9ccf47a99b449c7bdcdfb846563bb7cec (diff)
downloadphp-931810629c140955104306fe5b9867e4d738421c.tar.gz
- The pic/no-pic patch by Joe Orton.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in20
1 files changed, 18 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 2891545..1405baf 100644
--- a/configure.in
+++ b/configure.in
@@ -232,6 +232,21 @@ case $host_alias in
;;
esac
+# Disable PIC mode by default where it is known to be safe to do so,
+# to avoid the performance hit from the lost register
+AC_MSG_CHECKING([whether to force non-PIC code in shared modules])
+case $host_alias in
+i?86-*-linux*|i?86-*-freebsd*)
+ if test "${with_pic+set}" != "set"; then
+ with_pic=no
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+ ;;
+*) AC_MSG_RESULT(no) ;;
+esac
+
dnl Include Zend and TSRM configurations.
dnl -------------------------------------------------------------------------
@@ -881,7 +896,6 @@ fi
enable_shared=yes
enable_static=yes
-unset with_pic
case $php_build_target in
program|static)
@@ -892,7 +906,9 @@ program|static)
;;
shared)
enable_static=no
- standard_libtool_flag=-prefer-pic
+ if test "${with_pic+set}" != "set"; then
+ standard_libtool_flag='-prefer-pic'
+ fi
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module"
;;
esac