source: configure.ac @ e15b0a0a

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change on this file since e15b0a0a was a77e7b5, checked in by Peter A. Buhr <pabuhr@…>, 9 years ago

fix configure.ac fourth attempt

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