aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2005-11-19 16:18:18 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2005-11-19 16:18:18 +0000
commit0adc030bbe2b2f66561ac3cc2b3b02d924705690 (patch)
tree32908a10c951c73abb6e4168f27680f8227f9795 /src
parent1720b31fa810489b72b2e87768edb7b72d749973 (diff)
try to use -fPIC when compiling
svn path=/trunk/externals/zexy/; revision=3972
Diffstat (limited to 'src')
-rw-r--r--src/Make.config2
-rw-r--r--src/configure.ac15
2 files changed, 16 insertions, 1 deletions
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}