diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Make.config | 2 | ||||
-rw-r--r-- | src/configure.ac | 15 |
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} |