From 0adc030bbe2b2f66561ac3cc2b3b02d924705690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Sat, 19 Nov 2005 16:18:18 +0000 Subject: try to use -fPIC when compiling svn path=/trunk/externals/zexy/; revision=3972 --- src/Make.config | 2 +- src/configure.ac | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Make.config b/src/Make.config index 2ad4bb5..05f8cb3 100644 --- a/src/Make.config +++ b/src/Make.config @@ -21,7 +21,7 @@ WFLAGS = TARNAME = $(LIBNAME)-2.1.tgz # ICCFLAGS=-march=pentiumiii -axK -Z_CFLAGS = $(DEFS) $(IFLAGS) $(WFLAGS) -g -O2 -mms-bitfields -DPD $(CFLAGS) +Z_CFLAGS = $(DEFS) $(IFLAGS) $(WFLAGS) -g -O2 -mms-bitfields -fPIC -DPD $(CFLAGS) MAKEDEP_FLAGS = -MM diff --git a/src/configure.ac b/src/configure.ac index 95966c6..aa36af9 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -127,6 +127,21 @@ else fi +AC_MSG_CHECKING("PIC") +cat > conftest.c << EOF +int main(){ + return 0; +} +EOF +if ${CC} ${INCLUDES} ${DFLAGS} -o conftest.o conftest.c ${CFLAGS} -fPIC > /dev/null 2>&1 +then + echo "yes" + CFLAGS="${CFLAGS} -fPIC" +else + echo "no" +fi + + dnl if we don't have $LD set, we set it to $(CC) dnl LD=${LD:=$CC} -- cgit v1.2.1