summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2008-05-05 18:24:21 -0700
committerDan Nicholson <dbn.lists@gmail.com>2008-05-09 07:05:16 -0700
commitd368eed9c78aa3ced8540c66bdc4c5e1d4a067b4 (patch)
tree88835899cdc679dd4b335c9f1aa58d6b3579372c /configure.ac
parent0dbd5c864047ad2ad3d459493c9e82be57427f83 (diff)
autoconf: Attempt to figure out the PIC flags for the platform
This commit adds an autoconf macro, MESA_PIC_FLAGS, which sets the PIC flags according to platform and static/shared setting. The platform specifics are taken straight from libtool.m4 and stripped down to just the flags and platforms we cover in Mesa. This should hopefully make it possible to use autoconf on non-GCC platforms. The macro is added external to configure.ac in acinclude.m4 since it's pretty bloated. Note to BSDers: Previously, x86 defaulted to non-PIC on FreeBSD. I didn't carry that preference into this macro. Instead, you can just use --disable-pic where desired.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 3 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index cccf7bd44d3..e57f7b7de62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -879,21 +879,9 @@ AC_SUBST([ASM_FLAGS])
AC_SUBST([ASM_SOURCES])
AC_SUBST([ASM_API])
-PIC_FLAGS=""
-case "$host_os" in
-linux*)
- PIC_FLAGS="-fPIC"
- ;;
-freebsd* | dragonfly*)
- PIC_FLAGS="-fPIC"
- case "$host_cpu" in
- i?86)
- PIC_FLAGS=""
- ;;
- esac
- ;;
-esac
-AC_SUBST([PIC_FLAGS])
+dnl PIC code macro
+MESA_PIC_FLAGS
+
dnl Restore LDFLAGS and CPPFLAGS
LDFLAGS="$_SAVE_LDFLAGS"