]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
configure: use a convenience library for fixed point arithmetic
authorVincent Bernat <bernat@luffy.cx>
Sun, 15 Sep 2013 10:24:43 +0000 (12:24 +0200)
committerVincent Bernat <bernat@luffy.cx>
Sun, 15 Sep 2013 10:24:43 +0000 (12:24 +0200)
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
tests/Makefile.am

index 6cf17cd7d534fd25ff93f25fa73dff643e17a724..c6b312293d4d6dbc65ef1cf5179c55382d37e48a 100644 (file)
@@ -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:
index 42f76a0052a9c6515c4ad512c82a0e9222481e30..483df4c5a566ba358ef4505fe51d68e731823909 100644 (file)
@@ -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