dnl (c) 1998 Martin Mares <mj@ucw.cz>, (c) 2000 Pavel Machek <pavel@ucw.cz>,
dnl (c) 2003-2004 Wouter Verhelst <wouter@debian.org>
AC_INIT([nbd],[2.7.99pre2.8],[wouter@debian.org])
-AM_INIT_AUTOMAKE()
+AM_INIT_AUTOMAKE(foreign dist-bzip2)
+AM_MAINTAINER_MODE
AC_ARG_ENABLE(
lfs,
#error not here
#endif
],
- [AC_DEFINE(NBD_H, "nbd.h", Set to where a (recent enough) nbd.h can be found)
+ [AC_DEFINE(NBD_H_LOCAL, 1, Set to 1 if a (recent enough) nbd.h can be found in the current directory)
NBD_H='"nbd.h"'],
AC_TRY_CPP([#include <linux/nbd.h>
#ifdef LOCAL_END_REQUEST
#error not here
#endif
],
- [AC_DEFINE(NBD_H, <linux/nbd.h>) NBD_H='<linux/nbd.h>'],
+ [AC_DEFINE(NBD_H_LINUX, 1, Set to 1 if a (recent enough) nbd.h can be found in the linux directory in the search path) NBD_H='<linux/nbd.h>'],
AC_MSG_ERROR(Could not find a (recent enough) nbd.h)
)
)
AC_MSG_RESULT($NBD_H)
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/ioctl.h sys/mount.h sys/socket.h syslog.h])
+AC_CHECK_HEADERS([sys/mount.h],,,
+[[#include <sys/param.h>
+]])
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/ioctl.h sys/socket.h syslog.h])
AM_PATH_GLIB_2_0(2.2.0, [HAVE_GLIB=yes], AC_MSG_ERROR([Missing glib]))
AC_HEADER_SYS_WAIT
AC_TYPE_OFF_T