1 AC_INIT(module-init-tools,3.16)
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"
20 AC_ARG_ENABLE(zlib-dynamic,
21 [ --enable-zlib-dynamic Handle gzipped modules, zlib will be linked
22 dynamically. Note that libz must be installed
23 in /lib for this to work.],
24 [if test "$enableval" = "yes"; then
25 AC_DEFINE(CONFIG_USE_ZLIB)
32 AC_CHECK_PROGS(DOCBOOKTOMAN, docbook-to-man docbook2man, [no],)
33 if test x"$DOCBOOKTOMAN" = xno
35 AC_MSG_WARN([docbook2man not found])
36 # fail with a meaningfull error if $DOCBOOKTOMAN called by the makefile
37 DOCBOOKTOMAN=docbook2man
40 # Delay adding the zlib_flags until after AC_PROG_CC, so we can distinguish
41 # between a broken cc and a working cc but missing libz.a.
42 LDADD="$LDADD $zlib_flags"
47 *) AC_MSG_ERROR([Linux only, dude!]);;
50 # Thanks to Martin Pool
51 if test x"$GCC" = xyes
53 CFLAGS="$CFLAGS -Wunused -Wall"
54 AC_MSG_NOTICE([Adding gcc options: $CFLAGS])
57 AC_ARG_ENABLE(static-utils,
58 AS_HELP_STRING([--disable-static-utils], [Do not build static utils]),
59 [],[enable_static_utils=yes])
60 AM_CONDITIONAL(BUILD_STATIC_UTILS, test "$enable_static_utils" = "yes")
63 [ --with-moddir=path Give the path for system modules directory.]
64 [ [ Defaults to /lib/modules ]],
65 [if test ! -z "$withval"; then
66 MODULE_DIR="\\\"$withval/\\\""
67 CFLAGS="$CFLAGS -DMODULE_DIR=$MODULE_DIR"