Commit 0fe97f42 authored by Eric Petit's avatar Eric Petit
Browse files

Check whether 'echo -n' works, otherwise try printf (fixes build on current OS X 10.5)


git-svn-id: svn://svn.videolan.org/x264/trunk@616 df754926-b1dd-0310-bc7b-ec298dee348c
parent bbc68bea
...@@ -92,7 +92,7 @@ common/i386/*.o: common/i386/i386inc.asm ...@@ -92,7 +92,7 @@ common/i386/*.o: common/i386/i386inc.asm
.depend: config.mak .depend: config.mak
rm -f .depend rm -f .depend
# Hacky - because gcc 2.9x doesn't have -MT # Hacky - because gcc 2.9x doesn't have -MT
$(foreach SRC, $(SRCS) $(SRCCLI), ( echo -n "`dirname $(SRC)`/" && $(CC) $(CFLAGS) $(SRC) -MM -g0 ) 1>> .depend;) $(foreach SRC, $(SRCS) $(SRCCLI), ( $(ECHON) "`dirname $(SRC)`/" && $(CC) $(CFLAGS) $(SRC) -MM -g0 ) 1>> .depend;)
config.mak: $(wildcard .svn/entries */.svn/entries */*/.svn/entries) config.mak: $(wildcard .svn/entries */.svn/entries */*/.svn/entries)
./configure $(CONFIGURE_ARGS) ./configure $(CONFIGURE_ARGS)
......
...@@ -64,6 +64,18 @@ ASFLAGS="" ...@@ -64,6 +64,18 @@ ASFLAGS=""
EXE="" 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
MACHINE="$(./config.guess)" MACHINE="$(./config.guess)"
case "${MACHINE#*-*-}" in case "${MACHINE#*-*-}" in
...@@ -381,11 +393,12 @@ EXE=$EXE ...@@ -381,11 +393,12 @@ EXE=$EXE
VIS=$vis VIS=$vis
HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
DEVNULL=$DEVNULL DEVNULL=$DEVNULL
ECHON=$ECHON
EOF EOF
echo -n 'CONFIGURE_ARGS=' >> config.mak $ECHON 'CONFIGURE_ARGS=' >> config.mak
for A in "$@" ; do for A in "$@" ; do
echo -n " '$A'" >> config.mak $ECHON " '$A'" >> config.mak
done done
echo '' >> config.mak echo '' >> config.mak
......
Supports Markdown
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