[MPlayer-dev-eng] [PATCH] use $_exesuf in configure for tmp files that might get executed

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Aug 2 11:11:07 CEST 2007


Hello,
IMO it would be more correct to do it like this and also helps porting
to OSs that rely a bit too much on file extensions.

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 23992)
+++ configure	(working copy)
@@ -1278,10 +1278,6 @@
 
 TMPLOG="configure.log"
 rm -f "$TMPLOG"
-TMPC="$I/mplayer-conf-$RANDOM-$$.c"
-TMPCPP="$I/mplayer-conf-$RANDOM-$$.cpp"
-TMPO="$I/mplayer-conf-$RANDOM-$$.o"
-TMPS="$I/mplayer-conf-$RANDOM-$$.S"
 
 echo configuration: $_configuration > "$TMPLOG"
 echo >> "$TMPLOG"
@@ -1347,7 +1343,12 @@
 if qnx ; then
   _ld_extra="$_ld_extra -lph"
 fi
 
+TMPC="$I/mplayer-conf-$RANDOM-$$.c"
+TMPCPP="$I/mplayer-conf-$RANDOM-$$.cpp"
+TMPO="$I/mplayer-conf-$RANDOM-$$$_exesuf"
+TMPS="$I/mplayer-conf-$RANDOM-$$.S"
+
 # Check how to call 'head' and 'tail'. Newer versions spit out warnings
 # if used as 'head -1' instead of 'head -n 1', but older versions don't
 # know about '-n'.
@@ -1518,8 +1520,8 @@
 elif x86; then
   # all other OSes try to extract CPU information from a small helper
   # program cpuinfo instead
-  $_cc -o cpuinfo cpuinfo.c
-  _cpuinfo="./cpuinfo"
+  $_cc -o cpuinfo$_exesuf cpuinfo.c
+  _cpuinfo="./cpuinfo$_exesuf"
 fi
 
 if x86 ; then


More information about the MPlayer-dev-eng mailing list