summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-10-14 22:21:31 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-10-14 22:21:31 +0000
commit482d6973c539f1c571e3bfc8334cccacf7c9678a (patch)
treecd8df4cfead760cc11cd6948d9de02209280b46e
parent169f3b737620a61a338a4fb36aa30c3fbb0a19bc (diff)
downloadxine-lib-482d6973c539f1c571e3bfc8334cccacf7c9678a.tar.gz
xine-lib-482d6973c539f1c571e3bfc8334cccacf7c9678a.tar.bz2
Fixed -fPIC system dependencies. _autodetected_ usage can be overrided
by --[enable/disable]-fpic. CVS patchset: 811 CVS date: 2001/10/14 22:21:31
-rw-r--r--configure.in32
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