source: configure.ac @ 0638c44

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

compile CFA with C++11, further update refrat with lstlisting macros, support varags, enumeration initialization, add implicit separators to output streams, update example programs that print

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