source: configure.ac @ 7e91d4f

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 7e91d4f was 7e91d4f, checked in by Peter A. Buhr <pabuhr@…>, 7 years ago

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