pre-release: update release to v3.7-pre6
[module-init-tools.git] / configure.ac
blob60181cec23b6c317308764d064c369a1b72aa0c7
1 AC_INIT(module-init-tools,3.7-pre6)
3 AC_CANONICAL_SYSTEM
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.
11 AC_ARG_ENABLE(zlib,
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"
16 fi])
18 AC_PROG_CC
20 # Delay adding the zlib_flags until after AC_PROG_CC, so we can distinguish
21 # between a broken cc and a working cc but missing libz.a.
22 LDADD="$LDADD $zlib_flags"
23 AC_SUBST(LDADD)
25 case $target in
26 *-*-linux*) ;;
27 *) AC_MSG_ERROR([Linux only, dude!]);;
28 esac
30 # Thanks to Martin Pool
31 if test x"$GCC" = xyes 
32 then
33     CFLAGS="$CFLAGS -Wunused -Wall"
34     AC_MSG_NOTICE([Adding gcc options: $CFLAGS])
37 AC_ARG_WITH(moddir,
38 [  --with-moddir=path      Give the path for system modules directory.]
39 [                         [ Defaults to /lib/modules ]],
40 [if test ! -z "$withval"; then
41   MODULE_DIR="\\\"$withval/\\\""
42   CFLAGS="$CFLAGS -DMODULE_DIR=$MODULE_DIR"
43 fi])
44 AC_SUBST(MODULE_DIR)
46 AC_OUTPUT([Makefile])