From ef0bc4c97f1ad704c0d6322775902c5d62adf546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Fri, 8 Mar 2002 09:09:57 +0000 Subject: [PATCH] =?UTF-8?q?*=20BeOS=20patch=20by=20Fran=C3=A7ois=20Revol?= =?UTF-8?q?=20=20=20=20fixing=20some=20compilation=20proble?= =?UTF-8?q?ms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally committed as revision 319 to svn://svn.ffmpeg.org/ffmpeg/trunk --- Makefile | 4 ++-- configure | 23 ++++++++++++++++++++++- ffmpeg.c | 2 ++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a35c32ae0e..dda8b165bd 100644 --- a/Makefile +++ b/Makefile @@ -33,10 +33,10 @@ lib: $(MAKE) -C libav all ffmpeg$(EXE): ffmpeg.o libav/libav.a $(DEP_FFMPEG_LIB) - $(CC) $(LDFLAGS) -lm -o $@ $^ $(FFMPEG_LIB) + $(CC) $(LDFLAGS) $(EXTRALIBS) -o $@ $^ $(FFMPEG_LIB) ffserver$(EXE): ffserver.o libav/libav.a $(DEP_FFMPEG_LIB) - $(CC) $(LDFLAGS) -lm -o $@ $^ $(FFMPEG_LIB) + $(CC) $(LDFLAGS) $(EXTRALIBS) -o $@ $^ $(FFMPEG_LIB) ffplay: ffmpeg$(EXE) ln -sf $< $@ diff --git a/configure b/configure index 07599b03f2..4501b6af5d 100755 --- a/configure +++ b/configure @@ -27,7 +27,7 @@ cc="gcc" ar="ar" cpu=`uname -m` case "$cpu" in - i386|i486|i586|i686|i86pc) + i386|i486|i586|i686|i86pc|BePC) cpu="x86" mmx="yes" ;; @@ -46,6 +46,26 @@ esac gprof="no" grab="yes" win32="no" +extralibs="-lm" + +# OS specific +targetos=`uname -s` +case $targetos in +BeOS) +prefix="/boot/home/config" +# helps building libavcodec +grab="no" +CFLAGS="-O2 -DPIC" +# no need for libm, but the inet stuff +# Check for BONE +if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then +extralibs="-lbind -lsocket" +else +echo "Not sure building for net_server will succeed... good luck." +extralibs="-lsocket" +fi ;; +*) ;; +esac if [ "$1" = "-h" -o "$1" = "--help" ] ; then cat << EOF @@ -167,6 +187,7 @@ if [ "$lshared" = "yes" ] ; then else echo "BUILD_SHARED=no" >> config.mak fi +echo "EXTRALIBS=$extralibs" >> config.mak echo -n "VERSION=" >>config.mak head VERSION >>config.mak echo "" >>config.mak diff --git a/ffmpeg.c b/ffmpeg.c index 5d5431cf26..b885066ef4 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1801,6 +1801,7 @@ void prepare_grab(void) /* open the necessary output devices for playing */ void prepare_play(void) { +#ifndef __BEOS__ file_format = guess_format("audio_device", NULL, NULL); if (!file_format) { fprintf(stderr, "Could not find audio device\n"); @@ -1808,6 +1809,7 @@ void prepare_play(void) } opt_output_file(audio_device); +#endif }