mirror of
https://github.com/mpv-player/mpv
synced 2024-12-18 12:55:16 +00:00
AIX PPC port
patch by "Derek E. Lewis" < -- dlewis -- @ -- solnetworks -- . -- net -- > git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17265 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
92a1ac27cb
commit
2b1310abba
2
Makefile
2
Makefile
@ -395,6 +395,7 @@ LIBS_MPLAYER = libvo/libvo.a \
|
|||||||
$(ARCH_LIB) \
|
$(ARCH_LIB) \
|
||||||
$(I18NLIBS) \
|
$(I18NLIBS) \
|
||||||
$(MATH_LIB) \
|
$(MATH_LIB) \
|
||||||
|
$(LIBC_LIB) \
|
||||||
|
|
||||||
$(PRG): $(MPLAYER_DEP)
|
$(PRG): $(MPLAYER_DEP)
|
||||||
ifeq ($(TARGET_WIN32),yes)
|
ifeq ($(TARGET_WIN32),yes)
|
||||||
@ -424,6 +425,7 @@ LIBS_MENCODER = libmpcodecs/libmpencoders.a \
|
|||||||
$(ARCH_LIB) \
|
$(ARCH_LIB) \
|
||||||
$(I18NLIBS) \
|
$(I18NLIBS) \
|
||||||
$(MATH_LIB) \
|
$(MATH_LIB) \
|
||||||
|
$(LIBC_LIB) \
|
||||||
|
|
||||||
$(PRG_MENCODER): $(MENCODER_DEP)
|
$(PRG_MENCODER): $(MENCODER_DEP)
|
||||||
$(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) $(LIBS_MENCODER)
|
$(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) $(LIBS_MENCODER)
|
||||||
|
27
configure
vendored
27
configure
vendored
@ -75,6 +75,7 @@ linux() { issystem "Linux" ; return "$?" ; }
|
|||||||
sunos() { issystem "SunOS" ; return "$?" ; }
|
sunos() { issystem "SunOS" ; return "$?" ; }
|
||||||
hpux() { issystem "HP-UX" ; return "$?" ; }
|
hpux() { issystem "HP-UX" ; return "$?" ; }
|
||||||
irix() { issystem "IRIX" ; return "$?" ; }
|
irix() { issystem "IRIX" ; return "$?" ; }
|
||||||
|
aix() { issystem "AIX" ; return "$?" ; }
|
||||||
cygwin() { issystem "CYGWIN" ; return "$?" ; }
|
cygwin() { issystem "CYGWIN" ; return "$?" ; }
|
||||||
freebsd() { issystem "FreeBSD" ; return "$?" ; }
|
freebsd() { issystem "FreeBSD" ; return "$?" ; }
|
||||||
netbsd() { issystem "NetBSD" ; return "$?" ; }
|
netbsd() { issystem "NetBSD" ; return "$?" ; }
|
||||||
@ -479,7 +480,7 @@ if test -z "$_target" ; then
|
|||||||
# OS name
|
# OS name
|
||||||
system_name=`uname -s 2>&1`
|
system_name=`uname -s 2>&1`
|
||||||
case "$system_name" in
|
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*)
|
IRIX*)
|
||||||
system_name=IRIX
|
system_name=IRIX
|
||||||
@ -597,6 +598,12 @@ if darwin; then
|
|||||||
_ldd="otool -L"
|
_ldd="otool -L"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if aix ; then
|
||||||
|
_ld_libC="-lC"
|
||||||
|
else
|
||||||
|
_ld_libC=""
|
||||||
|
fi
|
||||||
|
|
||||||
# Check how to call 'head' and 'tail'. Newer versions spit out warnings
|
# 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
|
# if used as 'head -1' instead of 'head -n 1', but older versions don't
|
||||||
# know about '-n'.
|
# know about '-n'.
|
||||||
@ -760,6 +767,9 @@ elif test -r /compat/linux/proc/cpuinfo && not x86 ; then
|
|||||||
elif darwin ; then
|
elif darwin ; then
|
||||||
# use hostinfo on Darwin
|
# use hostinfo on Darwin
|
||||||
_cpuinfo="hostinfo"
|
_cpuinfo="hostinfo"
|
||||||
|
elif aix; then
|
||||||
|
# use 'lsattr' on AIX
|
||||||
|
_cpuinfo="lsattr -E -l proc0"
|
||||||
elif x86; then
|
elif x86; then
|
||||||
# all other OSes try to extract CPU information from a small helper
|
# all other OSes try to extract CPU information from a small helper
|
||||||
# program TOOLS/cpuinfo instead
|
# program TOOLS/cpuinfo instead
|
||||||
@ -1181,6 +1191,9 @@ EOF
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
AIX)
|
||||||
|
proc=`$_cpuinfo | grep 'type' | cut -f 7 -d ' ' | sed 's/PowerPC_//'`
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
if test "$_altivec" = yes; then
|
if test "$_altivec" = yes; then
|
||||||
echores "$proc altivec"
|
echores "$proc altivec"
|
||||||
@ -1198,6 +1211,9 @@ EOF
|
|||||||
604|604e|604r|604ev) _march='-mcpu=604' _mcpu='-mtune=604' ;;
|
604|604e|604r|604ev) _march='-mcpu=604' _mcpu='-mtune=604' ;;
|
||||||
740|740/750|745/755) _march='-mcpu=740' _mcpu='-mtune=740' ;;
|
740|740/750|745/755) _march='-mcpu=740' _mcpu='-mtune=740' ;;
|
||||||
750|750CX) _march='-mcpu=750' _mcpu='-mtune=750' ;;
|
750|750CX) _march='-mcpu=750' _mcpu='-mtune=750' ;;
|
||||||
|
POWER) _march='-mcpu=power' _mcpu='-mtune=power' ;;
|
||||||
|
POWER2) _march='-mcpu=power2' _mcpu='-mtune=power2' ;;
|
||||||
|
POWER3) _march='-mcpu=power3' _mcpu='-mtune=power3' ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
# gcc 3.1(.1) and up supports 7400 and 7450
|
# gcc 3.1(.1) and up supports 7400 and 7450
|
||||||
@ -1216,6 +1232,14 @@ EOF
|
|||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
# gcc 3.3 and up supports POWER4
|
||||||
|
if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" || test "$_cc_major" -ge "4"; then
|
||||||
|
case "$proc" in
|
||||||
|
POWER4) _march='-mcpu=power4' _mcpu='-mtune=power4'
|
||||||
|
_def_dcbzl='#undef NO_DCBZL' ;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$_mcpu"; then
|
if test -n "$_mcpu"; then
|
||||||
@ -7095,6 +7119,7 @@ STATIC_LIB = $_ld_static
|
|||||||
ENCA_LIB = $_ld_enca
|
ENCA_LIB = $_ld_enca
|
||||||
HAVE_PTHREADS = $_pthreads
|
HAVE_PTHREADS = $_pthreads
|
||||||
MATH_LIB = $_ld_lm
|
MATH_LIB = $_ld_lm
|
||||||
|
LIBC_LIB = $_ld_libC
|
||||||
|
|
||||||
X11_INC = $_inc_x11
|
X11_INC = $_inc_x11
|
||||||
X11DIR = $_ld_x11
|
X11DIR = $_ld_x11
|
||||||
|
@ -220,7 +220,7 @@ static int getch2_status=0;
|
|||||||
void getch2_enable(){
|
void getch2_enable(){
|
||||||
#ifdef HAVE_TERMIOS
|
#ifdef HAVE_TERMIOS
|
||||||
struct termios tio_new;
|
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);
|
tcgetattr(0,&tio_orig);
|
||||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
|
||||||
ioctl(0,TIOCGETA,&tio_orig);
|
ioctl(0,TIOCGETA,&tio_orig);
|
||||||
@ -231,7 +231,7 @@ struct termios tio_new;
|
|||||||
tio_new.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON and ECHO. */
|
tio_new.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON and ECHO. */
|
||||||
tio_new.c_cc[VMIN] = 1;
|
tio_new.c_cc[VMIN] = 1;
|
||||||
tio_new.c_cc[VTIME] = 0;
|
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);
|
tcsetattr(0,TCSANOW,&tio_new);
|
||||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
|
||||||
ioctl(0,TIOCSETA,&tio_new);
|
ioctl(0,TIOCSETA,&tio_new);
|
||||||
@ -245,7 +245,7 @@ struct termios tio_new;
|
|||||||
void getch2_disable(){
|
void getch2_disable(){
|
||||||
if(!getch2_status) return; // already disabled / never enabled
|
if(!getch2_status) return; // already disabled / never enabled
|
||||||
#ifdef HAVE_TERMIOS
|
#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);
|
tcsetattr(0,TCSANOW,&tio_orig);
|
||||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
|
||||||
ioctl(0,TIOCSETA,&tio_orig);
|
ioctl(0,TIOCSETA,&tio_orig);
|
||||||
|
Loading…
Reference in New Issue
Block a user