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
[
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
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
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)
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)
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
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)
*-*-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
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
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
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
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
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=