More documentation fixes, formatting, cosmetic, wording
[nobug.git] / configure.ac
blob393fa359a6742b82fe875a406d6dbcac40e020a5
1 AC_INIT([nobug], [201006.1], [nobug@lists.pipapo.org])
2 AC_CONFIG_SRCDIR([src/nobug.h])
3 AC_CONFIG_AUX_DIR([scripts])
4 AC_CONFIG_MACRO_DIR([m4])
5 AM_INIT_AUTOMAKE
6 AC_PREREQ(2.59)
8 AC_COPYRIGHT([
9  This file is part of the NoBug debugging library.
11  Copyright (C)
12    2007, 2008, 2009,            Christian Thaeter <ct@pipapo.org>
13    2009,                        Benny Lyons <Benny.Lyons@gmx.net>
15  This program is free software; you can redistribute it and/or modify
16  it under the terms of the GNU General Public License as published by
17  the Free Software Foundation; either version 2 of the License, or
18  (at your option) any later version.
20  This program is distributed in the hope that it will be useful,
21  but WITHOUT ANY WARRANTY; without even the implied warranty of
22  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23  GNU General Public License for more details.
25  You should have received a copy of the GNU General Public License
26  along with this program; if not, contact Christian Thaeter <ct@pipapo.org>.
29 AC_PROG_CC_C99
30 AM_PROG_CC_C_O
31 AC_STDC_HEADERS
32 AC_PROG_LIBTOOL
33 ACX_PTHREAD
34 AM_CONDITIONAL([HAVE_THREADING], [test x"$acx_pthread_ok" = xyes])
35 AC_CHECK_HEADER([execinfo.h], AC_DEFINE(HAVE_EXECINFO_H))
37 nobug_FUNC_MMAP_ANON
39 # provide some extra flags for gcc
40 if test x$GCC = xyes; then
41    CONF_CFLAGS="-Wall -Wextra -Werror"
42 else
43    CONF_CFLAGS=""
45 AC_SUBST(CONF_CFLAGS)
47 # check if LOG_PERROR is supported
48 AC_COMPILE_IFELSE(
49         AC_LANG_PROGRAM([#include <syslog.h>],
50                         [printf("%d\n", LOG_PERROR);]),
51         AC_DEFINE(HAVE_LOG_PERROR),
52         AC_MSG_NOTICE([System does not support LOG_PERROR]))
55 PKG_CHECK_MODULES(VALGRIND,[valgrind >= 3.5.0],
56   [AC_DEFINE(VALGRIND_NEWLINE, "\n") AC_DEFINE(HAVE_VALGRIND)]
58   [PKG_CHECK_MODULES(VALGRIND,[valgrind],
59    [ AC_DEFINE(VALGRIND_NEWLINE, "") AC_DEFINE(HAVE_VALGRIND)],
60    [ AC_MSG_NOTICE([Valgrind not available, build without it])])]
63 AC_CONFIG_FILES([nobug.pc nobugmt.pc])
65 AC_CONFIG_FILES(Makefile)
66 AC_OUTPUT