diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-11-05 17:08:18 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-11-05 17:08:18 +0000 |
commit | 65c5d75bc8900c61707f54f4057040fac4a8d58a (patch) | |
tree | 8afa7851df065b4784b0174cb0764faf167ee67e /autoconf | |
parent | 8b2989ae91872bcf1b32c3fbba737212da38d29c (diff) |
Add a -disable-cbe-printf-a option so that the output of the C Backend
stands a chance of being compiled with a non C99 C compiler. The default
is enabled so you must specifically disable this feature if you want the
CBE output compiled with an older C compiler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/configure.ac | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 78cb86d4d4..3085084f5e 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -313,10 +313,11 @@ dnl Allow disablement of threads AC_ARG_ENABLE(threads, AS_HELP_STRING([--enable-threads], [Use threads if available (default is YES)]),, - enableval=yes) + enableval=default) case "$enableval" in yes) AC_SUBST(ENABLE_THREADS,[1]) ;; no) AC_SUBST(ENABLE_THREADS,[0]) ;; + default) AC_SUBST(ENABLE_THREADS,[1]) ;; *) AC_MSG_ERROR([Invalid setting for --enable-threads. Use "yes" or "no"]) ;; esac AC_DEFINE_UNQUOTED([ENABLE_THREADS],$ENABLE_THREADS,[Define if threads enabled]) @@ -355,6 +356,21 @@ esac TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD" AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD) +dnl Prevent the CBackend from using printf("%a") for floating point so older +dnl C compilers that cannot deal with the 0x0p+0 hex floating point format +dnl can still compile the CBE's output +AC_ARG_ENABLE([cbe-printf-a],AS_HELP_STRING([--enable-cbe-printf-a], + [Enable C Backend output with hex floating point via %a (default is YES)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_CBE_PRINTF_A,[1]) ;; + no) AC_SUBST(ENABLE_CBE_PRINTF_A,[0]) ;; + default) AC_SUBST(ENABLE_CBE_PRINTF_A,[1]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-cbe-printf-a. Use "yes" or "no"]) ;; +esac +AC_DEFINE_UNQUOTED([ENABLE_CBE_PRINTF_A],$ENABLE_CBE_PRINTF_A, + [Define if CBE is enabled for printf %a output]) + dnl Allow a specific llvm-gcc/llvm-g++ pair to be used with this LLVM config. AC_ARG_WITH(llvmgccdir, AS_HELP_STRING([--with-llvmgccdir], |