[MPlayer-cvslog] CVS: main configure,1.1055,1.1056

Nicolas Plourde CVS syncmail at mplayerhq.hu
Sat Sep 10 20:44:20 CEST 2005


CVS change done by Nicolas Plourde CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv4309

Modified Files:
	configure 
Log Message:
perl check for macosx

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.1055
retrieving revision 1.1056
diff -u -r1.1055 -r1.1056
--- configure	10 Sep 2005 18:38:21 -0000	1.1055
+++ configure	10 Sep 2005 18:44:17 -0000	1.1056
@@ -45,12 +45,23 @@
   return "$TMP"
 }
 
+perl_check() {
+  echo >> "$TMPLOG"
+  cat "$TMPP" >> "$TMPLOG"
+  echo >> "$TMPLOG"
+  echo "perl $TMPP" >> "$TMPLOG"
+  perl "$TMPP" >> "$TMPLOG" 2>&1
+  TMP="$?"
+  echo >> "$TMPLOG"
+  return "$TMP"
+}
+
 # Display error message, flushes tempfile, exit
 die () {
   echo
   echo "Error: $@" >&2
   echo >&2
-  rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
+  rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP" "TMPP"
   echo "Check \"$TMPLOG\" if you do not understand why it failed."
   exit 1
 }
@@ -547,6 +558,7 @@
 TMPCPP="$I/mplayer-conf-$RANDOM-$$.cpp"
 TMPO="$I/mplayer-conf-$RANDOM-$$.o"
 TMPS="$I/mplayer-conf-$RANDOM-$$.S"
+TMPP="$I/mplayer-conf-$RANDOM-$$.perl"
 
 # config files
 
@@ -3263,7 +3275,35 @@
 
 echocheck "Mac OS X APIs"
 if test "$_macosx" = auto ; then
-    if darwin && ppc; then
+
+cat > $TMPP <<EOF
+\$/ = \0;
+
+open( PLIST, "/System/Library/CoreServices/SystemVersion.plist") || do {
+	print "Failed to open SystemVersion.plist\n";
+	exit (1);
+};
+
+\$plistData = <PLIST>;
+\$plistData =~ /<dict>(.*?)<\/dict>/gis;
+ at items = split(/<key>/, \$plistData);
+
+shift @items;
+foreach \$item (@items) {
+	\$item =~ /(.*?)<\/key>.*?<string>(.*?)<\/string>/gis;
+        \$versiondata{ \$1 } = \$2;
+}
+
+close(PLIST);
+
+if( \$versiondata{"ProductName"} eq  "Mac OS X") {
+	exit(0);
+}
+
+exit(1);
+EOF
+
+	if perl_check; then 
         _macosx=yes
     else
 	_macosx=no
@@ -7958,4 +7998,4 @@
 fi
 
 # Last move:
-rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"
+rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP" "$TMPP"




More information about the MPlayer-cvslog mailing list