X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=configure;h=a65e9e4d9465b4018ce0ff5ae9c10ce71c8399f2;hp=82aa6ad545ae725ce8e0bd9817bd6b5f8e0dad73;hb=9993a3aebb27c5cac55429a23af2d2a0f129cb95;hpb=63c095199939bfa2711346a6394c5d9171b31f15 diff --git a/configure b/configure index 82aa6ad545a..a65e9e4d946 100755 --- a/configure +++ b/configure @@ -765,6 +765,7 @@ CONVENIENCE_LTDL_FALSE LIBADD_DL NO_VARIADIC_MACROS NO_MISSING_FIELD_INITIALIZERS +COVERED_SWITCH_DEFAULT USE_UDIS86 USE_OPROFILE HAVE_PTHREAD @@ -1442,12 +1443,7 @@ Optional Packages: resource files --with-c-include-dirs Colon separated list of directories clang will search for headers - --with-cxx-include-root Directory with the libstdc++ headers. - --with-cxx-include-arch Architecture of the libstdc++ headers. - --with-cxx-include-32bit-dir - 32 bit multilib dir. - --with-cxx-include-64bit-dir - 64 bit multilib directory. + --with-gcc-toolchain Directory where gcc is installed. --with-binutils-include Specify path to binutils/include/ containing plugin-api.h file for gold plugin. --with-bug-report-url Specify the URL where bug reports should be @@ -1903,6 +1899,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +cat >>confdefs.h <<\_ACEOF +#define LLVM_VERSION_MAJOR 3 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define LLVM_VERSION_MINOR 1 +_ACEOF + + LLVM_COPYRIGHT="Copyright (c) 2003-2012 University of Illinois at Urbana-Champaign." @@ -5535,7 +5541,7 @@ else fi case "$withval" in - -) clang_src_root="$ac_pwd/tools/clang" ;; + -) clang_src_root="" ;; /* | [A-Za-z]:[\\/]*) clang_src_root="$withval" ;; *) clang_src_root="$ac_pwd/$withval" ;; esac @@ -5570,59 +5576,20 @@ cat >>confdefs.h <<_ACEOF _ACEOF +# Clang normally uses the system c++ headers and libraries. With this option, +# clang will use the ones provided by a gcc installation instead. This option should +# be passed the same value that was used with --prefix when configuring gcc. -# Check whether --with-cxx-include-root was given. -if test "${with_cxx_include_root+set}" = set; then - withval=$with_cxx_include_root; -else - withval="" -fi - - -cat >>confdefs.h <<_ACEOF -#define CXX_INCLUDE_ROOT "$withval" -_ACEOF - - - -# Check whether --with-cxx-include-arch was given. -if test "${with_cxx_include_arch+set}" = set; then - withval=$with_cxx_include_arch; -else - withval="" -fi - - -cat >>confdefs.h <<_ACEOF -#define CXX_INCLUDE_ARCH "$withval" -_ACEOF - - - -# Check whether --with-cxx-include-32bit-dir was given. -if test "${with_cxx_include_32bit_dir+set}" = set; then - withval=$with_cxx_include_32bit_dir; -else - withval="" -fi - - -cat >>confdefs.h <<_ACEOF -#define CXX_INCLUDE_32BIT_DIR "$withval" -_ACEOF - - - -# Check whether --with-cxx-include-64bit-dir was given. -if test "${with_cxx_include_64bit_dir+set}" = set; then - withval=$with_cxx_include_64bit_dir; +# Check whether --with-gcc-toolchain was given. +if test "${with_gcc_toolchain+set}" = set; then + withval=$with_gcc_toolchain; else withval="" fi cat >>confdefs.h <<_ACEOF -#define CXX_INCLUDE_64BIT_DIR "$withval" +#define GCC_INSTALL_PREFIX "$withval" _ACEOF @@ -7816,7 +7783,7 @@ else # Check for ld64. if (echo "$version_string" | grep -q "ld64"); then - llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)#\1#") + llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)\( (.*)\)\{0,1\}#\1#") else llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#") fi @@ -10497,7 +10464,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&6; } { echo "$as_me:$LINENO: checking optional compiler flags" >&5 echo $ECHO_N "checking optional compiler flags... $ECHO_C" >&6; } -NO_VARIADIC_MACROS=`$CXX -Wno-variadic-macros -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-variadic-macros` +NO_VARIADIC_MACROS=`$CXX -Werror -Wno-variadic-macros -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-variadic-macros` -NO_MISSING_FIELD_INITIALIZERS=`$CXX -Wno-missing-field-initializers -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-missing-field-initializers` +NO_MISSING_FIELD_INITIALIZERS=`$CXX -Werror -Wno-missing-field-initializers -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-missing-field-initializers` -{ echo "$as_me:$LINENO: result: $NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS" >&5 -echo "${ECHO_T}$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS" >&6; } +COVERED_SWITCH_DEFAULT=`$CXX -Werror -Wcovered-switch-default -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wcovered-switch-default` + +{ echo "$as_me:$LINENO: result: $NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT" >&5 +echo "${ECHO_T}$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT" >&6; } @@ -20974,7 +20943,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu oldcxxflags="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden -Werror" + CXXFLAGS="$CXXFLAGS -O0 -fvisibility-inlines-hidden -Werror" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21095,10 +21064,15 @@ ac_config_files="$ac_config_files llvm.spec" ac_config_files="$ac_config_files docs/doxygen.cfg" +if test "${clang_src_root}" = ""; then + clang_src_root="$srcdir/tools/clang" +fi if test -f ${clang_src_root}/README.txt; then - ac_config_headers="$ac_config_headers ${clang_src_root}/include/clang/Config/config.h" + configh="include/clang/Config/config.h" + doxy="docs/doxygen.cfg" + ac_config_headers="$ac_config_headers tools/clang/${configh}:${clang_src_root}/${configh}.in" - ac_config_files="$ac_config_files ${clang_src_root}/docs/doxygen.cfg" + ac_config_files="$ac_config_files tools/clang/${doxy}:${clang_src_root}/${doxy}.in" fi @@ -21720,8 +21694,8 @@ do "Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;; "llvm.spec") CONFIG_FILES="$CONFIG_FILES llvm.spec" ;; "docs/doxygen.cfg") CONFIG_FILES="$CONFIG_FILES docs/doxygen.cfg" ;; - "${clang_src_root}/include/clang/Config/config.h") CONFIG_HEADERS="$CONFIG_HEADERS ${clang_src_root}/include/clang/Config/config.h" ;; - "${clang_src_root}/docs/doxygen.cfg") CONFIG_FILES="$CONFIG_FILES ${clang_src_root}/docs/doxygen.cfg" ;; + "tools/clang/${configh}") CONFIG_HEADERS="$CONFIG_HEADERS tools/clang/${configh}:${clang_src_root}/${configh}.in" ;; + "tools/clang/${doxy}") CONFIG_FILES="$CONFIG_FILES tools/clang/${doxy}:${clang_src_root}/${doxy}.in" ;; "bindings/ocaml/llvm/META.llvm") CONFIG_FILES="$CONFIG_FILES bindings/ocaml/llvm/META.llvm" ;; "setup") CONFIG_COMMANDS="$CONFIG_COMMANDS setup" ;; "Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;; @@ -22003,6 +21977,7 @@ CONVENIENCE_LTDL_FALSE!$CONVENIENCE_LTDL_FALSE$ac_delim LIBADD_DL!$LIBADD_DL$ac_delim NO_VARIADIC_MACROS!$NO_VARIADIC_MACROS$ac_delim NO_MISSING_FIELD_INITIALIZERS!$NO_MISSING_FIELD_INITIALIZERS$ac_delim +COVERED_SWITCH_DEFAULT!$COVERED_SWITCH_DEFAULT$ac_delim USE_UDIS86!$USE_UDIS86$ac_delim USE_OPROFILE!$USE_OPROFILE$ac_delim HAVE_PTHREAD!$HAVE_PTHREAD$ac_delim @@ -22030,7 +22005,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5