+2004-05-04 Ken Raeburn <raeburn@mit.edu>
+
+ * configure.in: Invoke KRB5_BUILD_PROGRAM and KRB5_RUN_FLAGS.
+ * Makefile.in (PROG_RPATH, PROG_LIBPATH, RUN_SETUP): New
+ variables.
+ (test_et, t_com_err): Use the built library, even if shared.
+ (check-unix): Set up the environment properly to load shared
+ libraries when running the test programs.
+
2004-04-29 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (LIBINITFUNC, LIBFINIFUNC): New variables.
do-its4: error_table.y et_lex.lex.c
$(ITS4) $(ITS4OPTS) $(SRCS)
-test_et: test_et.o test1.o test2.o $(LIBOBJS)
- $(CC) -o test_et test_et.o test1.o test2.o $(LIBOBJS)
-t_com_err: t_com_err.o et1.o et2.o $(LIBOBJS)
- $(CC) -o t_com_err t_com_err.o et1.o et2.o $(LIBOBJS)
+#test_et: test_et.o test1.o test2.o $(LIBOBJS)
+# $(CC) -o test_et test_et.o test1.o test2.o $(LIBOBJS)
+#t_com_err: t_com_err.o et1.o et2.o $(LIBOBJS)
+# $(CC) -o t_com_err t_com_err.o et1.o et2.o $(LIBOBJS)
+
+PROG_RPATH=$(KRB5_LIBDIR)
+PROG_LIBPATH=-L$(TOPLIBD)
+test_et: test_et.o test1.o test2.o $(COM_ERR_DEPLIB)
+ $(CC_LINK) -o test_et test_et.o test1.o test2.o -lcom_err
+t_com_err: t_com_err.o et1.o et2.o $(COM_ERR_DEPLIB)
+ $(CC_LINK) -o t_com_err t_com_err.o et1.o et2.o -lcom_err
all-unix:: compile_et includes
clean-unix::
$(RM) $(BUILDTOP)/include/com_err.h
+RUN_SETUP = @KRB5_RUN_ENV@
# test_et doesn't have an interesting exit status, but it'll exercise
# some cases that t_com_err doesn't, so let's see if it crashes.
check-unix:: t_com_err test_et
- ./test_et
- ./t_com_err
+ $(RUN_SETUP) ./test_et
+ $(RUN_SETUP) ./t_com_err
# The real compile_et just isn't portable. (But then again, anything using
# lex and yacc isn't portable by definition. :-( )