2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([guile-r6rs-libs], [0.1], [ludo@gnu.org])
6 AC_CONFIG_AUX_DIR(build-aux)
7 AC_CONFIG_MACRO_DIR(m4)
9 AM_INIT_AUTOMAKE([gnu check-news no-define])
11 AC_CONFIG_SRCDIR([src/bytevector.c])
12 AC_CONFIG_HEADER([src/config.h])
14 AC_ARG_WITH([guilemoduledir],
15 [use the specified installation path for Guile modules],
17 xyes|xno) guilemoduledir="";;
18 *) guilemoduledir="$withval";;
23 # Checks for programs.
34 AC_PATH_PROG([guile_snarf], [guile-snarf], [not-found])
35 if test "x$guile_snarf" = "xnot-found"; then
36 AC_MSG_ERROR([`guile-snarf' not found. Please install Guile 1.8.x or later.])
40 # Checks for header files.
42 AC_CHECK_HEADERS([limits.h])
43 AC_CHECK_HEADER([gmp.h], [:],
44 AC_MSG_ERROR([GMP headers not found. Please install it first.]))
46 # Checks for typedefs, structures, and compiler characteristics.
50 AC_CHECK_SIZEOF([void *])
52 # Checks for library functions.
58 if test "x$GCC" = "xyes"; then
59 # Enable useful GCC compilation flags.
60 GCC_CFLAGS="-Wall -Werror"
61 GCC_CFLAGS="-Wcast-align -Wmissing-prototypes -Wpointer-arith $GCC_CFLAGS"
62 GCC_CFLAGS="-Winline -Wdeclaration-after-statement $GCC_CFLAGS"
66 AC_SUBST([GCC_CFLAGS])
68 pkgdatadir="$datadir/$PACKAGE_NAME"
69 if test "x$guilemoduledir" = "x"; then
70 guilemoduledir="$pkgdatadir"
72 AC_SUBST([guilemoduledir])
74 if test "$guilemoduledir" != "$GUILE_SITE"; then
75 # Guile won't be able to locate the module "out of the box", so
77 AC_MSG_WARN([`guilemoduledir' ($guilemoduledir) is different from `GUILE_SITE' ($GUILE_SITE).])
78 AC_MSG_WARN([Make sure to adjust the `GUILE_LOAD_PATH' environment variable accordingly,])
79 AC_MSG_WARN([or re-run `configure' with `--with-guilemoduledir=$GUILE_SITE'.])
82 AC_CONFIG_FILES([Makefile
88 AC_CONFIG_COMMANDS([pre-inst-guile-exec], [chmod +x pre-inst-guile])