diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-04-07 16:01:51 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-04-07 16:01:51 +0000 |
commit | 54d1448fcc4bfe8ee7635b3b76a080b7893de584 (patch) | |
tree | 1e26ebeddef189d085312799d567862a93d95822 /autoconf | |
parent | c4329cf5059a7caedc45d77e6ee80e92b8123394 (diff) |
For PR723:
Support detection of a "CVS" directory at configure time to distinguish
whether this is a release build or a "from tree" build. This knowledge is
used to set the defaults for --enable-optimzied and --enable-assertions
options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/configure.ac | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index ad34c888f3..ec25ff8942 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -184,6 +184,23 @@ AC_SUBST(ARCH,$llvm_cv_target_arch) dnl Check for the endianness of the target AC_C_BIGENDIAN(AC_SUBST([ENDIAN],[big]),AC_SUBST([ENDIAN],[little])) +dnl Check to see if there's a "CVS" directory indicating that this build is +dnl being done from a CVS checkout. This sets up several defaults for the +dnl command line switches. When we build with a CVS directory, we get a +dnl debug with assertions turned on. Without, we assume a source release and we +dnl get an optimized build without assertions. See --enable-optimized and +dnl --enable-assertions below +if test -d "CVS" ; then + cvsbuild="yes" + optimize="no" + asserts="yes" + AC_SUBST(CVSBUILD,[[CVSBUILD=1]]) +else + cvsbuild="no" + optimize="yes" + asserts="no" +fi + dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 3: Command line arguments for the configure script. @@ -191,14 +208,23 @@ dnl=== dnl===-----------------------------------------------------------------------=== dnl --enable-optimized : check whether they want to do an optimized build: -AC_ARG_ENABLE(optimized, - AS_HELP_STRING([--enable-optimized,Compile with optimizations enabled (default is NO)]),,enableval=no) +AC_ARG_ENABLE(optimized, AS_HELP_STRING( + [--enable-optimized,Compile with optimizations enabled (default is NO)]),,enableval=$optimize) if test ${enableval} = "no" ; then AC_SUBST(ENABLE_OPTIMIZED,[[]]) else AC_SUBST(ENABLE_OPTIMIZED,[[ENABLE_OPTIMIZED=1]]) fi +dnl --enable-assertions : check whether they want to turn on assertions or not: +AC_ARG_ENABLE(assertions,AS_HELP_STRING( + [--enable-assertions,Compile with assertion checks enabled (default is NO)]),, enableval=$asserts) +if test ${enableval} = "no" ; then + AC_SUBST(ENABLE_ASSERTIONS,[[]]) +else + AC_SUBST(ENABLE_ASSERTIONS,[[ENABLE_ASSERTIONS=1]]) +fi + dnl --enable-debug-runtime : should runtime libraries have debug symbols? AC_ARG_ENABLE(debug-runtime, AS_HELP_STRING([--enable-debug-runtime,Build runtime libs with debug symbols (default is NO)]),,enableval=no) |