[x264-devel] x264 not building with Sun Studio

hajma tropikhajma at gmail.com
Wed May 20 00:20:02 CEST 2009


Hi,
when trying to build x264 (x264-snapshot-20090518-2245) on OpenSolaris
using Sun Studio 12 Update 1, configure passes options incompatible
with SS12 to the Makefile. The below patch fixes the problem.

best regards

hajma

--- ../orig/x264-snapshot-20090518-2245/configure.orig	2009-05-18
22:45:08.000000000 +0200
+++ configure	2009-05-19 13:08:25.536862800 +0200
@@ -61,7 +61,15 @@
 vis="no"
 shared="no"

-CFLAGS="$CFLAGS -Wall -I."
+if $CC -v 2>&1 | grep -q gcc; then
+	CFLAGS="$CFLAGS -Wall -I."
+	MMOPTION="-MM"
+elif $CC -V 2>&1 | grep -q Sun; then
+	CFLAGS="$CFLAGS -I."
+	MMOPTION="-xM1"
+else
+	echo "unknown cc, FIXME"
+fi
 LDFLAGS="$LDFLAGS"
 ASFLAGS="$ASFLAGS"
 HAVE_GETOPT_LONG=1
@@ -442,6 +450,7 @@
 VIS=$vis
 HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
 DEVNULL=$DEVNULL
+MMOPTION=$MMOPTION
 EOF

 if [ "$shared" = "yes" ]; then



--- ../orig/x264-snapshot-20090518-2245/Makefile.orig	2009-05-18
22:45:08.000000000 +0200
+++ Makefile	2009-05-19 13:11:01.282470013 +0200
@@ -93,7 +93,7 @@

 .depend: config.mak
 	rm -f .depend
-	$(foreach SRC, $(SRCS) $(SRCCLI), $(CC) $(CFLAGS) $(ALTIVECFLAGS)
$(SRC) -MT $(SRC:%.c=%.o) -MM -g0 1>> .depend;)
+	$(foreach SRC, $(SRCS) $(SRCCLI), $(CC) $(CFLAGS) $(ALTIVECFLAGS)
$(SRC) -MT $(SRC:%.c=%.o) $(MMOPTION) -g0 1>> .depend;)

 config.mak:
 	./configure


More information about the x264-devel mailing list