From: Kurt Zeilenga Date: Tue, 22 Dec 1998 05:29:47 +0000 (+0000) Subject: Import more FreeBSD elf shared library fixes. X-Git-Tag: OPENLDAP_REL_ENG_1_1_1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fca77b0db5abd740d8437cf0be14ad49703d5815;p=thirdparty%2Fopenldap.git Import more FreeBSD elf shared library fixes. --- diff --git a/build/lib-shared.mk b/build/lib-shared.mk index 57627f1645..76774428f8 100644 --- a/build/lib-shared.mk +++ b/build/lib-shared.mk @@ -3,7 +3,8 @@ ## Makefile Template for Shared Libraries ## -LINK = $(LTLINK) -version-info $(LIBVERSION) +LTVERSION = -version-info $(LIBVERSION) +LINK = $(LTLINK) COMPILE = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c MKDEPFLAG = -l diff --git a/build/ltconfig b/build/ltconfig index 729792ddb5..e4ecdbd7ec 100755 --- a/build/ltconfig +++ b/build/ltconfig @@ -1134,7 +1134,8 @@ freebsd3*) version_type=freebsd library_names_spec='${libname}${release}.so.$versuffix $libname.so' if [ -x `/usr/bin/objformat` ]; then - finish_cmds='PATH="$PATH:/sbin" OBJFORMAT=`objformat` ldconfig -m $libdir' + OBJFORMAT=`/usr/bin/objformat` + finish_cmds='PATH="$PATH:/sbin" OBJFORMAT="$OBJFORMAT" ldconfig -m $libdir' else finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' fi diff --git a/build/ltmain.sh b/build/ltmain.sh index ffacb3dfd6..b66dcc0d9a 100755 --- a/build/ltmain.sh +++ b/build/ltmain.sh @@ -970,10 +970,17 @@ if test -z "$show_help"; then freebsd) version_vars="$version_vars major versuffix" major="$current" - if [ $PORTOBJFORMAT = elf ]; then - versuffix="$current"; + + if [ X"$OBJFORMAT" = X ]; then + if [ -x /usr/bin/objformat ]; then + OBJECTFORMAT=`objformat` + fi + fi + + if [ "$OBJFORMAT" = elf ]; then + versuffix="$current"; else - versuffix="$current.$revision"; + versuffix="$current.$revision"; fi ;; diff --git a/build/top.mk b/build/top.mk index c37895f021..59f6732c2b 100644 --- a/build/top.mk +++ b/build/top.mk @@ -49,7 +49,7 @@ MKDEP = $(top_srcdir)/build/mkdep $(MKDEPFLAG) -c "$(CC)" LIBTOOL = @LIBTOOL@ LIBVERSION = 1:0:0 -LTLINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS) +LTLINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS) $(LTVERSION) LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) # Misc UNIX commands used in makefiles