mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Import SDL 1.2.14 and GLEW 1.5.4.
I am not replacing the following header files used by the Windows build, as I don't have a Windows build setup to test. Please point the Windows build at the header files inside these clean distribution packages and garbage collect the duplicates: GLew/*.h and SDL/Include_1.2. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5711 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
1494
Externals/SDL/build-scripts/config.guess
vendored
Executable file
1494
Externals/SDL/build-scripts/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1700
Externals/SDL/build-scripts/config.sub
vendored
Executable file
1700
Externals/SDL/build-scripts/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
316
Externals/SDL/build-scripts/fatbuild.sh
vendored
Executable file
316
Externals/SDL/build-scripts/fatbuild.sh
vendored
Executable file
@ -0,0 +1,316 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Build a fat binary on Mac OS X, thanks Ryan!
|
||||
|
||||
# Number of CPUs (for make -j)
|
||||
NCPU=`sysctl -n hw.ncpu`
|
||||
NJOB=$NCPU
|
||||
#NJOB=`expr $NCPU + 1`
|
||||
|
||||
# Generic, cross-platform CFLAGS you always want go here.
|
||||
CFLAGS="-O3 -g -pipe"
|
||||
|
||||
# Locate Xcode SDK path
|
||||
SDK_PATH=/Developer/SDKs
|
||||
if [ ! -d $SDK_PATH ]; then
|
||||
echo "Couldn't find SDK path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# See if we can use 10.2 or 10.3 runtime compatibility
|
||||
if [ -d "$SDK_PATH/MacOSX10.2.8.sdk" ]; then
|
||||
# PowerPC configure flags (10.2 runtime compatibility)
|
||||
# We dynamically load X11, so using the system X11 headers is fine.
|
||||
CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
|
||||
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
|
||||
|
||||
# PowerPC compiler flags
|
||||
CC_PPC="gcc-3.3 -arch ppc"
|
||||
CXX_PPC="g++-3.3 -arch ppc"
|
||||
CFLAGS_PPC=""
|
||||
CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
|
||||
-nostdinc \
|
||||
-F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \
|
||||
-I$SDK_PATH/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \
|
||||
-isystem $SDK_PATH/MacOSX10.2.8.sdk/usr/include"
|
||||
|
||||
# PowerPC linker flags
|
||||
LFLAGS_PPC="-Wl,-headerpad_max_install_names -arch ppc \
|
||||
-L$SDK_PATH/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
|
||||
-F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \
|
||||
-Wl,-syslibroot,$SDK_PATH/MacOSX10.2.8.sdk"
|
||||
|
||||
else # 10.2 or 10.3 SDK
|
||||
|
||||
# PowerPC configure flags (10.3 runtime compatibility)
|
||||
# We dynamically load X11, so using the system X11 headers is fine.
|
||||
CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
|
||||
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
|
||||
|
||||
# PowerPC compiler flags
|
||||
CC_PPC="gcc-4.0 -arch ppc"
|
||||
CXX_PPC="g++-4.0 -arch ppc"
|
||||
CFLAGS_PPC=""
|
||||
CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \
|
||||
-nostdinc \
|
||||
-F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \
|
||||
-I$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \
|
||||
-isystem $SDK_PATH/MacOSX10.3.9.sdk/usr/include"
|
||||
|
||||
# PowerPC linker flags
|
||||
LFLAGS_PPC="-Wl,-headerpad_max_install_names -arch ppc -mmacosx-version-min=10.3 \
|
||||
-L$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \
|
||||
-F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \
|
||||
-Wl,-syslibroot,$SDK_PATH/MacOSX10.3.9.sdk"
|
||||
|
||||
fi # 10.2 or 10.3 SDK
|
||||
|
||||
# Intel configure flags (10.4 runtime compatibility)
|
||||
# We dynamically load X11, so using the system X11 headers is fine.
|
||||
CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \
|
||||
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
|
||||
|
||||
# Intel compiler flags
|
||||
CC_X86="gcc-4.0 -arch i386"
|
||||
CXX_X86="g++-4.0 -arch i386"
|
||||
CFLAGS_X86="-mmacosx-version-min=10.4"
|
||||
CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
|
||||
-nostdinc \
|
||||
-F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
|
||||
-I$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include \
|
||||
-isystem $SDK_PATH/MacOSX10.4u.sdk/usr/include"
|
||||
|
||||
# Intel linker flags
|
||||
LFLAGS_X86="-Wl,-headerpad_max_install_names -arch i386 -mmacosx-version-min=10.4 \
|
||||
-L$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1 \
|
||||
-Wl,-syslibroot,$SDK_PATH/MacOSX10.4u.sdk"
|
||||
|
||||
#
|
||||
# Find the configure script
|
||||
#
|
||||
srcdir=`dirname $0`/..
|
||||
auxdir=$srcdir/build-scripts
|
||||
cd $srcdir
|
||||
|
||||
#
|
||||
# Figure out which phase to build:
|
||||
# all,
|
||||
# configure, configure-ppc, configure-x86,
|
||||
# make, make-ppc, make-x86, merge
|
||||
# install
|
||||
# clean
|
||||
if test x"$1" = x; then
|
||||
phase=all
|
||||
else
|
||||
phase="$1"
|
||||
fi
|
||||
case $phase in
|
||||
all)
|
||||
configure_ppc="yes"
|
||||
configure_x86="yes"
|
||||
make_ppc="yes"
|
||||
make_x86="yes"
|
||||
merge="yes"
|
||||
;;
|
||||
configure)
|
||||
configure_ppc="yes"
|
||||
configure_x86="yes"
|
||||
;;
|
||||
configure-ppc)
|
||||
configure_ppc="yes"
|
||||
;;
|
||||
configure-x86)
|
||||
configure_x86="yes"
|
||||
;;
|
||||
make)
|
||||
make_ppc="yes"
|
||||
make_x86="yes"
|
||||
merge="yes"
|
||||
;;
|
||||
make-ppc)
|
||||
make_ppc="yes"
|
||||
;;
|
||||
make-x86)
|
||||
make_x86="yes"
|
||||
;;
|
||||
merge)
|
||||
merge="yes"
|
||||
;;
|
||||
install)
|
||||
install_bin="yes"
|
||||
install_hdrs="yes"
|
||||
install_lib="yes"
|
||||
install_data="yes"
|
||||
install_man="yes"
|
||||
;;
|
||||
install-bin)
|
||||
install_bin="yes"
|
||||
;;
|
||||
install-hdrs)
|
||||
install_hdrs="yes"
|
||||
;;
|
||||
install-lib)
|
||||
install_lib="yes"
|
||||
;;
|
||||
install-data)
|
||||
install_data="yes"
|
||||
;;
|
||||
install-man)
|
||||
install_man="yes"
|
||||
;;
|
||||
clean)
|
||||
clean_ppc="yes"
|
||||
clean_x86="yes"
|
||||
;;
|
||||
clean-ppc)
|
||||
clean_ppc="yes"
|
||||
;;
|
||||
clean-x86)
|
||||
clean_x86="yes"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [all|configure[-ppc|-x86]|make[-ppc|-x86]|merge|install|clean]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
case `uname -p` in
|
||||
powerpc)
|
||||
native_path=ppc
|
||||
;;
|
||||
*86)
|
||||
native_path=x86
|
||||
;;
|
||||
*)
|
||||
echo "Couldn't figure out native architecture path"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Create the build directories
|
||||
#
|
||||
for dir in build build/ppc build/x86; do
|
||||
if test -d $dir; then
|
||||
:
|
||||
else
|
||||
mkdir $dir || exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
#
|
||||
# Build the PowerPC binary
|
||||
#
|
||||
if test x$configure_ppc = xyes; then
|
||||
(cd build/ppc && \
|
||||
sh ../../configure $CONFIG_PPC CC="$CC_PPC" CXX="$CXX_PPC" CFLAGS="$CFLAGS $CFLAGS_PPC" CPPFLAGS="$CPPFLAGS_PPC" LDFLAGS="$LFLAGS_PPC") || exit 2
|
||||
fi
|
||||
if test x$make_ppc = xyes; then
|
||||
(cd build/ppc && ls include && make -j$NJOB) || exit 3
|
||||
fi
|
||||
|
||||
#
|
||||
# Build the Intel binary
|
||||
#
|
||||
if test x$configure_x86 = xyes; then
|
||||
(cd build/x86 && \
|
||||
sh ../../configure $CONFIG_X86 CC="$CC_X86" CXX="$CXX_X86" CFLAGS="$CFLAGS $CFLAGS_X86" CPPFLAGS="$CPPFLAGS_X86" LDFLAGS="$LFLAGS_X86") || exit 2
|
||||
fi
|
||||
if test x$make_x86 = xyes; then
|
||||
(cd build/x86 && make -j$NJOB) || exit 3
|
||||
fi
|
||||
|
||||
#
|
||||
# Combine into fat binary
|
||||
#
|
||||
if test x$merge = xyes; then
|
||||
output=.libs
|
||||
sh $auxdir/mkinstalldirs build/$output
|
||||
cd build
|
||||
target=`find . -mindepth 3 -type f -name '*.dylib' | head -1 | sed 's|.*/||'`
|
||||
(lipo -create -o $output/$target `find . -mindepth 3 -type f -name "*.dylib"` &&
|
||||
ln -sf $target $output/libSDL-1.2.0.dylib &&
|
||||
ln -sf $target $output/libSDL.dylib &&
|
||||
lipo -create -o $output/libSDL.a */build/.libs/libSDL.a &&
|
||||
cp $native_path/build/.libs/libSDL.la $output &&
|
||||
cp $native_path/build/.libs/libSDL.lai $output &&
|
||||
cp $native_path/build/libSDL.la . &&
|
||||
lipo -create -o libSDLmain.a */build/libSDLmain.a &&
|
||||
echo "Build complete!" &&
|
||||
echo "Files can be found in the build directory.") || exit 4
|
||||
cd ..
|
||||
fi
|
||||
|
||||
#
|
||||
# Install
|
||||
#
|
||||
do_install()
|
||||
{
|
||||
echo $*
|
||||
$* || exit 5
|
||||
}
|
||||
if test x$prefix = x; then
|
||||
prefix=/usr/local
|
||||
fi
|
||||
if test x$exec_prefix = x; then
|
||||
exec_prefix=$prefix
|
||||
fi
|
||||
if test x$bindir = x; then
|
||||
bindir=$exec_prefix/bin
|
||||
fi
|
||||
if test x$libdir = x; then
|
||||
libdir=$exec_prefix/lib
|
||||
fi
|
||||
if test x$includedir = x; then
|
||||
includedir=$prefix/include
|
||||
fi
|
||||
if test x$datadir = x; then
|
||||
datadir=$prefix/share
|
||||
fi
|
||||
if test x$mandir = x; then
|
||||
mandir=$prefix/man
|
||||
fi
|
||||
if test x$install_bin = xyes; then
|
||||
do_install sh $auxdir/mkinstalldirs $bindir
|
||||
do_install /usr/bin/install -c -m 755 build/$native_path/sdl-config $bindir/sdl-config
|
||||
fi
|
||||
if test x$install_hdrs = xyes; then
|
||||
do_install sh $auxdir/mkinstalldirs $includedir/SDL
|
||||
for src in $srcdir/include/*.h; do \
|
||||
file=`echo $src | sed -e 's|^.*/||'`; \
|
||||
do_install /usr/bin/install -c -m 644 $src $includedir/SDL/$file; \
|
||||
done
|
||||
do_install /usr/bin/install -c -m 644 $srcdir/include/SDL_config_macosx.h $includedir/SDL/SDL_config.h
|
||||
fi
|
||||
if test x$install_lib = xyes; then
|
||||
do_install sh $auxdir/mkinstalldirs $libdir
|
||||
do_install sh build/$native_path/libtool --mode=install /usr/bin/install -c build/libSDL.la $libdir/libSDL.la
|
||||
do_install /usr/bin/install -c -m 644 build/libSDLmain.a $libdir/libSDLmain.a
|
||||
do_install ranlib $libdir/libSDLmain.a
|
||||
fi
|
||||
if test x$install_data = xyes; then
|
||||
do_install sh $auxdir/mkinstalldirs $datadir/aclocal
|
||||
do_install /usr/bin/install -c -m 644 $srcdir/sdl.m4 $datadir/aclocal/sdl.m4
|
||||
fi
|
||||
if test x$install_man = xyes; then
|
||||
do_install sh $auxdir/mkinstalldirs $mandir/man3
|
||||
for src in $srcdir/docs/man3/*.3; do \
|
||||
file=`echo $src | sed -e 's|^.*/||'`; \
|
||||
do_install /usr/bin/install -c -m 644 $src $mandir/man3/$file; \
|
||||
done
|
||||
fi
|
||||
|
||||
#
|
||||
# Clean up
|
||||
#
|
||||
do_clean()
|
||||
{
|
||||
echo $*
|
||||
$* || exit 6
|
||||
}
|
||||
if test x$clean_x86 = xyes; then
|
||||
do_clean rm -r build/x86
|
||||
fi
|
||||
if test x$clean_ppc = xyes; then
|
||||
do_clean rm -r build/ppc
|
||||
fi
|
||||
|
323
Externals/SDL/build-scripts/install-sh
vendored
Executable file
323
Externals/SDL/build-scripts/install-sh
vendored
Executable file
@ -0,0 +1,323 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2005-02-02.21
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=
|
||||
chgrpcmd=
|
||||
stripcmd=
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dstarg=
|
||||
no_target_directory=
|
||||
|
||||
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
-c (ignored)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test -n "$1"; do
|
||||
case $1 in
|
||||
-c) shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t) dstarg=$2
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-T) no_target_directory=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
*) # When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
test -n "$dir_arg$dstarg" && break
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dstarg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dstarg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dstarg=$arg
|
||||
done
|
||||
break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test -z "$1"; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src ;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
src=
|
||||
|
||||
if test -d "$dst"; then
|
||||
mkdircmd=:
|
||||
chmodcmd=
|
||||
else
|
||||
mkdircmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dstarg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dstarg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst ;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dstarg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst/`basename "$src"`
|
||||
fi
|
||||
fi
|
||||
|
||||
# This sed command emulates the dirname command.
|
||||
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if test ! -d "$dstdir"; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=
|
||||
|
||||
while test $# -ne 0 ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
if test ! -d "$pathcomp"; then
|
||||
$mkdirprog "$pathcomp"
|
||||
# mkdir can fail with a `File exist' error in case several
|
||||
# install-sh are creating the directory concurrently. This
|
||||
# is OK.
|
||||
test -d "$pathcomp" || exit
|
||||
fi
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
$doit $mkdircmd "$dst" \
|
||||
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
|
||||
|
||||
else
|
||||
dstfile=`basename "$dst"`
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
$doit $cpprog "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| {
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
if test -f "$dstdir/$dstfile"; then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|
||||
|| {
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
}
|
||||
}
|
||||
fi || { (exit 1); exit 1; }
|
||||
done
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
{
|
||||
(exit 0); exit 0
|
||||
}
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
8407
Externals/SDL/build-scripts/ltmain.sh
vendored
Normal file
8407
Externals/SDL/build-scripts/ltmain.sh
vendored
Normal file
File diff suppressed because it is too large
Load Diff
93
Externals/SDL/build-scripts/makedep.sh
vendored
Executable file
93
Externals/SDL/build-scripts/makedep.sh
vendored
Executable file
@ -0,0 +1,93 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Generate dependencies from a list of source files
|
||||
|
||||
# Check to make sure our environment variables are set
|
||||
if test x"$INCLUDE" = x -o x"$SOURCES" = x -o x"$output" = x; then
|
||||
echo "SOURCES, INCLUDE, and output needs to be set"
|
||||
exit 1
|
||||
fi
|
||||
cache_prefix=".#$$"
|
||||
|
||||
generate_var()
|
||||
{
|
||||
echo $1 | sed -e 's|^.*/||' -e 's|\.|_|g'
|
||||
}
|
||||
|
||||
search_deps()
|
||||
{
|
||||
base=`echo $1 | sed 's|/[^/]*$||'`
|
||||
grep '#include "' <$1 | sed -e 's|.*"\([^"]*\)".*|\1|' | \
|
||||
while read file
|
||||
do cache=${cache_prefix}_`generate_var $file`
|
||||
if test -f $cache; then
|
||||
: # We already ahve this cached
|
||||
else
|
||||
: >$cache
|
||||
for path in $base `echo $INCLUDE | sed 's|-I||g'`
|
||||
do dep="$path/$file"
|
||||
if test -f "$dep"; then
|
||||
echo " $dep \\" >>$cache
|
||||
search_deps $dep >>$cache
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
cat $cache
|
||||
done
|
||||
}
|
||||
|
||||
:>${output}.new
|
||||
for src in $SOURCES
|
||||
do echo "Generating dependencies for $src"
|
||||
ext=`echo $src | sed 's|.*\.\(.*\)|\1|'`
|
||||
if test x"$ext" = x"rc"; then
|
||||
obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.o|g"`
|
||||
else
|
||||
obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.lo|g"`
|
||||
fi
|
||||
echo "\$(objects)/$obj: $src \\" >>${output}.new
|
||||
search_deps $src | sort | uniq >>${output}.new
|
||||
case $ext in
|
||||
c) cat >>${output}.new <<__EOF__
|
||||
|
||||
\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
|
||||
|
||||
__EOF__
|
||||
;;
|
||||
cc) cat >>${output}.new <<__EOF__
|
||||
|
||||
\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
|
||||
|
||||
__EOF__
|
||||
;;
|
||||
m) cat >>${output}.new <<__EOF__
|
||||
|
||||
\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
|
||||
|
||||
__EOF__
|
||||
;;
|
||||
asm) cat >>${output}.new <<__EOF__
|
||||
|
||||
\$(LIBTOOL) --tag=CC --mode=compile \$(auxdir)/strip_fPIC.sh \$(NASM) $src -o \$@
|
||||
|
||||
__EOF__
|
||||
;;
|
||||
S) cat >>${output}.new <<__EOF__
|
||||
|
||||
\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
|
||||
|
||||
__EOF__
|
||||
;;
|
||||
rc) cat >>${output}.new <<__EOF__
|
||||
|
||||
\$(WINDRES) $src \$@
|
||||
|
||||
__EOF__
|
||||
;;
|
||||
*) echo "Unknown file extension: $ext";;
|
||||
esac
|
||||
echo "" >>${output}.new
|
||||
done
|
||||
mv ${output}.new ${output}
|
||||
rm -f ${cache_prefix}*
|
99
Externals/SDL/build-scripts/mkinstalldirs
vendored
Executable file
99
Externals/SDL/build-scripts/mkinstalldirs
vendored
Executable file
@ -0,0 +1,99 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case "${1}" in
|
||||
-h | --help | --h* ) # -h for help
|
||||
echo "${usage}" 1>&2; exit 0 ;;
|
||||
-m ) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||
dirmode="${1}"
|
||||
shift ;;
|
||||
-- ) shift; break ;; # stop option processing
|
||||
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
|
||||
* ) break ;; # first non-opt arg
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi ;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi ;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 3
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
21
Externals/SDL/build-scripts/strip_fPIC.sh
vendored
Executable file
21
Externals/SDL/build-scripts/strip_fPIC.sh
vendored
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# libtool assumes that the compiler can handle the -fPIC flag
|
||||
# This isn't always true (for example, nasm can't handle it)
|
||||
command=""
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-fPIC)
|
||||
# Ignore -fPIC option
|
||||
;;
|
||||
-fno-common)
|
||||
# Ignore -fPIC and -DPIC options
|
||||
;;
|
||||
*)
|
||||
command="$command $1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
echo $command
|
||||
exec $command
|
Reference in New Issue
Block a user