Correct order of 3rd party libraries in wx-config output

A recent change fixing monolithic build broke the normal build when
using built-in libraries under Unix as -lwxzlib now came before -lwxpng
and so zlib symbols used by libpng were not found (in fact, they could
still be found in the system library which is usually available under
Unix, so the problem wasn't seen immediately, but it was still there).

See https://github.com/wxWidgets/wxWidgets/pull/621
This commit is contained in:
Vadim Zeitlin
2017-12-08 02:36:12 +01:00
parent db00ab9c02
commit b0c4cb7131
2 changed files with 51 additions and 45 deletions

44
configure vendored
View File

@@ -35902,28 +35902,6 @@ LDFLAGS="$LDFLAGS $PROFILE_FLAGS"
WXCONFIG_LIBS="$LIBS"
if test "$wxUSE_REGEX" = "builtin" ; then
wxconfig_3rdparty="regex${lib_unicode_suffix} $wxconfig_3rdparty"
fi
if test "$wxUSE_STC" = "yes" ; then
wxconfig_3rdparty="scintilla $wxconfig_3rdparty"
fi
case "$wxUSE_EXPAT" in
builtin)
wxconfig_3rdparty="expat $wxconfig_3rdparty"
;;
sys)
WXCONFIG_LIBS="$EXPAT_LINK $WXCONFIG_LIBS"
;;
esac
case "$wxUSE_ZLIB" in
builtin)
wxconfig_3rdparty="zlib $wxconfig_3rdparty"
;;
sys)
WXCONFIG_LIBS="$ZLIB_LINK $WXCONFIG_LIBS"
;;
esac
if test "$wxUSE_GUI" = "yes"; then
case "$wxUSE_LIBTIFF" in
builtin)
@@ -35950,6 +35928,28 @@ if test "$wxUSE_GUI" = "yes"; then
;;
esac
fi
if test "$wxUSE_REGEX" = "builtin" ; then
wxconfig_3rdparty="regex${lib_unicode_suffix} $wxconfig_3rdparty"
fi
if test "$wxUSE_STC" = "yes" ; then
wxconfig_3rdparty="scintilla $wxconfig_3rdparty"
fi
case "$wxUSE_EXPAT" in
builtin)
wxconfig_3rdparty="expat $wxconfig_3rdparty"
;;
sys)
WXCONFIG_LIBS="$EXPAT_LINK $WXCONFIG_LIBS"
;;
esac
case "$wxUSE_ZLIB" in
builtin)
wxconfig_3rdparty="zlib $wxconfig_3rdparty"
;;
sys)
WXCONFIG_LIBS="$ZLIB_LINK $WXCONFIG_LIBS"
;;
esac
for i in $wxconfig_3rdparty ; do
WXCONFIG_LIBS="-lwx${i}${WX_LIB_FLAVOUR}-${WX_RELEASE}${HOST_SUFFIX} $WXCONFIG_LIBS"

View File

@@ -7827,29 +7827,13 @@ LDFLAGS="$LDFLAGS $PROFILE_FLAGS"
WXCONFIG_LIBS="$LIBS"
dnl wx-config must output 3rd party libs in --libs in static build:
if test "$wxUSE_REGEX" = "builtin" ; then
wxconfig_3rdparty="regex${lib_unicode_suffix} $wxconfig_3rdparty"
fi
if test "$wxUSE_STC" = "yes" ; then
wxconfig_3rdparty="scintilla $wxconfig_3rdparty"
fi
case "$wxUSE_EXPAT" in
builtin)
wxconfig_3rdparty="expat $wxconfig_3rdparty"
;;
sys)
WXCONFIG_LIBS="$EXPAT_LINK $WXCONFIG_LIBS"
;;
esac
case "$wxUSE_ZLIB" in
builtin)
wxconfig_3rdparty="zlib $wxconfig_3rdparty"
;;
sys)
WXCONFIG_LIBS="$ZLIB_LINK $WXCONFIG_LIBS"
;;
esac
dnl wx-config must output 3rd party libs in --libs in static build, so collect
dnl them in wxconfig_3rdparty variable
dnl
dnl Notice that the libraries must be listed in correct order whenever there
dnl are dependencies between them for linking to work when using static
dnl libraries, e.g. jpeg, used by tiff, must come after it and zlib, used by
dnl png, must come after it as well.
if test "$wxUSE_GUI" = "yes"; then
case "$wxUSE_LIBTIFF" in
builtin)
@@ -7876,6 +7860,28 @@ if test "$wxUSE_GUI" = "yes"; then
;;
esac
fi
if test "$wxUSE_REGEX" = "builtin" ; then
wxconfig_3rdparty="regex${lib_unicode_suffix} $wxconfig_3rdparty"
fi
if test "$wxUSE_STC" = "yes" ; then
wxconfig_3rdparty="scintilla $wxconfig_3rdparty"
fi
case "$wxUSE_EXPAT" in
builtin)
wxconfig_3rdparty="expat $wxconfig_3rdparty"
;;
sys)
WXCONFIG_LIBS="$EXPAT_LINK $WXCONFIG_LIBS"
;;
esac
case "$wxUSE_ZLIB" in
builtin)
wxconfig_3rdparty="zlib $wxconfig_3rdparty"
;;
sys)
WXCONFIG_LIBS="$ZLIB_LINK $WXCONFIG_LIBS"
;;
esac
for i in $wxconfig_3rdparty ; do
WXCONFIG_LIBS="-lwx${i}${WX_LIB_FLAVOUR}-${WX_RELEASE}${HOST_SUFFIX} $WXCONFIG_LIBS"