Actually use `GUILE_CFLAGS' and `GUILE_LDFLAGS'.
[guile-r6rs-libs.git] / configure.ac
blobca185743269a38a9281830d31cbafbfd278a8310
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ(2.61)
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 # Checks for programs.
15 AC_PROG_CC
16 gl_EARLY
17 AC_PROG_LIBTOOL
19 # Gnulib.
20 gl_INIT
22 if test "x$GCC" = "xyes"; then
23   # Enable useful GCC compilation flags.
24   CFLAGS="-Wall -Werror $CFLAGS"
25   CFLAGS="-Wcast-align -Wmissing-prototypes -Wpointer-arith $CFLAGS"
26   CFLAGS="-Winline -Wdeclaration-after-statement $CFLAGS"
29 # Checks for Guile.
30 GUILE_PROGS
31 GUILE_FLAGS
32 AC_PATH_PROG([guile_snarf], [guile-snarf], [not-found])
33 if test "x$guile_snarf" = "xnot-found"; then
34    AC_MSG_ERROR([`guile-snarf' not found.  Please install Guile 1.8.x or later.])
36 GUILE_SITE_DIR
38 # Checks for header files.
39 AC_HEADER_STDC
40 AC_CHECK_HEADERS([limits.h])
41 AC_CHECK_HEADER([gmp.h], [:],
42   AC_MSG_ERROR([GMP headers not found.  Please install it first.]))
44 # Checks for typedefs, structures, and compiler characteristics.
45 AC_C_CONST
46 AC_C_INLINE
47 AC_TYPE_SIZE_T
48 AC_CHECK_SIZEOF([void *])
50 # Checks for library functions.
51 AC_FUNC_MEMCMP
53 # Low-level details.
54 AC_C_BIGENDIAN
56 AC_CONFIG_FILES([Makefile
57                  lib/Makefile
58                  modules/Makefile
59                  src/Makefile
60                  tests/Makefile
61                  pre-inst-guile])
62 AC_CONFIG_COMMANDS([pre-inst-guile-exec], [chmod +x pre-inst-guile])
64 AC_OUTPUT