made --cppflags return -DwxUSE_GUI=0 when used with --libs=base

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-07-12 23:29:57 +00:00
parent f0ab09ccd0
commit a43ed08aa8

View File

@@ -15,6 +15,7 @@ cross_compiling="@cross_compiling@"
target="@host_alias@" target="@host_alias@"
static_flag="@STATIC_FLAG@" static_flag="@STATIC_FLAG@"
inplace_flag="no" inplace_flag="no"
nogui_flag="no"
# Misc configuration variables: # Misc configuration variables:
@@ -188,7 +189,7 @@ Note that any other options supplied must come *after* the prefix
specification for it to take effect. specification for it to take effect.
--static must come before --cppflags, --cflags, --cxxflags, --static must come before --cppflags, --cflags, --cxxflags,
--libs and --gl-libs. --libs and --gl-libs and --libs must come before the other ones.
--libs can take optional argument that contains comma-separated list of --libs can take optional argument that contains comma-separated list of
wxWidgets libraries to link against. This list can include both core wxWidgets libraries to link against. This list can include both core
@@ -245,11 +246,16 @@ cppflags()
includes="$includes -I${prefix}/contrib/include" includes="$includes -I${prefix}/contrib/include"
fi fi
if test $static_flag = yes ; then flags="$includes ${WXDEBUG_DEFINE} ${TOOLCHAIN_DEFS}"
echo $includes ${WXDEBUG_DEFINE} ${TOOLCHAIN_DEFS} ${WXCONFIG_INCLUDE} ${WX_LARGEFILE_FLAGS} ${GCC_PRAGMA_FLAGS} if test $static_flag != yes ; then
else flags="$flags ${TOOLCHAIN_DLL_DEFS}"
echo $includes ${WXDEBUG_DEFINE} ${TOOLCHAIN_DEFS} ${TOOLCHAIN_DLL_DEFS} ${WXCONFIG_INCLUDE} ${WX_LARGEFILE_FLAGS} ${GCC_PRAGMA_FLAGS}
fi fi
if [ $nogui_flag = "yes" ]; then
flags="$flags-DwxUSE_GUI=0"
fi
echo "$flags${WXCONFIG_INCLUDE} ${WX_LARGEFILE_FLAGS} ${GCC_PRAGMA_FLAGS}"
} }
if test $# -eq 0; then if test $# -eq 0; then
@@ -337,7 +343,7 @@ while test $# -gt 0; do
libs="-L${libdir}" libs="-L${libdir}"
fi fi
# it's simpler to avoid handling "bae" itself at all as we add it in the # it's simpler to avoid handling "base" itself at all as we add it in the
# end to the list of libraries anyhow # end to the list of libraries anyhow
# in monolithic build, link against the main library: # in monolithic build, link against the main library:
if test "$is_monolithic" = "1" ; then if test "$is_monolithic" = "1" ; then
@@ -363,9 +369,11 @@ while test $# -gt 0; do
# we may need to replace "std" alias with its expansion # we may need to replace "std" alias with its expansion
newlist= newlist=
hadstd=0 hadstd=0
hadgui=0
for i in $libs_list; do for i in $libs_list; do
case $i in case $i in
std) std)
hadgui=1
hadstd=1 hadstd=1
;; ;;
@@ -373,11 +381,16 @@ while test $# -gt 0; do
# if we have std, we're going to add base anyhow, avoid # if we have std, we're going to add base anyhow, avoid
# having it twice in the end # having it twice in the end
if [ $hadstd = 0 ]; then if [ $hadstd = 0 ]; then
newlist="$newlist $i"; newlist="$newlist $i"
fi fi
;; ;;
net)
newlist="$newlist $i"
;;
*) *)
hadgui=1
newlist="$newlist $i" newlist="$newlist $i"
;; ;;
esac esac
@@ -387,6 +400,10 @@ while test $# -gt 0; do
libs_list="$libs_list $CORE_GUI_LIBS $CORE_BASE_LIBS" libs_list="$libs_list $CORE_GUI_LIBS $CORE_BASE_LIBS"
fi fi
if [ $hadgui = 0 ]; then
nogui_flag="yes"
fi
# in multilib mode, link against all sublibraries: # in multilib mode, link against all sublibraries:
wxlibs=`output_libs $libs_list` wxlibs=`output_libs $libs_list`
guildflags=`get_ldflags_gui $libs_list` guildflags=`get_ldflags_gui $libs_list`