diff options
Diffstat (limited to 'contrib/llvm/autoconf')
-rw-r--r-- | contrib/llvm/autoconf/configure.ac | 86 | ||||
-rw-r--r-- | contrib/llvm/autoconf/m4/bison.m4 | 15 | ||||
-rw-r--r-- | contrib/llvm/autoconf/m4/cxx_bidi_iterator.m4 | 22 | ||||
-rw-r--r-- | contrib/llvm/autoconf/m4/cxx_fwd_iterator.m4 | 22 | ||||
-rw-r--r-- | contrib/llvm/autoconf/m4/cxx_namespaces.m4 | 19 | ||||
-rw-r--r-- | contrib/llvm/autoconf/m4/cxx_std_iterator.m4 | 26 | ||||
-rw-r--r-- | contrib/llvm/autoconf/m4/flex.m4 | 17 | ||||
-rw-r--r-- | contrib/llvm/autoconf/m4/link_options.m4 | 21 |
8 files changed, 61 insertions, 167 deletions
diff --git a/contrib/llvm/autoconf/configure.ac b/contrib/llvm/autoconf/configure.ac index be320cf..de32744 100644 --- a/contrib/llvm/autoconf/configure.ac +++ b/contrib/llvm/autoconf/configure.ac @@ -31,7 +31,7 @@ dnl=== dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl email address for reporting bugs. -AC_INIT([[llvm]],[[2.8svn]],[llvmbugs@cs.uiuc.edu]) +AC_INIT([[llvm]],[[2.8rc]],[llvmbugs@cs.uiuc.edu]) dnl Provide a copyright substitution and ensure the copyright notice is included dnl in the output of --version option of the generated configure script. @@ -101,7 +101,6 @@ for i in `ls ${srcdir}/projects` do if test -d ${srcdir}/projects/${i} ; then case ${i} in - CVS) ;; sample) AC_CONFIG_SUBDIRS([projects/sample]) ;; privbracket) AC_CONFIG_SUBDIRS([projects/privbracket]) ;; llvm-stacker) AC_CONFIG_SUBDIRS([projects/llvm-stacker]) ;; @@ -299,7 +298,7 @@ dnl Set the LINKALL and NOLINKALL Makefile variables based on the platform AC_SUBST(LINKALL,$llvm_cv_link_all_option) AC_SUBST(NOLINKALL,$llvm_cv_no_link_all_option) -dnl Set the "LLVM_ON_*" variables based on llvm_cvs_platform_type +dnl Set the "LLVM_ON_*" variables based on llvm_cv_platform_type dnl This is used by lib/System to determine the basic kind of implementation dnl to use. case $llvm_cv_platform_type in @@ -369,13 +368,13 @@ else AC_SUBST(LLVM_CROSS_COMPILING, [0]) fi -dnl Check to see if there's a "CVS" (or .svn or .git) directory indicating -dnl that this build is being done from a checkout. This sets up several -dnl defaults for the command line switches. When we build with a CVS directory, +dnl Check to see if there's a .svn or .git directory indicating that this +dnl build is being done from a checkout. This sets up several defaults for +dnl the command line switches. When we build with a checkout directory, dnl we get a debug with assertions turned on. Without, we assume a source dnl release and we get an optimized build without assertions. dnl See --enable-optimized and --enable-assertions below -if test -d "CVS" -o -d "${srcdir}/CVS" -o -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then +if test -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then cvsbuild="yes" optimize="no" AC_SUBST(CVSBUILD,[[CVSBUILD=1]]) @@ -392,7 +391,7 @@ dnl===-----------------------------------------------------------------------=== dnl --enable-optimized : check whether they want to do an optimized build: AC_ARG_ENABLE(optimized, AS_HELP_STRING( - --enable-optimized,[Compile with optimizations enabled (default is NO)]),,enableval=$optimize) + --enable-optimized,[Compile with optimizations enabled (default is YES)]),,enableval="yes") if test ${enableval} = "no" ; then AC_SUBST(ENABLE_OPTIMIZED,[[]]) else @@ -410,7 +409,7 @@ fi dnl --enable-assertions : check whether they want to turn on assertions or not: AC_ARG_ENABLE(assertions,AS_HELP_STRING( - --enable-assertions,[Compile with assertion checks enabled (default is YES)]),, enableval="yes") + --enable-assertions,[Compile with assertion checks enabled (default is NO)]),, enableval="no") if test ${enableval} = "yes" ; then AC_SUBST(DISABLE_ASSERTIONS,[[]]) else @@ -544,13 +543,13 @@ TARGETS_TO_BUILD="" AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets], [Build specific host targets: all or target1,target2,... Valid targets are: host, x86, x86_64, sparc, powerpc, alpha, arm, mips, spu, pic16, - xcore, msp430, systemz, blackfin, cbe, msil, and cpp (default=all)]),, + xcore, msp430, systemz, blackfin, cbe, and cpp (default=all)]),, enableval=all) if test "$enableval" = host-only ; then enableval=host fi case "$enableval" in - all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend MBlaze" ;; + all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend CppBackend MBlaze" ;; *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do case "$a_target" in x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; @@ -567,7 +566,6 @@ case "$enableval" in systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; blackfin) TARGETS_TO_BUILD="Blackfin $TARGETS_TO_BUILD" ;; cbe) TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD" ;; - msil) TARGETS_TO_BUILD="MSIL $TARGETS_TO_BUILD" ;; cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;; mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;; host) case "$llvm_cv_target_arch" in @@ -598,9 +596,17 @@ AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD) # If so, define LLVM_NATIVE_ARCH to that LLVM target. for a_target in $TARGETS_TO_BUILD; do if test "$a_target" = "$LLVM_NATIVE_ARCH"; then - LLVM_NATIVE_ARCHTARGET="${LLVM_NATIVE_ARCH}Target" - AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH,$LLVM_NATIVE_ARCHTARGET, + AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH, $LLVM_NATIVE_ARCH, [LLVM architecture name for the native architecture, if available]) + LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target" + LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo" + LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter" + AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGET, $LLVM_NATIVE_TARGET, + [LLVM name for the native Target init function, if available]) + AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGETINFO, $LLVM_NATIVE_TARGETINFO, + [LLVM name for the native TargetInfo init function, if available]) + AC_DEFINE_UNQUOTED(LLVM_NATIVE_ASMPRINTER, $LLVM_NATIVE_ASMPRINTER, + [LLVM name for the native AsmPrinter init function, if available]) fi done @@ -857,35 +863,6 @@ AC_ARG_ENABLE(libffi,AS_HELP_STRING( esac], llvm_cv_enable_libffi=no) -dnl Only Windows needs dynamic libCompilerDriver to support plugins. -if test "$llvm_cv_os_type" = "Win32" ; then - llvmc_dynamic="yes" -else - llvmc_dynamic="no" -fi - -dnl --enable-llvmc-dynamic : should LLVMC link libCompilerDriver dynamically? -AC_ARG_ENABLE(llvmc-dynamic,AS_HELP_STRING( ---enable-llvmc-dynamic, -[Link LLVMC dynamically (default is NO, unless on Win32)]),, -enableval=$llvmc_dynamic) -if test ${enableval} = "yes" && test "$ENABLE_PIC" -eq 1 ; then - AC_SUBST(ENABLE_LLVMC_DYNAMIC,[[ENABLE_LLVMC_DYNAMIC=1]]) -else - AC_SUBST(ENABLE_LLVMC_DYNAMIC,[[]]) -fi - -dnl --enable-llvmc-dynamic-plugins : should LLVMC support dynamic plugins? -AC_ARG_ENABLE(llvmc-dynamic-plugins,AS_HELP_STRING( ---enable-llvmc-dynamic-plugins, -[Enable dynamic LLVMC plugins (default is YES)]),, -enableval=yes) -if test ${enableval} = "yes" ; then - AC_SUBST(ENABLE_LLVMC_DYNAMIC_PLUGINS,[[ENABLE_LLVMC_DYNAMIC_PLUGINS=1]]) -else - AC_SUBST(ENABLE_LLVMC_DYNAMIC_PLUGINS,[[]]) -fi - dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 4: Check for programs we need and that they are the right version @@ -1011,6 +988,13 @@ fi dnl Find the install program AC_PROG_INSTALL +dnl Prepend src dir to install path dir if it's a relative path +dnl This is a hack for installs that take place in something other +dnl than the top level. +case "$INSTALL" in + [[\\/$]]* | ?:[[\\/]]* ) ;; + *) INSTALL="\\\$(TOPSRCDIR)/$INSTALL" ;; +esac dnl Checks for documentation and testing tools that we can do without. If these dnl are not found then they are set to "true" which always succeeds but does @@ -1033,6 +1017,9 @@ AC_PATH_PROGS(OCAMLDEP, [ocamldep]) AC_PATH_PROGS(OCAMLDOC, [ocamldoc]) AC_PATH_PROGS(GAS, [gas as]) +dnl Get the version of the linker in use. +AC_LINK_GET_VERSION + dnl Determine whether the linker supports the -R option. AC_LINK_USE_R @@ -1345,6 +1332,9 @@ fi dnl atomic builtins are required for threading support. AC_MSG_CHECKING(for GCC atomic builtins) +dnl Since we'll be using these atomic builtins in C++ files we should test +dnl the C++ compiler. +AC_LANG_PUSH([C++]) AC_LINK_IFELSE( AC_LANG_SOURCE( [[int main() { @@ -1356,13 +1346,13 @@ AC_LINK_IFELSE( return 0; } ]]), + AC_LANG_POP([C++]) AC_MSG_RESULT(yes) AC_DEFINE(LLVM_MULTITHREADED, 1, Build multithreading support into LLVM), AC_MSG_RESULT(no) AC_DEFINE(LLVM_MULTITHREADED, 0, Build multithreading support into LLVM) AC_MSG_WARN([LLVM will be built thread-unsafe because atomic builtins are missing])) - dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 9: Additional checks, variables, etc. @@ -1549,7 +1539,11 @@ dnl WARNING: dnl If you add or remove any of the following config headers, then dnl you MUST also update Makefile.rules so that the variable FilesToConfig dnl contains the same list of files as AC_CONFIG_HEADERS below. This ensures the dnl files can be updated automatically when their *.in sources change. -AC_CONFIG_HEADERS([include/llvm/Config/config.h]) +AC_CONFIG_HEADERS([include/llvm/Config/config.h include/llvm/Config/llvm-config.h]) +AH_TOP([#ifndef CONFIG_H +#define CONFIG_H]) +AH_BOTTOM([#endif]) + AC_CONFIG_FILES([include/llvm/Config/Targets.def]) AC_CONFIG_FILES([include/llvm/Config/AsmPrinters.def]) AC_CONFIG_FILES([include/llvm/Config/AsmParsers.def]) @@ -1563,7 +1557,7 @@ dnl Configure the RPM spec file for LLVM AC_CONFIG_FILES([llvm.spec]) dnl Configure llvmc's Base plugin -AC_CONFIG_FILES([tools/llvmc/plugins/Base/Base.td]) +AC_CONFIG_FILES([tools/llvmc/src/Base.td]) dnl Do the first stage of configuration for llvm-config.in. AC_CONFIG_FILES([tools/llvm-config/llvm-config.in]) diff --git a/contrib/llvm/autoconf/m4/bison.m4 b/contrib/llvm/autoconf/m4/bison.m4 deleted file mode 100644 index 48b83cc..0000000 --- a/contrib/llvm/autoconf/m4/bison.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# -# Check for Bison. -# -# This macro verifies that Bison is installed. If successful, then -# 1) YACC is set to bison -y (to emulate YACC calls) -# 2) BISON is set to bison -# -AC_DEFUN([AC_PROG_BISON], -[AC_CACHE_CHECK([],[llvm_cv_has_bison],[AC_PROG_YACC()]) -if test "$YACC" != "bison -y"; then - AC_SUBST(BISON,[]) - AC_MSG_WARN([bison not found, can't rebuild grammars]) -else - AC_SUBST(BISON,[bison]) -fi]) diff --git a/contrib/llvm/autoconf/m4/cxx_bidi_iterator.m4 b/contrib/llvm/autoconf/m4/cxx_bidi_iterator.m4 deleted file mode 100644 index d7de856..0000000 --- a/contrib/llvm/autoconf/m4/cxx_bidi_iterator.m4 +++ /dev/null @@ -1,22 +0,0 @@ -# -# Check for bidirectional iterator extension. This is modified from -# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html -# -AC_DEFUN([AC_CXX_HAVE_BI_ITERATOR], -[AC_CACHE_CHECK(whether the compiler has the bidirectional iterator, -ac_cv_cxx_have_bi_iterator, -[AC_REQUIRE([AC_CXX_NAMESPACES]) - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <iterator> -#ifdef HAVE_NAMESPACES -using namespace std; -#endif]], [[bidirectional_iterator<int,int> t; return 0;]])],[ac_cv_cxx_have_bi_iterator=yes],[ac_cv_cxx_have_bi_iterator=no]) - AC_LANG_POP([C++]) -]) -if test "$ac_cv_cxx_have_bi_iterator" = yes -then - AC_DEFINE(HAVE_BI_ITERATOR,1,[Have bi-directional iterator]) -else - AC_DEFINE(HAVE_BI_ITERATOR,0,[Does not have bi-directional iterator]) -fi -]) diff --git a/contrib/llvm/autoconf/m4/cxx_fwd_iterator.m4 b/contrib/llvm/autoconf/m4/cxx_fwd_iterator.m4 deleted file mode 100644 index eb7660c..0000000 --- a/contrib/llvm/autoconf/m4/cxx_fwd_iterator.m4 +++ /dev/null @@ -1,22 +0,0 @@ -# Check for forward iterator extension. This is modified from -# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html -AC_DEFUN([AC_CXX_HAVE_FWD_ITERATOR], -[AC_CACHE_CHECK(whether the compiler has forward iterators, -ac_cv_cxx_have_fwd_iterator, -[AC_REQUIRE([AC_CXX_NAMESPACES]) - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <iterator> -#ifdef HAVE_NAMESPACES -using namespace std; -#endif]], [[forward_iterator<int,int> t; return 0;]])],[ac_cv_cxx_have_fwd_iterator=yes],[ac_cv_cxx_have_fwd_iterator=no]) - AC_LANG_POP([C++]) -]) -if test "$ac_cv_cxx_have_fwd_iterator" = yes -then - AC_DEFINE(HAVE_FWD_ITERATOR,1,[Have forward iterator]) -else - AC_DEFINE(HAVE_FWD_ITERATOR,0,[Does not have forward iterator]) -fi -]) - - diff --git a/contrib/llvm/autoconf/m4/cxx_namespaces.m4 b/contrib/llvm/autoconf/m4/cxx_namespaces.m4 deleted file mode 100644 index d8d650e..0000000 --- a/contrib/llvm/autoconf/m4/cxx_namespaces.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# Check for C++ namespace support. This is from -# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_namespaces.html -# -AC_DEFUN([AC_CXX_NAMESPACES], -[AC_CACHE_CHECK(whether the compiler implements namespaces, -ac_cv_cxx_namespaces, -[AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[namespace Outer { namespace Inner { int i = 0; }}]], - [[using namespace Outer::Inner; return i;]])], - ac_cv_cxx_namespaces=yes, - ac_cv_cxx_namespaces=no) - AC_LANG_POP([C++]) -]) -if test "$ac_cv_cxx_namespaces" = yes; then - AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) -fi -]) - diff --git a/contrib/llvm/autoconf/m4/cxx_std_iterator.m4 b/contrib/llvm/autoconf/m4/cxx_std_iterator.m4 deleted file mode 100644 index 38a6117..0000000 --- a/contrib/llvm/autoconf/m4/cxx_std_iterator.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# Check for standard iterator extension. This is modified from -# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html -AC_DEFUN([AC_CXX_HAVE_STD_ITERATOR], -[AC_CACHE_CHECK(whether the compiler has the standard iterator, -ac_cv_cxx_have_std_iterator, -[AC_REQUIRE([AC_CXX_NAMESPACES]) - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#include <iterator> -#ifdef HAVE_NAMESPACES -using namespace std; -#endif]], - [[iterator<int,int,int> t; return 0;]])], - ac_cv_cxx_have_std_iterator=yes, - ac_cv_cxx_have_std_iterator=no) - AC_LANG_POP([C++]) -]) -if test "$ac_cv_cxx_have_std_iterator" = yes -then - AC_DEFINE(HAVE_STD_ITERATOR,1,[Have std namespace iterator]) -else - AC_DEFINE(HAVE_STD_ITERATOR,0,[Does not have std namespace iterator]) -fi -]) - - diff --git a/contrib/llvm/autoconf/m4/flex.m4 b/contrib/llvm/autoconf/m4/flex.m4 deleted file mode 100644 index 5cb3dc4..0000000 --- a/contrib/llvm/autoconf/m4/flex.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# -# Check for FLEX. -# -# This macro verifies that flex is installed. If successful, then -# 1) $LEX is set to "flex" (to emulate lex calls) -# 2) BISON is set to bison -AC_DEFUN([AC_PROG_FLEX], -[AC_CACHE_CHECK(, -ac_cv_has_flex, -[AC_PROG_LEX() -]) -if test "$LEX" != "flex"; then - AC_MSG_ERROR([flex not found but required]) -else - AC_SUBST(FLEX,[flex],[location of flex]) -fi -]) diff --git a/contrib/llvm/autoconf/m4/link_options.m4 b/contrib/llvm/autoconf/m4/link_options.m4 index b48710c..4c5f2f4 100644 --- a/contrib/llvm/autoconf/m4/link_options.m4 +++ b/contrib/llvm/autoconf/m4/link_options.m4 @@ -1,4 +1,25 @@ # +# Get the linker version string. +# +# This macro is specific to LLVM. +# +AC_DEFUN([AC_LINK_GET_VERSION], + [AC_CACHE_CHECK([for linker version],[llvm_cv_link_version], + [ + version_string="$(ld -v 2>&1 | head -1)" + + # Check for ld64. + if (echo "$version_string" | grep -q "ld64"); then + llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)#\1#") + else + llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#") + fi + ]) + AC_DEFINE_UNQUOTED([HOST_LINK_VERSION],"$llvm_cv_link_version", + [Linker version detected at compile time.]) +]) + +# # Determine if the system can handle the -R option being passed to the linker. # # This macro is specific to LLVM. |