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)
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)
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
fi
AC_SUBST(LDARGS)
])dnl
+
+
+
+
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=
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"
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
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"
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"
# makeshlib: Make a shared library.....
#
# Usage: makeshlib <library> <libdirfl> <liblist> <flags> \
-# <directories>
+# <library version> <directories>
#
host=@HOST_TYPE@
libdirfl=$1; shift
liblist=$1; shift
ldflags=$1; shift
+VERSION="$1" ; shift
-case $host in
+case $host in
*-*-netbsd*)
FILES=`for i
do
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