From 5027df50b5072d964f551414e259c2903778ea36 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 4 Jul 2013 00:20:01 +0000 Subject: build: fix LIB_CLOCK_GETTIME linkage on some toolchains 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 --- Makefile.am | 4 ++-- 1 file 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 -- cgit v1.2.3-24-ge0c7