source: configure.in @ 134b86a

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 134b86a was 51b7345, checked in by Peter A. Buhr <pabuhr@…>, 10 years ago

initial commit

  • Property mode set to 100644
File size: 2.5 KB
Line 
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
46     AC_DEFINE_UNQUOTED(GCC_PATH, "${GCC_PATH}")
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
56AC_DEFINE_UNQUOTED(CPP_PATH, "${CPP_PATH}")
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
69AC_DEFINE_UNQUOTED(CFA_PREFIX, "${cfa_prefix}")
70CFA_PREFIX=${cfa_prefix}
71AC_SUBST(CFA_PREFIX)
72
73CFA_BINDIR=
74if test "$bindir" = '${exec_prefix}/bin'; then
75        cfa_bindir="${cfa_prefix}/bin"
76else
77        cfa_bindir=${bindir}
78fi
79AC_DEFINE_UNQUOTED(CFA_BINDIR, "${cfa_bindir}")
80CFA_BINDIR=${cfa_bindir}
81AC_SUBST(CFA_BINDIR)
82
83CFA_LIBDIR=
84if test "$libdir" = '${exec_prefix}/lib'; then
85        cfa_libdir=${cfa_prefix}/lib
86else
87        cfa_libdir=${libdir}
88fi
89AC_DEFINE_UNQUOTED(CFA_LIBDIR, "${cfa_libdir}")
90CFA_LIBDIR=${cfa_libdir}
91AC_SUBST(CFA_LIBDIR)
92
93AC_OUTPUT([ Makefile translator/Makefile driver/Makefile libcfa/Makefile ])
94
95dnl Final text
96
97AC_MSG_RESULT(The CForAll translator is now configured for your system)
98AC_MSG_RESULT()
99AC_MSG_RESULT(Perhaps you'd like to inspect the created Makefiles)
Note: See TracBrowser for help on using the repository browser.