diff options
author | Måns Rullgård <mans@mansr.com> | 2008-06-03 03:51:36 +0400 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2008-06-03 03:51:36 +0400 |
commit | c9d19248844e72b0f6a11847dcc59349d1b6558b (patch) | |
tree | 2c0da9d5ab033bc128af77108c34bb71a215d172 /configure | |
parent | 426be5dc833b3eade840c4576ad565e038d3c93c (diff) |
improve installation path selection
Originally committed as revision 13638 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 28 |
1 files changed, 18 insertions, 10 deletions
@@ -300,6 +300,12 @@ disabled_any(){ done } +set_default(){ + for opt; do + eval test -z "\$$opt" && eval $opt=\$${opt}_default + done +} + is_in(){ value=$1 shift @@ -903,12 +909,12 @@ vhook_extralibs='$ldl' logfile="config.err" # installation paths -prefix="/usr/local" -libdir='$(PREFIX)/lib' -shlibdir="$libdir" -incdir='$(PREFIX)/include' -mandir='$(PREFIX)/share/man' -bindir='$(PREFIX)/bin' +prefix_default="/usr/local" +bindir_default='${prefix}/bin' +incdir_default='${prefix}/include' +libdir_default='${prefix}/lib' +mandir_default='${prefix}/share/man' +shlibdir_default="$libdir_default" # toolchain cc="gcc" @@ -1167,7 +1173,7 @@ enabled sparc64 && enable sparc # OS specific case $target_os in beos|haiku|zeta) - prefix="$HOME/config" + prefix_default="$HOME/config" # helps building libavcodec add_cflags "-DPIC -fomit-frame-pointer" # 3 gcc releases known for BeOS, each with ugly bugs @@ -1236,7 +1242,7 @@ case $target_os in disable need_memalign LIBTARGET=x64 fi - shlibdir="$bindir" + shlibdir_default="$bindir" VHOOKSHFLAGS='-shared -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil' VHOOKLIBS='-lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)' if enabled swscale; then @@ -1257,7 +1263,7 @@ case $target_os in ;; cygwin*) target_os=cygwin - shlibdir="$bindir" + shlibdir_default="$bindir" VHOOKSHFLAGS='-shared -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil' VHOOKLIBS='-lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)' if enabled swscale; then @@ -1318,6 +1324,8 @@ case $target_os in ;; esac +set_default $PATHS_LIST + add_extralibs $osextralibs # Combine FFLDFLAGS and the LDFLAGS environment variable. @@ -2007,7 +2015,7 @@ echo "#ifndef FFMPEG_CONFIG_H" >> $TMPH echo "#define FFMPEG_CONFIG_H" >> $TMPH echo "#define FFMPEG_CONFIGURATION \"$FFMPEG_CONFIGURATION\"" >> $TMPH -echo "PREFIX=$prefix" >> config.mak +echo "prefix=$prefix" >> config.mak echo "LIBDIR=\$(DESTDIR)$libdir" >> config.mak echo "SHLIBDIR=\$(DESTDIR)$shlibdir" >> config.mak echo "INCDIR=\$(DESTDIR)$incdir" >> config.mak |