source: configure.ac @ 00cc023

aaron-thesisarm-ehcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change on this file since 00cc023 was 00cc023, checked in by Peter A. Buhr <pabuhr@…>, 7 years ago

redo automake first attempt

  • Property mode set to 100644
File size: 2.6 KB
Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.68])
5AC_INIT([cfa-cc],[1.0.0],[cforall@plg.uwaterloo.ca])
6AC_CONFIG_AUX_DIR([automake])
7AC_CONFIG_SRCDIR([src/main.cc])
8AC_CONFIG_HEADERS([config.h])
9
10AM_INIT_AUTOMAKE
11AM_MAINTAINER_MODE(disable)
12
13# Installation paths
14
15AC_ARG_WITH(backend-compiler,
16            [  --with-backend-compiler=PROGRAM     PROGRAM that performs the final code compilation (must be gcc-compatible) ],
17            backcompiler=$withval, backcompiler="")
18  if test x$backcompiler != x; then
19        AC_DEFINE_UNQUOTED(GCC_PATH, "${backcompiler}")
20        BACKEND_CC=${backcompiler}
21  else
22        AC_PATH_PROG(GCC_PATH, gcc, N/A)
23        if test "$GCC_PATH" = "N/A"; then
24                AC_MSG_ERROR(some version of gcc is needed. Get it at ftp://ftp.gnu.org)
25                exit 1
26        fi
27        AC_DEFINE_UNQUOTED(GCC_PATH, "${GCC_PATH}", [Path/name of C compiler.])
28        BACKEND_CC=${GCC_PATH}
29  fi
30AC_SUBST(BACKEND_CC)
31
32if test "x$prefix" = "xNONE"; then
33        cfa_prefix=${ac_default_prefix}
34else
35        cfa_prefix=${prefix}
36fi
37AC_DEFINE_UNQUOTED(CFA_PREFIX, "${cfa_prefix}", [Location of cfa files.])
38AC_SUBST(CFA_PREFIX, ${cfa_prefix})
39
40if test "$includedir" = '${prefix}/include'; then
41        cfa_incdir="${cfa_prefix}/include"
42else
43        cfa_incdir=${$includedir}
44fi
45AC_DEFINE_UNQUOTED(CFA_INCDIR, "${cfa_incdir}", [Location of include files.])
46AC_SUBST(CFA_INCDIR, ${cfa_incdir})
47
48if test "$bindir" = '${exec_prefix}/bin'; then
49        cfa_bindir="${cfa_prefix}/bin"
50else
51        cfa_bindir=${bindir}
52fi
53AC_DEFINE_UNQUOTED(CFA_BINDIR, "${cfa_bindir}", [Location of cfa command.])
54AC_SUBST(CFA_BINDIR, ${cfa_bindir})
55
56if test "$libdir" = '${exec_prefix}/lib'; then
57        cfa_libdir=${cfa_prefix}/lib
58else
59        cfa_libdir=${libdir}
60fi
61AC_DEFINE_UNQUOTED(CFA_LIBDIR, "${cfa_libdir}", [Location of cc1 and cfa-cpp commands.])
62AC_SUBST(CFA_LIBDIR, ${cfa_libdir})
63
64# Checks for programs.
65AC_PROG_CXX
66AC_PROG_AWK
67AC_PROG_CC
68AM_PROG_CC_C_O  # deprecated
69AC_PROG_INSTALL
70AC_PROG_MAKE_SET
71AC_PROG_RANLIB
72
73# Checks for libraries.
74
75# Checks for header files.
76AC_FUNC_ALLOCA
77AC_CHECK_HEADERS([fenv.h float.h inttypes.h libintl.h limits.h malloc.h stddef.h stdlib.h string.h unistd.h])
78
79# Checks for typedefs, structures, and compiler characteristics.
80AC_HEADER_STDBOOL
81AC_C_INLINE
82AC_TYPE_INT16_T
83AC_TYPE_INT32_T
84AC_TYPE_INT8_T
85AC_C_RESTRICT
86AC_TYPE_SIZE_T
87AC_TYPE_UINT16_T
88AC_TYPE_UINT32_T
89AC_TYPE_UINT8_T
90
91# Checks for library functions.
92AC_CHECK_FUNCS([memset putenv strchr strtol])
93
94AC_CONFIG_FILES([
95        Makefile
96        driver/Makefile
97        src/Makefile
98        src/examples/Makefile
99        libcfa/Makefile
100        ])
101
102AC_OUTPUT
103
104# Final text
105AC_MSG_RESULT(Cforall configuraton completed. Type "make -j 8 install".)
Note: See TracBrowser for help on using the repository browser.