Fix build-system: use xxx_LDADD instead of xxx_LDFLAGS xxx_LDFLAGS place the libraries like '-lX11' or '-lXft' at the beginning of the linker command. Some systems were not able to handle the situation and this lead to a lot of unresolved symbols. Reading the documentation of automake: ... you can use LDADD to do so. This variable is used to specify additional objects or libraries to link with; it is inappropriate for specifying specific linker flags, you should use AM_LDFLAGS for this purpose. In addition we link against -lm in order to satisfy symbols refering to 'cos' and 'sin'.
Mathias Gumz akira@fluxbox.org
4 files changed,
24 insertions(+),
20 deletions(-)
M
configure.ac
→
configure.ac
@@ -129,6 +129,10 @@ sync \
vsnprintf \ ]) +AC_CHECK_LIBM +AC_SUBST(LIBM) +LIBS="$LIBS $LIBM" + dnl Windows requires the mingw-catgets library for the catgets function. AC_SEARCH_LIBS([catgets], [catgets], [], [])
M
src/Makemodule.am
→
src/Makemodule.am
@@ -25,6 +25,8 @@
BUILT_SOURCES = src/defaults.hh src/defaults.cc CONFIG_CLEAN_FILES = src/defaults.hh src/defaults.cc +LDADD = libFbTk.a src/defaults.$(OBJEXT) + bin_PROGRAMS += fluxbox src/defaults.hh:@@ -138,13 +140,13 @@ -I$(src_incdir) \
-I$(fbtk_incdir) \ -I$(nls_incdir) -fluxbox_LDFLAGS = \ +fluxbox_LDADD = \ + $(LDADD) \ $(FONTCONFIG_LIBS) \ $(FREETYPE2_LIBS) \ $(FRIBIDI_LIBS) \ $(IMLIB2_LIBS) \ $(RANDR_LIBS) \ - $(X11_LIBS) \ $(XEXT_LIBS) \ $(XFT_LIBS) \ $(XINERAMA_LIBS) \@@ -152,7 +154,8 @@ $(XPM_LIBS) \
$(XRENDER_LIBS) \ $(X_EXTRA_LIBS) \ $(X_LIBS) \ - $(X_PRE_LIBS) + $(X_PRE_LIBS) \ + $(X11_LIBS) fluxbox_SOURCES = \ src/AlphaMenu.cc \@@ -272,4 +275,3 @@ ${REMEMBER_SOURCE} \
${SLIT_SOURCE} \ ${TOOLBAR_SOURCE} -LDADD = libFbTk.a src/defaults.$(OBJEXT)
M
util/Makemodule.am
→
util/Makemodule.am
@@ -21,18 +21,18 @@ src/FbRootWindow.cc \
util/fbsetroot.cc \ util/fbsetroot.hh fbsetroot_LDADD = \ - libFbTk.a + libFbTk.a \ + $(FONTCONFIG_LIBS) \ + $(FRIBIDI_LIBS) \ + $(X11_LIBS) \ + $(XFT_LIBS) \ + $(XRENDER_LIBS) + fbsetroot_CPPFLAGS = \ $(AM_CPPFLAGS) \ -I$(fbtk_incdir) \ -I$(src_incdir) \ -I$(nls_incdir) -fbsetroot_LDFLAGS = \ - $(FONTCONFIG_LIBS) \ - $(FRIBIDI_LIBS) \ - $(X11_LIBS) \ - $(XFT_LIBS) \ - $(XRENDER_LIBS) fluxbox_update_configs_SOURCES = \ src/defaults.cc \@@ -44,8 +44,7 @@ -I$(fbtk_incdir) \
-I$(src_incdir) \ -I$(nls_incdir) fluxbox_update_configs_LDADD = \ - libFbTk.a -fluxbox_update_configs_LDFLAGS = \ + libFbTk.a \ $(FRIBIDI_LIBS) \ $(X11_LIBS)@@ -54,5 +53,5 @@ util/fluxbox-remote.cc
fluxbox_remote_CPPFLAGS = \ $(AM_CPPFLAGS) \ -I$(fbtk_incdir) -fluxbox_remote_LDFLAGS = \ +fluxbox_remote_LDADD = \ $(X11_LIBS)
M
util/fbrun/Makemodule.am
→
util/fbrun/Makemodule.am
@@ -10,13 +10,12 @@ util/fbrun/FbRun.cc \
util/fbrun/main.cc \ util/fbrun/fbrun.xpm -fbrun_LDADD = libFbTk.a - -fbrun_LDFLAGS = \ +fbrun_LDADD = libFbTk.a \ + $(FRIBIDI_LIBS) \ $(FONTCONFIG_LIBS) \ - $(FRIBIDI_LIBS) \ - $(X11_LIBS) \ + $(FREETYEP_LIBS) \ $(XFT_LIBS) \ $(XINERAMA_LIBS) \ $(XPM_LIBS) \ - $(XRENDER_LIBS) + $(XRENDER_LIBS) \ + $(X11_LIBS)