Made makeshlib produced by Makefile, so I can know whether I'm running Gcc. Also...
authorSam Hartman <hartmans@mit.edu>
Mon, 26 Jun 1995 22:36:33 +0000 (22:36 +0000)
committerSam Hartman <hartmans@mit.edu>
Mon, 26 Jun 1995 22:36:33 +0000 (22:36 +0000)
CVS:
----------------------------------------------------------------------
automatically CVS: CVS: Committing in .  CVS: CVS: Modified Files:
----------------------------------------------------------------------
Changed shared libraries so that it works under AIX and sets the
libpath correctly.  Currently only works under Xlc, but hooks for Gcc
support are present.

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

src/util/ChangeLog
src/util/Makefile.in
src/util/configure.in
src/util/makeshlib.sh [moved from src/util/makeshlib with 90% similarity]

index 35858420ea9941dd7633e61d5f4de253ae42b0a8..e94a43310207a4c5efc96c242cb6edb1d52a36ce 100644 (file)
@@ -1,3 +1,21 @@
+Fri Jun 23 19:11:20 1995  Sam Hartman  <hartmans@tardis.MIT.EDU>
+
+       * configure.in: Add aix.bincmds as target on AIX.
+       (SHLIB_TAIL_COMP): set and substitute so SHLIBDIR works
+
+       * Makefile.in (makeshlib): Create aix.bincmds with the binder
+        script exerpt to get the libpath right.
+
+       * configure.in: Modified to test and see if we're using Gcc
+
+       * Makefile.in (makeshlib): Make makeshlib from makeshlib.sh
+
+
+       * makeshlib.sh (LIBPATH): Modified to allow for substitution of CC
+        and HAVE_GCC from Makefile.  Modified to imbed the proper search
+        path into the shared libraries for AIX.
+
+
 Thu Jun 22 21:02:13 1995  Sam Hartman  <hartmans@tardis.MIT.EDU>
 
        * makeshlib: Added AIX support.
index 18dea2cf53fb78adf85f3d99b03fa825cc07dd72..76138f650c8426a7e7542d0c4606107e5e7c4230 100644 (file)
@@ -1,10 +1,13 @@
 CFLAGS = $(CCOPTS)
 
 editsh = sed -e 's,@''ARADD''@,$(ARADD),g' -e 's,@''ARCHIVE''@,$(ARCHIVE),g'
+HOST_TYPE=@HOST_TYPE@
+HAVE_GCC=@HAVE_GCC@
+SLIBSH=sed -e 's,@''CC''@,$(CC),g' -e 's,@''HOST_TYPE''@,$(HOST_TYPE),g' -e 's,@''HAVE_GCC''@,$(HAVE_GCC),g'
 
 all:: all-$(WHAT)
 
-all-unix:: libupdate
+all-unix:: libupdate makeshlib
 all-mac::
 all-windows: libupdate
 
@@ -14,6 +17,12 @@ libupdate: $(srcdir)/libupdate.sh
        $(RM) $@ $@.tmp
        $(editsh) $(srcdir)/libupdate.sh > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
 
+makeshlib: $(srcdir)/makeshlib.sh Makefile
+        $(RM) $@ $@.tmp
+        $(SLIBSH) $(srcdir)/makeshlib.sh >$@.tmp&&chmod a+x $@.tmp&&mv $@.tmp $@
+
+aix.bincmds: Makefile
+        echo libpath $(KRB5_SHLIBDIR):`pwd`/$(TOPLIBD):/usr/lib:/lib >aix.bincmds
 clean::
        $(RM) libupdate
 
index 42b89fbcb7cfebf935368acdd305a09a32655f2d..b5520236c2a10d692d3038708929eeeb3bb4b03f 100644 (file)
@@ -2,6 +2,24 @@ AC_INIT(configure.in)
 CONFIG_RULES
 AC_PROG_ARCHIVE
 AC_PROG_ARCHIVE_ADD
+AC_MSG_CHECKING(whether running Gcc)
+AC_EGREP_CPP(yes,[#ifdef __GNUC__
+yes;
+#endif],HAVE_GCC=yes,HAVE_GCC=)
+if test -n "$HAVE_GCC" ; then
+        AC_MSG_RESULT(yes)
+        else AC_MSG_RESULT(no)
+        fi
+AC_SUBST(HAVE_GCC)
+HOST_TYPE=$krb5_cv_host
+AC_SUBST(HOST_TYPE)
+case $HOST_TYPE in
+*-*-aix*)
+       AppendRule(all::aix.bincmds)
+        ;;
+esac
+SHLIB_TAIL_COMP=$krb5_cv_shlibs_tail_comp
+AC_SUBST(SHLIB_TAIL_COMP)
 CONFIG_DIRS(et ss profile berk_db)
 DO_SUBDIRS
 V5_AC_OUTPUT_MAKEFILE
similarity index 90%
rename from src/util/makeshlib
rename to src/util/makeshlib.sh
index 8f6f7dc42ce83f87a7d9451b68f9519a3c5da642..729d7f2d3e1f29ec99e4b7c54d45bf361e14008b 100644 (file)
@@ -2,12 +2,14 @@
 #
 # makeshlib: Make a shared library.....
 #
-# Usage: makeshlib <host> <CC> <library> <libdirfl> <liblist> <flags>  \
+# Usage: makeshlib  <library> <libdirfl> <liblist> <flags>     \
 #      <directories>
 #
 
-host=$1 ; shift
-CC=$1 ; shift
+host=@HOST_TYPE@
+CC="@CC@"
+HAVE_GCC=@HAVE_GCC@
+
 library=$1 ; shift
 libdirfl=$1; shift
 liblist=$1; shift
@@ -29,7 +31,8 @@ case $host in
        do
                sed -e "s;^;$i/;" -e "s; ; $i/;g" $i/DONE
        done`
-       
+echo rm $library 
+rm -f $library 2>/dev/null
 ar cq $library $FILES || exit $?
        dump -g $library | sed -e 's/^[         ]*[0-9][0-9]*[  ]*\([^  .][^    ]*\)$/\1/p;d' | sort | uniq > ${library}.syms
        stat=$?