1 AC_INIT(module-init-tools,3.7-pre6)
5 # Use -no-portability since we're never going to use module-init-tools on
6 # non-Linux systems and it's reasonable to expect GNU-compatibility here.
7 AM_INIT_AUTOMAKE([-Wno-portability])
9 # If zlib is required, libz must be linked static, modprobe is in
10 # /sbin, libz is in /usr/lib and may not be available when it is run.
12 [ --enable-zlib Handle gzipped modules],
13 [if test "$enableval" = "yes"; then
14 AC_DEFINE(CONFIG_USE_ZLIB)
15 zlib_flags="-Wl,-Bstatic -lz -Wl,-Bdynamic"
20 AC_CHECK_PROGS(DOCBOOKTOMAN, docbook-to-man docbook2man, [no],)
21 if test x"$DOCBOOKTOMAN" = xno
23 AC_MSG_ERROR([docbook2man not found])
26 # Delay adding the zlib_flags until after AC_PROG_CC, so we can distinguish
27 # between a broken cc and a working cc but missing libz.a.
28 LDADD="$LDADD $zlib_flags"
33 *) AC_MSG_ERROR([Linux only, dude!]);;
36 # Thanks to Martin Pool
37 if test x"$GCC" = xyes
39 CFLAGS="$CFLAGS -Wunused -Wall"
40 AC_MSG_NOTICE([Adding gcc options: $CFLAGS])
44 [ --with-moddir=path Give the path for system modules directory.]
45 [ [ Defaults to /lib/modules ]],
46 [if test ! -z "$withval"; then
47 MODULE_DIR="\\\"$withval/\\\""
48 CFLAGS="$CFLAGS -DMODULE_DIR=$MODULE_DIR"