diff options
-rw-r--r-- | configure.in | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/configure.in b/configure.in index a35f055c4..aca3e598e 100644 --- a/configure.in +++ b/configure.in @@ -378,6 +378,15 @@ dnl ip_mreqn dnl AC_CHECK_IP_MREQN + +dnl +dnl Using or not using -fPIC (override default behavior - system dependent) +dnl +AC_ARG_ENABLE(fpic, + [ --disable-fpic disable -fPIC on shared libs (default on x86)], + no_fpic=yes, no_fpic=no) + + dnl dnl Some extra checks. dnl @@ -409,7 +418,6 @@ COMMON_CFLAGS="$wall -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE" enable_w32dll="no" enable_ffmmx="no" - host_or_hostalias="$host" if test "$host_or_hostalias" = ""; then dnl user has called ./configure with a host parameter unknown to @@ -432,6 +440,7 @@ case "$host_or_hostalias" in enable_w32dll="yes" enable_ffmmx="yes" + no_fpic="yes" ;; @@ -508,6 +517,7 @@ case "$host_or_hostalias" in AC_DEFINE(FPM_64BIT) fi + no_fpic="yes" AC_DEFINE(__i386__) ;; @@ -755,7 +765,23 @@ misc/build_rpms.sh], [chmod +x ./misc/SlackBuild ./misc/build_rpms.sh ./misc/guenter_rpms.sh; rm -f include/xine.h; echo '/* !! DO NO EDIT THIS FILE, it is automatically generated */' > include/xine.h && cat include/xine.h.tmpl >> include/xine.h]) dnl -dnl Hack the libtool script. +dnl Hack the libtool script (if required). dnl -cat libtool | sed -e 's/^pic_flag=/#pic_flag=/' > libtool-nofpic +dnl If user intentionnaly overrided detection, use wish. +if test x"$enable_fpic" != x; then + case "${enable_fpic}" in + yes) + no_fpic="no" + ;; + *) + no_fpic="yes" + ;; + esac +fi +if test x$no_fpic = "xyes"; then + cat libtool | sed -e 's/^pic_flag=/#pic_flag=/' > libtool-nofpic +else + cat libtool > libtool-nofpic +fi + chmod +x libtool-nofpic |