configure.in revision 90926
1dnl Process this file with autoconf to produce a configure script.
2AC_REVISION($Revision: 1.304 $)
3AC_PREREQ(2.52)
4AC_INIT(heimdal, 0.4e, heimdal-bugs@pdc.kth.se)
5AM_CONFIG_HEADER(include/config.h)
6
7dnl Checks for programs.
8AC_PROG_CC
9AC_PROG_CPP
10AC_PROG_CC_STDC
11
12AM_INIT_AUTOMAKE(heimdal,0.4e)
13
14AC_PREFIX_DEFAULT(/usr/heimdal)
15
16AC_CANONICAL_HOST
17CANONICAL_HOST=$host
18AC_SUBST(CANONICAL_HOST)
19
20sunos=no
21case "$host" in 
22*-*-sunos4*)
23	sunos=40
24	;;
25*-*-solaris2.7)
26	sunos=57
27	;;
28*-*-solaris2.8)
29	sunos=58
30	;;
31*-*-solaris2*)
32	sunos=50
33	;;
34esac
35if test "$sunos" != no; then
36	AC_DEFINE_UNQUOTED(SunOS, $sunos, 
37		[Define to what version of SunOS you are running.])
38fi
39
40aix=no
41case "$host" in 
42*-*-aix3*)
43	aix=3
44	;;
45*-*-aix4*)
46	aix=4
47	;;
48esac
49
50#test -z "$CFLAGS" && CFLAGS="-g"
51
52AC_OBJEXT
53AC_EXEEXT
54
55dnl AC_KRB_PROG_YACC
56AC_PROG_YACC
57AM_PROG_LEX
58AC_PROG_RANLIB
59AC_PROG_AWK
60AC_KRB_PROG_LN_S
61
62AC_MIPS_ABI
63CC="$CC $abi"
64libdir="$libdir$abilibdirext"
65
66AC_C___ATTRIBUTE__
67
68AC_ENABLE_SHARED(no)
69AC_PROG_LIBTOOL
70
71AC_WFLAGS(-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs)
72
73rk_DB
74
75dnl AC_ROKEN(10,[/usr/heimdal /usr/athena],[lib/roken],[$(top_builddir)/lib/roken/libroken.la],[-I$(top_builddir)/lib/roken -I$(top_srcdir)/lib/roken])
76
77rk_ROKEN(lib/roken)
78LIB_roken="\$(top_builddir)/lib/vers/libvers.la $LIB_roken"
79
80AC_TEST_PACKAGE_NEW(openldap,
81[#include <lber.h>
82#include <ldap.h>],
83[-lldap -llber],,,OPENLDAP)
84
85if test "$openldap_libdir"; then
86	LIB_openldap="-R $openldap_libdir $LIB_openldap"
87fi
88
89AC_TEST_PACKAGE_NEW(krb4,[#include <krb.h>],-lkrb,-ldes,/usr/athena, KRB4)
90
91LIB_kdb=
92if test "$with_krb4" != "no"; then
93	save_CFLAGS="$CFLAGS"
94	CFLAGS="$CFLAGS $INCLUDE_krb4"
95	save_LIBS="$LIBS"
96	LIBS="$LIB_krb4 -ldes $LIBS"
97	EXTRA_LIB45=lib45.a
98	AC_SUBST(EXTRA_LIB45)
99	AC_CACHE_CHECK(for four valued krb_put_int, ac_cv_func_krb_put_int_four,
100		[AC_TRY_COMPILE([#include <krb.h>],[
101		char tmp[4];
102		krb_put_int(17, tmp, 4, sizeof(tmp));],
103		ac_cv_func_krb_put_int_four=yes,
104		ac_cv_func_krb_put_int_four=no)
105	])
106	if test "$ac_cv_func_krb_put_int_four" = yes; then
107		AC_DEFINE(HAVE_FOUR_VALUED_KRB_PUT_INT, 1,
108			[define if krb_put_int takes four arguments.])
109	fi
110	AH_BOTTOM([#if defined(HAVE_FOUR_VALUED_KRB_PUT_INT) || !defined(KRB4)
111#define KRB_PUT_INT(F, T, L, S) krb_put_int((F), (T), (L), (S))
112#else
113#define KRB_PUT_INT(F, T, L, S) krb_put_int((F), (T), (S))
114#endif
115])
116	AC_CACHE_CHECK(for KRB_VERIFY_SECURE, ac_cv_func_krb_verify_secure,
117		[AC_TRY_COMPILE([#include <krb.h>],[
118		int x = KRB_VERIFY_SECURE],
119		ac_cv_func_krb_verify_secure=yes,
120		ac_cv_func_krb_verify_secure=no)
121	])
122	if test "$ac_cv_func_krb_verify_secure" != yes; then
123		AC_DEFINE(KRB_VERIFY_SECURE, 1,
124			[Define to one if your krb.h doesn't])
125		AC_DEFINE(KRB_VERIFY_SECURE_FAIL, 2,
126			[Define to two if your krb.h doesn't])
127	fi
128	AC_CACHE_CHECK(for KRB_VERIFY_NOT_SECURE,
129		ac_cv_func_krb_verify_not_secure,
130		[AC_TRY_COMPILE([#include <krb.h>],[
131		int x = KRB_VERIFY_NOT_SECURE],
132		ac_cv_func_krb_verify_not_secure=yes,
133		ac_cv_func_krb_verify_not_secure=no)
134	])
135	if test "$ac_cv_func_krb_verify_not_secure" != yes; then
136		AC_DEFINE(KRB_VERIFY_NOT_SECURE, 0,
137			[Define to zero if your krb.h doesn't])
138	fi
139	AC_FIND_FUNC(krb_enable_debug)
140	AC_FIND_FUNC(krb_disable_debug)
141	AC_FIND_FUNC(krb_get_our_ip_for_realm)
142	AC_CACHE_CHECK(for krb_mk_req with const arguments,
143		ac_cv_func_krb_mk_req_const,
144		[AC_TRY_COMPILE([#include <krb.h>
145		int krb_mk_req(KTEXT a, const char *s, const char *i,
146			       const char *r, int32_t checksum)
147		{ return 17; }], [],
148		ac_cv_func_krb_mk_req_const=yes,
149		ac_cv_func_krb_mk_req_const=no)
150	])
151	if test "$ac_cv_func_krb_mk_req_const" = "yes"; then
152		AC_DEFINE(KRB_MK_REQ_CONST, 1,
153			[Define if krb_mk_req takes cons char *])
154	fi
155
156	LIBS="$save_LIBS"
157	CFLAGS="$save_CFLAGS"
158	LIB_kdb="-lkdb -lkrb"
159	if test "$krb4_libdir"; then
160		LIB_krb4="-R $krb4_libdir $LIB_krb4"
161		LIB_kdb="-R $krb4_libdir -L$krb4_libdir $LIB_kdb"
162	fi
163fi
164AM_CONDITIONAL(KRB4, test "$with_krb4" != "no")
165AM_CONDITIONAL(KRB5, true)
166AM_CONDITIONAL(do_roken_rename, true)
167
168AC_DEFINE(KRB5, 1, [Enable Kerberos 5 support in applications.])dnl
169AC_SUBST(LIB_kdb)dnl
170
171AC_ARG_ENABLE(dce, [  --enable-dce	if you want support for DCE/DFS PAG's.])
172if test "$enable_dce" = yes; then
173    AC_DEFINE(DCE, 1, [Define if you want support for DCE/DFS PAG's.])
174fi
175AM_CONDITIONAL(DCE, test "$enable_dce" = yes)
176
177## XXX quite horrible:
178if test -f /etc/ibmcxx.cfg; then
179	dpagaix_LDADD=`sed -n '/^xlc_r4/,/^$/p' /etc/ibmcxx.cfg | sed -n -e '/libraries/{;s/^[[^=]]*=\(.*\)/\1/;s/,/ /gp;}'`
180	dpagaix_CFLAGS=`sed -n '/^xlc_r4/,/^$/p' /etc/ibmcxx.cfg | sed -n -e '/options/{;s/^[[^=]]*=\(.*\)/\1/;s/-q[^,]*//;s/,/ /gp;}'`
181else
182	dpagaix_CFLAGS="-D_THREAD_SAFE -D_AIX_PTHREADS_D7 -D_AIX32_THREADS=1 -D_AES_SOURCE -D_AIX41 -I/usr/include/dce"
183	dpagaix_LDADD="-L/usr/lib/threads -ldcelibc_r -ldcepthreads -lpthreads_compat lpthreads -lc_r"
184	dpagaix_LDFLAGS="-Wl,-bI:dfspag.exp"
185fi
186AC_SUBST(dpagaix_CFLAGS)
187AC_SUBST(dpagaix_LDADD)
188
189otp=yes
190AC_ARG_ENABLE(otp,
191[  --disable-otp          if you don't want OTP support],
192[
193if test "$enableval" = "no"; then
194	otp=no
195fi
196])
197if test "$otp" = "yes"; then
198	AC_DEFINE(OTP, 1, [Define if you want OTP support in applications.])
199	LIB_otp='$(top_builddir)/lib/otp/libotp.la'
200fi
201AC_SUBST(LIB_otp)
202AM_CONDITIONAL(OTP, test "$otp" = yes)dnl
203
204AC_CHECK_OSFC2
205
206rk_CHECK_MAN
207
208AC_TEST_PACKAGE_NEW(readline,
209[#include <stdio.h>
210 #include <readline.h>],-lreadline,,, READLINE)
211
212AC_TEST_PACKAGE_NEW(hesiod,[#include <hesiod.h>],-lhesiod,,, HESIOD)
213
214KRB_C_BIGENDIAN
215AC_C_INLINE
216
217KRB_AIX
218KRB_IRIX
219
220KRB_CHECK_X
221
222AM_CONDITIONAL(HAVE_X, test "$no_x" != yes)
223
224AC_CHECK_XAU
225
226dnl AM_C_PROTOTYPES
227
228dnl Checks for typedefs, structures, and compiler characteristics.
229AC_C_CONST
230AC_TYPE_OFF_T
231AC_TYPE_SIZE_T
232AC_CHECK_TYPE_EXTRA(ssize_t, int, [#include <unistd.h>])
233AC_TYPE_PID_T
234AC_TYPE_UID_T
235AC_CHECK_TYPE_EXTRA(mode_t, unsigned short, [])
236AC_CHECK_TYPE_EXTRA(sig_atomic_t, int, [#include <signal.h>])
237AC_HAVE_TYPE([long long])
238AC_HEADER_TIME
239AC_STRUCT_TM
240
241dnl Checks for header files.
242AC_HEADER_STDC
243
244AC_CHECK_HEADERS([\
245	arpa/ftp.h				\
246	arpa/inet.h				\
247	arpa/nameser.h				\
248	arpa/telnet.h				\
249	bind/bitypes.h				\
250	bsdsetjmp.h				\
251	crypt.h					\
252	curses.h				\
253	dirent.h				\
254	dlfcn.h					\
255	err.h					\
256	errno.h					\
257	fcntl.h					\
258	fnmatch.h				\
259	grp.h					\
260	inttypes.h				\
261	io.h					\
262	libutil.h				\
263	limits.h				\
264	maillock.h				\
265	net/if.h				\
266	netdb.h					\
267	netinet/in.h				\
268	netinet/in6.h				\
269	netinet/in6_machtypes.h			\
270	netinet/in6_var.h			\
271	netinet/in_systm.h			\
272	netinet6/in6.h				\
273	netinfo/ni.h				\
274	paths.h					\
275	pthread.h				\
276	pty.h					\
277	pwd.h					\
278	resolv.h				\
279	sac.h					\
280	security/pam_modules.h			\
281	sgtty.h					\
282	shadow.h				\
283	siad.h					\
284	signal.h				\
285	stropts.h				\
286	sys/bitypes.h				\
287	sys/category.h				\
288	sys/file.h				\
289	sys/filio.h				\
290	sys/ioccom.h				\
291	sys/ioctl.h				\
292	sys/param.h				\
293	sys/proc.h				\
294	sys/pty.h				\
295	sys/ptyio.h				\
296	sys/ptyvar.h				\
297	sys/resource.h				\
298	sys/select.h				\
299	sys/socket.h				\
300	sys/sockio.h				\
301	sys/stat.h				\
302	sys/str_tty.h				\
303	sys/stream.h				\
304	sys/stropts.h				\
305	sys/strtty.h				\
306	sys/syscall.h				\
307	sys/sysctl.h				\
308	sys/termio.h				\
309	sys/time.h				\
310	sys/timeb.h				\
311	sys/times.h				\
312	sys/tty.h				\
313	sys/types.h				\
314	sys/uio.h				\
315	sys/un.h				\
316	sys/utsname.h				\
317	sys/wait.h				\
318	syslog.h				\
319	term.h					\
320	termcap.h				\
321	termio.h				\
322	termios.h				\
323	time.h					\
324	tmpdir.h				\
325	udb.h					\
326	unistd.h				\
327	userconf.h				\
328	usersec.h				\
329	util.h					\
330	utmp.h					\
331	utmpx.h					\
332])
333
334CHECK_NETINET_IP_AND_TCP
335
336
337AC_ARG_ENABLE(netinfo,
338[  --enable-netinfo      enable netinfo for configuration lookup])
339
340if test "$ac_cv_header_netinfo_ni_h" = yes -a "$enable_netinfo" = yes; then
341       AC_DEFINE(HAVE_NETINFO, 1,
342               [Define if you want to use Netinfo instead of krb5.conf.])
343fi
344
345AM_CONDITIONAL(have_err_h, test "$ac_cv_header_err_h" = yes)
346AM_CONDITIONAL(have_fnmatch_h, test "$ac_cv_header_fnmatch_h" = yes)
347
348dnl Checks for libraries.
349
350AC_FIND_FUNC(socket, socket)
351AC_FIND_FUNC(gethostbyname, nsl)
352AC_FIND_FUNC(syslog, syslog)
353
354AC_KRB_IPV6
355
356AC_FIND_FUNC_NO_LIBS(logwtmp, util)
357AC_FIND_FUNC_NO_LIBS(logout, util)
358AC_FIND_FUNC_NO_LIBS(openpty, util)
359AC_FIND_FUNC_NO_LIBS(tgetent, termcap ncurses curses)
360AC_FIND_FUNC(gethostbyname2, inet6 ip6)
361
362AC_FIND_FUNC(res_search, resolv,
363[
364#include <stdio.h>
365#ifdef HAVE_SYS_TYPES_H
366#include <sys/types.h>
367#endif
368#ifdef HAVE_NETINET_IN_H
369#include <netinet/in.h>
370#endif
371#ifdef HAVE_ARPA_NAMESER_H
372#include <arpa/nameser.h>
373#endif
374#ifdef HAVE_RESOLV_H
375#include <resolv.h>
376#endif
377],
378[0,0,0,0,0])
379
380AC_FIND_FUNC(dn_expand, resolv,
381[
382#include <stdio.h>
383#ifdef HAVE_SYS_TYPES_H
384#include <sys/types.h>
385#endif
386#ifdef HAVE_NETINET_IN_H
387#include <netinet/in.h>
388#endif
389#ifdef HAVE_ARPA_NAMESER_H
390#include <arpa/nameser.h>
391#endif
392#ifdef HAVE_RESOLV_H
393#include <resolv.h>
394#endif
395],
396[0,0,0,0,0])
397
398dnl Checks for library functions.
399
400AC_BROKEN_SNPRINTF
401AC_BROKEN_VSNPRINTF
402
403AC_CHECK_FUNCS([				\
404	_getpty					\
405	_scrsize				\
406	fcntl					\
407	gettimeofday				\
408	getuid					\
409	grantpt					\
410	mktime					\
411	ptsname					\
412	rand					\
413	random					\
414	revoke					\
415	select					\
416	setitimer				\
417	setpcred				\
418	setpgid					\
419	setproctitle				\
420	setregid				\
421	setresgid				\
422	setresuid				\
423	setreuid				\
424	setsid					\
425	setutent				\
426	sigaction				\
427	strstr					\
428	timegm					\
429	ttyname					\
430	ttyslot					\
431	umask					\
432	unlockpt				\
433	vhangup					\
434	yp_get_default_domain			\
435])
436
437KRB_CAPABILITIES
438
439AC_CHECK_GETPWNAM_R_POSIX
440
441AC_FIND_FUNC_NO_LIBS(getsockopt,,
442[#ifdef HAVE_SYS_TYPES_H
443#include <sys/types.h>
444#endif
445#ifdef HAVE_SYS_SOCKET_H
446#include <sys/socket.h>
447#endif],
448[0,0,0,0,0])
449AC_FIND_FUNC_NO_LIBS(setsockopt,,
450[#ifdef HAVE_SYS_TYPES_H
451#include <sys/types.h>
452#endif
453#ifdef HAVE_SYS_SOCKET_H
454#include <sys/socket.h>
455#endif],
456[0,0,0,0,0])
457
458dnl Cray stuff
459AC_CHECK_FUNCS(getudbnam setlim)
460
461dnl AC_KRB_FUNC_GETCWD_BROKEN
462
463dnl
464dnl Check for fields in struct utmp
465dnl
466
467AC_HAVE_STRUCT_FIELD(struct utmp, ut_addr, [#include <utmp.h>])
468AC_HAVE_STRUCT_FIELD(struct utmp, ut_host, [#include <utmp.h>])
469AC_HAVE_STRUCT_FIELD(struct utmp, ut_id, [#include <utmp.h>])
470AC_HAVE_STRUCT_FIELD(struct utmp, ut_pid, [#include <utmp.h>])
471AC_HAVE_STRUCT_FIELD(struct utmp, ut_type, [#include <utmp.h>])
472AC_HAVE_STRUCT_FIELD(struct utmp, ut_user, [#include <utmp.h>])
473AC_HAVE_STRUCT_FIELD(struct utmpx, ut_exit, [#include <utmpx.h>])
474AC_HAVE_STRUCT_FIELD(struct utmpx, ut_syslen, [#include <utmpx.h>])
475
476dnl
477dnl Check for fields in struct tm
478dnl
479
480AC_HAVE_STRUCT_FIELD(struct tm, tm_gmtoff, [#include <time.h>])
481AC_HAVE_STRUCT_FIELD(struct tm, tm_zone, [#include <time.h>])
482
483dnl
484dnl or do we have a variable `timezone' ?
485dnl
486
487rk_CHECK_VAR(timezone, [#include <time.h>])
488
489AC_HAVE_TYPE([sa_family_t],[#include <sys/socket.h>])
490
491AC_HAVE_TYPE([socklen_t],[#include <sys/socket.h>])
492
493AC_HAVE_TYPE([struct sockaddr], [#include <sys/socket.h>])
494
495AC_HAVE_TYPE([struct sockaddr_storage], [#include <sys/socket.h>])
496
497AC_HAVE_TYPE([struct addrinfo], [#include <netdb.h>])
498
499dnl
500dnl Check for struct winsize
501dnl
502
503AC_KRB_STRUCT_WINSIZE
504
505dnl
506dnl Check for struct spwd
507dnl
508
509AC_KRB_STRUCT_SPWD
510
511dnl
512dnl Check for sa_len in struct sockaddr
513dnl
514
515AC_HAVE_STRUCT_FIELD(struct sockaddr, sa_len, [#include <sys/types.h>
516#include <sys/socket.h>])
517
518
519AC_CHECK_TYPES([int8_t, int16_t, int32_t, int64_t, 
520	u_int8_t, u_int16_t, u_int32_t, u_int64_t,
521	uint8_t, uint16_t, uint32_t, uint64_t],,,[
522#ifdef HAVE_INTTYPES_H
523#include <inttypes.h>
524#endif
525#ifdef HAVE_SYS_TYPES_H
526#include <sys/types.h>
527#endif
528#ifdef HAVE_SYS_BITYPES_H
529#include <sys/bitypes.h>
530#endif
531#ifdef HAVE_BIND_BITYPES_H
532#include <bind/bitypes.h>
533#endif
534#ifdef HAVE_NETINET_IN6_MACHTYPES_H
535#include <netinet/in6_machtypes.h>
536#endif
537])
538
539KRB_CRYPTO
540
541KRB_READLINE
542
543dnl telnet muck --------------------------------------------------
544
545AC_DEFINE(AUTHENTICATION, 1, 
546	[Define if you want authentication support in telnet.])dnl
547AC_DEFINE(ENCRYPTION, 1,
548	[Define if you want encryption support in telnet.])dnl
549AC_DEFINE(DES_ENCRYPTION, 1,
550	[Define if you want to use DES encryption in telnet.])dnl
551AC_DEFINE(DIAGNOSTICS, 1,
552	[Define this to enable diagnostics in telnet.])dnl
553AC_DEFINE(OLD_ENVIRON, 1,
554	[Define this to enable old environment option in telnet.])dnl
555if false; then
556AC_DEFINE(ENV_HACK, 1,
557	[Define this if you want support for broken ENV_{VAR,VAL} telnets.])
558fi
559
560# Simple test for streamspty, based on the existance of getmsg(), alas
561# this breaks on SunOS4 which have streams but BSD-like ptys
562#
563# And also something wierd has happend with dec-osf1, fallback to bsd-ptys
564
565AC_CHECK_FUNC(getmsg)
566
567if test "$ac_cv_func_getmsg" = "yes"; then
568
569AC_CACHE_CHECK(for working getmsg, ac_cv_func_getmsg_work,
570AC_TRY_RUN(
571[
572#include <stdio.h>
573#include <errno.h>
574
575int main()
576{
577  int ret;
578  ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL);
579  if(ret < 0 && errno == ENOSYS)
580    return 1;
581  return 0;
582}
583], ac_cv_func_getmsg_work=yes, ac_cv_func_getmsg_work=no,
584ac_cv_func_getmsg_work=no))
585test "$ac_cv_func_getmsg_work" = "yes" &&
586AC_DEFINE(HAVE_GETMSG, 1, [Define if you have a working getmsg.])
587
588fi
589
590if test "$ac_cv_func_getmsg_work" = yes; then
591AC_MSG_CHECKING(for streamspty)
592case "$host" in
593*-*-aix3*|*-*-sunos4*|*-*-osf*|*-*-hpux1[[01]]*)
594	krb_cv_sys_streamspty=no
595	;;
596*)
597	krb_cv_sys_streamspty=yes
598	;;
599esac
600AC_MSG_RESULT($krb_cv_sys_streamspty)
601fi
602if test "$krb_cv_sys_streamspty" = yes; then
603	AC_DEFINE(STREAMSPTY, 1, [Define if you have streams ptys.])
604fi
605
606dnl Some operating systems already have com_err and compile_et
607CHECK_COMPILE_ET
608
609AC_AUTH_MODULES
610
611dnl This is done by AC_OUTPUT but we need the result here.
612
613test "x$prefix" = xNONE && prefix=$ac_default_prefix
614test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
615
616for i in bin lib libexec sbin; do
617	i=${i}dir
618	foo=`echo $i | tr 'xindiscernible' 'XINDISCERNIBLE'`
619	x="\$${i}"
620	eval y="$x"
621	while test "x$y" != "x$x"; do
622		x="$y"
623		eval y="$x"
624	done
625	AC_DEFINE_UNQUOTED($foo,"$x")
626done
627AH_BOTTOM([#undef BINDIR 
628#undef LIBDIR
629#undef LIBEXECDIR
630#undef SBINDIR])
631
632LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/\.lo/g'`
633AC_SUBST(LTLIBOBJS)
634AC_CONFIG_FILES(Makefile 		\
635	include/Makefile		\
636	include/kadm5/Makefile		\
637	lib/Makefile			\
638	lib/45/Makefile			\
639	lib/auth/Makefile		\
640	lib/auth/afskauthlib/Makefile	\
641	lib/auth/pam/Makefile		\
642	lib/auth/sia/Makefile		\
643	lib/asn1/Makefile		\
644	lib/com_err/Makefile		\
645	lib/des/Makefile		\
646	lib/editline/Makefile		\
647	lib/gssapi/Makefile		\
648	lib/hdb/Makefile		\
649	lib/kadm5/Makefile		\
650	lib/kafs/Makefile		\
651	lib/kdfs/Makefile		\
652	lib/krb5/Makefile		\
653	lib/otp/Makefile		\
654	lib/roken/Makefile		\
655	lib/sl/Makefile			\
656	lib/vers/Makefile		\
657	kuser/Makefile			\
658	kpasswd/Makefile		\
659	kadmin/Makefile			\
660	admin/Makefile			\
661	kdc/Makefile			\
662	appl/Makefile			\
663	appl/afsutil/Makefile		\
664	appl/ftp/Makefile		\
665	appl/ftp/common/Makefile	\
666	appl/ftp/ftp/Makefile		\
667	appl/ftp/ftpd/Makefile		\
668	appl/kx/Makefile		\
669	appl/login/Makefile		\
670	appl/otp/Makefile		\
671	appl/popper/Makefile		\
672	appl/push/Makefile		\
673	appl/rsh/Makefile		\
674	appl/rcp/Makefile		\
675	appl/su/Makefile		\
676	appl/xnlock/Makefile		\
677	appl/telnet/Makefile		\
678	appl/telnet/libtelnet/Makefile	\
679	appl/telnet/telnet/Makefile	\
680	appl/telnet/telnetd/Makefile	\
681	appl/test/Makefile		\
682	appl/kf/Makefile		\
683	appl/dceutils/Makefile		\
684	doc/Makefile			\
685	tools/Makefile			\
686)
687
688AC_OUTPUT
689
690dnl
691dnl This is the release version name-number[beta]
692dnl
693HEIMDALVERSION="$PACKAGE-$VERSION"
694
695cat > include/newversion.h.in <<EOF
696const char *heimdal_long_version = "@(#)\$Version: $HEIMDALVERSION by @USER@ on @HOST@ ($host) @DATE@ \$";
697const char *heimdal_version = "$HEIMDALVERSION";
698EOF
699
700if test -f include/version.h && cmp -s include/newversion.h.in include/version.h.in; then
701	echo "include/version.h is unchanged"
702	rm -f include/newversion.h.in
703else
704 	echo "creating include/version.h"
705 	User=${USER-${LOGNAME}}
706 	Host=`(hostname || uname -n || echo unknown) 2>/dev/null | sed 1q`
707 	Date=`date`
708	mv -f include/newversion.h.in include/version.h.in
709	sed -e "s/@USER@/$User/" -e "s/@HOST@/$Host/" -e "s/@DATE@/$Date/" include/version.h.in > include/version.h
710fi
711