6
6
# Process this file with autoconf to produce a configure script.
9
AC_INIT(NILFS utils, 2.1.0-rc1, linux-nilfs@vger.kernel.org)
9
AC_INIT(NILFS utils, 2.1.0-rc2, linux-nilfs@vger.kernel.org)
11
11
AC_CONFIG_SRCDIR([config.h.in])
12
12
AC_CONFIG_HEADER([config.h])
26
26
[AC_MSG_ERROR([ldconfig not found])],
30
AC_ARG_ENABLE(libmount,
31
[AC_HELP_STRING([--enable-libmount=[ARG]],
32
[Link mount.nilfs2 with libmount [ARG=yes] (EXPERIMENTAL)])],
33
[enable_libmount=$enableval],
34
[enable_libmount=no; \
35
if test -L /etc/mtab; then enable_libmount=yes; fi])
29
37
# Checks for libraries.
30
38
AC_CHECK_LIB([uuid], [uuid_generate],
31
39
[AC_DEFINE([HAVE_LIBUUID], 1,
32
40
[Define to 1 if you have the `uuid' library (-luuid).])],
33
41
[AC_MSG_ERROR([UUID library not found])])
35
AC_CHECK_LIB([rt],[sem_open],
36
[AC_DEFINE([HAVE_LIBRT], 1,
37
[Define to 1 if you have the `rt' library (-lrt).])],
38
[AC_MSG_ERROR([rt library not found])])
44
AC_CHECK_FUNC(mq_open,,
45
[AC_CHECK_LIB(rt, mq_open, LIB_POSIX_MQ=-lrt,
46
[AC_CHECK_LIB(posix4, mq_open, LIB_POSIX_MQ=-lposix4,
47
[AC_MSG_ERROR([posix message queue not found])])])])
48
AC_SUBST(LIB_POSIX_MQ)
51
AC_CHECK_FUNC(sem_open,,
52
[AC_CHECK_LIB(rt, sem_open, LIB_POSIX_SEM=-lrt,
53
[AC_CHECK_LIB(pthread, sem_open, LIB_POSIX_SEM=-lpthread,
54
[AC_CHECK_LIB(posix4, sem_open, LIB_POSIX_SEM=-lposix4,
55
[AC_MSG_ERROR([posix semaphore not found])])])])])
56
AC_SUBST(LIB_POSIX_SEM)
40
58
# Checks for header files.
43
61
AC_CHECK_HEADERS([fcntl.h libintl.h limits.h locale.h mntent.h paths.h \
44
62
stdlib.h string.h strings.h sys/ioctl.h sys/mount.h \
45
63
sys/time.h syslog.h unistd.h linux/types.h grp.h pwd.h \
46
mntent.h semaphore.h ctype.h mqueue.h])
64
mntent.h semaphore.h ctype.h mqueue.h linux/magic.h])
66
# Check for conditional libraries and headers.
67
if test "${enable_libmount}" = "yes"; then
68
AC_CHECK_LIB(mount, mnt_context_do_mount, [LIB_MOUNT="-lmount"],
69
AC_MSG_ERROR([libmount needed]))
70
AC_CHECK_HEADERS([libmount/libmount.h])
72
AM_CONDITIONAL(CONFIG_LIBMOUNT, [test "$enable_libmount" = "yes"])
48
75
# Checks for typedefs, structures, and compiler characteristics.