Skip to content

Commit

Permalink
Merge branch 'libsdl-org-main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
capehill committed Mar 7, 2022
2 parents 332f353 + 22dbffc commit 7383f1b
Show file tree
Hide file tree
Showing 53 changed files with 2,497 additions and 2,115 deletions.
3 changes: 2 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_RELEASE = @LT_RELEASE@
LT_REVISION = @LT_REVISION@
LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
LT_EXTRA = @LT_EXTRA@
LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) $(LT_EXTRA)

all: $(srcdir)/configure Makefile $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)

Expand Down
20 changes: 12 additions & 8 deletions Makefile.os2
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,28 @@ DLLFILE = $(LIBHOME)/$(LIBNAME).dll
LIBFILE = $(LIBHOME)/$(LIBNAME).lib
LNKFILE=$(LIBNAME).lnk

CFLAGS_DEF=-bt=os2 -d0 -zq -bm -5s -fp5 -fpi87 -sg -oteanbmier $(INCPATH)
CFLAGS_DLL=$(CFLAGS_DEF) -bd
# Create debug build or not?
DEBUG=0
# Enable Hermes MMX blitters?
HERMES=1

# Special flags for building SDL
CFLAGS=$(CFLAGS_DLL) -otexan -wx -ei
CFLAGS = -bt=os2 -d0 -zq -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
# max warnings:
CFLAGS+= -wx
# newer OpenWatcom versions enable W303 by default
CFLAGS+= -wcd=303
# the include paths :
CFLAGS+= $(INCPATH)
# building dll:
CFLAGS+= -bd
# building SDL itself (for DECLSPEC):
CFLAGS+= -DBUILD_SDL

#CFLAGS+= -DCHECK_LEAKS
CFLAGS+= -DUSE_DOSSETPRIORITY

!ifeq HERMES 1
CFLAGS+= -DSDL_HERMES_BLITTERS=1
!endif
# USE_ASM_MIXER_VC has no effect since SDL-1.2.10.
#CFLAGS+= -DUSE_ASM_MIXER_VC

DESCRIPTION = Simple DirectMedia Layer 1.2

Expand Down Expand Up @@ -102,7 +106,7 @@ $(LIBFILE): $(DLLFILE)
wlib -q -b -n -c -pa -s -t -zld -ii -io $* $(DLLFILE)

SDL_RLEaccel.obj:
wcc386 $(cflags) -w1 -fo=$^@ src/video/SDL_RLEaccel.c
wcc386 $(CFLAGS) -w1 -fo=$^@ src/video/SDL_RLEaccel.c

compiling_info : .symbolic
@echo * Compiling...
Expand Down
11 changes: 5 additions & 6 deletions README.OS2
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

===========
SDL on OS/2
===========
Expand All @@ -11,7 +10,7 @@ Open Watcom 1.9 (http://www.openwatcom.org) or newer is tested.
For the new Open Watcom V2 fork, see: https://github.com/open-watcom/ and
https://open-watcom.github.io

WATCOM ervironment variable must to be set to the Open Watcom install
WATCOM environment variable must to be set to the Open Watcom install
directory. To compile, run: wmake -f Makefile.os2

Check the "Makefile.os2" file. There is a line in there which determines if the
Expand Down Expand Up @@ -106,16 +105,16 @@ or

SET SDL_OS2_JOYSTICK="Gravis GamePad" 4 2 2 0

Notive However that Balls and Hats are not supported under OS/2, and the
value will be ignored... but it is wise to define these correctly because
Note however that Balls and Hats are not supported under OS/2, and the
value will be ignored... but it is wise to define these correctly because
in the future those can be supported.

Also the number of buttons is limited to 2 when using two joysticks,
4 when using one joystick with 4 axes, 6 when using a joystick with 3 axes
and 8 when using a joystick with 2 axes. Notice however these are limitations
and 8 when using a joystick with 2 axes. Notice however these are limitations
of the Joystick Port hardware, not OS/2.



5. Proportional windows (FSLib driver only)
-------------------------------------------

Expand Down
2 changes: 2 additions & 0 deletions README.RISCOS
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ SDL_GetTicks
SDL_Delay
Modified to poll keyboard/mouse during the delay on the event thread.

SDL_LoadObject/SDL_LoadFunction/SDL_UnloadObject
Not supported in statically linked applications.

Notes on current implementation
-------------------------------
Expand Down
2 changes: 1 addition & 1 deletion WhatsNew
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Changes include:
- Video, blit: fix RGBA<->RGBA blit broken with the optimization from
bug 11 (bug 2976.)
- Video, blit, Linux: ARM assembly to address performance of blit and
fill routines, thanks to Ben Avison (disabled by default) (bug 4365.)
fill routines - thanks to Ben Avison. (bug 4365.)
- Video: fix integer overflow in SDL_CalculatePitch (CVE-2019-7637,
bug 4497.)
- Video, Linux, fbcon: fix double buffering with non-fullscreen
Expand Down
144 changes: 129 additions & 15 deletions acinclude/libtool.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##############################################################################
# Based on libtool-2.2.6a
# Based on libtool-2.2.6a.
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
Expand Down Expand Up @@ -947,16 +947,11 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
_lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
darwin1.*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
darwin*) # darwin 5.x on
# if running on 10.5 or later, the deployment target defaults
# to the OS version, if on x86, and 10.4, the deployment
# target defaults to 10.4. Don't you love it?
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
10.[[012]]*)
darwin*)
case ${MACOSX_DEPLOYMENT_TARGET},$host in
10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
esac
;;
Expand Down Expand Up @@ -2565,9 +2560,34 @@ os2*)
libname_spec='$name'
shrext_cmds=".dll"
need_lib_prefix=no
library_names_spec='$libname${shared_ext} $libname.a'
# OS/2 limits length of a DLL basename up to 8 characters.
# So there is need to use a short name instead of a original
# name longer than 8 characters. And replace '.' with '_'.
# SDL customization: removed versioning support.
# version_type=windows
# need_version=no
# soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
# v=$($ECHO ${release}${versuffix} | tr -d .-);
# n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
# $ECHO ${n}${v}`${shared_ext}'
soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; $ECHO $libname | cut -b -8 | tr . _`${shared_ext}'
library_names_spec='${libname}_dll.$libext'
dynamic_linker='OS/2 ld.exe'
shlibpath_var=LIBPATH
shlibpath_var=BEGINLIBPATH
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
postinstall_cmds='base_file=`basename \$file`~
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
chmod a+x \$dldir/$dlname~
if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
fi'
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
dlpath=$dir/\$dldll~
$RM \$dlpath'
;;
osf3* | osf4* | osf5*)
Expand Down Expand Up @@ -3023,7 +3043,7 @@ mingw* | pw32*)
lt_cv_deplibs_check_method=pass_all
;;
cegcc)
cegcc*)
# use the weaker test based on 'objdump'. See mingw*.
lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
lt_cv_file_magic_cmd='$OBJDUMP -f'
Expand Down Expand Up @@ -3163,6 +3183,9 @@ sysv4 | sysv4.3*)
tpf*)
lt_cv_deplibs_check_method=pass_all
;;
os2*)
lt_cv_deplibs_check_method=pass_all
;;
esac
])
file_magic_cmd=$lt_cv_file_magic_cmd
Expand Down Expand Up @@ -3593,6 +3616,11 @@ m4_if([$1], [CXX], [
# (--disable-auto-import) libraries
m4_if([$1], [GCJ], [],
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
case $host_os in
os2*)
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-static'
;;
esac
;;
darwin* | rhapsody*)
# PIC is the default on this platform
Expand Down Expand Up @@ -3900,6 +3928,11 @@ m4_if([$1], [CXX], [
# (--disable-auto-import) libraries
m4_if([$1], [GCJ], [],
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
case $host_os in
os2*)
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-static'
;;
esac
;;
darwin* | rhapsody*)
Expand Down Expand Up @@ -3968,6 +4001,11 @@ m4_if([$1], [CXX], [
# built for inclusion in a dll (and should export symbols for example).
m4_if([$1], [GCJ], [],
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
case $host_os in
os2*)
_LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-static'
;;
esac
;;
hpux9* | hpux10* | hpux11*)
Expand Down Expand Up @@ -4358,6 +4396,34 @@ _LT_EOF
fi
;;
os2*)
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
_LT_TAGVAR(hardcode_minus_L, $1)=yes
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
shrext_cmds=".dll"
_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
$ECHO "DATA MULTIPLE NONSHARED">> $output_objdir/$libname.def~
$ECHO EXPORTS >> $output_objdir/$libname.def~
emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
$ECHO "DATA MULTIPLE NONSHARED">> $output_objdir/$libname.def~
$ECHO EXPORTS >> $output_objdir/$libname.def~
prefix_cmds="$SED"~
if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
prefix_cmds="$prefix_cmds -e 1d";
fi~
prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
;;
interix[[3-9]]*)
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Expand Down Expand Up @@ -4918,8 +4984,28 @@ _LT_EOF
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
_LT_TAGVAR(hardcode_minus_L, $1)=yes
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
shrext_cmds=".dll"
_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
$ECHO "DATA MULTIPLE NONSHARED">> $output_objdir/$libname.def~
$ECHO EXPORTS >> $output_objdir/$libname.def~
emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
$ECHO "DATA MULTIPLE NONSHARED">> $output_objdir/$libname.def~
$ECHO EXPORTS >> $output_objdir/$libname.def~
prefix_cmds="$SED"~
if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
prefix_cmds="$prefix_cmds -e 1d";
fi~
prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
;;
osf3*)
Expand Down Expand Up @@ -5672,6 +5758,34 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_DARWIN_LINKER_FEATURES($1)
;;
os2*)
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
_LT_TAGVAR(hardcode_minus_L, $1)=yes
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
shrext_cmds=".dll"
_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
$ECHO "DATA MULTIPLE NONSHARED">> $output_objdir/$libname.def~
$ECHO EXPORTS >> $output_objdir/$libname.def~
emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
$ECHO "DATA MULTIPLE NONSHARED">> $output_objdir/$libname.def~
$ECHO EXPORTS >> $output_objdir/$libname.def~
prefix_cmds="$SED"~
if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
prefix_cmds="$prefix_cmds -e 1d";
fi~
prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
;;
dgux*)
case $cc_basename in
ec++*)
Expand Down
2 changes: 1 addition & 1 deletion acinclude/ltoptions.m4
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
Expand Down
1 change: 0 additions & 1 deletion acinclude/ltsugar.m4
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,3 @@ m4_define([lt_dict_filter],
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
])
22 changes: 13 additions & 9 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
#!/bin/sh
#

echo "Generating build information using autoconf"
echo "This may take a while ..."

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
cd "$srcdir"

# Regenerate configuration files
cat acinclude/* >aclocal.m4
found=false
for autoconf in autoconf autoconf259 autoconf-2.59
do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi
done
if test x$found = xfalse; then
echo "Couldn't find autoconf, aborting"
exit 1

if test "$AUTOCONF"x = x; then
AUTOCONF=autoconf
fi

$AUTOCONF || exit 1
rm aclocal.m4
rm -rf autom4te.cache

(cd test; sh autogen.sh)

# Run configure for this platform
echo "Now you are ready to run ./configure"
Loading

0 comments on commit 7383f1b

Please sign in to comment.