Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1 | dnl === configure.ac --------------------------------------------------------=== |
| 2 | dnl The LLVM Compiler Infrastructure |
| 3 | dnl |
Chris Lattner | 6787a45 | 2007-12-29 22:59:10 +0000 | [diff] [blame] | 4 | dnl This file is distributed under the University of Illinois Open Source |
| 5 | dnl License. See LICENSE.TXT for details. |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 6 | dnl |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 7 | dnl===-----------------------------------------------------------------------=== |
| 8 | dnl This is the LLVM configuration script. It is processed by the autoconf |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 9 | dnl program to produce a script named configure. This script contains the |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 10 | dnl configuration checks that LLVM needs in order to support multiple platforms. |
| 11 | dnl This file is composed of 10 sections per the recommended organization of |
| 12 | dnl autoconf input defined in the autoconf documentation. As this file evolves, |
| 13 | dnl please keep the various types of checks within their sections. The sections |
| 14 | dnl are as follows: |
| 15 | dnl |
| 16 | dnl SECTION 1: Initialization & Setup |
| 17 | dnl SECTION 2: Architecture, target, and host checks |
| 18 | dnl SECTION 3: Command line arguments for the configure script. |
| 19 | dnl SECTION 4: Check for programs we need and that they are the right version |
| 20 | dnl SECTION 5: Check for libraries |
| 21 | dnl SECTION 6: Check for header files |
| 22 | dnl SECTION 7: Check for types and structures |
| 23 | dnl SECTION 8: Check for specific functions needed |
| 24 | dnl SECTION 9: Additional checks, variables, etc. |
| 25 | dnl SECTION 10: Specify the output files and generate it |
| 26 | dnl |
| 27 | dnl===-----------------------------------------------------------------------=== |
| 28 | dnl=== |
| 29 | dnl=== SECTION 1: Initialization & Setup |
| 30 | dnl=== |
| 31 | dnl===-----------------------------------------------------------------------=== |
| 32 | dnl Initialize autoconf and define the package name, version number and |
Dylan Noblesmith | 67c4970 | 2011-12-18 18:50:16 +0000 | [diff] [blame] | 33 | dnl address for reporting bugs. |
Tom Stellard | e6ba81d | 2014-03-03 15:22:00 +0000 | [diff] [blame] | 34 | |
Hans Wennborg | 8a6340d | 2015-07-14 22:35:57 +0000 | [diff] [blame^] | 35 | AC_INIT([LLVM],[3.8.0svn],[http://llvm.org/bugs/]) |
Tom Stellard | e6ba81d | 2014-03-03 15:22:00 +0000 | [diff] [blame] | 36 | |
| 37 | LLVM_VERSION_MAJOR=3 |
Hans Wennborg | 8a6340d | 2015-07-14 22:35:57 +0000 | [diff] [blame^] | 38 | LLVM_VERSION_MINOR=8 |
Tom Stellard | e6ba81d | 2014-03-03 15:22:00 +0000 | [diff] [blame] | 39 | LLVM_VERSION_PATCH=0 |
| 40 | LLVM_VERSION_SUFFIX=svn |
| 41 | |
| 42 | AC_DEFINE_UNQUOTED([LLVM_VERSION_MAJOR], $LLVM_VERSION_MAJOR, [Major version of the LLVM API]) |
| 43 | AC_DEFINE_UNQUOTED([LLVM_VERSION_MINOR], $LLVM_VERSION_MINOR, [Minor version of the LLVM API]) |
| 44 | AC_DEFINE_UNQUOTED([LLVM_VERSION_PATCH], $LLVM_VERSION_PATCH, [Patch version of the LLVM API]) |
Peter Collingbourne | a8ed79a | 2014-11-19 03:34:17 +0000 | [diff] [blame] | 45 | AC_DEFINE_UNQUOTED([LLVM_VERSION_STRING], "$PACKAGE_VERSION", [LLVM version string]) |
Tom Stellard | e6ba81d | 2014-03-03 15:22:00 +0000 | [diff] [blame] | 46 | |
| 47 | AC_SUBST([LLVM_VERSION_MAJOR]) |
| 48 | AC_SUBST([LLVM_VERSION_MINOR]) |
| 49 | AC_SUBST([LLVM_VERSION_PATCH]) |
| 50 | AC_SUBST([LLVM_VERSION_SUFFIX]) |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 51 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 52 | dnl Provide a copyright substitution and ensure the copyright notice is included |
| 53 | dnl in the output of --version option of the generated configure script. |
Eric Christopher | a1bafae | 2015-03-12 01:25:29 +0000 | [diff] [blame] | 54 | AC_SUBST(LLVM_COPYRIGHT,["Copyright (c) 2003-2015 University of Illinois at Urbana-Champaign."]) |
| 55 | AC_COPYRIGHT([Copyright (c) 2003-2015 University of Illinois at Urbana-Champaign.]) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 56 | |
Eric Christopher | b9a1132 | 2011-09-23 00:53:10 +0000 | [diff] [blame] | 57 | dnl Indicate that we require autoconf 2.60 or later. |
| 58 | AC_PREREQ(2.60) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 59 | |
| 60 | dnl Verify that the source directory is valid. This makes sure that we are |
| 61 | dnl configuring LLVM and not some other package (it validates --srcdir argument) |
Chandler Carruth | fbdae1f | 2013-01-02 09:22:59 +0000 | [diff] [blame] | 62 | AC_CONFIG_SRCDIR([lib/IR/Module.cpp]) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 63 | |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 64 | dnl Place all of the extra autoconf files into the config subdirectory. Tell |
| 65 | dnl various tools where the m4 autoconf macros are. |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 66 | AC_CONFIG_AUX_DIR([autoconf]) |
| 67 | |
John Criswell | 22107a7 | 2003-09-15 17:04:06 +0000 | [diff] [blame] | 68 | dnl Quit if the source directory has already been configured. |
John Criswell | f6778b6 | 2003-09-15 17:19:42 +0000 | [diff] [blame] | 69 | dnl NOTE: This relies upon undocumented autoconf behavior. |
Reid Spencer | 2024d0e | 2004-09-19 23:43:52 +0000 | [diff] [blame] | 70 | if test ${srcdir} != "." ; then |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 71 | if test -f ${srcdir}/include/llvm/Config/config.h ; then |
| 72 | AC_MSG_ERROR([Already configured in ${srcdir}]) |
| 73 | fi |
John Criswell | 22107a7 | 2003-09-15 17:04:06 +0000 | [diff] [blame] | 74 | fi |
| 75 | |
Jonathan Roelofs | 949d55d | 2015-05-04 02:04:54 +0000 | [diff] [blame] | 76 | dnl Quit if it is an in-source build |
| 77 | if test ${srcdir} == "." ; then |
Jonathan Roelofs | 0e9ff69 | 2015-07-01 18:09:21 +0000 | [diff] [blame] | 78 | AC_MSG_ERROR([In-source builds are not allowed. Please configure from a separate build directory!]) |
Jonathan Roelofs | 949d55d | 2015-05-04 02:04:54 +0000 | [diff] [blame] | 79 | fi |
| 80 | |
Patrik Hagglund | d91ae4d | 2013-02-04 08:15:53 +0000 | [diff] [blame] | 81 | dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS, |
| 82 | dnl instead of the autoconf default (for example, '-g -O2' for CC=gcc). |
Patrik Hagglund | 9857847 | 2013-09-24 11:38:45 +0000 | [diff] [blame] | 83 | : ${CFLAGS=} |
| 84 | : ${CXXFLAGS=} |
Patrik Hagglund | d91ae4d | 2013-02-04 08:15:53 +0000 | [diff] [blame] | 85 | |
Eric Christopher | 5883971 | 2011-09-16 20:36:25 +0000 | [diff] [blame] | 86 | dnl We need to check for the compiler up here to avoid anything else |
| 87 | dnl starting with a different one. |
Chandler Carruth | b4dd3c6 | 2014-01-14 03:46:00 +0000 | [diff] [blame] | 88 | AC_PROG_CC(clang gcc) |
| 89 | AC_PROG_CXX(clang++ g++) |
Eric Christopher | 5883971 | 2011-09-16 20:36:25 +0000 | [diff] [blame] | 90 | AC_PROG_CPP |
| 91 | |
Dmitri Gribenko | 06358bd | 2013-01-09 15:25:30 +0000 | [diff] [blame] | 92 | dnl If CXX is Clang, check that it can find and parse C++ standard library |
| 93 | dnl headers. |
| 94 | if test "$CXX" = "clang++" ; then |
| 95 | AC_MSG_CHECKING([whether clang works]) |
| 96 | AC_LANG_PUSH([C++]) |
| 97 | dnl Note that space between 'include' and '(' is required. There's a broken |
| 98 | dnl regex in aclocal that otherwise will think that we call m4's include |
| 99 | dnl builtin. |
| 100 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits> |
| 101 | #if __has_include (<cxxabi.h>) |
| 102 | #include <cxxabi.h> |
| 103 | #endif |
| 104 | #if __has_include (<unwind.h>) |
| 105 | #include <unwind.h> |
| 106 | #endif |
| 107 | ]])], |
| 108 | [ |
| 109 | AC_MSG_RESULT([yes]) |
| 110 | ], |
| 111 | [ |
| 112 | AC_MSG_RESULT([no]) |
Jonathan Roelofs | cf1ba1d | 2015-04-29 20:06:41 +0000 | [diff] [blame] | 113 | AC_MSG_ERROR([Selected compiler could not find or parse C++ standard library headers. Rerun with CC=c-compiler CXX=c++-compiler LLVM_SRC_DIR/configure ...]) |
Dmitri Gribenko | 06358bd | 2013-01-09 15:25:30 +0000 | [diff] [blame] | 114 | ]) |
| 115 | AC_LANG_POP([C++]) |
| 116 | fi |
| 117 | |
Chandler Carruth | 75a6545 | 2014-01-14 05:02:38 +0000 | [diff] [blame] | 118 | dnl Set up variables that track whether the host compiler is GCC or Clang where |
| 119 | dnl we can effectively sanity check them. We don't try to sanity check all the |
| 120 | dnl other possible compilers. |
| 121 | AC_MSG_CHECKING([whether GCC or Clang is our host compiler]) |
| 122 | AC_LANG_PUSH([C++]) |
| 123 | llvm_cv_cxx_compiler=unknown |
Chandler Carruth | f8c6ccf | 2014-01-15 10:31:15 +0000 | [diff] [blame] | 124 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#if ! __clang__ |
| 125 | #error |
| 126 | #endif |
| 127 | ]])], |
Chandler Carruth | 75a6545 | 2014-01-14 05:02:38 +0000 | [diff] [blame] | 128 | llvm_cv_cxx_compiler=clang, |
Chandler Carruth | f8c6ccf | 2014-01-15 10:31:15 +0000 | [diff] [blame] | 129 | [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#if ! __GNUC__ |
| 130 | #error |
| 131 | #endif |
| 132 | ]])], |
Chandler Carruth | 75a6545 | 2014-01-14 05:02:38 +0000 | [diff] [blame] | 133 | llvm_cv_cxx_compiler=gcc, [])]) |
| 134 | AC_LANG_POP([C++]) |
| 135 | AC_MSG_RESULT([${llvm_cv_cxx_compiler}]) |
| 136 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 137 | dnl Configure all of the projects present in our source tree. While we could |
| 138 | dnl just AC_CONFIG_SUBDIRS on the set of directories in projects that have a |
| 139 | dnl configure script, that usage of the AC_CONFIG_SUBDIRS macro is deprecated. |
| 140 | dnl Instead we match on the known projects. |
John Criswell | f369e77 | 2010-03-19 21:31:39 +0000 | [diff] [blame] | 141 | |
| 142 | dnl |
| 143 | dnl One tricky part of doing this is that some projects depend upon other |
| 144 | dnl projects. For example, several projects rely upon the LLVM test suite. |
| 145 | dnl We want to configure those projects first so that their object trees are |
| 146 | dnl created before running the configure scripts of projects that depend upon |
| 147 | dnl them. |
| 148 | dnl |
| 149 | |
John Criswell | f369e77 | 2010-03-19 21:31:39 +0000 | [diff] [blame] | 150 | dnl Several projects use the LLVM test suite, so configure it next. |
| 151 | if test -d ${srcdir}/projects/test-suite ; then |
| 152 | AC_CONFIG_SUBDIRS([projects/test-suite]) |
| 153 | fi |
| 154 | |
| 155 | dnl llvm-test is the old name of the test-suite, kept here for backwards |
| 156 | dnl compatibility |
| 157 | if test -d ${srcdir}/projects/llvm-test ; then |
| 158 | AC_CONFIG_SUBDIRS([projects/llvm-test]) |
| 159 | fi |
| 160 | |
| 161 | dnl Some projects use poolalloc; configure that next |
| 162 | if test -d ${srcdir}/projects/poolalloc ; then |
| 163 | AC_CONFIG_SUBDIRS([projects/poolalloc]) |
| 164 | fi |
| 165 | |
| 166 | if test -d ${srcdir}/projects/llvm-poolalloc ; then |
| 167 | AC_CONFIG_SUBDIRS([projects/llvm-poolalloc]) |
| 168 | fi |
| 169 | |
| 170 | dnl Check for all other projects |
John Criswell | 297baed | 2003-11-25 20:36:46 +0000 | [diff] [blame] | 171 | for i in `ls ${srcdir}/projects` |
| 172 | do |
Reid Spencer | 90de7fb | 2004-09-07 16:26:18 +0000 | [diff] [blame] | 173 | if test -d ${srcdir}/projects/${i} ; then |
| 174 | case ${i} in |
John Criswell | 4d377d8 | 2010-02-25 22:57:19 +0000 | [diff] [blame] | 175 | safecode) AC_CONFIG_SUBDIRS([projects/safecode]) ;; |
Daniel Dunbar | 7ce849d | 2011-12-07 22:07:03 +0000 | [diff] [blame] | 176 | compiler-rt) ;; |
John Criswell | 4e61b25 | 2010-03-25 13:59:09 +0000 | [diff] [blame] | 177 | test-suite) ;; |
| 178 | llvm-test) ;; |
| 179 | poolalloc) ;; |
| 180 | llvm-poolalloc) ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 181 | *) |
Alkis Evlogimenos | 2622728 | 2004-09-27 07:35:19 +0000 | [diff] [blame] | 182 | AC_MSG_WARN([Unknown project (${i}) won't be configured automatically]) |
Reid Spencer | c6f9e0f | 2004-09-21 17:12:35 +0000 | [diff] [blame] | 183 | ;; |
Reid Spencer | 90de7fb | 2004-09-07 16:26:18 +0000 | [diff] [blame] | 184 | esac |
John Criswell | 297baed | 2003-11-25 20:36:46 +0000 | [diff] [blame] | 185 | fi |
| 186 | done |
John Criswell | ee7ebdc | 2003-09-30 16:31:48 +0000 | [diff] [blame] | 187 | |
Tobias Grosser | ea9dca4 | 2010-10-30 00:54:26 +0000 | [diff] [blame] | 188 | dnl Disable the build of polly, even if it is checked out into tools/polly. |
| 189 | AC_ARG_ENABLE(polly, |
| 190 | AS_HELP_STRING([--enable-polly], |
| 191 | [Use polly if available (default is YES)]),, |
| 192 | enableval=default) |
| 193 | case "$enableval" in |
| 194 | yes) AC_SUBST(ENABLE_POLLY,[1]) ;; |
| 195 | no) AC_SUBST(ENABLE_POLLY,[0]) ;; |
| 196 | default) AC_SUBST(ENABLE_POLLY,[1]) ;; |
| 197 | *) AC_MSG_ERROR([Invalid setting for --enable-polly. Use "yes" or "no"]) ;; |
| 198 | esac |
| 199 | |
| 200 | |
| 201 | dnl Check if polly is checked out into tools/polly and configure it if |
| 202 | dnl available. |
| 203 | if (test -d ${srcdir}/tools/polly) && (test $ENABLE_POLLY -eq 1) ; then |
| 204 | AC_SUBST(LLVM_HAS_POLLY,1) |
| 205 | AC_CONFIG_SUBDIRS([tools/polly]) |
| 206 | fi |
| 207 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 208 | dnl===-----------------------------------------------------------------------=== |
| 209 | dnl=== |
| 210 | dnl=== SECTION 2: Architecture, target, and host checks |
| 211 | dnl=== |
| 212 | dnl===-----------------------------------------------------------------------=== |
John Criswell | 9537b04 | 2004-07-23 15:40:57 +0000 | [diff] [blame] | 213 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 214 | dnl Check the target for which we're compiling and the host that will do the |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 215 | dnl compilations. This will tell us which LLVM compiler will be used for |
| 216 | dnl compiling SSA into object code. This needs to be done early because |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 217 | dnl following tests depend on it. |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 218 | AC_CANONICAL_TARGET |
| 219 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 220 | dnl Determine the platform type and cache its value. This helps us configure |
| 221 | dnl the System library to the correct build platform. |
Reid Spencer | 0aa9d00 | 2006-07-26 21:14:56 +0000 | [diff] [blame] | 222 | AC_CACHE_CHECK([type of operating system we're going to host on], |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 223 | [llvm_cv_os_type], |
Reid Spencer | 0aa9d00 | 2006-07-26 21:14:56 +0000 | [diff] [blame] | 224 | [case $host in |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 225 | *-*-aix*) |
Reid Spencer | 0b52e2f | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 226 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 227 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 228 | llvm_cv_os_type="AIX" |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 229 | llvm_cv_platform_type="Unix" ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 230 | *-*-irix*) |
Reid Spencer | e9a4056 | 2006-08-22 22:21:38 +0000 | [diff] [blame] | 231 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 232 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 233 | llvm_cv_os_type="IRIX" |
Reid Spencer | e9a4056 | 2006-08-22 22:21:38 +0000 | [diff] [blame] | 234 | llvm_cv_platform_type="Unix" ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 235 | *-*-cygwin*) |
Reid Spencer | 0b52e2f | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 236 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 237 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 238 | llvm_cv_os_type="Cygwin" |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 239 | llvm_cv_platform_type="Unix" ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 240 | *-*-darwin*) |
Reid Spencer | 0b52e2f | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 241 | llvm_cv_link_all_option="-Wl,-all_load" |
Chris Lattner | 42e35d4 | 2008-02-05 19:43:40 +0000 | [diff] [blame] | 242 | llvm_cv_no_link_all_option="-Wl,-noall_load" |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 243 | llvm_cv_os_type="Darwin" |
| 244 | llvm_cv_platform_type="Unix" ;; |
Chris Lattner | c86cdc7 | 2010-04-09 20:45:04 +0000 | [diff] [blame] | 245 | *-*-minix*) |
| 246 | llvm_cv_link_all_option="-Wl,-all_load" |
| 247 | llvm_cv_no_link_all_option="-Wl,-noall_load" |
| 248 | llvm_cv_os_type="Minix" |
| 249 | llvm_cv_platform_type="Unix" ;; |
Sylvestre Ledru | 93a491b | 2013-07-01 08:07:52 +0000 | [diff] [blame] | 250 | *-*-freebsd*) |
Reid Spencer | 0b52e2f | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 251 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 252 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 253 | llvm_cv_os_type="FreeBSD" |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 254 | llvm_cv_platform_type="Unix" ;; |
Sylvestre Ledru | 93a491b | 2013-07-01 08:07:52 +0000 | [diff] [blame] | 255 | *-*-kfreebsd-gnu) |
| 256 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 257 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
| 258 | llvm_cv_os_type="GNU/kFreeBSD" |
| 259 | llvm_cv_platform_type="Unix" ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 260 | *-*-openbsd*) |
Reid Spencer | 0b52e2f | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 261 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 262 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 263 | llvm_cv_os_type="OpenBSD" |
Reid Spencer | 48b9203 | 2006-04-19 23:47:16 +0000 | [diff] [blame] | 264 | llvm_cv_platform_type="Unix" ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 265 | *-*-netbsd*) |
Reid Spencer | 78adb9d | 2007-01-20 20:43:35 +0000 | [diff] [blame] | 266 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 267 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 268 | llvm_cv_os_type="NetBSD" |
Reid Spencer | 78adb9d | 2007-01-20 20:43:35 +0000 | [diff] [blame] | 269 | llvm_cv_platform_type="Unix" ;; |
Matthijs Kooijman | f61fd54 | 2008-06-26 10:36:58 +0000 | [diff] [blame] | 270 | *-*-dragonfly*) |
| 271 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 272 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
| 273 | llvm_cv_os_type="DragonFly" |
| 274 | llvm_cv_platform_type="Unix" ;; |
Eric Christopher | 83f8824 | 2015-02-26 19:46:32 +0000 | [diff] [blame] | 275 | *-*-bitrig*) |
| 276 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 277 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
| 278 | llvm_cv_os_type="Bitrig" |
| 279 | llvm_cv_platform_type="Unix" ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 280 | *-*-hpux*) |
Reid Spencer | 0b52e2f | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 281 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 282 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 283 | llvm_cv_os_type="HP-UX" |
Duraid Madina | 5ea2ba8 | 2005-05-16 05:39:00 +0000 | [diff] [blame] | 284 | llvm_cv_platform_type="Unix" ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 285 | *-*-interix*) |
Reid Spencer | 0b52e2f | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 286 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 287 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 288 | llvm_cv_os_type="Interix" |
| 289 | llvm_cv_platform_type="Unix" ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 290 | *-*-linux*) |
Reid Spencer | 0b52e2f | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 291 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 292 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 293 | llvm_cv_os_type="Linux" |
| 294 | llvm_cv_platform_type="Unix" ;; |
Rafael Espindola | 4977edd | 2011-12-22 14:01:18 +0000 | [diff] [blame] | 295 | *-*-gnu*) |
| 296 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 297 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
| 298 | llvm_cv_os_type="GNU" |
| 299 | llvm_cv_platform_type="Unix" ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 300 | *-*-solaris*) |
Reid Spencer | 0b52e2f | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 301 | llvm_cv_link_all_option="-Wl,-z,allextract" |
| 302 | llvm_cv_no_link_all_option="-Wl,-z,defaultextract" |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 303 | llvm_cv_os_type="SunOS" |
| 304 | llvm_cv_platform_type="Unix" ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 305 | *-*-win32*) |
Reid Spencer | 0b52e2f | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 306 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 307 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 308 | llvm_cv_os_type="Win32" |
| 309 | llvm_cv_platform_type="Win32" ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 310 | *-*-mingw*) |
Reid Spencer | 0b52e2f | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 311 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 312 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 313 | llvm_cv_os_type="MingW" |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 314 | llvm_cv_platform_type="Win32" ;; |
Edward O'Callaghan | 8227b05 | 2009-10-12 04:57:20 +0000 | [diff] [blame] | 315 | *-*-haiku*) |
| 316 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 317 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
| 318 | llvm_cv_os_type="Haiku" |
Eric Christopher | b3762a0 | 2010-03-02 05:17:21 +0000 | [diff] [blame] | 319 | llvm_cv_platform_type="Unix" ;; |
Anton Korobeynikov | 90e17e7 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 320 | *-unknown-eabi*) |
| 321 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 322 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
| 323 | llvm_cv_os_type="Freestanding" |
| 324 | llvm_cv_platform_type="Unix" ;; |
| 325 | *-unknown-elf*) |
| 326 | llvm_cv_link_all_option="-Wl,--whole-archive" |
| 327 | llvm_cv_no_link_all_option="-Wl,--no-whole-archive" |
| 328 | llvm_cv_os_type="Freestanding" |
| 329 | llvm_cv_platform_type="Unix" ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 330 | *) |
| 331 | llvm_cv_link_all_option="" |
Reid Spencer | 0b52e2f | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 332 | llvm_cv_no_link_all_option="" |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 333 | llvm_cv_os_type="Unknown" |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 334 | llvm_cv_platform_type="Unknown" ;; |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 335 | esac]) |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 336 | |
Anton Korobeynikov | 90e17e7 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 337 | AC_CACHE_CHECK([type of operating system we're going to target], |
| 338 | [llvm_cv_target_os_type], |
| 339 | [case $target in |
| 340 | *-*-aix*) |
| 341 | llvm_cv_target_os_type="AIX" ;; |
| 342 | *-*-irix*) |
| 343 | llvm_cv_target_os_type="IRIX" ;; |
| 344 | *-*-cygwin*) |
| 345 | llvm_cv_target_os_type="Cygwin" ;; |
| 346 | *-*-darwin*) |
| 347 | llvm_cv_target_os_type="Darwin" ;; |
Chris Lattner | c86cdc7 | 2010-04-09 20:45:04 +0000 | [diff] [blame] | 348 | *-*-minix*) |
| 349 | llvm_cv_target_os_type="Minix" ;; |
Sylvestre Ledru | 93a491b | 2013-07-01 08:07:52 +0000 | [diff] [blame] | 350 | *-*-freebsd*) |
Anton Korobeynikov | 90e17e7 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 351 | llvm_cv_target_os_type="FreeBSD" ;; |
Sylvestre Ledru | 93a491b | 2013-07-01 08:07:52 +0000 | [diff] [blame] | 352 | *-*-kfreebsd-gnu) |
| 353 | llvm_cv_target_os_type="GNU/kFreeBSD" ;; |
Anton Korobeynikov | 90e17e7 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 354 | *-*-openbsd*) |
| 355 | llvm_cv_target_os_type="OpenBSD" ;; |
| 356 | *-*-netbsd*) |
| 357 | llvm_cv_target_os_type="NetBSD" ;; |
| 358 | *-*-dragonfly*) |
| 359 | llvm_cv_target_os_type="DragonFly" ;; |
Eric Christopher | 83f8824 | 2015-02-26 19:46:32 +0000 | [diff] [blame] | 360 | *-*-bitrig*) |
| 361 | llvm_cv_target_os_type="Bitrig" ;; |
Anton Korobeynikov | 90e17e7 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 362 | *-*-hpux*) |
| 363 | llvm_cv_target_os_type="HP-UX" ;; |
| 364 | *-*-interix*) |
| 365 | llvm_cv_target_os_type="Interix" ;; |
| 366 | *-*-linux*) |
| 367 | llvm_cv_target_os_type="Linux" ;; |
Sylvestre Ledru | e8235fe | 2012-04-05 19:34:15 +0000 | [diff] [blame] | 368 | *-*-gnu*) |
| 369 | llvm_cv_target_os_type="GNU" ;; |
Anton Korobeynikov | 90e17e7 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 370 | *-*-solaris*) |
| 371 | llvm_cv_target_os_type="SunOS" ;; |
| 372 | *-*-win32*) |
| 373 | llvm_cv_target_os_type="Win32" ;; |
| 374 | *-*-mingw*) |
| 375 | llvm_cv_target_os_type="MingW" ;; |
Edward O'Callaghan | 8227b05 | 2009-10-12 04:57:20 +0000 | [diff] [blame] | 376 | *-*-haiku*) |
Eric Christopher | b3762a0 | 2010-03-02 05:17:21 +0000 | [diff] [blame] | 377 | llvm_cv_target_os_type="Haiku" ;; |
Douglas Gregor | de3c926 | 2011-07-01 22:41:06 +0000 | [diff] [blame] | 378 | *-*-rtems*) |
| 379 | llvm_cv_target_os_type="RTEMS" ;; |
Ivan Krasin | 44306e2 | 2011-08-18 22:54:21 +0000 | [diff] [blame] | 380 | *-*-nacl*) |
| 381 | llvm_cv_target_os_type="NativeClient" ;; |
Anton Korobeynikov | 90e17e7 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 382 | *-unknown-eabi*) |
| 383 | llvm_cv_target_os_type="Freestanding" ;; |
Alex Rosenberg | 9346067 | 2015-01-26 15:25:05 +0000 | [diff] [blame] | 384 | *-*-ps4) |
| 385 | llvm_cv_target_os_type="PS4" ;; |
Anton Korobeynikov | 90e17e7 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 386 | *) |
| 387 | llvm_cv_target_os_type="Unknown" ;; |
| 388 | esac]) |
| 389 | |
Reid Spencer | 1daffa5 | 2004-08-31 01:34:10 +0000 | [diff] [blame] | 390 | dnl Make sure we aren't attempting to configure for an unknown system |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 391 | if test "$llvm_cv_os_type" = "Unknown" ; then |
| 392 | AC_MSG_ERROR([Operating system is unknown, configure can't continue]) |
Reid Spencer | 1daffa5 | 2004-08-31 01:34:10 +0000 | [diff] [blame] | 393 | fi |
| 394 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 395 | dnl Set the "OS" Makefile variable based on the platform type so the |
| 396 | dnl makefile can configure itself to specific build hosts |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 397 | AC_SUBST(OS,$llvm_cv_os_type) |
Anton Korobeynikov | 90e17e7 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 398 | AC_SUBST(HOST_OS,$llvm_cv_os_type) |
| 399 | AC_SUBST(TARGET_OS,$llvm_cv_target_os_type) |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 400 | |
Reid Spencer | 0b52e2f | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 401 | dnl Set the LINKALL and NOLINKALL Makefile variables based on the platform |
| 402 | AC_SUBST(LINKALL,$llvm_cv_link_all_option) |
| 403 | AC_SUBST(NOLINKALL,$llvm_cv_no_link_all_option) |
| 404 | |
Dan Gohman | a3ed071 | 2010-08-04 16:48:36 +0000 | [diff] [blame] | 405 | dnl Set the "LLVM_ON_*" variables based on llvm_cv_platform_type |
Michael J. Spencer | 447762d | 2010-11-29 18:16:10 +0000 | [diff] [blame] | 406 | dnl This is used by lib/Support to determine the basic kind of implementation |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 407 | dnl to use. |
| 408 | case $llvm_cv_platform_type in |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 409 | Unix) |
| 410 | AC_DEFINE([LLVM_ON_UNIX],[1],[Define if this is Unixish platform]) |
Reid Spencer | d7287e0 | 2004-12-31 22:54:28 +0000 | [diff] [blame] | 411 | AC_SUBST(LLVM_ON_UNIX,[1]) |
| 412 | AC_SUBST(LLVM_ON_WIN32,[0]) |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 413 | ;; |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 414 | Win32) |
| 415 | AC_DEFINE([LLVM_ON_WIN32],[1],[Define if this is Win32ish platform]) |
Reid Spencer | d7287e0 | 2004-12-31 22:54:28 +0000 | [diff] [blame] | 416 | AC_SUBST(LLVM_ON_UNIX,[0]) |
| 417 | AC_SUBST(LLVM_ON_WIN32,[1]) |
Reid Spencer | d3d6d9d | 2004-12-24 06:29:05 +0000 | [diff] [blame] | 418 | ;; |
| 419 | esac |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 420 | |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 421 | dnl Determine what our target architecture is and configure accordingly. |
| 422 | dnl This will allow Makefiles to make a distinction between the hardware and |
| 423 | dnl the OS. |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 424 | AC_CACHE_CHECK([target architecture],[llvm_cv_target_arch], |
| 425 | [case $target in |
Reid Spencer | 0a54a58 | 2004-12-23 21:08:52 +0000 | [diff] [blame] | 426 | i?86-*) llvm_cv_target_arch="x86" ;; |
Reid Spencer | 78d9e87 | 2004-12-28 07:56:14 +0000 | [diff] [blame] | 427 | amd64-* | x86_64-*) llvm_cv_target_arch="x86_64" ;; |
Reid Spencer | 0a54a58 | 2004-12-23 21:08:52 +0000 | [diff] [blame] | 428 | sparc*-*) llvm_cv_target_arch="Sparc" ;; |
| 429 | powerpc*-*) llvm_cv_target_arch="PowerPC" ;; |
Tim Northover | 3b0846e | 2014-05-24 12:50:23 +0000 | [diff] [blame] | 430 | arm64*-*) llvm_cv_target_arch="AArch64" ;; |
Nick Lewycky | 13590cb | 2009-04-18 18:11:26 +0000 | [diff] [blame] | 431 | arm*-*) llvm_cv_target_arch="ARM" ;; |
Tim Northover | 3b0846e | 2014-05-24 12:50:23 +0000 | [diff] [blame] | 432 | aarch64*-*) llvm_cv_target_arch="AArch64" ;; |
Simon Atanasyan | c2cccd7 | 2012-10-29 19:49:45 +0000 | [diff] [blame] | 433 | mips-* | mips64-*) llvm_cv_target_arch="Mips" ;; |
| 434 | mipsel-* | mips64el-*) llvm_cv_target_arch="Mips" ;; |
Richard Osborne | ca08e06 | 2008-11-07 10:59:00 +0000 | [diff] [blame] | 435 | xcore-*) llvm_cv_target_arch="XCore" ;; |
Anton Korobeynikov | 1013800 | 2009-05-03 12:57:15 +0000 | [diff] [blame] | 436 | msp430-*) llvm_cv_target_arch="MSP430" ;; |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 437 | hexagon-*) llvm_cv_target_arch="Hexagon" ;; |
Justin Holewinski | ae556d3 | 2012-05-04 20:18:50 +0000 | [diff] [blame] | 438 | nvptx-*) llvm_cv_target_arch="NVPTX" ;; |
Ulrich Weigand | 1ceebf6 | 2013-05-06 16:22:34 +0000 | [diff] [blame] | 439 | s390x-*) llvm_cv_target_arch="SystemZ" ;; |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 440 | wasm*-*) llvm_cv_target_arch="WebAssembly" ;; |
Reid Spencer | 0a54a58 | 2004-12-23 21:08:52 +0000 | [diff] [blame] | 441 | *) llvm_cv_target_arch="Unknown" ;; |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 442 | esac]) |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 443 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 444 | if test "$llvm_cv_target_arch" = "Unknown" ; then |
| 445 | AC_MSG_WARN([Configuring LLVM for an unknown target archicture]) |
| 446 | fi |
| 447 | |
Gabor Greif | e0d58d3 | 2012-01-26 10:28:58 +0000 | [diff] [blame] | 448 | dnl Determine the LLVM native architecture for the target |
Douglas Gregor | 7cbf816 | 2009-06-17 00:42:33 +0000 | [diff] [blame] | 449 | case "$llvm_cv_target_arch" in |
| 450 | x86) LLVM_NATIVE_ARCH="X86" ;; |
| 451 | x86_64) LLVM_NATIVE_ARCH="X86" ;; |
| 452 | *) LLVM_NATIVE_ARCH="$llvm_cv_target_arch" ;; |
| 453 | esac |
Mikhail Glushenkov | d871cbc | 2009-07-03 03:52:07 +0000 | [diff] [blame] | 454 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 455 | dnl Define a substitution, ARCH, for the target architecture |
| 456 | AC_SUBST(ARCH,$llvm_cv_target_arch) |
NAKAMURA Takumi | 84e8530 | 2014-02-09 16:36:42 +0000 | [diff] [blame] | 457 | AC_SUBST(LLVM_NATIVE_ARCH,$LLVM_NATIVE_ARCH) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 458 | |
Danil Malyshev | 7c5db45 | 2012-05-17 21:07:47 +0000 | [diff] [blame] | 459 | dnl Determine what our host architecture. |
| 460 | dnl This will allow MCJIT regress tests runs only for supported |
| 461 | dnl platforms. |
| 462 | case $host in |
| 463 | i?86-*) host_arch="x86" ;; |
| 464 | amd64-* | x86_64-*) host_arch="x86_64" ;; |
| 465 | sparc*-*) host_arch="Sparc" ;; |
| 466 | powerpc*-*) host_arch="PowerPC" ;; |
Tim Northover | 3b0846e | 2014-05-24 12:50:23 +0000 | [diff] [blame] | 467 | arm64*-*) host_arch="AArch64" ;; |
Danil Malyshev | 7c5db45 | 2012-05-17 21:07:47 +0000 | [diff] [blame] | 468 | arm*-*) host_arch="ARM" ;; |
Tim Northover | 3b0846e | 2014-05-24 12:50:23 +0000 | [diff] [blame] | 469 | aarch64*-*) host_arch="AArch64" ;; |
Simon Atanasyan | c2cccd7 | 2012-10-29 19:49:45 +0000 | [diff] [blame] | 470 | mips-* | mips64-*) host_arch="Mips" ;; |
| 471 | mipsel-* | mips64el-*) host_arch="Mips" ;; |
Danil Malyshev | 7c5db45 | 2012-05-17 21:07:47 +0000 | [diff] [blame] | 472 | xcore-*) host_arch="XCore" ;; |
| 473 | msp430-*) host_arch="MSP430" ;; |
| 474 | hexagon-*) host_arch="Hexagon" ;; |
Ulrich Weigand | 1ceebf6 | 2013-05-06 16:22:34 +0000 | [diff] [blame] | 475 | s390x-*) host_arch="SystemZ" ;; |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 476 | wasm*-*) host_arch="WebAssembly" ;; |
Danil Malyshev | 7c5db45 | 2012-05-17 21:07:47 +0000 | [diff] [blame] | 477 | *) host_arch="Unknown" ;; |
| 478 | esac |
| 479 | |
| 480 | if test "$host_arch" = "Unknown" ; then |
| 481 | AC_MSG_WARN([Configuring LLVM for an unknown host archicture]) |
| 482 | fi |
| 483 | |
| 484 | AC_SUBST(HOST_ARCH,$host_arch) |
| 485 | |
Gabor Greif | e0d58d3 | 2012-01-26 10:28:58 +0000 | [diff] [blame] | 486 | dnl Check for build platform executable suffix if we're cross-compiling |
Reid Spencer | 0aa9d00 | 2006-07-26 21:14:56 +0000 | [diff] [blame] | 487 | if test "$cross_compiling" = yes; then |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 488 | AC_SUBST(LLVM_CROSS_COMPILING, [1]) |
Reid Spencer | 0aa9d00 | 2006-07-26 21:14:56 +0000 | [diff] [blame] | 489 | AC_BUILD_EXEEXT |
Jim Grosbach | 009db89 | 2008-10-02 22:56:44 +0000 | [diff] [blame] | 490 | ac_build_prefix=${build_alias}- |
| 491 | AC_CHECK_PROG(BUILD_CXX, ${ac_build_prefix}g++, ${ac_build_prefix}g++) |
| 492 | if test -z "$BUILD_CXX"; then |
| 493 | AC_CHECK_PROG(BUILD_CXX, g++, g++) |
| 494 | if test -z "$BUILD_CXX"; then |
| 495 | AC_CHECK_PROG(BUILD_CXX, c++, c++, , , /usr/ucb/c++) |
| 496 | fi |
| 497 | fi |
Reid Spencer | 0aa9d00 | 2006-07-26 21:14:56 +0000 | [diff] [blame] | 498 | else |
| 499 | AC_SUBST(LLVM_CROSS_COMPILING, [0]) |
| 500 | fi |
| 501 | |
Dan Gohman | de75469c | 2010-08-04 16:25:01 +0000 | [diff] [blame] | 502 | dnl Check to see if there's a .svn or .git directory indicating that this |
| 503 | dnl build is being done from a checkout. This sets up several defaults for |
| 504 | dnl the command line switches. When we build with a checkout directory, |
Nick Lewycky | 9a196c0 | 2009-04-01 04:39:25 +0000 | [diff] [blame] | 505 | dnl we get a debug with assertions turned on. Without, we assume a source |
| 506 | dnl release and we get an optimized build without assertions. |
| 507 | dnl See --enable-optimized and --enable-assertions below |
Dan Gohman | de75469c | 2010-08-04 16:25:01 +0000 | [diff] [blame] | 508 | if test -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then |
Reid Spencer | b65ade8 | 2006-04-07 16:01:51 +0000 | [diff] [blame] | 509 | cvsbuild="yes" |
| 510 | optimize="no" |
Reid Spencer | b65ade8 | 2006-04-07 16:01:51 +0000 | [diff] [blame] | 511 | AC_SUBST(CVSBUILD,[[CVSBUILD=1]]) |
| 512 | else |
| 513 | cvsbuild="no" |
| 514 | optimize="yes" |
Reid Spencer | b65ade8 | 2006-04-07 16:01:51 +0000 | [diff] [blame] | 515 | fi |
| 516 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 517 | dnl===-----------------------------------------------------------------------=== |
| 518 | dnl=== |
| 519 | dnl=== SECTION 3: Command line arguments for the configure script. |
| 520 | dnl=== |
| 521 | dnl===-----------------------------------------------------------------------=== |
| 522 | |
Eric Christopher | 1094ded | 2011-11-11 22:51:42 +0000 | [diff] [blame] | 523 | dnl --enable-libcpp : check whether or not to use libc++ on the command line |
| 524 | AC_ARG_ENABLE(libcpp, |
| 525 | AS_HELP_STRING([--enable-libcpp], |
| 526 | [Use libc++ if available (default is NO)]),, |
| 527 | enableval=default) |
| 528 | case "$enableval" in |
| 529 | yes) AC_SUBST(ENABLE_LIBCPP,[1]) ;; |
| 530 | no) AC_SUBST(ENABLE_LIBCPP,[0]) ;; |
| 531 | default) AC_SUBST(ENABLE_LIBCPP,[0]);; |
| 532 | *) AC_MSG_ERROR([Invalid setting for --enable-libcpp. Use "yes" or "no"]) ;; |
| 533 | esac |
| 534 | |
Chandler Carruth | 7206eae | 2014-01-15 19:19:13 +0000 | [diff] [blame] | 535 | dnl Check both GCC and Clang for sufficiently modern versions. These checks can |
| 536 | dnl be bypassed by passing a flag if necessary on a platform. We have to do |
| 537 | dnl these checks here so that we have the configuration of the standard C++ |
| 538 | dnl library finished. |
| 539 | AC_ARG_ENABLE(compiler-version-checks, |
| 540 | AS_HELP_STRING([--enable-compiler-version-checks], |
| 541 | [Check the version of the host compiler (default is YES)]),, |
| 542 | enableval=default) |
| 543 | case "$enableval" in |
| 544 | no) |
| 545 | ;; |
| 546 | yes|default) |
| 547 | AC_LANG_PUSH([C++]) |
| 548 | case "$llvm_cv_cxx_compiler" in |
| 549 | clang) |
| 550 | AC_MSG_CHECKING([whether Clang is new enough]) |
| 551 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
| 552 | #if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 1) |
| 553 | #error This version of Clang is too old to build LLVM |
| 554 | #endif |
| 555 | ]])], |
| 556 | [AC_MSG_RESULT([yes])], |
| 557 | [AC_MSG_RESULT([no]) |
| 558 | AC_MSG_ERROR([ |
| 559 | The selected Clang compiler is not new enough to build LLVM. Please upgrade to |
| 560 | Clang 3.1. You may pass --disable-compiler-version-checks to configure to |
| 561 | bypass these sanity checks.])]) |
| 562 | |
| 563 | dnl Note that libstdc++4.6 is known broken for C++11 builds. The errors |
| 564 | dnl are sometimes deeply confusing though. Here we test for an obvious |
| 565 | dnl incomplete feature in 4.6's standard library that was completed in |
Chandler Carruth | eba44ea | 2014-01-15 21:21:48 +0000 | [diff] [blame] | 566 | dnl 4.7's. We also have to disable this test if 'ENABLE_LIBCPP' is set |
| 567 | dnl because the enable flags don't actually fix CXXFLAGS, they rely on |
| 568 | dnl that happening in the Makefile. |
| 569 | if test "$ENABLE_LIBCPP" -eq 0 ; then |
| 570 | AC_MSG_CHECKING([whether Clang will select a modern C++ standard library]) |
| 571 | llvm_cv_old_cxxflags="$CXXFLAGS" |
| 572 | CXXFLAGS="$CXXFLAGS -std=c++0x" |
| 573 | AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
Chandler Carruth | 7206eae | 2014-01-15 19:19:13 +0000 | [diff] [blame] | 574 | #include <atomic> |
| 575 | std::atomic<float> x(0.0f); |
| 576 | int main() { return (float)x; } |
| 577 | ]])], |
Chandler Carruth | eba44ea | 2014-01-15 21:21:48 +0000 | [diff] [blame] | 578 | [AC_MSG_RESULT([yes])], |
| 579 | [AC_MSG_RESULT([no]) |
| 580 | AC_MSG_ERROR([ |
Chandler Carruth | 7206eae | 2014-01-15 19:19:13 +0000 | [diff] [blame] | 581 | We detected a missing feature in the standard C++ library that was known to be |
| 582 | missing in libstdc++4.6 and implemented in libstdc++4.7. There are numerous |
| 583 | C++11 problems with 4.6's library, and we don't support GCCs or libstdc++ older |
| 584 | than 4.7. You will need to update your system and ensure Clang uses the newer |
| 585 | standard library. |
| 586 | |
| 587 | If this error is incorrect or you need to force things to work, you may pass |
| 588 | '--disable-compiler-version-checks' to configure to bypass this test.])]) |
Chandler Carruth | eba44ea | 2014-01-15 21:21:48 +0000 | [diff] [blame] | 589 | CXXFLAGS="$llvm_cv_old_cxxflags" |
| 590 | fi |
Chandler Carruth | 7206eae | 2014-01-15 19:19:13 +0000 | [diff] [blame] | 591 | ;; |
| 592 | gcc) |
| 593 | AC_MSG_CHECKING([whether GCC is new enough]) |
| 594 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
| 595 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) |
| 596 | #error This version of GCC is too old to build LLVM |
| 597 | #endif |
| 598 | ]])], |
| 599 | [AC_MSG_RESULT([yes])], |
| 600 | [AC_MSG_RESULT([no]) |
| 601 | AC_MSG_ERROR([ |
| 602 | The selected GCC C++ compiler is not new enough to build LLVM. Please upgrade |
| 603 | to GCC 4.7. You may pass --disable-compiler-version-checks to configure to |
| 604 | bypass these sanity checks.])]) |
| 605 | ;; |
| 606 | unknown) |
| 607 | ;; |
| 608 | esac |
| 609 | AC_LANG_POP([C++]) |
| 610 | ;; |
| 611 | *) |
| 612 | AC_MSG_ERROR([Invalid setting for --enable-compiler-version-checks. Use "yes" or "no"]) |
| 613 | ;; |
| 614 | esac |
| 615 | |
Chandler Carruth | bbae512 | 2014-03-01 03:33:08 +0000 | [diff] [blame] | 616 | dnl --enable-cxx1y : check whether or not to use -std=c++1y on the command line |
| 617 | AC_ARG_ENABLE(cxx1y, |
| 618 | AS_HELP_STRING([--enable-cxx1y], |
| 619 | [Use c++1y if available (default is NO)]),, |
Eric Christopher | 04e3597 | 2012-08-03 19:47:14 +0000 | [diff] [blame] | 620 | enableval=default) |
| 621 | case "$enableval" in |
Chandler Carruth | bbae512 | 2014-03-01 03:33:08 +0000 | [diff] [blame] | 622 | yes) AC_SUBST(ENABLE_CXX1Y,[1]) ;; |
| 623 | no) AC_SUBST(ENABLE_CXX1Y,[0]) ;; |
| 624 | default) AC_SUBST(ENABLE_CXX1Y,[0]);; |
| 625 | *) AC_MSG_ERROR([Invalid setting for --enable-cxx1y. Use "yes" or "no"]) ;; |
Eric Christopher | 04e3597 | 2012-08-03 19:47:14 +0000 | [diff] [blame] | 626 | esac |
| 627 | |
Eric Christopher | c64a54e | 2014-03-05 00:43:38 +0000 | [diff] [blame] | 628 | dnl --enable-split-dwarf : check whether or not to use -gsplit-dwarf on the command |
Eric Christopher | f1bd770 | 2013-06-25 01:12:25 +0000 | [diff] [blame] | 629 | dnl line |
| 630 | AC_ARG_ENABLE(split-dwarf, |
| 631 | AS_HELP_STRING([--enable-split-dwarf], |
| 632 | [Use split-dwarf if available (default is NO)]),, |
| 633 | enableval=default) |
| 634 | case "$enableval" in |
| 635 | yes) AC_SUBST(ENABLE_SPLIT_DWARF,[1]) ;; |
| 636 | no) AC_SUBST(ENABLE_SPLIT_DWARF,[0]) ;; |
| 637 | default) AC_SUBST(ENABLE_SPLIT_DWARF,[0]);; |
| 638 | *) AC_MSG_ERROR([Invalid setting for --enable-split-dwarf. Use "yes" or "no"]) ;; |
| 639 | esac |
| 640 | |
Roman Divacky | f2bb66b | 2012-12-13 16:07:19 +0000 | [diff] [blame] | 641 | dnl --enable-clang-arcmt: check whether to enable clang arcmt |
| 642 | clang_arcmt="yes" |
| 643 | AC_ARG_ENABLE(clang-arcmt, |
| 644 | AS_HELP_STRING([--enable-clang-arcmt], |
| 645 | [Enable building of clang ARCMT (default is YES)]), |
| 646 | clang_arcmt="$enableval", |
| 647 | enableval="yes") |
| 648 | case "$enableval" in |
| 649 | yes) AC_SUBST(ENABLE_CLANG_ARCMT,[1]) ;; |
| 650 | no) AC_SUBST(ENABLE_CLANG_ARCMT,[0]) ;; |
| 651 | default) AC_SUBST(ENABLE_CLANG_ARCMT,[1]);; |
| 652 | *) AC_MSG_ERROR([Invalid setting for --enable-clang-arcmt. Use "yes" or "no"]) ;; |
| 653 | esac |
| 654 | |
Rafael Espindola | e33f06c | 2014-03-10 16:58:35 +0000 | [diff] [blame] | 655 | dnl --enable-clang-plugin-support: check whether to enable plugins in clang |
| 656 | clang_plugin_support="yes" |
| 657 | AC_ARG_ENABLE(clang-plugin-support, |
| 658 | AS_HELP_STRING([--enable-clang-plugin-support], |
| 659 | [Enable plugin support in clang (default is YES)]), |
| 660 | clang_plugin_support="$enableval", |
| 661 | enableval="yes") |
| 662 | case "$enableval" in |
| 663 | yes) AC_SUBST(CLANG_PLUGIN_SUPPORT,[1]) ;; |
| 664 | no) AC_SUBST(CLANG_PLUGIN_SUPPORT,[0]) ;; |
| 665 | default) AC_SUBST(CLANG_PLUGIN_SUPPORT,[1]);; |
| 666 | *) AC_MSG_ERROR([Invalid setting for --enable-clang-plugin-support. Use "yes" or "no"]) ;; |
| 667 | esac |
| 668 | |
Roman Divacky | f2bb66b | 2012-12-13 16:07:19 +0000 | [diff] [blame] | 669 | dnl --enable-clang-static-analyzer: check whether to enable static-analyzer |
| 670 | clang_static_analyzer="yes" |
| 671 | AC_ARG_ENABLE(clang-static-analyzer, |
| 672 | AS_HELP_STRING([--enable-clang-static-analyzer], |
| 673 | [Enable building of clang Static Analyzer (default is YES)]), |
| 674 | clang_static_analyzer="$enableval", |
| 675 | enableval="yes") |
| 676 | case "$enableval" in |
| 677 | yes) AC_SUBST(ENABLE_CLANG_STATIC_ANALYZER,[1]) ;; |
Peter Zotov | 668f967 | 2014-10-30 08:29:45 +0000 | [diff] [blame] | 678 | no) |
Jordan Rose | 23fc6f3 | 2013-08-22 15:49:53 +0000 | [diff] [blame] | 679 | if test ${clang_arcmt} != "no" ; then |
| 680 | AC_MSG_ERROR([Cannot enable clang ARC Migration Tool while disabling static analyzer.]) |
| 681 | fi |
Peter Zotov | 668f967 | 2014-10-30 08:29:45 +0000 | [diff] [blame] | 682 | AC_SUBST(ENABLE_CLANG_STATIC_ANALYZER,[0]) |
Jordan Rose | 23fc6f3 | 2013-08-22 15:49:53 +0000 | [diff] [blame] | 683 | ;; |
Roman Divacky | f2bb66b | 2012-12-13 16:07:19 +0000 | [diff] [blame] | 684 | default) AC_SUBST(ENABLE_CLANG_STATIC_ANALYZER,[1]);; |
| 685 | *) AC_MSG_ERROR([Invalid setting for --enable-clang-static-analyzer. Use "yes" or "no"]) ;; |
| 686 | esac |
| 687 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 688 | dnl --enable-optimized : check whether they want to do an optimized build: |
Reid Spencer | b65ade8 | 2006-04-07 16:01:51 +0000 | [diff] [blame] | 689 | AC_ARG_ENABLE(optimized, AS_HELP_STRING( |
Nick Lewycky | 9ab256ac | 2009-06-06 06:24:44 +0000 | [diff] [blame] | 690 | --enable-optimized,[Compile with optimizations enabled (default is NO)]),,enableval=$optimize) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 691 | if test ${enableval} = "no" ; then |
| 692 | AC_SUBST(ENABLE_OPTIMIZED,[[]]) |
| 693 | else |
| 694 | AC_SUBST(ENABLE_OPTIMIZED,[[ENABLE_OPTIMIZED=1]]) |
| 695 | fi |
| 696 | |
David Greene | 80f48bd | 2009-04-17 14:49:22 +0000 | [diff] [blame] | 697 | dnl --enable-profiling : check whether they want to do a profile build: |
| 698 | AC_ARG_ENABLE(profiling, AS_HELP_STRING( |
Nick Lewycky | 9ab256ac | 2009-06-06 06:24:44 +0000 | [diff] [blame] | 699 | --enable-profiling,[Compile with profiling enabled (default is NO)]),,enableval="no") |
David Greene | 80f48bd | 2009-04-17 14:49:22 +0000 | [diff] [blame] | 700 | if test ${enableval} = "no" ; then |
| 701 | AC_SUBST(ENABLE_PROFILING,[[]]) |
| 702 | else |
| 703 | AC_SUBST(ENABLE_PROFILING,[[ENABLE_PROFILING=1]]) |
| 704 | fi |
| 705 | |
Reid Spencer | b65ade8 | 2006-04-07 16:01:51 +0000 | [diff] [blame] | 706 | dnl --enable-assertions : check whether they want to turn on assertions or not: |
| 707 | AC_ARG_ENABLE(assertions,AS_HELP_STRING( |
Nick Lewycky | 9ab256ac | 2009-06-06 06:24:44 +0000 | [diff] [blame] | 708 | --enable-assertions,[Compile with assertion checks enabled (default is YES)]),, enableval="yes") |
Reid Spencer | fa423e9 | 2006-04-09 20:42:14 +0000 | [diff] [blame] | 709 | if test ${enableval} = "yes" ; then |
| 710 | AC_SUBST(DISABLE_ASSERTIONS,[[]]) |
Sanjoy Das | 8ce6499 | 2015-03-26 19:25:01 +0000 | [diff] [blame] | 711 | assertions_enabled="yes" |
Reid Spencer | b65ade8 | 2006-04-07 16:01:51 +0000 | [diff] [blame] | 712 | else |
Reid Spencer | fa423e9 | 2006-04-09 20:42:14 +0000 | [diff] [blame] | 713 | AC_SUBST(DISABLE_ASSERTIONS,[[DISABLE_ASSERTIONS=1]]) |
Sanjoy Das | 8ce6499 | 2015-03-26 19:25:01 +0000 | [diff] [blame] | 714 | assertions_enabled="no" |
Reid Spencer | b65ade8 | 2006-04-07 16:01:51 +0000 | [diff] [blame] | 715 | fi |
| 716 | |
Eric Christopher | 8486401 | 2012-08-03 19:58:20 +0000 | [diff] [blame] | 717 | dnl --enable-werror : check whether we want Werror on by default |
| 718 | AC_ARG_ENABLE(werror,AS_HELP_STRING( |
| 719 | --enable-werror,[Compile with -Werror enabled (default is NO)]),, enableval="no") |
| 720 | case "$enableval" in |
| 721 | yes) AC_SUBST(ENABLE_WERROR,[1]) ;; |
| 722 | no) AC_SUBST(ENABLE_WERROR,[0]) ;; |
| 723 | default) AC_SUBST(ENABLE_WERROR,[0]);; |
| 724 | *) AC_MSG_ERROR([Invalid setting for --enable-werror. Use "yes" or "no"]) ;; |
| 725 | esac |
| 726 | |
David Greene | cbc8ddf | 2007-06-28 19:36:08 +0000 | [diff] [blame] | 727 | dnl --enable-expensive-checks : check whether they want to turn on expensive debug checks: |
| 728 | AC_ARG_ENABLE(expensive-checks,AS_HELP_STRING( |
Nick Lewycky | 9ab256ac | 2009-06-06 06:24:44 +0000 | [diff] [blame] | 729 | --enable-expensive-checks,[Compile with expensive debug checks enabled (default is NO)]),, enableval="no") |
David Greene | cbc8ddf | 2007-06-28 19:36:08 +0000 | [diff] [blame] | 730 | if test ${enableval} = "yes" ; then |
| 731 | AC_SUBST(ENABLE_EXPENSIVE_CHECKS,[[ENABLE_EXPENSIVE_CHECKS=1]]) |
| 732 | AC_SUBST(EXPENSIVE_CHECKS,[[yes]]) |
| 733 | else |
| 734 | AC_SUBST(ENABLE_EXPENSIVE_CHECKS,[[]]) |
| 735 | AC_SUBST(EXPENSIVE_CHECKS,[[no]]) |
| 736 | fi |
| 737 | |
Sanjoy Das | 8ce6499 | 2015-03-26 19:25:01 +0000 | [diff] [blame] | 738 | dnl --enable-abi-breaking-checks : decide whether we should compile in asserts and |
| 739 | dnl checks that make the build ABI incompatible with an llvm built without these |
| 740 | dnl checks enabled. |
| 741 | AC_ARG_ENABLE(abi-breaking-checks,AS_HELP_STRING( |
| 742 | --enable-abi-breaking-checks,[Compile with abi-breaking asserts support (default is with-asserts)]),, enableval="with-asserts") |
| 743 | case "$enableval" in |
| 744 | with-asserts) if test ${assertions_enabled} = "yes" ; then |
| 745 | AC_DEFINE([LLVM_ENABLE_ABI_BREAKING_CHECKS],[1],[Define to enable checks that alter the LLVM C++ ABI]) |
NAKAMURA Takumi | c063c47 | 2015-04-01 11:46:15 +0000 | [diff] [blame] | 746 | AC_SUBST(ENABLE_ABI_BREAKING_CHECKS,[1]) |
| 747 | else |
| 748 | AC_SUBST(ENABLE_ABI_BREAKING_CHECKS,[0]) |
Sanjoy Das | 8ce6499 | 2015-03-26 19:25:01 +0000 | [diff] [blame] | 749 | fi ;; |
NAKAMURA Takumi | c063c47 | 2015-04-01 11:46:15 +0000 | [diff] [blame] | 750 | yes) |
| 751 | AC_DEFINE([LLVM_ENABLE_ABI_BREAKING_CHECKS],[1],[Define to enable checks that alter the LLVM C++ ABI]) |
| 752 | AC_SUBST(ENABLE_ABI_BREAKING_CHECKS,[1]) |
| 753 | ;; |
| 754 | no) |
| 755 | AC_SUBST(ENABLE_ABI_BREAKING_CHECKS,[0]) |
| 756 | ;; |
Sanjoy Das | 8ce6499 | 2015-03-26 19:25:01 +0000 | [diff] [blame] | 757 | *) AC_MSG_ERROR([Invalid setting for --enable-abi-breaking-checks. Use "with-asserts", "yes" or "no"]) |
| 758 | esac |
| 759 | |
Reid Spencer | 4b8067f | 2006-11-17 03:32:33 +0000 | [diff] [blame] | 760 | dnl --enable-debug-runtime : should runtime libraries have debug symbols? |
| 761 | AC_ARG_ENABLE(debug-runtime, |
Nick Lewycky | 9ab256ac | 2009-06-06 06:24:44 +0000 | [diff] [blame] | 762 | AS_HELP_STRING(--enable-debug-runtime,[Build runtime libs with debug symbols (default is NO)]),,enableval=no) |
Reid Spencer | 4b8067f | 2006-11-17 03:32:33 +0000 | [diff] [blame] | 763 | if test ${enableval} = "no" ; then |
| 764 | AC_SUBST(DEBUG_RUNTIME,[[]]) |
| 765 | else |
| 766 | AC_SUBST(DEBUG_RUNTIME,[[DEBUG_RUNTIME=1]]) |
| 767 | fi |
| 768 | |
Jeffrey Yasskin | c3273dc | 2009-09-27 17:47:29 +0000 | [diff] [blame] | 769 | dnl --enable-debug-symbols : should even optimized compiler libraries |
| 770 | dnl have debug symbols? |
| 771 | AC_ARG_ENABLE(debug-symbols, |
| 772 | AS_HELP_STRING(--enable-debug-symbols,[Build compiler with debug symbols (default is NO if optimization is on and YES if it's off)]),,enableval=no) |
| 773 | if test ${enableval} = "no" ; then |
| 774 | AC_SUBST(DEBUG_SYMBOLS,[[]]) |
| 775 | else |
| 776 | AC_SUBST(DEBUG_SYMBOLS,[[DEBUG_SYMBOLS=1]]) |
| 777 | fi |
| 778 | |
Daniel Dunbar | c9e4ff6 | 2012-08-14 18:14:20 +0000 | [diff] [blame] | 779 | dnl --enable-keep-symbols : do not strip installed executables |
| 780 | AC_ARG_ENABLE(keep-symbols, |
| 781 | AS_HELP_STRING(--enable-keep-symbols,[Do not strip installed executables)]),,enableval=no) |
| 782 | if test ${enableval} = "no" ; then |
| 783 | AC_SUBST(KEEP_SYMBOLS,[[]]) |
| 784 | else |
| 785 | AC_SUBST(KEEP_SYMBOLS,[[KEEP_SYMBOLS=1]]) |
| 786 | fi |
| 787 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 788 | dnl --enable-jit: check whether they want to enable the jit |
| 789 | AC_ARG_ENABLE(jit, |
| 790 | AS_HELP_STRING(--enable-jit, |
| 791 | [Enable Just In Time Compiling (default is YES)]),, |
| 792 | enableval=default) |
| 793 | if test ${enableval} = "no" |
| 794 | then |
| 795 | AC_SUBST(JIT,[[]]) |
| 796 | else |
Reid Spencer | 9dc4ba5 | 2004-11-25 07:28:19 +0000 | [diff] [blame] | 797 | case "$llvm_cv_target_arch" in |
Jakob Stoklund Olesen | 526e803 | 2009-08-02 17:32:37 +0000 | [diff] [blame] | 798 | x86) AC_SUBST(TARGET_HAS_JIT,1) ;; |
| 799 | Sparc) AC_SUBST(TARGET_HAS_JIT,0) ;; |
| 800 | PowerPC) AC_SUBST(TARGET_HAS_JIT,1) ;; |
| 801 | x86_64) AC_SUBST(TARGET_HAS_JIT,1) ;; |
Eric Christopher | d8530f3 | 2009-09-14 16:38:49 +0000 | [diff] [blame] | 802 | ARM) AC_SUBST(TARGET_HAS_JIT,1) ;; |
Bruno Cardoso Lopes | d1d9c78 | 2011-07-21 16:28:51 +0000 | [diff] [blame] | 803 | Mips) AC_SUBST(TARGET_HAS_JIT,1) ;; |
Jakob Stoklund Olesen | 526e803 | 2009-08-02 17:32:37 +0000 | [diff] [blame] | 804 | XCore) AC_SUBST(TARGET_HAS_JIT,0) ;; |
| 805 | MSP430) AC_SUBST(TARGET_HAS_JIT,0) ;; |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 806 | Hexagon) AC_SUBST(TARGET_HAS_JIT,0) ;; |
Justin Holewinski | ae556d3 | 2012-05-04 20:18:50 +0000 | [diff] [blame] | 807 | NVPTX) AC_SUBST(TARGET_HAS_JIT,0) ;; |
Ulrich Weigand | 1ceebf6 | 2013-05-06 16:22:34 +0000 | [diff] [blame] | 808 | SystemZ) AC_SUBST(TARGET_HAS_JIT,1) ;; |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 809 | WebAssembly) AC_SUBST(TARGET_HAS_JIT,0) ;; |
Jakob Stoklund Olesen | 526e803 | 2009-08-02 17:32:37 +0000 | [diff] [blame] | 810 | *) AC_SUBST(TARGET_HAS_JIT,0) ;; |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 811 | esac |
| 812 | fi |
| 813 | |
Tim Northover | 3b0846e | 2014-05-24 12:50:23 +0000 | [diff] [blame] | 814 | TARGETS_WITH_JIT="ARM AArch64 Mips PowerPC SystemZ X86" |
NAKAMURA Takumi | 84e8530 | 2014-02-09 16:36:42 +0000 | [diff] [blame] | 815 | AC_SUBST(TARGETS_WITH_JIT,$TARGETS_WITH_JIT) |
| 816 | |
Rafael Espindola | 7ac506d | 2010-11-12 19:24:06 +0000 | [diff] [blame] | 817 | dnl Allow enablement of building and installing docs |
| 818 | AC_ARG_ENABLE(docs, |
| 819 | AS_HELP_STRING([--enable-docs], |
| 820 | [Build documents (default is YES)]),, |
| 821 | enableval=default) |
| 822 | case "$enableval" in |
| 823 | yes) AC_SUBST(ENABLE_DOCS,[1]) ;; |
| 824 | no) AC_SUBST(ENABLE_DOCS,[0]) ;; |
| 825 | default) AC_SUBST(ENABLE_DOCS,[1]) ;; |
| 826 | *) AC_MSG_ERROR([Invalid setting for --enable-docs. Use "yes" or "no"]) ;; |
| 827 | esac |
| 828 | |
Reid Spencer | 0194c9a | 2004-11-29 04:56:35 +0000 | [diff] [blame] | 829 | dnl Allow enablement of doxygen generated documentation |
| 830 | AC_ARG_ENABLE(doxygen, |
| 831 | AS_HELP_STRING([--enable-doxygen], |
| 832 | [Build doxygen documentation (default is NO)]),, |
| 833 | enableval=default) |
| 834 | case "$enableval" in |
| 835 | yes) AC_SUBST(ENABLE_DOXYGEN,[1]) ;; |
Logan Chien | 26c9f2f | 2015-03-12 17:25:01 +0000 | [diff] [blame] | 836 | no|default) AC_SUBST(ENABLE_DOXYGEN,[0]) ;; |
Reid Spencer | 0194c9a | 2004-11-29 04:56:35 +0000 | [diff] [blame] | 837 | *) AC_MSG_ERROR([Invalid setting for --enable-doxygen. Use "yes" or "no"]) ;; |
| 838 | esac |
| 839 | |
Logan Chien | 26c9f2f | 2015-03-12 17:25:01 +0000 | [diff] [blame] | 840 | dnl Allow enablement of doxygen search engine |
| 841 | AC_ARG_ENABLE(doxygen-search, |
| 842 | AS_HELP_STRING([--enable-doxygen-search], |
| 843 | [Enable doxygen search support (default is NO)]),, |
| 844 | enableval=default) |
| 845 | ENABLE_DOXYGEN_SEARCH="$enableval" |
| 846 | |
| 847 | case "$enableval" in |
| 848 | yes|no|default) ;; |
| 849 | *) AC_MSG_ERROR([Invalid setting for --enable-doxygen-search. Use "yes" or "no"]) ;; |
| 850 | esac |
| 851 | |
| 852 | AC_ARG_ENABLE(doxygen-external-search, |
| 853 | AS_HELP_STRING([--enable-doxygen-external-search], |
| 854 | [Enable doxygen exteranl search (default is NO)]),, |
| 855 | enableval=default) |
| 856 | ENABLE_DOXYGEN_EXTERNAL_SEARCH="$enableval" |
| 857 | |
| 858 | case "$enableval" in |
| 859 | yes) |
| 860 | dnl To match with the CMake behavior, enable doxygen when |
| 861 | dnl --enable-doxygen-external-search is enabled. |
| 862 | case "$ENABLE_DOXYGEN_SEARCH" in |
| 863 | yes|default) ENABLE_DOXYGEN_SEARCH="yes" ;; |
| 864 | no) AC_MSG_ERROR([The option --enable-doxygen-external-search requires --enable-doxygen-search]) ;; |
| 865 | esac |
| 866 | ;; |
| 867 | no|default) ;; |
| 868 | *) AC_MSG_ERROR([Invalid setting for --enable-doxygen-external-search. Use "yes" or "no"]) ;; |
| 869 | esac |
| 870 | |
| 871 | AC_ARG_WITH(doxygen-search-engine-url, |
| 872 | AS_HELP_STRING([--with-doxygen-search-engine-url], |
| 873 | [Specify the external search engine for doxygen]),,) |
| 874 | WITH_DOXYGEN_SEARCH_ENGINE_URL="$withval" |
| 875 | |
| 876 | AC_ARG_WITH(doxygen-search-mappings, |
| 877 | AS_HELP_STRING([--with-doxygen-search-mappings], |
| 878 | [Specify the extra search mapping for doxygen]),,) |
| 879 | WITH_DOXYGEN_SEARCH_MAPPINGS="$withval" |
| 880 | |
| 881 | case "$ENABLE_DOXYGEN_SEARCH" in |
| 882 | yes) |
| 883 | if test "$ENABLE_DOXYGEN" = "0" ; then |
| 884 | AC_MSG_ERROR([The option --enable-doxygen-search requires --enable-doxygen.]) |
| 885 | fi |
| 886 | |
| 887 | AC_SUBST(enable_searchengine,[YES]) |
| 888 | |
| 889 | case "$ENABLE_DOXYGEN_EXTERNAL_SEARCH" in |
| 890 | yes) |
| 891 | AC_SUBST(enable_external_search,[YES]) |
| 892 | AC_SUBST(enable_server_based_search,[YES]) |
Logan Chien | 6203f9e | 2015-03-12 19:56:25 +0000 | [diff] [blame] | 893 | AC_SUBST(searchengine_url,["$WITH_DOXYGEN_SEARCH_ENGINE_URL"]) |
| 894 | AC_SUBST(extra_search_mappings,["$WITH_DOXYGEN_SEARCH_MAPPINGS"]) |
Logan Chien | 26c9f2f | 2015-03-12 17:25:01 +0000 | [diff] [blame] | 895 | ;; |
| 896 | |
| 897 | no|default) |
| 898 | AC_SUBST(enable_external_search,[NO]) |
| 899 | AC_SUBST(enable_server_based_search,[NO]) |
| 900 | AC_SUBST(searchengine_url,[]) |
| 901 | AC_SUBST(extra_search_mappings,[]) |
| 902 | ;; |
| 903 | esac |
| 904 | ;; |
| 905 | |
| 906 | no|default) |
| 907 | AC_SUBST(enable_searchengine,[NO]) |
| 908 | AC_SUBST(searchengine_url,[]) |
| 909 | AC_SUBST(enable_server_based_search,[NO]) |
| 910 | AC_SUBST(enable_external_search,[NO]) |
| 911 | AC_SUBST(extra_search_mappings,[]) |
| 912 | ;; |
| 913 | |
| 914 | *) |
| 915 | AC_MSG_ERROR([Invalid setting for --enable-doxygen-search. Use "yes" or "no"]) |
| 916 | ;; |
| 917 | esac |
| 918 | |
| 919 | dnl Allow enablement of doxygen generated Qt help files |
| 920 | AC_ARG_ENABLE(doxygen-qt-help, |
| 921 | AS_HELP_STRING([--enable-doxygen-qt-help], |
| 922 | [Build Qt help files (default is NO)]),, |
| 923 | enableval=default) |
| 924 | case "$enableval" in |
| 925 | yes) |
| 926 | if test "$ENABLE_DOXYGEN" = "0" ; then |
| 927 | AC_MSG_ERROR([The option --enable-doxygen-qt-help requires --enable-doxygen.]) |
| 928 | fi |
| 929 | |
| 930 | AC_PATH_PROG(QHELPGENERATOR, [qhelpgenerator], [qhelpgenerator]) |
| 931 | |
| 932 | dnl Qt help file for llvm doxygen documentation |
| 933 | AC_SUBST(llvm_doxygen_generate_qhp,[YES]) |
| 934 | AC_SUBST(llvm_doxygen_qch_filename,[org.llvm.qch]) |
| 935 | AC_SUBST(llvm_doxygen_qhp_namespace,[org.llvm]) |
Logan Chien | 6203f9e | 2015-03-12 19:56:25 +0000 | [diff] [blame] | 936 | AC_SUBST(llvm_doxygen_qhelpgenerator_path,["$QHELPGENERATOR"]) |
| 937 | AC_SUBST(llvm_doxygen_qhp_cust_filter_name,["$PACKAGE_STRING"]) |
| 938 | AC_SUBST(llvm_doxygen_qhp_cust_filter_attrs,["$PACKAGE_NAME,$PACKAGE_VERSION"]) |
Logan Chien | 26c9f2f | 2015-03-12 17:25:01 +0000 | [diff] [blame] | 939 | |
| 940 | dnl Qt help file for clang doxygen documentation |
| 941 | AC_SUBST(clang_doxygen_generate_qhp,[YES]) |
| 942 | AC_SUBST(clang_doxygen_qch_filename,[org.llvm.clang.qch]) |
| 943 | AC_SUBST(clang_doxygen_qhp_namespace,[org.llvm.clang]) |
Logan Chien | 6203f9e | 2015-03-12 19:56:25 +0000 | [diff] [blame] | 944 | AC_SUBST(clang_doxygen_qhelpgenerator_path,["$QHELPGENERATOR"]) |
| 945 | AC_SUBST(clang_doxygen_qhp_cust_filter_name,["Clang $PACKAGE_VERSION"]) |
| 946 | AC_SUBST(clang_doxygen_qhp_cust_filter_attrs,["Clang,$PACKAGE_VERSION"]) |
Logan Chien | 26c9f2f | 2015-03-12 17:25:01 +0000 | [diff] [blame] | 947 | ;; |
| 948 | |
| 949 | no|default) |
| 950 | AC_SUBST(llvm_doxygen_generate_qhp,[NO]) |
| 951 | AC_SUBST(llvm_doxygen_qch_filename,[]) |
| 952 | AC_SUBST(llvm_doxygen_qhp_namespace,[]) |
| 953 | AC_SUBST(llvm_doxygen_qhelpgenerator_path,[]) |
| 954 | AC_SUBST(llvm_doxygen_qhp_cust_filter_name,[]) |
| 955 | AC_SUBST(llvm_doxygen_qhp_cust_filter_attrs,[]) |
| 956 | |
| 957 | AC_SUBST(clang_doxygen_generate_qhp,[NO]) |
| 958 | AC_SUBST(clang_doxygen_qch_filename,[]) |
| 959 | AC_SUBST(clang_doxygen_qhp_namespace,[]) |
| 960 | AC_SUBST(clang_doxygen_qhelpgenerator_path,[]) |
Logan Chien | 6203f9e | 2015-03-12 19:56:25 +0000 | [diff] [blame] | 961 | AC_SUBST(clang_doxygen_qhp_cust_filter_name,["Clang $PACKAGE_VERSION"]) |
| 962 | AC_SUBST(clang_doxygen_qhp_cust_filter_attrs,["Clang,$PACKAGE_VERSION"]) |
Logan Chien | 26c9f2f | 2015-03-12 17:25:01 +0000 | [diff] [blame] | 963 | ;; |
| 964 | |
| 965 | *) |
| 966 | AC_MSG_ERROR([Invalid setting for --enable-doxygen-qt-help. Use "yes" or "no"]) ;; |
| 967 | esac |
| 968 | |
Reid Spencer | f85fabeb | 2005-08-24 10:07:20 +0000 | [diff] [blame] | 969 | dnl Allow disablement of threads |
| 970 | AC_ARG_ENABLE(threads, |
| 971 | AS_HELP_STRING([--enable-threads], |
| 972 | [Use threads if available (default is YES)]),, |
Reid Spencer | d549edc | 2006-11-05 17:08:18 +0000 | [diff] [blame] | 973 | enableval=default) |
Reid Spencer | f85fabeb | 2005-08-24 10:07:20 +0000 | [diff] [blame] | 974 | case "$enableval" in |
Dylan Noblesmith | efddf20 | 2011-11-28 00:48:58 +0000 | [diff] [blame] | 975 | yes) AC_SUBST(LLVM_ENABLE_THREADS,[1]) ;; |
| 976 | no) AC_SUBST(LLVM_ENABLE_THREADS,[0]) ;; |
| 977 | default) AC_SUBST(LLVM_ENABLE_THREADS,[1]) ;; |
Reid Spencer | f85fabeb | 2005-08-24 10:07:20 +0000 | [diff] [blame] | 978 | *) AC_MSG_ERROR([Invalid setting for --enable-threads. Use "yes" or "no"]) ;; |
| 979 | esac |
Dylan Noblesmith | efddf20 | 2011-11-28 00:48:58 +0000 | [diff] [blame] | 980 | AC_DEFINE_UNQUOTED([LLVM_ENABLE_THREADS],$LLVM_ENABLE_THREADS, |
| 981 | [Define if threads enabled]) |
Reid Spencer | f85fabeb | 2005-08-24 10:07:20 +0000 | [diff] [blame] | 982 | |
NAKAMURA Takumi | c6fce17 | 2010-12-29 03:59:03 +0000 | [diff] [blame] | 983 | dnl Allow disablement of pthread.h |
| 984 | AC_ARG_ENABLE(pthreads, |
| 985 | AS_HELP_STRING([--enable-pthreads], |
| 986 | [Use pthreads if available (default is YES)]),, |
| 987 | enableval=default) |
| 988 | case "$enableval" in |
| 989 | yes) AC_SUBST(ENABLE_PTHREADS,[1]) ;; |
| 990 | no) AC_SUBST(ENABLE_PTHREADS,[0]) ;; |
| 991 | default) AC_SUBST(ENABLE_PTHREADS,[1]) ;; |
| 992 | *) AC_MSG_ERROR([Invalid setting for --enable-pthreads. Use "yes" or "no"]) ;; |
| 993 | esac |
| 994 | |
Alexey Samsonov | 2fb337e | 2013-04-23 08:28:39 +0000 | [diff] [blame] | 995 | dnl Allow disablement of zlib |
| 996 | AC_ARG_ENABLE(zlib, |
| 997 | AS_HELP_STRING([--enable-zlib], |
| 998 | [Use zlib for compression/decompression if |
| 999 | available (default is YES)]),, |
| 1000 | enableval=default) |
| 1001 | case "$enableval" in |
| 1002 | yes) AC_SUBST(LLVM_ENABLE_ZLIB,[1]) ;; |
| 1003 | no) AC_SUBST(LLVM_ENABLE_ZLIB,[0]) ;; |
| 1004 | default) AC_SUBST(LLVM_ENABLE_ZLIB,[1]) ;; |
| 1005 | *) AC_MSG_ERROR([Invalid setting for --enable-zlib. Use "yes" or "no"]) ;; |
| 1006 | esac |
| 1007 | AC_DEFINE_UNQUOTED([LLVM_ENABLE_ZLIB],$LLVM_ENABLE_ZLIB, |
| 1008 | [Define if zlib is enabled]) |
| 1009 | |
Nick Lewycky | 7db7eb6 | 2009-02-19 06:18:24 +0000 | [diff] [blame] | 1010 | dnl Allow building without position independent code |
Reid Spencer | 05a1fe5 | 2006-12-16 22:07:52 +0000 | [diff] [blame] | 1011 | AC_ARG_ENABLE(pic, |
| 1012 | AS_HELP_STRING([--enable-pic], |
Nick Lewycky | 7db7eb6 | 2009-02-19 06:18:24 +0000 | [diff] [blame] | 1013 | [Build LLVM with Position Independent Code (default is YES)]),, |
Reid Spencer | 05a1fe5 | 2006-12-16 22:07:52 +0000 | [diff] [blame] | 1014 | enableval=default) |
| 1015 | case "$enableval" in |
| 1016 | yes) AC_SUBST(ENABLE_PIC,[1]) ;; |
| 1017 | no) AC_SUBST(ENABLE_PIC,[0]) ;; |
Nick Lewycky | 7db7eb6 | 2009-02-19 06:18:24 +0000 | [diff] [blame] | 1018 | default) AC_SUBST(ENABLE_PIC,[1]) ;; |
Reid Spencer | 05a1fe5 | 2006-12-16 22:07:52 +0000 | [diff] [blame] | 1019 | *) AC_MSG_ERROR([Invalid setting for --enable-pic. Use "yes" or "no"]) ;; |
| 1020 | esac |
| 1021 | AC_DEFINE_UNQUOTED([ENABLE_PIC],$ENABLE_PIC, |
| 1022 | [Define if position independent code is enabled]) |
| 1023 | |
Jeffrey Yasskin | 6b718f7 | 2010-02-25 06:34:33 +0000 | [diff] [blame] | 1024 | dnl Allow building a shared library and linking tools against it. |
| 1025 | AC_ARG_ENABLE(shared, |
| 1026 | AS_HELP_STRING([--enable-shared], |
| 1027 | [Build a shared library and link tools against it (default is NO)]),, |
| 1028 | enableval=default) |
| 1029 | case "$enableval" in |
| 1030 | yes) AC_SUBST(ENABLE_SHARED,[1]) ;; |
| 1031 | no) AC_SUBST(ENABLE_SHARED,[0]) ;; |
| 1032 | default) AC_SUBST(ENABLE_SHARED,[0]) ;; |
| 1033 | *) AC_MSG_ERROR([Invalid setting for --enable-shared. Use "yes" or "no"]) ;; |
| 1034 | esac |
| 1035 | |
NAKAMURA Takumi | 495afdf | 2010-12-29 03:59:14 +0000 | [diff] [blame] | 1036 | dnl Allow libstdc++ is embedded in LLVM.dll. |
| 1037 | AC_ARG_ENABLE(embed-stdcxx, |
| 1038 | AS_HELP_STRING([--enable-embed-stdcxx], |
NAKAMURA Takumi | d5a9a3a | 2011-10-13 18:04:52 +0000 | [diff] [blame] | 1039 | [Build a shared library with embedded libstdc++ for Win32 DLL (default is NO)]),, |
NAKAMURA Takumi | 495afdf | 2010-12-29 03:59:14 +0000 | [diff] [blame] | 1040 | enableval=default) |
| 1041 | case "$enableval" in |
| 1042 | yes) AC_SUBST(ENABLE_EMBED_STDCXX,[1]) ;; |
| 1043 | no) AC_SUBST(ENABLE_EMBED_STDCXX,[0]) ;; |
NAKAMURA Takumi | d5a9a3a | 2011-10-13 18:04:52 +0000 | [diff] [blame] | 1044 | default) AC_SUBST(ENABLE_EMBED_STDCXX,[0]) ;; |
NAKAMURA Takumi | 495afdf | 2010-12-29 03:59:14 +0000 | [diff] [blame] | 1045 | *) AC_MSG_ERROR([Invalid setting for --enable-embed-stdcxx. Use "yes" or "no"]) ;; |
| 1046 | esac |
| 1047 | |
Daniel Dunbar | dac1824 | 2010-05-10 20:11:56 +0000 | [diff] [blame] | 1048 | dnl Enable embedding timestamp information into build. |
| 1049 | AC_ARG_ENABLE(timestamps, |
| 1050 | AS_HELP_STRING([--enable-timestamps], |
| 1051 | [Enable embedding timestamp information in build (default is YES)]),, |
| 1052 | enableval=default) |
| 1053 | case "$enableval" in |
| 1054 | yes) AC_SUBST(ENABLE_TIMESTAMPS,[1]) ;; |
| 1055 | no) AC_SUBST(ENABLE_TIMESTAMPS,[0]) ;; |
| 1056 | default) AC_SUBST(ENABLE_TIMESTAMPS,[1]) ;; |
| 1057 | *) AC_MSG_ERROR([Invalid setting for --enable-timestamps. Use "yes" or "no"]) ;; |
| 1058 | esac |
| 1059 | AC_DEFINE_UNQUOTED([ENABLE_TIMESTAMPS],$ENABLE_TIMESTAMPS, |
Gabor Greif | 1e71896 | 2012-07-12 13:05:12 +0000 | [diff] [blame] | 1060 | [Define if timestamp information (e.g., __DATE__) is allowed]) |
Daniel Dunbar | dac1824 | 2010-05-10 20:11:56 +0000 | [diff] [blame] | 1061 | |
Daniel Dunbar | eb6c708 | 2013-08-30 20:39:21 +0000 | [diff] [blame] | 1062 | dnl Enable support for showing backtraces. |
| 1063 | AC_ARG_ENABLE(backtraces, AS_HELP_STRING( |
| 1064 | [--enable-backtraces], |
| 1065 | [Enable embedding backtraces on crash (default is YES)]), |
| 1066 | [case "$enableval" in |
| 1067 | yes) llvm_cv_enable_backtraces="yes" ;; |
| 1068 | no) llvm_cv_enable_backtraces="no" ;; |
| 1069 | *) AC_MSG_ERROR([Invalid setting for --enable-backtraces. Use "yes" or "no"]) ;; |
| 1070 | esac], |
| 1071 | llvm_cv_enable_backtraces="yes") |
| 1072 | if test "$llvm_cv_enable_backtraces" = "yes" ; then |
| 1073 | AC_DEFINE([ENABLE_BACKTRACES],[1], |
| 1074 | [Define if you want backtraces on crash]) |
| 1075 | fi |
Eric Christopher | 9fafe07 | 2012-09-21 23:03:29 +0000 | [diff] [blame] | 1076 | |
Daniel Dunbar | eb6c708 | 2013-08-30 20:39:21 +0000 | [diff] [blame] | 1077 | dnl Enable installing platform specific signal handling overrides, for improved |
| 1078 | dnl CrashRecovery support or interaction with crash reporting software. This |
| 1079 | dnl support may be inappropriate for some clients embedding LLVM as a library. |
| 1080 | AC_ARG_ENABLE(crash-overrides, AS_HELP_STRING( |
| 1081 | [--enable-crash-overrides], |
| 1082 | [Enable crash handling overrides (default is YES)]), |
| 1083 | [case "$enableval" in |
| 1084 | yes) llvm_cv_enable_crash_overrides="yes" ;; |
| 1085 | no) llvm_cv_enable_crash_overrides="no" ;; |
| 1086 | *) AC_MSG_ERROR([Invalid setting for --enable-crash-overrides. Use "yes" or "no"]) ;; |
| 1087 | esac], |
| 1088 | llvm_cv_enable_crash_overrides="yes") |
| 1089 | if test "$llvm_cv_enable_crash_overrides" = "yes" ; then |
| 1090 | AC_DEFINE([ENABLE_CRASH_OVERRIDES],[1], |
| 1091 | [Define to enable crash handling overrides]) |
| 1092 | fi |
Eric Christopher | 9fafe07 | 2012-09-21 23:03:29 +0000 | [diff] [blame] | 1093 | |
NAKAMURA Takumi | 84e8530 | 2014-02-09 16:36:42 +0000 | [diff] [blame] | 1094 | dnl List all possible targets |
Tom Stellard | 45bb48e | 2015-06-13 03:28:10 +0000 | [diff] [blame] | 1095 | ALL_TARGETS="X86 Sparc PowerPC ARM AArch64 Mips XCore MSP430 CppBackend NVPTX Hexagon SystemZ AMDGPU BPF" |
NAKAMURA Takumi | 84e8530 | 2014-02-09 16:36:42 +0000 | [diff] [blame] | 1096 | AC_SUBST(ALL_TARGETS,$ALL_TARGETS) |
| 1097 | |
Reid Spencer | 4742804 | 2005-04-22 07:27:28 +0000 | [diff] [blame] | 1098 | dnl Allow specific targets to be specified for building (or not) |
| 1099 | TARGETS_TO_BUILD="" |
Evan Cheng | 5df72aa | 2006-07-06 07:46:33 +0000 | [diff] [blame] | 1100 | AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets], |
Jeffrey Yasskin | 42a49df | 2009-09-23 17:05:42 +0000 | [diff] [blame] | 1101 | [Build specific host targets: all or target1,target2,... Valid targets are: |
Tim Northover | 00ed996 | 2014-03-29 10:18:08 +0000 | [diff] [blame] | 1102 | host, x86, x86_64, sparc, powerpc, arm64, arm, aarch64, mips, hexagon, |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 1103 | xcore, msp430, nvptx, systemz, r600, bpf, wasm, and cpp (default=all)]),, |
Reid Spencer | e482ca8 | 2005-04-22 17:02:18 +0000 | [diff] [blame] | 1104 | enableval=all) |
Jeffrey Yasskin | 42a49df | 2009-09-23 17:05:42 +0000 | [diff] [blame] | 1105 | if test "$enableval" = host-only ; then |
| 1106 | enableval=host |
| 1107 | fi |
Reid Spencer | e482ca8 | 2005-04-22 17:02:18 +0000 | [diff] [blame] | 1108 | case "$enableval" in |
NAKAMURA Takumi | 84e8530 | 2014-02-09 16:36:42 +0000 | [diff] [blame] | 1109 | all) TARGETS_TO_BUILD="$ALL_TARGETS" ;; |
Reid Spencer | e482ca8 | 2005-04-22 17:02:18 +0000 | [diff] [blame] | 1110 | *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do |
| 1111 | case "$a_target" in |
Jakob Stoklund Olesen | 526e803 | 2009-08-02 17:32:37 +0000 | [diff] [blame] | 1112 | x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; |
| 1113 | x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; |
| 1114 | sparc) TARGETS_TO_BUILD="Sparc $TARGETS_TO_BUILD" ;; |
| 1115 | powerpc) TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD" ;; |
Tim Northover | 3b0846e | 2014-05-24 12:50:23 +0000 | [diff] [blame] | 1116 | aarch64) TARGETS_TO_BUILD="AArch64 $TARGETS_TO_BUILD" ;; |
| 1117 | arm64) TARGETS_TO_BUILD="AArch64 $TARGETS_TO_BUILD" ;; |
Jakob Stoklund Olesen | 526e803 | 2009-08-02 17:32:37 +0000 | [diff] [blame] | 1118 | arm) TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;; |
Alexei Starovoitov | 7fef2f5 | 2015-06-09 18:53:30 +0000 | [diff] [blame] | 1119 | bpf) TARGETS_TO_BUILD="BPF $TARGETS_TO_BUILD" ;; |
Jakob Stoklund Olesen | 526e803 | 2009-08-02 17:32:37 +0000 | [diff] [blame] | 1120 | mips) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; |
Rafael Espindola | e46f096 | 2011-12-28 17:08:00 +0000 | [diff] [blame] | 1121 | mipsel) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; |
Simon Atanasyan | c2cccd7 | 2012-10-29 19:49:45 +0000 | [diff] [blame] | 1122 | mips64) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; |
| 1123 | mips64el) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; |
Jakob Stoklund Olesen | 526e803 | 2009-08-02 17:32:37 +0000 | [diff] [blame] | 1124 | xcore) TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;; |
| 1125 | msp430) TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;; |
Jakob Stoklund Olesen | 526e803 | 2009-08-02 17:32:37 +0000 | [diff] [blame] | 1126 | cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;; |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 1127 | hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;; |
Justin Holewinski | ae556d3 | 2012-05-04 20:18:50 +0000 | [diff] [blame] | 1128 | nvptx) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;; |
Ulrich Weigand | 1ceebf6 | 2013-05-06 16:22:34 +0000 | [diff] [blame] | 1129 | systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; |
Tom Stellard | 3e79bb7 | 2015-06-13 03:46:48 +0000 | [diff] [blame] | 1130 | amdgpu) TARGETS_TO_BUILD="AMDGPU $TARGETS_TO_BUILD" ;; |
Tom Stellard | 45bb48e | 2015-06-13 03:28:10 +0000 | [diff] [blame] | 1131 | r600) TARGETS_TO_BUILD="AMDGPU $TARGETS_TO_BUILD" ;; |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 1132 | wasm) TARGETS_TO_BUILD="WebAssembly $TARGETS_TO_BUILD" ;; |
Jeffrey Yasskin | 42a49df | 2009-09-23 17:05:42 +0000 | [diff] [blame] | 1133 | host) case "$llvm_cv_target_arch" in |
| 1134 | x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; |
| 1135 | x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; |
| 1136 | Sparc) TARGETS_TO_BUILD="Sparc $TARGETS_TO_BUILD" ;; |
| 1137 | PowerPC) TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD" ;; |
Tim Northover | 3b0846e | 2014-05-24 12:50:23 +0000 | [diff] [blame] | 1138 | AArch64) TARGETS_TO_BUILD="AArch64 $TARGETS_TO_BUILD" ;; |
Jeffrey Yasskin | 42a49df | 2009-09-23 17:05:42 +0000 | [diff] [blame] | 1139 | ARM) TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;; |
| 1140 | Mips) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; |
Jeffrey Yasskin | 42a49df | 2009-09-23 17:05:42 +0000 | [diff] [blame] | 1141 | XCore) TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;; |
| 1142 | MSP430) TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;; |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 1143 | Hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;; |
Justin Holewinski | ae556d3 | 2012-05-04 20:18:50 +0000 | [diff] [blame] | 1144 | NVPTX) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;; |
Ulrich Weigand | 1ceebf6 | 2013-05-06 16:22:34 +0000 | [diff] [blame] | 1145 | SystemZ) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; |
Dan Gohman | 10e730a | 2015-06-29 23:51:55 +0000 | [diff] [blame] | 1146 | WebAssembly) TARGETS_TO_BUILD="WebAssembly $TARGETS_TO_BUILD" ;; |
Jeffrey Yasskin | 42a49df | 2009-09-23 17:05:42 +0000 | [diff] [blame] | 1147 | *) AC_MSG_ERROR([Can not set target to build]) ;; |
| 1148 | esac ;; |
Reid Spencer | e482ca8 | 2005-04-22 17:02:18 +0000 | [diff] [blame] | 1149 | *) AC_MSG_ERROR([Unrecognized target $a_target]) ;; |
| 1150 | esac |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 1151 | done |
Reid Spencer | e482ca8 | 2005-04-22 17:02:18 +0000 | [diff] [blame] | 1152 | ;; |
| 1153 | esac |
Victor Oliveira | 9d4b8f5 | 2012-08-09 01:13:59 +0000 | [diff] [blame] | 1154 | |
| 1155 | AC_ARG_ENABLE([experimental-targets],AS_HELP_STRING([--enable-experimental-targets], |
| 1156 | [Build experimental host targets: disable or target1,target2,... |
| 1157 | (default=disable)]),, |
| 1158 | enableval=disable) |
| 1159 | |
| 1160 | if test ${enableval} != "disable" |
| 1161 | then |
| 1162 | TARGETS_TO_BUILD="$enableval $TARGETS_TO_BUILD" |
| 1163 | fi |
| 1164 | |
Reid Spencer | 4742804 | 2005-04-22 07:27:28 +0000 | [diff] [blame] | 1165 | AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD) |
| 1166 | |
Gabor Greif | e0d58d3 | 2012-01-26 10:28:58 +0000 | [diff] [blame] | 1167 | dnl Determine whether we are building LLVM support for the native architecture. |
| 1168 | dnl If so, define LLVM_NATIVE_ARCH to that LLVM target. |
Douglas Gregor | 7cbf816 | 2009-06-17 00:42:33 +0000 | [diff] [blame] | 1169 | for a_target in $TARGETS_TO_BUILD; do |
| 1170 | if test "$a_target" = "$LLVM_NATIVE_ARCH"; then |
Eric Christopher | e7a9db1 | 2010-08-30 18:34:48 +0000 | [diff] [blame] | 1171 | AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH, $LLVM_NATIVE_ARCH, |
Douglas Gregor | 7cbf816 | 2009-06-17 00:42:33 +0000 | [diff] [blame] | 1172 | [LLVM architecture name for the native architecture, if available]) |
Eric Christopher | e7a9db1 | 2010-08-30 18:34:48 +0000 | [diff] [blame] | 1173 | LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target" |
| 1174 | LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo" |
Evan Cheng | 8c886a4 | 2011-07-22 21:58:54 +0000 | [diff] [blame] | 1175 | LLVM_NATIVE_TARGETMC="LLVMInitialize${LLVM_NATIVE_ARCH}TargetMC" |
Eric Christopher | e7a9db1 | 2010-08-30 18:34:48 +0000 | [diff] [blame] | 1176 | LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter" |
Jan Sjödin | c9a16d5 | 2011-03-14 22:12:35 +0000 | [diff] [blame] | 1177 | if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then |
| 1178 | LLVM_NATIVE_ASMPARSER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser" |
| 1179 | fi |
Eric Christopher | 56079c1 | 2012-03-26 21:56:56 +0000 | [diff] [blame] | 1180 | if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/Makefile ; then |
| 1181 | LLVM_NATIVE_DISASSEMBLER="LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler" |
| 1182 | fi |
Eric Christopher | e7a9db1 | 2010-08-30 18:34:48 +0000 | [diff] [blame] | 1183 | AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGET, $LLVM_NATIVE_TARGET, |
| 1184 | [LLVM name for the native Target init function, if available]) |
| 1185 | AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGETINFO, $LLVM_NATIVE_TARGETINFO, |
| 1186 | [LLVM name for the native TargetInfo init function, if available]) |
Evan Cheng | 8c886a4 | 2011-07-22 21:58:54 +0000 | [diff] [blame] | 1187 | AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGETMC, $LLVM_NATIVE_TARGETMC, |
| 1188 | [LLVM name for the native target MC init function, if available]) |
Eric Christopher | e7a9db1 | 2010-08-30 18:34:48 +0000 | [diff] [blame] | 1189 | AC_DEFINE_UNQUOTED(LLVM_NATIVE_ASMPRINTER, $LLVM_NATIVE_ASMPRINTER, |
| 1190 | [LLVM name for the native AsmPrinter init function, if available]) |
Jan Sjödin | c9a16d5 | 2011-03-14 22:12:35 +0000 | [diff] [blame] | 1191 | if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then |
| 1192 | AC_DEFINE_UNQUOTED(LLVM_NATIVE_ASMPARSER, $LLVM_NATIVE_ASMPARSER, |
| 1193 | [LLVM name for the native AsmParser init function, if available]) |
| 1194 | fi |
Eric Christopher | 56079c1 | 2012-03-26 21:56:56 +0000 | [diff] [blame] | 1195 | if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/Makefile ; then |
| 1196 | AC_DEFINE_UNQUOTED(LLVM_NATIVE_DISASSEMBLER, $LLVM_NATIVE_DISASSEMBLER, |
| 1197 | [LLVM name for the native Disassembler init function, if available]) |
| 1198 | fi |
Douglas Gregor | 7cbf816 | 2009-06-17 00:42:33 +0000 | [diff] [blame] | 1199 | fi |
| 1200 | done |
| 1201 | |
Gabor Greif | e0d58d3 | 2012-01-26 10:28:58 +0000 | [diff] [blame] | 1202 | dnl Build the LLVM_TARGET and LLVM_... macros for Targets.def and the individual |
| 1203 | dnl target feature def files. |
Douglas Gregor | 1b731d5 | 2009-06-16 20:12:29 +0000 | [diff] [blame] | 1204 | LLVM_ENUM_TARGETS="" |
| 1205 | LLVM_ENUM_ASM_PRINTERS="" |
Daniel Dunbar | 7147577 | 2009-07-17 20:42:00 +0000 | [diff] [blame] | 1206 | LLVM_ENUM_ASM_PARSERS="" |
Daniel Dunbar | f472129 | 2009-11-25 04:30:13 +0000 | [diff] [blame] | 1207 | LLVM_ENUM_DISASSEMBLERS="" |
Douglas Gregor | 1b731d5 | 2009-06-16 20:12:29 +0000 | [diff] [blame] | 1208 | for target_to_build in $TARGETS_TO_BUILD; do |
| 1209 | LLVM_ENUM_TARGETS="LLVM_TARGET($target_to_build) $LLVM_ENUM_TARGETS" |
Chris Lattner | 2877660 | 2010-11-14 19:10:47 +0000 | [diff] [blame] | 1210 | if test -f ${srcdir}/lib/Target/${target_to_build}/*AsmPrinter.cpp ; then |
Eric Christopher | ef91774 | 2010-10-12 02:42:05 +0000 | [diff] [blame] | 1211 | LLVM_ENUM_ASM_PRINTERS="LLVM_ASM_PRINTER($target_to_build) $LLVM_ENUM_ASM_PRINTERS"; |
| 1212 | fi |
Daniel Dunbar | 7147577 | 2009-07-17 20:42:00 +0000 | [diff] [blame] | 1213 | if test -f ${srcdir}/lib/Target/${target_to_build}/AsmParser/Makefile ; then |
| 1214 | LLVM_ENUM_ASM_PARSERS="LLVM_ASM_PARSER($target_to_build) $LLVM_ENUM_ASM_PARSERS"; |
| 1215 | fi |
Daniel Dunbar | f472129 | 2009-11-25 04:30:13 +0000 | [diff] [blame] | 1216 | if test -f ${srcdir}/lib/Target/${target_to_build}/Disassembler/Makefile ; then |
| 1217 | LLVM_ENUM_DISASSEMBLERS="LLVM_DISASSEMBLER($target_to_build) $LLVM_ENUM_DISASSEMBLERS"; |
| 1218 | fi |
Douglas Gregor | 1b731d5 | 2009-06-16 20:12:29 +0000 | [diff] [blame] | 1219 | done |
| 1220 | AC_SUBST(LLVM_ENUM_TARGETS) |
| 1221 | AC_SUBST(LLVM_ENUM_ASM_PRINTERS) |
Daniel Dunbar | 7147577 | 2009-07-17 20:42:00 +0000 | [diff] [blame] | 1222 | AC_SUBST(LLVM_ENUM_ASM_PARSERS) |
Daniel Dunbar | f472129 | 2009-11-25 04:30:13 +0000 | [diff] [blame] | 1223 | AC_SUBST(LLVM_ENUM_DISASSEMBLERS) |
Douglas Gregor | 1b731d5 | 2009-06-16 20:12:29 +0000 | [diff] [blame] | 1224 | |
Daniel Dunbar | b4a289c | 2009-11-04 04:32:50 +0000 | [diff] [blame] | 1225 | dnl Override the option to use for optimized builds. |
| 1226 | AC_ARG_WITH(optimize-option, |
| 1227 | AS_HELP_STRING([--with-optimize-option], |
| 1228 | [Select the compiler options to use for optimized builds]),, |
| 1229 | withval=default) |
| 1230 | AC_MSG_CHECKING([optimization flags]) |
| 1231 | case "$withval" in |
| 1232 | default) |
| 1233 | case "$llvm_cv_os_type" in |
Daniel Dunbar | e96fcbb | 2010-04-30 17:12:23 +0000 | [diff] [blame] | 1234 | FreeBSD) optimize_option=-O2 ;; |
Daniel Dunbar | 4e06a5b | 2010-04-10 18:56:24 +0000 | [diff] [blame] | 1235 | MingW) optimize_option=-O2 ;; |
| 1236 | *) optimize_option=-O3 ;; |
Daniel Dunbar | b4a289c | 2009-11-04 04:32:50 +0000 | [diff] [blame] | 1237 | esac ;; |
| 1238 | *) optimize_option="$withval" ;; |
| 1239 | esac |
| 1240 | AC_SUBST(OPTIMIZE_OPTION,$optimize_option) |
| 1241 | AC_MSG_RESULT([$optimize_option]) |
| 1242 | |
Evan Cheng | a7bd00b | 2006-06-20 22:16:32 +0000 | [diff] [blame] | 1243 | dnl Specify extra build options |
| 1244 | AC_ARG_WITH(extra-options, |
| 1245 | AS_HELP_STRING([--with-extra-options], |
Duncan Sands | ef8c8ec | 2009-05-13 13:13:18 +0000 | [diff] [blame] | 1246 | [Specify additional options to compile LLVM with]),, |
Reid Spencer | 84749ed | 2006-07-28 22:50:07 +0000 | [diff] [blame] | 1247 | withval=default) |
| 1248 | case "$withval" in |
Evan Cheng | a7bd00b | 2006-06-20 22:16:32 +0000 | [diff] [blame] | 1249 | default) EXTRA_OPTIONS= ;; |
Reid Spencer | 84749ed | 2006-07-28 22:50:07 +0000 | [diff] [blame] | 1250 | *) EXTRA_OPTIONS=$withval ;; |
Evan Cheng | a7bd00b | 2006-06-20 22:16:32 +0000 | [diff] [blame] | 1251 | esac |
| 1252 | AC_SUBST(EXTRA_OPTIONS,$EXTRA_OPTIONS) |
Reid Spencer | 4742804 | 2005-04-22 07:27:28 +0000 | [diff] [blame] | 1253 | |
Daniel Dunbar | 0315d4a | 2011-06-16 22:30:38 +0000 | [diff] [blame] | 1254 | dnl Specify extra linker build options |
| 1255 | AC_ARG_WITH(extra-ld-options, |
| 1256 | AS_HELP_STRING([--with-extra-ld-options], |
| 1257 | [Specify additional options to link LLVM with]),, |
| 1258 | withval=default) |
| 1259 | case "$withval" in |
| 1260 | default) EXTRA_LD_OPTIONS= ;; |
| 1261 | *) EXTRA_LD_OPTIONS=$withval ;; |
| 1262 | esac |
| 1263 | AC_SUBST(EXTRA_LD_OPTIONS,$EXTRA_LD_OPTIONS) |
| 1264 | |
Gordon Henriksen | d48f459 | 2007-10-02 09:50:18 +0000 | [diff] [blame] | 1265 | dnl Allow specific bindings to be specified for building (or not) |
| 1266 | AC_ARG_ENABLE([bindings],AS_HELP_STRING([--enable-bindings], |
| 1267 | [Build specific language bindings: all,auto,none,{binding-name} (default=auto)]),, |
| 1268 | enableval=default) |
| 1269 | BINDINGS_TO_BUILD="" |
| 1270 | case "$enableval" in |
Gordon Henriksen | 61400d1 | 2007-10-02 10:14:32 +0000 | [diff] [blame] | 1271 | yes | default | auto) BINDINGS_TO_BUILD="auto" ;; |
Gordon Henriksen | d48f459 | 2007-10-02 09:50:18 +0000 | [diff] [blame] | 1272 | all ) BINDINGS_TO_BUILD="ocaml" ;; |
| 1273 | none | no) BINDINGS_TO_BUILD="" ;; |
| 1274 | *)for a_binding in `echo $enableval|sed -e 's/,/ /g' ` ; do |
| 1275 | case "$a_binding" in |
| 1276 | ocaml) BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD" ;; |
| 1277 | *) AC_MSG_ERROR([Unrecognized binding $a_binding]) ;; |
| 1278 | esac |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 1279 | done |
Gordon Henriksen | d48f459 | 2007-10-02 09:50:18 +0000 | [diff] [blame] | 1280 | ;; |
| 1281 | esac |
| 1282 | |
Gordon Henriksen | 3be1f10 | 2007-10-02 16:42:10 +0000 | [diff] [blame] | 1283 | dnl Allow the ocaml libdir to be overridden. This could go in a configure |
| 1284 | dnl script for bindings/ocaml/configure, except that its auto value depends on |
| 1285 | dnl OCAMLC, which is found here to support tests. |
| 1286 | AC_ARG_WITH([ocaml-libdir], |
| 1287 | [AS_HELP_STRING([--with-ocaml-libdir], |
| 1288 | [Specify install location for ocaml bindings (default is stdlib)])], |
| 1289 | [], |
| 1290 | [withval=auto]) |
| 1291 | case "$withval" in |
| 1292 | auto) with_ocaml_libdir="$withval" ;; |
| 1293 | /* | [[A-Za-z]]:[[\\/]]*) with_ocaml_libdir="$withval" ;; |
| 1294 | *) AC_MSG_ERROR([Invalid path for --with-ocaml-libdir. Provide full path]) ;; |
| 1295 | esac |
| 1296 | |
NAKAMURA Takumi | 914f192 | 2011-10-16 02:54:26 +0000 | [diff] [blame] | 1297 | AC_ARG_WITH(clang-srcdir, |
| 1298 | AS_HELP_STRING([--with-clang-srcdir], |
| 1299 | [Directory to the out-of-tree Clang source]),, |
| 1300 | withval="-") |
| 1301 | case "$withval" in |
Dylan Noblesmith | b5190ab | 2012-02-02 00:17:33 +0000 | [diff] [blame] | 1302 | -) clang_src_root="" ;; |
NAKAMURA Takumi | 914f192 | 2011-10-16 02:54:26 +0000 | [diff] [blame] | 1303 | /* | [[A-Za-z]]:[[\\/]]*) clang_src_root="$withval" ;; |
| 1304 | *) clang_src_root="$ac_pwd/$withval" ;; |
| 1305 | esac |
| 1306 | AC_SUBST(CLANG_SRC_ROOT,[$clang_src_root]) |
| 1307 | |
Chandler Carruth | ffae4a6 | 2010-10-19 08:21:25 +0000 | [diff] [blame] | 1308 | AC_ARG_WITH(clang-resource-dir, |
| 1309 | AS_HELP_STRING([--with-clang-resource-dir], |
| 1310 | [Relative directory from the Clang binary for resource files]),, |
| 1311 | withval="") |
| 1312 | AC_DEFINE_UNQUOTED(CLANG_RESOURCE_DIR,"$withval", |
| 1313 | [Relative directory for resource files]) |
| 1314 | |
Rafael Espindola | 662908c | 2009-12-07 00:27:35 +0000 | [diff] [blame] | 1315 | AC_ARG_WITH(c-include-dirs, |
Rafael Espindola | d95960b | 2009-11-12 05:46:09 +0000 | [diff] [blame] | 1316 | AS_HELP_STRING([--with-c-include-dirs], |
| 1317 | [Colon separated list of directories clang will search for headers]),, |
| 1318 | withval="") |
| 1319 | AC_DEFINE_UNQUOTED(C_INCLUDE_DIRS,"$withval", |
| 1320 | [Directories clang will search for headers]) |
| 1321 | |
Rafael Espindola | ec217f6 | 2012-02-03 00:59:30 +0000 | [diff] [blame] | 1322 | # Clang normally uses the system c++ headers and libraries. With this option, |
| 1323 | # clang will use the ones provided by a gcc installation instead. This option should |
| 1324 | # be passed the same value that was used with --prefix when configuring gcc. |
| 1325 | AC_ARG_WITH(gcc-toolchain, |
| 1326 | AS_HELP_STRING([--with-gcc-toolchain], |
| 1327 | [Directory where gcc is installed.]),, |
Rafael Espindola | 65e9be6d | 2009-11-16 19:46:55 +0000 | [diff] [blame] | 1328 | withval="") |
Rafael Espindola | ec217f6 | 2012-02-03 00:59:30 +0000 | [diff] [blame] | 1329 | AC_DEFINE_UNQUOTED(GCC_INSTALL_PREFIX,"$withval", |
| 1330 | [Directory where gcc is installed.]) |
Rafael Espindola | 65e9be6d | 2009-11-16 19:46:55 +0000 | [diff] [blame] | 1331 | |
Sebastian Pop | e29a6c7 | 2012-04-30 20:06:58 +0000 | [diff] [blame] | 1332 | AC_ARG_WITH(default-sysroot, |
Sebastian Pop | 5c9e184 | 2012-04-16 04:11:45 +0000 | [diff] [blame] | 1333 | AS_HELP_STRING([--with-default-sysroot], |
| 1334 | [Add --sysroot=<path> to all compiler invocations.]),, |
| 1335 | withval="") |
| 1336 | AC_DEFINE_UNQUOTED(DEFAULT_SYSROOT,"$withval", |
| 1337 | [Default <path> to all compiler invocations for --sysroot=<path>.]) |
| 1338 | |
Chandler Carruth | cc83ce4 | 2015-05-28 01:47:22 +0000 | [diff] [blame] | 1339 | AC_ARG_WITH(clang-default-openmp-runtime, |
| 1340 | AS_HELP_STRING([--with-clang-default-openmp-runtime], |
| 1341 | [The default OpenMP runtime for Clang.]),, |
Chandler Carruth | 9b0a561 | 2015-05-28 02:17:15 +0000 | [diff] [blame] | 1342 | withval="libgomp") |
Chandler Carruth | cc83ce4 | 2015-05-28 01:47:22 +0000 | [diff] [blame] | 1343 | AC_DEFINE_UNQUOTED(CLANG_DEFAULT_OPENMP_RUNTIME,"$withval", |
| 1344 | [Default OpenMP runtime used by -fopenmp.]) |
| 1345 | |
Nick Lewycky | edd8946b | 2009-02-03 07:10:08 +0000 | [diff] [blame] | 1346 | dnl Allow linking of LLVM with GPLv3 binutils code. |
| 1347 | AC_ARG_WITH(binutils-include, |
| 1348 | AS_HELP_STRING([--with-binutils-include], |
| 1349 | [Specify path to binutils/include/ containing plugin-api.h file for gold plugin.]),, |
| 1350 | withval=default) |
| 1351 | case "$withval" in |
| 1352 | default) WITH_BINUTILS_INCDIR=default ;; |
| 1353 | /* | [[A-Za-z]]:[[\\/]]*) WITH_BINUTILS_INCDIR=$withval ;; |
| 1354 | *) AC_MSG_ERROR([Invalid path for --with-binutils-include. Provide full path]) ;; |
| 1355 | esac |
| 1356 | if test "x$WITH_BINUTILS_INCDIR" != xdefault ; then |
| 1357 | AC_SUBST(BINUTILS_INCDIR,$WITH_BINUTILS_INCDIR) |
| 1358 | if test ! -f "$WITH_BINUTILS_INCDIR/plugin-api.h"; then |
| 1359 | echo "$WITH_BINUTILS_INCDIR/plugin-api.h" |
| 1360 | AC_MSG_ERROR([Invalid path to directory containing plugin-api.h.]); |
| 1361 | fi |
| 1362 | fi |
| 1363 | |
Chad Rosier | 445d39b | 2011-07-15 00:37:26 +0000 | [diff] [blame] | 1364 | dnl Specify the URL where bug reports should be submitted. |
| 1365 | AC_ARG_WITH(bug-report-url, |
| 1366 | AS_HELP_STRING([--with-bug-report-url], |
Chad Rosier | 8c9d9b2 | 2011-08-02 20:53:43 +0000 | [diff] [blame] | 1367 | [Specify the URL where bug reports should be submitted (default=http://llvm.org/bugs/)]),, |
| 1368 | withval="http://llvm.org/bugs/") |
Chad Rosier | 445d39b | 2011-07-15 00:37:26 +0000 | [diff] [blame] | 1369 | AC_DEFINE_UNQUOTED(BUG_REPORT_URL,"$withval", |
| 1370 | [Bug report URL.]) |
| 1371 | |
Chandler Carruth | f11f1e4 | 2013-08-12 09:49:17 +0000 | [diff] [blame] | 1372 | dnl --enable-terminfo: check whether the user wants to control use of terminfo: |
| 1373 | AC_ARG_ENABLE(terminfo,AS_HELP_STRING( |
| 1374 | [--enable-terminfo], |
| 1375 | [Query the terminfo database if available (default is YES)]), |
Chandler Carruth | cad7e5e | 2013-08-07 08:47:36 +0000 | [diff] [blame] | 1376 | [case "$enableval" in |
Chandler Carruth | f11f1e4 | 2013-08-12 09:49:17 +0000 | [diff] [blame] | 1377 | yes) llvm_cv_enable_terminfo="yes" ;; |
| 1378 | no) llvm_cv_enable_terminfo="no" ;; |
| 1379 | *) AC_MSG_ERROR([Invalid setting for --enable-terminfo. Use "yes" or "no"]) ;; |
Chandler Carruth | cad7e5e | 2013-08-07 08:47:36 +0000 | [diff] [blame] | 1380 | esac], |
Chandler Carruth | f11f1e4 | 2013-08-12 09:49:17 +0000 | [diff] [blame] | 1381 | llvm_cv_enable_terminfo="yes") |
NAKAMURA Takumi | 84e8530 | 2014-02-09 16:36:42 +0000 | [diff] [blame] | 1382 | case "$llvm_cv_enable_terminfo" in |
| 1383 | yes) AC_SUBST(ENABLE_TERMINFO,[1]) ;; |
| 1384 | no) AC_SUBST(ENABLE_TERMINFO,[0]) ;; |
| 1385 | esac |
Chandler Carruth | cad7e5e | 2013-08-07 08:47:36 +0000 | [diff] [blame] | 1386 | |
Peter Collingbourne | c7d437c | 2014-01-31 23:46:14 +0000 | [diff] [blame] | 1387 | dnl --enable-libedit: check whether the user wants to turn off libedit. |
| 1388 | AC_ARG_ENABLE(libedit,AS_HELP_STRING( |
| 1389 | [--enable-libedit], |
| 1390 | [Use libedit if available (default is YES)]), |
| 1391 | [case "$enableval" in |
| 1392 | yes) llvm_cv_enable_libedit="yes" ;; |
| 1393 | no) llvm_cv_enable_libedit="no" ;; |
| 1394 | *) AC_MSG_ERROR([Invalid setting for --enable-libedit. Use "yes" or "no"]) ;; |
| 1395 | esac], |
| 1396 | llvm_cv_enable_libedit="yes") |
| 1397 | |
Nick Lewycky | 9ab256ac | 2009-06-06 06:24:44 +0000 | [diff] [blame] | 1398 | dnl --enable-libffi : check whether the user wants to turn off libffi: |
| 1399 | AC_ARG_ENABLE(libffi,AS_HELP_STRING( |
Jeffrey Yasskin | 914050b | 2010-02-09 23:03:44 +0000 | [diff] [blame] | 1400 | --enable-libffi,[Check for the presence of libffi (default is NO)]), |
| 1401 | [case "$enableval" in |
| 1402 | yes) llvm_cv_enable_libffi="yes" ;; |
| 1403 | no) llvm_cv_enable_libffi="no" ;; |
| 1404 | *) AC_MSG_ERROR([Invalid setting for --enable-libffi. Use "yes" or "no"]) ;; |
| 1405 | esac], |
| 1406 | llvm_cv_enable_libffi=no) |
Nick Lewycky | 9ab256ac | 2009-06-06 06:24:44 +0000 | [diff] [blame] | 1407 | |
Bob Wilson | 3f35470 | 2011-11-28 07:59:52 +0000 | [diff] [blame] | 1408 | AC_ARG_WITH(internal-prefix, |
| 1409 | AS_HELP_STRING([--with-internal-prefix], |
| 1410 | [Installation directory for internal files]),, |
| 1411 | withval="") |
| 1412 | AC_SUBST(INTERNAL_PREFIX,[$withval]) |
| 1413 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1414 | dnl===-----------------------------------------------------------------------=== |
| 1415 | dnl=== |
| 1416 | dnl=== SECTION 4: Check for programs we need and that they are the right version |
| 1417 | dnl=== |
| 1418 | dnl===-----------------------------------------------------------------------=== |
Reid Spencer | 67be17a | 2004-08-31 14:20:36 +0000 | [diff] [blame] | 1419 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1420 | dnl Check for the tools that the makefiles require |
| 1421 | AC_CHECK_GNU_MAKE |
| 1422 | AC_PROG_LN_S |
Rafael Espindola | fd1355a | 2014-02-28 18:17:54 +0000 | [diff] [blame] | 1423 | AC_PATH_PROG(NM, [nm], [nm]) |
Reid Spencer | d42d5d4 | 2004-12-16 17:48:14 +0000 | [diff] [blame] | 1424 | AC_PATH_PROG(CMP, [cmp], [cmp]) |
| 1425 | AC_PATH_PROG(CP, [cp], [cp]) |
Reid Spencer | 0194c9a | 2004-11-29 04:56:35 +0000 | [diff] [blame] | 1426 | AC_PATH_PROG(DATE, [date], [date]) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1427 | AC_PATH_PROG(FIND, [find], [find]) |
| 1428 | AC_PATH_PROG(GREP, [grep], [grep]) |
| 1429 | AC_PATH_PROG(MKDIR,[mkdir],[mkdir]) |
Reid Spencer | 0194c9a | 2004-11-29 04:56:35 +0000 | [diff] [blame] | 1430 | AC_PATH_PROG(MV, [mv], [mv]) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1431 | AC_PROG_RANLIB |
Torok Edwin | 1e86bc5 | 2010-01-26 08:48:04 +0000 | [diff] [blame] | 1432 | AC_CHECK_TOOL(AR, ar, false) |
Reid Spencer | 0194c9a | 2004-11-29 04:56:35 +0000 | [diff] [blame] | 1433 | AC_PATH_PROG(RM, [rm], [rm]) |
| 1434 | AC_PATH_PROG(SED, [sed], [sed]) |
| 1435 | AC_PATH_PROG(TAR, [tar], [gtar]) |
Reid Spencer | 9372247e | 2006-07-28 05:05:00 +0000 | [diff] [blame] | 1436 | AC_PATH_PROG(BINPWD,[pwd], [pwd]) |
Reid Spencer | 432b315 | 2006-06-02 23:13:18 +0000 | [diff] [blame] | 1437 | |
| 1438 | dnl Looking for misc. graph plotting software |
Reid Spencer | 627023a | 2006-06-05 15:54:38 +0000 | [diff] [blame] | 1439 | AC_PATH_PROG(DOT, [dot], [echo dot]) |
| 1440 | if test "$DOT" != "echo dot" ; then |
| 1441 | AC_DEFINE([HAVE_DOT],[1],[Define if the dot program is available]) |
| 1442 | dnl If we're targeting for mingw we should emit windows paths, not msys |
Jeff Cohen | c5e5b27 | 2007-01-12 18:22:38 +0000 | [diff] [blame] | 1443 | if test "$llvm_cv_os_type" = "MingW" ; then |
Reid Spencer | 627023a | 2006-06-05 15:54:38 +0000 | [diff] [blame] | 1444 | DOT=`echo $DOT | sed 's/^\/\([[A-Za-z]]\)\//\1:\//' ` |
| 1445 | fi |
| 1446 | AC_DEFINE_UNQUOTED([LLVM_PATH_DOT],"$DOT${EXEEXT}", |
| 1447 | [Define to path to dot program if found or 'echo dot' otherwise]) |
| 1448 | fi |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1449 | |
| 1450 | dnl Find the install program |
| 1451 | AC_PROG_INSTALL |
Eric Christopher | c7289b6 | 2010-07-22 21:13:40 +0000 | [diff] [blame] | 1452 | dnl Prepend src dir to install path dir if it's a relative path |
| 1453 | dnl This is a hack for installs that take place in something other |
| 1454 | dnl than the top level. |
| 1455 | case "$INSTALL" in |
| 1456 | [[\\/$]]* | ?:[[\\/]]* ) ;; |
| 1457 | *) INSTALL="\\\$(TOPSRCDIR)/$INSTALL" ;; |
| 1458 | esac |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 1459 | |
Reid Spencer | 0194c9a | 2004-11-29 04:56:35 +0000 | [diff] [blame] | 1460 | dnl Checks for documentation and testing tools that we can do without. If these |
| 1461 | dnl are not found then they are set to "true" which always succeeds but does |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 1462 | dnl nothing. This just lets the build output show that we could have done |
| 1463 | dnl something if the tool was available. |
Bill Wendling | 5ddd03d | 2008-03-05 09:28:02 +0000 | [diff] [blame] | 1464 | AC_PATH_PROG(BZIP2, [bzip2]) |
mike-m | e08af30 | 2010-05-06 23:45:43 +0000 | [diff] [blame] | 1465 | AC_PATH_PROG(CAT, [cat]) |
Bill Wendling | 5ddd03d | 2008-03-05 09:28:02 +0000 | [diff] [blame] | 1466 | AC_PATH_PROG(DOXYGEN, [doxygen]) |
Daniel Dunbar | d188882 | 2012-05-08 18:26:07 +0000 | [diff] [blame] | 1467 | AC_PATH_PROG(GROFF, [groff]) |
Eric Christopher | 7756089 | 2010-12-10 01:31:51 +0000 | [diff] [blame] | 1468 | AC_PATH_PROG(GZIPBIN, [gzip]) |
Daniel Dunbar | d188882 | 2012-05-08 18:26:07 +0000 | [diff] [blame] | 1469 | AC_PATH_PROG(PDFROFF, [pdfroff]) |
Bill Wendling | 5ddd03d | 2008-03-05 09:28:02 +0000 | [diff] [blame] | 1470 | AC_PATH_PROG(ZIP, [zip]) |
Peter Collingbourne | 82e3e37 | 2014-10-16 22:48:02 +0000 | [diff] [blame] | 1471 | AC_PATH_PROG(GO, [go]) |
Peter Zotov | 668f967 | 2014-10-30 08:29:45 +0000 | [diff] [blame] | 1472 | AC_PATH_PROGS(OCAMLFIND, [ocamlfind]) |
Daniel Dunbar | d188882 | 2012-05-08 18:26:07 +0000 | [diff] [blame] | 1473 | AC_PATH_PROGS(GAS, [gas as]) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1474 | |
Daniel Dunbar | b524afb | 2010-08-11 23:53:59 +0000 | [diff] [blame] | 1475 | dnl Get the version of the linker in use. |
| 1476 | AC_LINK_GET_VERSION |
| 1477 | |
Nick Lewycky | 16aac99 | 2009-03-05 08:20:21 +0000 | [diff] [blame] | 1478 | dnl Determine whether the linker supports the -R option. |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1479 | AC_LINK_USE_R |
| 1480 | |
Bob Wilson | 8658b91 | 2013-08-02 22:51:06 +0000 | [diff] [blame] | 1481 | dnl Determine whether the compiler supports the -rdynamic option. |
Nick Lewycky | 16aac99 | 2009-03-05 08:20:21 +0000 | [diff] [blame] | 1482 | AC_LINK_EXPORT_DYNAMIC |
| 1483 | |
Dan Gohman | b7edb42 | 2010-06-01 14:56:56 +0000 | [diff] [blame] | 1484 | dnl Determine whether the linker supports the --version-script option. |
| 1485 | AC_LINK_VERSION_SCRIPT |
Dan Gohman | 91f8ad7 | 2010-04-16 22:58:15 +0000 | [diff] [blame] | 1486 | |
Rafael Espindola | fd1355a | 2014-02-28 18:17:54 +0000 | [diff] [blame] | 1487 | AC_CHECK_HEADERS([errno.h]) |
| 1488 | |
| 1489 | case "$llvm_cv_os_type" in |
| 1490 | Cygwin|MingW|Win32) llvm_shlib_ext=.dll ;; |
| 1491 | Darwin) llvm_shlib_ext=.dylib ;; |
| 1492 | *) llvm_shlib_ext=.so ;; |
| 1493 | esac |
| 1494 | |
| 1495 | AC_DEFINE_UNQUOTED([LTDL_SHLIB_EXT], ["$llvm_shlib_ext"], [The shared library extension]) |
Mikhail Glushenkov | 2c332fe | 2009-04-21 19:46:10 +0000 | [diff] [blame] | 1496 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1497 | AC_MSG_CHECKING([tool compatibility]) |
| 1498 | |
Reid Spencer | ca06c8e | 2004-12-08 23:07:27 +0000 | [diff] [blame] | 1499 | dnl Ensure that compilation tools are GCC or a GNU compatible compiler such as |
| 1500 | dnl ICC; we use GCC specific options in the makefiles so the compiler needs |
| 1501 | dnl to support those options. |
| 1502 | dnl "icc" emits gcc signatures |
| 1503 | dnl "icc -no-gcc" emits no gcc signature BUT is still compatible |
| 1504 | ICC=no |
| 1505 | IXX=no |
| 1506 | case $CC in |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 1507 | icc*|icpc*) |
Reid Spencer | ca06c8e | 2004-12-08 23:07:27 +0000 | [diff] [blame] | 1508 | ICC=yes |
| 1509 | IXX=yes |
| 1510 | ;; |
| 1511 | *) |
| 1512 | ;; |
| 1513 | esac |
| 1514 | |
Duraid Madina | 8604de8 | 2006-02-15 07:57:42 +0000 | [diff] [blame] | 1515 | if test "$GCC" != "yes" && test "$ICC" != "yes" |
| 1516 | then |
| 1517 | AC_MSG_ERROR([gcc|icc required but not found]) |
| 1518 | fi |
| 1519 | |
Daniel Dunbar | 00e7a84 | 2010-12-08 01:48:03 +0000 | [diff] [blame] | 1520 | dnl Ensure that compilation tools are compatible with GCC extensions |
Duraid Madina | 8604de8 | 2006-02-15 07:57:42 +0000 | [diff] [blame] | 1521 | if test "$GXX" != "yes" && test "$IXX" != "yes" |
| 1522 | then |
Daniel Dunbar | 00e7a84 | 2010-12-08 01:48:03 +0000 | [diff] [blame] | 1523 | AC_MSG_ERROR([g++|clang++|icc required but not found]) |
Duraid Madina | 8604de8 | 2006-02-15 07:57:42 +0000 | [diff] [blame] | 1524 | fi |
| 1525 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1526 | dnl Verify that GCC is version 3.0 or higher |
Reid Spencer | ca06c8e | 2004-12-08 23:07:27 +0000 | [diff] [blame] | 1527 | if test "$GCC" = "yes" |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1528 | then |
NAKAMURA Takumi | e5bc87c | 2013-01-30 01:37:55 +0000 | [diff] [blame] | 1529 | AC_COMPILE_IFELSE( |
| 1530 | [ |
| 1531 | AC_LANG_SOURCE([[ |
| 1532 | #if !defined(__GNUC__) || __GNUC__ < 3 |
| 1533 | #error Unsupported GCC version |
| 1534 | #endif |
| 1535 | ]]) |
| 1536 | ], |
| 1537 | [], [AC_MSG_ERROR([gcc 3.x required, but you have a lower version])]) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1538 | fi |
| 1539 | |
| 1540 | dnl Check for GNU Make. We use its extensions, so don't build without it |
| 1541 | if test -z "$llvm_cv_gnu_make_command" |
| 1542 | then |
| 1543 | AC_MSG_ERROR([GNU Make required but not found]) |
| 1544 | fi |
| 1545 | |
| 1546 | dnl Tool compatibility is okay if we make it here. |
| 1547 | AC_MSG_RESULT([ok]) |
| 1548 | |
Eric Christopher | b3762a0 | 2010-03-02 05:17:21 +0000 | [diff] [blame] | 1549 | dnl Check optional compiler flags. |
Julien Lerouge | e4492f6 | 2009-10-26 19:58:44 +0000 | [diff] [blame] | 1550 | AC_MSG_CHECKING([optional compiler flags]) |
| 1551 | CXX_FLAG_CHECK(NO_VARIADIC_MACROS, [-Wno-variadic-macros]) |
| 1552 | CXX_FLAG_CHECK(NO_MISSING_FIELD_INITIALIZERS, [-Wno-missing-field-initializers]) |
Rafael Espindola | 42e94d1 | 2012-02-28 23:32:06 +0000 | [diff] [blame] | 1553 | CXX_FLAG_CHECK(COVERED_SWITCH_DEFAULT, [-Wcovered-switch-default]) |
Dmitri Gribenko | b5e23ef | 2013-02-13 21:19:39 +0000 | [diff] [blame] | 1554 | |
David Greene | 9ff8d47 | 2013-01-09 22:11:13 +0000 | [diff] [blame] | 1555 | dnl GCC's potential uninitialized use analysis is weak and presents lots of |
| 1556 | dnl false positives, so disable it. |
Dmitri Gribenko | b5e23ef | 2013-02-13 21:19:39 +0000 | [diff] [blame] | 1557 | NO_UNINITIALIZED= |
| 1558 | NO_MAYBE_UNINITIALIZED= |
David Greene | 9ff8d47 | 2013-01-09 22:11:13 +0000 | [diff] [blame] | 1559 | if test "$GXX" = "yes" |
| 1560 | then |
| 1561 | CXX_FLAG_CHECK(NO_MAYBE_UNINITIALIZED, [-Wno-maybe-uninitialized]) |
| 1562 | dnl gcc 4.7 introduced -Wmaybe-uninitialized to distinguish cases which are |
Dmitri Gribenko | b5e23ef | 2013-02-13 21:19:39 +0000 | [diff] [blame] | 1563 | dnl known to be uninitialized from cases which might be uninitialized. We |
David Greene | 9ff8d47 | 2013-01-09 22:11:13 +0000 | [diff] [blame] | 1564 | dnl still want to catch the first kind of errors. |
Dmitri Gribenko | b5e23ef | 2013-02-13 21:19:39 +0000 | [diff] [blame] | 1565 | if test -z "$NO_MAYBE_UNINITIALIZED" |
David Greene | 9ff8d47 | 2013-01-09 22:11:13 +0000 | [diff] [blame] | 1566 | then |
| 1567 | CXX_FLAG_CHECK(NO_UNINITIALIZED, [-Wno-uninitialized]) |
David Greene | 9ff8d47 | 2013-01-09 22:11:13 +0000 | [diff] [blame] | 1568 | fi |
David Greene | 9ff8d47 | 2013-01-09 22:11:13 +0000 | [diff] [blame] | 1569 | fi |
Eric Christopher | 65ec83b | 2014-11-05 00:35:15 +0000 | [diff] [blame] | 1570 | |
| 1571 | dnl Check for misbehaving -Wcomment (gcc-4.7 has this) and maybe add |
| 1572 | dnl -Wno-comment to the flags. |
| 1573 | no_comment= |
| 1574 | llvm_cv_old_cxxflags="$CXXFLAGS" |
| 1575 | CXXFLAGS="$CXXFLAGS -Wcomment -Werror" |
| 1576 | AC_COMPILE_IFELSE( |
| 1577 | [ |
| 1578 | AC_LANG_SOURCE([[// Comment \o\ |
| 1579 | // Another comment |
| 1580 | int main() { return 0; } |
| 1581 | ]]) |
| 1582 | ], |
| 1583 | [ |
| 1584 | no_comment=-Wno-comment |
| 1585 | ], |
| 1586 | []) |
| 1587 | AC_SUBST(NO_COMMENT, [$no_comment]) |
| 1588 | CXXFLAGS="$llvm_cv_old_cxxflags" |
| 1589 | |
| 1590 | AC_MSG_RESULT([$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT $NO_UNINITIALIZED $NO_MAYBE_UNINITIALIZED $NO_COMMENT]) |
David Greene | 9ff8d47 | 2013-01-09 22:11:13 +0000 | [diff] [blame] | 1591 | |
Saleem Abdulrasool | 26127bd | 2013-01-30 04:07:37 +0000 | [diff] [blame] | 1592 | AC_ARG_WITH([python], |
| 1593 | [AS_HELP_STRING([--with-python], [path to python])], |
| 1594 | [PYTHON="$withval"]) |
| 1595 | |
| 1596 | if test -n "$PYTHON" && test -x "$PYTHON" ; then |
| 1597 | AC_MSG_CHECKING([for python]) |
| 1598 | AC_MSG_RESULT([user defined: $with_python]) |
| 1599 | else |
| 1600 | if test -n "$PYTHON" ; then |
| 1601 | AC_MSG_WARN([specified python ($PYTHON) is not usable, searching path]) |
| 1602 | fi |
| 1603 | |
Rafael Espindola | 21a40085 | 2014-12-12 15:29:31 +0000 | [diff] [blame] | 1604 | AC_PATH_PROG([PYTHON], [python python2 python27], |
Saleem Abdulrasool | 26127bd | 2013-01-30 04:07:37 +0000 | [diff] [blame] | 1605 | [AC_MSG_RESULT([not found]) |
Rafael Espindola | 21a40085 | 2014-12-12 15:29:31 +0000 | [diff] [blame] | 1606 | AC_MSG_ERROR([could not find python 2.7 or higher])]) |
Saleem Abdulrasool | 26127bd | 2013-01-30 04:07:37 +0000 | [diff] [blame] | 1607 | fi |
| 1608 | |
Rafael Espindola | 21a40085 | 2014-12-12 15:29:31 +0000 | [diff] [blame] | 1609 | AC_MSG_CHECKING([for python >= 2.7]) |
Bill Wendling | 58463e4e8 | 2013-10-12 08:42:59 +0000 | [diff] [blame] | 1610 | ac_python_version=`$PYTHON -V 2>&1 | cut -d' ' -f2` |
Saleem Abdulrasool | 26127bd | 2013-01-30 04:07:37 +0000 | [diff] [blame] | 1611 | ac_python_version_major=`echo $ac_python_version | cut -d'.' -f1` |
| 1612 | ac_python_version_minor=`echo $ac_python_version | cut -d'.' -f2` |
| 1613 | ac_python_version_patch=`echo $ac_python_version | cut -d'.' -f3` |
Bill Wendling | 58463e4e8 | 2013-10-12 08:42:59 +0000 | [diff] [blame] | 1614 | if test "$ac_python_version_major" -gt "2" || \ |
| 1615 | (test "$ac_python_version_major" -eq "2" && \ |
Rafael Espindola | 21a40085 | 2014-12-12 15:29:31 +0000 | [diff] [blame] | 1616 | test "$ac_python_version_minor" -ge "7") ; then |
Saleem Abdulrasool | 26127bd | 2013-01-30 04:07:37 +0000 | [diff] [blame] | 1617 | AC_MSG_RESULT([$PYTHON ($ac_python_version)]) |
| 1618 | else |
| 1619 | AC_MSG_RESULT([not found]) |
Rafael Espindola | 21a40085 | 2014-12-12 15:29:31 +0000 | [diff] [blame] | 1620 | AC_MSG_FAILURE([found python $ac_python_version ($PYTHON); required >= 2.7]) |
Saleem Abdulrasool | 26127bd | 2013-01-30 04:07:37 +0000 | [diff] [blame] | 1621 | fi |
Julien Lerouge | e4492f6 | 2009-10-26 19:58:44 +0000 | [diff] [blame] | 1622 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1623 | dnl===-----------------------------------------------------------------------=== |
| 1624 | dnl=== |
| 1625 | dnl=== SECTION 5: Check for libraries |
| 1626 | dnl=== |
| 1627 | dnl===-----------------------------------------------------------------------=== |
| 1628 | |
Reid Spencer | ec4a7f52 | 2006-01-19 08:31:08 +0000 | [diff] [blame] | 1629 | AC_CHECK_LIB(m,sin) |
Jeff Cohen | c5e5b27 | 2007-01-12 18:22:38 +0000 | [diff] [blame] | 1630 | if test "$llvm_cv_os_type" = "MingW" ; then |
NAKAMURA Takumi | d55d7f5 | 2015-06-18 04:16:05 +0000 | [diff] [blame] | 1631 | AC_CHECK_LIB(ole32, main) |
Reid Spencer | 187b4ad | 2006-06-01 19:03:21 +0000 | [diff] [blame] | 1632 | AC_CHECK_LIB(psapi, main) |
David Majnemer | 61eae2e | 2013-10-07 01:00:07 +0000 | [diff] [blame] | 1633 | AC_CHECK_LIB(shell32, main) |
Reid Spencer | a16b986 | 2006-06-01 16:55:59 +0000 | [diff] [blame] | 1634 | fi |
Reid Spencer | cd59fb7 | 2005-07-12 07:19:13 +0000 | [diff] [blame] | 1635 | |
Brian Gaeke | 25f2a37 | 2003-10-07 05:03:36 +0000 | [diff] [blame] | 1636 | dnl dlopen() is required for plugin support. |
NAKAMURA Takumi | 84e8530 | 2014-02-09 16:36:42 +0000 | [diff] [blame] | 1637 | AC_SEARCH_LIBS(dlopen,dl,LLVM_DEFINE_SUBST([HAVE_DLOPEN],[1], |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1638 | [Define if dlopen() is available on this platform.]), |
| 1639 | AC_MSG_WARN([dlopen() not found - disabling plugin support])) |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 1640 | |
Chandler Carruth | d121a7b | 2013-01-05 00:29:06 +0000 | [diff] [blame] | 1641 | dnl Search for the clock_gettime() function. Note that we rely on the POSIX |
Chandler Carruth | 4a77863 | 2013-01-05 00:34:40 +0000 | [diff] [blame] | 1642 | dnl macros to detect whether clock_gettime is available, this just finds the |
| 1643 | dnl right libraries to link with. |
Chandler Carruth | d121a7b | 2013-01-05 00:29:06 +0000 | [diff] [blame] | 1644 | AC_SEARCH_LIBS(clock_gettime,rt) |
Chandler Carruth | ef7f968 | 2013-01-04 23:19:55 +0000 | [diff] [blame] | 1645 | |
Chandler Carruth | cad7e5e | 2013-08-07 08:47:36 +0000 | [diff] [blame] | 1646 | dnl The curses library is optional; used for querying terminal info |
Chandler Carruth | f11f1e4 | 2013-08-12 09:49:17 +0000 | [diff] [blame] | 1647 | if test "$llvm_cv_enable_terminfo" = "yes" ; then |
Chandler Carruth | cad7e5e | 2013-08-07 08:47:36 +0000 | [diff] [blame] | 1648 | dnl We need the has_color functionality in curses for it to be useful. |
Joerg Sonnenberger | 4e5a399 | 2013-08-17 11:06:00 +0000 | [diff] [blame] | 1649 | AC_SEARCH_LIBS(setupterm,tinfo terminfo curses ncurses ncursesw, |
NAKAMURA Takumi | 84e8530 | 2014-02-09 16:36:42 +0000 | [diff] [blame] | 1650 | LLVM_DEFINE_SUBST([HAVE_TERMINFO],[1], |
| 1651 | [Define if the setupterm() function is supported this platform.])) |
Chandler Carruth | cad7e5e | 2013-08-07 08:47:36 +0000 | [diff] [blame] | 1652 | fi |
| 1653 | |
Peter Collingbourne | c7d437c | 2014-01-31 23:46:14 +0000 | [diff] [blame] | 1654 | dnl The libedit library is optional; used by lib/LineEditor |
| 1655 | if test "$llvm_cv_enable_libedit" = "yes" ; then |
| 1656 | AC_SEARCH_LIBS(el_init,edit, |
| 1657 | AC_DEFINE([HAVE_LIBEDIT],[1], |
| 1658 | [Define if libedit is available on this platform.])) |
| 1659 | fi |
| 1660 | |
Nick Lewycky | a89ec99 | 2009-02-04 06:26:47 +0000 | [diff] [blame] | 1661 | dnl libffi is optional; used to call external functions from the interpreter |
Nick Lewycky | 9ab256ac | 2009-06-06 06:24:44 +0000 | [diff] [blame] | 1662 | if test "$llvm_cv_enable_libffi" = "yes" ; then |
| 1663 | AC_SEARCH_LIBS(ffi_call,ffi,AC_DEFINE([HAVE_FFI_CALL],[1], |
| 1664 | [Define if libffi is available on this platform.]), |
Jeffrey Yasskin | 914050b | 2010-02-09 23:03:44 +0000 | [diff] [blame] | 1665 | AC_MSG_ERROR([libffi not found - configure without --enable-libffi to compile without it])) |
Nick Lewycky | 9ab256ac | 2009-06-06 06:24:44 +0000 | [diff] [blame] | 1666 | fi |
Nick Lewycky | a89ec99 | 2009-02-04 06:26:47 +0000 | [diff] [blame] | 1667 | |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 1668 | dnl mallinfo is optional; the code can compile (minus features) without it |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1669 | AC_SEARCH_LIBS(mallinfo,malloc,AC_DEFINE([HAVE_MALLINFO],[1], |
| 1670 | [Define if mallinfo() is available on this platform.])) |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 1671 | |
Brian Gaeke | 7ee7b40 | 2003-12-05 19:29:01 +0000 | [diff] [blame] | 1672 | dnl pthread locking functions are optional - but llvm will not be thread-safe |
| 1673 | dnl without locks. |
Dylan Noblesmith | efddf20 | 2011-11-28 00:48:58 +0000 | [diff] [blame] | 1674 | if test "$LLVM_ENABLE_THREADS" -eq 1 && test "$ENABLE_PTHREADS" -eq 1 ; then |
Edward O'Callaghan | edea326 | 2009-10-14 11:12:33 +0000 | [diff] [blame] | 1675 | AC_CHECK_LIB(pthread, pthread_mutex_init) |
Reid Spencer | f85fabeb | 2005-08-24 10:07:20 +0000 | [diff] [blame] | 1676 | AC_SEARCH_LIBS(pthread_mutex_lock,pthread, |
| 1677 | AC_DEFINE([HAVE_PTHREAD_MUTEX_LOCK],[1], |
| 1678 | [Have pthread_mutex_lock])) |
Owen Anderson | a149e22 | 2009-06-16 18:20:20 +0000 | [diff] [blame] | 1679 | AC_SEARCH_LIBS(pthread_rwlock_init,pthread, |
| 1680 | AC_DEFINE([HAVE_PTHREAD_RWLOCK_INIT],[1], |
| 1681 | [Have pthread_rwlock_init])) |
Owen Anderson | 1154983 | 2009-06-25 23:10:26 +0000 | [diff] [blame] | 1682 | AC_SEARCH_LIBS(pthread_getspecific,pthread, |
| 1683 | AC_DEFINE([HAVE_PTHREAD_GETSPECIFIC],[1], |
| 1684 | [Have pthread_getspecific])) |
Reid Spencer | f85fabeb | 2005-08-24 10:07:20 +0000 | [diff] [blame] | 1685 | fi |
Brian Gaeke | 7ee7b40 | 2003-12-05 19:29:01 +0000 | [diff] [blame] | 1686 | |
Alexey Samsonov | 2fb337e | 2013-04-23 08:28:39 +0000 | [diff] [blame] | 1687 | dnl zlib is optional; used for compression/uncompression |
| 1688 | if test "$LLVM_ENABLE_ZLIB" -eq 1 ; then |
| 1689 | AC_CHECK_LIB(z, compress2) |
| 1690 | fi |
| 1691 | |
Jeffrey Yasskin | bf3d6ba | 2009-07-10 21:08:20 +0000 | [diff] [blame] | 1692 | dnl Allow OProfile support for JIT output. |
| 1693 | AC_ARG_WITH(oprofile, |
| 1694 | AS_HELP_STRING([--with-oprofile=<prefix>], |
| 1695 | [Tell OProfile >= 0.9.4 how to symbolize JIT output]), |
| 1696 | [ |
| 1697 | AC_SUBST(USE_OPROFILE, [1]) |
| 1698 | case "$withval" in |
| 1699 | /usr|yes) llvm_cv_oppath=/usr/lib/oprofile ;; |
Jeffrey Yasskin | 2da7231 | 2009-10-07 23:22:42 +0000 | [diff] [blame] | 1700 | no) llvm_cv_oppath= |
| 1701 | AC_SUBST(USE_OPROFILE, [0]) ;; |
Jeffrey Yasskin | bf3d6ba | 2009-07-10 21:08:20 +0000 | [diff] [blame] | 1702 | *) llvm_cv_oppath="${withval}/lib/oprofile" |
Eric Christopher | 46342fe | 2012-08-03 17:45:31 +0000 | [diff] [blame] | 1703 | CPPFLAGS="-I${withval}/include";; |
Jeffrey Yasskin | bf3d6ba | 2009-07-10 21:08:20 +0000 | [diff] [blame] | 1704 | esac |
Eli Bendersky | 5262ad2 | 2012-03-13 08:33:15 +0000 | [diff] [blame] | 1705 | case $llvm_cv_os_type in |
| 1706 | Linux) |
| 1707 | if test -n "$llvm_cv_oppath" ; then |
| 1708 | LIBS="$LIBS -lopagent -L${llvm_cv_oppath} -Wl,-rpath,${llvm_cv_oppath}" |
| 1709 | dnl Work around http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537744: |
| 1710 | dnl libbfd is not included properly in libopagent in some Debian |
| 1711 | dnl versions. If libbfd isn't found at all, we assume opagent works |
| 1712 | dnl anyway. |
| 1713 | AC_SEARCH_LIBS(bfd_init, bfd, [], []) |
| 1714 | AC_SEARCH_LIBS(op_open_agent, opagent, [], [ |
| 1715 | echo "Error! You need to have libopagent around." |
Sylvestre Ledru | 1b3961c | 2015-02-01 14:55:43 +0000 | [diff] [blame] | 1716 | exit 1 |
Eli Bendersky | 5262ad2 | 2012-03-13 08:33:15 +0000 | [diff] [blame] | 1717 | ]) |
| 1718 | AC_CHECK_HEADER([opagent.h], [], [ |
| 1719 | echo "Error! You need to have opagent.h around." |
Sylvestre Ledru | 1b3961c | 2015-02-01 14:55:43 +0000 | [diff] [blame] | 1720 | exit 1 |
Eli Bendersky | 5262ad2 | 2012-03-13 08:33:15 +0000 | [diff] [blame] | 1721 | ]) |
| 1722 | fi ;; |
| 1723 | *) |
| 1724 | AC_MSG_ERROR([OProfile support is available on Linux only.]) ;; |
Peter Zotov | 668f967 | 2014-10-30 08:29:45 +0000 | [diff] [blame] | 1725 | esac |
Jeffrey Yasskin | bf3d6ba | 2009-07-10 21:08:20 +0000 | [diff] [blame] | 1726 | ], |
| 1727 | [ |
Jeffrey Yasskin | 2da7231 | 2009-10-07 23:22:42 +0000 | [diff] [blame] | 1728 | AC_SUBST(USE_OPROFILE, [0]) |
Jeffrey Yasskin | bf3d6ba | 2009-07-10 21:08:20 +0000 | [diff] [blame] | 1729 | ]) |
Eli Bendersky | 5262ad2 | 2012-03-13 08:33:15 +0000 | [diff] [blame] | 1730 | AC_DEFINE_UNQUOTED([LLVM_USE_OPROFILE],$USE_OPROFILE, |
Jeffrey Yasskin | bf3d6ba | 2009-07-10 21:08:20 +0000 | [diff] [blame] | 1731 | [Define if we have the oprofile JIT-support library]) |
| 1732 | |
Eli Bendersky | 5262ad2 | 2012-03-13 08:33:15 +0000 | [diff] [blame] | 1733 | dnl Enable support for Intel JIT Events API. |
| 1734 | AC_ARG_WITH(intel-jitevents, |
Andrew Kaylor | 5808c7d | 2012-09-28 17:35:20 +0000 | [diff] [blame] | 1735 | AS_HELP_STRING([--with-intel-jitevents Notify Intel JIT profiling API of generated code]), |
Eli Bendersky | 5262ad2 | 2012-03-13 08:33:15 +0000 | [diff] [blame] | 1736 | [ |
Andrew Kaylor | 5808c7d | 2012-09-28 17:35:20 +0000 | [diff] [blame] | 1737 | case "$withval" in |
| 1738 | yes) AC_SUBST(USE_INTEL_JITEVENTS,[1]);; |
| 1739 | no) AC_SUBST(USE_INTEL_JITEVENTS,[0]);; |
| 1740 | *) AC_MSG_ERROR([Invalid setting for --with-intel-jitevents. Use "yes" or "no"]);; |
| 1741 | esac |
| 1742 | |
Eli Bendersky | 5262ad2 | 2012-03-13 08:33:15 +0000 | [diff] [blame] | 1743 | case $llvm_cv_os_type in |
| 1744 | Linux|Win32|Cygwin|MingW) ;; |
Andrew Kaylor | 5808c7d | 2012-09-28 17:35:20 +0000 | [diff] [blame] | 1745 | *) AC_MSG_ERROR([Intel JIT API support is available on Linux and Windows only.]);; |
Eli Bendersky | 5262ad2 | 2012-03-13 08:33:15 +0000 | [diff] [blame] | 1746 | esac |
| 1747 | |
Eli Bendersky | 5262ad2 | 2012-03-13 08:33:15 +0000 | [diff] [blame] | 1748 | case "$llvm_cv_target_arch" in |
Andrew Kaylor | 5808c7d | 2012-09-28 17:35:20 +0000 | [diff] [blame] | 1749 | x86|x86_64) ;; |
| 1750 | *) AC_MSG_ERROR([Target architecture $llvm_cv_target_arch does not support Intel JIT Events API.]);; |
Eli Bendersky | 5262ad2 | 2012-03-13 08:33:15 +0000 | [diff] [blame] | 1751 | esac |
Eli Bendersky | 5262ad2 | 2012-03-13 08:33:15 +0000 | [diff] [blame] | 1752 | ], |
| 1753 | [ |
| 1754 | AC_SUBST(USE_INTEL_JITEVENTS, [0]) |
| 1755 | ]) |
| 1756 | AC_DEFINE_UNQUOTED([LLVM_USE_INTEL_JITEVENTS],$USE_INTEL_JITEVENTS, |
| 1757 | [Define if we have the Intel JIT API runtime support library]) |
| 1758 | |
Eric Christopher | c807c53 | 2012-08-03 19:47:19 +0000 | [diff] [blame] | 1759 | dnl Check for libxml2 |
| 1760 | dnl Right now we're just checking for the existence, we could also check for a |
| 1761 | dnl particular version via --version on xml2-config |
| 1762 | AC_CHECK_PROGS(XML2CONFIG, xml2-config) |
| 1763 | |
| 1764 | AC_MSG_CHECKING(for libxml2 includes) |
| 1765 | if test "x$XML2CONFIG" = "x"; then |
| 1766 | AC_MSG_RESULT(xml2-config not found) |
| 1767 | else |
| 1768 | LIBXML2_INC=`$XML2CONFIG --cflags` |
| 1769 | AC_MSG_RESULT($LIBXML2_INC) |
| 1770 | AC_CHECK_LIB(xml2, xmlReadFile,[AC_DEFINE([CLANG_HAVE_LIBXML],1,[Define if we have libxml2]) |
| 1771 | LIBXML2_LIBS="-lxml2"]) |
| 1772 | fi |
| 1773 | AC_SUBST(LIBXML2_LIBS) |
| 1774 | AC_SUBST(LIBXML2_INC) |
| 1775 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1776 | dnl===-----------------------------------------------------------------------=== |
| 1777 | dnl=== |
| 1778 | dnl=== SECTION 6: Check for header files |
| 1779 | dnl=== |
| 1780 | dnl===-----------------------------------------------------------------------=== |
| 1781 | |
Reid Spencer | 8bc110c | 2004-12-25 07:31:29 +0000 | [diff] [blame] | 1782 | dnl First, use autoconf provided macros for specific headers that we need |
Brian Gaeke | 2abe7ae | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 1783 | dnl We don't check for ancient stuff or things that are guaranteed to be there |
| 1784 | dnl by the C++ standard. We always use the <cfoo> versions of <foo.h> C headers. |
Reid Spencer | 8bc110c | 2004-12-25 07:31:29 +0000 | [diff] [blame] | 1785 | dnl Generally we're looking for POSIX headers. |
| 1786 | AC_HEADER_DIRENT |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1787 | AC_HEADER_MMAP_ANONYMOUS |
Reid Spencer | 8bc110c | 2004-12-25 07:31:29 +0000 | [diff] [blame] | 1788 | AC_HEADER_STAT |
Reid Spencer | 8bc110c | 2004-12-25 07:31:29 +0000 | [diff] [blame] | 1789 | AC_HEADER_SYS_WAIT |
| 1790 | AC_HEADER_TIME |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 1791 | |
Benjamin Kramer | 00622f7 | 2013-05-03 15:55:06 +0000 | [diff] [blame] | 1792 | AC_LANG_PUSH([C++]) |
Rui Ueyama | 292fb6d | 2014-10-27 08:16:18 +0000 | [diff] [blame] | 1793 | dnl size_t must be defined before including cxxabi.h on FreeBSD 10.0. |
| 1794 | AC_CHECK_HEADERS([cxxabi.h], [], [], |
| 1795 | [#include <stddef.h> |
| 1796 | ]) |
Benjamin Kramer | 00622f7 | 2013-05-03 15:55:06 +0000 | [diff] [blame] | 1797 | AC_LANG_POP([C++]) |
Rui Ueyama | 292fb6d | 2014-10-27 08:16:18 +0000 | [diff] [blame] | 1798 | |
Reid Kleckner | 37f69de | 2013-07-26 16:54:23 +0000 | [diff] [blame] | 1799 | AC_CHECK_HEADERS([dlfcn.h execinfo.h fcntl.h inttypes.h link.h]) |
Douglas Gregor | b81294d | 2009-05-18 17:21:34 +0000 | [diff] [blame] | 1800 | AC_CHECK_HEADERS([malloc.h setjmp.h signal.h stdint.h termios.h unistd.h]) |
Reid Kleckner | 37f69de | 2013-07-26 16:54:23 +0000 | [diff] [blame] | 1801 | AC_CHECK_HEADERS([utime.h]) |
Daniel Dunbar | 80da3fb | 2011-02-03 02:39:58 +0000 | [diff] [blame] | 1802 | AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/resource.h sys/time.h sys/uio.h]) |
Reid Kleckner | 37f69de | 2013-07-26 16:54:23 +0000 | [diff] [blame] | 1803 | AC_CHECK_HEADERS([sys/ioctl.h malloc/malloc.h mach/mach.h]) |
Jeffrey Yasskin | 3ddd88f | 2010-03-15 04:57:55 +0000 | [diff] [blame] | 1804 | AC_CHECK_HEADERS([valgrind/valgrind.h]) |
Dan Gohman | b48f904 | 2010-09-17 20:06:27 +0000 | [diff] [blame] | 1805 | AC_CHECK_HEADERS([fenv.h]) |
Joerg Sonnenberger | 8a1177f | 2013-03-25 13:13:33 +0000 | [diff] [blame] | 1806 | AC_CHECK_DECLS([FE_ALL_EXCEPT, FE_INEXACT], [], [], [[#include <fenv.h>]]) |
Dylan Noblesmith | efddf20 | 2011-11-28 00:48:58 +0000 | [diff] [blame] | 1807 | if test "$LLVM_ENABLE_THREADS" -eq 1 && test "$ENABLE_PTHREADS" -eq 1 ; then |
Reid Spencer | 83bcd76 | 2007-08-17 05:44:59 +0000 | [diff] [blame] | 1808 | AC_CHECK_HEADERS(pthread.h, |
Nick Lewycky | a89ec99 | 2009-02-04 06:26:47 +0000 | [diff] [blame] | 1809 | AC_SUBST(HAVE_PTHREAD, 1), |
| 1810 | AC_SUBST(HAVE_PTHREAD, 0)) |
Reid Spencer | d439992 | 2006-12-01 00:37:14 +0000 | [diff] [blame] | 1811 | else |
| 1812 | AC_SUBST(HAVE_PTHREAD, 0) |
Reid Spencer | f85fabeb | 2005-08-24 10:07:20 +0000 | [diff] [blame] | 1813 | fi |
Alexey Samsonov | 2fb337e | 2013-04-23 08:28:39 +0000 | [diff] [blame] | 1814 | if test "$LLVM_ENABLE_ZLIB" -eq 1 ; then |
| 1815 | AC_CHECK_HEADERS(zlib.h, |
| 1816 | AC_SUBST(HAVE_LIBZ, 1), |
| 1817 | AC_SUBST(HAVE_LIBZ, 0)) |
| 1818 | else |
| 1819 | AC_SUBST(HAVE_LIBZ, 0) |
| 1820 | fi |
Brian Gaeke | 090ed13 | 2004-02-23 22:07:01 +0000 | [diff] [blame] | 1821 | |
Nick Lewycky | e54da99 | 2009-04-13 04:26:06 +0000 | [diff] [blame] | 1822 | dnl Try to find ffi.h. |
Nick Lewycky | 9ab256ac | 2009-06-06 06:24:44 +0000 | [diff] [blame] | 1823 | if test "$llvm_cv_enable_libffi" = "yes" ; then |
| 1824 | AC_CHECK_HEADERS([ffi.h ffi/ffi.h]) |
| 1825 | fi |
Nick Lewycky | a89ec99 | 2009-02-04 06:26:47 +0000 | [diff] [blame] | 1826 | |
Eric Christopher | ca46673 | 2010-12-03 07:45:22 +0000 | [diff] [blame] | 1827 | dnl Try to find Darwin specific crash reporting libraries. |
Eric Christopher | e9c1bb6 | 2010-06-22 21:01:04 +0000 | [diff] [blame] | 1828 | AC_CHECK_HEADERS([CrashReporterClient.h]) |
| 1829 | |
Eric Christopher | ca46673 | 2010-12-03 07:45:22 +0000 | [diff] [blame] | 1830 | dnl Try to find Darwin specific crash reporting global. |
Eric Christopher | ba4f772 | 2010-12-07 02:05:42 +0000 | [diff] [blame] | 1831 | AC_MSG_CHECKING([__crashreporter_info__]) |
| 1832 | AC_LINK_IFELSE( |
NAKAMURA Takumi | e5bc87c | 2013-01-30 01:37:55 +0000 | [diff] [blame] | 1833 | [ |
| 1834 | AC_LANG_SOURCE([[ |
| 1835 | extern const char *__crashreporter_info__; |
| 1836 | int main() { |
| 1837 | __crashreporter_info__ = "test"; |
| 1838 | return 0; |
| 1839 | } |
| 1840 | ]]) |
| 1841 | ], |
| 1842 | [ |
| 1843 | AC_MSG_RESULT([yes]) |
NAKAMURA Takumi | 58da26b | 2013-01-30 01:38:03 +0000 | [diff] [blame] | 1844 | AC_DEFINE([HAVE_CRASHREPORTER_INFO], [1], [can use __crashreporter_info__]) |
NAKAMURA Takumi | e5bc87c | 2013-01-30 01:37:55 +0000 | [diff] [blame] | 1845 | ], |
| 1846 | [ |
| 1847 | AC_MSG_RESULT([no]) |
NAKAMURA Takumi | 58da26b | 2013-01-30 01:38:03 +0000 | [diff] [blame] | 1848 | AC_DEFINE([HAVE_CRASHREPORTER_INFO], [0], [can use __crashreporter_info__]) |
NAKAMURA Takumi | e5bc87c | 2013-01-30 01:37:55 +0000 | [diff] [blame] | 1849 | ]) |
Eric Christopher | ba4f772 | 2010-12-07 02:05:42 +0000 | [diff] [blame] | 1850 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1851 | dnl===-----------------------------------------------------------------------=== |
| 1852 | dnl=== |
| 1853 | dnl=== SECTION 7: Check for types and structures |
| 1854 | dnl=== |
| 1855 | dnl===-----------------------------------------------------------------------=== |
| 1856 | |
Reid Spencer | 128ae10 | 2006-11-03 18:04:08 +0000 | [diff] [blame] | 1857 | AC_HUGE_VAL_CHECK |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 1858 | AC_TYPE_PID_T |
| 1859 | AC_TYPE_SIZE_T |
Torok Edwin | 1e86bc5 | 2010-01-26 08:48:04 +0000 | [diff] [blame] | 1860 | AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[Define as the return type of signal handlers (`int' or `void').]) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1861 | AC_STRUCT_TM |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 1862 | AC_CHECK_TYPES([int64_t],,AC_MSG_ERROR([Type int64_t required but not found])) |
Reid Spencer | ab2228a | 2004-09-02 21:38:24 +0000 | [diff] [blame] | 1863 | AC_CHECK_TYPES([uint64_t],, |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1864 | AC_CHECK_TYPES([u_int64_t],, |
| 1865 | AC_MSG_ERROR([Type uint64_t or u_int64_t required but not found]))) |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 1866 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1867 | dnl===-----------------------------------------------------------------------=== |
| 1868 | dnl=== |
| 1869 | dnl=== SECTION 8: Check for specific functions needed |
| 1870 | dnl=== |
| 1871 | dnl===-----------------------------------------------------------------------=== |
| 1872 | |
Benjamin Kramer | 37dce44 | 2015-03-09 18:35:18 +0000 | [diff] [blame] | 1873 | AC_CHECK_FUNCS([backtrace getcwd ]) |
Gabor Greif | f307d94 | 2007-07-13 09:48:29 +0000 | [diff] [blame] | 1874 | AC_CHECK_FUNCS([getpagesize getrusage getrlimit setrlimit gettimeofday ]) |
Anton Korobeynikov | d01defe | 2007-02-16 19:11:07 +0000 | [diff] [blame] | 1875 | AC_CHECK_FUNCS([isatty mkdtemp mkstemp ]) |
Reid Kleckner | 37f69de | 2013-07-26 16:54:23 +0000 | [diff] [blame] | 1876 | AC_CHECK_FUNCS([mktemp posix_spawn pread realpath sbrk setrlimit ]) |
Todd Fiala | 4ccfe39 | 2014-02-05 05:04:36 +0000 | [diff] [blame] | 1877 | AC_CHECK_FUNCS([strerror strerror_r setenv ]) |
Chris Lattner | 58cee55 | 2005-11-14 07:24:17 +0000 | [diff] [blame] | 1878 | AC_CHECK_FUNCS([strtoll strtoq sysconf malloc_zone_statistics ]) |
Daniel Dunbar | 80da3fb | 2011-02-03 02:39:58 +0000 | [diff] [blame] | 1879 | AC_CHECK_FUNCS([setjmp longjmp sigsetjmp siglongjmp writev]) |
Eric Christopher | a24dc7f | 2013-07-04 01:10:38 +0000 | [diff] [blame] | 1880 | AC_CHECK_FUNCS([futimes futimens]) |
John Criswell | 4285955 | 2003-10-13 16:22:01 +0000 | [diff] [blame] | 1881 | AC_C_PRINTF_A |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1882 | AC_FUNC_RAND48 |
John Criswell | 4285955 | 2003-10-13 16:22:01 +0000 | [diff] [blame] | 1883 | |
Todd Fiala | 4ccfe39 | 2014-02-05 05:04:36 +0000 | [diff] [blame] | 1884 | dnl Check for arc4random accessible via AC_INCLUDES_DEFAULT. |
| 1885 | AC_CHECK_DECLS([arc4random]) |
| 1886 | |
NAKAMURA Takumi | 18911180 | 2011-02-09 04:18:48 +0000 | [diff] [blame] | 1887 | dnl Check the declaration "Secure API" on Windows environments. |
| 1888 | AC_CHECK_DECLS([strerror_s]) |
| 1889 | |
NAKAMURA Takumi | 03a541f | 2011-02-05 15:11:53 +0000 | [diff] [blame] | 1890 | dnl Check symbols in libgcc.a for JIT on Mingw. |
| 1891 | if test "$llvm_cv_os_type" = "MingW" ; then |
| 1892 | AC_CHECK_LIB(gcc,_alloca,AC_DEFINE([HAVE__ALLOCA],[1],[Have host's _alloca])) |
| 1893 | AC_CHECK_LIB(gcc,__alloca,AC_DEFINE([HAVE___ALLOCA],[1],[Have host's __alloca])) |
| 1894 | AC_CHECK_LIB(gcc,__chkstk,AC_DEFINE([HAVE___CHKSTK],[1],[Have host's __chkstk])) |
NAKAMURA Takumi | 7885507 | 2015-01-30 13:01:19 +0000 | [diff] [blame] | 1895 | AC_CHECK_LIB(gcc,__chkstk_ms,AC_DEFINE([HAVE___CHKSTK_MS],[1],[Have host's __chkstk_ms])) |
NAKAMURA Takumi | 03a541f | 2011-02-05 15:11:53 +0000 | [diff] [blame] | 1896 | AC_CHECK_LIB(gcc,___chkstk,AC_DEFINE([HAVE____CHKSTK],[1],[Have host's ___chkstk])) |
NAKAMURA Takumi | 7885507 | 2015-01-30 13:01:19 +0000 | [diff] [blame] | 1897 | AC_CHECK_LIB(gcc,___chkstk_ms,AC_DEFINE([HAVE____CHKSTK_MS],[1],[Have host's ___chkstk_ms])) |
NAKAMURA Takumi | 03a541f | 2011-02-05 15:11:53 +0000 | [diff] [blame] | 1898 | |
| 1899 | AC_CHECK_LIB(gcc,__ashldi3,AC_DEFINE([HAVE___ASHLDI3],[1],[Have host's __ashldi3])) |
| 1900 | AC_CHECK_LIB(gcc,__ashrdi3,AC_DEFINE([HAVE___ASHRDI3],[1],[Have host's __ashrdi3])) |
| 1901 | AC_CHECK_LIB(gcc,__divdi3,AC_DEFINE([HAVE___DIVDI3],[1],[Have host's __divdi3])) |
| 1902 | AC_CHECK_LIB(gcc,__fixdfdi,AC_DEFINE([HAVE___FIXDFDI],[1],[Have host's __fixdfdi])) |
| 1903 | AC_CHECK_LIB(gcc,__fixsfdi,AC_DEFINE([HAVE___FIXSFDI],[1],[Have host's __fixsfdi])) |
| 1904 | AC_CHECK_LIB(gcc,__floatdidf,AC_DEFINE([HAVE___FLOATDIDF],[1],[Have host's __floatdidf])) |
| 1905 | AC_CHECK_LIB(gcc,__lshrdi3,AC_DEFINE([HAVE___LSHRDI3],[1],[Have host's __lshrdi3])) |
| 1906 | AC_CHECK_LIB(gcc,__moddi3,AC_DEFINE([HAVE___MODDI3],[1],[Have host's __moddi3])) |
| 1907 | AC_CHECK_LIB(gcc,__udivdi3,AC_DEFINE([HAVE___UDIVDI3],[1],[Have host's __udivdi3])) |
| 1908 | AC_CHECK_LIB(gcc,__umoddi3,AC_DEFINE([HAVE___UMODDI3],[1],[Have host's __umoddi3])) |
| 1909 | |
| 1910 | AC_CHECK_LIB(gcc,__main,AC_DEFINE([HAVE___MAIN],[1],[Have host's __main])) |
| 1911 | AC_CHECK_LIB(gcc,__cmpdi2,AC_DEFINE([HAVE___CMPDI2],[1],[Have host's __cmpdi2])) |
| 1912 | fi |
| 1913 | |
NAKAMURA Takumi | 4471f82 | 2011-05-01 13:29:49 +0000 | [diff] [blame] | 1914 | dnl Check Win32 API EnumerateLoadedModules. |
| 1915 | if test "$llvm_cv_os_type" = "MingW" ; then |
| 1916 | AC_MSG_CHECKING([whether EnumerateLoadedModules() accepts new decl]) |
NAKAMURA Takumi | e5bc87c | 2013-01-30 01:37:55 +0000 | [diff] [blame] | 1917 | AC_COMPILE_IFELSE( |
| 1918 | [ |
| 1919 | AC_LANG_SOURCE([[ |
| 1920 | #include <windows.h> |
| 1921 | #include <imagehlp.h> |
| 1922 | extern void foo(PENUMLOADED_MODULES_CALLBACK); |
| 1923 | extern void foo(BOOL(CALLBACK*)(PCSTR,ULONG_PTR,ULONG,PVOID)); |
| 1924 | ]]) |
| 1925 | ], |
NAKAMURA Takumi | 4471f82 | 2011-05-01 13:29:49 +0000 | [diff] [blame] | 1926 | [ |
| 1927 | AC_MSG_RESULT([yes]) |
| 1928 | llvm_cv_win32_elmcb_pcstr="PCSTR" |
| 1929 | ], |
| 1930 | [ |
| 1931 | AC_MSG_RESULT([no]) |
| 1932 | llvm_cv_win32_elmcb_pcstr="PSTR" |
| 1933 | ]) |
| 1934 | AC_DEFINE_UNQUOTED([WIN32_ELMCB_PCSTR],$llvm_cv_win32_elmcb_pcstr,[Type of 1st arg on ELM Callback]) |
| 1935 | fi |
| 1936 | |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 1937 | dnl Check for mmap support.We also need to know if /dev/zero is required to |
| 1938 | dnl be opened for allocating RWX memory. |
Anton Korobeynikov | 4480ec3 | 2007-01-20 07:40:26 +0000 | [diff] [blame] | 1939 | dnl Make sure we aren't attempting to configure for an unknown system |
| 1940 | if test "$llvm_cv_platform_type" = "Unix" ; then |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 1941 | AC_FUNC_MMAP |
Anton Korobeynikov | 4480ec3 | 2007-01-20 07:40:26 +0000 | [diff] [blame] | 1942 | AC_FUNC_MMAP_FILE |
| 1943 | AC_NEED_DEV_ZERO_FOR_MMAP |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1944 | |
Anton Korobeynikov | 4480ec3 | 2007-01-20 07:40:26 +0000 | [diff] [blame] | 1945 | if test "$ac_cv_func_mmap_fixed_mapped" = "no" |
| 1946 | then |
| 1947 | AC_MSG_WARN([mmap() of a fixed address required but not supported]) |
| 1948 | fi |
| 1949 | if test "$ac_cv_func_mmap_file" = "no" |
| 1950 | then |
| 1951 | AC_MSG_WARN([mmap() of files required but not found]) |
| 1952 | fi |
John Criswell | 5ec24d8 | 2003-07-22 20:59:52 +0000 | [diff] [blame] | 1953 | fi |
| 1954 | |
Owen Anderson | b9509c5 | 2009-05-18 23:58:51 +0000 | [diff] [blame] | 1955 | dnl atomic builtins are required for threading support. |
Owen Anderson | af5db83 | 2009-05-19 22:18:56 +0000 | [diff] [blame] | 1956 | AC_MSG_CHECKING(for GCC atomic builtins) |
Eric Christopher | 84c95cc | 2010-07-28 20:26:34 +0000 | [diff] [blame] | 1957 | dnl Since we'll be using these atomic builtins in C++ files we should test |
| 1958 | dnl the C++ compiler. |
| 1959 | AC_LANG_PUSH([C++]) |
Owen Anderson | af5db83 | 2009-05-19 22:18:56 +0000 | [diff] [blame] | 1960 | AC_LINK_IFELSE( |
NAKAMURA Takumi | e5bc87c | 2013-01-30 01:37:55 +0000 | [diff] [blame] | 1961 | [ |
| 1962 | AC_LANG_SOURCE([[ |
| 1963 | int main() { |
| 1964 | volatile unsigned long val = 1; |
| 1965 | __sync_synchronize(); |
| 1966 | __sync_val_compare_and_swap(&val, 1, 0); |
| 1967 | __sync_add_and_fetch(&val, 1); |
| 1968 | __sync_sub_and_fetch(&val, 1); |
| 1969 | return 0; |
| 1970 | } |
| 1971 | ]]) |
| 1972 | ], |
| 1973 | [ |
| 1974 | AC_MSG_RESULT([yes]) |
| 1975 | AC_DEFINE([LLVM_HAS_ATOMICS], [1], [Has gcc/MSVC atomic intrinsics]) |
| 1976 | ], |
| 1977 | [ |
| 1978 | AC_MSG_RESULT([no]) |
| 1979 | AC_DEFINE([LLVM_HAS_ATOMICS], [0], [Has gcc/MSVC atomic intrinsics]) |
| 1980 | AC_MSG_WARN([LLVM will be built thread-unsafe because atomic builtins are missing]) |
| 1981 | ]) |
| 1982 | AC_LANG_POP([C++]) |
Owen Anderson | b9509c5 | 2009-05-18 23:58:51 +0000 | [diff] [blame] | 1983 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 1984 | dnl===-----------------------------------------------------------------------=== |
| 1985 | dnl=== |
| 1986 | dnl=== SECTION 9: Additional checks, variables, etc. |
| 1987 | dnl=== |
| 1988 | dnl===-----------------------------------------------------------------------=== |
John Criswell | 7a3334d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 1989 | |
Nick Lewycky | fa4c2d3 | 2009-09-29 06:18:00 +0000 | [diff] [blame] | 1990 | dnl Handle 32-bit linux systems running a 64-bit kernel. |
| 1991 | dnl This has to come after section 4 because it invokes the compiler. |
| 1992 | if test "$llvm_cv_os_type" = "Linux" -a "$llvm_cv_target_arch" = "x86_64" ; then |
| 1993 | AC_IS_LINUX_MIXED |
| 1994 | if test "$llvm_cv_linux_mixed" = "yes"; then |
| 1995 | llvm_cv_target_arch="x86" |
| 1996 | ARCH="x86" |
| 1997 | fi |
| 1998 | fi |
| 1999 | |
Eric Christopher | 8185845 | 2011-09-20 22:26:35 +0000 | [diff] [blame] | 2000 | dnl Check whether __dso_handle is present |
Anton Korobeynikov | 7ac2521 | 2007-07-30 20:02:02 +0000 | [diff] [blame] | 2001 | AC_CHECK_FUNCS([__dso_handle]) |
| 2002 | |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 2003 | dnl Propagate the shared library extension that the libltdl checks did to |
Reid Spencer | a40c687 | 2004-11-29 12:29:58 +0000 | [diff] [blame] | 2004 | dnl the Makefiles so we can use it there too |
Rafael Espindola | fd1355a | 2014-02-28 18:17:54 +0000 | [diff] [blame] | 2005 | AC_SUBST(SHLIBEXT,$llvm_shlib_ext) |
Brian Gaeke | cc3676b | 2004-01-21 19:38:56 +0000 | [diff] [blame] | 2006 | |
Gabor Greif | e0d58d3 | 2012-01-26 10:28:58 +0000 | [diff] [blame] | 2007 | dnl Translate the various configuration directories and other basic |
| 2008 | dnl information into substitutions that will end up in Makefile.config.in |
| 2009 | dnl that these configured values can be used by the makefiles |
Jeff Cohen | c5e5b27 | 2007-01-12 18:22:38 +0000 | [diff] [blame] | 2010 | if test "${prefix}" = "NONE" ; then |
Reid Spencer | 40f1b13 | 2006-05-16 08:53:32 +0000 | [diff] [blame] | 2011 | prefix="/usr/local" |
| 2012 | fi |
Reid Spencer | cf05c12 | 2004-08-20 09:03:12 +0000 | [diff] [blame] | 2013 | eval LLVM_PREFIX="${prefix}"; |
| 2014 | eval LLVM_BINDIR="${prefix}/bin"; |
Reid Spencer | 0194c9a | 2004-11-29 04:56:35 +0000 | [diff] [blame] | 2015 | eval LLVM_DATADIR="${prefix}/share/llvm"; |
Eric Christopher | b3762a0 | 2010-03-02 05:17:21 +0000 | [diff] [blame] | 2016 | eval LLVM_DOCSDIR="${prefix}/share/doc/llvm"; |
Reid Spencer | 0194c9a | 2004-11-29 04:56:35 +0000 | [diff] [blame] | 2017 | eval LLVM_ETCDIR="${prefix}/etc/llvm"; |
Reid Spencer | cf05c12 | 2004-08-20 09:03:12 +0000 | [diff] [blame] | 2018 | eval LLVM_INCLUDEDIR="${prefix}/include"; |
| 2019 | eval LLVM_INFODIR="${prefix}/info"; |
| 2020 | eval LLVM_MANDIR="${prefix}/man"; |
| 2021 | LLVM_CONFIGTIME=`date` |
| 2022 | AC_SUBST(LLVM_PREFIX) |
| 2023 | AC_SUBST(LLVM_BINDIR) |
Reid Spencer | cf05c12 | 2004-08-20 09:03:12 +0000 | [diff] [blame] | 2024 | AC_SUBST(LLVM_DATADIR) |
| 2025 | AC_SUBST(LLVM_DOCSDIR) |
| 2026 | AC_SUBST(LLVM_ETCDIR) |
| 2027 | AC_SUBST(LLVM_INCLUDEDIR) |
| 2028 | AC_SUBST(LLVM_INFODIR) |
| 2029 | AC_SUBST(LLVM_MANDIR) |
| 2030 | AC_SUBST(LLVM_CONFIGTIME) |
Reid Spencer | cf05c12 | 2004-08-20 09:03:12 +0000 | [diff] [blame] | 2031 | |
Daniel Dunbar | 9370ecf | 2012-03-02 16:24:21 +0000 | [diff] [blame] | 2032 | dnl Disable embedding timestamps in the build directory, with ENABLE_TIMESTAMPS. |
| 2033 | if test "${ENABLE_TIMESTAMPS}" = "0"; then |
| 2034 | LLVM_CONFIGTIME="(timestamp not enabled)" |
| 2035 | fi |
| 2036 | |
Gabor Greif | e0d58d3 | 2012-01-26 10:28:58 +0000 | [diff] [blame] | 2037 | dnl Place the various directories into the config.h file as #defines so that we |
| 2038 | dnl can know about the installation paths within LLVM. |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 2039 | AC_DEFINE_UNQUOTED(LLVM_PREFIX,"$LLVM_PREFIX", |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2040 | [Installation prefix directory]) |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 2041 | AC_DEFINE_UNQUOTED(LLVM_BINDIR, "$LLVM_BINDIR", |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2042 | [Installation directory for binary executables]) |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 2043 | AC_DEFINE_UNQUOTED(LLVM_DATADIR, "$LLVM_DATADIR", |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2044 | [Installation directory for data files]) |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 2045 | AC_DEFINE_UNQUOTED(LLVM_DOCSDIR, "$LLVM_DOCSDIR", |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2046 | [Installation directory for documentation]) |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 2047 | AC_DEFINE_UNQUOTED(LLVM_ETCDIR, "$LLVM_ETCDIR", |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2048 | [Installation directory for config files]) |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 2049 | AC_DEFINE_UNQUOTED(LLVM_INCLUDEDIR, "$LLVM_INCLUDEDIR", |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2050 | [Installation directory for include files]) |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 2051 | AC_DEFINE_UNQUOTED(LLVM_INFODIR, "$LLVM_INFODIR", |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2052 | [Installation directory for .info files]) |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 2053 | AC_DEFINE_UNQUOTED(LLVM_MANDIR, "$LLVM_MANDIR", |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2054 | [Installation directory for man pages]) |
Eric Christopher | e62b441 | 2007-12-01 00:34:39 +0000 | [diff] [blame] | 2055 | AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME", |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2056 | [Time at which LLVM was configured]) |
Tim Northover | fee13d1 | 2013-05-04 07:36:23 +0000 | [diff] [blame] | 2057 | AC_DEFINE_UNQUOTED(LLVM_HOST_TRIPLE, "$host", |
NAKAMURA Takumi | 43652ae | 2012-07-22 03:04:52 +0000 | [diff] [blame] | 2058 | [Host triple LLVM will be executed on]) |
Sebastian Pop | ec2fb22 | 2011-11-01 21:31:44 +0000 | [diff] [blame] | 2059 | AC_DEFINE_UNQUOTED(LLVM_DEFAULT_TARGET_TRIPLE, "$target", |
| 2060 | [Target triple LLVM will generate code for by default]) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2061 | |
Gabor Greif | e0d58d3 | 2012-01-26 10:28:58 +0000 | [diff] [blame] | 2062 | dnl Determine which bindings to build. |
Gordon Henriksen | d48f459 | 2007-10-02 09:50:18 +0000 | [diff] [blame] | 2063 | if test "$BINDINGS_TO_BUILD" = auto ; then |
| 2064 | BINDINGS_TO_BUILD="" |
Peter Zotov | 668f967 | 2014-10-30 08:29:45 +0000 | [diff] [blame] | 2065 | if test "x$OCAMLFIND" != x ; then |
Gordon Henriksen | d48f459 | 2007-10-02 09:50:18 +0000 | [diff] [blame] | 2066 | BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD" |
| 2067 | fi |
Peter Collingbourne | 82e3e37 | 2014-10-16 22:48:02 +0000 | [diff] [blame] | 2068 | if test "x$GO" != x ; then |
| 2069 | if $GO run ${srcdir}/bindings/go/conftest.go ; then |
| 2070 | BINDINGS_TO_BUILD="go $BINDINGS_TO_BUILD" |
| 2071 | fi |
| 2072 | fi |
Gordon Henriksen | d48f459 | 2007-10-02 09:50:18 +0000 | [diff] [blame] | 2073 | fi |
| 2074 | AC_SUBST(BINDINGS_TO_BUILD,$BINDINGS_TO_BUILD) |
| 2075 | |
Gabor Greif | e0d58d3 | 2012-01-26 10:28:58 +0000 | [diff] [blame] | 2076 | dnl Do any work necessary to ensure that bindings have what they need. |
Gordon Henriksen | 3be1f10 | 2007-10-02 16:42:10 +0000 | [diff] [blame] | 2077 | binding_prereqs_failed=0 |
| 2078 | for a_binding in $BINDINGS_TO_BUILD ; do |
| 2079 | case "$a_binding" in |
| 2080 | ocaml) |
Peter Zotov | 668f967 | 2014-10-30 08:29:45 +0000 | [diff] [blame] | 2081 | if test "x$OCAMLFIND" = x ; then |
| 2082 | AC_MSG_WARN([--enable-bindings=ocaml specified, but ocamlfind not found. Try configure OCAMLFIND=/path/to/ocamlfind]) |
Gordon Henriksen | 3be1f10 | 2007-10-02 16:42:10 +0000 | [diff] [blame] | 2083 | binding_prereqs_failed=1 |
| 2084 | fi |
Peter Zotov | 668f967 | 2014-10-30 08:29:45 +0000 | [diff] [blame] | 2085 | |
| 2086 | if $OCAMLFIND opt -version >/dev/null 2>/dev/null ; then |
| 2087 | HAVE_OCAMLOPT=1 |
| 2088 | else |
| 2089 | HAVE_OCAMLOPT=0 |
| 2090 | fi |
| 2091 | AC_SUBST(HAVE_OCAMLOPT) |
| 2092 | |
| 2093 | if ! $OCAMLFIND query ctypes >/dev/null 2>/dev/null; then |
| 2094 | AC_MSG_WARN([--enable-bindings=ocaml specified, but ctypes is not installed]) |
Gordon Henriksen | 3be1f10 | 2007-10-02 16:42:10 +0000 | [diff] [blame] | 2095 | binding_prereqs_failed=1 |
| 2096 | fi |
Peter Zotov | 668f967 | 2014-10-30 08:29:45 +0000 | [diff] [blame] | 2097 | |
| 2098 | if $OCAMLFIND query oUnit >/dev/null 2>/dev/null; then |
| 2099 | HAVE_OCAML_OUNIT=1 |
| 2100 | else |
| 2101 | HAVE_OCAML_OUNIT=0 |
| 2102 | AC_MSG_WARN([--enable-bindings=ocaml specified, but OUnit 2 is not installed. Tests will not run]) |
| 2103 | dnl oUnit is optional! |
Gordon Henriksen | 3be1f10 | 2007-10-02 16:42:10 +0000 | [diff] [blame] | 2104 | fi |
Peter Zotov | 668f967 | 2014-10-30 08:29:45 +0000 | [diff] [blame] | 2105 | AC_SUBST(HAVE_OCAML_OUNIT) |
| 2106 | |
Gordon Henriksen | 3be1f10 | 2007-10-02 16:42:10 +0000 | [diff] [blame] | 2107 | if test "x$with_ocaml_libdir" != xauto ; then |
| 2108 | AC_SUBST(OCAML_LIBDIR,$with_ocaml_libdir) |
| 2109 | else |
Peter Zotov | 668f967 | 2014-10-30 08:29:45 +0000 | [diff] [blame] | 2110 | ocaml_stdlib="`"$OCAMLFIND" ocamlc -where`" |
Gordon Henriksen | 3be1f10 | 2007-10-02 16:42:10 +0000 | [diff] [blame] | 2111 | if test "$LLVM_PREFIX" '<' "$ocaml_stdlib" -a "$ocaml_stdlib" '<' "$LLVM_PREFIX~" |
| 2112 | then |
| 2113 | # ocaml stdlib is beneath our prefix; use stdlib |
| 2114 | AC_SUBST(OCAML_LIBDIR,$ocaml_stdlib) |
| 2115 | else |
| 2116 | # ocaml stdlib is outside our prefix; use libdir/ocaml |
Rafael Espindola | b58973f | 2013-06-11 18:52:11 +0000 | [diff] [blame] | 2117 | AC_SUBST(OCAML_LIBDIR,${prefix}/lib/ocaml) |
Gordon Henriksen | 3be1f10 | 2007-10-02 16:42:10 +0000 | [diff] [blame] | 2118 | fi |
| 2119 | fi |
| 2120 | ;; |
Peter Collingbourne | 82e3e37 | 2014-10-16 22:48:02 +0000 | [diff] [blame] | 2121 | go) |
| 2122 | if test "x$GO" = x ; then |
| 2123 | AC_MSG_WARN([--enable-bindings=go specified, but go not found. Try configure GO=/path/to/go]) |
| 2124 | binding_prereqs_failed=1 |
| 2125 | else |
| 2126 | if $GO run ${srcdir}/bindings/go/conftest.go ; then |
| 2127 | : |
| 2128 | else |
| 2129 | AC_MSG_WARN([--enable-bindings=go specified, but need at least Go 1.2. Try configure GO=/path/to/go]) |
| 2130 | binding_prereqs_failed=1 |
| 2131 | fi |
| 2132 | fi |
| 2133 | ;; |
Gordon Henriksen | 3be1f10 | 2007-10-02 16:42:10 +0000 | [diff] [blame] | 2134 | esac |
| 2135 | done |
| 2136 | if test "$binding_prereqs_failed" = 1 ; then |
| 2137 | AC_MSG_ERROR([Prequisites for bindings not satisfied. Fix them or use configure --disable-bindings.]) |
| 2138 | fi |
| 2139 | |
Nick Lewycky | 16aac99 | 2009-03-05 08:20:21 +0000 | [diff] [blame] | 2140 | dnl Determine whether the compiler supports -fvisibility-inlines-hidden. |
Daniel Dunbar | 61e0a82 | 2008-09-02 17:35:16 +0000 | [diff] [blame] | 2141 | AC_CXX_USE_VISIBILITY_INLINES_HIDDEN |
Gordon Henriksen | 3be1f10 | 2007-10-02 16:42:10 +0000 | [diff] [blame] | 2142 | |
Nick Lewycky | 7d01e39 | 2009-03-03 04:55:15 +0000 | [diff] [blame] | 2143 | dnl Determine linker rpath flag |
Nick Lewycky | 16aac99 | 2009-03-05 08:20:21 +0000 | [diff] [blame] | 2144 | if test "$llvm_cv_link_use_r" = "yes" ; then |
| 2145 | RPATH="-Wl,-R" |
| 2146 | else |
| 2147 | RPATH="-Wl,-rpath" |
| 2148 | fi |
Nick Lewycky | 7d01e39 | 2009-03-03 04:55:15 +0000 | [diff] [blame] | 2149 | AC_SUBST(RPATH) |
| 2150 | |
Nick Lewycky | 16aac99 | 2009-03-05 08:20:21 +0000 | [diff] [blame] | 2151 | dnl Determine linker rdynamic flag |
| 2152 | if test "$llvm_cv_link_use_export_dynamic" = "yes" ; then |
Bob Wilson | 8658b91 | 2013-08-02 22:51:06 +0000 | [diff] [blame] | 2153 | RDYNAMIC="-rdynamic" |
Nick Lewycky | 16aac99 | 2009-03-05 08:20:21 +0000 | [diff] [blame] | 2154 | else |
| 2155 | RDYNAMIC="" |
| 2156 | fi |
| 2157 | AC_SUBST(RDYNAMIC) |
| 2158 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2159 | dnl===-----------------------------------------------------------------------=== |
| 2160 | dnl=== |
| 2161 | dnl=== SECTION 10: Specify the output files and generate it |
| 2162 | dnl=== |
| 2163 | dnl===-----------------------------------------------------------------------=== |
| 2164 | |
| 2165 | dnl Configure header files |
Reid Spencer | b48e3f8 | 2005-08-24 10:43:10 +0000 | [diff] [blame] | 2166 | dnl WARNING: dnl If you add or remove any of the following config headers, then |
Dylan Noblesmith | c120957 | 2012-01-17 02:56:49 +0000 | [diff] [blame] | 2167 | dnl you MUST also update Makefile so that the variable FilesToConfig |
Reid Spencer | b48e3f8 | 2005-08-24 10:43:10 +0000 | [diff] [blame] | 2168 | dnl contains the same list of files as AC_CONFIG_HEADERS below. This ensures the |
| 2169 | dnl files can be updated automatically when their *.in sources change. |
Eric Christopher | f24446d | 2010-08-08 02:44:17 +0000 | [diff] [blame] | 2170 | AC_CONFIG_HEADERS([include/llvm/Config/config.h include/llvm/Config/llvm-config.h]) |
Eric Christopher | e8f47dd | 2010-08-08 09:18:29 +0000 | [diff] [blame] | 2171 | AH_TOP([#ifndef CONFIG_H |
NAKAMURA Takumi | 6534e48 | 2015-06-18 04:08:20 +0000 | [diff] [blame] | 2172 | #define CONFIG_H |
| 2173 | |
| 2174 | /* Exported configuration */ |
| 2175 | #include "llvm/Config/llvm-config.h"]) |
Eric Christopher | e8f47dd | 2010-08-08 09:18:29 +0000 | [diff] [blame] | 2176 | AH_BOTTOM([#endif]) |
| 2177 | |
Douglas Gregor | 1b731d5 | 2009-06-16 20:12:29 +0000 | [diff] [blame] | 2178 | AC_CONFIG_FILES([include/llvm/Config/Targets.def]) |
| 2179 | AC_CONFIG_FILES([include/llvm/Config/AsmPrinters.def]) |
Daniel Dunbar | ce77aa0 | 2009-07-17 20:56:18 +0000 | [diff] [blame] | 2180 | AC_CONFIG_FILES([include/llvm/Config/AsmParsers.def]) |
Daniel Dunbar | f472129 | 2009-11-25 04:30:13 +0000 | [diff] [blame] | 2181 | AC_CONFIG_FILES([include/llvm/Config/Disassemblers.def]) |
Michael J. Spencer | 447762d | 2010-11-29 18:16:10 +0000 | [diff] [blame] | 2182 | AC_CONFIG_HEADERS([include/llvm/Support/DataTypes.h]) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2183 | |
| 2184 | dnl Configure the makefile's configuration data |
| 2185 | AC_CONFIG_FILES([Makefile.config]) |
| 2186 | |
Reid Spencer | 1277ba2 | 2006-08-16 00:45:38 +0000 | [diff] [blame] | 2187 | dnl Configure the RPM spec file for LLVM |
| 2188 | AC_CONFIG_FILES([llvm.spec]) |
| 2189 | |
Peter Collingbourne | 5ac59df | 2011-05-13 03:27:56 +0000 | [diff] [blame] | 2190 | dnl Configure doxygen's configuration file |
| 2191 | AC_CONFIG_FILES([docs/doxygen.cfg]) |
Dylan Noblesmith | 57f439c | 2012-02-01 14:06:21 +0000 | [diff] [blame] | 2192 | |
| 2193 | dnl Configure clang, if present |
Dylan Noblesmith | e21a3b2 | 2012-02-04 02:41:36 +0000 | [diff] [blame] | 2194 | if test "${clang_src_root}" = ""; then |
Dylan Noblesmith | a367022 | 2012-02-02 00:54:18 +0000 | [diff] [blame] | 2195 | clang_src_root="$srcdir/tools/clang" |
Dylan Noblesmith | b5190ab | 2012-02-02 00:17:33 +0000 | [diff] [blame] | 2196 | fi |
Dylan Noblesmith | 2badba5 | 2012-02-02 00:11:14 +0000 | [diff] [blame] | 2197 | if test -f ${clang_src_root}/README.txt; then |
Chandler Carruth | 9db2b52 | 2014-12-29 11:58:17 +0000 | [diff] [blame] | 2198 | dnl Clang supports build systems which use the multilib libdir suffix. |
| 2199 | dnl The autoconf system doesn't support this so stub out that variable. |
| 2200 | AC_DEFINE_UNQUOTED(CLANG_LIBDIR_SUFFIX,"", |
| 2201 | [Multilib suffix for libdir.]) |
| 2202 | |
Dylan Noblesmith | a7a29c17 | 2012-02-04 03:00:50 +0000 | [diff] [blame] | 2203 | dnl Use variables to stay under 80 columns. |
| 2204 | configh="include/clang/Config/config.h" |
| 2205 | doxy="docs/doxygen.cfg" |
| 2206 | AC_CONFIG_HEADERS([tools/clang/${configh}:${clang_src_root}/${configh}.in]) |
| 2207 | AC_CONFIG_FILES([tools/clang/${doxy}:${clang_src_root}/${doxy}.in]) |
Peter Collingbourne | 5ac59df | 2011-05-13 03:27:56 +0000 | [diff] [blame] | 2208 | fi |
| 2209 | |
Torok Edwin | 229f8d7 | 2011-10-14 20:38:02 +0000 | [diff] [blame] | 2210 | dnl OCaml findlib META file |
| 2211 | AC_CONFIG_FILES([bindings/ocaml/llvm/META.llvm]) |
| 2212 | |
Jordan Rose | 3c837ab | 2012-10-01 18:40:32 +0000 | [diff] [blame] | 2213 | dnl Add --program-prefix value to Makefile.rules. Already an ARG variable. |
| 2214 | test "x$program_prefix" = "xNONE" && program_prefix="" |
| 2215 | AC_SUBST([program_prefix]) |
| 2216 | |
| 2217 | |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2218 | dnl Do special configuration of Makefiles |
Reid Spencer | f3102c2 | 2005-02-24 18:31:27 +0000 | [diff] [blame] | 2219 | AC_CONFIG_COMMANDS([setup],,[llvm_src="${srcdir}"]) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2220 | AC_CONFIG_MAKEFILE(Makefile) |
| 2221 | AC_CONFIG_MAKEFILE(Makefile.common) |
| 2222 | AC_CONFIG_MAKEFILE(examples/Makefile) |
| 2223 | AC_CONFIG_MAKEFILE(lib/Makefile) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2224 | AC_CONFIG_MAKEFILE(test/Makefile) |
| 2225 | AC_CONFIG_MAKEFILE(test/Makefile.tests) |
Bill Wendling | 8790e32 | 2009-01-04 23:12:21 +0000 | [diff] [blame] | 2226 | AC_CONFIG_MAKEFILE(unittests/Makefile) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2227 | AC_CONFIG_MAKEFILE(tools/Makefile) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2228 | AC_CONFIG_MAKEFILE(utils/Makefile) |
| 2229 | AC_CONFIG_MAKEFILE(projects/Makefile) |
Gordon Henriksen | 54fd757 | 2007-09-22 21:36:22 +0000 | [diff] [blame] | 2230 | AC_CONFIG_MAKEFILE(bindings/Makefile) |
| 2231 | AC_CONFIG_MAKEFILE(bindings/ocaml/Makefile.ocaml) |
Reid Spencer | 0241e38 | 2004-11-25 04:51:04 +0000 | [diff] [blame] | 2232 | |
| 2233 | dnl Finally, crank out the output |
Reid Spencer | 2024d0e | 2004-09-19 23:43:52 +0000 | [diff] [blame] | 2234 | AC_OUTPUT |