diff --git a/configure.in b/configure.in index 366d4afdb79..ec0ad5fb171 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<