Don't include LDFLAGS in wx-config --libs
output.
Use a separate WXCONFIG_LDFLAGS variable for the flags which should be used when linking applications using wxWidgets and not wxWidgets itself. The only intentional effect this change is supposed to have right now is that -arch options added to LDFLAGS when building wx for multiple architectures under OS X are not used for building the applications any more. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
84cd6e0c68
commit
d4fbe1d85c
22
configure
vendored
22
configure
vendored
@ -1023,6 +1023,7 @@ WXCONFIG_CFLAGS
|
||||
WXCONFIG_CXXFLAGS
|
||||
WXCONFIG_LIBS
|
||||
WXCONFIG_RPATH
|
||||
WXCONFIG_LDFLAGS
|
||||
WXCONFIG_LDFLAGS_GUI
|
||||
WXCONFIG_RESFLAGS
|
||||
GUIDIST
|
||||
@ -39277,7 +39278,8 @@ echo "${ECHO_T}$THREADS_OK" >&6; }
|
||||
{ echo "$as_me:$LINENO: WARNING: No thread support on this system... disabled" >&5
|
||||
echo "$as_me: WARNING: No thread support on this system... disabled" >&2;}
|
||||
else
|
||||
LDFLAGS="$THREADS_CFLAGS $LDFLAGS"
|
||||
LDFLAGS="$THREADS_CFLAGS $LDFLAGS"
|
||||
WXCONFIG_LDFLAGS="$THREADS_CFLAGS $WXCONFIG_LDFLAGS"
|
||||
LIBS="$THREADS_LINK $LIBS"
|
||||
|
||||
{ echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
|
||||
@ -39286,6 +39288,7 @@ echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_
|
||||
case "${host}" in
|
||||
*-aix*)
|
||||
LDFLAGS="-L/usr/lib/threads $LDFLAGS"
|
||||
WXCONFIG_LDFLAGS="-L/usr/lib/threads $WXCONFIG_LDFLAGS"
|
||||
flag="-D_THREAD_SAFE"
|
||||
;;
|
||||
*-freebsd*)
|
||||
@ -47345,22 +47348,25 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
EXTRA_FRAMEWORKS=
|
||||
if test "$wxUSE_MAC" = 1 ; then
|
||||
if test "$USE_DARWIN" = 1; then
|
||||
LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime"
|
||||
EXTRA_FRAMEWORKS="-framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime"
|
||||
fi
|
||||
fi
|
||||
if test "$wxUSE_COCOA" = 1 ; then
|
||||
LDFLAGS="$LDFLAGS -framework IOKit -framework Cocoa"
|
||||
EXTRA_FRAMEWORKS="-framework IOKit -framework Cocoa"
|
||||
if test "$wxUSE_MEDIACTRL" = "yes"; then
|
||||
LDFLAGS="$LDFLAGS -framework QuickTime"
|
||||
EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework QuickTime"
|
||||
fi
|
||||
fi
|
||||
if test "$USE_DARWIN" = 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1 ; then
|
||||
LDFLAGS="$LDFLAGS -framework IOKit -framework CoreServices -framework System -framework ApplicationServices"
|
||||
EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework IOKit -framework CoreServices -framework System -framework ApplicationServices"
|
||||
fi
|
||||
|
||||
LDFLAGS="$LDFLAGS $EXTRA_FRAMEWORKS"
|
||||
WXCONFIG_LDFLAGS="$WXCONFIG_LDFLAGS $EXTRA_FRAMEWORKS"
|
||||
|
||||
LIBS="$ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $DL_LINK $LIBS"
|
||||
|
||||
if test "$wxUSE_GUI" = "yes"; then
|
||||
@ -51140,6 +51146,7 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
|
||||
@ -52598,6 +52605,7 @@ WXCONFIG_CFLAGS!$WXCONFIG_CFLAGS$ac_delim
|
||||
WXCONFIG_CXXFLAGS!$WXCONFIG_CXXFLAGS$ac_delim
|
||||
WXCONFIG_LIBS!$WXCONFIG_LIBS$ac_delim
|
||||
WXCONFIG_RPATH!$WXCONFIG_RPATH$ac_delim
|
||||
WXCONFIG_LDFLAGS!$WXCONFIG_LDFLAGS$ac_delim
|
||||
WXCONFIG_LDFLAGS_GUI!$WXCONFIG_LDFLAGS_GUI$ac_delim
|
||||
WXCONFIG_RESFLAGS!$WXCONFIG_RESFLAGS$ac_delim
|
||||
GUIDIST!$GUIDIST$ac_delim
|
||||
@ -52622,7 +52630,7 @@ LIBOBJS!$LIBOBJS$ac_delim
|
||||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 41; then
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 42; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
|
22
configure.in
22
configure.in
@ -4894,7 +4894,14 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
|
||||
else
|
||||
dnl yes, these special compiler flags should be used with the
|
||||
dnl linker as well
|
||||
dnl
|
||||
dnl NB: add them to LDFLAGS immediately because we need them to be
|
||||
dnl used for the subsequent tests some of which can fail without
|
||||
dnl MT support, hence the reason for the duplication below:
|
||||
dnl adding them just to WXCONFIG_LDFLAGS and adding the entire
|
||||
dnl contents of the latter to LDFLAGS in the end is not enough.
|
||||
LDFLAGS="$THREADS_CFLAGS $LDFLAGS"
|
||||
WXCONFIG_LDFLAGS="$THREADS_CFLAGS $WXCONFIG_LDFLAGS"
|
||||
LIBS="$THREADS_LINK $LIBS"
|
||||
|
||||
AC_MSG_CHECKING([if more special flags are required for pthreads])
|
||||
@ -4908,6 +4915,7 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
|
||||
dnl search path should include -L/usr/lib/threads at the
|
||||
dnl beginning of the path.
|
||||
LDFLAGS="-L/usr/lib/threads $LDFLAGS"
|
||||
WXCONFIG_LDFLAGS="-L/usr/lib/threads $WXCONFIG_LDFLAGS"
|
||||
flag="-D_THREAD_SAFE"
|
||||
;;
|
||||
*-freebsd*)
|
||||
@ -7461,22 +7469,25 @@ dnl Output the makefiles and such from the results found above
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl all additional libraries (except wxWidgets itself) we link with
|
||||
|
||||
EXTRA_FRAMEWORKS=
|
||||
if test "$wxUSE_MAC" = 1 ; then
|
||||
if test "$USE_DARWIN" = 1; then
|
||||
LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime"
|
||||
EXTRA_FRAMEWORKS="-framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime"
|
||||
fi
|
||||
fi
|
||||
if test "$wxUSE_COCOA" = 1 ; then
|
||||
LDFLAGS="$LDFLAGS -framework IOKit -framework Cocoa"
|
||||
EXTRA_FRAMEWORKS="-framework IOKit -framework Cocoa"
|
||||
if test "$wxUSE_MEDIACTRL" = "yes"; then
|
||||
LDFLAGS="$LDFLAGS -framework QuickTime"
|
||||
EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework QuickTime"
|
||||
fi
|
||||
fi
|
||||
if test "$USE_DARWIN" = 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1 ; then
|
||||
LDFLAGS="$LDFLAGS -framework IOKit -framework CoreServices -framework System -framework ApplicationServices"
|
||||
EXTRA_FRAMEWORKS="$EXTRA_FRAMEWORKS -framework IOKit -framework CoreServices -framework System -framework ApplicationServices"
|
||||
fi
|
||||
|
||||
LDFLAGS="$LDFLAGS $EXTRA_FRAMEWORKS"
|
||||
WXCONFIG_LDFLAGS="$WXCONFIG_LDFLAGS $EXTRA_FRAMEWORKS"
|
||||
|
||||
LIBS="$ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $DL_LINK $LIBS"
|
||||
|
||||
if test "$wxUSE_GUI" = "yes"; then
|
||||
@ -8048,6 +8059,7 @@ AC_SUBST(WXCONFIG_CXXFLAGS)
|
||||
|
||||
AC_SUBST(WXCONFIG_LIBS)
|
||||
AC_SUBST(WXCONFIG_RPATH)
|
||||
AC_SUBST(WXCONFIG_LDFLAGS)
|
||||
AC_SUBST(WXCONFIG_LDFLAGS_GUI)
|
||||
AC_SUBST(WXCONFIG_RESFLAGS)
|
||||
|
||||
|
@ -1265,7 +1265,7 @@ if [ -n "$output_option_libs" ]; then
|
||||
|
||||
is_installed || [ -n "$flag_option_no_rpath" ] || _rpath="@WXCONFIG_RPATH@"
|
||||
|
||||
echo $_ldflags "@LDFLAGS@" $_rpath $wx_libs "@DMALLOC_LIBS@"
|
||||
echo $_ldflags "@WXCONFIG_LDFLAGS@" $_rpath $wx_libs "@DMALLOC_LIBS@"
|
||||
|
||||
elif [ -n "$output_option_optional_libs" ]; then
|
||||
# if only --optional-libs then output just the libs
|
||||
|
Loading…
Reference in New Issue
Block a user