Some updates. Still needs work.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@642 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2003-02-03 01:48:13 +00:00
parent e38e04270d
commit 16b72cb7fb
6 changed files with 88 additions and 44 deletions
+6
View File
@@ -10,6 +10,12 @@
have_program gcc || exit 1
COMPILE="$PROG_gcc_FILE"
case "$OSNAME" in
MINGW32*)
have_program windres
;;
esac
# Define WORDS_BIGENDIAN on bigendian machines
check_endianness
+3
View File
@@ -51,6 +51,9 @@ done
TOPDIR="$PWD"
export TOPDIR
OSNAME=`uname -s`
export OSNAME
if [ $# -lt 1 ]; then
usage 1>&2
exit 1;
+19 -3
View File
@@ -69,15 +69,21 @@ build_dependancies() {
# Recursively build dependancy information
build_rec_dependancies() {
local DEPEND_FILE
local DEPEND_FILE EXTRA_OFILES
echo "Building dependancy information..." 1>&2
BUILD_FILES_VAR=${BUILD_PROJECT}_CFILES
BUILD_FILES_VAR=${BUILD_PROJECT}_EXTRA_OFILES
export BUILD_FILES_VAR
EXTRA_OFILES=`build_do_recursive build_collect_extra_o_files :`
BUILD_FILES_VAR=${BUILD_PROJECT}_CFILES
OFILES=`build_do_recursive build_collect_o_files :`
eval DEPEND_FILE=".depend.\${${BUILD_PROJECT}_NAME}"
{
eval echo -n "target-\${${BUILD_PROJECT}_NAME}:"
for OFILE in $OFILES; do
for OFILE in $OFILES $EXTRA_OFILES; do
echo -n " $OFILE"
done
echo
@@ -90,11 +96,21 @@ build_collect_o_files() {
eval echo "\${${BUILD_PROJECT}_OBJS}\${1%.c}.o"
}
# Output the extra .o file with the complete path
build_collect_extra_o_files() {
eval echo "\${${BUILD_PROJECT}_OBJS}\$1"
}
# Recursively collect .o-files
build_rec_collect_o_files() {
local EXTRA_OFILES
BUILD_FILES_VAR=${BUILD_PROJECT}_CFILES
export BUILD_FILES_VAR
build_do_recursive build_collect_o_files :
BUILD_FILES_VAR=${BUILD_PROJECT}_EXTRA_OFILES
build_do_recursive build_collect_extra_o_files :
}
# Start the configure program.
+48 -40
View File
@@ -40,25 +40,29 @@ PROG_tr_FILE="tr"
PROG_tr_ACTION=""
PROG_tr_VERSION=''
PROG_windres_NAME=windres
PROG_windres_FILE=windres
PROG_windres_ACTION=""
PROG_windres_VERSION='windres --version'
# Describe the libaries (possibly) used:
LIB_SDL_NAME="Simple DirectMedia Layer"
if [ `uname` = 'FreeBSD' ]; then
LIB_SDL_CFLAGS='$(sdl11-config --cflags)';
else
LIB_SDL_CFLAGS='$(sdl-config --cflags)';
fi
if [ `uname` = 'FreeBSD' ]; then
LIB_SDL_LDFLAGS='$(sdl11-config --libs)';
else
LIB_SDL_LDFLAGS='$(sdl-config --libs)';
fi
if [ `uname` = 'FreeBSD' ]; then
LIB_SDL_VERSION='$(sdl11-config --version)';
else
LIB_SDL_VERSION='$(sdl-config --version)';
fi
OSNAME=`uname -s`
case "$OSNAME" in
FreeBSD) LIB_SDL_CFLAGS='$(sdl11-config --cflags)' ;;
*) LIB_SDL_CFLAGS='$(sdl-config --cflags)' ;;
esac
case "$OSNAME" in
FreeBSD) LIB_SDL_LDFLAGS='$(sdl11-config --libs)' ;;
*) LIB_SDL_LDFLAGS='$(sdl-config --libs)' ;;
esac
case "$OSNAME" in
FreeBSD) LIB_SDL_VERSION='$(sdl11-config --version)' ;;
*) LIB_SDL_VERSION='$(sdl-config --version)' ;;
esac
LIB_SDL_mixer_NAME="SDL_mixer"
LIB_SDL_mixer_CFLAGS="$LIB_SDL_CFLAGS"
@@ -72,27 +76,28 @@ LIB_SDL_image_VERSION=""
LIB_openal_NAME="OpenAL"
LIB_openal_CFLAGS=""
if [ `uname` = 'FreeBSD' ]; then
LIB_openal_LDFLAGS="-L/usr/local/lib -pthread -lopenal"
elif [ `uname | $PROG_sed_FILE s/^MINGW32.*$/MINGW32/` = 'MINGW32' ]; then
LIB_openal_LDFLAGS="-lopenal32"
else
LIB_openal_LDFLAGS="-lopenal"
fi
case "$OSNAME" in
FreeBSD) LIB_openal_LDFLAGS="-L/usr/local/lib -pthread -lopenal" ;;
MINGW32*) LIB_openal_LDFLAGS="-lopenal32" ;;
*) LIB_openal_LDFLAGS="-lopenal" ;;
esac
LIB_openal_VERSION=""
LIB_opengl_NAME="OpenGL"
if [ `uname` = 'FreeBSD' ]; then
LIB_opengl_CFLAGS="-I/usr/X11R6/include -D_THREAD_SAFE"
LIB_opengl_LDFLAGS="-L/usr/X11R6/lib -lX11 -lXext -pthread -lGL"
elif [ `uname | $PROG_sed_FILE s/^MINGW32.*$/MINGW32/` = 'MINGW32' ]; then
LIB_opengl_CFLAGS=""
LIB_opengl_LDFLAGS="-lopengl32"
else
LIB_opengl_CFLAGS=""
LIB_opengl_LDFLAGS="-lGL"
fi
case "$OSNAME" in
FreeBSD)
LIB_opengl_CFLAGS="-I/usr/X11R6/include -D_THREAD_SAFE"
LIB_opengl_LDFLAGS="-L/usr/X11R6/lib -lX11 -lXext -pthread -lGL"
;;
MINGW32*)
LIB_opengl_CFLAGS=""
LIB_opengl_LDFLAGS="-lopengl32"
;;
*)
LIB_opengl_CFLAGS=""
LIB_opengl_LDFLAGS="-lGL"
;;
esac
LIB_opengl_VERSION=""
LIB_vorbis_NAME="Vorbis"
@@ -101,12 +106,15 @@ LIB_vorbis_LDFLAGS="-lvorbis"
LIB_vorbis_VERSION=""
LIB_vorbisfile_NAME="Vorbisfile"
if [ `uname` = 'FreeBSD' ]; then
LIB_vorbisfile_CFLAGS="-I/usr/local/include"
LIB_vorbisfile_LDFLAGS="-L/usr/local/lib -lvorbisfile -lvorbis"
else
LIB_vorbisfile_CFLAGS=""
LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis"
fi
case "$OSNAME" in
FreeBSD)
LIB_vorbisfile_CFLAGS="-I/usr/local/include"
LIB_vorbisfile_LDFLAGS="-L/usr/local/lib -lvorbisfile -lvorbis"
;;
*)
LIB_vorbisfile_CFLAGS=""
LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis"
;;
esac
LIB_vorbisfile_VERSION=""