* aclocal.m4 (KRB5_BUILD_LIBRARY_STATIC): Fix up some things so
authorTom Yu <tlyu@mit.edu>
Tue, 12 Aug 1997 01:19:06 +0000 (01:19 +0000)
committerTom Yu <tlyu@mit.edu>
Tue, 12 Aug 1997 01:19:06 +0000 (01:19 +0000)
that this macro actually works; it's still necessary to precede a
call to KRB5_BUILD_LIBOBJS with a call to
KRB5_BUILD_LIBRARY_STATIC, though.  Basically if you AC_DEFUN
something that produces shell code and then calls a macro that
AC_REQUIREs something else, then all the AC_REQUIREd stuff ends up
coming *before* the shell code in the first macro.  I'm not sure
there's a reasonable workaround, or whether this can even be
considered to be a bug.

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

src/ChangeLog
src/aclocal.m4

index 87db266ad1a64dac2ae36c0941292d0c00b7b2ee..700cb3680cbb6b4a1910fd2826e4be6f1a05f708 100644 (file)
@@ -1,3 +1,15 @@
+Mon Aug 11 21:16:50 1997  Tom Yu  <tlyu@mit.edu>
+
+       * aclocal.m4 (KRB5_BUILD_LIBRARY_STATIC): Fix up some things so
+       that this macro actually works; it's still necessary to precede a
+       call to KRB5_BUILD_LIBOBJS with a call to
+       KRB5_BUILD_LIBRARY_STATIC, though.  Basically if you AC_DEFUN
+       something that produces shell code and then calls a macro that
+       AC_REQUIREs something else, then all the AC_REQUIREd stuff ends up
+       coming *before* the shell code in the first macro.  I'm not sure
+       there's a reasonable workaround, or whether this can even be
+       considered to be a bug.
+
 Wed Aug  6 20:25:49 1997  Tom Yu  <tlyu@mit.edu>
 
        * aclocal.m4: Add support for --with-hesiod (and add it to
index 942237ef69d61de9748b9f1a73b8ca8b041576d7..c0418274d6c2f33450f3155226e7544482bf7b55 100644 (file)
@@ -989,7 +989,8 @@ dnl KRB5_BUILD_LIBRARY_STATIC
 dnl
 dnl Force static library build.
 
-AC_DEFUN(KRB5_BUILD_LIBRARY_STATIC,
+define(KRB5_BUILD_LIBRARY_STATIC,
+dnl Use define rather than AC_DEFUN to avoid ordering problems.
 [krb5_force_static=yes
 KRB5_BUILD_LIBRARY])
 
@@ -1084,7 +1085,7 @@ fi
 # Check whether to build shared libraries.
 AC_ARG_ENABLE([shared],
 [  --enable-shared         build shared libraries],
-[if test "$enableval" = yes && test "$krb5_force_static" != yes; then
+[if test "$enableval" = yes; then
        case "$SHLIBEXT" in
        .so-nobuild)
                AC_MSG_WARN([shared libraries not supported on this architecture])
@@ -1092,20 +1093,24 @@ AC_ARG_ENABLE([shared],
                CC_LINK="$CC_LINK_STATIC"
                ;;
        *)
-               AC_MSG_RESULT([Enabling shared libraries.])
-               LIBLIST="$LIBLIST "'lib$(LIB)$(SHLIBEXT)'
-               LIBLINKS="$LIBLINKS "'$(TOPLIBD)/lib$(LIB)$(SHLIBEXT) $(TOPLIBD)/lib$(LIB)$(SHLIBVEXT)'
-               case "$SHLIBSEXT" in
-               .so.s-nobuild)
-                       LIBINSTLIST="$LIBINSTLIST install-shared"
-                       ;;
-               *)
-                       LIBLIST="$LIBLIST "'lib$(LIB)$(SHLIBSEXT)'
-                       LIBLINKS="$LIBLINKS "'$(TOPLIBD)/lib$(LIB)$(SHLIBSEXT)'
-                       LIBINSTLIST="$LIBINSTLIST install-shlib-soname"
-                       ;;
-               esac
-               OBJLISTS="$OBJLISTS OBJS.SH"
+               if test "$krb5_force_static" = "yes"; then
+                       AC_MSG_RESULT([Forcing static libraries.])
+               else
+                       AC_MSG_RESULT([Enabling shared libraries.])
+                       LIBLIST="$LIBLIST "'lib$(LIB)$(SHLIBEXT)'
+                       LIBLINKS="$LIBLINKS "'$(TOPLIBD)/lib$(LIB)$(SHLIBEXT) $(TOPLIBD)/lib$(LIB)$(SHLIBVEXT)'
+                       case "$SHLIBSEXT" in
+                       .so.s-nobuild)
+                               LIBINSTLIST="$LIBINSTLIST install-shared"
+                               ;;
+                       *)
+                               LIBLIST="$LIBLIST "'lib$(LIB)$(SHLIBSEXT)'
+                               LIBLINKS="$LIBLINKS "'$(TOPLIBD)/lib$(LIB)$(SHLIBSEXT)'
+                               LIBINSTLIST="$LIBINSTLIST install-shlib-soname"
+                               ;;
+                       esac
+                       OBJLISTS="$OBJLISTS OBJS.SH"
+               fi
                DEPLIBEXT=$SHLIBEXT
                CC_LINK="$CC_LINK_SHARED"
                if test "$STLIBEXT" = "$SHLIBEXT" ; then