[llvm-commits] CVS: llvm/autoconf/configure.ac

Reid Spencer reid at x10sys.com
Sun Nov 5 09:08:34 PST 2006



Changes in directory llvm/autoconf:

configure.ac updated: 1.248 -> 1.249
---
Log message:

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.


---
Diffs of the changes:  (+17 -1)

 configure.ac |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletion(-)


Index: llvm/autoconf/configure.ac
diff -u llvm/autoconf/configure.ac:1.248 llvm/autoconf/configure.ac:1.249
--- llvm/autoconf/configure.ac:1.248	Fri Nov  3 12:04:08 2006
+++ llvm/autoconf/configure.ac	Sun Nov  5 11:08:18 2006
@@ -313,10 +313,11 @@
 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 @@
 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],






More information about the llvm-commits mailing list