llvm.org GIT mirror llvm / 73ec952
Remove the rest of the compiler checking from the top level configure script. Only the testsuite project needs to know this information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140220 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 8 years ago
3 changed file(s) with 2 addition(s) and 204 deletion(s). Raw diff Collapse all Expand all
187187 # Targets that we should build
188188 TARGETS_TO_BUILD=@TARGETS_TO_BUILD@
189189
190 # Path to location for LLVM C/C++ front-end. You can modify this if you
191 # want to override the value set by configure.
192 LLVMGCCDIR := @LLVMGCCDIR@
193
194 # Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries:
195 LLVMGCC := @LLVMGCC@
196 LLVMGXX := @LLVMGXX@
197 LLVMCC1 := @LLVMCC1@
198 LLVMCC1PLUS := @LLVMCC1PLUS@
199 LLVMGCC_LANGS := @LLVMGCC_LANGS@
200 LLVMGCC_DRAGONEGG := @LLVMGCC_DRAGONEGG@
201
202 # Information on Clang, if configured.
203 CLANGPATH := @CLANGPATH@
204 CLANGXXPATH := @CLANGXXPATH@
205 ENABLE_BUILT_CLANG := @ENABLE_BUILT_CLANG@
206
207 # The LLVM capable compiler to use.
208 LLVMCC_OPTION := @LLVMCC_OPTION@
209
210 # The flag used to emit LLVM IR.
211 LLVMCC_EMITIR_FLAG = @LLVMCC_EMITIR_FLAG@
212 LLVMCC_DISABLEOPT_FLAGS := @LLVMCC_DISABLEOPT_FLAGS@
213
214190 # Path to directory where object files should be stored during a build.
215191 # Set OBJ_ROOT to "." if you do not want to use a separate place for
216192 # object files.
723723 AC_DEFINE_UNQUOTED([ENABLE_CBE_PRINTF_A],$ENABLE_CBE_PRINTF_A,
724724 [Define if CBE is enabled for printf %a output])
725725
726 dnl Allow a specific Clang compiler to be used with this LLVM config.
727 AC_ARG_WITH(clang,
728 AS_HELP_STRING([--with-clang],
729 [Specify location of clang compiler (default is --with-built-clang)]),
730 [],[with_clang=default])
731
732 dnl Enable use of the built Clang.
733 AC_ARG_WITH(built-clang,
734 AS_HELP_STRING([--with-built-clang],
735 [Use the compiled Clang as the LLVM compiler (default=check)]),
736 [],[with_built_clang=check])
737
738 dnl Select the Clang compiler option.
739 dnl
740 dnl If --with-clang is given, always honor that; otherwise honor
741 dnl --with-built-clang, or check if we have the clang sources.
742 AC_MSG_CHECKING([clang compiler])
743 WITH_CLANGPATH=""
744 WITH_BUILT_CLANG=0
745 if test "$with_clang" != "default"; then
746 WITH_CLANGPATH="$with_clang"
747 if ! test -x "$WITH_CLANGPATH"; then
748 AC_MSG_ERROR([invalid --with-clang, path does not specify an executable])
749 fi
750 elif test "$with_built_clang" = "yes"; then
751 WITH_BUILT_CLANG=1
752 elif test "$with_built_clang" = "no"; then
753 WITH_BUILT_CLANG=0
754 else
755 if test "$with_built_clang" != "check"; then
756 AC_MSG_ERROR([invalid value for --with-built-clang.])
757 fi
758
759 if test -f ${srcdir}/tools/clang/README.txt; then
760 WITH_BUILT_CLANG=1
761 fi
762 fi
763
764 if ! test -z "$WITH_CLANGPATH"; then
765 AC_MSG_RESULT([$WITH_CLANGPATH])
766 WITH_CLANGXXPATH=`"$WITH_CLANGPATH" --print-prog-name=clang++`
767 elif test "$WITH_BUILT_CLANG" = "1"; then
768 AC_MSG_RESULT([built])
769 else
770 AC_MSG_RESULT([none])
771 fi
772 AC_SUBST(CLANGPATH,$WITH_CLANGPATH)
773 AC_SUBST(CLANGXXPATH,$WITH_CLANGXXPATH)
774 AC_SUBST(ENABLE_BUILT_CLANG,$WITH_BUILT_CLANG)
775
776726 dnl Override the option to use for optimized builds.
777727 AC_ARG_WITH(optimize-option,
778728 AS_HELP_STRING([--with-optimize-option],
10991049 dnl libtool).
11001050 AC_LIBTOOL_DLOPEN
11011051 AC_LIB_LTDL
1102
1103 dnl Select the LLVM capable compiler to use, we default to using clang if
1104 dnl found.
1105 AC_ARG_WITH(llvmcc,
1106 AS_HELP_STRING([--with-llvmcc=],
1107 [Choose the LLVM capable compiler to use (llvm-gcc, clang, or none; default=check)]),
1108 [],[with_llvmcc=check])
1109 AC_MSG_CHECKING([LLVM capable compiler])
1110 if test "$with_llvmcc" != "check"; then
1111 if (test "$with_llvmcc" != "llvm-gcc" &&
1112 test "$with_llvmcc" != "clang" &&
1113 test "$with_llvmcc" != "none"); then
1114 AC_MSG_ERROR([invalid value for --with-llvmcc, expected 'clang', 'llvm-gcc', or 'none'.])
1115 fi
1116 WITH_LLVMCC="$with_llvmcc"
1117 elif test -n "$WITH_CLANGPATH" || test "$WITH_BUILT_CLANG" -ne "0"; then
1118 WITH_LLVMCC=clang
1119 else
1120 WITH_LLVMCC=none
1121 fi
1122 AC_MSG_RESULT([$WITH_LLVMCC])
1123 AC_SUBST(LLVMCC_OPTION,$WITH_LLVMCC)
11241052
11251053 AC_MSG_CHECKING([tool compatibility])
11261054
704704 LLVM_ENUM_ASM_PARSERS
705705 LLVM_ENUM_DISASSEMBLERS
706706 ENABLE_CBE_PRINTF_A
707 CLANGPATH
708 CLANGXXPATH
709 ENABLE_BUILT_CLANG
710707 OPTIMIZE_OPTION
711708 EXTRA_OPTIONS
712709 EXTRA_LD_OPTIONS
762759 CONVENIENCE_LTDL_TRUE
763760 CONVENIENCE_LTDL_FALSE
764761 LIBADD_DL
765 LLVMCC_OPTION
766762 NO_VARIADIC_MACROS
767763 NO_MISSING_FIELD_INITIALIZERS
768764 USE_UDIS86
14301426 Optional Packages:
14311427 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
14321428 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1433 --with-clang Specify location of clang compiler (default is
1434 --with-built-clang)
1435 --with-built-clang Use the compiled Clang as the LLVM compiler
1436 (default=check)
14371429 --with-optimize-option Select the compiler options to use for optimized
14381430 builds
14391431 --with-extra-options Specify additional options to compile LLVM with
14561448 --with-bug-report-url Specify the URL where bug reports should be
14571449 submitted (default=http://llvm.org/bugs/)
14581450 --with-tclinclude directory where tcl headers are
1459 --with-llvmcc= Choose the LLVM capable compiler to use (llvm-gcc,
1460 clang, or none; default=check)
14611451 --with-udis86= Use udis86 external x86 disassembler library
14621452 --with-oprofile=
14631453 Tell OProfile >= 0.9.4 how to symbolize JIT output
54265416
54275417
54285418
5429 # Check whether --with-clang was given.
5430 if test "${with_clang+set}" = set; then
5431 withval=$with_clang;
5432 else
5433 with_clang=default
5434 fi
5435
5436
5437
5438 # Check whether --with-built-clang was given.
5439 if test "${with_built_clang+set}" = set; then
5440 withval=$with_built_clang;
5441 else
5442 with_built_clang=check
5443 fi
5444
5445
5446 { echo "$as_me:$LINENO: checking clang compiler" >&5
5447 echo $ECHO_N "checking clang compiler... $ECHO_C" >&6; }
5448 WITH_CLANGPATH=""
5449 WITH_BUILT_CLANG=0
5450 if test "$with_clang" != "default"; then
5451 WITH_CLANGPATH="$with_clang"
5452 if ! test -x "$WITH_CLANGPATH"; then
5453 { { echo "$as_me:$LINENO: error: invalid --with-clang, path does not specify an executable" >&5
5454 echo "$as_me: error: invalid --with-clang, path does not specify an executable" >&2;}
5455 { (exit 1); exit 1; }; }
5456 fi
5457 elif test "$with_built_clang" = "yes"; then
5458 WITH_BUILT_CLANG=1
5459 elif test "$with_built_clang" = "no"; then
5460 WITH_BUILT_CLANG=0
5461 else
5462 if test "$with_built_clang" != "check"; then
5463 { { echo "$as_me:$LINENO: error: invalid value for --with-built-clang." >&5
5464 echo "$as_me: error: invalid value for --with-built-clang." >&2;}
5465 { (exit 1); exit 1; }; }
5466 fi
5467
5468 if test -f ${srcdir}/tools/clang/README.txt; then
5469 WITH_BUILT_CLANG=1
5470 fi
5471 fi
5472
5473 if ! test -z "$WITH_CLANGPATH"; then
5474 { echo "$as_me:$LINENO: result: $WITH_CLANGPATH" >&5
5475 echo "${ECHO_T}$WITH_CLANGPATH" >&6; }
5476 WITH_CLANGXXPATH=`"$WITH_CLANGPATH" --print-prog-name=clang++`
5477 elif test "$WITH_BUILT_CLANG" = "1"; then
5478 { echo "$as_me:$LINENO: result: built" >&5
5479 echo "${ECHO_T}built" >&6; }
5480 else
5481 { echo "$as_me:$LINENO: result: none" >&5
5482 echo "${ECHO_T}none" >&6; }
5483 fi
5484 CLANGPATH=$WITH_CLANGPATH
5485
5486 CLANGXXPATH=$WITH_CLANGXXPATH
5487
5488 ENABLE_BUILT_CLANG=$WITH_BUILT_CLANG
5489
5490
5491
54925419 # Check whether --with-optimize-option was given.
54935420 if test "${with_optimize_option+set}" = set; then
54945421 withval=$with_optimize_option;
1052510452 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1052610453 lt_status=$lt_dlunknown
1052710454 cat > conftest.$ac_ext <
10528 #line 10529 "configure"
10455 #line 10456 "configure"
1052910456 #include "confdefs.h"
1053010457
1053110458 #if HAVE_DLFCN_H
1218312110 fi
1218412111 done
1218512112
12186
12187
12188
12189 # Check whether --with-llvmcc was given.
12190 if test "${with_llvmcc+set}" = set; then
12191 withval=$with_llvmcc;
12192 else
12193 with_llvmcc=check
12194 fi
12195
12196 { echo "$as_me:$LINENO: checking LLVM capable compiler" >&5
12197 echo $ECHO_N "checking LLVM capable compiler... $ECHO_C" >&6; }
12198 if test "$with_llvmcc" != "check"; then
12199 if (test "$with_llvmcc" != "llvm-gcc" &&
12200 test "$with_llvmcc" != "clang" &&
12201 test "$with_llvmcc" != "none"); then
12202 { { echo "$as_me:$LINENO: error: invalid value for --with-llvmcc, expected 'clang', 'llvm-gcc', or 'none'." >&5
12203 echo "$as_me: error: invalid value for --with-llvmcc, expected 'clang', 'llvm-gcc', or 'none'." >&2;}
12204 { (exit 1); exit 1; }; }
12205 fi
12206 WITH_LLVMCC="$with_llvmcc"
12207 elif test -n "$WITH_CLANGPATH" || test "$WITH_BUILT_CLANG" -ne "0"; then
12208 WITH_LLVMCC=clang
12209 else
12210 WITH_LLVMCC=none
12211 fi
12212 { echo "$as_me:$LINENO: result: $WITH_LLVMCC" >&5
12213 echo "${ECHO_T}$WITH_LLVMCC" >&6; }
12214 LLVMCC_OPTION=$WITH_LLVMCC
1221512113
1221612114
1221712115 { echo "$as_me:$LINENO: checking tool compatibility" >&5
2219522093 LLVM_ENUM_ASM_PARSERS!$LLVM_ENUM_ASM_PARSERS$ac_delim
2219622094 LLVM_ENUM_DISASSEMBLERS!$LLVM_ENUM_DISASSEMBLERS$ac_delim
2219722095 ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim
22198 CLANGPATH!$CLANGPATH$ac_delim
22199 CLANGXXPATH!$CLANGXXPATH$ac_delim
22200 ENABLE_BUILT_CLANG!$ENABLE_BUILT_CLANG$ac_delim
2220122096 OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim
2220222097 EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim
2220322098 EXTRA_LD_OPTIONS!$EXTRA_LD_OPTIONS$ac_delim
2225322148 CONVENIENCE_LTDL_TRUE!$CONVENIENCE_LTDL_TRUE$ac_delim
2225422149 CONVENIENCE_LTDL_FALSE!$CONVENIENCE_LTDL_FALSE$ac_delim
2225522150 LIBADD_DL!$LIBADD_DL$ac_delim
22256 LLVMCC_OPTION!$LLVMCC_OPTION$ac_delim
2225722151 NO_VARIADIC_MACROS!$NO_VARIADIC_MACROS$ac_delim
2225822152 NO_MISSING_FIELD_INITIALIZERS!$NO_MISSING_FIELD_INITIALIZERS$ac_delim
2225922153 USE_UDIS86!$USE_UDIS86$ac_delim
2228322177 LTLIBOBJS!$LTLIBOBJS$ac_delim
2228422178 _ACEOF
2228522179
22286 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then
22180 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 88; then
2228722181 break
2228822182 elif $ac_last_try; then
2228922183 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5