]>
Commit | Line | Data |
---|---|---|
1543451f DB |
1 | # -*- Autoconf -*- |
2 | # Process this file with autoconf to produce a configure script. | |
3 | m4_include([modules.af.m4]) | |
4 | AC_PREREQ([2.69]) | |
b4d3a561 | 5 | AC_INIT([GNU Thales], [1.99], [KAction@gnu.org]) |
1543451f DB |
6 | AM_INIT_AUTOMAKE([foreign]) |
7 | GUILE_PROGS | |
1543451f DB |
8 | AUTOFRISK_CHECKS |
9 | AUTOFRISK_SUMMARY | |
91b5ce37 DB |
10 | ## If GUILE_SITE is not provided by site-defaults or |
11 | ## environment, consult guile about it. Usually | |
12 | ## it results in path somewhere in /usr, not | |
13 | ## suitable to user-local install. So we fallback on | |
14 | ## `sed` machinery to provide semi-sane defaults. | |
1543451f | 15 | |
91b5ce37 DB |
16 | if test "x$GUILE_SITE" = x ; then |
17 | GUILE_SITE_DIR | |
18 | ## If prefix is specified, then we try to create sensible value | |
19 | ## for GUILE_SITE, otherwise just use what we have. | |
20 | if test "x$prefix" != xNONE ; then | |
21 | ev_datarootdir=`eval echo $datarootdir` | |
22 | GUILE_SITE=`echo $GUILE_SITE|sed "s%^/.*/guile%$ev_datarootdir/guile%"` | |
23 | fi | |
24 | fi | |
1543451f | 25 | |
91b5ce37 DB |
26 | if test "x$GUILE_SITE_CCACHE" = x ; then |
27 | GUILE_SITE_CCACHE=`$GUILE -c '(display (%site-ccache-dir))'` | |
28 | ## Same, but libdir actually depends on exec_prefix. Annoying. | |
29 | if test "x$prefix" != xNONE ; then | |
30 | if test "x$exec_prefix" = xNONE ; then | |
31 | exec_prefix="$prefix" | |
32 | ev_libdir=`eval echo $libdir` | |
33 | exec_prefix=NONE # Does it matter? | |
34 | else | |
35 | ev_libdir=`eval echo $libdir` | |
36 | fi | |
37 | GUILE_SITE_CCACHE=`echo $GUILE_SITE_CCACHE| sed "s%^/.*/guile%$ev_libdir/guile%"` | |
38 | fi | |
39 | fi | |
1543451f | 40 | |
91b5ce37 DB |
41 | ## But of course, you can specify these directories |
42 | ## via command line | |
43 | ## | |
44 | ## Courtesy of Mark Mitmer, author of guile-xcb. | |
45 | AC_ARG_WITH([guile-site-dir], | |
46 | [AS_HELP_STRING([--with-guile-site-dir], | |
47 | [use the specified installation path for Guile modules])], | |
48 | [GUILE_SITE="$withval"], []) | |
1543451f | 49 | |
91b5ce37 DB |
50 | AC_ARG_WITH([guile-site-ccache-dir], |
51 | [AS_HELP_STRING([--with-guile-site-ccache-dir], | |
52 | [use the specified installation path for Guile compiled modules])], | |
53 | [GUILE_SITE_CCACHE="$withval"], []) | |
54 | AC_SUBST([GUILE_SITE]) | |
55 | AC_SUBST([GUILE_SITE_CCACHE]) | |
56 | ||
57 | AC_MSG_RESULT(checking for Guile site directory to use ... $GUILE_SITE) | |
58 | AC_MSG_RESULT(checking for Guile cache site directory to use... $GUILE_SITE_CCACHE) | |
1543451f | 59 | |
1543451f DB |
60 | AC_CONFIG_FILES([ |
61 | Makefile | |
62 | doc/Makefile | |
63 | src/Makefile | |
64 | src/thales/Makefile]) | |
65 | ||
66 | AC_OUTPUT |