context passing update
[nobug.git] / configure.ac
blob3e919079066e0dbdbdae4fb64d7039d6ef37d091
1 AC_INIT([nobug], [201001.1])
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) 2007, 2008, Christian Thaeter <chth@gmx.net>
13  This program is free software; you can redistribute it and/or modify
14  it under the terms of the GNU General Public License as published by
15  the Free Software Foundation; either version 2 of the License, or
16  (at your option) any later version.
18  This program is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  GNU General Public License for more details.
23  You should have received a copy of the GNU General Public License
24  along with this program; if not, contact Christian Thaeter <ct@pipapo.org>.
27 AC_PROG_CC_C99
28 AM_PROG_CC_C_O
29 AC_STDC_HEADERS
30 AC_PROG_LIBTOOL
31 ACX_PTHREAD
32 AM_CONDITIONAL([HAVE_THREADING], [test x"$acx_pthread_ok" = xyes])
33 AC_CHECK_HEADER([execinfo.h], AC_DEFINE(HAVE_EXECINFO_H))
35 nobug_FUNC_MMAP_ANON
38 # Need to check for pkg-config, otherwise the next line doesn't work.
39 # TODO: output a reasonable error message if not present.
41 # should be some AC_CHECK_PROG check, but configure seems to handle that here:
42 #   checking pkg-config is at least version 0.9.0... yes
43 #AC_CHECK_FILE (pkg-config,[],[])
45 PKG_CHECK_MODULES(VALGRIND,[valgrind >= 3.5.0],
46   [AC_DEFINE(VALGRIND_NEWLINE, "\n") AC_DEFINE(HAVE_VALGRIND)]
48   [PKG_CHECK_MODULES(VALGRIND,[valgrind],
49    [ AC_DEFINE(VALGRIND_NEWLINE, "") AC_DEFINE(HAVE_VALGRIND)],
50    [ AC_MSG_NOTICE([Valgrind not available, build without it])])]
53 AC_CONFIG_FILES([nobug.pc nobugmt.pc])
55 AC_CONFIG_FILES(Makefile)
56 AC_OUTPUT