* Make shared libs work on AIX
authorSam Hartman <hartmans@mit.edu>
Sat, 22 Feb 1997 07:57:57 +0000 (07:57 +0000)
committerSam Hartman <hartmans@mit.edu>
Sat, 22 Feb 1997 07:57:57 +0000 (07:57 +0000)
* Support platforms where SHEXT = STEXT

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

src/ChangeLog
src/aclocal.m4

index bec8b439bd28dff471f15499afbe698642302567..0200a8140eb88d443fb306016d3fa844d6d1500d 100644 (file)
@@ -1,8 +1,15 @@
+Fri Feb 21 15:58:55 1997  Sam Hartman  <hartmans@mit.edu>
+
+       * aclocal.m4 (CC_LINK_STATIC): Define appropriate flags to build
+       shared libs on AIX.
+
+
 Fri Feb 21 12:00:53 1997  Theodore Y. Ts'o  <tytso@mit.edu>
 
        * aclocal.m4 (CC_LINK_SHARED): Linux doesn't understand -R; use
                "-bWl,-rpath -Wl,$(PROG_RPATH)" instead.
 
+
 Sun Feb 16 21:17:11 1997  Richard Basch  <basch@lehman.com>
 
        * Makefile.in: Build krb4 library under win16/win32
index 8fbd4015979a3f29010d27f439d8619e99b7144a..f8f1152e70dcbb16f5cb24898a65964cb059d15f 100644 (file)
@@ -1049,8 +1049,8 @@ if test "$enableval" = no && test "$krb5_force_static" != yes; then
        LIBLIST=
        OBJLISTS=
 else
-       LIBLIST='lib$(LIB)$(STLIBEXT)'
-       LIBLINKS='$(TOPLIBD)/lib$(LIB)$(STLIBEXT)'
+       LIBLIST="lib\$(LIB)$STLIBEXT"
+       LIBLINKS="\$(TOPLIBD)/lib\$(LIB)$STLIBEXT"
        OBJLISTS=OBJS.ST
        LIBINSTLIST=install-static
        DEPLIBEXT=$STLIBEXT
@@ -1074,6 +1074,10 @@ AC_ARG_ENABLE([shared],
                LIBINSTLIST="$LIBINSTLIST install-shared"
                DEPLIBEXT=$SHLIBEXT
                CC_LINK="$CC_LINK_SHARED"
+               if test "$STLIBEXT" = "$SHLIBEXT" ; then
+                 STLIBEXT=".a-no-build"
+                 LIBINSTLIST="install-shared" #don't install static
+               fi
                ;;
        esac
 else
@@ -1217,4 +1221,23 @@ mips-sgi-irix*)
        CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
        CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
        ;;
+*-*-aix*)
+       SHLIBVEXT='.a.$(LIBMAJOR).$(LIBMINOR)'
+       SHLIBEXT=.a
+       # AIX doesn't need separate PIC objects
+       SHOBJEXT=.o
+       LDCOMBINE='$(BUILDTOP)/util/makeshlib $(LIBMAJOR).$(LIBMINOR)'
+       SHLIB_EXPFLAGS='  $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
+       PROFFLAGS=-pg
+       if test "$gcc" = "yes" ; then
+         CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Xlinker -bex4:$(BUILDTOP)/util/aix.bincmds '
+       else
+         CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -bex4:$(BUILDTOP)/util/aix.bincmds '
+       fi
+       CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
+       # $(PROG_RPATH) is here to handle things like a shared tcl library
+       RUN_ENV='LIBPATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`:$(PROG_RPATH):/usr/lib:/usr/local/lib; export LIBPATH; '
+
 esac])
+
+