configure: Cosmetic change.
[guile-r6rs-libs.git] / configure.ac
blobf688b01b4fbde680b8911fc271e4febf276a380c
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 AC_ARG_WITH([guilemoduledir],
15   [use the specified installation path for Guile modules],
16   [case "x$withval" in
17      xyes|xno) guilemoduledir="";;
18      *)        guilemoduledir="$withval";;
19    esac],
20   [guilemoduledir=""])
21    
23 # Checks for programs.
24 AC_PROG_CC
25 gl_EARLY
26 AC_PROG_LIBTOOL
28 # Gnulib.
29 gl_INIT
31 # Checks for Guile.
32 GUILE_PROGS
33 GUILE_FLAGS
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.])
38 GUILE_SITE_DIR
40 # Checks for header files.
41 AC_HEADER_STDC
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.
47 AC_C_CONST
48 AC_C_INLINE
49 AC_TYPE_SIZE_T
50 AC_CHECK_SIZEOF([void *])
52 # Checks for library functions.
53 AC_FUNC_MEMCMP
55 # Low-level details.
56 AC_C_BIGENDIAN
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"
63 else
64   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
76    # warn the user.
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
83                  lib/Makefile
84                  modules/Makefile
85                  src/Makefile
86                  tests/Makefile
87                  pre-inst-guile])
88 AC_CONFIG_COMMANDS([pre-inst-guile-exec], [chmod +x pre-inst-guile])
90 AC_OUTPUT