From 827ad656cb2585d2b9a9cc2d3bb021e8edf34365 Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Sat, 18 Mar 2000 17:58:09 +0000 Subject: @- Added --disable-pic for disabling generating PIC for shared objects on platforms which support it (i.e. Linux) (Sascha) Additionally, we enforce passing pthread_cflags to the compiler, if libtool chooses it as linker. --- configure.in | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 366d4afdb7..ec0ad5fb17 100644 --- a/configure.in +++ b/configure.in @@ -540,6 +540,15 @@ AC_ARG_ENABLE(url-fopen-wrapper, AC_MSG_RESULT(yes) ]) +AC_MSG_CHECKING(whether to enable PIC for shared objects) +AC_ARG_ENABLE(pic, +[ --disable-pic Disable PIC for shared objects],[ + PHP_PIC=$enableval +],[ + PHP_PIC=yes +]) +AC_MSG_RESULT($PHP_PIC) + DMALLOC_RESULT=no AC_MSG_CHECKING(whether to enable dmalloc) AC_ARG_ENABLE(dmalloc, @@ -657,15 +666,6 @@ if test "$abs_srcdir" != "$abs_builddir"; then fi fi -dnl *** Commented out - generates slow code and consumes a lot of -dnl *** resources during compilation - we need to figure out how -dnl *** to supply it only when absolutely necessary -dnl If we are using gcc add -fpic to make dl() work on some platforms -dnl test -n "$GCC" && CFLAGS="$CFLAGS -fpic" - -dnl add -fPIC option on Solaris if we are building dynamic extensions -dnl PHP_SOLARIS_PIC_WEIRDNESS - EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS" LIBS="" LDFLAGS="" @@ -742,6 +742,18 @@ PHP_SUBST(WARNING_LEVEL) PHP_SUBST(YACC) PHP_CONFIGURE_PART(Configuring libtool) + +old_CC="$CC" + +if test "$PHP_THREAD_SAFETY" = "yes" && test -n "$ac_cv_pthreads_cflags"; then + cat >meta_ccld<meta_cc<