1 | # -*- Autoconf -*- |
---|
2 | # Process this file with autoconf to produce a configure script. |
---|
3 | |
---|
4 | AC_PREREQ([2.68]) |
---|
5 | AC_INIT([cfa-cc],[1.0.0.0],[cforall@plg.uwaterloo.ca]) |
---|
6 | AC_CONFIG_AUX_DIR([./automake]) |
---|
7 | |
---|
8 | AM_INIT_AUTOMAKE([subdir-objects]) |
---|
9 | |
---|
10 | # Allow program name tansformation |
---|
11 | # will fill program_transform_name with appropriate sed regex |
---|
12 | AC_ARG_PROGRAM |
---|
13 | |
---|
14 | AC_CANONICAL_BUILD |
---|
15 | AC_CANONICAL_HOST |
---|
16 | |
---|
17 | AC_ARG_VAR(CONFIGURATION, [The configuration to use when building libcfa, options are: deubg, nodebug, nolib (prelude-only)]) |
---|
18 | AC_ARG_VAR(DRIVER_DIR, [The path to the cforall driver directory]) |
---|
19 | |
---|
20 | CFACC=${DRIVER_DIR}cfa |
---|
21 | CFACPP=${DRIVER_DIR}cfa-cpp |
---|
22 | AC_SUBST(CFACC) |
---|
23 | AC_SUBST(CFACPP) |
---|
24 | |
---|
25 | #============================================================================== |
---|
26 | # Installation paths |
---|
27 | if test "x$prefix" = "xNONE"; then |
---|
28 | cfa_prefix=${ac_default_prefix} |
---|
29 | else |
---|
30 | cfa_prefix=${prefix} |
---|
31 | fi |
---|
32 | AC_DEFINE_UNQUOTED(CFA_PREFIX, "${cfa_prefix}", [Location of cfa install.]) |
---|
33 | AC_SUBST(CFA_PREFIX, ${cfa_prefix}) |
---|
34 | |
---|
35 | if test "$includedir" = '${prefix}/include'; then |
---|
36 | cfa_incdir="${cfa_prefix}/include/${cfa_name}" |
---|
37 | else |
---|
38 | cfa_incdir=${includedir} |
---|
39 | fi |
---|
40 | AC_DEFINE_UNQUOTED(CFA_INCDIR, "${cfa_incdir}", [Location of include files.]) |
---|
41 | AC_SUBST(CFA_INCDIR, ${cfa_incdir}) |
---|
42 | |
---|
43 | if test "$bindir" = '${exec_prefix}/bin'; then |
---|
44 | cfa_bindir="${cfa_prefix}/bin" |
---|
45 | else |
---|
46 | cfa_bindir=${bindir} |
---|
47 | fi |
---|
48 | AC_DEFINE_UNQUOTED(CFA_BINDIR, "${cfa_bindir}", [Location of cfa command.]) |
---|
49 | AC_SUBST(CFA_BINDIR, ${cfa_bindir}) |
---|
50 | |
---|
51 | if test "$libdir" = '${exec_prefix}/lib'; then |
---|
52 | cfa_libdir="${cfa_prefix}/lib/${cfa_name}" |
---|
53 | else |
---|
54 | cfa_libdir=${libdir} |
---|
55 | fi |
---|
56 | AC_DEFINE_UNQUOTED(CFA_LIBDIR, "${cfa_libdir}", [Location of cc1 and cfa-cpp commands.]) |
---|
57 | AC_SUBST(CFA_LIBDIR, ${cfa_libdir}) |
---|
58 | |
---|
59 | # Checks for programs. |
---|
60 | AC_PROG_CXX |
---|
61 | AC_PROG_CC |
---|
62 | AM_PROG_AS |
---|
63 | AC_PROG_INSTALL |
---|
64 | AC_PROG_MAKE_SET |
---|
65 | AC_PROG_RANLIB |
---|
66 | |
---|
67 | AC_CONFIG_FILES([ |
---|
68 | Makefile |
---|
69 | src/Makefile |
---|
70 | prelude/Makefile |
---|
71 | ]) |
---|
72 | |
---|
73 | AC_OUTPUT() |
---|
74 | |
---|
75 | # Final text |
---|
76 | AC_MSG_RESULT(Cforall library configuraton completed. Type "make -j 8 install".) |
---|