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.
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.
55 # Look for `scm_set_port_read ()' in libguile, scheduled to arrive in
58 save_LDFLAGS="$LDFLAGS"
59 CFLAGS="$CFLAGS $GUILE_CFLAGS"
60 LDFLAGS="$LDFLAGS $GUILE_LDFLAGS"
61 AC_CHECK_FUNCS([scm_set_port_read])
63 LDFLAGS="$save_LDFLAGS"
69 if test "x$GCC" = "xyes"; then
70 # Enable useful GCC compilation flags.
73 gl_MANYWARN_ALL_GCC([POTENTIAL_GCC_CFLAGS])
74 POTENTIAL_GCC_CFLAGS="-pipe -Wall -Werror -Wno-error=inline $POTENTIAL_GCC_CFLAGS"
75 for flag in $POTENTIAL_GCC_CFLAGS
78 *traditional*) break;;
79 *) gl_WARN_ADD([$flag], [GCC_CFLAGS]);;
85 AC_SUBST([GCC_CFLAGS])
87 pkgdatadir="$datadir/$PACKAGE_NAME"
88 if test "x$guilemoduledir" = "x"; then
89 guilemoduledir="$pkgdatadir"
91 AC_SUBST([guilemoduledir])
93 if test "$guilemoduledir" != "$GUILE_SITE"; then
94 # Guile won't be able to locate the module "out of the box", so
96 AC_MSG_WARN([`guilemoduledir' ($guilemoduledir) is different from `GUILE_SITE' ($GUILE_SITE).])
97 AC_MSG_WARN([Make sure to adjust the `GUILE_LOAD_PATH' environment variable accordingly,])
98 AC_MSG_WARN([or re-run `configure' with `--with-guilemoduledir=$GUILE_SITE'.])
101 AC_CONFIG_FILES([Makefile
109 AC_CONFIG_COMMANDS([pre-inst-guile-exec], [chmod +x pre-inst-guile])