2 # Copyright (C) 2009 Red Hat Inc.
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.
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.
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.
18 AC_INIT([libguestfs-daemon],[0.1])
21 dnl Make sure the user has created the link to nfs-utils source.
22 if ! test -e $srcdir/nfs-utils \
23 -o -f $srcdir/nfs-utils/utils/nfsd/nfsd.c; then
24 AC_MSG_ERROR([$srcdir/nfs-utils must be a symlink to the unpacked nfs-utils sources.
25 See the README file for more information.])
28 dnl If the user specified --enable-32bit, then force the C compiler
29 dnl to build 32 bit binaries (gcc -m32).
30 AC_ARG_ENABLE([32bit],
31 [AS_HELP_STRING([--enable-32bit], [build 32 bit binaries (gcc -m32)])],
32 [export CC="gcc -m32"],
35 dnl Check for basic C environment.
41 test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
45 dnl Check for XDR library.
46 AC_CHECK_LIB([portablexdr],[xdrmem_create],[],[
47 AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl])
51 AC_CONFIG_SUBDIRS([nfs-utils])
53 dnl Produce output files.
54 AC_CONFIG_HEADERS([config.h])
55 AC_CONFIG_FILES([Makefile])