depmod: export static device node information to modules.devname
[mit.git] / configure.ac
blob485354a6daa5758b325256d13a9f125e9d017ea9
1 AC_INIT(module-init-tools,3.12-pre3)
3 AC_CANONICAL_SYSTEM
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.
13 AC_ARG_ENABLE(zlib,
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"
18 fi])
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)
26   zlib_flags="-lz"
27 fi])
29 AC_PROG_CC
30 AC_PROG_RANLIB
32 AC_CHECK_PROGS(DOCBOOKTOMAN, docbook-to-man docbook2man, [no],)
33 if test x"$DOCBOOKTOMAN" = xno
34 then
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"
43 AC_SUBST(LDADD)
45 case $target in
46 *-*-linux*) ;;
47 *) AC_MSG_ERROR([Linux only, dude!]);;
48 esac
50 # Thanks to Martin Pool
51 if test x"$GCC" = xyes 
52 then
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")
62 AC_ARG_WITH(moddir,
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"
68 fi])
69 AC_SUBST(MODULE_DIR)
71 AC_OUTPUT([Makefile])