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
CC="gcc"
CFLAGS="-Wall -I. -O4 -ffast-math -D__X264__"
LDFLAGS=""
+HAVE_GETOPT_LONG=1
AS="nasm"
ASFLAGS="-f elf"
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
CFLAGS="$CFLAGS -maltivec -mabi=altivec"
fi
;;
+ sun*)
+ ARCH="Sparc"
+ ;;
*)
echo "Unknown platform $UNAMEM, edit the configure"
exit 1
VFW=$vfw
EXE=$EXE
VIS=$vis
+HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
EOF
if [ "$vfw" = "yes" ]; then
#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
__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 != ':') \