[Scummvm-cvs-logs] CVS: scummvm configure,1.17,1.18
Jonathan Gray
khalek at users.sourceforge.net
Tue May 20 03:16:09 CEST 2003
Update of /cvsroot/scummvm/scummvm
In directory sc8-pr-cvs1:/tmp/cvs-serv11964
Modified Files:
configure
Log Message:
move writing config.h to end of file
Index: configure
===================================================================
RCS file: /cvsroot/scummvm/scummvm/configure,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- configure 20 May 2003 09:43:33 -0000 1.17
+++ configure 20 May 2003 10:15:38 -0000 1.18
@@ -110,12 +110,6 @@
#
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 @@
# 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 @@
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 @@
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 @@
_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 @@
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 @@
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 @@
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 @@
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:"
@@ -373,6 +350,42 @@
echo " Beneath a Steel Sky"
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
More information about the Scummvm-git-logs
mailing list