Fix order of -L options in autoconf makefiles

Put linker flags determined by configure after -L$(LIBDIRNAME) option
pointing to the directory containing the libraries being built, to
ensure that we link with these libraries rather than any wx libraries
globally installed in the system, as could be the case since the changes
of ec091c9f2b (Don't override CFLAGS etc in configure-generated
makefile, 2020-02-02).

See #18729.
This commit is contained in:
Vadim Zeitlin
2020-04-15 02:33:53 +02:00
parent 697bd07441
commit 47d881b683
114 changed files with 152 additions and 146 deletions

View File

@@ -427,7 +427,13 @@
<cppflags cond="FORMAT=='autoconf'">$(WX_CPPFLAGS)</cppflags>
<cflags cond="FORMAT=='autoconf'">$(WX_CFLAGS)</cflags>
<cxxflags cond="FORMAT=='autoconf'">$(WX_CXXFLAGS)</cxxflags>
<ldflags cond="FORMAT=='autoconf'">$(WX_LDFLAGS)</ldflags>
<!--
Surprisingly, WX_LDFLAGS doesn't go into ldflags, but into ldlibs,
because we need it to come after <lib-path> contents, which is
appended to ldflags, because we want to link with wx libraries in
the LIBDIRNAME and not any wx libraries installed system-wide.
-->
<ldlibs cond="FORMAT=='autoconf'">$(WX_LDFLAGS)</ldlibs>
<res-define>$(WIN32_DPI_MANIFEST)</res-define>
<ldflags>$(WIN32_DPI_LINKFLAG)</ldflags>
<if cond="FORMAT=='msvc'">