Generated code for debug command.
[libguestfs.git] / daemon / configure.ac
1 # libguestfs-daemon
2 # Copyright (C) 2009 Red Hat Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 AC_INIT([libguestfs-daemon],[1.0.0])
19 AM_INIT_AUTOMAKE
20
21 AC_CONFIG_MACRO_DIR([m4])
22
23 dnl If the user specified --enable-32bit, then force the C compiler
24 dnl to build 32 bit binaries (gcc -m32).
25 AC_ARG_ENABLE([32bit],
26   [AS_HELP_STRING([--enable-32bit], [build 32 bit binaries (gcc -m32)])],
27   [export CC="gcc -m32"],
28   [enable_32bit=no])
29
30 dnl Enable 'debug' command.
31 AC_ARG_ENABLE([debug-command],
32   [AS_HELP_STRING([--enable-debug-command], [enable the 'debug' command])],
33   [AC_DEFINE_UNQUOTED([ENABLE_DEBUG_COMMAND],[1],[Enable the 'debug' command])],
34   [])
35
36 dnl Check for basic C environment.
37 AC_PROG_CC
38 AC_PROG_INSTALL
39 AC_PROG_CPP
40
41 AC_C_PROTOTYPES
42 test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
43
44 AC_PROG_CC_C_O
45
46 dnl Check for Augeas.
47 AC_CHECK_LIB([augeas],[aug_match],,[
48         AC_MSG_ERROR([Augeas library not found])
49         ])
50
51 dnl Check for functions not available in earlier versions of Augeas.
52 AC_CHECK_FUNC([aug_load aug_defvar aug_defnode])
53
54 dnl Check for XDR library.
55 AC_CHECK_LIB([portablexdr],[xdrmem_create],[],[
56         AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl])
57         ])
58
59 dnl Produce output files.
60 AC_CONFIG_HEADERS([config.h])
61 AC_CONFIG_FILES([Makefile])
62 AC_OUTPUT