source: configure.ac @ a6151ba

aaron-thesisarm-ehcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since a6151ba was ef7d253, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

updated automake config to support less verbose build and compile the tests directory

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