Skip to contentSkip to conversation

cifs-utils: only link in -lrt to binaries that need it

PATCH In review Jeff Layton 1 participant 2 messages Dec 7, 2012 – Dec 13, 2012 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs-utils: only link in -lrt to binaries that need it

...which is really only mount.cifs.

---
 Makefile.am  | 2 +-
 configure.ac | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
Makefile.am +1 -1
index 73f756f..ff7a726 100644
@@ -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
 
configure.ac +2 -1
index 78acd43..b6791ab 100644
@@ -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])])
Signature · 1 line
1.7.11.7
#2 lore raw
In reply to a message not in the archive
Quoted 28 lines · On Fri, 7 Dec 2012 10:41:06 -0500 Jeff Layton…

...which is really only mount.cifs.

---
 Makefile.am  | 2 +-
 configure.ac | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
Makefile.am +1 -1
index 73f756f..ff7a726 100644
@@ -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
 
configure.ac +0 -0
index 78acd43..b6791ab 100644
@@ -94,9 +94,10 @@ AC_CHECK_FUNCS(clock_gettime, [], [
       AC_DEFINE(HAVE_CLOCK_GETTIME, 1)

configure.ac AC_CHECK_FUNCS(clock_gettime, [], [ · line 103

Quoted 10 lines
configure.ac +2 -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])])

Merged...

Signature · 1 line
Jeff Layton <[email protected]>