llvm.org GIT mirror llvm / 65c5d75
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 Reid Spencer 12 years ago
3 changed file(s) with 77 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
312312 AC_ARG_ENABLE(threads,
313313 AS_HELP_STRING([--enable-threads],
314314 [Use threads if available (default is YES)]),,
315 enableval=yes)
315 enableval=default)
316316 case "$enableval" in
317317 yes) AC_SUBST(ENABLE_THREADS,[1]) ;;
318318 no) AC_SUBST(ENABLE_THREADS,[0]) ;;
319 default) AC_SUBST(ENABLE_THREADS,[1]) ;;
319320 *) AC_MSG_ERROR([Invalid setting for --enable-threads. Use "yes" or "no"]) ;;
320321 esac
321322 AC_DEFINE_UNQUOTED([ENABLE_THREADS],$ENABLE_THREADS,[Define if threads enabled])
354355 TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD"
355356 AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD)
356357
358 dnl Prevent the CBackend from using printf("%a") for floating point so older
359 dnl C compilers that cannot deal with the 0x0p+0 hex floating point format
360 dnl can still compile the CBE's output
361 AC_ARG_ENABLE([cbe-printf-a],AS_HELP_STRING([--enable-cbe-printf-a],
362 [Enable C Backend output with hex floating point via %a (default is YES)]),,
363 enableval=default)
364 case "$enableval" in
365 yes) AC_SUBST(ENABLE_CBE_PRINTF_A,[1]) ;;
366 no) AC_SUBST(ENABLE_CBE_PRINTF_A,[0]) ;;
367 default) AC_SUBST(ENABLE_CBE_PRINTF_A,[1]) ;;
368 *) AC_MSG_ERROR([Invalid setting for --enable-cbe-printf-a. Use "yes" or "no"]) ;;
369 esac
370 AC_DEFINE_UNQUOTED([ENABLE_CBE_PRINTF_A],$ENABLE_CBE_PRINTF_A,
371 [Define if CBE is enabled for printf %a output])
372
357373 dnl Allow a specific llvm-gcc/llvm-g++ pair to be used with this LLVM config.
358374 AC_ARG_WITH(llvmgccdir,
359375 AS_HELP_STRING([--with-llvmgccdir],
835835 ENABLE_DOXYGEN
836836 ENABLE_THREADS
837837 TARGETS_TO_BUILD
838 ENABLE_CBE_PRINTF_A
838839 EXTRA_OPTIONS
839840 CXX
840841 CXXFLAGS
15241525 --enable-threads Use threads if available (default is YES)
15251526 --enable-targets Build specific host targets:
15261527 all,host-only,{target-name} (default=all)
1528 --enable-cbe-printf-a Enable C Backend output with hex floating point via
1529 %a (default is YES)
15271530 --enable-ltdl-install install libltdl
15281531 --enable-shared[=PKGS] build shared libraries
15291532 [default=enable_shared_default]
46274630 if test "${enable_threads+set}" = set; then
46284631 enableval=$enable_threads;
46294632 else
4630 enableval=yes
4633 enableval=default
46314634 fi
46324635
46334636 case "$enableval" in
46344637 yes) ENABLE_THREADS=1
46354638 ;;
46364639 no) ENABLE_THREADS=0
4640 ;;
4641 default) ENABLE_THREADS=1
46374642 ;;
46384643 *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-threads. Use \"yes\" or \"no\"" >&5
46394644 echo "$as_me: error: Invalid setting for --enable-threads. Use \"yes\" or \"no\"" >&2;}
46854690 esac
46864691 TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD"
46874692 TARGETS_TO_BUILD=$TARGETS_TO_BUILD
4693
4694
4695 # Check whether --enable-cbe-printf-a was given.
4696 if test "${enable_cbe_printf_a+set}" = set; then
4697 enableval=$enable_cbe_printf_a;
4698 else
4699 enableval=default
4700 fi
4701
4702 case "$enableval" in
4703 yes) ENABLE_CBE_PRINTF_A=1
4704 ;;
4705 no) ENABLE_CBE_PRINTF_A=0
4706 ;;
4707 default) ENABLE_CBE_PRINTF_A=1
4708 ;;
4709 *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-cbe-printf-a. Use \"yes\" or \"no\"" >&5
4710 echo "$as_me: error: Invalid setting for --enable-cbe-printf-a. Use \"yes\" or \"no\"" >&2;}
4711 { (exit 1); exit 1; }; } ;;
4712 esac
4713
4714 cat >>confdefs.h <<_ACEOF
4715 #define ENABLE_CBE_PRINTF_A $ENABLE_CBE_PRINTF_A
4716 _ACEOF
46884717
46894718
46904719
1026810297 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1026910298 lt_status=$lt_dlunknown
1027010299 cat > conftest.$ac_ext <
10271 #line 10272 "configure"
10300 #line 10301 "configure"
1027210301 #include "confdefs.h"
1027310302
1027410303 #if HAVE_DLFCN_H
1241212441 ;;
1241312442 *-*-irix6*)
1241412443 # Find out which ABI we are using.
12415 echo '#line 12416 "configure"' > conftest.$ac_ext
12444 echo '#line 12445 "configure"' > conftest.$ac_ext
1241612445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1241712446 (eval $ac_compile) 2>&5
1241812447 ac_status=$?
1413014159 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1413114160 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1413214161 -e 's:$: $lt_compiler_flag:'`
14133 (eval echo "\"\$as_me:14134: $lt_compile\"" >&5)
14162 (eval echo "\"\$as_me:14163: $lt_compile\"" >&5)
1413414163 (eval "$lt_compile" 2>conftest.err)
1413514164 ac_status=$?
1413614165 cat conftest.err >&5
14137 echo "$as_me:14138: \$? = $ac_status" >&5
14166 echo "$as_me:14167: \$? = $ac_status" >&5
1413814167 if (exit $ac_status) && test -s "$ac_outfile"; then
1413914168 # The compiler can only warn and ignore the option if not recognized
1414014169 # So say no if there are warnings other than the usual output.
1439814427 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1439914428 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1440014429 -e 's:$: $lt_compiler_flag:'`
14401 (eval echo "\"\$as_me:14402: $lt_compile\"" >&5)
14430 (eval echo "\"\$as_me:14431: $lt_compile\"" >&5)
1440214431 (eval "$lt_compile" 2>conftest.err)
1440314432 ac_status=$?
1440414433 cat conftest.err >&5
14405 echo "$as_me:14406: \$? = $ac_status" >&5
14434 echo "$as_me:14435: \$? = $ac_status" >&5
1440614435 if (exit $ac_status) && test -s "$ac_outfile"; then
1440714436 # The compiler can only warn and ignore the option if not recognized
1440814437 # So say no if there are warnings other than the usual output.
1450214531 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1450314532 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1450414533 -e 's:$: $lt_compiler_flag:'`
14505 (eval echo "\"\$as_me:14506: $lt_compile\"" >&5)
14534 (eval echo "\"\$as_me:14535: $lt_compile\"" >&5)
1450614535 (eval "$lt_compile" 2>out/conftest.err)
1450714536 ac_status=$?
1450814537 cat out/conftest.err >&5
14509 echo "$as_me:14510: \$? = $ac_status" >&5
14538 echo "$as_me:14539: \$? = $ac_status" >&5
1451014539 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1451114540 then
1451214541 # The compiler can only warn and ignore the option if not recognized
1695416983 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1695516984 lt_status=$lt_dlunknown
1695616985 cat > conftest.$ac_ext <
16957 #line 16958 "configure"
16986 #line 16987 "configure"
1695816987 #include "confdefs.h"
1695916988
1696016989 #if HAVE_DLFCN_H
1705417083 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1705517084 lt_status=$lt_dlunknown
1705617085 cat > conftest.$ac_ext <
17057 #line 17058 "configure"
17086 #line 17087 "configure"
1705817087 #include "confdefs.h"
1705917088
1706017089 #if HAVE_DLFCN_H
1942219451 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1942319452 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1942419453 -e 's:$: $lt_compiler_flag:'`
19425 (eval echo "\"\$as_me:19426: $lt_compile\"" >&5)
19454 (eval echo "\"\$as_me:19455: $lt_compile\"" >&5)
1942619455 (eval "$lt_compile" 2>conftest.err)
1942719456 ac_status=$?
1942819457 cat conftest.err >&5
19429 echo "$as_me:19430: \$? = $ac_status" >&5
19458 echo "$as_me:19459: \$? = $ac_status" >&5
1943019459 if (exit $ac_status) && test -s "$ac_outfile"; then
1943119460 # The compiler can only warn and ignore the option if not recognized
1943219461 # So say no if there are warnings other than the usual output.
1952619555 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1952719556 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1952819557 -e 's:$: $lt_compiler_flag:'`
19529 (eval echo "\"\$as_me:19530: $lt_compile\"" >&5)
19558 (eval echo "\"\$as_me:19559: $lt_compile\"" >&5)
1953019559 (eval "$lt_compile" 2>out/conftest.err)
1953119560 ac_status=$?
1953219561 cat out/conftest.err >&5
19533 echo "$as_me:19534: \$? = $ac_status" >&5
19562 echo "$as_me:19563: \$? = $ac_status" >&5
1953419563 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1953519564 then
1953619565 # The compiler can only warn and ignore the option if not recognized
2109621125 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2109721126 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2109821127 -e 's:$: $lt_compiler_flag:'`
21099 (eval echo "\"\$as_me:21100: $lt_compile\"" >&5)
21128 (eval echo "\"\$as_me:21129: $lt_compile\"" >&5)
2110021129 (eval "$lt_compile" 2>conftest.err)
2110121130 ac_status=$?
2110221131 cat conftest.err >&5
21103 echo "$as_me:21104: \$? = $ac_status" >&5
21132 echo "$as_me:21133: \$? = $ac_status" >&5
2110421133 if (exit $ac_status) && test -s "$ac_outfile"; then
2110521134 # The compiler can only warn and ignore the option if not recognized
2110621135 # So say no if there are warnings other than the usual output.
2120021229 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2120121230 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2120221231 -e 's:$: $lt_compiler_flag:'`
21203 (eval echo "\"\$as_me:21204: $lt_compile\"" >&5)
21232 (eval echo "\"\$as_me:21233: $lt_compile\"" >&5)
2120421233 (eval "$lt_compile" 2>out/conftest.err)
2120521234 ac_status=$?
2120621235 cat out/conftest.err >&5
21207 echo "$as_me:21208: \$? = $ac_status" >&5
21236 echo "$as_me:21237: \$? = $ac_status" >&5
2120821237 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2120921238 then
2121021239 # The compiler can only warn and ignore the option if not recognized
2343523464 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2343623465 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2343723466 -e 's:$: $lt_compiler_flag:'`
23438 (eval echo "\"\$as_me:23439: $lt_compile\"" >&5)
23467 (eval echo "\"\$as_me:23468: $lt_compile\"" >&5)
2343923468 (eval "$lt_compile" 2>conftest.err)
2344023469 ac_status=$?
2344123470 cat conftest.err >&5
23442 echo "$as_me:23443: \$? = $ac_status" >&5
23471 echo "$as_me:23472: \$? = $ac_status" >&5
2344323472 if (exit $ac_status) && test -s "$ac_outfile"; then
2344423473 # The compiler can only warn and ignore the option if not recognized
2344523474 # So say no if there are warnings other than the usual output.
2370323732 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2370423733 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2370523734 -e 's:$: $lt_compiler_flag:'`
23706 (eval echo "\"\$as_me:23707: $lt_compile\"" >&5)
23735 (eval echo "\"\$as_me:23736: $lt_compile\"" >&5)
2370723736 (eval "$lt_compile" 2>conftest.err)
2370823737 ac_status=$?
2370923738 cat conftest.err >&5
23710 echo "$as_me:23711: \$? = $ac_status" >&5
23739 echo "$as_me:23740: \$? = $ac_status" >&5
2371123740 if (exit $ac_status) && test -s "$ac_outfile"; then
2371223741 # The compiler can only warn and ignore the option if not recognized
2371323742 # So say no if there are warnings other than the usual output.
2380723836 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2380823837 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2380923838 -e 's:$: $lt_compiler_flag:'`
23810 (eval echo "\"\$as_me:23811: $lt_compile\"" >&5)
23839 (eval echo "\"\$as_me:23840: $lt_compile\"" >&5)
2381123840 (eval "$lt_compile" 2>out/conftest.err)
2381223841 ac_status=$?
2381323842 cat out/conftest.err >&5
23814 echo "$as_me:23815: \$? = $ac_status" >&5
23843 echo "$as_me:23844: \$? = $ac_status" >&5
2381523844 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2381623845 then
2381723846 # The compiler can only warn and ignore the option if not recognized
3414534174 ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim
3414634175 ENABLE_THREADS!$ENABLE_THREADS$ac_delim
3414734176 TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim
34177 ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim
3414834178 EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim
3414934179 CXX!$CXX$ac_delim
3415034180 CXXFLAGS!$CXXFLAGS$ac_delim
3416134191 LN_S!$LN_S$ac_delim
3416234192 CMP!$CMP$ac_delim
3416334193 CP!$CP$ac_delim
34164 DATE!$DATE$ac_delim
3416534194 _ACEOF
3416634195
3416734196 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
3420334232 ac_delim='%!_!# '
3420434233 for ac_last_try in false false false false false :; do
3420534234 cat >conf$$subs.sed <<_ACEOF
34235 DATE!$DATE$ac_delim
3420634236 FIND!$FIND$ac_delim
3420734237 MKDIR!$MKDIR$ac_delim
3420834238 MV!$MV$ac_delim
3426834298 LTLIBOBJS!$LTLIBOBJS$ac_delim
3426934299 _ACEOF
3427034300
34271 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then
34301 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then
3427234302 break
3427334303 elif $ac_last_try; then
3427434304 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
99
1010 /* Define to 1 if using `alloca.c'. */
1111 #undef C_ALLOCA
12
13 /* Define if CBE is enabled for printf %a output */
14 #undef ENABLE_CBE_PRINTF_A
1215
1316 /* Define if threads enabled */
1417 #undef ENABLE_THREADS