- configure check for XPM support added
- x.cc uses the old monochrome icon if there's no XPM support present
This commit is contained in:
parent
58efdfb31f
commit
dd46d0ec71
@ -99,7 +99,8 @@ LIBS = @LIBS@
|
|||||||
# solaris needs -lreadline -lcurses
|
# solaris needs -lreadline -lcurses
|
||||||
X_LIBS = @X_LIBS@
|
X_LIBS = @X_LIBS@
|
||||||
X_PRE_LIBS = @X_PRE_LIBS@
|
X_PRE_LIBS = @X_PRE_LIBS@
|
||||||
GUI_LINK_OPTS_X = $(X_LIBS) $(X_PRE_LIBS) -lX11 -lXpm
|
XPM_LIB = @XPM_LIB@
|
||||||
|
GUI_LINK_OPTS_X = $(X_LIBS) $(X_PRE_LIBS) -lX11 $(XPM_LIB)
|
||||||
GUI_LINK_OPTS_SDL = `sdl-config --cflags --libs`
|
GUI_LINK_OPTS_SDL = `sdl-config --cflags --libs`
|
||||||
GUI_LINK_OPTS_SVGA = -lvga -lvgagl
|
GUI_LINK_OPTS_SVGA = -lvga -lvgagl
|
||||||
GUI_LINK_OPTS_BEOS = -lbe
|
GUI_LINK_OPTS_BEOS = -lbe
|
||||||
@ -242,7 +243,7 @@ $(BX_OBJS): $(BX_INCLUDES)
|
|||||||
bxversion.h:
|
bxversion.h:
|
||||||
$(RM) -f bxversion.h
|
$(RM) -f bxversion.h
|
||||||
echo '/////////////////////////////////////////////////////////////////////////' > bxversion.h
|
echo '/////////////////////////////////////////////////////////////////////////' > bxversion.h
|
||||||
echo '// $$Id: Makefile.in,v 1.152 2003-06-06 19:57:17 vruppert Exp $$' >> bxversion.h
|
echo '// $$Id: Makefile.in,v 1.153 2003-06-13 16:04:49 vruppert Exp $$' >> bxversion.h
|
||||||
echo '/////////////////////////////////////////////////////////////////////////' >> bxversion.h
|
echo '/////////////////////////////////////////////////////////////////////////' >> bxversion.h
|
||||||
echo '// This file is generated by "make bxversion.h"' >> bxversion.h
|
echo '// This file is generated by "make bxversion.h"' >> bxversion.h
|
||||||
echo "#define VER_STRING \"$(VER_STRING)\"" >> bxversion.h
|
echo "#define VER_STRING \"$(VER_STRING)\"" >> bxversion.h
|
||||||
|
@ -202,6 +202,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#define BX_HAVE_MKSTEMP 0
|
#define BX_HAVE_MKSTEMP 0
|
||||||
#define BX_HAVE_SYS_MMAN_H 0
|
#define BX_HAVE_SYS_MMAN_H 0
|
||||||
|
#define BX_HAVE_XPM_H 0
|
||||||
|
|
||||||
// This turns on Roland Mainz's idle hack. Presently it is specific to the X11
|
// This turns on Roland Mainz's idle hack. Presently it is specific to the X11
|
||||||
// gui. If people try to enable it elsewhere, give a compile error after the
|
// gui. If people try to enable it elsewhere, give a compile error after the
|
||||||
|
117
bochs/configure
vendored
117
bochs/configure
vendored
@ -1,5 +1,5 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.in Id: configure.in,v 1.213 2003/05/30 08:57:25 sshwarts Exp .
|
# From configure.in Id: configure.in,v 1.214 2003/06/06 19:57:25 vruppert Exp .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.53.
|
# Generated by GNU Autoconf 2.53.
|
||||||
#
|
#
|
||||||
@ -21873,6 +21873,7 @@ display_libs=""
|
|||||||
# indicate the platform. Settings that depend on the platform should be
|
# indicate the platform. Settings that depend on the platform should be
|
||||||
# handled later.
|
# handled later.
|
||||||
|
|
||||||
|
XPM_LIB=''
|
||||||
if test "$with_x11" = yes; then
|
if test "$with_x11" = yes; then
|
||||||
display_libs="$display_libs X11"
|
display_libs="$display_libs X11"
|
||||||
if test "$no_x" = yes; then
|
if test "$no_x" = yes; then
|
||||||
@ -21887,7 +21888,120 @@ _ACEOF
|
|||||||
GUI_CFLAGS="$GUI_CFLAGS \$(X_CFLAGS)"
|
GUI_CFLAGS="$GUI_CFLAGS \$(X_CFLAGS)"
|
||||||
GUI_CXXFLAGS="$GUI_CXXFLAGS \$(X_CFLAGS)"
|
GUI_CXXFLAGS="$GUI_CXXFLAGS \$(X_CFLAGS)"
|
||||||
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_X)"
|
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_X)"
|
||||||
|
if test "${ac_cv_header_X11_xpm_h+set}" = set; then
|
||||||
|
echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
|
||||||
|
echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_header_X11_xpm_h+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
fi
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
|
||||||
|
echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
|
||||||
|
else
|
||||||
|
# Is the header compilable?
|
||||||
|
echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
|
||||||
|
echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
#line $LINENO "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
$ac_includes_default
|
||||||
|
#include <X11/xpm.h>
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||||
|
(eval $ac_compile) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -s conftest.$ac_objext'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
ac_header_compiler=yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
ac_header_compiler=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.$ac_objext conftest.$ac_ext
|
||||||
|
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
|
||||||
|
echo "${ECHO_T}$ac_header_compiler" >&6
|
||||||
|
|
||||||
|
# Is the header present?
|
||||||
|
echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
|
||||||
|
echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
#line $LINENO "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
#include <X11/xpm.h>
|
||||||
|
_ACEOF
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||||||
|
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||||||
|
ac_status=$?
|
||||||
|
egrep -v '^ *\+' conftest.er1 >conftest.err
|
||||||
|
rm -f conftest.er1
|
||||||
|
cat conftest.err >&5
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } >/dev/null; then
|
||||||
|
if test -s conftest.err; then
|
||||||
|
ac_cpp_err=$ac_c_preproc_warn_flag
|
||||||
|
else
|
||||||
|
ac_cpp_err=
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ac_cpp_err=yes
|
||||||
|
fi
|
||||||
|
if test -z "$ac_cpp_err"; then
|
||||||
|
ac_header_preproc=yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
ac_header_preproc=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.err conftest.$ac_ext
|
||||||
|
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
|
||||||
|
echo "${ECHO_T}$ac_header_preproc" >&6
|
||||||
|
|
||||||
|
# So? What about this header?
|
||||||
|
case $ac_header_compiler:$ac_header_preproc in
|
||||||
|
yes:no )
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||||
|
echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
|
||||||
|
echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;};;
|
||||||
|
no:yes )
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
|
||||||
|
echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
|
||||||
|
echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
|
||||||
|
echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;};;
|
||||||
|
esac
|
||||||
|
echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
|
||||||
|
echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_header_X11_xpm_h+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
ac_cv_header_X11_xpm_h=$ac_header_preproc
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
|
||||||
|
echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
|
||||||
|
|
||||||
|
fi
|
||||||
|
if test $ac_cv_header_X11_xpm_h = yes; then
|
||||||
|
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
|
#define BX_HAVE_XPM_H 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
XPM_LIB='-lXpm'
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test "$with_beos" = yes; then
|
if test "$with_beos" = yes; then
|
||||||
display_libs="$display_libs beos"
|
display_libs="$display_libs beos"
|
||||||
@ -24088,6 +24202,7 @@ s,@EXTERNAL_DEPENDENCY@,$EXTERNAL_DEPENDENCY,;t t
|
|||||||
s,@EXT_DEBUG_OBJS@,$EXT_DEBUG_OBJS,;t t
|
s,@EXT_DEBUG_OBJS@,$EXT_DEBUG_OBJS,;t t
|
||||||
s,@RC_CMD@,$RC_CMD,;t t
|
s,@RC_CMD@,$RC_CMD,;t t
|
||||||
s,@WX_CONFIG@,$WX_CONFIG,;t t
|
s,@WX_CONFIG@,$WX_CONFIG,;t t
|
||||||
|
s,@XPM_LIB@,$XPM_LIB,;t t
|
||||||
s,@GUI_CFLAGS@,$GUI_CFLAGS,;t t
|
s,@GUI_CFLAGS@,$GUI_CFLAGS,;t t
|
||||||
s,@GUI_CXXFLAGS@,$GUI_CXXFLAGS,;t t
|
s,@GUI_CXXFLAGS@,$GUI_CXXFLAGS,;t t
|
||||||
s,@WX_CFLAGS@,$WX_CFLAGS,;t t
|
s,@WX_CFLAGS@,$WX_CFLAGS,;t t
|
||||||
|
@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script.
|
|||||||
|
|
||||||
AC_PREREQ(2.50)
|
AC_PREREQ(2.50)
|
||||||
AC_INIT(bochs.h)
|
AC_INIT(bochs.h)
|
||||||
AC_REVISION([[$Id: configure.in,v 1.214 2003-06-06 19:57:25 vruppert Exp $]])
|
AC_REVISION([[$Id: configure.in,v 1.215 2003-06-13 16:05:01 vruppert Exp $]])
|
||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADER(config.h)
|
||||||
AC_CONFIG_HEADER(ltdlconf.h)
|
AC_CONFIG_HEADER(ltdlconf.h)
|
||||||
|
|
||||||
@ -1826,6 +1826,7 @@ display_libs=""
|
|||||||
# indicate the platform. Settings that depend on the platform should be
|
# indicate the platform. Settings that depend on the platform should be
|
||||||
# handled later.
|
# handled later.
|
||||||
|
|
||||||
|
XPM_LIB=''
|
||||||
if test "$with_x11" = yes; then
|
if test "$with_x11" = yes; then
|
||||||
display_libs="$display_libs X11"
|
display_libs="$display_libs X11"
|
||||||
if test "$no_x" = yes; then
|
if test "$no_x" = yes; then
|
||||||
@ -1837,7 +1838,12 @@ if test "$with_x11" = yes; then
|
|||||||
GUI_CFLAGS="$GUI_CFLAGS \$(X_CFLAGS)"
|
GUI_CFLAGS="$GUI_CFLAGS \$(X_CFLAGS)"
|
||||||
GUI_CXXFLAGS="$GUI_CXXFLAGS \$(X_CFLAGS)"
|
GUI_CXXFLAGS="$GUI_CXXFLAGS \$(X_CFLAGS)"
|
||||||
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_X)"
|
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_X)"
|
||||||
|
AC_CHECK_HEADER(X11/xpm.h, [
|
||||||
|
AC_DEFINE(BX_HAVE_XPM_H)
|
||||||
|
XPM_LIB='-lXpm'
|
||||||
|
])
|
||||||
fi
|
fi
|
||||||
|
AC_SUBST(XPM_LIB)
|
||||||
|
|
||||||
if test "$with_beos" = yes; then
|
if test "$with_beos" = yes; then
|
||||||
display_libs="$display_libs beos"
|
display_libs="$display_libs beos"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// $Id: x.cc,v 1.68 2003-06-11 18:44:45 vruppert Exp $
|
// $Id: x.cc,v 1.69 2003-06-13 16:05:03 vruppert Exp $
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||||
@ -41,11 +41,16 @@ extern "C" {
|
|||||||
#include <X11/Xos.h>
|
#include <X11/Xos.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
|
#ifdef BX_HAVE_XPM_H
|
||||||
#include <X11/xpm.h>
|
#include <X11/xpm.h>
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//#include "icon_bochs.h"
|
#ifdef BX_HAVE_XPM_H
|
||||||
#include "icon_bochs.xpm"
|
#include "icon_bochs.xpm"
|
||||||
|
#else
|
||||||
|
#include "icon_bochs.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "font/vga.bitmap.h"
|
#include "font/vga.bitmap.h"
|
||||||
|
|
||||||
@ -337,7 +342,10 @@ bx_x_gui_c::specific_init(int argc, char **argv, unsigned tilewidth, unsigned ti
|
|||||||
char *window_name = "Bochs Pentium emulator, http://bochs.sourceforge.net/";
|
char *window_name = "Bochs Pentium emulator, http://bochs.sourceforge.net/";
|
||||||
#endif
|
#endif
|
||||||
char *icon_name = "Bochs";
|
char *icon_name = "Bochs";
|
||||||
Pixmap icon_pixmap, icon_mask;
|
Pixmap icon_pixmap;
|
||||||
|
#ifdef BX_HAVE_XPM_H
|
||||||
|
Pixmap icon_mask;
|
||||||
|
#endif
|
||||||
XSizeHints size_hints;
|
XSizeHints size_hints;
|
||||||
char *display_name = NULL;
|
char *display_name = NULL;
|
||||||
/* create GC for text and drawing */
|
/* create GC for text and drawing */
|
||||||
@ -457,11 +465,14 @@ bx_x_gui_c::specific_init(int argc, char **argv, unsigned tilewidth, unsigned ti
|
|||||||
|
|
||||||
/* Get available icon sizes from Window manager */
|
/* Get available icon sizes from Window manager */
|
||||||
|
|
||||||
/* Create pixmap of depth 1 (bitmap) for icon */
|
#ifdef BX_HAVE_XPM_H
|
||||||
/* icon_pixmap = XCreateBitmapFromData(bx_x_display, win,
|
|
||||||
(char *) bochs_icon_bits, bochs_icon_width, bochs_icon_height);*/
|
|
||||||
/* Create pixmap from XPM for icon */
|
/* Create pixmap from XPM for icon */
|
||||||
XCreatePixmapFromData(bx_x_display, win, icon_bochs_xpm, &icon_pixmap, &icon_mask, NULL);
|
XCreatePixmapFromData(bx_x_display, win, icon_bochs_xpm, &icon_pixmap, &icon_mask, NULL);
|
||||||
|
#else
|
||||||
|
/* Create pixmap of depth 1 (bitmap) for icon */
|
||||||
|
icon_pixmap = XCreateBitmapFromData(bx_x_display, win,
|
||||||
|
(char *) bochs_icon_bits, bochs_icon_width, bochs_icon_height);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Set size hints for window manager. The window manager may
|
/* Set size hints for window manager. The window manager may
|
||||||
* override these settings. Note that in a real
|
* override these settings. Note that in a real
|
||||||
@ -500,9 +511,12 @@ bx_x_gui_c::specific_init(int argc, char **argv, unsigned tilewidth, unsigned ti
|
|||||||
wm_hints.initial_state = NormalState;
|
wm_hints.initial_state = NormalState;
|
||||||
wm_hints.input = True;
|
wm_hints.input = True;
|
||||||
wm_hints.icon_pixmap = icon_pixmap;
|
wm_hints.icon_pixmap = icon_pixmap;
|
||||||
|
#ifdef BX_HAVE_XPM_H
|
||||||
wm_hints.icon_mask = icon_mask;
|
wm_hints.icon_mask = icon_mask;
|
||||||
wm_hints.flags = StateHint | IconPixmapHint | IconMaskHint | InputHint;
|
wm_hints.flags = StateHint | IconPixmapHint | IconMaskHint | InputHint;
|
||||||
|
#else
|
||||||
|
wm_hints.flags = StateHint | IconPixmapHint | InputHint;
|
||||||
|
#endif
|
||||||
class_hints.res_name = progname;
|
class_hints.res_name = progname;
|
||||||
class_hints.res_class = "Bochs";
|
class_hints.res_class = "Bochs";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user