[x264-devel] commit: remove $ECHON kludge, which broke on SunOS. bring back `gcc -MT`. ( Loren Merritt )

git version control git at videolan.org
Wed Jan 28 09:50:49 CET 2009


x264 | branch: master | Loren Merritt <pengvado at akuvian.org> | Tue Jan 27 05:42:51 2009 +0000| [1df50b9287c83d5443d19482345b6842b78081c3] | committer: Loren Merritt 

remove $ECHON kludge, which broke on SunOS. bring back `gcc -MT`.
remove auto-reconfigure on svn update, which has done nothing since we stopped using svn.
fix $AS on sparc (was disabled by mmx check).
fix --extra-asflags (was ignored).
mark bash scripts as bash, not sh

patch partly by Greg Robinson and Jugdish.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=1df50b9287c83d5443d19482345b6842b78081c3
---

 Makefile   |    7 +++----
 configure  |   39 +++++++++++++--------------------------
 version.sh |    2 +-
 3 files changed, 17 insertions(+), 31 deletions(-)

diff --git a/Makefile b/Makefile
index fb97d25..57d6e9c 100644
--- a/Makefile
+++ b/Makefile
@@ -93,11 +93,10 @@ checkasm: tools/checkasm.o libx264.a
 
 .depend: config.mak
 	rm -f .depend
-# Hacky - because gcc 2.9x doesn't have -MT
-	$(foreach SRC, $(SRCS) $(SRCCLI), ( $(ECHON) "`dirname $(SRC)`/" && $(CC) $(CFLAGS) $(ALTIVECFLAGS) $(SRC) -MM -g0 ) 1>> .depend;)
+	$(foreach SRC, $(SRCS) $(SRCCLI), $(CC) $(CFLAGS) $(ALTIVECFLAGS) $(SRC) -MT $(SRC:%.c=%.o) -MM -g0 1>> .depend;)
 
-config.mak: $(wildcard .svn/entries */.svn/entries */*/.svn/entries)
-	./configure $(CONFIGURE_ARGS)
+config.mak:
+	./configure
 
 depend: .depend
 ifneq ($(wildcard .depend),)
diff --git a/configure b/configure
index 599b105..e8b57eb 100755
--- a/configure
+++ b/configure
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/bash
 
 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
 
@@ -65,23 +65,11 @@ CFLAGS="$CFLAGS -Wall -I."
 LDFLAGS="$LDFLAGS"
 HAVE_GETOPT_LONG=1
 
-AS="yasm"
+AS=""
 ASFLAGS=""
 
 EXE=""
 
-# check whether 'echo -n' works as expected, otherwise try printf
-if [ "x`echo -n houba`" = xhouba ]
-then
-  ECHON="echo -n"
-elif [ "x`printf houba`" = xhouba ]
-then
-  ECHON="printf"
-else
-  echo "Neither 'echo -n' nor 'printf' are working with your shell!"
-  exit 1
-fi
-
 # parse options
 
 for opt do
@@ -238,7 +226,8 @@ esac
 case $host_cpu in
   i*86)
     ARCH="X86"
-    ASFLAGS="-O2"
+    AS="yasm"
+    ASFLAGS="$ASFLAGS -O2"
     if [ "$SYS" = MACOSX ]; then
       ASFLAGS="$ASFLAGS -f macho -DPREFIX"
     elif [ "$SYS" = MINGW ]; then
@@ -249,8 +238,9 @@ case $host_cpu in
     ;;
   x86_64)
     ARCH="X86_64"
+    AS="yasm"
     if [ "$SYS" = MACOSX ];then
-      ASFLAGS="-f macho64 -m amd64 -DPIC -DPREFIX"
+      ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX"
       CFLAGS="$CFLAGS -arch x86_64"
       LDFLAGS="$LDFLAGS -arch x86_64"
     else
@@ -272,7 +262,7 @@ case $host_cpu in
       CFLAGS="$CFLAGS -mcpu=ultrasparc"
       LDFLAGS="$LDFLAGS -mcpu=ultrasparc"
       AS="as"
-      ASFLAGS="-xarch=v8plusa"
+      ASFLAGS="$ASFLAGS -xarch=v8plusa"
     else
       ARCH="Sparc"
     fi
@@ -310,9 +300,9 @@ if [ $asm = yes -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
         echo "If you really want to compile without asm, configure with --disable-asm."
         exit 1
     fi
-else
-    AS=""
 fi
+[ $asm = no ] && AS=""
+[ "x$AS" = x ] && asm="no"
 
 CFLAGS="$CFLAGS -DARCH_$ARCH -DSYS_$SYS"
 
@@ -425,15 +415,8 @@ EXE=$EXE
 VIS=$vis
 HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
 DEVNULL=$DEVNULL
-ECHON=$ECHON
 EOF
 
-$ECHON 'CONFIGURE_ARGS=' >> config.mak
-for A in "$@" ; do
-    $ECHON " '$A'" >> config.mak
-done
-echo '' >> config.mak
-
 if [ "$shared" = "yes" ]; then
     API=$(grep '#define X264_BUILD' < x264.h | cut -f 3 -d ' ')
     if [ "$SYS" = "MINGW" ]; then
@@ -444,6 +427,10 @@ if [ "$shared" = "yes" ]; then
         echo "SOSUFFIX=dylib" >> config.mak
         echo "SONAME=libx264.$API.dylib" >> config.mak
         echo 'SOFLAGS=-dynamiclib -Wl,-single_module -Wl,-read_only_relocs,suppress -install_name $(DESTDIR)$(libdir)/$(SONAME)' >> config.mak
+    elif [ "$SYS" = "SunOS" ]; then
+        echo "SOSUFFIX=so" >> config.mak
+        echo "SONAME=libx264.so.$API" >> config.mak
+        echo 'SOFLAGS=-Wl,-h,$(SONAME)' >> config.mak
     else
         echo "SOSUFFIX=so" >> config.mak
         echo "SONAME=libx264.so.$API" >> config.mak
diff --git a/version.sh b/version.sh
index 9439702..c877847 100755
--- a/version.sh
+++ b/version.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 git rev-list HEAD | sort > config.git-hash
 LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
 if [ $LOCALVER \> 1 ] ; then



More information about the x264-devel mailing list