Commit 6ec3ec06 authored by Loren Merritt's avatar 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.
parent 0e43d5d9
......@@ -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),)
......
#! /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
......
#!/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
......
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