summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2012-09-05 20:41:08 -0700
committerAndreas Boll <[email protected]>2013-01-10 22:01:31 +0100
commit3ed95dc0735795087c063288e544359a84f7ea28 (patch)
tree268d2c2f0adeef9891b1b88de53b220068e6bddf
parentf1d229ee94e25957dd6902ca11dad07b973ec45a (diff)
Remove MESA_PIC_FLAGS macro
-rw-r--r--acinclude.m4119
-rw-r--r--configure.ac7
-rw-r--r--src/gallium/Automake.inc3
-rw-r--r--src/gallium/auxiliary/pipe-loader/Makefile.am4
-rw-r--r--src/gallium/drivers/Makefile.am3
5 files changed, 5 insertions, 131 deletions
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644
index aba48a36236..00000000000
--- a/acinclude.m4
+++ /dev/null
@@ -1,119 +0,0 @@
-# A few convenience macros for Mesa, mostly to keep all the platform
-# specifics out of configure.ac.
-
-# MESA_PIC_FLAGS()
-#
-# Find out whether to build PIC code using the option --enable-pic and
-# the configure enable_static/enable_shared settings. If PIC is needed,
-# figure out the necessary flags for the platform and compiler.
-#
-# The platform checks have been shamelessly taken from libtool and
-# stripped down to just what's needed for Mesa. See _LT_COMPILER_PIC in
-# /usr/share/aclocal/libtool.m4 or
-# http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=blob;f=libltdl/m4/libtool.m4;hb=HEAD
-#
-AC_DEFUN([MESA_PIC_FLAGS],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_ARG_VAR([PIC_FLAGS], [compiler flags for PIC code])
-AC_ARG_ENABLE([pic],
- [AS_HELP_STRING([--disable-pic],
- [don't compile PIC objects @<:@default=enabled for shared builds
- on supported platforms@:>@])],
- [enable_pic="$enableval"
- test "x$enable_pic" = x && enable_pic=auto],
- [enable_pic=auto])
-# disable PIC by default for static builds
-if test "$enable_pic" = auto && test "$enable_static" = yes; then
- enable_pic=no
-fi
-# if PIC hasn't been explicitly disabled, try to figure out the flags
-if test "$enable_pic" != no; then
- AC_MSG_CHECKING([for $CC option to produce PIC])
- # allow the user's flags to override
- if test "x$PIC_FLAGS" = x; then
- # see if we're using GCC
- if test "x$GCC" = xyes; then
- case "$host_os" in
- aix*|beos*|cygwin*|irix5*|irix6*|osf3*|osf4*|osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw*|os2*|pw32*)
- # This hack is so that the source file can tell whether
- # it is being built for inclusion in a dll (and should
- # export symbols for example).
- PIC_FLAGS="-DDLL_EXPORT"
- ;;
- darwin*|rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- PIC_FLAGS="-fno-common"
- ;;
- hpux*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX,
- # but not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- PIC_FLAGS="-fPIC"
- ;;
- esac
- ;;
- *)
- # Everyone else on GCC uses -fPIC
- PIC_FLAGS="-fPIC"
- ;;
- esac
- else # !GCC
- case "$host_os" in
- hpux9*|hpux10*|hpux11*)
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX,
- # but not for PA HP-UX.
- case "$host_cpu" in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- PIC_FLAGS="+Z"
- ;;
- esac
- ;;
- linux*|k*bsd*-gnu)
- case `basename "$CC"` in
- icc*|ecc*|ifort*)
- PIC_FLAGS="-KPIC"
- ;;
- pgcc*|pgf77*|pgf90*|pgf95*)
- # Portland Group compilers (*not* the Pentium gcc
- # compiler, which looks to be a dead project)
- PIC_FLAGS="-fpic"
- ;;
- ccc*)
- # All Alpha code is PIC.
- ;;
- xl*)
- # IBM XL C 8.0/Fortran 10.1 on PPC
- PIC_FLAGS="-qpic"
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*|*Sun\ F*)
- # Sun C 5.9 or Sun Fortran
- PIC_FLAGS="-KPIC"
- ;;
- esac
- esac
- ;;
- solaris*)
- PIC_FLAGS="-KPIC"
- ;;
- sunos4*)
- PIC_FLAGS="-PIC"
- ;;
- esac
- fi # GCC
- fi # PIC_FLAGS
- AC_MSG_RESULT([$PIC_FLAGS])
-fi
-AC_SUBST([PIC_FLAGS])
-])# MESA_PIC_FLAGS
diff --git a/configure.ac b/configure.ac
index a9e57c820c2..1b2083df5e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -493,9 +493,6 @@ if test "x$enable_asm" = xyes; then
fi
AC_SUBST([MESA_ASM_FILES])
-dnl PIC code macro
-MESA_PIC_FLAGS
-
dnl Check to see if dlopen is in default libraries (like Solaris, which
dnl has it in libc), or if libdl is needed to get it.
AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
@@ -2230,9 +2227,9 @@ echo " Shared-glapi: $enable_shared_glapi"
dnl Compiler options
# cleanup the CFLAGS/CXXFLAGS/DEFINES vars
-cflags=`echo $CFLAGS $PIC_FLAGS | \
+cflags=`echo $CFLAGS | \
$SED 's/^ *//;s/ */ /;s/ *$//'`
-cxxflags=`echo $CXXFLAGS $PIC_FLAGS | \
+cxxflags=`echo $CXXFLAGS | \
$SED 's/^ *//;s/ */ /;s/ *$//'`
defines=`echo $DEFINES | $SED 's/^ *//;s/ */ /;s/ *$//'`
echo ""
diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index 54defea8536..fabc2af9a16 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -2,5 +2,4 @@ GALLIUM_CFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/auxiliary \
- $(DEFINES) \
- $(PIC_FLAGS)
+ $(DEFINES)
diff --git a/src/gallium/auxiliary/pipe-loader/Makefile.am b/src/gallium/auxiliary/pipe-loader/Makefile.am
index c63dce3fe4a..cc0be7919d1 100644
--- a/src/gallium/auxiliary/pipe-loader/Makefile.am
+++ b/src/gallium/auxiliary/pipe-loader/Makefile.am
@@ -7,8 +7,6 @@ AM_CPPFLAGS = $(DEFINES) \
-I$(top_srcdir)/src/gallium/auxiliary \
-I$(top_srcdir)/src/gallium/winsys
-AM_CFLAGS = $(PIC_FLAGS)
-
noinst_LTLIBRARIES =
if HAVE_LOADER_GALLIUM
@@ -22,7 +20,7 @@ libpipe_loader_la_SOURCES = \
if HAVE_DRM_LOADER_GALLIUM
libpipe_loader_la_SOURCES += pipe_loader_drm.c
-AM_CFLAGS += $(LIBDRM_CFLAGS)
+AM_CFLAGS = $(LIBDRM_CFLAGS)
endif
# Provide compatibility with scripts for the old Mesa build system for
diff --git a/src/gallium/drivers/Makefile.am b/src/gallium/drivers/Makefile.am
index 3652a6650a9..a70b8f7fe62 100644
--- a/src/gallium/drivers/Makefile.am
+++ b/src/gallium/drivers/Makefile.am
@@ -4,8 +4,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/auxiliary \
-I$(top_srcdir)/src/gallium/drivers \
- $(DEFINES) \
- $(PIC_FLAGS)
+ $(DEFINES)
AM_CFLAGS = $(VISIBILITY_CFLAGS)