- link only needed libs (modified Debian patch by Guillem Jover)

This commit is contained in:
Volker Ruppert 2012-06-30 12:43:55 +00:00
parent 523ea27b4f
commit 2c94cbb688
3 changed files with 25 additions and 20 deletions

View File

@ -94,9 +94,8 @@ LIBS = @LIBS@
# linux needs just -lreadline
# solaris needs -lreadline -lcurses
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
XPM_LIB = @XPM_LIB@
GUI_LINK_OPTS_X = $(X_LIBS) $(X_PRE_LIBS) -lX11 $(XPM_LIB) -lXrandr
GUI_LINK_OPTS_X = $(X_LIBS)
GUI_LINK_OPTS_SDL = `sdl-config --cflags --libs`
GUI_LINK_OPTS_SVGA = -lvga -lvgagl
GUI_LINK_OPTS_RFB = @RFB_LIBS@

View File

@ -131,8 +131,6 @@ if test "$MSVC_TARGET" != 1; then
AC_LIB_LTDL
fi
AC_PATH_XTRA
AC_C_BIGENDIAN
AC_C_INLINE
AC_CHECK_SIZEOF(unsigned char)
@ -1972,7 +1970,7 @@ AC_MSG_RESULT($WX_CONFIG)
ok_wx_version=0
wx_multi_lib=0
needs_gtk2=0
wx_needs_gtk2=0
wx_needs_gdk2=0
AC_MSG_CHECKING(for wxWidgets library version)
if test x$WX_CONFIG != xnot_found; then
WX_VERSION=`$WX_CONFIG --version`
@ -1988,7 +1986,7 @@ if test x$WX_CONFIG != xnot_found; then
ok_wx_version=1
wx_multi_lib=1
case x$WX_BASENAME in
xwx_gtk2|xwx_gtk2u) wx_needs_gtk2=1 ;;
xwx_gtk2|xwx_gtk2u) wx_needs_gdk2=1 ;;
*) ;;
esac
;;
@ -2004,9 +2002,6 @@ if test "$cross_configure" = 0; then
if test "$with_all_libs" = yes; then
with_wx=yes
fi
if test "$with_wx" = yes; then
needs_gtk2=$wx_needs_gtk2
fi
else
if test "$with_wx" = yes; then
AC_MSG_WARN([Bochs for wxWidgets cannot be compiled here, disabling it])
@ -2031,15 +2026,7 @@ if test "$with_x11" = yes; then
echo ERROR: X windows gui was selected, but X windows libraries were not found.
exit 1
fi
AC_DEFINE(BX_WITH_X11, 1)
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_X11)"
GUI_CFLAGS="$GUI_CFLAGS \$(X_CFLAGS)"
GUI_CXXFLAGS="$GUI_CXXFLAGS \$(X_CFLAGS)"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_X)"
# The enhanced X debugger depends on GTK2
if test "$gui_debugger" = 1; then
needs_gtk2=1
fi
check_xpm=0
AC_MSG_CHECKING(whether user wants XPM support)
AC_ARG_ENABLE(xpm,
@ -2063,8 +2050,23 @@ if test "$with_x11" = yes; then
XPM_LIB='-lXpm'
])
fi
X_CFLAGS="`pkg-config --cflags x11`"
X_LIBS="`pkg-config --libs x11` \$(XPM_LIB) -lXrandr"
AC_DEFINE(BX_WITH_X11, 1)
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_X11)"
GUI_CFLAGS="$GUI_CFLAGS \$(X_CFLAGS)"
GUI_CXXFLAGS="$GUI_CXXFLAGS \$(X_CFLAGS)"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_X)"
# The enhanced X debugger depends on GTK2
if test "$gui_debugger" = 1; then
needs_gtk2=1
fi
fi
AC_SUBST(XPM_LIB)
AC_SUBST(X_CFLAGS)
AC_SUBST(X_LIBS)
if test "$with_sdl" = yes; then
display_libs="$display_libs sdl"
@ -2187,6 +2189,11 @@ if test "$with_wx" = yes; then
SPECIFIC_GUI_SUPPORT_OBJS="$SPECIFIC_GUI_SUPPORT_OBJS \$(GUI_OBJS_WX_SUPPORT)"
WX_CFLAGS="`$WX_CONFIG --cflags`"
WX_CXXFLAGS="`$WX_CONFIG --cxxflags`"
if test "$wx_needs_gdk2" = 1; then
GDK_CFLAGS="`pkg-config --cflags gdk-2.0`"
WX_CFLAGS="$WX_CFLAGS $GDK_CFLAGS"
WX_CXXFLAGS="$WX_CXXFLAGS $GDK_CFLAGS"
fi
if test "$wx_multi_lib" = 1; then
GUI_LINK_OPTS_WX="`$WX_CONFIG --libs core,base`"
else

View File

@ -67,9 +67,8 @@ OBJS_THAT_CANNOT_BE_PLUGINS = keymap.o gui.o siminterface.o paramtree.o textconf
OBJS_THAT_CAN_BE_PLUGINS = @GUI_OBJS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
XPM_LIB = @XPM_LIB@
GUI_LINK_OPTS_X = $(X_LIBS) $(X_PRE_LIBS) -lX11 $(XPM_LIB) -lXrandr
GUI_LINK_OPTS_X = $(X_LIBS)
GUI_LINK_OPTS_SDL = `sdl-config --cflags --libs`
GUI_LINK_OPTS_SVGA = -lvga -lvgagl
GUI_LINK_OPTS_RFB = @RFB_LIBS@