From ad1bf014ff127258895bfb0423a628698073ca12 Mon Sep 17 00:00:00 2001 From: szaka Date: Thu, 7 Dec 2006 01:09:15 +0000 Subject: [PATCH] fix: static linking failed because FUSE forgot to require -lrt --- configure.ac | 9 +++++++++ src/Makefile.am | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 757601e7..929bfdfa 100644 --- a/configure.ac +++ b/configure.ac @@ -89,6 +89,15 @@ linux*) ;; esac +# Static linking failed because FUSE 2.6.[01] forgot to include -lrt. +# However FreeBSD doesn't have one. So, here we go with the code from FUSE. +libfuse_libs= +LIBS= +AC_SEARCH_LIBS(clock_gettime, [rt]) +libfuse_libs="$libfuse_libs $LIBS" +LIBS= +AC_SUBST(libfuse_libs) + # add --with-extra-includes and --with-extra-libs switch to ./configure all_libraries="$all_libraries $USER_LDFLAGS" all_includes="$all_includes $USER_INCLUDES" diff --git a/src/Makefile.am b/src/Makefile.am index da8f4f3b..20bcf7d2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,7 +23,7 @@ bin_PROGRAMS = ntfs-3g AM_CPPFLAGS = -I$(top_srcdir)/include/ntfs-3g $(all_includes) ntfs_3g_SOURCES = ntfs-3g.c utils.c utils.h -ntfs_3g_LDADD = $(AM_LIBS) $(FUSE_MODULE_LIBS) +ntfs_3g_LDADD = $(AM_LIBS) $(FUSE_MODULE_LIBS) $(libfuse_libs) ntfs_3g_LDFLAGS = $(AM_LFLAGS) ntfs_3g_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=26