oops
[libnl.git] / configure.in
1 #
2 # configure.in
3 #
4 #       This library is free software; you can redistribute it and/or
5 #       modify it under the terms of the GNU Lesser General Public
6 #       License as published by the Free Software Foundation version 2.1
7 #       of the License.
8 #
9 # Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch>
10 #
11
12 AC_INIT(libnl, 1.0-pre6, tgraf@suug.ch)
13 AC_CONFIG_HEADER(lib/defs.h)
14
15 save_CFLAGS="${CFLAGS}"
16 save_LDFLAGS="${LDFLAGS}"
17 save_CPPFLAGS="${CPPFLAGS}"
18
19 AC_PROG_CC
20 AC_PROG_INSTALL
21
22 AC_C_CONST
23 AC_C_INLINE
24
25 #####################################################################
26 ##
27 ## libm check
28 ##
29 #####################################################################
30 M="No "
31 AC_CHECK_LIB(m, pow,
32 [
33   LIBM="-lm"
34   M="Yes"
35 ],[
36     echo
37     echo "*** Error: libm required ***"
38     echo
39     exit
40 ])
41
42 #####################################################################
43 ##
44 ## verbose error strings
45 ##
46 #####################################################################
47 AC_ARG_ENABLE(verbose-errors,
48 [  --enable-verbose-errors enable verbose errors (debugging)],[
49         if test x$enableval = xyes; then
50                 AC_DEFINE_UNQUOTED(VERBOSE_ERRORS,"1",[verbose errors])
51         fi
52 ])
53
54 #####################################################################
55 ##
56 ## compile decisions
57 ##
58 #####################################################################
59 COMPILE_LIBNL="Yes "
60 LIBNL_LIB="$LIBM"
61
62 AC_SUBST(LIBNL_LIB)
63
64 AC_OUTPUT([Makefile.opts libnl-1.pc])
65
66 #####################################################################
67 ##
68 ## status report
69 ##
70 #####################################################################
71 echo "
72 ----------------------------------------------------------------------
73 SUMMARY:
74
75 Included in Compilation:
76   libnl:   $COMPILE_LIBNL $LIBNL_LIB
77
78 Dependencies:
79 bmon:
80   libm             $M       (required)"