X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=autoconf%2Fconfigure.ac;h=3b4019658ccdc0121e0cef6faa315a6739240efc;hb=b6fd0b481c265449ffcd10c66fb1415cf9000a79;hp=22f15b7feb011b0c9f9638525ec7cddb1b290d86;hpb=f28411f732960981f8920195ad8f7e6792396961;p=oota-llvm.git diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 22f15b7feb0..3b4019658cc 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -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.7svn]],[llvmbugs@cs.uiuc.edu]) +AC_INIT([[llvm]],[[2.8svn]],[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-2009 University of Illinois at Urbana-Champaign."]) -AC_COPYRIGHT([Copyright (c) 2003-2009 University of Illinois at Urbana-Champaign.]) +AC_SUBST(LLVM_COPYRIGHT,["Copyright (c) 2003-2010 University of Illinois at Urbana-Champaign."]) +AC_COPYRIGHT([Copyright (c) 2003-2010 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. @@ -62,6 +62,41 @@ dnl Configure all of the projects present in our source tree. While we could dnl just AC_CONFIG_SUBDIRS on the set of directories in projects that have a dnl configure script, that usage of the AC_CONFIG_SUBDIRS macro is deprecated. dnl Instead we match on the known projects. + +dnl +dnl One tricky part of doing this is that some projects depend upon other +dnl projects. For example, several projects rely upon the LLVM test suite. +dnl We want to configure those projects first so that their object trees are +dnl created before running the configure scripts of projects that depend upon +dnl them. +dnl + +dnl Several projects use llvm-gcc, so configure that first +if test -d ${srcdir}/projects/llvm-gcc ; then + AC_CONFIG_SUBDIRS([projects/llvm-gcc]) +fi + +dnl Several projects use the LLVM test suite, so configure it next. +if test -d ${srcdir}/projects/test-suite ; then + AC_CONFIG_SUBDIRS([projects/test-suite]) +fi + +dnl llvm-test is the old name of the test-suite, kept here for backwards +dnl compatibility +if test -d ${srcdir}/projects/llvm-test ; then + AC_CONFIG_SUBDIRS([projects/llvm-test]) +fi + +dnl Some projects use poolalloc; configure that next +if test -d ${srcdir}/projects/poolalloc ; then + AC_CONFIG_SUBDIRS([projects/poolalloc]) +fi + +if test -d ${srcdir}/projects/llvm-poolalloc ; then + AC_CONFIG_SUBDIRS([projects/llvm-poolalloc]) +fi + +dnl Check for all other projects for i in `ls ${srcdir}/projects` do if test -d ${srcdir}/projects/${i} ; then @@ -70,18 +105,16 @@ do sample) AC_CONFIG_SUBDIRS([projects/sample]) ;; privbracket) AC_CONFIG_SUBDIRS([projects/privbracket]) ;; llvm-stacker) AC_CONFIG_SUBDIRS([projects/llvm-stacker]) ;; - # llvm-test is the old name of the test-suite, kept here for backwards - # compatibility - llvm-test) AC_CONFIG_SUBDIRS([projects/llvm-test]) ;; - test-suite) AC_CONFIG_SUBDIRS([projects/test-suite]) ;; llvm-reopt) AC_CONFIG_SUBDIRS([projects/llvm-reopt]);; - llvm-gcc) AC_CONFIG_SUBDIRS([projects/llvm-gcc]) ;; llvm-java) AC_CONFIG_SUBDIRS([projects/llvm-java]) ;; llvm-tv) AC_CONFIG_SUBDIRS([projects/llvm-tv]) ;; - llvm-poolalloc) AC_CONFIG_SUBDIRS([projects/llvm-poolalloc]) ;; - poolalloc) AC_CONFIG_SUBDIRS([projects/poolalloc]) ;; safecode) AC_CONFIG_SUBDIRS([projects/safecode]) ;; llvm-kernel) AC_CONFIG_SUBDIRS([projects/llvm-kernel]) ;; + llvm-gcc) ;; + test-suite) ;; + llvm-test) ;; + poolalloc) ;; + llvm-poolalloc) ;; *) AC_MSG_WARN([Unknown project (${i}) won't be configured automatically]) ;; @@ -126,6 +159,11 @@ AC_CACHE_CHECK([type of operating system we're going to host on], llvm_cv_no_link_all_option="-Wl,-noall_load" llvm_cv_os_type="Darwin" llvm_cv_platform_type="Unix" ;; + *-*-minix*) + llvm_cv_link_all_option="-Wl,-all_load" + llvm_cv_no_link_all_option="-Wl,-noall_load" + llvm_cv_os_type="Minix" + llvm_cv_platform_type="Unix" ;; *-*-freebsd*) llvm_cv_link_all_option="-Wl,--whole-archive" llvm_cv_no_link_all_option="-Wl,--no-whole-archive" @@ -214,6 +252,8 @@ AC_CACHE_CHECK([type of operating system we're going to target], llvm_cv_target_os_type="Cygwin" ;; *-*-darwin*) llvm_cv_target_os_type="Darwin" ;; + *-*-minix*) + llvm_cv_target_os_type="Minix" ;; *-*-freebsd*) llvm_cv_target_os_type="FreeBSD" ;; *-*-openbsd*) @@ -688,8 +728,9 @@ AC_MSG_CHECKING([optimization flags]) case "$withval" in default) case "$llvm_cv_os_type" in - MingW) optimize_option=-O3 ;; - *) optimize_option=-O2 ;; + FreeBSD) optimize_option=-O2 ;; + MingW) optimize_option=-O2 ;; + *) optimize_option=-O3 ;; esac ;; *) optimize_option="$withval" ;; esac @@ -982,6 +1023,9 @@ AC_LINK_USE_R dnl Determine whether the linker supports the -export-dynamic option. AC_LINK_EXPORT_DYNAMIC +dnl Determine whether the linker supports the -retain-symbols-file option. +AC_LINK_RETAIN_SYMBOLS_FILE + dnl Check for libtool and the library that has dlopen function (which must come dnl before the AC_PROG_LIBTOOL check in order to enable dlopening libraries with dnl libtool). @@ -1250,7 +1294,7 @@ AC_CHECK_FUNCS([backtrace ceilf floorf roundf rintf nearbyintf getcwd ]) AC_CHECK_FUNCS([powf fmodf strtof round ]) AC_CHECK_FUNCS([getpagesize getrusage getrlimit setrlimit gettimeofday ]) AC_CHECK_FUNCS([isatty mkdtemp mkstemp ]) -AC_CHECK_FUNCS([mktemp realpath sbrk setrlimit strdup ]) +AC_CHECK_FUNCS([mktemp posix_spawn realpath sbrk setrlimit strdup ]) AC_CHECK_FUNCS([strerror strerror_r strerror_s setenv ]) AC_CHECK_FUNCS([strtoll strtoq sysconf malloc_zone_statistics ]) AC_CHECK_FUNCS([setjmp longjmp sigsetjmp siglongjmp])