2 define([AC_INIT_NOTICE],
3 [### Generated automatically using autoconf version] AC_ACVERSION [
4 ### Copyright 2009,2010 Steve Grubb <sgrubb@redhat.com>
6 ### Permission is hereby granted, free of charge, to any person obtaining a
7 ### copy of this software and associated documentation files (the "Software"),
8 ### to deal in the Software without restriction, including without limitation
9 ### the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 ### and/or sell copies of the Software, and to permit persons to whom the
11 ### Software is furnished to do so, subject to the following conditions:
13 ### The above copyright notice and this permission notice shall be included
14 ### in all copies or substantial portions of the Software.
16 ### THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 ### IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 ### FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 ### THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 ### OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 ### ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 ### OTHER DEALINGS IN THE SOFTWARE.
24 ### For usage, run `./configure --help'
25 ### For more detailed information on installation, read the file `INSTALL'.
27 ### If configuration succeeds, status is in the file `config.status'.
28 ### A log of configuration tests is in `config.log'.
31 AC_REVISION($Revision: 1.3 $)dnl
32 AC_INIT(libcap-ng,0.6.6)
34 AM_CONFIG_HEADER(config.h)
36 echo Configuring libcap-ng $VERSION
41 AC_SUBST(LIBTOOL_DEPS)
44 echo Checking for programs
51 echo Checking for header files
53 AC_CHECK_HEADERS(linux/capability.h, [], [AC_MSG_ERROR(linux/capability.h is required in order to build libcap-ng.)])
54 AC_CHECK_HEADERS(attr/xattr.h, [], [AC_MSG_WARN(attr/xattr.h not found, disabling file system capabilities.)])
55 AC_CHECK_HEADERS(linux/securebits.h, [], [])
64 if test x"$GCC" = x"yes"; then
68 ALLWARNS="-W -Wall -Wundef -Wpointer-arith -Wcast-align \
69 -Wwrite-strings -Waggregate-return -Wstrict-prototypes \
70 -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
71 -Wnested-externs -Winline -Wfloat-equal -Wchar-subscripts"
78 [ --with-debug turn on debugging [[default=no]]],
80 if test "x${withval}" = xyes; then
83 AM_CONDITIONAL(DEBUG, true)
86 AM_CONDITIONAL(DEBUG, false)
89 [ DEBUG="-DNDEBUG"; AM_CONDITIONAL(DEBUG, false) ])
92 [ --with-warn turn on warnings [[default=yes]]],
94 if test "x${withval}" = xyes; then
102 AC_CHECK_HEADER(sys/syscall.h,
103 [AC_DEFINE([HAVE_SYSCALL_H], [1],
104 [Define to 1 if you have <sys/syscall.h>.])], [],)
106 AC_CHECK_PROG(swig_found, swig, yes, no)
107 if test x"${swig_found}" = x"no" ; then
108 AC_MSG_WARN("Swig not found - python bindings will not be made")
110 AM_CONDITIONAL(HAVE_SWIG, test x"${swig_found}" = x"yes")
112 AC_MSG_CHECKING(whether to create python bindings)
114 AS_HELP_STRING([--with-python],[enable building python bindings]),
117 if test x$use_python = xno ; then
121 AC_MSG_RESULT(testing)
123 if test -f /usr/include/python${am_cv_python_version}/Python.h ; then
125 AC_MSG_NOTICE(Python bindings will be built)
128 if test x$use_python = xyes ; then
129 AC_MSG_ERROR([Python explicitly required and python headers found])
131 AC_MSG_WARN("Python headers not found - python bindings will not be made")
135 AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes")
137 AC_OUTPUT(Makefile src/Makefile src/libcap-ng.pc src/test/Makefile
138 bindings/Makefile bindings/python/Makefile
139 bindings/python/test/Makefile utils/Makefile
140 m4/Makefile docs/Makefile)
145 libcap-ng Version: $VERSION
147 Installation prefix: $prefix
150 `echo $CFLAGS | fmt -w 50 | sed 's,^, ,'`