From f17837f781b01c24f9972b86adaa7b13bd4259eb Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 15 Sep 2013 12:24:43 +0200 Subject: [PATCH] configure: use a convenience library for fixed point arithmetic automake >= 1.14 does not like building binaries from source in other directories. To avoid a warning, `subdir-objects` option has to be passed to `AM_INIT_AUTOMAKE`. Unfortunately, this breaks what worked before. Fixed point tests are using `fixedpoint.c` from `src/lib`. This seems to confuse dependency tracking. See: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928 http://mytestbed.net/issues/1327 As a workaround, we use a convenience library instead. --- src/lib/Makefile.am | 8 +++++--- tests/Makefile.am | 11 +++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 6cf17cd7..c6b31229 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -3,9 +3,11 @@ AM_CFLAGS = -I $(top_srcdir)/include lib_LTLIBRARIES = liblldpctl.la include_HEADERS = lldpctl.h -liblldpctl_la_SOURCES = lldpctl.h private.h errors.c connection.c atom.c atom-private.c \ - fixedpoint.h fixedpoint.c -liblldpctl_la_LIBADD = $(top_builddir)/src/libcommon-daemon-lib.la +noinst_LTLIBRARIES = libfixedpoint.la +libfixedpoint_la_SOURCES = fixedpoint.h fixedpoint.c + +liblldpctl_la_SOURCES = lldpctl.h private.h errors.c connection.c atom.c atom-private.c +liblldpctl_la_LIBADD = $(top_builddir)/src/libcommon-daemon-lib.la libfixedpoint.la liblldpctl_la_LDFLAGS = -export-symbols-regex '^lldpctl_' -version-info 6:0:2 # -version-info format is `current`:`revision`:`age`. For more details, see: diff --git a/tests/Makefile.am b/tests/Makefile.am index 42f76a00..483df4c5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,6 +3,9 @@ TESTS = check_marshal check_lldp check_cdp check_sonmp check_edp check_fixedpoin if HAVE_CHECK +AM_CFLAGS += @CHECK_CFLAGS@ +LDADD = $(top_builddir)/src/daemon/liblldpd.la @CHECK_LIBS@ @LIBEVENT_LDFLAGS@ + check_marshal_SOURCES = check_marshal.c \ $(top_srcdir)/src/marshal.h @@ -22,12 +25,8 @@ check_edp_SOURCES = check_edp.c \ $(top_srcdir)/src/daemon/lldpd.h \ common.h common.c -check_fixedpoint_SOURCES = check_fixedpoint.c \ - $(top_srcdir)/src/lib/fixedpoint.h \ - $(top_srcdir)/src/lib/fixedpoint.c - -AM_CFLAGS += @CHECK_CFLAGS@ -LDADD = $(top_builddir)/src/daemon/liblldpd.la @CHECK_LIBS@ @LIBEVENT_LDFLAGS@ +check_fixedpoint_SOURCES = check_fixedpoint.c +check_fixedpoint_LDADD = $(top_builddir)/src/lib/libfixedpoint.la $(LDADD) if USE_SNMP TESTS += check_snmp -- 2.39.5