diff -up gpac/Makefile.libdir gpac/Makefile --- gpac/Makefile.libdir 2007-08-28 14:51:16.000000000 +0200 +++ gpac/Makefile 2008-02-17 14:47:22.000000000 +0100 @@ -63,11 +63,11 @@ ifeq ($(DEBUGBUILD),no) $(STRIP) bin/gcc/libgpac.$(DYN_LIB_SUFFIX) endif ifeq ($(CONFIG_DARWIN),yes) - install -m 755 bin/gcc/libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/lib/libgpac-$(VERSION).$(DYN_LIB_SUFFIX) - ln -sf libgpac-$(VERSION).$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/lib/libgpac.$(DYN_LIB_SUFFIX) + install -m 755 bin/gcc/libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(libdir)/libgpac-$(VERSION).$(DYN_LIB_SUFFIX) + ln -sf libgpac-$(VERSION).$(DYN_LIB_SUFFIX) $(DESTDIR)$(libdir)/libgpac.$(DYN_LIB_SUFFIX) else - install $(INSTFLAGS) -m 755 bin/gcc/libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/lib/libgpac-$(VERSION).$(DYN_LIB_SUFFIX) - ln -sf libgpac-$(VERSION).$(DYN_LIB_SUFFIX) $(DESTDIR)$(prefix)/lib/libgpac.$(DYN_LIB_SUFFIX) + install $(INSTFLAGS) -m 755 bin/gcc/libgpac.$(DYN_LIB_SUFFIX) $(DESTDIR)$(libdir)/libgpac-$(VERSION).$(DYN_LIB_SUFFIX) + ln -sf libgpac-$(VERSION).$(DYN_LIB_SUFFIX) $(DESTDIR)$(libdir)/libgpac.$(DYN_LIB_SUFFIX) ldconfig || true endif endif @@ -98,7 +98,7 @@ install-lib: mkdir -p "$(DESTDIR)$(prefix)/include/gpac/modules" install -m 644 $(SRC_PATH)/include/gpac/modules/*.h "$(DESTDIR)$(prefix)/include/gpac/modules" mkdir -p "$(DESTDIR)$(prefix)/lib" - install -m 644 "./bin/gcc/libgpac_static.a" "$(DESTDIR)$(prefix)/lib" + install -m 644 "./bin/gcc/libgpac_static.a" "$(DESTDIR)$(libdir)" uninstall-lib: rm -rf "$(prefix)/include/gpac/internal" diff -up gpac/configure.libdir gpac/configure --- gpac/configure.libdir 2007-10-25 11:39:51.000000000 +0200 +++ gpac/configure 2008-02-17 14:53:30.000000000 +0100 @@ -106,6 +106,7 @@ EOF echo "GPAC configuration options:" echo " --help print this message" echo " --prefix=PREFIX install in PREFIX [$prefix]" +echo " --libdir=LIBDIR system libs in DIR [$libdir]" echo " --mandir=DIR man documentation in DIR [PREFIX/man]" echo "" echo " --source-path=PATH path of source code [$source_path]" @@ -167,6 +168,8 @@ for opt do case "$opt" in --prefix=*) prefix=`echo $opt | cut -d '=' -f 2` ;; + --libdir=*) libdir=`echo $opt | cut -d '=' -f 2` + ;; --mandir=*) mandir=`echo $opt | cut -d '=' -f 2` ;; --source-path=*) source_path=`echo $opt | cut -d '=' -f 2` @@ -479,7 +482,7 @@ fi if $cc -o $TMPO $TMPC $LINK3D 2> /dev/null ; then has_opengl="yes" -elif $cc -o $TMPO $TMPC -I$X11_PATH/include -L$X11_PATH/lib 2> /dev/null ; then +elif $cc -o $TMPO $TMPC -I$X11_PATH/include -L$X11_PATH/lib -L${libdir} 2> /dev/null ; then has_opengl="yes" fi @@ -895,7 +898,7 @@ cat > $TMPC << EOF #include int main( void ) { return 0; } EOF -if $cc -o $TMPO $TMPC -I$X11_PATH/include -L$X11_PATH/lib 2> /dev/null ; then +if $cc -o $TMPO $TMPC -I$X11_PATH/include -L$X11_PATH/lib -L${libdir} 2> /dev/null ; then has_x11="yes" #look for X11 shared memory support @@ -1173,8 +1176,9 @@ fi fi echo "prefix=$prefix" >> config.mak +echo "libdir=$libdir" >> config.mak echo "DESTDIR=$DESTDIR" >> config.mak -echo "moddir=$prefix/lib/gpac" >> config.mak +echo "moddir=$libdir/gpac" >> config.mak echo "mandir=$mandir" >> config.mak echo "MAKE=$make" >> config.mak echo "CC=$cc" >> config.mak