2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([guile-r6rs-libs], [0.2], [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 -Wall])
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.
27 # Disable static libraries as this is usually useless.
28 LT_INIT([disable-static])
36 AC_PATH_PROG([guile_snarf], [guile-snarf], [not-found])
37 if test "x$guile_snarf" = "xnot-found"; then
38 AC_MSG_ERROR([`guile-snarf' not found. Please install Guile 1.8.x or later.])
42 # Checks for header files.
44 AC_CHECK_HEADERS([limits.h])
45 AC_CHECK_HEADER([gmp.h], [:],
46 AC_MSG_ERROR([GMP headers not found. Please install it first.]))
48 # Checks for typedefs, structures, and compiler characteristics.
52 AC_CHECK_SIZEOF([void *])
54 # Checks for library functions.
57 # Look for `scm_set_port_read ()' in libguile, scheduled to arrive in
60 save_LDFLAGS="$LDFLAGS"
61 CFLAGS="$CFLAGS $GUILE_CFLAGS"
62 LDFLAGS="$LDFLAGS $GUILE_LDFLAGS"
63 AC_CHECK_FUNCS([scm_set_port_read])
65 LDFLAGS="$save_LDFLAGS"
71 if test "x$GCC" = "xyes"; then
72 # Enable useful GCC compilation flags.
75 gl_MANYWARN_ALL_GCC([POTENTIAL_GCC_CFLAGS])
76 POTENTIAL_GCC_CFLAGS="-pipe -Wall -Werror -Wno-error=inline $POTENTIAL_GCC_CFLAGS"
77 for flag in $POTENTIAL_GCC_CFLAGS
80 *traditional*) break;;
81 *) gl_WARN_ADD([$flag], [GCC_CFLAGS]);;
87 AC_SUBST([GCC_CFLAGS])
89 pkgdatadir="$datadir/$PACKAGE_NAME"
90 if test "x$guilemoduledir" = "x"; then
91 guilemoduledir="$pkgdatadir"
93 AC_SUBST([guilemoduledir])
95 if test "$guilemoduledir" != "$GUILE_SITE"; then
96 # Guile won't be able to locate the module "out of the box", so
98 AC_MSG_WARN([`guilemoduledir' ($guilemoduledir) is different from `GUILE_SITE' ($GUILE_SITE).])
99 AC_MSG_WARN([Make sure to adjust the `GUILE_LOAD_PATH' environment variable accordingly,])
100 AC_MSG_WARN([or re-run `configure' with `--with-guilemoduledir=$GUILE_SITE'.])
103 AC_CONFIG_FILES([Makefile
111 AC_CONFIG_COMMANDS([pre-inst-guile-exec], [chmod +x pre-inst-guile])