* aclocal.m4 (DO_SUBDIRS): Add make Makefiles for broken versions
authorEzra Peisach <epeisach@mit.edu>
Mon, 2 Oct 1995 18:25:50 +0000 (18:25 +0000)
committerEzra Peisach <epeisach@mit.edu>
Mon, 2 Oct 1995 18:25:50 +0000 (18:25 +0000)
of make.
     (V5_MAKE_SHARED_LIB): Changes to support version
           numbering and library installation.

* configure.in: change shlib extentsion for netbsd and dirhead
rules to allow for shared library path to be included in
executable.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6905 dc483132-0cff-0310-8789-dd5450dbe970

src/ChangeLog
src/aclocal.m4
src/configure.in

index 0a069e7272206abac0f091dd70644b3c4a706d57..1ddfb4dfe473a5f2dd995f0043ce2ce779a979e3 100644 (file)
@@ -1,3 +1,14 @@
+Sat Sep 30 04:34:51 1995  Ezra Peisach  <epeisach@kangaroo.mit.edu>
+
+       * aclocal.m4 (DO_SUBDIRS): Add make Makefiles for broken versions
+                       of make.
+                    (V5_MAKE_SHARED_LIB): Changes to support version
+                            numbering and library installation.
+
+       * configure.in: change shlib extentsion for netbsd and dirhead
+               rules to allow for shared library path to be included in
+               executable. 
+
 Fri Sep 29 01:39:35 1995  Theodore Y. Ts'o  <tytso@dcl>
 
        * Makefile.in (awk-windows-mac): Copy stock/osconf.h to osconf.h
index 9f708f7122d8fd7298102743c8fad6ad9f38ad5e..d30741bbd44276df5a5f411b0a44e8e8fb54ff19 100644 (file)
@@ -135,6 +135,7 @@ MAKE_SUBDIRS("making",all-unix, all)
 MAKE_SUBDIRS("cleaning",clean-unix, clean)
 MAKE_SUBDIRS("installing",install-unix, install)
 MAKE_SUBDIRS("checking",check-unix, check)
+MAKE_SUBDIRS("making Makefiles",Makefiles, Makefiles)
 ])dnl
 dnl
 dnl drop in standard rules for all configure files -- CONFIG_RULES
@@ -155,6 +156,8 @@ AC_PUSH_MAKEFILE()dnl
 [
 SHELL=/bin/sh
 
+Makefiles:: Makefile
+
 Makefile: $(srcdir)/Makefile.in config.status $(SRCTOP)/config/pre.in $(SRCTOP)/config/post.in
        $(SHELL) config.status
 config.status: $(srcdir)/configure
@@ -816,9 +819,12 @@ AC_SUBST(SHARED_RULE)
 AC_SUBST(SHARED_RULE_LOCAL)
 ])dnl
 dnl
+dnl
 dnl This rule adds the additional Makefile fragment necessary to actually 
 dnl create the shared library
 dnl
+dnl V5_MAKE_SHARED_LIB(libname, version, libdir, dirname_relative_to_libdir)
+dnl
 define(V5_MAKE_SHARED_LIB,[
 if test "[$]krb5_cv_staticlibs_enabled" = yes
        then
@@ -837,9 +843,9 @@ AC_SUBST(LD_SHLIBDIR_PREFIX)
 SHLIB_RPATH_DIRS=
 if test $krb5_cv_shlibs_use_dirs = yes ; then
        if test $krb5_cv_shlibs_use_colon_dirs = yes ; then
-               SHLIB_RPATH_DIRS="$krb5_cv_shlibs_dirhead \$(KRB5_SHLIBDIR):`pwd`/\$(TOPLIBD)"
+               SHLIB_RPATH_DIRS="${krb5_cv_shlibs_dirhead}$(KRB5_SHLIBDIR):`pwd`/\$(TOPLIBD)"
        else
-               SHLIB_RPATH_DIRS="$krb5_cv_shlibs_dirhead \$(KRB5_SHLIBDIR) $krb5_cv_shlibs_dirhead `pwd`/\$(TOPLIBD)"
+               SHLIB_RPATH_DIRS="${krb5_cv_shlibs_dirhead}\$(KRB5_SHLIBDIR) ${krb5_cv_shlibs_dirhead}`pwd`/\$(TOPLIBD)"
        fi
 fi
 AC_SUBST(SHLIB_RPATH_DIRS)
@@ -854,20 +860,27 @@ SHEXT=$krb5_cv_shlibs_ext
 AC_SUBST(SHEXT)
 STEXT=$krb5_cv_noshlibs_ext
 AC_SUBST(STEXT)
-DO_MAKE_SHLIB="$1.\$""(SHEXT)"
+dnl export the version of the library....
+krb5_cv_shlib_version_$1=$2
+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
+AC_SUBST(SHLIB_NAME)
 AC_PUSH_MAKEFILE()dnl
 
 all-unix:: [$](DO_MAKE_SHLIB) [$](SHLIB_STATIC_TARGET)
 
 clean-unix:: 
-       $(RM) $1.[$](SHEXT) [$](SHLIB_STATIC_TARGET)
+       $(RM) $1.[$](SHEXT).$2 $1.[$](SHEXT) [$](SHLIB_STATIC_TARGET)
 
-$1.[$](SHEXT): [$](LIBDONE) [$](DEPLIBS)
+$1.[$](SHEXT).$2: [$](LIBDONE) [$](DEPLIBS)
        [$](BUILDTOP)/util/makeshlib [$]@       \
                "[$](SHLIB_LIBDIRS)" \
                "[$](SHLIB_LIBS)" "[$](SHLIB_LDFLAGS)" [$](LIB_SUBDIRS)
-
 AC_POP_MAKEFILE()dnl
+LinkFile($1.[$](SHEXT),$1.[$](SHEXT).$2)
 ],[
 STEXT=$krb5_cv_noshlibs_ext
 AC_SUBST(STEXT)
@@ -880,7 +893,43 @@ clean-unix::
 AC_POP_MAKEFILE()
 ])dnl
 AC_SUBST(DO_MAKE_SHLIB)
-AC_SUBST(SHLIB_STATIC_TARGET)])dnl
+AC_SUBST(SHLIB_STATIC_TARGET)
+
+AC_ARG_ENABLE([shared],
+[  --enable-shared         build shared libraries],[
+LinkFileDir($3/$1.[$](SHEXT).$2, $1.[$](SHEXT).$2, $4)
+AppendRule([$3/$1.[$](SHEXT): $3/$1.[$](SHEXT).$2
+       [$](RM) $3/$1.[$](SHEXT)
+       [$](LN) $1.[$](SHEXT).$2 $3/$1.[$](SHEXT)
+])
+AppendRule(clean::[
+       [$](RM) $3/$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])
+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
+])
+if test "$krb5_cv_shlibs_need_nover" = "yes" ; then
+AppendRule([install::  $1.[$](SHEXT).$2
+       [$](RM) [$](DESTDIR)[$](KRB5_SHLIBDIR)[$](S)$1.[$](SHEXT)
+       [$](LN) $1.[$](SHEXT).$2 \
+               [$](DESTDIR)[$](KRB5_SHLIBDIR)[$](S)$1.[$](SHEXT)])
+])
+fi
+if test -n "$krb5_cv_staticlibs_enabled" ; then
+        AppendRule([install:: $1.[$](STEXT)
+       [$](INSTALL_DATA) $1.[$](STEXT) [$](DESTDIR)[$](KRB5_LIBDIR)[$](S)$1.[$](STEXT)
+       $(RANLIB) $(DESTDIR)$(KRB5_LIBDIR)[$](S)$1.[$](STEXT)])
+        LinkFileDir($3/$1.[$](STEXT),$1.[$](STEXT),$4)
+        AppendRule([all-unix:: $3/$1.[$](STEXT)])
+fi
+])dnl
 dnl
 dnl Defines LDARGS correctly so that we actually link with the shared library
 dnl
@@ -896,7 +945,7 @@ if test "$krb5_cv_shlibs_enabled" = yes ; then
        AC_MSG_RESULT(Using shared libraries)
        LDARGS="$krb5_cv_shlibs_ldflag -L\$(TOPLIBD) $LDARGS"
        if test "$krb5_cv_exe_need_dirs" = yes; then
-               LDARGS="$LDARGS $krb5_cv_shlibs_dirhead \$(KRB5_SHLIBDIR) $krb5_cv_shlibs_dirhead `pwd`/\$(TOPLIBD)"
+               LDARGS="$LDARGS ${krb5_cv_shlibs_dirhead}\$(KRB5_SHLIBDIR) ${krb5_cv_shlibs_dirhead}`pwd`/\$(TOPLIBD)"
        fi
        SHLIB_TAIL_COMP=$krb5_cv_shlibs_tail_comp
        AC_SUBST(SHLIB_TAIL_COMP)
index e512c06186be3938c4a68641ef3d988302a20532..17f0673205e5a7a450bd33a5947b695094d77f3c 100644 (file)
@@ -24,15 +24,16 @@ case $krb5_cv_host in
 *-*-netbsd*)
        echo "Enabling shared libraries for NetBSD...."
        krb5_cv_shlibs_cflags=-fpic
-       krb5_cv_shlibs_ext=so.0.0
+       krb5_cv_shlibs_ext=so
        krb5_cv_noshlibs_ext=a
+       krb5_cv_shlibs_need_nover=no
        krb5_cv_shlibs_dir=shared
        krb5_cv_shlibs_ldflag=
        krb5_cv_noshlibs_ldflag="-static"
        krb5_cv_shlibs_sym_ufo="-u "
-       krb5_cv_shlibs_dirhead="-L"
+       krb5_cv_shlibs_dirhead="-Wl,-R -Wl,"
        krb5_cv_exe_need_dirs=yes
-       krb5_cv_shlibs_use_dirs=yes
+       krb5_cv_shlibs_use_dirs=no
        krb5_cv_shlibs_use_colon_dirs=no
        krb5_cv_shlibs_tail_comp=
        krb5_cv_shlibs_enabled=yes
@@ -43,11 +44,12 @@ case $krb5_cv_host in
        krb5_cv_shlibs_cflags=-fPIC
        krb5_cv_shlibs_ext=so
        krb5_cv_noshlibs_ext=a
+       krb5_cv_shlibs_need_nover=yes
        krb5_cv_shlibs_dir=shared
        krb5_cv_shlibs_ldflag="-dy"
        krb5_cv_noshlibs_ldflag="-dn"
        krb5_cv_shlibs_sym_ufo="-u "
-       krb5_cv_shlibs_dirhead="-R"
+       krb5_cv_shlibs_dirhead="-R "
        krb5_cv_exe_need_dirs=yes
        krb5_cv_shlibs_use_dirs=yes
        krb5_cv_shlibs_use_colon_dirs=no
@@ -59,6 +61,7 @@ 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_noshlibs_ext=do-not-make
        krb5_cv_shlibs_dir=
        if test $krb5_cv_prog_gcc = yes ; then
@@ -86,11 +89,12 @@ fi
        fi
        krb5_cv_shlibs_ext=so
        krb5_cv_noshlibs_ext=a
+       krb5_cv_shlibs_need_nover=yes
        krb5_cv_shlibs_dir=shared
        krb5_cv_shlibs_ldflag="-dy"
        krb5_cv_noshlibs_ldflag="-dn"
        krb5_cv_shlibs_sym_ufo="-u "
-       krb5_cv_shlibs_dirhead="-R"
+       krb5_cv_shlibs_dirhead="-R "
        krb5_cv_exe_need_dirs=yes
        krb5_cv_shlibs_use_dirs=yes
        krb5_cv_shlibs_use_colon_dirs=no
@@ -103,11 +107,12 @@ alpha-dec-osf*)
        krb5_cv_shlibs_cflags=
        krb5_cv_shlibs_ext=so
        krb5_cv_noshlibs_ext=a
+       krb5_cv_shlibs_need_nover=yes
        krb5_cv_shlibs_dir=
        krb5_cv_shlibs_ldflag="-call_shared"
        krb5_cv_noshlibs_ldflag="-non_shared"
        krb5_cv_shlibs_sym_ufo="-expect_unresolved "
-       krb5_cv_shlibs_dirhead="-rpath"
+       krb5_cv_shlibs_dirhead="-rpath "
        krb5_cv_exe_need_dirs=no
        krb5_cv_shlibs_use_dirs=yes
        krb5_cv_shlibs_use_colon_dirs=yes
@@ -131,6 +136,7 @@ alpha-dec-osf*)
 esac],[krb5_cv_shlibs_cflags=
 krb5_cv_shlibs_ext=
 krb5_cv_noshlibs_ext=a
+krb5_cv_shlibs_need_nover=yes
 krb5_cv_shlibs_dir=
 krb5_cv_shlibs_ldflag=
 krb5_cv_noshlibs_ldflag=