Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 1 | dnl Initialize autoconf |
Reid Spencer | a91929d | 2004-08-20 09:03:12 +0000 | [diff] [blame] | 2 | AC_INIT([[LLVM]],[[1.4]],[llvmbugs@cs.uiuc.edu]) |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 3 | |
| 4 | dnl Place all of the extra autoconf files into the config subdirectory |
| 5 | AC_CONFIG_AUX_DIR([autoconf]) |
| 6 | |
John Criswell | 93e1c72 | 2003-09-15 17:04:06 +0000 | [diff] [blame] | 7 | dnl Quit if the source directory has already been configured. |
John Criswell | 1b82432 | 2003-09-15 17:19:42 +0000 | [diff] [blame] | 8 | dnl NOTE: This relies upon undocumented autoconf behavior. |
| 9 | if test ${srcdir} != "." |
John Criswell | 93e1c72 | 2003-09-15 17:04:06 +0000 | [diff] [blame] | 10 | then |
John Criswell | 1b82432 | 2003-09-15 17:19:42 +0000 | [diff] [blame] | 11 | if test -f ${srcdir}/include/Config/config.h |
| 12 | then |
| 13 | AC_MSG_ERROR([Already configured in ${srcdir}]) |
| 14 | fi |
John Criswell | 93e1c72 | 2003-09-15 17:04:06 +0000 | [diff] [blame] | 15 | fi |
| 16 | |
John Criswell | 33a911a | 2003-11-25 20:36:46 +0000 | [diff] [blame] | 17 | dnl Configure all of the projects present in our source tree. |
John Criswell | 33a911a | 2003-11-25 20:36:46 +0000 | [diff] [blame] | 18 | for i in `ls ${srcdir}/projects` |
| 19 | do |
| 20 | if test ${i} != "CVS" |
| 21 | then |
John Criswell | 9493c97 | 2003-12-12 20:09:33 +0000 | [diff] [blame] | 22 | if test -f ${srcdir}/projects/${i}/configure |
John Criswell | 33a911a | 2003-11-25 20:36:46 +0000 | [diff] [blame] | 23 | then |
| 24 | AC_CONFIG_SUBDIRS(projects/${i}) |
| 25 | fi |
| 26 | fi |
| 27 | done |
John Criswell | 559a6c1 | 2003-09-30 16:31:48 +0000 | [diff] [blame] | 28 | |
John Criswell | dc76e32 | 2004-07-23 15:40:57 +0000 | [diff] [blame] | 29 | dnl Configure header files |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 30 | AC_CONFIG_HEADERS(include/Config/config.h) |
John Criswell | dc76e32 | 2004-07-23 15:40:57 +0000 | [diff] [blame] | 31 | |
| 32 | dnl Configure other output file |
| 33 | AC_CONFIG_FILES(Makefile.config |
| 34 | include/Support/DataTypes.h |
| 35 | include/Support/ThreadSupport.h |
| 36 | include/Support/hash_map |
| 37 | include/Support/hash_set |
| 38 | include/Support/iterator) |
| 39 | |
| 40 | dnl Do special configuration of Makefiles |
John Criswell | 2d53308 | 2003-09-06 14:46:19 +0000 | [diff] [blame] | 41 | AC_CONFIG_MAKEFILE(Makefile) |
| 42 | AC_CONFIG_MAKEFILE(Makefile.common) |
Reid Spencer | 367754a | 2004-08-24 16:31:01 +0000 | [diff] [blame] | 43 | AC_CONFIG_MAKEFILE(examples/Makefile) |
John Criswell | 2d53308 | 2003-09-06 14:46:19 +0000 | [diff] [blame] | 44 | AC_CONFIG_MAKEFILE(lib/Makefile) |
John Criswell | 2d53308 | 2003-09-06 14:46:19 +0000 | [diff] [blame] | 45 | AC_CONFIG_MAKEFILE(runtime/Makefile) |
John Criswell | 2d53308 | 2003-09-06 14:46:19 +0000 | [diff] [blame] | 46 | AC_CONFIG_MAKEFILE(test/Makefile) |
| 47 | AC_CONFIG_MAKEFILE(test/Makefile.tests) |
John Criswell | f424d74 | 2003-10-07 21:13:47 +0000 | [diff] [blame] | 48 | AC_CONFIG_MAKEFILE(test/QMTest/llvm.py) |
| 49 | AC_CONFIG_MAKEFILE(test/QMTest/llvmdb.py) |
John Criswell | 2d53308 | 2003-09-06 14:46:19 +0000 | [diff] [blame] | 50 | AC_CONFIG_MAKEFILE(test/Programs/Makefile) |
| 51 | AC_CONFIG_MAKEFILE(test/Programs/Makefile.programs) |
John Criswell | 8a54a1e | 2004-06-22 21:35:10 +0000 | [diff] [blame] | 52 | AC_CONFIG_MAKEFILE(test/Programs/Makefile.tests) |
John Criswell | 2d53308 | 2003-09-06 14:46:19 +0000 | [diff] [blame] | 53 | AC_CONFIG_MAKEFILE(test/Programs/TEST.aa.Makefile) |
| 54 | AC_CONFIG_MAKEFILE(test/Programs/TEST.dsgraph.report) |
John Criswell | 2d53308 | 2003-09-06 14:46:19 +0000 | [diff] [blame] | 55 | AC_CONFIG_MAKEFILE(test/Programs/TEST.aa.report) |
| 56 | AC_CONFIG_MAKEFILE(test/Programs/TEST.example.Makefile) |
| 57 | AC_CONFIG_MAKEFILE(test/Programs/TEST.nightly.Makefile) |
| 58 | AC_CONFIG_MAKEFILE(test/Programs/TEST.buildrepo.Makefile) |
| 59 | AC_CONFIG_MAKEFILE(test/Programs/TEST.jit.Makefile) |
| 60 | AC_CONFIG_MAKEFILE(test/Programs/TEST.nightly.report) |
| 61 | AC_CONFIG_MAKEFILE(test/Programs/TEST.dsgraph.Makefile) |
| 62 | AC_CONFIG_MAKEFILE(test/Programs/TEST.jit.report) |
| 63 | AC_CONFIG_MAKEFILE(test/Programs/TEST.typesafe.Makefile) |
| 64 | AC_CONFIG_MAKEFILE(test/Programs/TEST.dsgraph.gnuplot) |
John Criswell | 878be7d | 2004-02-24 21:43:38 +0000 | [diff] [blame] | 65 | AC_CONFIG_MAKEFILE(test/Programs/TEST.vtl.Makefile) |
John Criswell | 2d53308 | 2003-09-06 14:46:19 +0000 | [diff] [blame] | 66 | AC_CONFIG_MAKEFILE(test/Programs/External/Makefile) |
| 67 | AC_CONFIG_MAKEFILE(test/Programs/External/SPEC/Makefile) |
John Criswell | 27bb35e | 2003-09-11 18:04:00 +0000 | [diff] [blame] | 68 | AC_CONFIG_MAKEFILE(test/Programs/External/SPEC/Makefile.spec) |
Alkis Evlogimenos | 271143f | 2004-02-26 04:14:10 +0000 | [diff] [blame] | 69 | AC_CONFIG_MAKEFILE(test/Programs/External/SPEC/Makefile.spec2000) |
John Criswell | b607cc8 | 2004-02-10 22:29:06 +0000 | [diff] [blame] | 70 | AC_CONFIG_MAKEFILE(test/Programs/External/SPEC/Makefile.spec95) |
John Criswell | 2d53308 | 2003-09-06 14:46:19 +0000 | [diff] [blame] | 71 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Makefile) |
| 72 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Makefile.multisrc) |
Misha Brukman | 960624b | 2003-11-12 22:16:23 +0000 | [diff] [blame] | 73 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/analyzer/test.in) |
Misha Brukman | 3e910fe | 2003-11-12 19:39:10 +0000 | [diff] [blame] | 74 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/distray/Makefile) |
Misha Brukman | 960624b | 2003-11-12 22:16:23 +0000 | [diff] [blame] | 75 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/distray/test.in) |
Misha Brukman | 3e910fe | 2003-11-12 19:39:10 +0000 | [diff] [blame] | 76 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/fourinarow/Makefile) |
Misha Brukman | 960624b | 2003-11-12 22:16:23 +0000 | [diff] [blame] | 77 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/fourinarow/test.in) |
Misha Brukman | 3e910fe | 2003-11-12 19:39:10 +0000 | [diff] [blame] | 78 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/mason/Makefile) |
Misha Brukman | 960624b | 2003-11-12 22:16:23 +0000 | [diff] [blame] | 79 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/mason/test.in) |
Misha Brukman | 3e910fe | 2003-11-12 19:39:10 +0000 | [diff] [blame] | 80 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/neural/Makefile) |
Misha Brukman | 960624b | 2003-11-12 22:16:23 +0000 | [diff] [blame] | 81 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/neural/test.in) |
Misha Brukman | 3e910fe | 2003-11-12 19:39:10 +0000 | [diff] [blame] | 82 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pcompress2/Makefile) |
Misha Brukman | 960624b | 2003-11-12 22:16:23 +0000 | [diff] [blame] | 83 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pcompress2/test.in) |
Misha Brukman | 3e910fe | 2003-11-12 19:39:10 +0000 | [diff] [blame] | 84 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pifft/Makefile) |
Misha Brukman | 960624b | 2003-11-12 22:16:23 +0000 | [diff] [blame] | 85 | AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pifft/test.in) |
John Criswell | 2d53308 | 2003-09-06 14:46:19 +0000 | [diff] [blame] | 86 | AC_CONFIG_MAKEFILE(test/Programs/SingleSource/Makefile) |
| 87 | AC_CONFIG_MAKEFILE(test/Programs/SingleSource/Makefile.singlesrc) |
Alkis Evlogimenos | 271143f | 2004-02-26 04:14:10 +0000 | [diff] [blame] | 88 | AC_CONFIG_MAKEFILE(test/Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile) |
John Criswell | 2d53308 | 2003-09-06 14:46:19 +0000 | [diff] [blame] | 89 | AC_CONFIG_MAKEFILE(tools/Makefile) |
Chris Lattner | 5c866e1 | 2003-10-06 02:09:25 +0000 | [diff] [blame] | 90 | AC_CONFIG_MAKEFILE(utils/Makefile) |
John Criswell | 2d53308 | 2003-09-06 14:46:19 +0000 | [diff] [blame] | 91 | AC_CONFIG_MAKEFILE(projects/Makefile) |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 92 | |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 93 | dnl Find the install program (needs to be done before canonical stuff) |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 94 | AC_PROG_INSTALL |
| 95 | |
| 96 | dnl Check which host for which we're compiling. This will tell us which LLVM |
| 97 | dnl compiler will be used for compiling SSA into object code. |
| 98 | AC_CANONICAL_TARGET |
| 99 | |
Brian Gaeke | 3e66e8b | 2003-11-17 00:30:48 +0000 | [diff] [blame] | 100 | dnl Set the "OS" Makefile variable based on the system we are building on. |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 101 | dnl We will use the build machine information to set some variables. |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 102 | case $build in |
Brian Gaeke | 3e66e8b | 2003-11-17 00:30:48 +0000 | [diff] [blame] | 103 | *-*-linux*) |
| 104 | AC_SUBST(OS,[Linux]) |
Reid Spencer | 59ee436 | 2004-08-29 19:18:05 +0000 | [diff] [blame] | 105 | platform_type="Linux" |
| 106 | if test -d /home/vadve/lattner/local/x86/llvm-gcc |
| 107 | then |
| 108 | AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/x86/llvm-gcc/]) |
| 109 | fi |
| 110 | ;; |
Brian Gaeke | 3e66e8b | 2003-11-17 00:30:48 +0000 | [diff] [blame] | 111 | *-*-solaris*) |
| 112 | AC_SUBST(OS,[SunOS]) |
Reid Spencer | 59ee436 | 2004-08-29 19:18:05 +0000 | [diff] [blame] | 113 | platform_type="SunOS" |
| 114 | if test -d /home/vadve/lattner/local/sparc/llvm-gcc |
| 115 | then |
| 116 | AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/sparc/llvm-gcc/]) |
| 117 | fi |
| 118 | ;; |
Chris Lattner | 44afcb7 | 2004-06-02 23:32:17 +0000 | [diff] [blame] | 119 | *-*-cygwin*) |
| 120 | AC_SUBST(OS,[Cygwin]) |
Reid Spencer | 59ee436 | 2004-08-29 19:18:05 +0000 | [diff] [blame] | 121 | platform_type="Cygwin" |
| 122 | ;; |
Brian Gaeke | 3e66e8b | 2003-11-17 00:30:48 +0000 | [diff] [blame] | 123 | *-*-darwin*) |
| 124 | AC_SUBST(OS,[Darwin]) |
Reid Spencer | 59ee436 | 2004-08-29 19:18:05 +0000 | [diff] [blame] | 125 | platform_type="Darwin" |
| 126 | ;; |
Misha Brukman | 7b42a75 | 2004-06-22 15:32:08 +0000 | [diff] [blame] | 127 | *-*-aix*) |
| 128 | AC_SUBST(OS,[AIX]) |
Reid Spencer | 59ee436 | 2004-08-29 19:18:05 +0000 | [diff] [blame] | 129 | platform_type="AIX" |
| 130 | ;; |
Reid Spencer | 886e951 | 2004-08-31 01:34:10 +0000 | [diff] [blame^] | 131 | *-*-interix*) |
| 132 | AC_SUBST(OS,[SunOS]) |
| 133 | platform_type="SunOS" |
| 134 | ;; |
Reid Spencer | 59ee436 | 2004-08-29 19:18:05 +0000 | [diff] [blame] | 135 | *-*-win32*) |
| 136 | AC_SUBST(OS,[Win32]) |
| 137 | platform_type="Win32" |
| 138 | ;; |
| 139 | *) |
| 140 | AC_SUBST(OS,[Unknown]) |
| 141 | platform_type="Unknown" |
| 142 | ;; |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 143 | esac |
| 144 | |
Reid Spencer | 886e951 | 2004-08-31 01:34:10 +0000 | [diff] [blame^] | 145 | dnl Make sure we aren't attempting to configure for an unknown system |
| 146 | if test $platform_type -eq "Unknown" ; then |
| 147 | AC_MSG_ERROR([Platform is unknown, configure can't continue]) |
| 148 | fi |
| 149 | |
Reid Spencer | 59ee436 | 2004-08-29 19:18:05 +0000 | [diff] [blame] | 150 | dnl Make a link from lib/System/platform to lib/System/$platform_type |
| 151 | dnl This helps the #inclusion of the system specific include files |
| 152 | dnl for the operating system abstraction library |
| 153 | AC_CONFIG_LINKS(lib/System/platform:lib/System/$platform_type) |
| 154 | |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 155 | dnl If we are targetting a Sparc machine running Solaris, pretend that it is |
| 156 | dnl V9, since that is all that we support at the moment, and autoconf will only |
| 157 | dnl tell us we're a sparc. |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 158 | case $target in |
Brian Gaeke | 3e66e8b | 2003-11-17 00:30:48 +0000 | [diff] [blame] | 159 | sparc*-*-solaris*) AC_SUBST(target,[[sparcv9-sun-solaris2.8]]) |
| 160 | ;; |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 161 | esac |
| 162 | |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 163 | dnl Determine what our target architecture is and configure accordingly. |
| 164 | dnl This will allow Makefiles to make a distinction between the hardware and |
| 165 | dnl the OS. |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 166 | case $target in |
Brian Gaeke | 3e66e8b | 2003-11-17 00:30:48 +0000 | [diff] [blame] | 167 | i*86-*) AC_SUBST(ARCH,[x86]) |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 168 | ;; |
Brian Gaeke | 3e66e8b | 2003-11-17 00:30:48 +0000 | [diff] [blame] | 169 | sparc*-*) AC_SUBST(ARCH,[Sparc]) |
| 170 | ;; |
| 171 | powerpc*-*) AC_SUBST(ARCH,[PowerPC]) |
| 172 | ;; |
| 173 | *) AC_SUBST(ARCH,[Unknown]) |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 174 | ;; |
| 175 | esac |
| 176 | |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 177 | dnl Check for compilation tools |
| 178 | AC_PROG_CXX |
| 179 | AC_PROG_CC(gcc) |
| 180 | AC_PROG_CPP |
| 181 | |
| 182 | dnl Ensure that compilation tools are GCC; we use GCC specific extensions |
| 183 | if test "$GCC" != "yes" |
| 184 | then |
| 185 | AC_MSG_ERROR([gcc required but not found]) |
| 186 | fi |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 187 | if test "$GXX" != "yes" |
| 188 | then |
| 189 | AC_MSG_ERROR([g++ required but not found]) |
| 190 | fi |
| 191 | |
John Criswell | de00db2 | 2003-08-25 16:49:54 +0000 | [diff] [blame] | 192 | dnl Verify that GCC is version 3.0 or higher |
| 193 | gccmajor=`$CC --version | head -n 1 | awk '{print $NF;}' | cut -d. -f1` |
| 194 | if test "$gccmajor" -lt "3" |
| 195 | then |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 196 | AC_MSG_ERROR([gcc 3.x required, but you have a lower version]) |
John Criswell | de00db2 | 2003-08-25 16:49:54 +0000 | [diff] [blame] | 197 | fi |
| 198 | |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 199 | dnl Check for GNU Make. We use its extensions too, so don't build without it |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 200 | CHECK_GNU_MAKE |
| 201 | if test -z "$_cv_gnu_make_command" |
| 202 | then |
| 203 | AC_MSG_ERROR([GNU Make required but not found]) |
| 204 | fi |
| 205 | |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 206 | dnl Checks for other tools |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 207 | AC_PROG_FLEX |
| 208 | AC_PROG_BISON |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 209 | AC_PROG_LIBTOOL |
| 210 | |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 211 | dnl Checks for tools we can get away with not having: |
| 212 | AC_PATH_PROG(DOT,[dot],[true dot]) |
| 213 | AC_PATH_PROG(ETAGS,[etags],[true etags]) |
Brian Gaeke | 027b746 | 2004-01-22 21:55:15 +0000 | [diff] [blame] | 214 | dnl Check if we know how to tell etags we are using C++: |
| 215 | etags_version=`$ETAGS --version 2>&1` |
| 216 | case "$etags_version" in |
| 217 | *[Ee]xuberant*) ETAGSFLAGS="--language-force=c++" ;; |
| 218 | *GNU\ Emacs*) ETAGSFLAGS="-l c++" ;; |
| 219 | *) ETAGSFLAGS="" ;; |
| 220 | esac |
| 221 | AC_SUBST(ETAGSFLAGS,$ETAGSFLAGS) |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 222 | AC_PATH_PROG(PYTHON,[python],[true python]) |
| 223 | if test "$PYTHON" = "false" |
John Criswell | 39827c8 | 2003-09-23 15:28:52 +0000 | [diff] [blame] | 224 | then |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 225 | AC_MSG_WARN([Python is required for the test suite, but it was not found]) |
John Criswell | 39827c8 | 2003-09-23 15:28:52 +0000 | [diff] [blame] | 226 | fi |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 227 | AC_PATH_PROG(QMTEST,[qmtest],[true qmtest]) |
| 228 | if test "$QMTEST" = "false" |
John Criswell | 39827c8 | 2003-09-23 15:28:52 +0000 | [diff] [blame] | 229 | then |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 230 | AC_MSG_WARN([QMTest is required for the test suite, but it was not found]) |
John Criswell | 39827c8 | 2003-09-23 15:28:52 +0000 | [diff] [blame] | 231 | fi |
John Criswell | de00db2 | 2003-08-25 16:49:54 +0000 | [diff] [blame] | 232 | |
| 233 | dnl Verify that the version of python available is high enough for qmtest |
| 234 | pyversion=`$PYTHON -V 2>&1 | cut -d\ -f2` |
| 235 | pymajor=`echo $pyversion | cut -d. -f1` |
| 236 | pyminor=`echo $pyversion | cut -d. -f2` |
| 237 | |
| 238 | if test "$pymajor" -ge "2" |
| 239 | then |
| 240 | if test "$pymajor" -eq "2" |
| 241 | then |
| 242 | if test "$pyminor" -lt "2" |
| 243 | then |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 244 | AC_MSG_WARN([QMTest requires Python 2.2 or later]) |
John Criswell | de00db2 | 2003-08-25 16:49:54 +0000 | [diff] [blame] | 245 | fi |
| 246 | fi |
| 247 | else |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 248 | AC_MSG_WARN([QMTest requires Python 2.2 or later]) |
John Criswell | de00db2 | 2003-08-25 16:49:54 +0000 | [diff] [blame] | 249 | fi |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 250 | |
| 251 | dnl Verify that the source directory is valid |
| 252 | AC_CONFIG_SRCDIR(["Makefile.config.in"]) |
| 253 | |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 254 | dnl Checks for libraries: |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 255 | dnl libelf is for sparc only; we can ignore it if we don't have it |
| 256 | AC_CHECK_LIB(elf, elf_begin) |
| 257 | |
Brian Gaeke | 4c42378 | 2003-10-07 05:03:36 +0000 | [diff] [blame] | 258 | dnl dlopen() is required for plugin support. |
Brian Gaeke | a25d7ca | 2003-10-08 21:44:07 +0000 | [diff] [blame] | 259 | AC_SEARCH_LIBS(dlopen,dl,AC_DEFINE([HAVE_DLOPEN],[1],[Define if dlopen() is available on this platform.]),AC_MSG_WARN([dlopen() not found - disabling plugin support])) |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 260 | |
| 261 | dnl mallinfo is optional; the code can compile (minus features) without it |
Brian Gaeke | a25d7ca | 2003-10-08 21:44:07 +0000 | [diff] [blame] | 262 | AC_SEARCH_LIBS(mallinfo,malloc,AC_DEFINE([HAVE_MALLINFO],[1],[Define if mallinfo() is available on this platform.])) |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 263 | |
Brian Gaeke | 5f268f7 | 2003-12-05 19:29:01 +0000 | [diff] [blame] | 264 | dnl pthread locking functions are optional - but llvm will not be thread-safe |
| 265 | dnl without locks. |
Brian Gaeke | 2e3bdba | 2004-02-23 21:30:36 +0000 | [diff] [blame] | 266 | AC_SEARCH_LIBS(pthread_mutex_lock,pthread,HAVE_PTHREAD_MUTEX_LOCK=1,HAVE_PTHREAD_MUTEX_LOCK=0) |
| 267 | AC_SUBST(HAVE_PTHREAD_MUTEX_LOCK) |
Brian Gaeke | 5f268f7 | 2003-12-05 19:29:01 +0000 | [diff] [blame] | 268 | |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 269 | dnl Checks for header files. |
| 270 | dnl We don't check for ancient stuff or things that are guaranteed to be there |
| 271 | dnl by the C++ standard. We always use the <cfoo> versions of <foo.h> C headers. |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 272 | AC_HEADER_STDC |
| 273 | AC_HEADER_SYS_WAIT |
| 274 | |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 275 | dnl Checks for POSIX and other various system-specific header files |
John Criswell | b2815e0 | 2004-05-27 20:40:39 +0000 | [diff] [blame] | 276 | AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h malloc.h sys/mman.h sys/resource.h dlfcn.h link.h execinfo.h windows.h) |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 277 | |
Brian Gaeke | 1133eaf | 2004-02-23 22:07:01 +0000 | [diff] [blame] | 278 | dnl Check for things that need to be included in public headers, and so |
| 279 | dnl for which we may not have access to a HAVE_* preprocessor #define. |
| 280 | dnl (primarily used in DataTypes.h) |
| 281 | AC_CHECK_HEADER([sys/types.h], |
| 282 | [INCLUDE_SYS_TYPES_H='#include <sys/types.h>'], |
| 283 | [INCLUDE_SYS_TYPES_H='']) |
| 284 | AC_SUBST(INCLUDE_SYS_TYPES_H) |
| 285 | AC_CHECK_HEADER([inttypes.h], |
| 286 | [INCLUDE_INTTYPES_H='#include <inttypes.h>'], |
| 287 | [INCLUDE_INTTYPES_H='']) |
| 288 | AC_SUBST(INCLUDE_INTTYPES_H) |
John Criswell | 7ed43ad | 2004-07-19 16:12:29 +0000 | [diff] [blame] | 289 | AC_CHECK_HEADER([stdint.h], |
| 290 | [INCLUDE_STDINT_H='#include <stdint.h>'], |
| 291 | [INCLUDE_STDINT_H='']) |
| 292 | AC_SUBST(INCLUDE_STDINT_H) |
| 293 | |
Brian Gaeke | 1133eaf | 2004-02-23 22:07:01 +0000 | [diff] [blame] | 294 | |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 295 | dnl Check for types |
| 296 | AC_TYPE_PID_T |
| 297 | AC_TYPE_SIZE_T |
| 298 | AC_CHECK_TYPES([int64_t],,AC_MSG_ERROR([Type int64_t required but not found])) |
| 299 | AC_CHECK_TYPES([uint64_t],,AC_MSG_ERROR([Type uint64_t required but not found])) |
| 300 | AC_HEADER_TIME |
| 301 | AC_STRUCT_TM |
| 302 | |
John Criswell | a0137d3 | 2003-10-13 16:22:01 +0000 | [diff] [blame] | 303 | dnl Check for various C features |
| 304 | AC_C_PRINTF_A |
| 305 | |
John Criswell | 0021c31 | 2004-02-13 21:57:29 +0000 | [diff] [blame] | 306 | dnl Check for the endianness of the target |
| 307 | AC_C_BIGENDIAN(AC_SUBST([ENDIAN],[big]),AC_SUBST([ENDIAN],[little])) |
| 308 | |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 309 | dnl Check for C++ extensions |
Brian Gaeke | 278a4ac | 2003-11-10 03:06:09 +0000 | [diff] [blame] | 310 | AC_CXX_HAVE_HASH_MAP |
| 311 | AC_CXX_HAVE_HASH_SET |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 312 | AC_CXX_HAVE_STD_ITERATOR |
| 313 | AC_CXX_HAVE_BI_ITERATOR |
| 314 | AC_CXX_HAVE_FWD_ITERATOR |
| 315 | |
Brian Gaeke | 8828eb5 | 2004-06-22 23:43:04 +0000 | [diff] [blame] | 316 | AC_FUNC_ISNAN |
Brian Gaeke | 3869b27 | 2004-07-21 03:14:51 +0000 | [diff] [blame] | 317 | AC_FUNC_ISINF |
Brian Gaeke | 8828eb5 | 2004-06-22 23:43:04 +0000 | [diff] [blame] | 318 | |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 319 | dnl Checks for library functions. |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 320 | AC_FUNC_ALLOCA |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 321 | AC_FUNC_MMAP |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 322 | if test "$ac_cv_func_mmap_fixed_mapped" = "no" |
| 323 | then |
John Criswell | f3ecf3a | 2004-05-27 00:57:50 +0000 | [diff] [blame] | 324 | AC_MSG_WARN([mmap() required but not found]) |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 325 | fi |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 326 | AC_FUNC_MMAP_FILE |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 327 | if test "$ac_cv_func_mmap_file" = "no" |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 328 | then |
John Criswell | f3ecf3a | 2004-05-27 00:57:50 +0000 | [diff] [blame] | 329 | AC_MSG_WARN([mmap() of files required but not found]) |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 330 | fi |
| 331 | AC_HEADER_MMAP_ANONYMOUS |
| 332 | AC_TYPE_SIGNAL |
Brian Gaeke | 8828eb5 | 2004-06-22 23:43:04 +0000 | [diff] [blame] | 333 | AC_CHECK_FUNCS(getcwd gettimeofday strdup strtoq strtoll backtrace isatty mkstemp getrusage) |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 334 | AC_CHECK_FUNC(mprotect,,AC_MSG_ERROR([Function mprotect() required but not found])) |
| 335 | |
John Criswell | cb7a1eb | 2003-11-17 19:46:02 +0000 | [diff] [blame] | 336 | dnl Determine if the linker supports the -R option. |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 337 | AC_LINK_USE_R |
John Criswell | cb7a1eb | 2003-11-17 19:46:02 +0000 | [diff] [blame] | 338 | |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 339 | dnl --enable/--with command-line options: |
| 340 | dnl Check whether they want to do an optimized build: |
John Criswell | 79a8f09 | 2003-07-22 20:59:52 +0000 | [diff] [blame] | 341 | AC_ARG_ENABLE(optimized,AC_HELP_STRING([--enable-optimized],[Compile with optimizations enabled (default is NO)]),,enableval=no) |
| 342 | if test ${enableval} = "no" |
| 343 | then |
| 344 | AC_SUBST(ENABLE_OPTIMIZED,[[]]) |
| 345 | else |
| 346 | AC_SUBST(ENABLE_OPTIMIZED,[[ENABLE_OPTIMIZED=1]]) |
| 347 | fi |
| 348 | |
Brian Gaeke | dbaf981 | 2004-04-16 17:13:33 +0000 | [diff] [blame] | 349 | AC_DEFUN(EXTERNAL_BENCHMARK, |
| 350 | [m4_define([allcapsname],translit($1,a-z,A-Z)) |
| 351 | AC_ARG_ENABLE($1, |
| 352 | AC_HELP_STRING([--enable-$1=ARG], |
| 353 | [Use $1 as a benchmark (srcs in DIR)]), |
| 354 | checkresult=$enableval, |
| 355 | checkresult=auto) |
| 356 | AC_MSG_CHECKING([for $1 benchmark sources]) |
| 357 | case "$checkresult" in |
Chris Lattner | ac84728 | 2004-04-14 16:32:34 +0000 | [diff] [blame] | 358 | auto|yes) |
Brian Gaeke | dbaf981 | 2004-04-16 17:13:33 +0000 | [diff] [blame] | 359 | defaultdir=$2 |
| 360 | if test -d "$defaultdir" |
John Criswell | 0538d42 | 2004-02-20 22:30:22 +0000 | [diff] [blame] | 361 | then |
Brian Gaeke | dbaf981 | 2004-04-16 17:13:33 +0000 | [diff] [blame] | 362 | AC_SUBST(allcapsname()[_ROOT],[$defaultdir]) |
| 363 | AC_SUBST([USE_]allcapsname(),[USE_]allcapsname()=1) |
| 364 | checkresult="yes, found in $defaultdir" |
Brian Gaeke | bc7b85f | 2004-04-13 19:02:51 +0000 | [diff] [blame] | 365 | else |
Brian Gaeke | dbaf981 | 2004-04-16 17:13:33 +0000 | [diff] [blame] | 366 | checkresult=no |
Brian Gaeke | bc7b85f | 2004-04-13 19:02:51 +0000 | [diff] [blame] | 367 | fi |
| 368 | ;; |
Chris Lattner | ac84728 | 2004-04-14 16:32:34 +0000 | [diff] [blame] | 369 | no) |
Brian Gaeke | dbaf981 | 2004-04-16 17:13:33 +0000 | [diff] [blame] | 370 | AC_SUBST(allcapsname()[_ROOT],[]) |
| 371 | AC_SUBST([USE_]allcapsname(),[]) |
| 372 | checkresult=no |
Brian Gaeke | bc7b85f | 2004-04-13 19:02:51 +0000 | [diff] [blame] | 373 | ;; |
Brian Gaeke | dbaf981 | 2004-04-16 17:13:33 +0000 | [diff] [blame] | 374 | *) if test -d "$checkresult" |
Brian Gaeke | bc7b85f | 2004-04-13 19:02:51 +0000 | [diff] [blame] | 375 | then |
Brian Gaeke | dbaf981 | 2004-04-16 17:13:33 +0000 | [diff] [blame] | 376 | AC_SUBST(allcapsname()[_ROOT],"$checkresult") |
| 377 | AC_SUBST([USE_]allcapsname(),[USE_]allcapsname()=1) |
| 378 | checkresult="yes, in $checkresult" |
Brian Gaeke | bc7b85f | 2004-04-13 19:02:51 +0000 | [diff] [blame] | 379 | else |
Brian Gaeke | dbaf981 | 2004-04-16 17:13:33 +0000 | [diff] [blame] | 380 | AC_SUBST(allcapsname()[_ROOT],[]) |
| 381 | AC_SUBST([USE_]allcapsname(),[]) |
| 382 | checkresult="no, not found in $checkresult" |
Brian Gaeke | bc7b85f | 2004-04-13 19:02:51 +0000 | [diff] [blame] | 383 | fi |
| 384 | ;; |
| 385 | esac |
Brian Gaeke | dbaf981 | 2004-04-16 17:13:33 +0000 | [diff] [blame] | 386 | AC_MSG_RESULT($checkresult) |
| 387 | m4_undefine([allcapsname]) |
| 388 | ]) |
| 389 | |
| 390 | EXTERNAL_BENCHMARK(spec95,/home/vadve/shared/benchmarks/spec95/benchspec) |
| 391 | EXTERNAL_BENCHMARK(spec2000,/home/vadve/shared/benchmarks/speccpu2000/benchspec) |
| 392 | EXTERNAL_BENCHMARK(povray,/home/vadve/shared/benchmarks/povray31) |
John Criswell | 0538d42 | 2004-02-20 22:30:22 +0000 | [diff] [blame] | 393 | |
John Criswell | 79a8f09 | 2003-07-22 20:59:52 +0000 | [diff] [blame] | 394 | dnl Precompiled Bytecode Option |
| 395 | AC_ARG_ENABLE(precompiled_bytecode,AC_HELP_STRING([--enable-precompiled_bytecode],[Use pre-compiled bytecode (default is NO)]),,enableval=no) |
| 396 | if test ${enableval} = "no" |
| 397 | then |
| 398 | AC_SUBST(UPB,[[]]) |
| 399 | else |
| 400 | AC_SUBST(UPB,[[USE_PRECOMPILED_BYTECODE=1]]) |
| 401 | fi |
| 402 | |
John Criswell | 79a8f09 | 2003-07-22 20:59:52 +0000 | [diff] [blame] | 403 | dnl LLC Diff Option |
| 404 | AC_ARG_ENABLE(llc_diffs,AC_HELP_STRING([--enable-llc_diffs],[Enable LLC Diffs when testing (default is YES)]),,enableval=yes) |
| 405 | if test ${enableval} = "no" |
| 406 | then |
| 407 | AC_SUBST(DISABLE_LLC_DIFFS,[DISABLE_LLC_DIFFS:=1]) |
| 408 | else |
| 409 | AC_SUBST(DISABLE_LLC_DIFFS,[[]]) |
| 410 | fi |
| 411 | |
| 412 | dnl JIT Option |
John Criswell | c78022e | 2003-07-29 19:11:58 +0000 | [diff] [blame] | 413 | AC_ARG_ENABLE(jit,AC_HELP_STRING([--enable-jit],[Enable Just In Time Compiling (default is YES)]),,enableval=default) |
John Criswell | 79a8f09 | 2003-07-22 20:59:52 +0000 | [diff] [blame] | 414 | if test ${enableval} = "no" |
| 415 | then |
| 416 | AC_SUBST(JIT,[[]]) |
| 417 | else |
John Criswell | c78022e | 2003-07-29 19:11:58 +0000 | [diff] [blame] | 418 | case $target in |
| 419 | *i*86*) |
| 420 | AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]) |
| 421 | ;; |
| 422 | *sparc*) |
| 423 | AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]) |
| 424 | ;; |
| 425 | *) |
| 426 | AC_SUBST(JIT,[[]]) |
| 427 | ;; |
| 428 | esac |
John Criswell | 79a8f09 | 2003-07-22 20:59:52 +0000 | [diff] [blame] | 429 | fi |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 430 | |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 431 | dnl Find the LLVM GCC-based C/C++ front end |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 432 | AC_ARG_WITH(llvmgccdir,AC_HELP_STRING([--with-llvmgccdir],[Location of LLVM GCC front-end]),AC_SUBST(LLVMGCCDIR,[$withval])) |
Brian Gaeke | 908647f | 2003-11-16 18:37:46 +0000 | [diff] [blame] | 433 | AC_MSG_CHECKING([for llvm-gcc]) |
| 434 | LLVM_GCC_CHECK=no |
| 435 | if test -d "$LLVMGCCDIR" |
| 436 | then |
| 437 | if test -x "$LLVMGCCDIR/bin/gcc" |
| 438 | then |
| 439 | LLVM_GCC_CHECK="$LLVMGCCDIR/bin/gcc" |
| 440 | fi |
| 441 | fi |
| 442 | llvmgccwarn=no |
| 443 | AC_MSG_RESULT($LLVM_GCC_CHECK) |
| 444 | if test "$LLVM_GCC_CHECK" = "no" |
| 445 | then |
| 446 | llvmgccwarn=yes |
| 447 | fi |
Brian Gaeke | 908647f | 2003-11-16 18:37:46 +0000 | [diff] [blame] | 448 | AC_MSG_CHECKING([whether llvm-gcc is sane]) |
| 449 | LLVM_GCC_SANE=no |
| 450 | if test -x "$LLVM_GCC_CHECK" |
| 451 | then |
| 452 | cp /dev/null conftest.c |
| 453 | "$LLVM_GCC_CHECK" -S -o - conftest.c | grep implementation > /dev/null 2>&1 |
| 454 | if test $? -eq 0 |
| 455 | then |
| 456 | LLVM_GCC_SANE=yes |
| 457 | fi |
| 458 | rm conftest.c |
Brian Gaeke | d05e39d | 2004-01-16 21:31:22 +0000 | [diff] [blame] | 459 | llvmcc1path=`"$LLVM_GCC_CHECK" --print-prog-name=cc1` |
| 460 | AC_SUBST(LLVMCC1,$llvmcc1path) |
| 461 | llvmcc1pluspath=`"$LLVM_GCC_CHECK" --print-prog-name=cc1plus` |
| 462 | AC_SUBST(LLVMCC1PLUS,$llvmcc1pluspath) |
Brian Gaeke | 908647f | 2003-11-16 18:37:46 +0000 | [diff] [blame] | 463 | fi |
| 464 | AC_MSG_RESULT($LLVM_GCC_SANE) |
| 465 | if test "$LLVM_GCC_SANE" = "no" |
| 466 | then |
| 467 | llvmgccwarn=yes |
| 468 | fi |
| 469 | |
John Criswell | c78022e | 2003-07-29 19:11:58 +0000 | [diff] [blame] | 470 | dnl Location of the bytecode repository |
John Criswell | 4ea390d | 2003-07-22 19:13:20 +0000 | [diff] [blame] | 471 | AC_ARG_WITH(bcrepos,AC_HELP_STRING([--with-bcrepos],[Location of Bytecode Repository]),AC_SUBST(BCR,[$withval]),AC_SUBST(BCR,[/home/vadve/lattner/LLVMPrograms])) |
John Criswell | c78022e | 2003-07-29 19:11:58 +0000 | [diff] [blame] | 472 | |
| 473 | dnl Location of PAPI |
Chris Lattner | 1b9ddd5 | 2003-08-14 18:59:53 +0000 | [diff] [blame] | 474 | AC_ARG_WITH(papi,AC_HELP_STRING([--with-papi],[Location of PAPI]),AC_SUBST(PAPIDIR,[$withval]),AC_SUBST(PAPIDIR,[/home/vadve/shared/Sparc/papi-2.3.4.1])) |
John Criswell | c78022e | 2003-07-29 19:11:58 +0000 | [diff] [blame] | 475 | |
Brian Gaeke | cea9a60 | 2004-01-21 19:38:56 +0000 | [diff] [blame] | 476 | dnl Get libtool's idea of what the shared library suffix is. |
| 477 | dnl (This is a hack; it relies on undocumented behavior.) |
| 478 | AC_MSG_CHECKING([for shared library suffix]) |
| 479 | eval "SHLIBEXT=$shrext" |
| 480 | AC_MSG_RESULT($SHLIBEXT) |
| 481 | dnl Propagate it to the Makefiles and config.h (for gccld & bugpoint). |
| 482 | AC_SUBST(SHLIBEXT,$SHLIBEXT) |
| 483 | AC_DEFINE_UNQUOTED(SHLIBEXT,"$SHLIBEXT", |
| 484 | [Extension that shared libraries have, e.g., ".so".]) |
| 485 | |
Reid Spencer | a91929d | 2004-08-20 09:03:12 +0000 | [diff] [blame] | 486 | # Translate the various configuration directories and other basic |
| 487 | # information into substitutions that will end up in config.h.in so |
| 488 | # that these configured values can be hard-wired into a program. |
| 489 | eval LLVM_PREFIX="${prefix}"; |
| 490 | eval LLVM_BINDIR="${prefix}/bin"; |
| 491 | eval LLVM_LIBDIR="${prefix}/lib"; |
| 492 | eval LLVM_DATADIR="${prefix}/data"; |
| 493 | eval LLVM_DOCSDIR="${prefix}/docs"; |
| 494 | eval LLVM_ETCDIR="${prefix}/etc"; |
| 495 | eval LLVM_INCLUDEDIR="${prefix}/include"; |
| 496 | eval LLVM_INFODIR="${prefix}/info"; |
| 497 | eval LLVM_MANDIR="${prefix}/man"; |
| 498 | LLVM_CONFIGTIME=`date` |
| 499 | AC_SUBST(LLVM_PREFIX) |
| 500 | AC_SUBST(LLVM_BINDIR) |
| 501 | AC_SUBST(LLVM_LIBDIR) |
| 502 | AC_SUBST(LLVM_DATADIR) |
| 503 | AC_SUBST(LLVM_DOCSDIR) |
| 504 | AC_SUBST(LLVM_ETCDIR) |
| 505 | AC_SUBST(LLVM_INCLUDEDIR) |
| 506 | AC_SUBST(LLVM_INFODIR) |
| 507 | AC_SUBST(LLVM_MANDIR) |
| 508 | AC_SUBST(LLVM_CONFIGTIME) |
| 509 | AC_DEFINE_UNQUOTED(LLVM_PREFIX,"$LLVM_PREFIX", [Installation prefix directory]) |
| 510 | AC_DEFINE_UNQUOTED(LLVM_BINDIR, "$LLVM_BINDIR", [Installation directory for binary executables]) |
| 511 | AC_DEFINE_UNQUOTED(LLVM_LIBDIR, "$LLVM_LIBDIR", [Installation directory for libraries]) |
| 512 | AC_DEFINE_UNQUOTED(LLVM_DATADIR, "$LLVM_DATADIR", [Installation directory for data files]) |
| 513 | AC_DEFINE_UNQUOTED(LLVM_DATADIR, "$LLVM_DOCSDIR", [Installation directory for documentation]) |
Reid Spencer | 19d96ee | 2004-08-20 09:08:57 +0000 | [diff] [blame] | 514 | AC_DEFINE_UNQUOTED(LLVM_ETCDIR, "$LLVM_ETCDIR", [Installation directory for config files]) |
Reid Spencer | a91929d | 2004-08-20 09:03:12 +0000 | [diff] [blame] | 515 | AC_DEFINE_UNQUOTED(LLVM_INCLUDEDIR, "$LLVM_INCLUDEDIR", [Installation directory for include files]) |
| 516 | AC_DEFINE_UNQUOTED(LLVM_INFODIR, "$LLVM_INFODIR", [Installation directory for .info files]) |
| 517 | AC_DEFINE_UNQUOTED(LLVM_MANDIR, "$LLVM_MANDIR", [Installation directory for man pages]) |
| 518 | AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME", [Time at which LLVM was configured]) |
| 519 | |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 520 | dnl Create the output files |
John Criswell | dc76e32 | 2004-07-23 15:40:57 +0000 | [diff] [blame] | 521 | AC_OUTPUT() |
Brian Gaeke | 908647f | 2003-11-16 18:37:46 +0000 | [diff] [blame] | 522 | |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 523 | dnl Warn loudly if llvm-gcc was not obviously working |
Brian Gaeke | 908647f | 2003-11-16 18:37:46 +0000 | [diff] [blame] | 524 | if test $llvmgccwarn = yes |
| 525 | then |
| 526 | AC_MSG_WARN([***** llvm C/C++ front end was not found, or does not]) |
| 527 | AC_MSG_WARN([***** appear to be working.]) |
| 528 | AC_MSG_WARN([***** ]) |
| 529 | AC_MSG_WARN([***** Please check configure's --with-llvmgccdir option.]) |
| 530 | AC_MSG_WARN([***** Runtime libraries (in llvm/runtime) will not be built,]) |
| 531 | AC_MSG_WARN([***** but you should be able to build the llvm tools.]) |
| 532 | fi |
Brian Gaeke | cea9a60 | 2004-01-21 19:38:56 +0000 | [diff] [blame] | 533 | |