source: configure.in @ 1db2c5be

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 1db2c5be was 1db2c5be, checked in by Peter A. Buhr <pabuhr@…>, 10 years ago

configure changes commit

  • Property mode set to 100644
File size: 2.9 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}", [Path/name of C compiler.])
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}", [Path/name of cpp preprocessor.])
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}", [Location of cfa files.])
70CFA_PREFIX=${cfa_prefix}
71AC_SUBST(CFA_PREFIX)
72
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
83CFA_BINDIR=
84if test "$bindir" = '${exec_prefix}/bin'; then
85        cfa_bindir="${cfa_prefix}/bin"
86else
87        cfa_bindir=${bindir}
88fi
89AC_DEFINE_UNQUOTED(CFA_BINDIR, "${cfa_bindir}", [Location of cfa command.])
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
99AC_DEFINE_UNQUOTED(CFA_LIBDIR, "${cfa_libdir}", [Location of cc1 and cfa-cpp commands.])
100CFA_LIBDIR=${cfa_libdir}
101AC_SUBST(CFA_LIBDIR)
102
103AC_OUTPUT([ Makefile translator/Makefile driver/Makefile libcfa/Makefile ])
104
105dnl Final text
106
107AC_MSG_RESULT(The CForAll translator is now configured for your system)
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.