[MPlayer-dev-eng] [PATCH] AIX PPC mplayer port
Derek E. Lewis
dlewis at solnetworks.net
Wed Dec 28 10:10:10 CET 2005
On Tue, 27 Dec 2005, Diego Biurrun wrote:
> What's the point of this check? Shouldn't you just add the parameter
> unconditionally for AIX?
Good point. Fixed.
> You're messing up indentation by mixing tabs and spaces here.
This has been fixed, as well.
I had the chance to build Mplayer on a POWER system today and things went
*much* better than I had originally expected, as the POWER4 and 5 seem to
be compatible with the PowerPC (604e and above). I still don't know how
well a build on a POWER3 would go, though.
Also, snow.c and friends build fine on a POWER4, unlike the 604e. I
suspect that gcc is to blame for this.
These patches are for building on AIX 5.1 and higher *only*. AIX 4.3.3 and
lower are untested.
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.1114
diff -u -r1.1114 configure
--- configure 26 Dec 2005 03:16:47 -0000 1.1114
+++ configure 28 Dec 2005 08:57:17 -0000
@@ -75,6 +75,7 @@
sunos() { issystem "SunOS" ; return "$?" ; }
hpux() { issystem "HP-UX" ; return "$?" ; }
irix() { issystem "IRIX" ; return "$?" ; }
+aix() { issystem "AIX" ; return "$?" ; }
cygwin() { issystem "CYGWIN" ; return "$?" ; }
freebsd() { issystem "FreeBSD" ; return "$?" ; }
netbsd() { issystem "NetBSD" ; return "$?" ; }
@@ -479,7 +480,7 @@
# OS name
system_name=`uname -s 2>&1`
case "$system_name" in
- Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS)
+ Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS|AIX)
;;
IRIX*)
system_name=IRIX
@@ -2337,6 +2338,15 @@
echores "no"
fi
+echocheck "AIX"
+if aix; then
+ _ld_libC="-lC"
+ echores "yes"
+else
+ _ld_libC=""
+ echores "no"
+fi
+
# Checking for localization ...
# CSAK EGY MARADHAT - A HEGYLAKO
echocheck "i18n"
@@ -7095,6 +7105,7 @@
ENCA_LIB = $_ld_enca
HAVE_PTHREADS = $_pthreads
MATH_LIB = $_ld_lm
+LIBC_LIB = $_ld_libC
X11_INC = $_inc_x11
X11DIR = $_ld_x11
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.333
diff -u -r1.333 Makefile
--- Makefile 16 Nov 2005 10:38:23 -0000 1.333
+++ Makefile 28 Dec 2005 08:57:51 -0000
@@ -395,6 +395,7 @@
$(ARCH_LIB) \
$(I18NLIBS) \
$(MATH_LIB) \
+ $(LIBC_LIB) \
$(PRG): $(MPLAYER_DEP)
ifeq ($(TARGET_WIN32),yes)
@@ -424,6 +425,7 @@
$(ARCH_LIB) \
$(I18NLIBS) \
$(MATH_LIB) \
+ $(LIBC_LIB) \
$(PRG_MENCODER): $(MENCODER_DEP)
$(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) $(LIBS_MENCODER)
Index: osdep/getch2.c
===================================================================
RCS file: /cvsroot/mplayer/main/osdep/getch2.c,v
retrieving revision 1.21
diff -u -r1.21 getch2.c
--- osdep/getch2.c 25 Dec 2005 18:26:35 -0000 1.21
+++ osdep/getch2.c 28 Dec 2005 08:58:16 -0000
@@ -221,7 +221,7 @@
void getch2_enable(){
#ifdef HAVE_TERMIOS
struct termios tio_new;
-#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__) || defined(_AIX)
tcgetattr(0,&tio_orig);
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
ioctl(0,TIOCGETA,&tio_orig);
@@ -232,7 +232,7 @@
tio_new.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON and ECHO. */
tio_new.c_cc[VMIN] = 1;
tio_new.c_cc[VTIME] = 0;
-#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__) || defined(_AIX)
tcsetattr(0,TCSANOW,&tio_new);
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
ioctl(0,TIOCSETA,&tio_new);
@@ -246,7 +246,7 @@
void getch2_disable(){
if(!getch2_status) return; // already disabled / never enabled
#ifdef HAVE_TERMIOS
-#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__) || defined(_AIX)
tcsetattr(0,TCSANOW,&tio_orig);
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
ioctl(0,TIOCSETA,&tio_orig);
More information about the MPlayer-dev-eng
mailing list