add option to enable position independent code generation

This commit is contained in:
Martin Reinecke 2012-09-19 11:07:30 +02:00
parent 7ab437b085
commit 5f7888db4f

View file

@ -40,6 +40,13 @@ AC_ARG_ENABLE(debug,
ENABLE_DEBUG=yes
fi])
ENABLE_PIC=no
AC_ARG_ENABLE(pic,
[ --enable-pic enable generation of position independent code],
[if test "$enableval" = yes; then
ENABLE_PIC=yes
fi])
case $CCTYPE in
gcc)
CCFLAGS="-O3 -fno-tree-vectorize -ffast-math -fomit-frame-pointer -std=c99 -pedantic -Wextra -Wall -Wno-unknown-pragmas -Wshadow -Wmissing-prototypes -Wfatal-errors"
@ -84,6 +91,10 @@ if test $ENABLE_DEBUG = yes; then
CCFLAGS="$CCFLAGS -g"
fi
if test $ENABLE_PIC = yes; then
CCFLAGS="$CCFLAGS -fPIC"
fi
if test $ENABLE_MPI = yes; then
CCFLAGS="$CCFLAGS -DUSE_MPI"
fi