Drop "lib" prefix from things intended to be dynamically loaded
authorKen Raeburn <raeburn@mit.edu>
Wed, 6 Jul 2005 23:17:21 +0000 (23:17 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 6 Jul 2005 23:17:21 +0000 (23:17 +0000)
* lib.in (LIBPREFIX): New variable.
* libnover.in (LIBPREFIX): New variable.
(LIBLIST, $(LIBBASE)$(SHLIBVEXT), $(TOPLIBD)/$(LIBBASE)$(SHLIBEXT), clean-libs,
install-shared): Drop "lib" from generated shared object name.
* pre.in (SHLIB_EXPORT_FILE): Use $(LIBPREFIX).
* shlib.conf: Use $(LIBPREFIX) in LDCOMBINE.

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

src/config/ChangeLog
src/config/lib.in
src/config/libnover.in
src/config/pre.in
src/config/shlib.conf

index 48ddafc5b9e1aef23ee72ca7be156d4046f7c2f1..c883acf3dd0ec3ce6000cf7a37b518243d8efb17 100644 (file)
@@ -1,3 +1,13 @@
+2005-07-06  Ken Raeburn  <raeburn@mit.edu>
+
+       * lib.in (LIBPREFIX): New variable.
+       * libnover.in (LIBPREFIX): New variable.
+       (LIBLIST, $(LIBBASE)$(SHLIBVEXT),
+       $(TOPLIBD)/$(LIBBASE)$(SHLIBEXT), clean-libs, install-shared):
+       Drop "lib" from generated shared object name.
+       * pre.in (SHLIB_EXPORT_FILE): Use $(LIBPREFIX).
+       * shlib.conf: Use $(LIBPREFIX) in LDCOMBINE.
+
 2005-06-29  Ken Raeburn  <raeburn@mit.edu>
 
        * pre.in (KRB5_DB_MODULE_DIR): New variable.
index 5343b6014c035d4b1eb3780638b8de76bb06f310..1107b761d164b01f67e71bc013a851d7f6a71ce3 100644 (file)
@@ -24,6 +24,8 @@
 #                      form dir1:dir2 ...
 # RELDIR       path to this directory relative to $(TOPLIBD)
 
+LIBPREFIX=lib
+
 # STOBJLISTS=dir1/OBJS.ST dir2/OBJS.ST etc...
 SHOBJLISTS=$(STOBJLISTS:.ST=.SH)
 PFOBJLISTS=$(STOBJLISTS:.ST=.PF)
index 33ae9da1b88946072add70350b15e181ade2b065..45db93623e90adee0e9f877c6d29bbc4d163f3d3 100644 (file)
@@ -23,6 +23,8 @@
 #                      form dir1:dir2 ...
 # RELDIR       path to this directory relative to $(TOPLIBD)
 
+LIBPREFIX=
+
 # STOBJLISTS=dir1/OBJS.ST dir2/OBJS.ST etc...
 SHOBJLISTS=$(STOBJLISTS:.ST=.SH)
 
@@ -32,10 +34,10 @@ dummy-target-1 $(SUBDIROBJLISTS) $(SUBDIROBJLISTS:.ST=.SH) $(SUBDIROBJLISTS:.ST=
 PARSE_OBJLISTS= set -x && $(PERL) -p -e '$$e=$$ARGV; $$e =~ s/OBJS\...$$//; s/^/ /; s/ $$//; s/ / $$e/g;'
 
 SHLIBVEXT=$(SHLIBEXT)
-LIBLIST=lib$(LIBBASE)$(SHLIBEXT)
+LIBLIST=$(LIBBASE)$(SHLIBEXT)
 LIBINSTLIST=install-shared
 
-lib$(LIBBASE)$(SHLIBVEXT): $(SHOBJLISTS) $(SHLIB_EXPDEPS) $(SHLIB_EXPORT_FILE_DEP)
+$(LIBBASE)$(SHLIBVEXT): $(SHOBJLISTS) $(SHLIB_EXPDEPS) $(SHLIB_EXPORT_FILE_DEP)
        $(RM) $@
        @echo "building shared $(LIBBASE) library"
        set -x; objlist=`$(PARSE_OBJLISTS) $(SHOBJLISTS)` && $(MAKE_SHLIB_COMMAND)
@@ -74,20 +76,20 @@ hpux10.exports: $(SHLIB_EXPORT_FILE) Makefile
        echo "+e errno" >> hpux10.tmp
        mv -f hpux10.tmp hpux10.exports
 
-$(TOPLIBD)/lib$(LIBBASE)$(SHLIBEXT): lib$(LIBBASE)$(SHLIBEXT)
+$(TOPLIBD)/$(LIBBASE)$(SHLIBEXT): $(LIBBASE)$(SHLIBEXT)
        $(RM) $@
-       (cd $(TOPLIBD) && $(LN_S) $(RELDIR)/lib$(LIBBASE)$(SHLIBEXT) .)
+       (cd $(TOPLIBD) && $(LN_S) $(RELDIR)/$(LIBBASE)$(SHLIBEXT) .)
 
 all-libs: $(LIBLIST)
 
 clean-libs:
-       $(RM) lib$(LIBBASE)$(SHLIBEXT)
+       $(RM) $(LIBBASE)$(SHLIBEXT)
        $(RM) binutils.versions osf1.exports
 
 install-libs: $(LIBINSTLIST)
 install-shared:
-       $(RM) $(DESTDIR)$(KRB5_LIBDIR)/lib$(LIBBASE)$(SHLIBEXT)
-       $(INSTALL_SHLIB) lib$(LIBBASE)$(SHLIBEXT) $(DESTDIR)$(KRB5_LIBDIR)
+       $(RM) $(DESTDIR)$(KRB5_DB_MODULE_DIR)/$(LIBBASE)$(SHLIBEXT)
+       $(INSTALL_SHLIB) $(LIBBASE)$(SHLIBEXT) $(DESTDIR)$(KRB5_DB_MODULE_DIR)
 
 Makefile: $(SRCTOP)/config/libnover.in
 $(thisconfigdir)/config.status: $(SRCTOP)/config/shlib.conf
index 1b26fef033e86d0e81975ee0030c572c394d0659..9ab4f65d8c84652d55c14bc7357440e6529be250 100644 (file)
@@ -501,7 +501,7 @@ PFLIBEXT=@PFLIBEXT@
 
 # File with symbol names to be exported, both functions and data,
 # currently not distinguished.
-SHLIB_EXPORT_FILE=$(srcdir)/lib$(LIBBASE).exports
+SHLIB_EXPORT_FILE=$(srcdir)/$(LIBPREFIX)$(LIBBASE).exports
 
 # File that needs to be current for building the shared library,
 # usually SHLIB_EXPORT_FILE, but not always, if we have to convert
index 3261b672ceff8281576483469d8f8ca6b8251787..9d2ed00fbc4db82310bd0bbd0576f91e1753309f 100644 (file)
@@ -39,7 +39,7 @@ alpha*-dec-osf*)
        # Alpha OSF/1 doesn't need separate PIC objects
        SHOBJEXT=.o
        INIT_FINI_PREP=initfini=
-       LDCOMBINE='$(CC) $(PTHREAD_CFLAGS) -shared -Wl,-expect_unresolved -Wl,\* -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,lib$(LIBBASE)$(SHLIBSEXT) -Wl,-hidden -Wl,-input,osf1.exports $$initfini'
+       LDCOMBINE='$(CC) $(PTHREAD_CFLAGS) -shared -Wl,-expect_unresolved -Wl,\* -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) -Wl,-hidden -Wl,-input,osf1.exports $$initfini'
        SHLIB_EXPORT_FILE_DEP=osf1.exports
        use_linker_init_option=yes
        use_linker_fini_option=yes
@@ -92,11 +92,11 @@ alpha*-dec-osf*)
        if test "$krb5_cv_prog_gcc" = yes; then
                PICFLAGS=-fPIC
                SHLIB_EXPFLAGS='-Wl,+s -Wl,+b,$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
-               LDCOMBINE='gcc -fPIC -shared -Wl,+h,lib$(LIBBASE)$(SHLIBSEXT) -Wl,-c,hpux10.exports'
+               LDCOMBINE='gcc -fPIC -shared -Wl,+h,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) -Wl,-c,hpux10.exports'
        else
                PICFLAGS=+z
                SHLIB_EXPFLAGS='+s +b $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
-               LDCOMBINE='ld -b +h lib$(LIBBASE)$(SHLIBSEXT) -c hpux10.exports'
+               LDCOMBINE='ld -b +h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) -c hpux10.exports'
        fi
        CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,+s $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
        CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
@@ -120,9 +120,9 @@ mips-sgi-irix6.3)   # This is a Kludge; see below
        SHOBJEXT=.o
        # Kludge follows: (gcc makes n32 object files but ld expects o32, so we reeducate ld)
        if test "$krb5_cv_prog_gcc" = yes; then
-               LDCOMBINE='ld -n32 -shared -ignore_unresolved -update_registry $(BUILDTOP)/so_locations -soname lib$(LIBBASE)$(SHLIBSEXT)'
+               LDCOMBINE='ld -n32 -shared -ignore_unresolved -update_registry $(BUILDTOP)/so_locations -soname $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
        else
-               LDCOMBINE='ld -shared -ignore_unresolved -update_registry $(BUILDTOP)/so_locations -soname lib$(LIBBASE)$(SHLIBSEXT)'
+               LDCOMBINE='ld -shared -ignore_unresolved -update_registry $(BUILDTOP)/so_locations -soname $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
        fi
        SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
        # no gprof for Irix...
@@ -161,7 +161,7 @@ mips-sgi-irix*)
                INIT_FINI_PREP='initfini=; for f in . $(LIBINITFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-init,$${f}__auxinit"; fi; done; for f in . $(LIBFINIFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-fini,$${f}"; fi; done'
                LDCOMBINE_TAIL='-Wl,-exports_file -Wl,$(SHLIB_EXPORT_FILE)'
        fi
-       LDCOMBINE='$(CC) -shared -Wl,-ignore_unresolved -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,lib$(LIBBASE)$(SHLIBSEXT) $$initfini'
+       LDCOMBINE='$(CC) -shared -Wl,-ignore_unresolved -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) $$initfini'
        SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
        # no gprof for Irix...
        PROFFLAGS=-p
@@ -189,10 +189,10 @@ mips-sgi-irix*)
 mips-sni-sysv4)
        if test "$krb5_cv_prog_gcc" = yes; then
                PICFLAGS=-fpic
-               LDCOMBINE='$(CC) -G -Wl,-h -Wl,lib$(LIBBASE)$(SHLIBSEXT)'
+               LDCOMBINE='$(CC) -G -Wl,-h -Wl,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
        else
                PICFLAGS=-Kpic
-               LDCOMBINE='$(CC) -G -h lib$(LIBBASE)$(SHLIBSEXT)'
+               LDCOMBINE='$(CC) -G -h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
        fi
        SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
        SHLIBEXT=.so
@@ -210,7 +210,7 @@ mips-*-netbsd*)
        SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
        SHLIBSEXT='.so.$(LIBMAJOR)'
        SHLIBEXT=.so
-       LDCOMBINE='ld -shared -soname lib$(LIBBASE)$(SHLIBSEXT)'
+       LDCOMBINE='ld -shared -soname $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
        SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
        RPATH_FLAG='-Wl,-rpath -Wl,'
        CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
@@ -273,7 +273,7 @@ mips-*-netbsd*)
        SHLIBSEXT='.$(LIBMAJOR).dylib'
        SHLIB_EXPFLAGS='$(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
        SHLIBEXT=.dylib
-       LDCOMBINE='$(CC) -undefined warning -dynamiclib -compatibility_version $(LIBMAJOR) -current_version $(LIBMAJOR).$(LIBMINOR) -install_name "$(KRB5_LIBDIR)/lib$(LIBBASE)$(SHLIBVEXT)" $(CFLAGS) $(LDFLAGS)'
+       LDCOMBINE='$(CC) -undefined warning -dynamiclib -compatibility_version $(LIBMAJOR) -current_version $(LIBMAJOR).$(LIBMINOR) -install_name "$(KRB5_LIBDIR)/$(LIBPREFIX)$(LIBBASE)$(SHLIBVEXT)" $(CFLAGS) $(LDFLAGS)'
        CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -dynamic $(CFLAGS) $(LDFLAGS)'
        CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
        RUN_ENV='DYLD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export DYLD_LIBRARY_PATH;'
@@ -288,11 +288,11 @@ mips-*-netbsd*)
 *-*-solaris*)
        if test "$krb5_cv_prog_gcc" = yes; then
                PICFLAGS=-fPIC
-               LDCOMBINE='$(CC) -shared -h lib$(LIBBASE)$(SHLIBSEXT)'
+               LDCOMBINE='$(CC) -shared -h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
        else
                PICFLAGS=-KPIC
                # Solaris cc doesn't default to stuffing the SONAME field...
-               LDCOMBINE='$(CC) -dy -G -z text -h lib$(LIBBASE)$(SHLIBSEXT) $$initfini'
+               LDCOMBINE='$(CC) -dy -G -z text -h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) $$initfini'
                #
                INIT_FINI_PREP='if test -z "$(LIBINITFUNC)"; then initfini=; else initfini="-Wl,-z,initarray=$(LIBINITFUNC)__auxinit"; fi ; if test -z "$(LIBFINIFUNC)"; then :; else initfini="$$initfini -Wl,-z,finiarray=$(LIBFINIFUNC)" ; fi'
                INIT_FINI_PREP='initfini=; for f in . $(LIBINITFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-z,initarray=$${f}__auxinit"; fi; done; for f in . $(LIBFINIFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-z,finiarray=$$f"; fi; done'
@@ -335,7 +335,7 @@ mips-*-netbsd*)
        SHLIBEXT=.so
        # Linux ld doesn't default to stuffing the SONAME field...
        # Use objdump -x to examine the fields of the library
-       LDCOMBINE='$(CC) -shared -fPIC -Wl,-h,lib$(LIBBASE)$(SHLIBSEXT)'
+       LDCOMBINE='$(CC) -shared -fPIC -Wl,-h,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
        # 
        LDCOMBINE_TAIL='-Wl,--version-script binutils.versions'
        SHLIB_EXPORT_FILE_DEP=binutils.versions
@@ -354,7 +354,7 @@ mips-*-netbsd*)
        # for the libraries marked as not having any dependencies; while
        # that's not strictly correct, the resulting behavior -- not adding
        # extra -R directories -- is still what we want.
-       #LDCOMBINE='ld -shared -h lib$(LIBBASE)$(SHLIBSEXT)'
+       #LDCOMBINE='ld -shared -h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
        #LDCOMBINE_TAIL="-lc"
        #SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'