~ubuntu-branches/ubuntu/trusty/nilfs-tools/trusty

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2011-08-12 20:42:38 UTC
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20110812204238-3i5mnvvmg7amtyjm
Tags: upstream-2.1.0~rc2
ImportĀ upstreamĀ versionĀ 2.1.0~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
# Process this file with autoconf to produce a configure script.
7
7
 
8
8
AC_PREREQ(2.60)
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)
10
10
AM_INIT_AUTOMAKE
11
11
AC_CONFIG_SRCDIR([config.h.in])
12
12
AC_CONFIG_HEADER([config.h])
26
26
        [AC_MSG_ERROR([ldconfig not found])],
27
27
        [$PATH:/sbin])
28
28
 
 
29
# Check for options.
 
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])
 
36
 
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])])
34
42
 
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])])
 
43
LIB_POSIX_MQ=''
 
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)
 
49
 
 
50
LIB_POSIX_SEM=''
 
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)
39
57
 
40
58
# Checks for header files.
41
59
AC_HEADER_STDC
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])
 
65
 
 
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])
 
71
fi
 
72
AM_CONDITIONAL(CONFIG_LIBMOUNT, [test "$enable_libmount" = "yes"])
 
73
AC_SUBST(LIB_MOUNT)
47
74
 
48
75
# Checks for typedefs, structures, and compiler characteristics.
49
76
AC_C_CONST