1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

add libdir support to configure patch by (Luca Barbato )lu_zero gentoo org)

Originally committed as revision 4050 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Luca Barbato 2005-03-16 19:11:58 +00:00 committed by Michael Niedermayer
parent 0e1ceacde9
commit cc973ecbe7
5 changed files with 22 additions and 13 deletions

9
configure vendored
View File

@ -13,6 +13,7 @@ EOF
echo "Standard options:" echo "Standard options:"
echo " --help print this message" echo " --help print this message"
echo " --prefix=PREFIX install in PREFIX [$prefix]" echo " --prefix=PREFIX install in PREFIX [$prefix]"
echo " --libdir=DIR install libs in DIR [PREFIX/lib]"
echo " --mandir=DIR man documentation in DIR [PREFIX/man]" echo " --mandir=DIR man documentation in DIR [PREFIX/man]"
echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]" echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
echo " --enable-ogg enable ogg support via libogg [default=no]" echo " --enable-ogg enable ogg support via libogg [default=no]"
@ -91,6 +92,7 @@ TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
# default parameters # default parameters
prefix="/usr/local" prefix="/usr/local"
libdir=""
mandir="" mandir=""
bindir="" bindir=""
cross_prefix="" cross_prefix=""
@ -376,6 +378,8 @@ for opt do
case "$opt" in case "$opt" in
--prefix=*) prefix=`echo $opt | cut -d '=' -f 2` --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
;; ;;
--libdir=*) libdir=`echo $opt | cut -d '=' -f 2`
;;
--mandir=*) mandir=`echo $opt | cut -d '=' -f 2` --mandir=*) mandir=`echo $opt | cut -d '=' -f 2`
;; ;;
--source-path=*) source_path=`echo $opt | cut -d '=' -f 2` --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
@ -1062,6 +1066,10 @@ if test x"$bindir" = x""; then
bindir="${prefix}/bin" bindir="${prefix}/bin"
fi fi
if test x"$libdir" = x""; then
libdir="${prefix}/lib"
fi
if test x"$mandir" = x""; then if test x"$mandir" = x""; then
mandir="${prefix}/man" mandir="${prefix}/man"
fi fi
@ -1138,6 +1146,7 @@ echo "/* Automatically generated by configure - do not modify */" > $TMPH
echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH
echo "prefix=$prefix" >> config.mak echo "prefix=$prefix" >> config.mak
echo "libdir=$libdir" >> config.mak
echo "bindir=$bindir" >> config.mak echo "bindir=$bindir" >> config.mak
echo "mandir=$mandir" >> config.mak echo "mandir=$mandir" >> config.mak
echo "MAKE=$make" >> config.mak echo "MAKE=$make" >> config.mak

View File

@ -302,9 +302,9 @@ install: all install-headers
ifeq ($(CONFIG_WIN32),yes) ifeq ($(CONFIG_WIN32),yes)
install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)" install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
else else
install -d $(prefix)/lib install -d $(libdir)
install $(INSTALLSTRIP) -m 755 $(SLIB) $(prefix)/lib/libavcodec-$(VERSION).so install $(INSTALLSTRIP) -m 755 $(SLIB) $(libdir)/libavcodec-$(VERSION).so
ln -sf libavcodec-$(VERSION).so $(prefix)/lib/libavcodec.so ln -sf libavcodec-$(VERSION).so $(libdir)/libavcodec.so
ldconfig || true ldconfig || true
endif endif
ifeq ($(CONFIG_PP),yes) ifeq ($(CONFIG_PP),yes)
@ -315,7 +315,7 @@ install:
endif endif
installlib: all install-headers installlib: all install-headers
install -m 644 $(LIB) "$(prefix)/lib" install -m 644 $(LIB) "$(libdir)"
install-headers: install-headers:
mkdir -p "$(prefix)/include/ffmpeg" mkdir -p "$(prefix)/include/ffmpeg"

View File

@ -54,9 +54,9 @@ ifeq ($(SHARED_PP),yes)
ifeq ($(CONFIG_WIN32),yes) ifeq ($(CONFIG_WIN32),yes)
install $(INSTALLSTRIP) -m 755 $(SPPLIB) "$(prefix)" install $(INSTALLSTRIP) -m 755 $(SPPLIB) "$(prefix)"
else else
install -d $(prefix)/lib install -d $(libdir)
install $(INSTALLSTRIP) -m 755 $(SPPLIB) $(prefix)/lib/$(SPPLIB).$(SPPVERSION) install $(INSTALLSTRIP) -m 755 $(SPPLIB) $(libdir)/$(SPPLIB).$(SPPVERSION)
ln -sf $(SPPLIB).$(SPPVERSION) $(prefix)/lib/$(SPPLIB) ln -sf $(SPPLIB).$(SPPVERSION) $(libdir)/$(SPPLIB)
ldconfig || true ldconfig || true
endif endif
endif endif

View File

@ -108,9 +108,9 @@ install: all install-headers
ifeq ($(CONFIG_WIN32),yes) ifeq ($(CONFIG_WIN32),yes)
install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)" install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
else else
install -d $(prefix)/lib install -d $(libdir)
install $(INSTALLSTRIP) -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so install $(INSTALLSTRIP) -m 755 $(SLIB) $(libdir)/libavformat-$(VERSION).so
ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so ln -sf libavformat-$(VERSION).so $(libdir)/libavformat.so
ldconfig || true ldconfig || true
endif endif
else else
@ -118,7 +118,7 @@ install:
endif endif
installlib: all install-headers installlib: all install-headers
install -m 644 $(LIB) "$(prefix)/lib" install -m 644 $(LIB) "$(libdir)"
install-headers: install-headers:
mkdir -p "$(prefix)/include/ffmpeg" mkdir -p "$(prefix)/include/ffmpeg"

View File

@ -26,8 +26,8 @@ depend: $(SRCS)
$(CC) -MM $(CFLAGS) $^ 1>.depend $(CC) -MM $(CFLAGS) $^ 1>.depend
install: install:
install -d "$(prefix)/lib/vhook" install -d "$(libdir)/vhook"
install -m 755 $(HOOKS) "$(prefix)/lib/vhook" install -m 755 $(HOOKS) "$(libdir)/vhook"
imlib2.so: imlib2.o imlib2.so: imlib2.o
$(CC) -g -o $@ $(SHFLAGS) $< -lImlib2 $(CC) -g -o $@ $(SHFLAGS) $< -lImlib2