2002-08-29 Ken Raeburn <raeburn@mit.edu>
+ * pre.in (COM_ERR_DEPLIB-sys, COM_ERR_DEPLIB-k5, SS_DEPLIB-k5,
+ SS_DEPLIB-sys, COM_ERR_DEPS-sys, COM_ERR_DEPS-k5, SS_DEPS-sys,
+ SS_DEPS-k5, SS_LIB-sys, SS_LIB-k5, COMPILE_ET-sys, COMPILE_ET-k5,
+ MAKE_COMMANDS-sys, MAKE_COMMANDS-k5): New variables.
+ (COM_ERR_DEPLIB, SS_DEPLIB, COM_ERR_DEPS, SS_DEPS, SS_LIB,
+ COMPILE_ET, MAKE_COMMANDS): Use them, selecting using new
+ configure substitutions.
+ (COM_ERR_LIB): Always define as -lcom_err.
+
* shlib.conf: Use $(LDFLAGS) in CC_LINK_SHARED and CC_LINK_STATIC,
after other options.
DES425_DEPLIB = @DES425_DEPLIB@ # $(TOPLIBD)/libdes425$(DEPLIBEXT)
KRB5_DEPLIB = $(TOPLIBD)/libkrb5$(DEPLIBEXT)
CRYPTO_DEPLIB = $(TOPLIBD)/libk5crypto$(DEPLIBEXT)
-COM_ERR_DEPLIB = $(TOPLIBD)/libcom_err$(DEPLIBEXT)
+COM_ERR_DEPLIB = $(COM_ERR_DEPLIB-@COM_ERR_VERSION@)
+COM_ERR_DEPLIB-sys = # empty
+COM_ERR_DEPLIB-k5 = $(TOPLIBD)/libcom_err$(DEPLIBEXT)
# These are forced to use ".a" as an extension because they're never
# built shared.
-SS_DEPLIB = $(TOPLIBD)/libss.a
+SS_DEPLIB = $(SS_DEPLIB-@SS_VERSION@)
+SS_DEPLIB-k5 = $(TOPLIBD)/libss.a
+SS_DEPLIB-sys =
KRB524_DEPLIB = @KRB524_DEPLIB@
PTY_DEPLIB = $(TOPLIBD)/libpty.a
# Header file dependencies we might override someday.
# See util/depfix.sed.
-COM_ERR_DEPS = $(BUILDTOP)/include/com_err.h
-SS_DEPS = $(BUILDTOP)/include/ss/ss.h $(BUILDTOP)/include/ss/ss_err.h
+COM_ERR_DEPS = $(COM_ERR_DEPS-@COM_ERR_VERSION@)
+COM_ERR_DEPS-sys = # empty
+COM_ERR_DEPS-k5 = $(BUILDTOP)/include/com_err.h
+SS_DEPS = $(SS_DEPS-@SS_VERSION@)
+SS_DEPS-sys =
+SS_DEPS-k5 = $(BUILDTOP)/include/ss/ss.h $(BUILDTOP)/include/ss/ss_err.h
# LIBS gets substituted in... e.g. -lnsl -lsocket
# GEN_LIB is -lgen if needed for regexp
GEN_LIB = @GEN_LIB@
-SS_LIB = $(TOPLIBD)/libss.a
+SS_LIB = $(SS_LIB-@SS_VERSION@)
+SS_LIB-sys = -lss
+SS_LIB-k5 = $(TOPLIBD)/libss.a
KDB5_LIB = -lkdb5
DB_LIB = -ldb
K5CRYPTO_LIB_libopt = -lk5crypto
K5CRYPTO_LIB_frameworkopt = -framework Kerberos5Crypto
-COM_ERR_LIB = $(COM_ERR_LIB_@LIB_LINK_OPT@)
-COM_ERR_LIB_libopt = -lcom_err
-COM_ERR_LIB_frameworkopt = -framework FooComErr
+COM_ERR_LIB = -lcom_err
GSS_KRB5_LIB = $(GSS_KRB5_LIB_@LIB_LINK_OPT@)
GSS_KRB5_LIB_libopt = -lgssapi_krb5
# error table rules
#
### /* these are invoked as $(...) foo.et, which works, but could be better */
-COMPILE_ET= $(BUILDTOP)/util/et/compile_et -d $(SRCTOP)/util/et
+COMPILE_ET= $(COMPILE_ET-@COM_ERR_VERSION@)
+COMPILE_ET-sys= compile_et
+COMPILE_ET-k5= $(BUILDTOP)/util/et/compile_et -d $(SRCTOP)/util/et
.SUFFIXES: .h .c .et .ct
# ss command table rules
#
-MAKE_COMMANDS= $(BUILDTOP)/util/ss/mk_cmds
+MAKE_COMMANDS= $(MAKE_COMMANDS-@SS_VERSION@)
+MAKE_COMMANDS-sys= mk_cmds
+MAKE_COMMANDS-k5= $(BUILDTOP)/util/ss/mk_cmds
.ct.c:
$(MAKE_COMMANDS) $<