More changes to make things compile on more platforms
authorPhilip Gladstone <philipjsg@users.sourceforge.net>
Wed, 27 Nov 2002 02:45:14 +0000 (02:45 +0000)
committerPhilip Gladstone <philipjsg@users.sourceforge.net>
Wed, 27 Nov 2002 02:45:14 +0000 (02:45 +0000)
Originally committed as revision 1287 to svn://svn.ffmpeg.org/ffmpeg/trunk

Makefile
configure
libavformat/Makefile

index db78217cc1ea5490451b682b5a9ad1d1f34be6c4..afa613c1d1250bfa92e4616065272e95e42a81ca 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,13 +7,7 @@ include config.mak
 VPATH=$(SRC_PATH)
 
 CFLAGS= $(OPTFLAGS) -Wall -g -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
-ifeq ($(CONFIG_DARWIN),yes)
-LDFLAGS+= -g -d
-FFSLDFLAGS= -Wl,-bind_at_load
-else
-LDFLAGS+= -g -Wl,--warn-common
-FFSLDFLAGS= -Wl,-E
-endif
+LDFLAGS+= -g 
 
 ifeq ($(TARGET_GPROF),yes)
 CFLAGS+=-p
@@ -90,7 +84,7 @@ install-vhook: $(prefix)/lib/vhook
        $(MAKE) -C vhook install INSTDIR=$(prefix)/lib/vhook
 
 $(prefix)/lib/vhook:
-       mkdir $@
+       install -d $@
 
 installlib:
        $(MAKE) -C libavcodec installlib
index cf38fb7acd41dca82153cb660316df81523db770..e5a95a294589f6e4df4b71811c83917b4487d523 100755 (executable)
--- a/configure
+++ b/configure
@@ -68,6 +68,9 @@ vhook="no"
 mpegaudio_hp="yes"
 SHFLAGS=-shared
 netserver="no"
+need_inet_aton="no"
+LDFLAGS=-Wl,--warn-common
+FFSLDFLAGS=-Wl,-E
 
 # OS specific
 targetos=`uname -s`
@@ -98,13 +101,23 @@ if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
 extralibs="-lbind -lsocket"
 else
 netserver="yes"
+need_inet_aton="yes"
 extralibs="-lnet"
 fi ;;
+SunOS)
+v4l="no"
+audio_oss="no"
+make="gmake"
+LDFLAGS=""
+FFSLDFLAGS=""
+need_inet_aton="yes"
+extralibs="$extralibs -lsocket -lnsl"
+;;
 FreeBSD)
 v4l="no"
 audio_oss="yes"
 make="gmake"
-LDFLAGS="-export-dynamic"
+LDFLAGS="$LDFLAGS -export-dynamic"
 ;;
 BSD/OS)
 v4l="no"
@@ -116,11 +129,21 @@ Darwin)
 cc="cc"
 v4l="no"
 audio_oss="no"
-CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic"
 SHFLAGS="-dynamiclib"
 extralibs=""
 darwin="yes"
 strip="strip -x"
+LDFLAGS="$LDFLAGS -d"
+FFSLDFLAGS=-Wl,-bind_at_load
+gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f4-)"
+case "$gcc_version" in
+*2.95*) 
+CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer"
+;;
+*) 
+CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic"
+;;
+esac
 ;;
 CYGWIN*)
 v4l="no"
@@ -133,7 +156,7 @@ echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
      "/usr/include/inttypes.h !!!"
 ;;
 Linux)
-LDFLAGS=-rdynamic
+LDFLAGS="$LDFLAGS -rdynamic"
 ;;
 *) ;;
 esac
@@ -487,6 +510,7 @@ echo "RANLIB=$ranlib" >> config.mak
 echo "STRIP=$strip" >> config.mak
 echo "OPTFLAGS=$CFLAGS" >> config.mak
 echo "LDFLAGS=$LDFLAGS" >> config.mak
+echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
 echo "SHFLAGS=$SHFLAGS" >> config.mak
 if test "$cpu" = "x86" ; then
   echo "TARGET_ARCH_X86=yes" >> config.mak
@@ -642,6 +666,10 @@ if test "$netserver" = "yes" ; then
   echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
 fi
 
+if test "$need_inet_aton" = "yes" ; then
+  echo "NEED_INET_ATON=yes" >> config.mak
+fi
+
 if test "$simpleidct" = "yes" ; then
   echo "#define SIMPLE_IDCT 1" >> $TMPH
 fi
index 1051aa65434e0e5d6ff6cbe778cd7702830b96f9..0ee4f09e4ae25b731fe743be0b1073c417ef6e0f 100644 (file)
@@ -35,7 +35,7 @@ endif
 ifeq ($(CONFIG_NETWORK),yes)
 OBJS+= udp.o tcp.o http.o rtsp.o rtp.o rtpproto.o
 # BeOS network stuff
-ifeq ($(CONFIG_BEOS_NETSERVER),yes)
+ifeq ($(NEED_INET_ATON),yes)
 OBJS+= barpainet.o
 endif
 endif