summaryrefslogtreecommitdiff
path: root/autoconf
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2010-02-25 06:34:33 +0000
committerJeffrey Yasskin <jyasskin@google.com>2010-02-25 06:34:33 +0000
commitc90171961d020d93e4ce548016d8ccb8aab00c57 (patch)
tree639ac8f1a8273a2563895bed7d55bd60fbff5f46 /autoconf
parente6ba0b576231ad3af599d1985dad370e59d954f9 (diff)
downloadllvm-c90171961d020d93e4ce548016d8ccb8aab00c57.tar.gz
llvm-c90171961d020d93e4ce548016d8ccb8aab00c57.tar.bz2
llvm-c90171961d020d93e4ce548016d8ccb8aab00c57.tar.xz
Try r96559 for the third time. This time the shared library is only built if
--enable-shared is passed to configure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97119 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index d785c362e2..aebbf7bf82 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -472,6 +472,18 @@ esac
AC_DEFINE_UNQUOTED([ENABLE_PIC],$ENABLE_PIC,
[Define if position independent code is enabled])
+dnl Allow building a shared library and linking tools against it.
+AC_ARG_ENABLE(shared,
+ AS_HELP_STRING([--enable-shared],
+ [Build a shared library and link tools against it (default is NO)]),,
+ enableval=default)
+case "$enableval" in
+ yes) AC_SUBST(ENABLE_SHARED,[1]) ;;
+ no) AC_SUBST(ENABLE_SHARED,[0]) ;;
+ default) AC_SUBST(ENABLE_SHARED,[0]) ;;
+ *) AC_MSG_ERROR([Invalid setting for --enable-shared. Use "yes" or "no"]) ;;
+esac
+
dnl Allow specific targets to be specified for building (or not)
TARGETS_TO_BUILD=""
AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets],
@@ -1336,6 +1348,10 @@ dnl Propagate the shared library extension that the libltdl checks did to
dnl the Makefiles so we can use it there too
AC_SUBST(SHLIBEXT,$libltdl_cv_shlibext)
+dnl Propagate the run-time library path variable that the libltdl
+dnl checks found to the Makefiles so we can use it there too
+AC_SUBST(SHLIBPATH_VAR,$libltdl_cv_shlibpath_var)
+
# Translate the various configuration directories and other basic
# information into substitutions that will end up in Makefile.config.in
# that these configured values can be used by the makefiles