move writing config.h to end of file

svn-id: r7714
This commit is contained in:
Jonathan Gray 2003-05-20 10:15:38 +00:00
parent 50bcac3a04
commit ad92ffa06d

101
configure vendored
View File

@ -110,12 +110,6 @@ echo $datatype
#
echo "Running ScummVM configure..."
echo "/* This file is automatically generated by configure */" > config.h
echo "/* DO NOT EDIT MANUALLY */" >> config.h
echo "" >> config.h
echo "#ifndef CONFIG_H" >> config.h
echo "#define CONFIG_H" >> config.h
echo "" >> config.h
#
@ -182,23 +176,23 @@ fi
# Engine selection
if test "$_build_scumm" = no ; then
echo "#define DISABLE_SCUMM" >> config.h
_def_scumm='#define DISABLE_SCUMM'
else
echo "#undef DISABLE_SCUMM" >> config.h
_def_scumm='#undef DISABLE_SCUMM'
fi
if test "$_build_simon" = no ; then
echo "#define DISABLE_SIMON" >> config.h
_def_simon='#define DISABLE_SIMON'
else
echo "#undef DISABLE_SIMON" >> config.h
_def_simon='#undef DISABLE_SIMON'
fi
if test "$_build_sky" = no ; then
echo "#define DISABLE_SKY" >> config.h
_def_sky='#define DISABLE_SKY'
else
echo "#undef DISABLE_SKY" >> config.h
_def_sky='#undef DISABLE_SKY'
fi
echo >> config.h
#
# Determine hosttype
@ -210,15 +204,15 @@ hosttype=`uname -s`
echo $hosttype
case $hosttype in
Linux | OpenBSD | FreeBSD | NetBSD | BSD/OS | SunOS | HP-UX)
echo "/* #define UNIX */" >> config.h
_def_unix='/* #define UNIX */'
;;
IRIX)
echo "/* #define UNIX */" >> config.h
_def_unix='/* #define UNIX */'
ranlib=ar -r
;;
Darwin)
echo "/* #define UNIX */" >> config.h
echo "#define MACOSX" >> config.h
_def_unix='/* #define UNIX */'
_def_macosx='#define MACOSX'
LIBS="$LIBS -framework QuickTime -framework AudioUnit"
;;
esac
@ -248,10 +242,10 @@ endianess=`./tmp_endianess_check`
echo $endianess;
case $endianess in
big)
echo "#define SCUMM_BIG_ENDIAN" >> config.h
_def_endianess='#define SCUMM_BIG_ENDIAN'
;;
little)
echo "#define SCUMM_LITTLE_ENDIAN" >> config.h
_def_endianess='#define SCUMM_LITTLE_ENDIAN'
;;
*)
exit 1
@ -267,9 +261,9 @@ EOF
_need_memalign=yes
cc_check && _need_memalign=no
if test "$_need_memalign" = yes ; then
echo "#define SCUMM_NEED_ALIGNMENT" >> config.h
_def_align='#define SCUMM_NEED_ALIGNMENT'
else
echo "#undef SCUMM_NEED_ALIGNMENT" >> config.h
_def_align='#undef SCUMM_NEED_ALIGNMENT'
fi
echo "$_need_memalign"
@ -289,19 +283,7 @@ printf "Type with 4 bytes... "
type_4_byte=`find_type_with_size 4`
echo "$type_4_byte"
echo >> config.h
echo "/* Data types */" >> config.h
echo "typedef unsigned $type_1_byte byte;" >> config.h
echo "typedef unsigned int uint;" >> config.h
echo "typedef unsigned $type_1_byte uint8;" >> config.h
echo "typedef unsigned $type_2_byte uint16;" >> config.h
echo "typedef unsigned $type_4_byte uint32;" >> config.h
echo "typedef signed $type_1_byte int8;" >> config.h
echo "typedef signed $type_2_byte int16;" >> config.h
echo "typedef signed $type_4_byte int32;" >> config.h
echo >> config.h
echo "/* Libs */" >> config.h
echocheck "Ogg Vorbis"
if test "$_vorbis" = auto ; then
_vorbis=no
@ -312,10 +294,10 @@ EOF
cc_check -lvorbis -logg -lm && _vorbis=yes
fi
if test "$_vorbis" = yes ; then
echo "#define USE_VORBIS" >> config.h
_def_vorbis='#define USE_VORBIS'
LIBS="$LIBS -lvorbisfile -lvorbis -logg"
else
echo "#undef USE_VORBIS" >> config.h
_def_vorbis='#undef USE_VORBIS'
fi
echo "$_vorbis"
@ -329,10 +311,10 @@ EOF
cc_check -lmad && _mad=yes
fi
if test "$_mad" = yes ; then
echo "#define USE_MAD" >> config.h
_def_mad='#define USE_MAD'
LIBS="$LIBS -lmad"
else
echo "#undef USE_MAD" >> config.h
_def_mad='#undef USE_MAD'
fi
echo "$_mad"
@ -346,20 +328,15 @@ EOF
cc_check -lasound && _alsa=yes
fi
if test "$_alsa" = yes ; then
echo "#define USE_ALSA" >> config.h
_def_alsa='#define USE_ALSA'
LIBS="$LIBS -lasound"
else
echo "#undef USE_ALSA" >> config.h
_def_alsa='#undef USE_ALSA'
fi
echo "$_alsa"
rm -f $TMPC $TMPO $TMPLOG
#
# End of config.h
#
echo "" >> config.h
echo "#endif /* CONFIG_H */" >> config.h
echo
echo "Engines:"
@ -374,6 +351,42 @@ if test "$_build_sky" = yes ; then
fi
echo
echo "Creating config.h"
cat > config.h << EOF
/* This file is automatically generated by configure */
/* DO NOT EDIT MANUALLY */
#ifndef CONFIG_H
#define CONFIG_H
$_def_scumm
$_def_simon
$_def_sky
$_def_unix
$_def_macosx
$_def_endianess
$_def_align
/* Data types */
typedef unsigned $type_1_byte byte;
typedef unsigned int uint;
typedef unsigned $type_1_byte uint8;
typedef unsigned $type_2_byte uint16;
typedef unsigned $type_4_byte uint32;
typedef signed $type_1_byte int8;
typedef signed $type_2_byte int16;
typedef signed $type_4_byte int32;
/* Libs */
$_def_vorbis
$_def_mad
$_def_alsa
#endif /* CONFIG_H */
EOF
echo "Creating config.mak"
cat > config.mak << EOF
# -------- Generated by configure -----------