[Scummvm-cvs-logs] CVS: scummvm configure,1.11,1.12 .cvsignore,1.6,1.7

Jonathan Gray khalek at users.sourceforge.net
Sun May 18 04:24:07 CEST 2003


Update of /cvsroot/scummvm/scummvm
In directory sc8-pr-cvs1:/tmp/cvs-serv24226

Modified Files:
	configure .cvsignore 
Log Message:
make less broken

Index: configure
===================================================================
RCS file: /cvsroot/scummvm/scummvm/configure,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- configure	18 May 2003 09:54:28 -0000	1.11
+++ configure	18 May 2003 11:23:12 -0000	1.12
@@ -17,6 +17,9 @@
 # * generate a config.mak file for use in makefiles
 # * ....
 
+TMPC=scummvm-conf.cpp
+TMPO=scummvm-conf
+TMPLOG=config.log
 
 # default lib behaviour yes/no/auto
 _vorbis=auto
@@ -28,7 +31,22 @@
 _build_sky=yes
 # binary names
 _ranlib=ranlib
+_ldd=ldd
 
+cc_check() {
+  echo >> "$TMPLOG"
+  cat "$TMPC" >> "$TMPLOG"
+  echo >> "$TMPLOG"
+  echo "$CXX $TMPC -o $TMPO $@" >> "$TMPLOG"
+  rm -f "$TMPO"
+  ( $CXX "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1
+  TMP="$?"
+  echo >> "$TMPLOG"
+  echo "ldd $TMPO" >> "$TMPLOG"
+  ( $_ldd "$TMPO" ) >> "$TMPLOG" 2>&1
+  echo >> "$TMPLOG"
+  return "$TMP"
+}
 
 echocheck () {
   echo -n "Checking for $@... "
@@ -275,12 +293,11 @@
 echocheck "Ogg Vorbis"
 if test "$_vorbis" = auto ; then
   _vorbis=no
-  cat > tmp_vorbis_check.cpp << EOF
+  cat > $TMPC << EOF
 #include <vorbis/codec.h>
 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
 EOF
-  $CXX -lvorbis -logg -lm -o tmp_vorbis_check tmp_vorbis_check.cpp && _vorbis=yes
-  rm tmp_vorbis_check tmp_vorbis_check.cpp 2> /dev/null
+  cc_check -lvorbis -logg -lm && _vorbis=yes
 fi
 if test "$_vorbis" = yes ; then
   echo "#define USE_VORBIS" >> config.h
@@ -293,12 +310,11 @@
 echocheck "MAD"
 if test "$_mad" = auto ; then
   _mad=no
-  cat > tmp_mad.cpp << EOF
+  cat > $TMPC << EOF
 #include <mad.h>
 int main(void) {return 0; }
 EOF
-  $CXX tmp_mad.cpp -lmad && _mad=yes
-  rm tmp_mad.cpp tmp_mad 2> /dev/null
+  cc_check -lmad && _mad=yes
 fi
 if test "$_mad" = yes ; then
   echo "#define USE_MAD" >> config.h
@@ -311,12 +327,11 @@
 echocheck "ALSA 9"
 if test "$_alsa" = auto ; then
   _alsa=no
-  cat > tmp_alsa.cpp << EOF
+  cat > $TMPC << EOF
 #include <alsa/asoundlib.h>
 int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); }
 EOF
-  $CXX -lasound -o tmp_alsa tmp_alsa.cpp && _alsa=yes
-  rm tmp_alsa tmp_alsa.cpp 2> /dev/null
+  cc_check -lasound && _alsa=yes
 fi
 if test "$_alsa" = yes ; then
   echo "#define USE_ALSA" >> config.h
@@ -325,6 +340,8 @@
   echo "#undef USE_ALSA" >> config.h
 fi
 echo "$_alsa"
+
+rm -f $TMPC $TMPO
 
 #
 # End of config.h

Index: .cvsignore
===================================================================
RCS file: /cvsroot/scummvm/scummvm/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- .cvsignore	18 May 2003 09:54:28 -0000	1.6
+++ .cvsignore	18 May 2003 11:23:12 -0000	1.7
@@ -5,5 +5,6 @@
 build.rules
 config.h
 config.mak
+config.log
 scummvm
 ScummVM.app





More information about the Scummvm-git-logs mailing list