cifs-utils: only link in -lrt to binaries that need it
authorJeff Layton <jlayton@samba.org>
Thu, 6 Dec 2012 12:17:17 +0000 (07:17 -0500)
committerJeff Layton <jlayton@samba.org>
Thu, 6 Dec 2012 12:18:13 +0000 (07:18 -0500)
...which is really only mount.cifs.

Cc: Björn Jacke <bj@sernet.de>
Signed-off-by: Jeff Layton <jlayton@samba.org>
Makefile.am
configure.ac

index 73f756f37cd0590f039157d21eed9922fa0ea799..ff7a72627b0355318a5e6e6ff12fb28085532a9f 100644 (file)
@@ -4,7 +4,7 @@ ACLOCAL_AMFLAGS = -I aclocal
 root_sbindir = $(ROOTSBINDIR)
 root_sbin_PROGRAMS = mount.cifs
 mount_cifs_SOURCES = mount.cifs.c mtab.c resolve_host.c util.c
-mount_cifs_LDADD = $(LIBCAP) $(CAPNG_LDADD)
+mount_cifs_LDADD = $(LIBCAP) $(CAPNG_LDADD) $(RT_LDADD)
 
 man_MANS = mount.cifs.8
 
index 78acd43979745a1faa0e3a8fd7531bfc0870af8d..b6791abece44e54d7ebecd0800449ac8061124ea 100644 (file)
@@ -94,9 +94,10 @@ AC_CHECK_FUNCS(clock_gettime, [], [
       AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
        AC_DEFINE(HAVE_CLOCK_GETTIME,1,
                [Whether the clock_gettime func is there])
-      LIBS="$LIBS -lrt"
+      RT_LDADD="-lrt"
         ])
   ])
+AC_SUBST(RT_LDADD)
 
 # Checks for header files.
 AC_CHECK_HEADERS([arpa/inet.h ctype.h fcntl.h inttypes.h limits.h mntent.h netdb.h stddef.h stdint.h stdbool.h stdlib.h stdio.h errno.h string.h strings.h sys/mount.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h], , [AC_MSG_ERROR([necessary header(s) not found])])