Ticket #8468: configure.os2patch

File configure.os2patch, 3.9 KB (added by SF/psmedley, 15 years ago)

Patch file for configure

Line 
1--- configure.cvs Wed Aug 10 22:12:54 2005
2+++ configure.patched Tue Oct 11 19:54:52 2005
3@@ -13,6 +13,27 @@
4 # use environment vars if set
5 CXXFLAGS="$CXXFLAGS $CPPFLAGS"
6
7+# Backslashes into forward slashes:
8+# The following OS/2 specific code is performed to deal with handling of backslashes by ksh.
9+# Borrowed from the Sane configure script
10+
11+if test "$ac_emxsupport" != "no" -a "$ac_emxsupport" != "NO"; then
12+ ac_save_IFS="$IFS"
13+ IFS="\\"
14+ ac_TEMP_PATH=
15+ for ac_dir in $PATH; do
16+ IFS=$ac_save_IFS
17+ if test -z "$ac_TEMP_PATH"; then
18+ ac_TEMP_PATH="$ac_dir"
19+ else
20+ ac_TEMP_PATH="$ac_TEMP_PATH/$ac_dir"
21+ fi
22+ done
23+ export PATH="$ac_TEMP_PATH"
24+ unset ac_TEMP_PATH
25+fi
26+
27+
28 # default lib behaviour yes/no/auto
29 _vorbis=auto
30 _tremor=auto
31@@ -81,9 +102,9 @@
32 echo >> "$TMPLOG"
33 cat "$TMPC" >> "$TMPLOG"
34 echo >> "$TMPLOG"
35- echo "$CXX $TMPC -o $TMPO $@" >> "$TMPLOG"
36+ echo "$CXX $TMPC -o $TMPO$EXEEXT $@" >> "$TMPLOG"
37 rm -f "$TMPO$EXEEXT"
38- ( $CXX "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1
39+ ( $CXX "$TMPC" -o "$TMPO$EXEEXT" "$@" ) >> "$TMPLOG" 2>&1
40 TMP="$?"
41 echo >> "$TMPLOG"
42 return "$TMP"
43@@ -112,9 +133,9 @@
44
45 if test -n "$_host"; then
46 # In cross-compiling mode, we cannot run the result
47- eval "$1 -o tmp_cxx_compiler tmp_cxx_compiler.cpp 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
48+ eval "$1 -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
49 else
50- eval "$1 -o tmp_cxx_compiler tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
51+ eval "$1 -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp 2> /dev/null" && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp
52 fi
53 }
54
55@@ -124,12 +145,12 @@
56 # TODO: small bit of code to test sdl useability
57 find_sdlconfig()
58 {
59+
60 echo_n "Looking for sdl-config... "
61 sdlconfigs="$_sdlconfig:sdl-config:sdl11-config:sdl12-config"
62 _sdlconfig=
63
64- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
65-
66+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$SEPARATOR"
67 for path_dir in $_sdlpath; do
68 for sdlconfig in $sdlconfigs; do
69 if test -x "$path_dir/$sdlconfig" ; then
70@@ -182,7 +203,7 @@
71 return 0;
72 }
73 EOF
74-if eval "$CXX -o tmp_find_type_with_size tmp_find_type_with_size.cpp"; then
75+if eval "$CXX -o tmp_find_type_with_size$EXEEXT tmp_find_type_with_size.cpp"; then
76 datatype=`./tmp_find_type_with_size $1`
77 if test "$datatype" = "unknown"; then
78 echo "couldn't find data type with $1 bytes"
79@@ -201,7 +222,7 @@
80 return;
81 fi
82
83- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
84+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$SEPARATOR
85
86 for path_dir in $_nasmpath; do
87 if test -x "$path_dir/nasm" ; then
88@@ -470,7 +491,7 @@
89 # Determine extension used for executables
90 #
91 case $_host_os in
92-mingw* | cygwin*)
93+mingw* | cygwin* | os2-emx*)
94 EXEEXT=".exe"
95 ;;
96 arm-riscos)
97@@ -482,6 +503,18 @@
98 esac
99
100 #
101+# Determine separator used for $PATH
102+#
103+case $_host_os in
104+os2-emx* )
105+ SEPARATOR=";"
106+ ;;
107+* )
108+ SEPARATOR=":"
109+ ;;
110+esac
111+
112+#
113 # Determine the C++ compiler
114 #
115 echo_n "Looking for C++ compiler... "
116@@ -703,6 +736,9 @@
117 LIBS="$LIBS -mno-cygwin -lmingw32 -lwinmm"
118 OBJS="$OBJS scummvmico.o"
119 ;;
120+ os2-emx*)
121+ DEFINES="$DEFINES -DUNIX"
122+ ;;
123 # given this is a shell script assume some type of unix
124 *)
125 echo "WARNING: could not establish system type, assuming unix like"
126@@ -730,7 +766,7 @@
127 return 0;
128 }
129 EOF
130- $CXX -o tmp_endianness_check tmp_endianness_check.cpp
131+ $CXX -o tmp_endianness_check$EXEEXT tmp_endianness_check.cpp
132 endianness=`./tmp_endianness_check`
133 echo $endianness;
134 case $endianness in