X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=autoconf%2Fconfigure.ac;h=15cfa347c3d63c44149f9db24a87268422364512;hb=8d3f36f05cb97efb1cc24a5c64d6c792651cd897;hp=713d278a7fdd903977aac11b91bf02453abfb41f;hpb=790e11cdff59ed6312c2f1d3d8f63537c2ae2ec5;p=oota-llvm.git diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 713d278a7fd..15cfa347c3d 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -1,8 +1,8 @@ dnl === configure.ac --------------------------------------------------------=== dnl The LLVM Compiler Infrastructure dnl -dnl This file was developed by the LLVM research group and is distributed under -dnl the University of Illinois Open Source License. See LICENSE.TXT for details. +dnl This file is distributed under the University of Illinois Open Source +dnl License. See LICENSE.TXT for details. dnl dnl===-----------------------------------------------------------------------=== dnl This is the LLVM configuration script. It is processed by the autoconf @@ -31,12 +31,12 @@ dnl=== dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl email address for reporting bugs. -AC_INIT([[llvm]],[[2.2svn]],[llvmbugs@cs.uiuc.edu]) +AC_INIT([[llvm]],[[2.4svn]],[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. -AC_SUBST(LLVM_COPYRIGHT,["Copyright (c) 2003-2007 University of Illinois at Urbana-Champaign."]) -AC_COPYRIGHT([Copyright (c) 2003-2007 University of Illinois at Urbana-Champaign.]) +AC_SUBST(LLVM_COPYRIGHT,["Copyright (c) 2003-2008 University of Illinois at Urbana-Champaign."]) +AC_COPYRIGHT([Copyright (c) 2003-2008 University of Illinois at Urbana-Champaign.]) dnl Indicate that we require autoconf 2.59 or later. Ths is needed because we dnl use some autoconf macros only available in 2.59. @@ -119,7 +119,7 @@ AC_CACHE_CHECK([type of operating system we're going to host on], llvm_cv_platform_type="Unix" ;; *-*-darwin*) llvm_cv_link_all_option="-Wl,-all_load" - llvm_cv_link_all_option="-Wl,-noall_load" + llvm_cv_no_link_all_option="-Wl,-noall_load" llvm_cv_os_type="Darwin" llvm_cv_platform_type="Unix" ;; *-*-freebsd*) @@ -216,6 +216,7 @@ AC_CACHE_CHECK([target architecture],[llvm_cv_target_arch], ia64-*) llvm_cv_target_arch="IA64" ;; arm-*) llvm_cv_target_arch="ARM" ;; mips-*) llvm_cv_target_arch="Mips" ;; + pic16-*) llvm_cv_target_arch="PIC16" ;; *) llvm_cv_target_arch="Unknown" ;; esac]) @@ -314,6 +315,7 @@ else IA64) AC_SUBST(TARGET_HAS_JIT,0) ;; ARM) AC_SUBST(TARGET_HAS_JIT,0) ;; Mips) AC_SUBST(TARGET_HAS_JIT,0) ;; + PIC16) AC_SUBST(TARGET_HAS_JIT,0) ;; *) AC_SUBST(TARGET_HAS_JIT,0) ;; esac fi @@ -363,7 +365,7 @@ AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets], [Build specific host targets: all,host-only,{target-name} (default=all)]),, enableval=all) case "$enableval" in - all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha IA64 ARM Mips" ;; + all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha IA64 ARM Mips CellSPU PIC16 CBackend MSIL CppBackend" ;; host-only) case "$llvm_cv_target_arch" in x86) TARGETS_TO_BUILD="X86" ;; @@ -374,6 +376,8 @@ case "$enableval" in IA64) TARGETS_TO_BUILD="IA64" ;; ARM) TARGETS_TO_BUILD="ARM" ;; Mips) TARGETS_TO_BUILD="Mips" ;; + CellSPU|SPU) TARGETS_TO_BUILD="CellSPU" ;; + PIC16) TARGETS_TO_BUILD="PIC16" ;; *) AC_MSG_ERROR([Can not set target to build]) ;; esac ;; @@ -387,12 +391,16 @@ case "$enableval" in ia64) TARGETS_TO_BUILD="IA64 $TARGETS_TO_BUILD" ;; arm) TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;; mips) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + spu) TARGETS_TO_BUILD="CellSPU $TARGETS_TO_BUILD" ;; + pic16) TARGETS_TO_BUILD="PIC16 $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" ;; *) AC_MSG_ERROR([Unrecognized target $a_target]) ;; esac done ;; esac -TARGETS_TO_BUILD="CBackend MSIL $TARGETS_TO_BUILD" AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD) dnl Prevent the CBackend from using printf("%a") for floating point so older @@ -421,6 +429,28 @@ case "$withval" in *) AC_MSG_ERROR([Invalid path for --with-llvmgccdir. Provide full path]) ;; esac +dnl Allow a specific llvm-gcc compiler to be used with this LLVM config. +AC_ARG_WITH(llvmgcc, + AS_HELP_STRING([--with-llvmgcc], + [Specify location of llvm-gcc driver (default searches PATH)]), + LLVMGCC=$with_llvmgcc + WITH_LLVMGCCDIR="",) + +dnl Allow a specific llvm-g++ compiler to be used with this LLVM config. +AC_ARG_WITH(llvmgxx, + AS_HELP_STRING([--with-llvmgxx], + [Specify location of llvm-g++ driver (default searches PATH)]), + LLVMGXX=$with_llvmgxx + WITH_LLVMGCCDIR="",) + +if test -n "$LLVMGCC" && test -z "$LLVMGXX"; then + AC_MSG_ERROR([Invalid llvm-g++. Use --with-llvmgxx when --with-llvmgcc is used]); +fi + +if test -n "$LLVMGXX" && test -z "$LLVMGCC"; then + AC_MSG_ERROR([Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used]); +fi + dnl Specify extra build options AC_ARG_WITH(extra-options, AS_HELP_STRING([--with-extra-options], @@ -555,18 +585,19 @@ 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 dnl nothing. This just lets the build output show that we could have done dnl something if the tool was available. -AC_PATH_PROG(BZIP2,[bzip2],[echo "Skipped: bzip2 not found"]) -AC_PATH_PROG(DOXYGEN,[doxygen],[echo "Skipped: doxygen not found"]) -AC_PATH_PROG(GROFF,[groff],[echo "Skipped: groff not found"]) -AC_PATH_PROG(GZIP,[gzip],[echo "Skipped: gzip not found"]) -AC_PATH_PROG(POD2HTML,[pod2html],[echo "Skipped: pod2html not found"]) -AC_PATH_PROG(POD2MAN,[pod2man],[echo "Skipped: pod2man not found"]) -AC_PATH_PROG(RUNTEST,[runtest],[echo "Skipped: runtest not found"]) +AC_PATH_PROG(BZIP2, [bzip2]) +AC_PATH_PROG(DOXYGEN, [doxygen]) +AC_PATH_PROG(GROFF, [groff]) +AC_PATH_PROG(GZIP, [gzip]) +AC_PATH_PROG(POD2HTML, [pod2html]) +AC_PATH_PROG(POD2MAN, [pod2man]) +AC_PATH_PROG(RUNTEST, [runtest]) DJ_AC_PATH_TCLSH -AC_PATH_PROG(ZIP,[zip],[echo "Skipped: zip not found"]) -AC_PATH_PROG(OCAMLC,[ocamlc],[echo "Skipped: ocamlc not found"]) -AC_PATH_PROG(OCAMLOPT,[ocamlopt],[echo "Skipped: ocamlopt not found"]) -AC_PATH_PROG(OCAMLDEP,[ocamldep],[echo "Skipped: ocamldep not found"]) +AC_PATH_PROG(ZIP, [zip]) +AC_PATH_PROGS(OCAMLC, [ocamlc.opt ocamlc]) +AC_PATH_PROGS(OCAMLOPT, [ocamlopt.opt ocamlopt]) +AC_PATH_PROGS(OCAMLDEP, [ocamldep.opt ocamldep]) +AC_PATH_PROGS(OCAMLDOC, [ocamldoc.opt ocamldoc]) dnl Determine if the linker supports the -R option. AC_LINK_USE_R @@ -589,8 +620,12 @@ if test "$WITH_LLVMGCCDIR" = "default" ; then AC_PATH_PROG(LLVMGCC, $LLVMGCC, []) AC_PATH_PROG(LLVMGXX, $LLVMGXX, []) else - LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}" - LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}" + if test -z "$LLVMGCC"; then + LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}" + fi + if test -z "$LLVMGXX"; then + LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}" + fi AC_SUBST(LLVMGCC,$LLVMGCC) AC_SUBST(LLVMGXX,$LLVMGXX) fi @@ -627,11 +662,10 @@ fi dnl Verify that GCC is version 3.0 or higher if test "$GCC" = "yes" then - gccmajor=`$CC --version | head -n 1 | sed 's/[[^0-9]]*\([[0-9.]]\).*/\1/'` - if test "$gccmajor" -lt "3" - then - AC_MSG_ERROR([gcc 3.x required, but you have a lower version]) - fi + AC_COMPILE_IFELSE([[#if !defined(__GNUC__) || __GNUC__ < 3 +#error Unsupported GCC version +#endif +]], [], [AC_MSG_ERROR([gcc 3.x required, but you have a lower version])]) fi dnl Check for GNU Make. We use its extensions, so don't build without it @@ -657,12 +691,6 @@ if test "$llvm_cv_os_type" = "MingW" ; then AC_CHECK_LIB(psapi, main) fi -dnl lt_dlopen may be required for plugin support. -AC_SEARCH_LIBS(lt_dlopen,ltdl,AC_DEFINE([HAVE_LT_DLOPEN],[1], - [Define if lt_dlopen() is available on this platform]), - AC_MSG_WARN([lt_dlopen() not found - plugin support might - not be available])) - dnl dlopen() is required for plugin support. AC_SEARCH_LIBS(dlopen,dl,AC_DEFINE([HAVE_DLOPEN],[1], [Define if dlopen() is available on this platform.]), @@ -953,9 +981,9 @@ 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/Support/DataTypes.h]) -AC_CONFIG_HEADERS([include/llvm/ADT/hash_map]) -AC_CONFIG_HEADERS([include/llvm/ADT/hash_set]) -AC_CONFIG_HEADERS([include/llvm/ADT/iterator]) +AC_CONFIG_HEADERS([include/llvm/ADT/hash_map.h]) +AC_CONFIG_HEADERS([include/llvm/ADT/hash_set.h]) +AC_CONFIG_HEADERS([include/llvm/ADT/iterator.h]) dnl Configure the makefile's configuration data AC_CONFIG_FILES([Makefile.config])