about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-07-04 00:20:01 +0000
committerEric Wong <normalperson@yhbt.net>2013-07-04 00:29:00 +0000
commit5027df50b5072d964f551414e259c2903778ea36 (patch)
tree4a2ae24ba6863391b2d8c3d7d0c97f5b0387f61f
parent212cca976056069d49b120ab196c25e76315a427 (diff)
downloadcmogstored-5027df50b5072d964f551414e259c2903778ea36.tar.gz
According to the m4/clock_gettime.m4 documentation (from gnulib),
the LIB_CLOCK_GETTIME variable should be added to a *LDADD variable
and not AM_LDFLAGS.  This is also consistent with GNU automake
documentation.

Thanks to Cody Pisto for reporting this problem under Ubuntu 12.04

ref: http://www.gnu.org/software/automake/manual/html_node/Linking.html
-rw-r--r--Makefile.am4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index b2cbd38..d143abd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 ACLOCAL_AMFLAGS = -I m4
 AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib
 AM_CFLAGS = $(WARN_CFLAGS) $(GCC_ATOMICS_CFLAGS) $(PTHREAD_CFLAGS)
-AM_LDFLAGS = $(LIBGNU_LIBDEPS) $(LIB_CLOCK_GETTIME)
+AM_LDFLAGS = $(LIBGNU_LIBDEPS)
 DTRACE = @DTRACE@
 SUBDIRS = lib
 
@@ -94,7 +94,7 @@ mog_src += util.h
 mog_src += upgrade.c
 mog_src += yield.c
 
-LDADD = $(LIBINTL) $(top_builddir)/lib/libgnu.a libnostd.a
+LDADD = $(LIBINTL) $(top_builddir)/lib/libgnu.a libnostd.a $(LIB_CLOCK_GETTIME)
 noinst_LIBRARIES = libnostd.a
 NOSTD_CFLAGS = -include $(top_builddir)/$(CONFIG_HEADER)
 libnostd_a_SOURCES = nostd/setproctitle.c nostd/setproctitle_noop.c