source: configure.ac @ 94d40c5

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 94d40c5 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
RevLine 
[5d6ce1f]1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.68])
[42336618]5AC_INIT([cfa-cc],[1.0.0],[cforall@plg.uwaterloo.ca])
[00cc023]6AC_CONFIG_AUX_DIR([automake])
[d3b7937]7#AC_CONFIG_SRCDIR([src/main.cc])
[5d6ce1f]8AC_CONFIG_HEADERS([config.h])
9
[90c3b1c]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
[00cc023]16AM_INIT_AUTOMAKE
[a61fea9a]17AM_MAINTAINER_MODE(enable)      # may require auto* software to be installed
[00cc023]18
[5d6ce1f]19# Installation paths
20
21AC_ARG_WITH(backend-compiler,
[e24f13a]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
[00cc023]29                AC_MSG_ERROR(some version of gcc is needed. Get it at ftp://ftp.gnu.org)
30                exit 1
31        fi
[e24f13a]32fi
33AC_DEFINE_UNQUOTED(CFA_BACKEND_CC, "${BACKEND_CC}", [Location of include files.])
34AC_SUBST(CFA_BACKEND_CC)
[5d6ce1f]35
36if test "x$prefix" = "xNONE"; then
[00cc023]37        cfa_prefix=${ac_default_prefix}
[5d6ce1f]38else
[00cc023]39        cfa_prefix=${prefix}
[5d6ce1f]40fi
[d3b7937]41AC_DEFINE_UNQUOTED(CFA_PREFIX, "${cfa_prefix}", [Location of cfa install.])
[00cc023]42AC_SUBST(CFA_PREFIX, ${cfa_prefix})
[5d6ce1f]43
44if test "$includedir" = '${prefix}/include'; then
45        cfa_incdir="${cfa_prefix}/include"
46else
[faf8857]47        cfa_incdir=${includedir}
[5d6ce1f]48fi
49AC_DEFINE_UNQUOTED(CFA_INCDIR, "${cfa_incdir}", [Location of include files.])
[00cc023]50AC_SUBST(CFA_INCDIR, ${cfa_incdir})
[5d6ce1f]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.])
[00cc023]58AC_SUBST(CFA_BINDIR, ${cfa_bindir})
[5d6ce1f]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.])
[00cc023]66AC_SUBST(CFA_LIBDIR, ${cfa_libdir})
[5d6ce1f]67
68# Checks for programs.
69AC_PROG_CXX
70AC_PROG_CC
[00cc023]71AM_PROG_CC_C_O  # deprecated
[c3a4385]72# These are often not installed and people miss seeing the "no", so stop the configure.
[56c3935]73AC_PROG_YACC
[c3a4385]74if test "${YACC}" = "yacc" ; then echo "Error: bison required." ; exit 1 ; fi
[56c3935]75AC_PROG_LEX
[c3a4385]76if test "${LEX}" = "lex" ; then echo "Error: flex required." ; exit 1 ; fi
[5d6ce1f]77AC_PROG_INSTALL
78AC_PROG_MAKE_SET
[00cc023]79AC_PROG_RANLIB
[5d6ce1f]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
[00cc023]102AC_CONFIG_FILES([
103        Makefile
[6e7e2b36]104        src/driver/Makefile
[00cc023]105        src/Makefile
106        src/examples/Makefile
[6e7e2b36]107        src/libcfa/Makefile
[00cc023]108        ])
[5d6ce1f]109
110AC_OUTPUT
[7e91d4f]111
[5d6ce1f]112# Final text
113AC_MSG_RESULT(Cforall configuraton completed. Type "make -j 8 install".)
Note: See TracBrowser for help on using the repository browser.