]> granicus.if.org Git - graphviz/commitdiff
common: autotools: add linking to xdot
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 28 Sep 2021 19:09:47 +0000 (21:09 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 7 Dec 2021 06:34:59 +0000 (07:34 +0100)
E.g. lib/common/emit.c. uses parseXDotF from lib/xdot/xdot.c.

This removes the need to link to xdot for downstream libraries that do
not explicitly use xdot.

Fixes these errors using autotools with MinGW:

C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/common/.libs/libcommon_C.a(input.o): in function `graph_cleanup':
C:\Users\magja\graphviz\lib\common/input.c:881: undefined reference to `__imp_freeXDot'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/common/.libs/libcommon_C.a(emit.o): in function `init_xdot':
C:\Users\magja\graphviz\lib\common/emit.c:58: undefined reference to `__imp_parseXDotF'

lib/common/Makefile.am

index 16d81e876c312f3031ff74254d2d55cd579e4987..7936ced56d742dccdfa182e7c1ae76d8a9da3bfc 100644 (file)
@@ -30,6 +30,8 @@ libcommon_C_la_SOURCES = arrows.c colxlate.c ellipse.c textspan.c textspan_lut.c
        timing.c labels.c ns.c shapes.c utils.c geom.c taper.c \
        output.c emit.c xml.c \
        color_names
+libcommon_C_la_LIBADD = \
+       $(top_builddir)/lib/xdot/libxdot.la
 
 colxlate.o colxlate.lo : colortbl.h