From 2266e085c98bf5cdbff8cb2ae6f18ac9d84d6a0a Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sat, 15 Jul 2006 16:16:49 +0000 Subject: [PATCH] Fix DESTDIR handling. DESTDIR got prepended twice for $(DESTDIR)$libdir and similar since $libdir contained $prefix, which contained $(DESTDIR).. Originally committed as revision 5754 to svn://svn.ffmpeg.org/ffmpeg/trunk --- configure | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/configure b/configure index 2519cf679e..eff8b7dc50 100755 --- a/configure +++ b/configure @@ -24,7 +24,7 @@ show_help(){ echo "Standard options:" echo " --help print this message" echo " --log[=FILE|yes|no] log tests and output to FILE [config.err]" - echo " --prefix=PREFIX install in PREFIX [$prefix]" + echo " --prefix=PREFIX install in PREFIX [$PREFIX]" echo " --libdir=DIR install libs in DIR [PREFIX/lib]" echo " --incdir=DIR install includes in DIR [PREFIX/include/ffmpeg]" echo " --mandir=DIR install man page in DIR [PREFIX/man]" @@ -322,11 +322,11 @@ TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h" # default parameters logging="yes" logfile="config.err" -prefix="/usr/local" -libdir='${prefix}/lib' -incdir='${prefix}/include/ffmpeg' -mandir='${prefix}/man' -bindir='${prefix}/bin' +PREFIX="/usr/local" +libdir='${PREFIX}/lib' +incdir='${PREFIX}/include/ffmpeg' +mandir='${PREFIX}/man' +bindir='${PREFIX}/bin' cross_prefix="" cross_compile="no" cc="gcc" @@ -469,7 +469,7 @@ memalignhack="no" targetos=`uname -s` case $targetos in BeOS) -prefix="/boot/home/config" +PREFIX="/boot/home/config" # helps building libavcodec CFLAGS="$CFLAGS -DPIC -fomit-frame-pointer" # 3 gcc releases known for BeOS, each with ugly bugs @@ -682,7 +682,7 @@ for opt do ;; --log=*) logging="$optval" ;; - --prefix=*) prefix="$optval"; force_prefix=yes + --prefix=*) PREFIX="$optval"; force_prefix=yes ;; --libdir=*) libdir="$optval"; force_libdir=yes ;; @@ -894,8 +894,8 @@ EOF SLIBPREF="" SLIBSUF=".dll" EXESUF=".exe" - if test "$force_prefix" != yes; then prefix="$PROGRAMFILES/FFmpeg"; fi - if test "$force_libdir" != yes; then bindir="$prefix"; fi + if test "$force_prefix" != yes; then PREFIX="$PROGRAMFILES/FFmpeg"; fi + if test "$force_libdir" != yes; then bindir="$PREFIX"; fi fi # Combine FFLDFLAGS and the LDFLAGS environment variable @@ -1475,7 +1475,7 @@ if test "$gprof" = "yes" ; then LDFLAGS="$LDFLAGS -p" fi -echo "install prefix $prefix" +echo "install prefix $PREFIX" echo "source path $source_path" echo "C compiler $cc" echo "make $make" @@ -1555,7 +1555,8 @@ echo "# Automatically generated by configure - do not modify!" > config.mak echo "/* Automatically generated by configure - do not modify! */" > $TMPH echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH -echo "prefix=\$(DESTDIR)$prefix" >> config.mak +echo "PREFIX=$PREFIX" >> config.mak +echo "prefix=\$(DESTDIR)\${PREFIX}" >> config.mak echo "libdir=\$(DESTDIR)$libdir" >> config.mak echo "incdir=\$(DESTDIR)$incdir" >> config.mak echo "bindir=\$(DESTDIR)$bindir" >> config.mak @@ -2114,10 +2115,10 @@ rm -f $TMPO $TMPC $TMPE $TMPS $TMPH # build pkg-config files libav*.pc and libpostproc.pc # libavutil.pc cat <libavutil.pc -prefix=$prefix -exec_prefix=\${prefix} +prefix=$PREFIX +exec_prefix=\${PREFIX} libdir=\${exec_prefix}/lib -includedir=\${prefix}/include +includedir=\${PREFIX}/include Name: libavutil Description: FFmpeg utility library @@ -2145,10 +2146,10 @@ EOF # libavcodec.pc cat <libavcodec.pc -prefix=$prefix -exec_prefix=\${prefix} +prefix=$PREFIX +exec_prefix=\${PREFIX} libdir=\${exec_prefix}/lib -includedir=\${prefix}/include +includedir=\${PREFIX}/include Name: libavcodec Description: FFmpeg codec library @@ -2176,10 +2177,10 @@ EOF # libavformat.pc cat <libavformat.pc -prefix=$prefix -exec_prefix=\${prefix} +prefix=$PREFIX +exec_prefix=\${PREFIX} libdir=\${exec_prefix}/lib -includedir=\${prefix}/include +includedir=\${PREFIX}/include Name: libavformat Description: FFmpeg container format library @@ -2208,10 +2209,10 @@ EOF # libpostproc.pc cat <libpostproc.pc -prefix=$prefix -exec_prefix=\${prefix} +prefix=$PREFIX +exec_prefix=\${PREFIX} libdir=\${exec_prefix}/lib -includedir=\${prefix}/include +includedir=\${PREFIX}/include Name: libpostproc Description: FFmpeg post processing library