source: configure.ac @ 0207e71

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

modify makefile to allow different compilers, use constructor cast in iostream

  • Property mode set to 100644
File size: 3.0 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        backendcompiler=$withval, backendcompiler="")
24if test "x$backendcompiler" != x; then
25        BACKEND_CC=${backendcompiler}
26else
27        AC_PATH_PROG(BACKEND_CC, gcc, [])
28        if test "x$BACKEND_CC" = "x"; then
29                AC_MSG_ERROR(some version of gcc is needed. Get it at ftp://ftp.gnu.org)
30                exit 1
31        fi
32fi
33AC_DEFINE_UNQUOTED(CFA_BACKEND_CC, "${BACKEND_CC}", [Location of include files.])
34AC_SUBST(CFA_BACKEND_CC)
35
36if test "x$prefix" = "xNONE"; then
37        cfa_prefix=${ac_default_prefix}
38else
39        cfa_prefix=${prefix}
40fi
41AC_DEFINE_UNQUOTED(CFA_PREFIX, "${cfa_prefix}", [Location of cfa install.])
42AC_SUBST(CFA_PREFIX, ${cfa_prefix})
43
44if test "$includedir" = '${prefix}/include'; then
45        cfa_incdir="${cfa_prefix}/include"
46else
47        cfa_incdir=${includedir}
48fi
49AC_DEFINE_UNQUOTED(CFA_INCDIR, "${cfa_incdir}", [Location of include files.])
50AC_SUBST(CFA_INCDIR, ${cfa_incdir})
51
52if test "$bindir" = '${exec_prefix}/bin'; then
53        cfa_bindir="${cfa_prefix}/bin"
54else
55        cfa_bindir=${bindir}
56fi
57AC_DEFINE_UNQUOTED(CFA_BINDIR, "${cfa_bindir}", [Location of cfa command.])
58AC_SUBST(CFA_BINDIR, ${cfa_bindir})
59
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.])
66AC_SUBST(CFA_LIBDIR, ${cfa_libdir})
67
68# Checks for programs.
69AC_PROG_CXX
70AC_PROG_CC
71AM_PROG_CC_C_O  # deprecated
72# These are often not installed and people miss seeing the "no", so stop the configure.
73AC_PROG_YACC
74if test "${YACC}" = "yacc" ; then echo "Error: bison required." ; exit 1 ; fi
75AC_PROG_LEX
76if test "${LEX}" = "lex" ; then echo "Error: flex required." ; exit 1 ; fi
77AC_PROG_INSTALL
78AC_PROG_MAKE_SET
79AC_PROG_RANLIB
80
81# Checks for libraries.
82
83# Checks for header files.
84AC_FUNC_ALLOCA
85AC_CHECK_HEADERS([fenv.h float.h inttypes.h libintl.h limits.h malloc.h stddef.h stdlib.h string.h unistd.h])
86
87# Checks for typedefs, structures, and compiler characteristics.
88AC_HEADER_STDBOOL
89AC_C_INLINE
90AC_TYPE_INT16_T
91AC_TYPE_INT32_T
92AC_TYPE_INT8_T
93AC_C_RESTRICT
94AC_TYPE_SIZE_T
95AC_TYPE_UINT16_T
96AC_TYPE_UINT32_T
97AC_TYPE_UINT8_T
98
99# Checks for library functions.
100AC_CHECK_FUNCS([memset putenv strchr strtol])
101
102AC_CONFIG_FILES([
103        Makefile
104        src/driver/Makefile
105        src/Makefile
106        src/examples/Makefile
107        src/libcfa/Makefile
108        ])
109
110AC_OUTPUT
111
112# Final text
113AC_MSG_RESULT(Cforall configuraton completed. Type "make -j 8 install".)
Note: See TracBrowser for help on using the repository browser.