Commit 7f567a32 authored by philipjsg's avatar philipjsg

More fixes to compile and build on more platforms.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1280 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 223acabf
...@@ -69,7 +69,7 @@ ffmpeg$(EXE): ffmpeg_g$(EXE) ...@@ -69,7 +69,7 @@ ffmpeg$(EXE): ffmpeg_g$(EXE)
ffserver$(EXE): ffserver.o $(DEP_LIBS) ffserver$(EXE): ffserver.o $(DEP_LIBS)
$(CC) $(LDFLAGS) $(FFSLDFLAGS) \ $(CC) $(LDFLAGS) $(FFSLDFLAGS) \
-o $@ ffserver.o -L./libavcodec -L./libavformat \ -o $@ ffserver.o -L./libavcodec -L./libavformat \
-lavformat -lavcodec -ldl $(EXTRALIBS) -lavformat -lavcodec $(EXTRALIBS)
ffplay: ffmpeg$(EXE) ffplay: ffmpeg$(EXE)
ln -sf $< $@ ln -sf $< $@
...@@ -120,7 +120,7 @@ TAGS: ...@@ -120,7 +120,7 @@ TAGS:
# regression tests # regression tests
libavtest test mpeg4 mpeg: ffmpeg$(EXE) libavtest test mpeg4 mpeg: ffmpeg$(EXE)
make -C tests $@ $(MAKE) -C tests $@
ifneq ($(wildcard .depend),) ifneq ($(wildcard .depend),)
include .depend include .depend
......
...@@ -100,6 +100,12 @@ else ...@@ -100,6 +100,12 @@ else
netserver="yes" netserver="yes"
extralibs="-lnet" extralibs="-lnet"
fi ;; fi ;;
FreeBSD)
v4l="no"
audio_oss="yes"
make="gmake"
LDFLAGS="-export-dynamic"
;;
BSD/OS) BSD/OS)
v4l="no" v4l="no"
audio_oss="yes" audio_oss="yes"
...@@ -148,10 +154,17 @@ cat > $TMPC << EOF ...@@ -148,10 +154,17 @@ cat > $TMPC << EOF
int main( void ) { return (int) dlopen("foo", 0); } int main( void ) { return (int) dlopen("foo", 0); }
EOF EOF
ldl=-ldl
if $cc -o $TMPO $TMPC -ldl 2> /dev/null ; then if $cc -o $TMPO $TMPC -ldl 2> /dev/null ; then
vhook=yes vhook=yes
fi fi
if $cc -o $TMPO $TMPC 2> /dev/null ; then
vhook=yes
ldl=""
fi
cat > $TMPC << EOF cat > $TMPC << EOF
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <Imlib2.h> #include <Imlib2.h>
...@@ -201,7 +214,7 @@ for opt do ...@@ -201,7 +214,7 @@ for opt do
;; ;;
--disable-a52) a52="no" --disable-a52) a52="no"
;; ;;
--enable-a52bin) a52bin="yes" ; extralibs="-ldl $extralibs" --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
;; ;;
--enable-mp3lame) mp3lame="yes" --enable-mp3lame) mp3lame="yes"
;; ;;
...@@ -475,7 +488,6 @@ echo "STRIP=$strip" >> config.mak ...@@ -475,7 +488,6 @@ echo "STRIP=$strip" >> config.mak
echo "OPTFLAGS=$CFLAGS" >> config.mak echo "OPTFLAGS=$CFLAGS" >> config.mak
echo "LDFLAGS=$LDFLAGS" >> config.mak echo "LDFLAGS=$LDFLAGS" >> config.mak
echo "SHFLAGS=$SHFLAGS" >> config.mak echo "SHFLAGS=$SHFLAGS" >> config.mak
echo "LDFLAGS=$LDFLAGS" >> config.mak
if test "$cpu" = "x86" ; then if test "$cpu" = "x86" ; then
echo "TARGET_ARCH_X86=yes" >> config.mak echo "TARGET_ARCH_X86=yes" >> config.mak
echo "#define ARCH_X86 1" >> $TMPH echo "#define ARCH_X86 1" >> $TMPH
...@@ -529,7 +541,7 @@ fi ...@@ -529,7 +541,7 @@ fi
if test "$vhook" = "yes" ; then if test "$vhook" = "yes" ; then
echo "BUILD_VHOOK=yes" >> config.mak echo "BUILD_VHOOK=yes" >> config.mak
echo "#define HAVE_VHOOK 1" >> $TMPH echo "#define HAVE_VHOOK 1" >> $TMPH
extralibs="$extralibs -ldl" extralibs="$extralibs $ldl"
fi fi
if test "$lshared" = "yes" ; then if test "$lshared" = "yes" ; then
echo "BUILD_SHARED=yes" >> config.mak echo "BUILD_SHARED=yes" >> config.mak
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "avformat.h" #include "avformat.h"
#include <stdarg.h> #include <stdarg.h>
#include <netinet/in.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
...@@ -31,6 +30,7 @@ ...@@ -31,6 +30,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <netdb.h> #include <netdb.h>
#include <ctype.h> #include <ctype.h>
......
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