From: Sam Hartman Date: Wed, 11 Oct 1995 22:55:05 +0000 (+0000) Subject: Changes to do shared library versioning under AIX X-Git-Tag: krb5-1.0-beta6~906 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1380695561542749c87adccdadbc1570466fa7c6;p=krb5.git Changes to do shared library versioning under AIX git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6963 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/ChangeLog b/src/ChangeLog index 6844f948d..6483c8c0e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +Wed Oct 11 17:23:45 1995 Sam Hartman + + * configure.in: For all platforms, set krb5_cv_shlibs_versioned_filenames; no for AIX, yes for all others + + * aclocal.m4 (v5_make_shlib): Add ability not to make versioned archive files for AIX + Tue Oct 10 21:43:15 1995 Theodore Y. Ts'o * wconfig.c: Use win-post.in instead of post.in. diff --git a/src/aclocal.m4 b/src/aclocal.m4 index d30741bbd..a464f427a 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -860,27 +860,36 @@ SHEXT=$krb5_cv_shlibs_ext AC_SUBST(SHEXT) STEXT=$krb5_cv_noshlibs_ext AC_SUBST(STEXT) -dnl export the version of the library.... -krb5_cv_shlib_version_$1=$2 +if test "$krb5_cv_shlibs_versioned_filenames" = "yes" ; then +VEXT=".$2" # Version of library goes in archive name if test "$krb5_cv_shlibs_need_nover" = yes; then DO_MAKE_SHLIB="$1.\$""(SHEXT).$2 $1.\$""(SHEXT)" else DO_MAKE_SHLIB="$1.\$""(SHEXT).$2" fi +else # $krb5_cv_shlibs_versioned_filenames +VEXT= + DO_MAKE_SHLIB="$1.\$""(SHEXT)" +fi +AC_SUBST(VEXT) +dnl export the version of the library.... +krb5_cv_shlib_version_$1=$2 AC_SUBST(SHLIB_NAME) AC_PUSH_MAKEFILE()dnl all-unix:: [$](DO_MAKE_SHLIB) [$](SHLIB_STATIC_TARGET) clean-unix:: - $(RM) $1.[$](SHEXT).$2 $1.[$](SHEXT) [$](SHLIB_STATIC_TARGET) + $(RM) $1.[$](SHEXT)$(VEXT) $1.[$](SHEXT) [$](SHLIB_STATIC_TARGET) -$1.[$](SHEXT).$2: [$](LIBDONE) [$](DEPLIBS) +$1.[$](SHEXT)$(VEXT): [$](LIBDONE) [$](DEPLIBS) [$](BUILDTOP)/util/makeshlib [$]@ \ "[$](SHLIB_LIBDIRS)" \ - "[$](SHLIB_LIBS)" "[$](SHLIB_LDFLAGS)" [$](LIB_SUBDIRS) + "[$](SHLIB_LIBS)" "[$](SHLIB_LDFLAGS)" "$2" [$](LIB_SUBDIRS) AC_POP_MAKEFILE()dnl +if test "$krb5_cv_shlibs_versioned_filenames" = "yes" ; then LinkFile($1.[$](SHEXT),$1.[$](SHEXT).$2) +fi ],[ STEXT=$krb5_cv_noshlibs_ext AC_SUBST(STEXT) @@ -897,7 +906,12 @@ AC_SUBST(SHLIB_STATIC_TARGET) AC_ARG_ENABLE([shared], [ --enable-shared build shared libraries],[ -LinkFileDir($3/$1.[$](SHEXT).$2, $1.[$](SHEXT).$2, $4) +# Note that even if we aren't installing versions of the library with +# Version identifiers in the file name, we still need to make the links +# in ${BUILDTOP}/lib for dependencies. +# The following makes sure that the path of symlinks traces back to the real library; it is +# not an error that $2 is used in some places and $VEXT in others. +LinkFileDir($3/$1.[$](SHEXT).$2, $1.[$](SHEXT)[$](VEXT), $4) AppendRule([$3/$1.[$](SHEXT): $3/$1.[$](SHEXT).$2 [$](RM) $3/$1.[$](SHEXT) [$](LN) $1.[$](SHEXT).$2 $3/$1.[$](SHEXT) @@ -908,12 +922,12 @@ AppendRule(clean::[ if test "$krb5_cv_shlibs_need_nover" = "yes" ; then AppendRule([all-unix:: $3/$1.$(SHEXT).$2 $3/$1.$(SHEXT)]) else -AppendRule([all-unix:: $3/$1.$(SHEXT).$2]) +AppendRule([all-unix:: $3/$1.$(SHEXT)[$](VEXT)]) fi -AppendRule([install:: $1.[$](SHEXT).$2 - [$](RM) [$](DESTDIR)[$](KRB5_SHLIBDIR)[$](S)$1.[$](SHEXT).$2 - [$](INSTALL_DATA) $1.[$](SHEXT).$2 \ - [$](DESTDIR)[$](KRB5_SHLIBDIR)[$](S)$1.[$](SHEXT).$2 +AppendRule([install:: $1.[$](SHEXT)[$](VEXT) + [$](RM) [$](DESTDIR)[$](KRB5_SHLIBDIR)[$](S)$1.[$](SHEXT)[$](VEXT) + [$](INSTALL_DATA) $1.[$](SHEXT)[$](VEXT) \ + [$](DESTDIR)[$](KRB5_SHLIBDIR)[$](S)$1.[$](SHEXT)[$](VEXT) ]) if test "$krb5_cv_shlibs_need_nover" = "yes" ; then AppendRule([install:: $1.[$](SHEXT).$2 @@ -958,3 +972,7 @@ else fi AC_SUBST(LDARGS) ])dnl + + + + diff --git a/src/config/ChangeLog b/src/config/ChangeLog index 2ec3d0a95..00fbcf48a 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,7 @@ +Wed Oct 11 18:13:30 1995 Sam Hartman + + * pre.in (DO_MAKE_SHLIB): substitute VEXT, for the version extension for shared libs + Tue Oct 10 21:42:14 1995 Theodore Y. Ts'o * win-post.in: New file diff --git a/src/config/pre.in b/src/config/pre.in index 7de8d6d74..fcd7a485c 100644 --- a/src/config/pre.in +++ b/src/config/pre.in @@ -82,6 +82,7 @@ YACC = @YACC@ HOST_TYPE = @HOST_TYPE@ SHEXT = @SHEXT@ STEXT=@STEXT@ +VEXT=@VEXT@ DO_MAKE_SHLIB = @DO_MAKE_SHLIB@ SHLIB_STATIC_TARGET=@SHLIB_STATIC_TARGET@ diff --git a/src/configure.in b/src/configure.in index 5242e856c..5531c44bf 100644 --- a/src/configure.in +++ b/src/configure.in @@ -26,6 +26,7 @@ case $krb5_cv_host in krb5_cv_shlibs_cflags=-fpic krb5_cv_shlibs_ext=so krb5_cv_noshlibs_ext=a +krb5_cv_shlibs_versioned_filenames = yes # version in filename of library krb5_cv_shlibs_need_nover=no krb5_cv_shlibs_dir=shared krb5_cv_shlibs_ldflag= @@ -44,6 +45,7 @@ case $krb5_cv_host in krb5_cv_shlibs_cflags=-fPIC krb5_cv_shlibs_ext=so krb5_cv_noshlibs_ext=a +krb5_cv_shlibs_versioned_filenames = yes krb5_cv_shlibs_need_nover=yes krb5_cv_shlibs_dir=shared krb5_cv_shlibs_ldflag="-dy" @@ -61,7 +63,8 @@ case $krb5_cv_host in echo "Enabling shared libraries for AIX...." krb5_cv_shlibs_cflags= krb5_cv_shlibs_ext=a - krb5_cv_shlibs_need_nover=yes + krb5_cv_shlibs_need_nover=no # need_nover *must* be no if versioned_filenames = no + krb5_cv_shlibs_versioned_filenames=no krb5_cv_noshlibs_ext=do-not-make krb5_cv_shlibs_dir= if test $krb5_cv_prog_gcc = yes ; then @@ -89,6 +92,7 @@ fi fi krb5_cv_shlibs_ext=so krb5_cv_noshlibs_ext=a +krb5_cv_shlibs_versioned_filenames = yes krb5_cv_shlibs_need_nover=yes krb5_cv_shlibs_dir=shared krb5_cv_shlibs_ldflag="-dy" @@ -107,6 +111,7 @@ alpha-dec-osf*) krb5_cv_shlibs_cflags= krb5_cv_shlibs_ext=so krb5_cv_noshlibs_ext=a +krb5_cv_shlibs_versioned_filenames = yes krb5_cv_shlibs_need_nover=yes krb5_cv_shlibs_dir= krb5_cv_shlibs_ldflag="-call_shared" diff --git a/src/util/.Sanitize b/src/util/.Sanitize index 81ece2a7c..02eaaf122 100644 --- a/src/util/.Sanitize +++ b/src/util/.Sanitize @@ -28,9 +28,6 @@ ChangeLog Makefile.in Sanitize autoconf -berk_db -getsyms -getsyms.sed configure configure.in depfix.sed @@ -38,13 +35,14 @@ et kbuild kfrags libupdate.sh +makeshlib.sh lndir makedepend -makeshlib.sh profile pty reconf ss +unifdef Things-to-lose: diff --git a/src/util/ChangeLog b/src/util/ChangeLog index 4172777b8..e8fe2fbde 100644 --- a/src/util/ChangeLog +++ b/src/util/ChangeLog @@ -1,3 +1,7 @@ +Wed Oct 11 17:21:16 1995 Sam Hartman + + * makeshlib.sh: bring in library version and do something with it for AIX. + Mon Oct 9 19:00:13 1995 Ezra Peisach * makeshlib.sh: For NetBSD convert flags designed for cc to ones diff --git a/src/util/makeshlib.sh b/src/util/makeshlib.sh index 5a8fb7f8b..18697c59f 100644 --- a/src/util/makeshlib.sh +++ b/src/util/makeshlib.sh @@ -3,7 +3,7 @@ # makeshlib: Make a shared library..... # # Usage: makeshlib \ -# +# # host=@HOST_TYPE@ @@ -14,8 +14,9 @@ library=$1 ; shift libdirfl=$1; shift liblist=$1; shift ldflags=$1; shift +VERSION="$1" ; shift -case $host in +case $host in *-*-netbsd*) FILES=`for i do @@ -56,16 +57,16 @@ ar cq $library $FILES || exit $? if [ $stat -eq 0 ] then if test "$HAVE_GCC" = "yes" ; then - $CC -o shr.o $library -nostartfiles -Xlinker -bgcbypass:1 -Xlinker -bfilelist -Xlinker -bM:SRE -Xlinker -bE:${library}.syms $ldflags $liblist $libdirfl - else ld -o shr.o $library -H512 -T512 -bM:SRE -lc $ldflags -bfilelist -bgcbypass:1 -bnodelcsect -x -bE:${library}.syms $libdirfl $liblist + $CC -o shr.o.$VERSION $library -nostartfiles -Xlinker -bgcbypass:1 -Xlinker -bfilelist -Xlinker -bM:SRE -Xlinker -bE:${library}.syms $ldflags $liblist $libdirfl + else ld -o shr.o.$VERSION $library -H512 -T512 -bM:SRE -lc $ldflags -bfilelist -bgcbypass:1 -bnodelcsect -x -bE:${library}.syms $libdirfl $liblist fi stat=$? if [ $stat -eq 0 ] then rm $library ${library}.syms - ar cq $library shr.o + ar cq $library shr.o.$VERSION stat=$? - rm shr.o + rm shr.o.$VERSION else rm -f $library fi