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