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:
44
configure
vendored
44
configure
vendored
@@ -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"
|
||||
|
52
configure.in
52
configure.in
@@ -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"
|
||||
|
Reference in New Issue
Block a user