Commit da60272b authored by Laurent Aimar's avatar Laurent Aimar

* Add support for UltraSparc (uname -m: sun4u) with Solaris.

 Patch by Tuukka Toivonen.


git-svn-id: svn://svn.videolan.org/x264/trunk@272 df754926-b1dd-0310-bc7b-ec298dee348c
parent 95c40715
......@@ -37,6 +37,13 @@ ifeq ($(ARCH),PPC)
SRCS += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c
endif
ifneq ($(HAVE_GETOPT_LONG),1)
SRCS += extras/getopt.c
CFLAGS += -DHAVE_GETOPT_LONG=0
else
CFLAGS += -DHAVE_GETOPT_LONG=1
endif
OBJS = $(SRCS:%.c=%.o)
DEP = depend
......
......@@ -35,6 +35,7 @@ vis="no"
CC="gcc"
CFLAGS="-Wall -I. -O4 -ffast-math -D__X264__"
LDFLAGS=""
HAVE_GETOPT_LONG=1
AS="nasm"
ASFLAGS="-f elf"
......@@ -73,6 +74,12 @@ case "$UNAMES" in
ASFLAGS="-f win32 -DPREFIX"
EXE=".exe"
;;
SunOS)
SYS="SunOS"
CFLAGS="$CFLAGS -DHAVE_MALLOC_H"
LDFLAGS="$LDFLAGS -lm"
HAVE_GETOPT_LONG=0
;;
*)
echo "Unknown system $UNAMES, edit the configure"
exit 1
......@@ -100,6 +107,9 @@ case "$UNAMEM" in
CFLAGS="$CFLAGS -maltivec -mabi=altivec"
fi
;;
sun*)
ARCH="Sparc"
;;
*)
echo "Unknown platform $UNAMEM, edit the configure"
exit 1
......@@ -204,6 +214,7 @@ ASFLAGS=$ASFLAGS
VFW=$vfw
EXE=$EXE
VIS=$vis
HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
EOF
if [ "$vfw" = "yes" ]; then
......
......@@ -40,7 +40,7 @@
#if defined(SYS_FREEBSD) || defined(SYS_BEOS)
#define exp2f(x) powf( 2, (x) )
#endif
#ifdef _MSC_VER
#if defined(_MSC_VER) || defined(SYS_SunOS)
#define exp2f(x) pow( 2, (x) )
#define sqrtf sqrt
#endif
......
......@@ -63,11 +63,15 @@ char *optarg; /* argument associated with option */
__weak_alias(getopt_long,_getopt_long)
#endif
#if 0
#ifndef __CYGWIN__
#define __progname __argv[0]
#else
extern char *__progname;
#endif
#else
char *__progname = "x264";
#endif
#define IGNORE_FIRST (*options == '-' || *options == '+')
#define PRINT_ERROR ((opterr) && ((*options != ':') \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment