[Mplayer-cvslog] CVS: main Makefile,1.270,1.271 configure,1.746,1.747

Alex Beregszaszi alex at mplayerhq.hu
Mon Aug 11 22:53:22 CEST 2003


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv2138

Modified Files:
	Makefile configure 
Log Message:
Simplified/fixed altivec/altivec.h detection on Linux and Darwin (and others). Patch by Magnus Damm <damm at opensource.se>

Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.270
retrieving revision 1.271
diff -u -r1.270 -r1.271
--- Makefile	3 Aug 2003 18:33:04 -0000	1.270
+++ Makefile	11 Aug 2003 20:52:24 -0000	1.271
@@ -40,14 +40,6 @@
 
 CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(FREETYPE_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(SDL_INC) $(X11_INC) $(FRIBIDI_INC) # -Wall
 
-ifeq ($(TARGET_ALTIVEC),yes)
-ifeq ($(TARGET_OS),Darwin)
-CFLAGS += -faltivec
-else
-CFLAGS += -maltivec -mabi=altivec
-endif
-endif
-
 PARTS = libmpdemux libmpcodecs mp3lib liba52 libmpeg2 libavcodec libao2 drivers osdep postproc input libvo libaf
 ifeq ($(VIDIX),yes)
 PARTS += libdha vidix

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.746
retrieving revision 1.747
diff -u -r1.746 -r1.747
--- configure	10 Aug 2003 15:54:25 -0000	1.746
+++ configure	11 Aug 2003 20:52:24 -0000	1.747
@@ -865,6 +865,7 @@
     proc=''
     _march=''
     _mcpu=''
+    _altivec_gcc_flags=''
     # XXX: this should be removed imho...
     cpu750=`$_cpuinfo | grep "cpu.*750"`
     if test -n "$cpu750"; then
@@ -875,11 +876,13 @@
 	proc=`$_cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ',' -f 1 | cut -b 2- | head -1`
 	if test -n "`$_cpuinfo | grep altivec`"; then
 	    _altivec=yes
+            _altivec_gcc_flags='-maltivec -mabi=altivec'
 	fi
     fi
     if darwin ; then
 	if [ `sysctl -n hw.vectorunit` -eq 1 ]; then
 	    _altivec=yes
+            _altivec_gcc_flags='-faltivec'
  	fi
     fi
     if test -n "$proc"; then
@@ -901,6 +904,7 @@
     	    esac
 	fi
     fi
+    _mcpu="$_mcpu $_altivec_gcc_flags"
     ;;
 
   alpha)
@@ -2045,7 +2049,7 @@
 int main(void) { return 0; }
 EOF
 _have_altivec_h=no
-cc_check && _have_altivec_h=yes
+cc_check $_altivec_gcc_flags && _have_altivec_h=yes
 if test "$_have_altivec_h" = yes ; then
   _def_altivec_h='#define HAVE_ALTIVEC_H 1'
 else



More information about the MPlayer-cvslog mailing list