diff options
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/configure.ac | 24 | ||||
-rw-r--r-- | autoconf/m4/define_subst.m4 | 5 |
2 files changed, 23 insertions, 6 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index bffee5fad2..f376e03d97 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -32,8 +32,8 @@ dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl address for reporting bugs. AC_INIT([LLVM],[3.5svn],[http://llvm.org/bugs/]) -AC_DEFINE([LLVM_VERSION_MAJOR], [3], [Major version of the LLVM API]) -AC_DEFINE([LLVM_VERSION_MINOR], [5], [Minor version of the LLVM API]) +LLVM_DEFINE_SUBST([LLVM_VERSION_MAJOR], [3], [Major version of the LLVM API]) +LLVM_DEFINE_SUBST([LLVM_VERSION_MINOR], [5], [Minor version of the LLVM API]) dnl Provide a copyright substitution and ensure the copyright notice is included dnl in the output of --version option of the generated configure script. @@ -432,6 +432,7 @@ esac dnl Define a substitution, ARCH, for the target architecture AC_SUBST(ARCH,$llvm_cv_target_arch) +AC_SUBST(LLVM_NATIVE_ARCH,$LLVM_NATIVE_ARCH) dnl Determine what our host architecture. dnl This will allow MCJIT regress tests runs only for supported @@ -768,6 +769,9 @@ else esac fi +TARGETS_WITH_JIT="AArch64 ARM Mips PowerPC SystemZ X86" +AC_SUBST(TARGETS_WITH_JIT,$TARGETS_WITH_JIT) + dnl Allow enablement of building and installing docs AC_ARG_ENABLE(docs, AS_HELP_STRING([--enable-docs], @@ -917,6 +921,10 @@ if test "$llvm_cv_enable_crash_overrides" = "yes" ; then [Define to enable crash handling overrides]) fi +dnl List all possible targets +ALL_TARGETS="X86 Sparc PowerPC AArch64 ARM Mips XCore MSP430 CppBackend NVPTX Hexagon SystemZ R600" +AC_SUBST(ALL_TARGETS,$ALL_TARGETS) + dnl Allow specific targets to be specified for building (or not) TARGETS_TO_BUILD="" AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets], @@ -928,7 +936,7 @@ if test "$enableval" = host-only ; then enableval=host fi case "$enableval" in - all) TARGETS_TO_BUILD="X86 Sparc PowerPC AArch64 ARM Mips XCore MSP430 CppBackend NVPTX Hexagon SystemZ R600" ;; + all) TARGETS_TO_BUILD="$ALL_TARGETS" ;; *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do case "$a_target" in x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; @@ -1189,6 +1197,10 @@ AC_ARG_ENABLE(terminfo,AS_HELP_STRING( *) AC_MSG_ERROR([Invalid setting for --enable-terminfo. Use "yes" or "no"]) ;; esac], llvm_cv_enable_terminfo="yes") +case "$llvm_cv_enable_terminfo" in + yes) AC_SUBST(ENABLE_TERMINFO,[1]) ;; + no) AC_SUBST(ENABLE_TERMINFO,[0]) ;; +esac dnl --enable-libedit: check whether the user wants to turn off libedit. AC_ARG_ENABLE(libedit,AS_HELP_STRING( @@ -1500,7 +1512,7 @@ if test "$llvm_cv_os_type" = "MingW" ; then fi dnl dlopen() is required for plugin support. -AC_SEARCH_LIBS(dlopen,dl,AC_DEFINE([HAVE_DLOPEN],[1], +AC_SEARCH_LIBS(dlopen,dl,LLVM_DEFINE_SUBST([HAVE_DLOPEN],[1], [Define if dlopen() is available on this platform.]), AC_MSG_WARN([dlopen() not found - disabling plugin support])) @@ -1513,8 +1525,8 @@ dnl The curses library is optional; used for querying terminal info if test "$llvm_cv_enable_terminfo" = "yes" ; then dnl We need the has_color functionality in curses for it to be useful. AC_SEARCH_LIBS(setupterm,tinfo terminfo curses ncurses ncursesw, - AC_DEFINE([HAVE_TERMINFO],[1], - [Define if the setupterm() function is supported this platform.])) + LLVM_DEFINE_SUBST([HAVE_TERMINFO],[1], + [Define if the setupterm() function is supported this platform.])) fi dnl The libedit library is optional; used by lib/LineEditor diff --git a/autoconf/m4/define_subst.m4 b/autoconf/m4/define_subst.m4 new file mode 100644 index 0000000000..c66333f2fb --- /dev/null +++ b/autoconf/m4/define_subst.m4 @@ -0,0 +1,5 @@ +# Combine AC_DEFINE and AC_SUBST +AC_DEFUN([LLVM_DEFINE_SUBST], [ +AC_DEFINE([$1], [$2], [$3]) +AC_SUBST([$1], ['$2']) +]) |