add option to enable position independent code generation
This commit is contained in:
parent
7ab437b085
commit
5f7888db4f
1 changed files with 11 additions and 0 deletions
11
configure.ac
11
configure.ac
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue