John Criswell | 607b1ea | 2003-10-16 01:44:20 +0000 | [diff] [blame] | 1 | dnl ************************************************************************** |
| 2 | dnl * Initialize |
| 3 | dnl ************************************************************************** |
| 4 | AC_INIT([[[SAMPLE]]],[[[x.xx]]],[bugs@yourdomain]) |
| 5 | |
Reid Spencer | 30ea478 | 2006-04-18 06:27:47 +0000 | [diff] [blame] | 6 | dnl Identify where LLVM source tree is |
Peter Collingbourne | 1fbf5a4 | 2010-12-12 21:41:56 +0000 | [diff] [blame] | 7 | LLVM_SRC_ROOT="../.." |
| 8 | LLVM_OBJ_ROOT="../.." |
| 9 | |
| 10 | dnl Find absolute paths to LLVM source and object trees |
| 11 | LLVM_ABS_SRC_ROOT="`cd $srcdir ; cd $LLVM_SRC_ROOT ; pwd`" |
| 12 | LLVM_ABS_OBJ_ROOT="`cd $LLVM_OBJ_ROOT ; pwd`" |
John Criswell | 607b1ea | 2003-10-16 01:44:20 +0000 | [diff] [blame] | 13 | |
Reid Spencer | 1a87ddc | 2005-02-24 18:50:53 +0000 | [diff] [blame] | 14 | dnl Tell autoconf that this is an LLVM project being configured |
| 15 | dnl This provides the --with-llvmsrc and --with-llvmobj options |
Peter Collingbourne | 1fbf5a4 | 2010-12-12 21:41:56 +0000 | [diff] [blame] | 16 | LLVM_CONFIG_PROJECT($LLVM_ABS_SRC_ROOT,$LLVM_ABS_OBJ_ROOT) |
Reid Spencer | 1a87ddc | 2005-02-24 18:50:53 +0000 | [diff] [blame] | 17 | |
Chris Lattner | 7a2bdde | 2011-04-15 05:18:47 +0000 | [diff] [blame] | 18 | dnl Tell autoconf that the auxiliary files are actually located in |
Eric Christopher | 1f10929 | 2010-01-25 04:10:28 +0000 | [diff] [blame] | 19 | dnl the LLVM autoconf directory, not here. |
| 20 | AC_CONFIG_AUX_DIR($LLVM_SRC/autoconf) |
| 21 | |
Reid Spencer | 1a87ddc | 2005-02-24 18:50:53 +0000 | [diff] [blame] | 22 | dnl Verify that the source directory is valid |
| 23 | AC_CONFIG_SRCDIR(["Makefile.common.in"]) |
| 24 | |
| 25 | dnl Configure a common Makefile |
Reid Spencer | 38fd88a | 2005-01-05 06:41:10 +0000 | [diff] [blame] | 26 | AC_CONFIG_FILES(Makefile.common) |
John Criswell | 607b1ea | 2003-10-16 01:44:20 +0000 | [diff] [blame] | 27 | |
Reid Spencer | 1a87ddc | 2005-02-24 18:50:53 +0000 | [diff] [blame] | 28 | dnl Configure project makefiles |
| 29 | dnl List every Makefile that exists within your source tree |
John Criswell | 607b1ea | 2003-10-16 01:44:20 +0000 | [diff] [blame] | 30 | AC_CONFIG_MAKEFILE(Makefile) |
| 31 | AC_CONFIG_MAKEFILE(lib/Makefile) |
| 32 | AC_CONFIG_MAKEFILE(lib/sample/Makefile) |
| 33 | AC_CONFIG_MAKEFILE(tools/Makefile) |
| 34 | AC_CONFIG_MAKEFILE(tools/sample/Makefile) |
| 35 | |
| 36 | dnl ************************************************************************** |
| 37 | dnl * Determine which system we are building on |
| 38 | dnl ************************************************************************** |
| 39 | |
| 40 | dnl ************************************************************************** |
| 41 | dnl * Check for programs. |
| 42 | dnl ************************************************************************** |
| 43 | |
John Criswell | 607b1ea | 2003-10-16 01:44:20 +0000 | [diff] [blame] | 44 | dnl ************************************************************************** |
| 45 | dnl * Check for libraries. |
| 46 | dnl ************************************************************************** |
| 47 | |
| 48 | dnl ************************************************************************** |
| 49 | dnl * Checks for header files. |
| 50 | dnl ************************************************************************** |
| 51 | |
| 52 | dnl ************************************************************************** |
| 53 | dnl * Checks for typedefs, structures, and compiler characteristics. |
| 54 | dnl ************************************************************************** |
| 55 | |
| 56 | dnl ************************************************************************** |
| 57 | dnl * Checks for library functions. |
| 58 | dnl ************************************************************************** |
| 59 | |
| 60 | dnl ************************************************************************** |
| 61 | dnl * Enable various compile-time options |
| 62 | dnl ************************************************************************** |
| 63 | |
| 64 | dnl ************************************************************************** |
| 65 | dnl * Set the location of various third-party software packages |
| 66 | dnl ************************************************************************** |
| 67 | |
John Criswell | 607b1ea | 2003-10-16 01:44:20 +0000 | [diff] [blame] | 68 | dnl ************************************************************************** |
| 69 | dnl * Create the output files |
| 70 | dnl ************************************************************************** |
Reid Spencer | 1a87ddc | 2005-02-24 18:50:53 +0000 | [diff] [blame] | 71 | |
| 72 | dnl This must be last |
Reid Spencer | 9964cd8 | 2005-01-01 09:26:55 +0000 | [diff] [blame] | 73 | AC_OUTPUT |