From 8de10cd1de8cf354a3ea6c2a8c8416f7c0b1cc0d Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Mon, 26 Jun 1995 22:36:33 +0000 Subject: [PATCH] Made makeshlib produced by Makefile, so I can know whether I'm running Gcc. Also, Ted wanted this to happen eventually anyway 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 | 18 ++++++++++++++++++ src/util/Makefile.in | 11 ++++++++++- src/util/configure.in | 18 ++++++++++++++++++ src/util/{makeshlib => makeshlib.sh} | 11 +++++++---- 4 files changed, 53 insertions(+), 5 deletions(-) rename src/util/{makeshlib => makeshlib.sh} (90%) diff --git a/src/util/ChangeLog b/src/util/ChangeLog index 35858420e..e94a43310 100644 --- a/src/util/ChangeLog +++ b/src/util/ChangeLog @@ -1,3 +1,21 @@ +Fri Jun 23 19:11:20 1995 Sam Hartman + + * 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 * makeshlib: Added AIX support. diff --git a/src/util/Makefile.in b/src/util/Makefile.in index 18dea2cf5..76138f650 100644 --- a/src/util/Makefile.in +++ b/src/util/Makefile.in @@ -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 diff --git a/src/util/configure.in b/src/util/configure.in index 42b89fbcb..b5520236c 100644 --- a/src/util/configure.in +++ b/src/util/configure.in @@ -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 diff --git a/src/util/makeshlib b/src/util/makeshlib.sh similarity index 90% rename from src/util/makeshlib rename to src/util/makeshlib.sh index 8f6f7dc42..729d7f2d3 100644 --- a/src/util/makeshlib +++ b/src/util/makeshlib.sh @@ -2,12 +2,14 @@ # # makeshlib: Make a shared library..... # -# Usage: makeshlib \ +# Usage: makeshlib \ # # -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=$? -- 2.26.2