[Vm-dev] [commit] r2591 - Eliminate some warnings from Mac graphics
from Nicholas Cellier (thanks!).
commits at squeakvm.org
commits at squeakvm.org
Wed Sep 12 21:59:25 UTC 2012
Author: eliot
Date: 2012-09-12 14:59:25 -0700 (Wed, 12 Sep 2012)
New Revision: 2591
Modified:
branches/Cog/platforms/Mac OS/vm/sqMacUIClipBoard.c
branches/Cog/platforms/Mac OS/vm/sqMacUIEventsUniversal.c
branches/Cog/platforms/unix/config/configure
branches/Cog/platforms/unix/config/configure.ac
branches/Cog/platforms/unix/vm-display-Quartz/acinclude.m4
branches/Cog/platforms/unix/vm-display-X11/acinclude.m4
branches/Cog/platforms/unix/vm-display-fbdev/acinclude.m4
branches/Cog/platforms/unix/vm-sound-OSS/acinclude.m4
branches/Cog/platforms/unix/vm-sound-null/acinclude.m4
Log:
Eliminate some warnings from Mac graphics from Nicholas Cellier (thanks!).
Fix unix configure for --without-gl, and put AC_ARG_WITH code for fbdev & sound-
OSS in the right place.
Modified: branches/Cog/platforms/Mac OS/vm/sqMacUIClipBoard.c
===================================================================
--- branches/Cog/platforms/Mac OS/vm/sqMacUIClipBoard.c 2012-08-24 21:48:53 UTC (rev 2590)
+++ branches/Cog/platforms/Mac OS/vm/sqMacUIClipBoard.c 2012-09-12 21:59:25 UTC (rev 2591)
@@ -88,7 +88,7 @@
data = CFDataCreateWithBytesNoCopy (kCFAllocatorDefault, bytes, needed, kCFAllocatorMalloc);
err = PasteboardPutItemFlavor (pb, (PasteboardItemID)1, kUTTypeUTF16PlainText, data, 0);
CFRelease (str);
- return (err = 0);
+ return 0;
} else {
free (bytes);
}
Modified: branches/Cog/platforms/Mac OS/vm/sqMacUIEventsUniversal.c
===================================================================
--- branches/Cog/platforms/Mac OS/vm/sqMacUIEventsUniversal.c 2012-08-24 21:48:53 UTC (rev 2590)
+++ branches/Cog/platforms/Mac OS/vm/sqMacUIEventsUniversal.c 2012-09-12 21:59:25 UTC (rev 2591)
@@ -875,7 +875,7 @@
case kEventRawKeyUp: {
UniChar key;
//fprintf(stdout,"\nrawkey up %i",ioMSecs()); fflush(stdout);
- if ((key = findInKeyMap(keyCode)) != -1)
+ if ((key = findInKeyMap(keyCode)) != (UniChar)-1)
enterKeystroke(EventTypeKeyboard, keyCode, EventKeyUp,
key, ModifierStateCarbon(event));
removeFromKeyMap(keyCode);
Modified: branches/Cog/platforms/unix/config/configure
===================================================================
--- branches/Cog/platforms/unix/config/configure 2012-08-24 21:48:53 UTC (rev 2590)
+++ branches/Cog/platforms/unix/config/configure 2012-09-12 21:59:25 UTC (rev 2591)
@@ -1049,13 +1049,13 @@
--without-rfb disable Remote FrameBuffer support default=enabled
--without-npsqueak disable browser plugin support default=enabled
--with-custom-display enable custom window support default=disabled
+ --without-vm-display-fbdev disable frame buffer vm display support default=enabled
--without-quartz disable MacOSX Window System support default=enabled
--without-x disable X Window System support default=enabled
--without-gl disable OpenGL support default=enabled
--with-x use the X Window System
--with-custom-sound enable custom sound support default=disabled
--without-vm-sound-OSS disable OSS vm sound support default=enabled
- --without-vm-display-fbdev disable frame buffer vm display support default=enabled
Some influential environment variables:
CC C compiler command
@@ -24844,6 +24844,20 @@
# -*- sh -*-
+# Check whether --with-vm-display-fbdev or --without-vm-display-fbdev was given.
+if test "${with_vm_display_fbdev+set}" = set; then
+ withval="$with_vm_display_fbdev"
+ with_vm_display_fbdev="$withval"
+else
+ with_vm_display_fbdev="yes"
+fi;
+if test "$with_vm_display_fbdev" = "no"; then
+
+ echo "$as_me:$LINENO: result: ******** disabling vm-display-fbdev" >&5
+echo "${ECHO_T}******** disabling vm-display-fbdev" >&6
+ disabled_plugins="${disabled_plugins} vm-display-fbdev";
+else
+
for ac_header in linux/fb.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -24999,6 +25013,7 @@
done
+fi
if test "${plibs}"; then
llibs="${LIBS}"
for l in ${plibs}; do
@@ -25031,6 +25046,7 @@
_ACEOF
if test "$have_gl" = ""; then have_gl="no"; fi
+ if test "$have_gl" = "yes"; then
for ac_header in OpenGL/gl.h
do
@@ -25177,8 +25193,8 @@
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- have_gl=yes
- cat >>confdefs.h <<\_ACEOF
+ have_gl=yes
+ cat >>confdefs.h <<\_ACEOF
#define USE_QUARTZ_CGL 1
_ACEOF
@@ -25187,6 +25203,12 @@
done
+ else
+ cat >>confdefs.h <<\_ACEOF
+#define USE_QUARTZ_CGL 0
+_ACEOF
+
+ fi
else
@@ -26779,6 +26801,7 @@
fi
if test "$have_gl" = ""; then have_gl="no"; fi
+ if test "$have_gl" = "yes"; then
for ac_header in GL/gl.h
do
@@ -26925,8 +26948,8 @@
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- have_gl=yes
- cat >>confdefs.h <<\_ACEOF
+ have_gl=yes
+ cat >>confdefs.h <<\_ACEOF
#define USE_X11_GLX 1
_ACEOF
@@ -27009,7 +27032,13 @@
done
+ else
+ cat >>confdefs.h <<\_ACEOF
+#define USE_X11_GLX 0
+_ACEOF
+ fi
+
else
@@ -27301,6 +27330,15 @@
rm -f vm-sound-null.sub vm-sound-null.lib
# -*- sh -*-
# empty to provoke config/mkacinc into including vm-sound-null for consideration
+
+#AC_ARG_WITH(vm-sound-null,
+#[ --without-vm-sound-null disable null vm sound support [default=enabled]],
+# [with_vm_sound_null="$withval"],
+# [with_vm_sound_null="yes"])
+#if test "$with_vm_sound_null" = "no"; then
+# AC_PLUGIN_DISABLE_PLUGIN(vm-sound-null);
+#fi
+
if test "${plibs}"; then
llibs="${LIBS}"
for l in ${plibs}; do
@@ -27313,7 +27351,21 @@
rm -f vm-sound-OSS.sub vm-sound-OSS.lib
# -*- sh -*-
-if test "$with_vm_sound_OSS"="yes"; then
+
+# Check whether --with-vm-sound-OSS or --without-vm-sound-OSS was given.
+if test "${with_vm_sound_OSS+set}" = set; then
+ withval="$with_vm_sound_OSS"
+ with_vm_sound_OSS="$withval"
+else
+ with_vm_sound_OSS="yes"
+fi;
+
+if test "$with_vm_sound_OSS" = "no"; then
+
+ echo "$as_me:$LINENO: result: ******** disabling vm-sound-OSS" >&5
+echo "${ECHO_T}******** disabling vm-sound-OSS" >&6
+ disabled_plugins="${disabled_plugins} vm-sound-OSS";
+else
echo "$as_me:$LINENO: checking for Open Sound System" >&5
echo $ECHO_N "checking for Open Sound System... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
@@ -28386,54 +28438,12 @@
fi
-#AC_ARG_WITH(vm-sound-null,
-#[ --without-vm-sound-null disable null vm sound support [default=enabled]],
-# [with_vm_sound_null="$withval"],
-# [with_vm_sound_null="yes"])
-#if test "$with_vm_sound_null" = "no"; then
-# AC_PLUGIN_DISABLE_PLUGIN(vm-sound-null);
-#fi
-
-
-# Check whether --with-vm-sound-OSS or --without-vm-sound-OSS was given.
-if test "${with_vm_sound_OSS+set}" = set; then
- withval="$with_vm_sound_OSS"
- with_vm_sound_OSS="$withval"
-else
- with_vm_sound_OSS="yes"
-fi;
-if test "$with_vm_sound_OSS" = "no"; then
-
- echo "$as_me:$LINENO: result: ******** disabling vm-sound-OSS" >&5
-echo "${ECHO_T}******** disabling vm-sound-OSS" >&6
- disabled_plugins="${disabled_plugins} vm-sound-OSS";
-fi
-
-
-# Check whether --with-vm-display-fbdev or --without-vm-display-fbdev was given.
-if test "${with_vm_display_fbdev+set}" = set; then
- withval="$with_vm_display_fbdev"
- with_vm_display_fbdev="$withval"
-else
- with_vm_display_fbdev="yes"
-fi;
-if test "$with_vm_display_fbdev" = "no"; then
-
- echo "$as_me:$LINENO: result: ******** disabling vm-display-fbdev" >&5
-echo "${ECHO_T}******** disabling vm-display-fbdev" >&6
- disabled_plugins="${disabled_plugins} vm-display-fbdev";
-fi
-
# Plugins not generated by VMM must be listed here...
int_plugins=""
ext_plugins=""
-#if test "$have_x" = "no"; then
-# AC_PLUGIN_DISABLE_PLUGIN(UnixOSProcessPlugin)
-#fi
-
if test "${disabled_plugins}" != ""; then
echo ${disabled_plugins} | tr ' ' '\012' | sort -u > plugins.exc
fi
Modified: branches/Cog/platforms/unix/config/configure.ac
===================================================================
--- branches/Cog/platforms/unix/config/configure.ac 2012-08-24 21:48:53 UTC (rev 2590)
+++ branches/Cog/platforms/unix/config/configure.ac 2012-09-12 21:59:25 UTC (rev 2591)
@@ -352,40 +352,12 @@
rm -f plugins.exc
sinclude(acplugins.m4)
-#AC_ARG_WITH(vm-sound-null,
-#[ --without-vm-sound-null disable null vm sound support [default=enabled]],
-# [with_vm_sound_null="$withval"],
-# [with_vm_sound_null="yes"])
-#if test "$with_vm_sound_null" = "no"; then
-# AC_PLUGIN_DISABLE_PLUGIN(vm-sound-null);
-#fi
-
-AC_ARG_WITH(vm-sound-OSS,
-[ --without-vm-sound-OSS disable OSS vm sound support [default=enabled]],
- [with_vm_sound_OSS="$withval"],
- [with_vm_sound_OSS="yes"])
-if test "$with_vm_sound_OSS" = "no"; then
- AC_PLUGIN_DISABLE_PLUGIN(vm-sound-OSS);
-fi
-
-AC_ARG_WITH(vm-display-fbdev,
-[ --without-vm-display-fbdev disable frame buffer vm display support [default=enabled]],
- [with_vm_display_fbdev="$withval"],
- [with_vm_display_fbdev="yes"])
-if test "$with_vm_display_fbdev" = "no"; then
- AC_PLUGIN_DISABLE_PLUGIN(vm-display-fbdev);
-fi
-
# Plugins not generated by VMM must be listed here...
int_plugins=""
ext_plugins=""
AC_SUBST(int_plugins)
AC_SUBST(ext_plugins)
-#if test "$have_x" = "no"; then
-# AC_PLUGIN_DISABLE_PLUGIN(UnixOSProcessPlugin)
-#fi
-
if test "${disabled_plugins}" != ""; then
echo ${disabled_plugins} | tr ' ' '\012' | sort -u > plugins.exc
fi
Modified: branches/Cog/platforms/unix/vm-display-Quartz/acinclude.m4
===================================================================
--- branches/Cog/platforms/unix/vm-display-Quartz/acinclude.m4 2012-08-24 21:48:53 UTC (rev 2590)
+++ branches/Cog/platforms/unix/vm-display-Quartz/acinclude.m4 2012-09-12 21:59:25 UTC (rev 2591)
@@ -13,10 +13,14 @@
if test "$have_quartz" = "yes"; then
AC_DEFINE(USE_QUARTZ, [1])
if test "$have_gl" = ""; then have_gl="no"; fi
- AC_CHECK_HEADERS(OpenGL/gl.h, [
- have_gl=yes
- AC_DEFINE(USE_QUARTZ_CGL, [1])
- ])
+ if test "$have_gl" = "yes"; then
+ AC_CHECK_HEADERS(OpenGL/gl.h, [
+ have_gl=yes
+ AC_DEFINE(USE_QUARTZ_CGL, [1])
+ ])
+ else
+ AC_DEFINE(USE_QUARTZ_CGL, 0)
+ fi
else
AC_PLUGIN_DISABLE
fi
Modified: branches/Cog/platforms/unix/vm-display-X11/acinclude.m4
===================================================================
--- branches/Cog/platforms/unix/vm-display-X11/acinclude.m4 2012-08-24 21:48:53 UTC (rev 2590)
+++ branches/Cog/platforms/unix/vm-display-X11/acinclude.m4 2012-09-12 21:59:25 UTC (rev 2591)
@@ -34,11 +34,15 @@
LIBS="${LIBS} -lX11"
AC_CHECK_LIB(Xext, XShmAttach)
if test "$have_gl" = ""; then have_gl="no"; fi
- AC_CHECK_HEADERS(GL/gl.h, [
- have_gl=yes
- AC_DEFINE(USE_X11_GLX, [1])
- AC_CHECK_LIB(GL,glIsEnabled)
- ])
+ if test "$have_gl" = "yes"; then
+ AC_CHECK_HEADERS(GL/gl.h, [
+ have_gl=yes
+ AC_DEFINE(USE_X11_GLX, [1])
+ AC_CHECK_LIB(GL,glIsEnabled)
+ ])
+ else
+ AC_DEFINE(USE_X11_GLX, 0)
+ fi
],[
AC_PLUGIN_DISABLE
])
Modified: branches/Cog/platforms/unix/vm-display-fbdev/acinclude.m4
===================================================================
--- branches/Cog/platforms/unix/vm-display-fbdev/acinclude.m4 2012-08-24 21:48:53 UTC (rev 2590)
+++ branches/Cog/platforms/unix/vm-display-fbdev/acinclude.m4 2012-09-12 21:59:25 UTC (rev 2591)
@@ -1,3 +1,11 @@
# -*- sh -*-
-AC_CHECK_HEADERS(linux/fb.h,,AC_PLUGIN_DISABLE)
+AC_ARG_WITH(vm-display-fbdev,
+[ --without-vm-display-fbdev disable frame buffer vm display support [default=enabled]],
+ [with_vm_display_fbdev="$withval"],
+ [with_vm_display_fbdev="yes"])
+if test "$with_vm_display_fbdev" = "no"; then
+ AC_PLUGIN_DISABLE_PLUGIN(vm-display-fbdev);
+else
+ AC_CHECK_HEADERS(linux/fb.h,,AC_PLUGIN_DISABLE)
+fi
Modified: branches/Cog/platforms/unix/vm-sound-OSS/acinclude.m4
===================================================================
--- branches/Cog/platforms/unix/vm-sound-OSS/acinclude.m4 2012-08-24 21:48:53 UTC (rev 2590)
+++ branches/Cog/platforms/unix/vm-sound-OSS/acinclude.m4 2012-09-12 21:59:25 UTC (rev 2591)
@@ -1,6 +1,13 @@
# -*- sh -*-
-if test "$with_vm_sound_OSS"="yes"; then
+AC_ARG_WITH(vm-sound-OSS,
+[ --without-vm-sound-OSS disable OSS vm sound support [default=enabled]],
+ [with_vm_sound_OSS="$withval"],
+ [with_vm_sound_OSS="yes"])
+
+if test "$with_vm_sound_OSS" = "no"; then
+ AC_PLUGIN_DISABLE_PLUGIN(vm-sound-OSS);
+else
AC_MSG_CHECKING([for Open Sound System])
AC_TRY_COMPILE([#include <sys/soundcard.h>],[OPEN_SOUND_SYSTEM;],[
AC_MSG_RESULT(yes)
Modified: branches/Cog/platforms/unix/vm-sound-null/acinclude.m4
===================================================================
--- branches/Cog/platforms/unix/vm-sound-null/acinclude.m4 2012-08-24 21:48:53 UTC (rev 2590)
+++ branches/Cog/platforms/unix/vm-sound-null/acinclude.m4 2012-09-12 21:59:25 UTC (rev 2591)
@@ -1,2 +1,11 @@
# -*- sh -*-
# empty to provoke config/mkacinc into including vm-sound-null for consideration
+
+#AC_ARG_WITH(vm-sound-null,
+#[ --without-vm-sound-null disable null vm sound support [default=enabled]],
+# [with_vm_sound_null="$withval"],
+# [with_vm_sound_null="yes"])
+#if test "$with_vm_sound_null" = "no"; then
+# AC_PLUGIN_DISABLE_PLUGIN(vm-sound-null);
+#fi
+
More information about the Vm-dev
mailing list