The functions that we use from librt on Linux are in other libraries
on OS X. So make it possible to disable librt.
The hardcoded librt dependency was added in
0caa2bae.
Signed-off-by: Jan Tulak <jtulak@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
enable_lib64=yes)
AC_SUBST(enable_lib64)
-librt="-lrt"
-AC_SUBST(librt)
+AC_ARG_ENABLE(librt,
+[ --enable-librt=[yes/no] Enable librt support [default=yes]],,
+ enable_librt=yes)
+AC_SUBST(enable_librt)
#
# If the user specified a libdir ending in lib64 do not append another
AC_PACKAGE_GLOBALS(xfsprogs)
AC_PACKAGE_UTILITIES(xfsprogs)
AC_MULTILIB($enable_lib64)
+AC_RT($enable_librt)
AC_PACKAGE_NEED_UUID_H
AC_PACKAGE_NEED_UUIDCOMPARE
TAR=/usr/bin/gnutar
LIBTOOL=/usr/bin/glibtool
INSTALL_GROUP=wheel
- LOCAL_CONFIGURE_OPTIONS="--enable-gettext=no --enable-blkid=no"
+ LOCAL_CONFIGURE_OPTIONS="\
+ --enable-gettext=no\
+ --enable-blkid=no\
+ --enable-librt=no\
+ "
$ make
$ su root
--- /dev/null
+# Check if the platform has librt
+#
+
+AC_DEFUN([AC_RT],
+[
+ if test "$enable_librt" = "yes"; then
+ librt="-lrt"
+ else
+ librt=""
+ fi
+ AC_SUBST(librt)
+])