aboutsummaryrefslogtreecommitdiffstats
path: root/autoconf
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-16 22:07:52 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-16 22:07:52 +0000
commit89b0d995d26d9e70b9c8d7fab8b99f1e89ac11bb (patch)
treeb4176ac5f3dea4246c058ddadc9aef6d44877224 /autoconf
parent95ca3a453ad0a86c77ba44ba48f019f1c5d8e960 (diff)
downloadexternal_llvm-89b0d995d26d9e70b9c8d7fab8b99f1e89ac11bb.zip
external_llvm-89b0d995d26d9e70b9c8d7fab8b99f1e89ac11bb.tar.gz
external_llvm-89b0d995d26d9e70b9c8d7fab8b99f1e89ac11bb.tar.bz2
Allow an --enable-pic option to turn on -fPIC compiler option when building.
The default is disabled until we know this doesn't break anyone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 3ca2e54..22718e1 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -322,6 +322,20 @@ case "$enableval" in
esac
AC_DEFINE_UNQUOTED([ENABLE_THREADS],$ENABLE_THREADS,[Define if threads enabled])
+dnl Allow building with position independent code
+AC_ARG_ENABLE(pic,
+ AS_HELP_STRING([--enable-pic],
+ [Build LLVM with Position Independent Code (default is NO)]),,
+ enableval=default)
+case "$enableval" in
+ yes) AC_SUBST(ENABLE_PIC,[1]) ;;
+ no) AC_SUBST(ENABLE_PIC,[0]) ;;
+ default) AC_SUBST(ENABLE_PIC,[0]) ;;
+ *) AC_MSG_ERROR([Invalid setting for --enable-pic. Use "yes" or "no"]) ;;
+esac
+AC_DEFINE_UNQUOTED([ENABLE_PIC],$ENABLE_PIC,
+ [Define if position independent code is enabled])
+
dnl Allow specific targets to be specified for building (or not)
TARGETS_TO_BUILD=""
AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets],