Some fixes for OS/2

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
lvzuufx
Posts: 2
Joined: Sun Mar 23, 2008 10:03 am

Some fixes for OS/2

Post by lvzuufx »

Hi/2.

First, sdlconfig script is not recognized as the executable on OS/2. So, we need to use '-f' instead of '-x'. I think, this change does not affect other platform.

Code: Select all

--- configure.org   2007-08-04 11:57:26.000000000 +0900
+++ configure	2008-03-23 12:23:30.000000000 +0900
@@ -182,7 +182,7 @@
		#reset separator to parse sdlconfigs
		IFS=":"
		for sdlconfig in $sdlconfigs; do
-			if test -x "$path_dir/$sdlconfig" ; then
+			if test -f "$path_dir/$sdlconfig" ; then
				_sdlconfig="$path_dir/$sdlconfig"
				echo $_sdlconfig
				# break at first sdl-config found in path
Second, enable nasm usage on OS/2 if exist.

Code: Select all

--- configure.org   2007-08-04 11:57:26.000000000 +0900
+++ configure   2008-03-23 12:23:30.000000000 +0900
@@ -255,8 +255,8 @@
	IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=$SEPARATOR

	for path_dir in $_nasmpath; do
-		if test -x "$path_dir/nasm" ; then
-			NASM="$path_dir/nasm"
+		if test -x "$path_dir/nasm$EXEEXT" ; then
+			NASM="$path_dir/nasm$EXEEXT"
			echo $NASM
			break
		fi
@@ -269,6 +269,9 @@
		_nasm=no
	else
		case $_host_os in
+			os2-emx*)
+				NASMFLAGS="-f aout"
+			;;
			mingw* | cygwin*)
				NASMFLAGS="-f win32"
			;;
--- graphics\scaler.cpp.org	2007-08-04 11:40:16.000000000 +0900
+++ graphics\scaler.cpp	2008-03-23 12:23:58.000000000 +0900
@@ -38,7 +38,7 @@
 // NOTE: if your compiler uses different mangled names, add another
 //       condition here
 
-#if !defined(_WIN32) && !defined(MACOSX)
+#if !defined(_WIN32) && !defined(MACOSX) && !defined(__OS2__)
 #define RGBtoYUV _RGBtoYUV
 #define LUT16to32 _LUT16to32
 #endif
--- graphics\scaler\hq2x.cpp.org	2007-08-04 11:40:10.000000000 +0900
+++ graphics\scaler\hq2x.cpp	2008-03-23 12:24:30.000000000 +0900
@@ -30,7 +30,7 @@
 
 extern "C" {
 
-#if !defined(_WIN32) && !defined(MACOSX)
+#if !defined(_WIN32) && !defined(MACOSX) && !defined(__OS2__)
 #define hq2x_16 _hq2x_16
 #endif
 
--- graphics\scaler\hq3x.cpp.org	2007-08-04 11:40:10.000000000 +0900
+++ graphics\scaler\hq3x.cpp	2008-03-23 12:24:28.000000000 +0900
@@ -30,7 +30,7 @@
 
 extern "C" {
 
-#if !defined(_WIN32) && !defined(MACOSX)
+#if !defined(_WIN32) && !defined(MACOSX) && !defined(__OS2__)
 #define hq3x_16 _hq3x_16
 #endif
KO Myung-Hun
User avatar
Raziel
ScummVM Porter
Posts: 1542
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Post by Raziel »

Theres a patch tracker for such things, you know ;-)
lvzuufx
Posts: 2
Joined: Sun Mar 23, 2008 10:03 am

Post by lvzuufx »

Hi/2.

I didn't know that. T.T

Thanks a lot. ^^

KO Myung-Hun
Post Reply