]> git.sesse.net Git - x264/commitdiff
* Add support for UltraSparc (uname -m: sun4u) with Solaris.
authorLaurent Aimar <fenrir@videolan.org>
Thu, 7 Jul 2005 07:48:36 +0000 (07:48 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 7 Jul 2005 07:48:36 +0000 (07:48 +0000)
 Patch by Tuukka Toivonen.

git-svn-id: svn://svn.videolan.org/x264/trunk@272 df754926-b1dd-0310-bc7b-ec298dee348c

Makefile
configure
encoder/ratecontrol.c
extras/getopt.c

index 687146d8a23016160ba53fadcf6f86298f9d4738..a4d8ef1bf263446cf0380a6cc9b3bda0b526db8f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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
 
index e12ffaf97ef21ead1566f8c78271f2fd9dcf8444..f4eb03bdd852312f4d1e057498d5ccd3c52d3fe1 100755 (executable)
--- a/configure
+++ b/configure
@@ -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
index 0360654926a318f14b17f185bc3140a39cc46714..e073802f4be86442dbc0494f75dd6419feaef13f 100644 (file)
@@ -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
index 3b5e196bef2b7d70ed15c4ae22c024b828a2f574..8ff165f869bdb82a53d331fad9392e128477f79f 100644 (file)
@@ -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 != ':') \