Tru64 and Irix have RPATH issues for test suite
[krb5.git] / src / config / pre.in
1 ############################################################
2 ## config/pre.in
3 ## common prefix for all Makefile.in in the Kerberos V5 tree.
4 ##
5
6 WHAT = unix
7 SHELL=/bin/sh
8
9 all:: all-$(WHAT)
10
11 clean:: clean-$(WHAT)
12
13 distclean:: distclean-$(WHAT)
14
15 install:: install-$(WHAT)
16
17 check:: check-$(WHAT)
18
19 install-headers:: install-headers-$(WHAT)
20
21 ##############################
22 # Recursion rule support
23 #
24
25 # The commands for the recursion targets live in config/post.in.
26 #
27 # General form of recursion rules:
28 #
29 # Each recursive target foo-unix has related targets: foo-prerecurse,
30 # foo-recurse, and foo-postrecurse
31 #
32 # The foo-recurse rule is in post.in.  It is what actually recursively
33 # calls make.
34 #
35 # foo-recurse depends on foo-prerecurse, so any targets that must be
36 # built before descending into subdirectories must be dependencies of
37 # foo-prerecurse.
38 #
39 # foo-postrecurse depends on foo-recurse, but targets that must be
40 # built after descending into subdirectories should be have
41 # foo-recurse as dependencies in addition to being listed under
42 # foo-postrecurse, to avoid ordering issues.
43 #
44 # The foo-prerecurse, foo-recurse, and foo-postrecurse rules are all
45 # single-colon rules, to avoid nasty ordering problems with
46 # double-colon rules.
47 #
48 # e.g.
49 # all:: includes foo
50 # foo:
51 #       echo foo
52 # includes::
53 #       echo bar
54 # includes::
55 #       echo baz
56 #
57 # will result in "bar", "foo", "baz" on AIX, and possibly others.
58 all-unix:: all-postrecurse
59 all-postrecurse: all-recurse
60 all-recurse: all-prerecurse
61
62 all-prerecurse:
63 all-postrecurse:
64
65 clean-unix:: clean-postrecurse
66 clean-postrecurse: clean-recurse
67 clean-recurse: clean-prerecurse
68
69 clean-prerecurse:
70 clean-postrecurse:
71
72 distclean-unix: distclean-postrecurse
73 distclean-postrecurse: distclean-recurse
74 distclean-recurse: distclean-prerecurse
75
76 distclean-prerecurse:
77 distclean-postrecurse:
78
79 install-unix:: install-postrecurse
80 install-postrecurse: install-recurse
81 install-recurse: install-prerecurse
82
83 install-prerecurse:
84 install-postrecurse:
85
86 install-headers-unix:: install-headers-postrecurse
87 install-headers-postrecurse: install-headers-recurse
88 install-headers-recurse: install-headers-prerecurse
89
90 install-headers-prerecurse:
91 install-headers-postrecurse:
92
93 check-unix:: check-postrecurse
94 check-postrecurse: check-recurse
95 check-recurse: check-prerecurse
96
97 check-prerecurse:
98 check-postrecurse:
99
100 Makefiles: Makefiles-postrecurse
101 Makefiles-postrecurse: Makefiles-recurse
102 Makefiles-recurse: Makefiles-prerecurse
103
104 Makefiles-prerecurse:
105 Makefiles-postrecurse:
106
107 #
108 # end recursion rule support
109 ##############################
110
111 # Directory syntax:
112 #
113 # begin relative path
114 REL=
115 # this is magic... should only be used for preceding a program invocation
116 C=./
117 # "/" for UNIX, "\" for Windows; *sigh*
118 S=/
119
120 SUBDIRS = @subdirs@ $(LOCAL_SUBDIRS)
121 srcdir = @srcdir@
122 SRCTOP = @srcdir@/$(BUILDTOP)
123 VPATH = @srcdir@
124 CONFIG_RELTOPDIR = @CONFIG_RELTOPDIR@
125
126 FAKEDEST=$(BUILDTOP)/util/fakedest
127 FAKEPREFIX=$(FAKEDEST)/$(prefix)
128 FAKELIBDIR=$(FAKEPREFIX)/lib
129
130 # DEFS          set by configure
131 # DEFINES       set by local Makefile.in
132 # LOCALINCLUDES set by local Makefile.in
133 # CPPFLAGS      user override
134 # CFLAGS        user override but starts off set by configure
135 ALL_CFLAGS = $(DEFS) $(DEFINES) $(KRB_INCLUDES) $(LOCALINCLUDES) \
136         $(CPPFLAGS) $(CFLAGS)
137
138 CFLAGS = @CFLAGS@
139 CPPFLAGS = @CPPFLAGS@
140 DEFS = @DEFS@
141 CC = @CC@
142 LD = $(PURE) @LD@
143 DEPLIBS = @DEPLIBS@
144 KRB_INCLUDES = -I$(BUILDTOP)/include -I$(SRCTOP)/include \
145         -I$(BUILDTOP)/include/krb5 -I$(SRCTOP)/include/krb5
146 LDFLAGS = @LDFLAGS@
147 LD_UNRESOLVED_PREFIX = @LD_UNRESOLVED_PREFIX@
148 LD_SHLIBDIR_PREFIX = @LD_SHLIBDIR_PREFIX@
149 LDARGS = @LDARGS@
150 LIBS = @LIBS@
151 SRVLIBS = @SRVLIBS@
152 SRVDEPLIBS = @SRVDEPLIBS@
153 CLNTLIBS = @CLNTLIBS@
154 CLNTDEPLIBS = @CLNTDEPLIBS@
155
156 INSTALL=@INSTALL@
157 INSTALL_STRIP=
158 INSTALL_PROGRAM=@INSTALL_PROGRAM@ $(INSTALL_STRIP)
159 INSTALL_DATA=@INSTALL_DATA@
160 INSTALL_SHLIB=@INSTALL_SHLIB@
161 INSTALL_SETUID=$(INSTALL) $(INSTALL_STRIP) -m 4755 -o root
162 ## This is needed because autoconf will sometimes define @exec_prefix@ to be
163 ## ${prefix}.
164 prefix=@prefix@
165 INSTALL_PREFIX=$(prefix)
166 INSTALL_EXEC_PREFIX=@exec_prefix@
167 exec_prefix=@exec_prefix@
168 SHLIB_TAIL_COMP=@SHLIB_TAIL_COMP@
169
170 KRB5MANROOT = @mandir@
171 ADMIN_BINDIR = @sbindir@
172 SERVER_BINDIR = @sbindir@
173 CLIENT_BINDIR =@bindir@
174 ADMIN_MANDIR = $(KRB5MANROOT)/man8
175 SERVER_MANDIR = $(KRB5MANROOT)/man8
176 CLIENT_MANDIR = $(KRB5MANROOT)/man1
177 FILE_MANDIR = $(KRB5MANROOT)/man5
178 KRB5_LIBDIR = @libdir@
179 KRB5_SHLIBDIR = @libdir@$(SHLIB_TAIL_COMP)
180 KRB5_INCDIR = @includedir@
181 KRB5_INCSUBDIRS = \
182         $(KRB5_INCDIR)/gssapi \
183         $(KRB5_INCDIR)/kerberosIV
184
185 #
186 # Macros used by the KADM5 (OV-based) unit test system.
187 # XXX check which of these are actually used!
188 #
189 TESTDIR         = $(BUILDTOP)/kadmin/testing
190 STESTDIR        = $(SRCTOP)/kadmin/testing
191 COMPARE_DUMP    = $(TESTDIR)/scripts/compare_dump.pl
192 FIX_CONF_FILES  = $(TESTDIR)/scripts/fixup-conf-files.pl
193 INITDB          = $(STESTDIR)/scripts/init_db
194 MAKE_KEYTAB     = $(TESTDIR)/scripts/make-host-keytab.pl
195 LOCAL_MAKE_KEYTAB= $(TESTDIR)/scripts/make-host-keytab.pl
196 RESTORE_FILES   = $(STESTDIR)/scripts/restore_files.sh
197 SAVE_FILES      = $(STESTDIR)/scripts/save_files.sh
198 ENV_SETUP       = $(TESTDIR)/scripts/env-setup.sh
199 CLNTTCL         = $(TESTDIR)/util/ovsec_kadm_clnt_tcl
200 SRVTCL          = $(TESTDIR)/util/ovsec_kadm_srv_tcl
201 # Dejagnu variables.
202 # We have to set the host with --host so that setup_xfail will work.
203 # If we don't set it, then the host type used is "native", which
204 # doesn't match "*-*-*".
205 host=@krb5_cv_host@
206 DEJAFLAGS       = $(DEJALFLAGS) $(CLFLAGS) --debug --srcdir $(srcdir) --host \
207                    $(host)
208 RUNTEST         = runtest $(DEJAFLAGS)
209
210 START_SERVERS   = $(STESTDIR)/scripts/start_servers $(TEST_SERVER) $(TEST_PATH)
211 START_SERVERS_LOCAL = $(STESTDIR)/scripts/start_servers_local
212
213 STOP_SERVERS    = $(STESTDIR)/scripts/stop_servers $(TEST_SERVER) $(TEST_PATH)
214 STOP_SERVERS_LOCAL = $(STESTDIR)/scripts/stop_servers_local
215 #
216 # End of macros for the KADM5 unit test system.
217 #
218
219 transform = @program_transform_name@
220
221 RM = rm -f
222 CP  = cp
223 MV = mv -f
224 CHMOD=chmod
225 RANLIB = @RANLIB@
226 ARCHIVE = @ARCHIVE@
227 ARADD = @ARADD@
228 LN = @LN_S@
229 AWK = @AWK@
230 LEX = @LEX@
231 LEXLIB = @LEXLIB@
232 YACC = @YACC@
233 AUTOCONF = @AUTOCONF@
234 AUTOCONFFLAGS = @AUTOCONFFLAGS@
235 AUTOCONFINCFLAGS = @AUTOCONFINCFLAGS@
236 AUTOHEADER = @AUTOHEADER@
237 AUTOHEADERFLAGS = @AUTOHEADERFLAGS@
238
239 HOST_TYPE = @HOST_TYPE@
240 SHEXT = @SHEXT@
241 STEXT=@STEXT@
242 VEXT=@VEXT@
243 DO_MAKE_SHLIB = @DO_MAKE_SHLIB@
244 SHLIB_STATIC_TARGET=@SHLIB_STATIC_TARGET@
245
246 TOPLIBD = $(BUILDTOP)/lib
247
248 OBJEXT = o
249 LIBEXT = a
250 EXEEXT =
251
252 #
253 # variables for libraries, for use in linking programs
254 # -- this may want to get broken out into a separate frag later
255 #
256 #
257 # Note: the following variables must be set in any Makefile.in that
258 # uses KRB5_BUILD_PROGRAM
259 #
260 # PROG_LIBPATH  list of dirs, in -Ldir form, to search for libraries at link
261 # PROG_RPATH    list of dirs, in dir1:dir2 form, for rpath purposes
262 #
263 # invocation is like:
264 # prog: foo.o bar.o $(KRB5_BASE_DEPLIBS)
265 #       $(CC_LINK) -o $@ foo.o bar.o $(KRB5_BASE_LIBS)
266
267
268 CC_LINK=@CC_LINK@
269
270 # prefix (with no spaces after) for rpath flag to cc
271 RPATH_FLAG=@RPATH_FLAG@
272
273 # this gets set by configure to either $(STLIBEXT) or $(SHLIBEXT),
274 # depending on whether we're building with shared libraries.
275 DEPLIBEXT=@DEPLIBEXT@
276
277 KADMCLNT_DEPLIB = $(TOPLIBD)/libkadm5clnt$(DEPLIBEXT)
278 KADMSRV_DEPLIB  = $(TOPLIBD)/libkadm5srv$(DEPLIBEXT)
279 KDB5_DEPLIB     = $(TOPLIBD)/libkdb5$(DEPLIBEXT)
280 DB_DEPLIB       = $(DB_DEPLIB-@DB_VERSION@)
281 DB_DEPLIB-k5    = $(TOPLIBD)/libdb$(DEPLIBEXT)
282 DB_DEPLIB-sys   =
283 GSSRPC_DEPLIB   = $(TOPLIBD)/libgssrpc$(DEPLIBEXT)
284 GSS_DEPLIB      = $(TOPLIBD)/libgssapi_krb5$(DEPLIBEXT)
285 KRB4_DEPLIB     = @KRB4_DEPLIB@         # $(TOPLIBD)/libkrb4$(DEPLIBEXT)
286 DES425_DEPLIB   = @DES425_DEPLIB@       # $(TOPLIBD)/libdes425$(DEPLIBEXT)
287 KRB5_DEPLIB     = $(TOPLIBD)/libkrb5$(DEPLIBEXT)
288 CRYPTO_DEPLIB   = $(TOPLIBD)/libk5crypto$(DEPLIBEXT)
289 COM_ERR_DEPLIB  = $(COM_ERR_DEPLIB-@COM_ERR_VERSION@)
290 COM_ERR_DEPLIB-sys = # empty
291 COM_ERR_DEPLIB-k5 = $(TOPLIBD)/libcom_err$(DEPLIBEXT)
292
293 # These are forced to use ".a" as an extension because they're never
294 # built shared.
295 SS_DEPLIB       = $(SS_DEPLIB-@SS_VERSION@)
296 SS_DEPLIB-k5    = $(TOPLIBD)/libss.a
297 SS_DEPLIB-sys   =
298 PTY_DEPLIB      = $(TOPLIBD)/libpty.a
299
300 KRB5_BASE_DEPLIBS       = $(KRB5_DEPLIB) $(CRYPTO_DEPLIB) $(COM_ERR_DEPLIB)
301 KRB4COMPAT_DEPLIBS      = $(KRB4_DEPLIB) $(DES425_DEPLIB) $(KRB5_BASE_DEPLIBS)
302 KDB5_DEPLIBS            = $(KDB5_DEPLIB)
303 GSS_DEPLIBS             = $(GSS_DEPLIB)
304 GSSRPC_DEPLIBS          = $(GSSRPC_DEPLIB) $(GSS_DEPLIBS)
305 KADM_COMM_DEPLIBS       = $(GSSRPC_DEPLIBS) $(KDB5_DEPLIBS) $(GSSRPC_DEPLIBS)
306 KADMSRV_DEPLIBS         = $(KADMSRV_DEPLIB) $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS)
307 KADMCLNT_DEPLIBS        = $(KADMCLNT_DEPLIB) $(KADM_COMM_DEPLIBS)
308
309 # Header file dependencies we might override.
310 # See util/depfix.sed.
311 # Also see depend-verify-* in post.in, which wants to confirm that we're using
312 # the in-tree versions.
313 COM_ERR_VERSION = @COM_ERR_VERSION@
314 COM_ERR_DEPS    = $(COM_ERR_DEPS-@COM_ERR_VERSION@)
315 COM_ERR_DEPS-sys =
316 COM_ERR_DEPS-k5 = $(BUILDTOP)/include/com_err.h
317 SS_VERSION      = @SS_VERSION@
318 SS_DEPS         = $(SS_DEPS-@SS_VERSION@)
319 SS_DEPS-sys     =
320 SS_DEPS-k5      = $(BUILDTOP)/include/ss/ss.h $(BUILDTOP)/include/ss/ss_err.h
321 DB_VERSION      = @DB_VERSION@
322 DB_DEPS         = $(DB_DEPS-@DB_HEADER_VERSION@)
323 DB_DEPS-sys     =
324 DB_DEPS-k5      = $(BUILDTOP)/include/db.h $(BUILDTOP)/include/db-config.h
325 DB_DEPS-redirect = $(BUILDTOP)/include/db.h
326
327 # Header file dependencies that might depend on whether krb4 support
328 # is compiled.
329
330 KRB_ERR_H_DEP   = @KRB_ERR_H_DEP@
331
332 # LIBS gets substituted in... e.g. -lnsl -lsocket
333
334 # GEN_LIB is -lgen if needed for regexp
335 GEN_LIB         = @GEN_LIB@
336
337 SS_LIB          = $(SS_LIB-@SS_VERSION@)
338 SS_LIB-sys      = @SS_LIB@
339 SS_LIB-k5       = $(TOPLIBD)/libss.a
340 KDB5_LIB        = -lkdb5
341 DB_LIB          = @DB_LIB@
342 KDB5_DB_LIB     = @KDB5_DB_LIB@
343
344 KRB5_LIB                        = -lkrb5
345 K5CRYPTO_LIB                    = -lk5crypto
346 COM_ERR_LIB                     = -lcom_err
347 GSS_KRB5_LIB                    = -lgssapi_krb5
348
349 # KRB4_LIB is -lkrb4 if building --with-krb4
350 # needs fixing if ever used on Mac OS X!
351 KRB4_LIB        = @KRB4_LIB@
352
353 # DES425_LIB is -ldes425 if building --with-krb4
354 # needs fixing if ever used on Mac OS X!
355 DES425_LIB      = @DES425_LIB@
356
357 # HESIOD_LIBS is -lhesiod...
358 HESIOD_LIBS     = @HESIOD_LIBS@
359
360 KRB5_BASE_LIBS  = $(KRB5_LIB) $(K5CRYPTO_LIB) $(COM_ERR_LIB) $(GEN_LIB) $(LIBS)
361 KRB4COMPAT_LIBS = $(KRB4_LIB) $(DES425_LIB) $(KRB5_BASE_LIBS)
362 KDB5_LIBS       = $(KDB5_LIB) $(KDB5_DB_LIB)
363 GSS_LIBS        = $(GSS_KRB5_LIB)
364 # needs fixing if ever used on Mac OS X!
365 GSSRPC_LIBS     = -lgssrpc $(GSS_LIBS)
366 KADM_COMM_LIBS  = $(GSSRPC_LIBS)
367 # need fixing if ever used on Mac OS X!
368 KADMSRV_LIBS    = -lkadm5srv $(HESIOD_LIBS) $(KDB5_LIBS) $(KADM_COMM_LIBS)
369 KADMCLNT_LIBS   = -lkadm5clnt $(KADM_COMM_LIBS)
370
371 # need fixing if ever used on Mac OS X!
372 PTY_LIB         = -lpty
373
374 #
375 # some more stuff for --with-krb4
376 KRB4_LIBPATH    = @KRB4_LIBPATH@
377 KRB4_INCLUDES   = @KRB4_INCLUDES@
378
379 #
380 # variables for --with-tcl=
381 TCL_LIBS        = @TCL_LIBS@
382 TCL_LIBPATH     = @TCL_LIBPATH@
383 TCL_RPATH       = @TCL_RPATH@
384 TCL_MAYBE_RPATH = @TCL_MAYBE_RPATH@
385 TCL_INCLUDES    = @TCL_INCLUDES@
386
387 # error table rules
388 #
389 ### /* these are invoked as $(...) foo.et, which works, but could be better */
390 COMPILE_ET= $(COMPILE_ET-@COM_ERR_VERSION@)
391 COMPILE_ET-sys= compile_et
392 COMPILE_ET-k5= $(BUILDTOP)/util/et/compile_et -d $(SRCTOP)/util/et
393
394 .SUFFIXES:  .h .c .et .ct
395
396 # These versions cause both .c and .h files to be generated at once.
397 # But GNU make doesn't understand this, and parallel builds can trigger
398 # both of them at once, causing them to stomp on each other.  The versions
399 # below only update one of the files, so compile_et has to get run twice,
400 # but it won't break parallel builds.
401 #.et.h: ; $(COMPILE_ET) $<
402 #.et.c: ; $(COMPILE_ET) $<
403
404 .et.h:
405         d=ettmp$$$$ ; (cp $< $$d.et && $(COMPILE_ET) $$d.et && mv $$d.h $*.h) ; \
406                 e=$$? ; rm -f $$d.* ; exit $$e
407
408 .et.c:
409         d=ettmp$$$$ ; (cp $< $$d.et && $(COMPILE_ET) $$d.et && mv $$d.c $*.c) ; \
410                 e=$$? ; rm -f $$d.* ; exit $$e
411
412 # rule to make object files
413 #
414 .SUFFIXES: .c .o
415 .c.o:
416         $(CC) $(ALL_CFLAGS) -c $<
417
418 # ss command table rules
419 #
420 MAKE_COMMANDS= $(MAKE_COMMANDS-@SS_VERSION@)
421 MAKE_COMMANDS-sys= mk_cmds
422 MAKE_COMMANDS-k5= $(BUILDTOP)/util/ss/mk_cmds
423
424 .ct.c:
425         $(MAKE_COMMANDS) $<
426
427 ## Parameters to be set by configure for use in lib.in:
428 ##
429
430 LN_S=@LN_S@
431 AR=@AR@
432
433 # Set to "lib$(LIB)$(STEXT) lib$(LIB)$(SHEXT) lib$(LIB)$(PFEXT)" or
434 # some subset thereof by configure; determines which types of libs get
435 # built.
436 LIBLIST=@LIBLIST@
437
438 # Set by configure; list of library symlinks to make to $(TOPLIBD)
439 LIBLINKS=@LIBLINKS@
440
441 # Set by configure; list of install targets
442 LIBINSTLIST=@LIBINSTLIST@
443
444 # Some of these should really move to pre.in, since programs will need
445 # it too. (e.g. stuff that has dependencies on the libraries)
446
447 # usually .a
448 STLIBEXT=@STLIBEXT@
449
450 # usually .so.$(LIBMAJOR).$(LIBMINOR)
451 SHLIBVEXT=@SHLIBVEXT@
452
453 # usually .so.$(LIBMAJOR) (to allow for major-version compat)
454 SHLIBSEXT=@SHLIBSEXT@
455
456 # usually .so
457 SHLIBEXT=@SHLIBEXT@
458
459 # usually _p.a
460 PFLIBEXT=@PFLIBEXT@
461
462 # "cc -G", "ld -Bshareable", etc.
463 LDCOMBINE=@LDCOMBINE@
464
465 # Misc args to tack on the tail of LDCOMBINE
466 LDCOMBINE_TAIL=@LDCOMBINE_TAIL@
467
468 # flags for explicit libraries depending on this one,
469 # e.g. "-R$(SHLIB_RPATH) $(SHLIB_SHLIB_DIRFLAGS) $(SHLIB_EXPLIBS)"
470 SHLIB_EXPFLAGS=@SHLIB_EXPFLAGS@
471
472 ## Parameters to be set by configure for use in libobj.in:
473
474 # Set to "OBJS.ST OBJS.SH OBJS.PF" or some subset thereof by
475 # configure; determines which types of object files get built.
476 OBJLISTS=@OBJLISTS@
477
478 # Note that $(LIBSRCS) *cannot* contain any variable references, or
479 # the suffix substitution will break on some platforms!
480 SHLIBOBJS=$(STLIBOBJS:.o=@SHOBJEXT@)
481 PFLIBOBJS=$(STLIBOBJS:.o=@PFOBJEXT@)
482
483 # "$(CC) -G", "$(LD) -Bshareable", etc.
484 LDCOMBINE=@LDCOMBINE@
485
486 # "-h $@", "-h lib$(LIBNAME).$(LIBMAJOR)", etc.
487 SONAME=@SONAME@
488
489 #
490 # rules to make various types of object files
491 #
492 PICFLAGS=@PICFLAGS@
493 PROFFLAGS=@PROFFLAGS@
494
495
496
497 ##
498 ## end of pre.in
499 ############################################################