source: configure.ac @ ec129c4

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since ec129c4 was ec129c4, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

add additional #defines for CFA version numbers

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