forked from tgraf/libnl-1.1-stable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
94 lines (80 loc) · 2.18 KB
/
configure.in
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#
# configure.in
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation version 2.1
# of the License.
#
# Copyright (c) 2003-2008 Thomas Graf <[email protected]>
#
AC_INIT(libnl, 1.1.4, [email protected])
AC_CONFIG_HEADER(lib/defs.h)
save_CFLAGS="${CFLAGS}"
save_LDFLAGS="${LDFLAGS}"
save_CPPFLAGS="${CPPFLAGS}"
AC_PROG_CC
AC_PROG_INSTALL
AC_C_CONST
AC_C_INLINE
#####################################################################
##
## libm check
##
#####################################################################
M="No "
AC_CHECK_LIB(m, pow,
[
LIBM="-lm"
M="Yes"
],[
echo
echo "*** Error: libm required ***"
echo
exit
])
#####################################################################
##
## verbose error strings
##
#####################################################################
AC_ARG_ENABLE(verbose-errors,
[ --enable-verbose-errors enable verbose errors (debugging)],[
if test x$enableval = xyes; then
AC_DEFINE_UNQUOTED(VERBOSE_ERRORS,"1",[verbose errors])
fi
])
AC_ARG_ENABLE([pthreads],
AS_HELP_STRING([--disable-pthreads], [Disable pthreads support]),
[enable_pthreads="$enableval"], [enable_pthreads="yes"])
if test "x$enable_pthreads" = "xno"; then
AC_DEFINE([DISABLE_PTHREADS], [1], [Define to 1 to disable pthreads])
else
# libpthread
AC_CHECK_LIB([pthread], [pthread_mutex_lock],
[
LIBPTHREAD="-lpthread"
PTHREAD="Yes"
], AC_MSG_ERROR([libpthread is required]))
fi
#####################################################################
##
## compile decisions
##
#####################################################################
COMPILE_LIBNL="Yes "
LIBNL_LIB="$LIBM $LIBPTHREAD"
AC_SUBST(LIBNL_LIB)
AC_OUTPUT([Makefile.opts libnl-1.pc doc/Doxyfile])
#####################################################################
##
## status report
##
#####################################################################
echo "
----------------------------------------------------------------------
SUMMARY:
Included in Compilation:
libnl: $COMPILE_LIBNL $LIBNL_LIB
Dependencies:
libm $M (required)"