Commit e89b8b0a authored by Diego Biurrun's avatar Diego Biurrun

Honor the LDFLAGS environment variable.

Originally committed as revision 5384 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 41ae6ef9
...@@ -235,7 +235,7 @@ protocols="yes" ...@@ -235,7 +235,7 @@ protocols="yes"
ffserver="yes" ffserver="yes"
ffplay="yes" ffplay="yes"
LIBOBJFLAGS="" LIBOBJFLAGS=""
LDFLAGS=-Wl,--warn-common FFLDFLAGS=-Wl,--warn-common
FFSLDFLAGS=-Wl,-E FFSLDFLAGS=-Wl,-E
LDCONFIG="ldconfig" LDCONFIG="ldconfig"
LIBPREF="lib" LIBPREF="lib"
...@@ -299,7 +299,7 @@ v4l2="no" ...@@ -299,7 +299,7 @@ v4l2="no"
audio_oss="no" audio_oss="no"
dv1394="no" dv1394="no"
make="gmake" make="gmake"
LDFLAGS="" FFLDFLAGS=""
FFSLDFLAGS="" FFSLDFLAGS=""
need_inet_aton="yes" need_inet_aton="yes"
extralibs="$extralibs -lsocket -lnsl" extralibs="$extralibs -lsocket -lnsl"
...@@ -311,7 +311,7 @@ bktr="yes" ...@@ -311,7 +311,7 @@ bktr="yes"
audio_oss="yes" audio_oss="yes"
dv1394="no" dv1394="no"
make="gmake" make="gmake"
LDFLAGS="$LDFLAGS -export-dynamic" FFLDFLAGS="$FFLDFLAGS -export-dynamic"
extralibs="$extralibs -lossaudio" extralibs="$extralibs -lossaudio"
;; ;;
OpenBSD) OpenBSD)
...@@ -322,7 +322,7 @@ audio_oss="yes" ...@@ -322,7 +322,7 @@ audio_oss="yes"
dv1394="no" dv1394="no"
make="gmake" make="gmake"
LIBOBJFLAGS="\$(PIC)" LIBOBJFLAGS="\$(PIC)"
LDFLAGS="$LDFLAGS -export-dynamic -pthread" FFLDFLAGS="$FFLDFLAGS -export-dynamic -pthread"
LDCONFIG="ldconfig -m \$(libdir)" LDCONFIG="ldconfig -m \$(libdir)"
extralibs="$extralibs -lossaudio" extralibs="$extralibs -lossaudio"
;; ;;
...@@ -334,7 +334,7 @@ audio_oss="yes" ...@@ -334,7 +334,7 @@ audio_oss="yes"
dv1394="no" dv1394="no"
make="gmake" make="gmake"
CFLAGS="$CFLAGS -pthread" CFLAGS="$CFLAGS -pthread"
LDFLAGS="$LDFLAGS -export-dynamic -pthread" FFLDFLAGS="$FFLDFLAGS -export-dynamic -pthread"
;; ;;
BSD/OS) BSD/OS)
v4l="no" v4l="no"
...@@ -358,7 +358,7 @@ extralibs="" ...@@ -358,7 +358,7 @@ extralibs=""
darwin="yes" darwin="yes"
strip="strip -x" strip="strip -x"
installstrip="" installstrip=""
LDFLAGS="-Wl,-dynamic,-search_paths_first" FFLDFLAGS="-Wl,-dynamic,-search_paths_first"
SLIBSUF=".dylib" SLIBSUF=".dylib"
SLIBNAME_WITH_FULLVERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)' SLIBNAME_WITH_FULLVERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)'
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)' SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)'
...@@ -380,7 +380,7 @@ cygwin="yes" ...@@ -380,7 +380,7 @@ cygwin="yes"
EXESUF=".exe" EXESUF=".exe"
;; ;;
Linux) Linux)
LDFLAGS="$LDFLAGS -rdynamic -Wl,--as-needed -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil" FFLDFLAGS="$FFLDFLAGS -rdynamic -Wl,--as-needed -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil"
;; ;;
IRIX*) IRIX*)
ranlib="echo ignoring ranlib" ranlib="echo ignoring ranlib"
...@@ -395,7 +395,7 @@ ar="emxomfar -p128" ...@@ -395,7 +395,7 @@ ar="emxomfar -p128"
ranlib="echo ignoring ranlib" ranlib="echo ignoring ranlib"
strip="echo ignoring strip" strip="echo ignoring strip"
CFLAGS="$CFLAGS -Zomf" CFLAGS="$CFLAGS -Zomf"
LDFLAGS="-Zomf -Zstack 16384 -s" FFLDFLAGS="-Zomf -Zstack 16384 -s"
SHFLAGS="-Zdll -Zomf" SHFLAGS="-Zdll -Zomf"
FFSLDFLAGS="" FFSLDFLAGS=""
LIBPREF="" LIBPREF=""
...@@ -475,7 +475,7 @@ for opt do ...@@ -475,7 +475,7 @@ for opt do
;; ;;
--extra-cflags=*) CFLAGS="$CFLAGS ${opt#--extra-cflags=}" --extra-cflags=*) CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
;; ;;
--extra-ldflags=*) LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}" --extra-ldflags=*) FFLDFLAGS="$FFLDFLAGS ${opt#--extra-ldflags=}"
;; ;;
--extra-libs=*) extralibs=${opt#--extra-libs=} --extra-libs=*) extralibs=${opt#--extra-libs=}
;; ;;
...@@ -630,6 +630,10 @@ for opt do ...@@ -630,6 +630,10 @@ for opt do
esac esac
done done
# Combine FFLDFLAGS and the LDFLAGS environment variable
LDFLAGS="$FFLDFLAGS $LDFLAGS"
# we need to build at least one lib type # we need to build at least one lib type
if test "$lstatic" = "no" && test "$lshared" = "no" ; then if test "$lstatic" = "no" && test "$lshared" = "no" ; then
cat <<EOF cat <<EOF
......
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