source: configure.in @ 48e99f2

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change on this file since 48e99f2 was ad17ba6a, checked in by Peter A. Buhr <pabuhr@…>, 10 years ago

generalize example Makefile

  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[51b7345]1AC_INIT(cfa-cc, 1.0, cforall@plg.uwaterloo.ca)
2AC_CONFIG_SRCDIR([translator/main.cc])
3
4AM_INIT_AUTOMAKE(cfa, 1.0)
5AM_CONFIG_HEADER(config.h)
6
7dnl This comes from `autoscan'
8dnl Checks for programs.
9AC_PROG_YACC
10AC_PROG_CXX
11AC_PROG_CC # ???
12AM_PROG_LEX
13AC_PROG_MAKE_SET
14AC_PROG_INSTALL
15
16dnl Checks for header libraries.
17
18dnl Checks for header files.
19AC_CHECK_HEADERS([malloc.h unistd.h])
20
21dnl Checks for typedefs, structures, and compiler characteristics.
22AC_C_CONST
23AC_C_INLINE
24AC_STRUCT_TM
25
26test "${prefix}" != "NONE" || prefix=$ac_default_prefix
27
28preludedir=${prefix}/share/cfa
29AC_ARG_WITH(preludedir,
30            [  --with-preludedir=DIR      DIR that contains prelude.cf and other necessary files ],
31            preludedir=$withval )
32AC_SUBST(preludedir)
33
34AC_ARG_WITH(backend-compiler,
35            [  --with-backend-compiler=PROGRAM     PROGRAM that performs the final code compilation (must be gcc-compatible) ],
36            backcompiler=$withval, backcompiler="")
37  if test x$backcompiler != x; then
38     AC_DEFINE_UNQUOTED(GCC_PATH, "${backcompiler}")
39     BACKEND_CC=${backcompiler}
40  else
41     AC_PATH_PROG(GCC_PATH, gcc, N/A)
42     if test "$GCC_PATH" = "N/A"; then
43        AC_MSG_ERROR(some version of gcc is needed. Get it at ftp://ftp.gnu.org)
44        exit 1
45     fi
[8c17ab0]46     AC_DEFINE_UNQUOTED(GCC_PATH, "${GCC_PATH}", [Path/name of C compiler.])
[51b7345]47     BACKEND_CC=${GCC_PATH}
48  fi
49AC_SUBST(BACKEND_CC)
50
51AC_PATH_PROG(CPP_PATH, cpp, N/A)
52if test "$CPP_PATH" = "N/A"; then
53   AC_MSG_ERROR(cpp not found)
54   exit 1
55fi
[8c17ab0]56AC_DEFINE_UNQUOTED(CPP_PATH, "${CPP_PATH}", [Path/name of cpp preprocessor.])
[51b7345]57
58# Purify instrumenting
59dnl AC_ARG_WITH(enablepurify,
60dnl             [  --with-purify     Enable Purify ],
61
62dnl Installation paths
63CFA_PREFIX=
64if test "x$prefix" = "xNONE"; then
65        cfa_prefix=${ac_default_prefix}
66else
67        cfa_prefix=${prefix}
68fi
[8c17ab0]69AC_DEFINE_UNQUOTED(CFA_PREFIX, "${cfa_prefix}", [Location of cfa files.])
[51b7345]70CFA_PREFIX=${cfa_prefix}
71AC_SUBST(CFA_PREFIX)
72
[8c17ab0]73CFA_INCDIR=
74if test "$includedir" = '${prefix}/include'; then
75        cfa_incdir="${cfa_prefix}/include"
76else
77        cfa_incdir=${$includedir}
78fi
79AC_DEFINE_UNQUOTED(CFA_INCDIR, "${cfa_incdir}", [Location of include files.])
80CFA_INCDIR=${cfa_incdir}
81AC_SUBST(CFA_INCDIR)
82
[51b7345]83CFA_BINDIR=
84if test "$bindir" = '${exec_prefix}/bin'; then
85        cfa_bindir="${cfa_prefix}/bin"
86else
87        cfa_bindir=${bindir}
88fi
[8c17ab0]89AC_DEFINE_UNQUOTED(CFA_BINDIR, "${cfa_bindir}", [Location of cfa command.])
[51b7345]90CFA_BINDIR=${cfa_bindir}
91AC_SUBST(CFA_BINDIR)
92
93CFA_LIBDIR=
94if test "$libdir" = '${exec_prefix}/lib'; then
95        cfa_libdir=${cfa_prefix}/lib
96else
97        cfa_libdir=${libdir}
98fi
[8c17ab0]99AC_DEFINE_UNQUOTED(CFA_LIBDIR, "${cfa_libdir}", [Location of cc1 and cfa-cpp commands.])
[51b7345]100CFA_LIBDIR=${cfa_libdir}
101AC_SUBST(CFA_LIBDIR)
102
[ad17ba6a]103AC_OUTPUT([ Makefile translator/Makefile driver/Makefile libcfa/Makefile translator/examples/Makefile ])
[51b7345]104
105dnl Final text
106
[ad17ba6a]107AC_MSG_RESULT(The Cforall translator is now configured for your system)
[1db2c5be]108dnl AC_MSG_RESULT()
109dnl AC_MSG_RESULT(Perhaps you'd like to inspect the created Makefiles)
Note: See TracBrowser for help on using the repository browser.