need more dylib_file specs for darwin
authorKen Raeburn <raeburn@mit.edu>
Thu, 9 Aug 2007 20:09:48 +0000 (20:09 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 9 Aug 2007 20:09:48 +0000 (20:09 +0000)
Currently the KDB LDAP plugin won't build on Mac OS X 10.4 if a tree
hasn't been previously installed, because it can't find the libraries
that we haven't installed yet.  (Finding earlier versions isn't
sufficient, if symbols are needed that are not present in the
installed versions.)

Add -dylib_file specs for libkadm5srv and libkdb to LDCOMBINE, in
addition to libkrb5support that was already there.

Unfortunately, this makes shlib.conf dependent on more library version
numbers.

ticket: new

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

src/config/shlib.conf

index bc4a51efd78ebec93810b3371f456bb1820f6131..5f5b95dd56e0b076be00baa3bc005f56bb250d42 100644 (file)
@@ -300,13 +300,16 @@ mips-*-netbsd*)
        SHLIBEXT=.dylib
        DYNOBJEXT=.so
        SHLIB_EXPORT_FILE_DEP=darwin.exports
-       MAKE_DYNOBJ_COMMAND='$(CC) -bundle $(CFLAGS) $(LDFLAGS) -o $@ $$objlist $(DYNOBJ_EXPFLAGS) -exported_symbols_list darwin.exports'
        LDCOMBINE='$(CC) -undefined error -dynamiclib -compatibility_version $(LIBMAJOR) -current_version $(LIBMAJOR).$(LIBMINOR) -install_name "$(KRB5_LIBDIR)/$(LIBPREFIX)$(LIBBASE)$(SHLIBVEXT)" $(CFLAGS) $(LDFLAGS)'
        # The -dylib_file option tells the linker where to find indirect dependent
        # libraries, without adding them to the dependency list.  We need this because
        # the direct dependent libraries contain the pathname where the indirect
        # dependent libraries will be installed (but haven't been yet).
-       LDCOMBINE_TAIL='-dylib_file "$(KRB5_LIBDIR)/libkrb5support.1.1.dylib":$(TOPLIBD)/libkrb5support.1.1.dylib'
+       LDCOMBINE_TAIL=""
+       for lib in libkrb5support.1.1.dylib libkadm5srv.5.1.dylib libkdb5.4.0.dylib; do
+           LDCOMBINE_TAIL="$LDCOMBINE_TAIL -dylib_file \"\$(KRB5_LIBDIR)/$lib\":\$(TOPLIBD)/$lib"
+       done
+       MAKE_DYNOBJ_COMMAND='$(CC) -bundle $(CFLAGS) $(LDFLAGS) -o $@ $$objlist $(DYNOBJ_EXPFLAGS) -exported_symbols_list darwin.exports'" ${LDCOMBINE_TAIL}"
        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;'