File: configure.ac

package info (click to toggle)
module-init-tools 3.4-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,208 kB
  • ctags: 900
  • sloc: sh: 7,980; ansic: 5,036; makefile: 204
file content (45 lines) | stat: -rw-r--r-- 1,120 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
AC_INIT

AC_CANONICAL_SYSTEM

AM_INIT_AUTOMAKE(module-init-tools, "3.4")

# If zlib is required, libz must be linked static, modprobe is in
# /sbin, libz is in /usr/lib and may not be available when it is run.
AC_ARG_ENABLE(zlib,
[  --enable-zlib               Handle gzipped modules],
[if test "$enableval" = "yes"; then
  AC_DEFINE(CONFIG_USE_ZLIB)
  zlib_flags="-Wl,-Bstatic -lz -Wl,-Bdynamic"
fi])

AC_PROG_CC
 
# Delay adding the zlib_flags until after AC_PROG_CC, so we can distinguish
# between a broken cc and a working cc but missing libz.a.
LDADD="$LDADD $zlib_flags"
AC_SUBST(LDADD)

case $target in
*-*-linux*) ;;
*) AC_MSG_ERROR([Linux only, dude!]);;
esac

# Thanks to Martin Pool
if test x"$GCC" = xyes 
then
    CFLAGS="$CFLAGS -Wunused -Wall"
    AC_MSG_NOTICE([Adding gcc options: $CFLAGS])
fi

AC_ARG_WITH(moddir,
[  --with-moddir=path      Give the path for system modules directory.]
[                         [ Defaults to /lib/modules ]],
[if test ! -z "$withval"; then
  MODULE_DIR="\\\"$withval/\\\""
  CFLAGS="$CFLAGS -DMODULE_DIR=$MODULE_DIR"
fi])
AC_SUBST(MODULE_DIR)

AC_OUTPUT([Makefile])