This commit was manufactured by cvs2svn to create tag
[heimdal.git] / configure.in
blob46fb3e1868c5de7fab3682b625cbe3713e61ccea
1 dnl Process this file with autoconf to produce a configure script.
2 AC_REVISION($Revision$)
3 AC_PREREQ(2.14.-1.1)dnl 2.14a
4 AC_INIT(heimdal, 0.4b, heimdal-bugs@pdc.kth.se)
5 AM_CONFIG_HEADER(include/config.h)
7 dnl Checks for programs.
8 AC_PROG_CC
9 AC_PROG_CPP
10 AC_PROG_CC_STDC
12 AM_INIT_AUTOMAKE(heimdal,0.4b)
14 AC_PREFIX_DEFAULT(/usr/heimdal)
16 AC_CANONICAL_HOST
17 CANONICAL_HOST=$host
18 AC_SUBST(CANONICAL_HOST)
20 sunos=no
21 case "$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         ;;
34 esac
35 if test "$sunos" != no; then
36         AC_DEFINE_UNQUOTED(SunOS, $sunos, 
37                 [Define to what version of SunOS you are running.])
40 aix=no
41 case "$host" in 
42 *-*-aix3*)
43         aix=3
44         ;;
45 *-*-aix4*)
46         aix=4
47         ;;
48 esac
50 test -z "$CFLAGS" && CFLAGS="-g"
52 AC_OBJEXT
53 AC_EXEEXT
55 dnl AC_KRB_PROG_YACC
56 AC_PROG_YACC
57 AM_PROG_LEX
58 AC_PROG_RANLIB
59 AC_PROG_AWK
60 AC_KRB_PROG_LN_S
62 AC_MIPS_ABI
63 CC="$CC $abi"
64 libdir="$libdir$abilibdirext"
66 AC_C___ATTRIBUTE__
68 AC_ENABLE_SHARED(no)
69 AC_PROG_LIBTOOL
71 AC_WFLAGS(-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs)
73 rk_DB
75 dnl 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])
77 rk_ROKEN(lib/roken)
78 LIB_roken="\$(top_builddir)/lib/vers/libvers.la $LIB_roken"
80 AC_TEST_PACKAGE_NEW(openldap,
81 [#include <lber.h>
82 #include <ldap.h>],
83 [-lldap -llber],,,OPENLDAP)
85 if test "$openldap_libdir"; then
86         LIB_openldap="-R $openldap_libdir $LIB_openldap"
89 AC_TEST_PACKAGE_NEW(krb4,[#include <krb.h>],-lkrb,-ldes,/usr/athena, KRB4)
91 LIB_kdb=
92 if 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
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
156         LIBS="$save_LIBS"
157         CFLAGS="$save_CFLAGS"
158         LIB_kdb="-lkdb -lkrb"
159         test_LIB_krb4="$LIB_krb4"
160         if test "$krb4_libdir"; then
161                 LIB_krb4="-R $krb4_libdir $LIB_krb4"
162                 LIB_kdb="-R $krb4_libdir -L$krb4_libdir $LIB_kdb"
163         fi
165 AM_CONDITIONAL(KRB4, test "$with_krb4" != "no")
166 AM_CONDITIONAL(KRB5, true)
167 AM_CONDITIONAL(do_roken_rename, true)
169 AC_DEFINE(KRB5, 1, [Enable Kerberos 5 support in applications.])dnl
170 AC_SUBST(LIB_kdb)dnl
172 AC_ARG_ENABLE(dce, [  --enable-dce      if you want support for DCE/DFS PAG's.])
173 if test "$enable_dce" = yes; then
174     AC_DEFINE(DCE, 1, [Define if you want support for DCE/DFS PAG's.])
176 AM_CONDITIONAL(DCE, test "$enable_dce" = yes)
178 ## XXX quite horrible:
179 if test -f /etc/ibmcxx.cfg; then
180         dpagaix_LDADD=`sed -n '/^xlc_r4/,/^$/p' /etc/ibmcxx.cfg | sed -n -e '/libraries/{;s/^[[^=]]*=\(.*\)/\1/;s/,/ /gp;}'`
181         dpagaix_CFLAGS=`sed -n '/^xlc_r4/,/^$/p' /etc/ibmcxx.cfg | sed -n -e '/options/{;s/^[[^=]]*=\(.*\)/\1/;s/-q[^,]*//;s/,/ /gp;}'`
182 else
183         dpagaix_CFLAGS="-D_THREAD_SAFE -D_AIX_PTHREADS_D7 -D_AIX32_THREADS=1 -D_AES_SOURCE -D_AIX41 -I/usr/include/dce"
184         dpagaix_LDADD="-L/usr/lib/threads -ldcelibc_r -ldcepthreads -lpthreads_compat lpthreads -lc_r"
185         dpagaix_LDFLAGS="-Wl,-bI:dfspag.exp"
187 AC_SUBST(dpagaix_CFLAGS)
188 AC_SUBST(dpagaix_LDADD)
190 otp=yes
191 AC_ARG_ENABLE(otp,
192 [  --disable-otp          if you don't want OTP support],
194 if test "$enableval" = "no"; then
195         otp=no
198 if test "$otp" = "yes"; then
199         AC_DEFINE(OTP, 1, [Define if you want OTP support in applications.])
200         LIB_otp='$(top_builddir)/lib/otp/libotp.la'
202 AC_SUBST(LIB_otp)
203 AM_CONDITIONAL(OTP, test "$otp" = yes)dnl
205 AC_CHECK_OSFC2
207 rk_CHECK_MAN
209 AC_TEST_PACKAGE_NEW(readline,
210 [#include <stdio.h>
211  #include <readline.h>],-lreadline,,, READLINE)
213 AC_TEST_PACKAGE_NEW(hesiod,[#include <hesiod.h>],-lhesiod,,, HESIOD)
215 KRB_C_BIGENDIAN
216 AC_C_INLINE
218 KRB_AIX
219 KRB_IRIX
221 KRB_CHECK_X
223 AM_CONDITIONAL(HAVE_X, test "$no_x" != yes)
225 AC_CHECK_XAU
227 dnl AM_C_PROTOTYPES
229 dnl Checks for typedefs, structures, and compiler characteristics.
230 AC_C_CONST
231 AC_TYPE_OFF_T
232 AC_TYPE_SIZE_T
233 AC_CHECK_TYPE_EXTRA(ssize_t, int, [#include <unistd.h>])
234 AC_TYPE_PID_T
235 AC_TYPE_UID_T
236 AC_CHECK_TYPE_EXTRA(mode_t, unsigned short, [])
237 AC_CHECK_TYPE_EXTRA(sig_atomic_t, int, [#include <signal.h>])
238 AC_HAVE_TYPE([long long])
239 AC_HEADER_TIME
240 AC_STRUCT_TM
242 dnl Checks for header files.
243 AC_HEADER_STDC
245 AC_CHECK_HEADERS([\
246         arpa/ftp.h                              \
247         arpa/inet.h                             \
248         arpa/nameser.h                          \
249         arpa/telnet.h                           \
250         bind/bitypes.h                          \
251         bsdsetjmp.h                             \
252         crypt.h                                 \
253         curses.h                                \
254         dbm.h                                   \
255         dirent.h                                \
256         dlfcn.h                                 \
257         err.h                                   \
258         errno.h                                 \
259         fcntl.h                                 \
260         fnmatch.h                               \
261         gdbm/ndbm.h                             \
262         grp.h                                   \
263         inttypes.h                              \
264         io.h                                    \
265         limits.h                                \
266         maillock.h                              \
267         ndbm.h                                  \
268         net/if.h                                \
269         netdb.h                                 \
270         netinet/in.h                            \
271         netinet/in6.h                           \
272         netinet/in6_machtypes.h                 \
273         netinet/in6_var.h                       \
274         netinet/in_systm.h                      \
275         netinet6/in6.h                          \
276         netinfo/ni.h                            \
277         paths.h                                 \
278         pthread.h                               \
279         pty.h                                   \
280         pwd.h                                   \
281         resolv.h                                \
282         rpcsvc/dbm.h                            \
283         sac.h                                   \
284         security/pam_modules.h                  \
285         sgtty.h                                 \
286         shadow.h                                \
287         siad.h                                  \
288         signal.h                                \
289         stropts.h                               \
290         sys/bitypes.h                           \
291         sys/category.h                          \
292         sys/file.h                              \
293         sys/filio.h                             \
294         sys/ioccom.h                            \
295         sys/ioctl.h                             \
296         sys/param.h                             \
297         sys/proc.h                              \
298         sys/pty.h                               \
299         sys/ptyio.h                             \
300         sys/ptyvar.h                            \
301         sys/resource.h                          \
302         sys/select.h                            \
303         sys/socket.h                            \
304         sys/sockio.h                            \
305         sys/stat.h                              \
306         sys/str_tty.h                           \
307         sys/stream.h                            \
308         sys/stropts.h                           \
309         sys/strtty.h                            \
310         sys/syscall.h                           \
311         sys/sysctl.h                            \
312         sys/termio.h                            \
313         sys/time.h                              \
314         sys/timeb.h                             \
315         sys/times.h                             \
316         sys/tty.h                               \
317         sys/types.h                             \
318         sys/uio.h                               \
319         sys/un.h                                \
320         sys/utsname.h                           \
321         sys/wait.h                              \
322         syslog.h                                \
323         term.h                                  \
324         termio.h                                \
325         termios.h                               \
326         time.h                                  \
327         tmpdir.h                                \
328         udb.h                                   \
329         unistd.h                                \
330         userconf.h                              \
331         usersec.h                               \
332         util.h                                  \
333         utmp.h                                  \
334         utmpx.h                                 \
337 CHECK_NETINET_IP_AND_TCP
340 AC_ARG_ENABLE(netinfo,
341 [  --enable-netinfo      enable netinfo for configuration lookup])
343 if test "$ac_cv_header_netinfo_ni_h" = yes -a "$enable_netinfo" = yes; then
344        AC_DEFINE(HAVE_NETINFO, 1,
345                [Define if you want to use Netinfo instead of krb5.conf.])
348 AM_CONDITIONAL(have_err_h, test "$ac_cv_header_err_h" = yes)
349 AM_CONDITIONAL(have_fnmatch_h, test "$ac_cv_header_fnmatch_h" = yes)
351 dnl Checks for libraries.
353 AC_FIND_FUNC(socket, socket)
354 AC_FIND_FUNC(gethostbyname, nsl)
355 AC_FIND_FUNC(syslog, syslog)
357 AC_KRB_IPV6
359 AC_FIND_FUNC_NO_LIBS(logwtmp, util)
360 AC_FIND_FUNC_NO_LIBS(tgetent, termcap ncurses curses)
361 AC_FIND_FUNC(gethostbyname2, inet6 ip6)
363 AC_FIND_FUNC(res_search, resolv,
365 #include <stdio.h>
366 #ifdef HAVE_SYS_TYPES_H
367 #include <sys/types.h>
368 #endif
369 #ifdef HAVE_NETINET_IN_H
370 #include <netinet/in.h>
371 #endif
372 #ifdef HAVE_ARPA_NAMESER_H
373 #include <arpa/nameser.h>
374 #endif
375 #ifdef HAVE_RESOLV_H
376 #include <resolv.h>
377 #endif
379 [0,0,0,0,0])
381 AC_FIND_FUNC(dn_expand, resolv,
383 #include <stdio.h>
384 #ifdef HAVE_SYS_TYPES_H
385 #include <sys/types.h>
386 #endif
387 #ifdef HAVE_NETINET_IN_H
388 #include <netinet/in.h>
389 #endif
390 #ifdef HAVE_ARPA_NAMESER_H
391 #include <arpa/nameser.h>
392 #endif
393 #ifdef HAVE_RESOLV_H
394 #include <resolv.h>
395 #endif
397 [0,0,0,0,0])
399 dnl Checks for library functions.
401 AC_BROKEN_SNPRINTF
402 AC_BROKEN_VSNPRINTF
404 AC_CHECK_FUNCS([                                \
405         _getpty                                 \
406         _scrsize                                \
407         fcntl                                   \
408         gettimeofday                            \
409         getuid                                  \
410         grantpt                                 \
411         mktime                                  \
412         ptsname                                 \
413         rand                                    \
414         random                                  \
415         revoke                                  \
416         select                                  \
417         setitimer                               \
418         setpcred                                \
419         setpgid                                 \
420         setproctitle                            \
421         setregid                                \
422         setresgid                               \
423         setresuid                               \
424         setreuid                                \
425         setsid                                  \
426         setutent                                \
427         sigaction                               \
428         strstr                                  \
429         timegm                                  \
430         ttyname                                 \
431         ttyslot                                 \
432         umask                                   \
433         unlockpt                                \
434         vhangup                                 \
435         yp_get_default_domain                   \
438 KRB_CAPABILITIES
440 AC_CHECK_GETPWNAM_R_POSIX
442 AC_FIND_FUNC_NO_LIBS(getsockopt,,
443 [#ifdef HAVE_SYS_TYPES_H
444 #include <sys/types.h>
445 #endif
446 #ifdef HAVE_SYS_SOCKET_H
447 #include <sys/socket.h>
448 #endif],
449 [0,0,0,0,0])
450 AC_FIND_FUNC_NO_LIBS(setsockopt,,
451 [#ifdef HAVE_SYS_TYPES_H
452 #include <sys/types.h>
453 #endif
454 #ifdef HAVE_SYS_SOCKET_H
455 #include <sys/socket.h>
456 #endif],
457 [0,0,0,0,0])
459 dnl Cray stuff
460 AC_CHECK_FUNCS(getudbnam setlim)
462 rk_RETSIGTYPE
464 rk_BROKEN_REALLOC
466 dnl AC_KRB_FUNC_GETCWD_BROKEN
469 dnl Check for fields in struct utmp
472 AC_HAVE_STRUCT_FIELD(struct utmp, ut_addr, [#include <utmp.h>])
473 AC_HAVE_STRUCT_FIELD(struct utmp, ut_host, [#include <utmp.h>])
474 AC_HAVE_STRUCT_FIELD(struct utmp, ut_id, [#include <utmp.h>])
475 AC_HAVE_STRUCT_FIELD(struct utmp, ut_pid, [#include <utmp.h>])
476 AC_HAVE_STRUCT_FIELD(struct utmp, ut_type, [#include <utmp.h>])
477 AC_HAVE_STRUCT_FIELD(struct utmp, ut_user, [#include <utmp.h>])
478 AC_HAVE_STRUCT_FIELD(struct utmpx, ut_exit, [#include <utmpx.h>])
479 AC_HAVE_STRUCT_FIELD(struct utmpx, ut_syslen, [#include <utmpx.h>])
482 dnl Check for fields in struct tm
485 AC_HAVE_STRUCT_FIELD(struct tm, tm_gmtoff, [#include <time.h>])
486 AC_HAVE_STRUCT_FIELD(struct tm, tm_zone, [#include <time.h>])
489 dnl or do we have a variable `timezone' ?
492 rk_CHECK_VAR(timezone, [#include <time.h>])
494 AC_HAVE_TYPE([sa_family_t],[#include <sys/socket.h>])
496 AC_HAVE_TYPE([socklen_t],[#include <sys/socket.h>])
498 AC_HAVE_TYPE([struct sockaddr], [#include <sys/socket.h>])
500 AC_HAVE_TYPE([struct sockaddr_storage], [#include <sys/socket.h>])
502 AC_HAVE_TYPE([struct addrinfo], [#include <netdb.h>])
505 dnl Check for struct winsize
508 AC_KRB_STRUCT_WINSIZE
511 dnl Check for struct spwd
514 AC_KRB_STRUCT_SPWD
517 dnl Check for sa_len in struct sockaddr
520 AC_HAVE_STRUCT_FIELD(struct sockaddr, sa_len, [#include <sys/types.h>
521 #include <sys/socket.h>])
524 AC_GROK_TYPES([int8_t int16_t int32_t int64_t \
525         u_int8_t u_int16_t u_int32_t u_int64_t \
526         uint8_t uint16_t uint32_t uint64_t])
529 dnl crypto functions tests
532 AC_CHECK_HEADERS([                              \
533         openssl/md4.h                           \
534         openssl/md5.h                           \
535         openssl/sha.h                           \
536         openssl/des.h                           \
537         openssl/rc4.h                           \
540 AC_FIND_FUNC_NO_LIBS2(MD4_Init, crypto des, [], [], [], [$test_LIB_krb4])
541 AC_FIND_FUNC_NO_LIBS2(MD5_Init, crypto des, [], [], [], [$test_LIB_krb4])
542 AC_FIND_FUNC_NO_LIBS2(SHA1_Init, crypto des, [], [], [], [$test_LIB_krb4])
543 AC_FIND_FUNC_NO_LIBS2(des_cbc_encrypt, crypto des, [], [], [], [$test_LIB_krb4])
544 AC_FIND_FUNC_NO_LIBS2(RC4, crypto des, [], [], [], [$test_LIB_krb4])
545 if test "$ac_cv_func_des_cbc_encrypt" = "yes" -a \
546 "$ac_cv_func_MD4_Init"  = "yes" -a \
547 "$ac_cv_func_MD5_Init"  = "yes" -a \
548 "$ac_cv_func_SHA1_Init" = "yes" -a \
549 "$ac_cv_func_RC4" = "yes"; then
550   DIR_des=''
551   LIB_des=''
552   if test "$krb4_libdir" != "" -a "$ac_cv_funclib_des_cbc_encrypt" = "-ldes"; then
553     LIB_des="-R $krb4_libdir -L$krb4_libdir"
554   fi
555   LIB_des="$LIB_des $ac_cv_funclib_MD4_Init"
556   LIB_des_appl="$LIB_des"
557 else
558   DIR_des='des'
559   LIB_des='$(top_builddir)/lib/des/libdes.la'
560   LIB_des_appl="-ldes"
562 AC_SUBST(DIR_des)
563 AC_SUBST(LIB_des)
564 AC_SUBST(LIB_des_appl)
566 KRB_READLINE
568 dnl telnet muck --------------------------------------------------
570 AC_DEFINE(AUTHENTICATION, 1, 
571         [Define if you want authentication support in telnet.])dnl
572 AC_DEFINE(ENCRYPTION, 1,
573         [Define if you want encryption support in telnet.])dnl
574 AC_DEFINE(DES_ENCRYPTION, 1,
575         [Define if you want to use DES encryption in telnet.])dnl
576 AC_DEFINE(DIAGNOSTICS, 1,
577         [Define this to enable diagnostics in telnet.])dnl
578 AC_DEFINE(OLD_ENVIRON, 1,
579         [Define this to enable old environment option in telnet.])dnl
580 if false; then
581 AC_DEFINE(ENV_HACK, 1,
582         [Define this if you want support for broken ENV_{VAR,VAL} telnets.])
585 # Simple test for streamspty, based on the existance of getmsg(), alas
586 # this breaks on SunOS4 which have streams but BSD-like ptys
588 # And also something wierd has happend with dec-osf1, fallback to bsd-ptys
590 AC_CHECK_FUNC(getmsg)
592 if test "$ac_cv_func_getmsg" = "yes"; then
594 AC_CACHE_CHECK(for working getmsg, ac_cv_func_getmsg_work,
595 AC_TRY_RUN(
597 #include <stdio.h>
598 #include <errno.h>
600 int main()
602   int ret;
603   ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL);
604   if(ret < 0 && errno == ENOSYS)
605     return 1;
606   return 0;
608 ], ac_cv_func_getmsg_work=yes, ac_cv_func_getmsg_work=no,
609 ac_cv_func_getmsg_work=no))
610 test "$ac_cv_func_getmsg_work" = "yes" &&
611 AC_DEFINE(HAVE_GETMSG, 1, [Define if you have a working getmsg.])
615 if test "$ac_cv_func_getmsg_work" = yes; then
616 AC_MSG_CHECKING(for streamspty)
617 case "$host" in
618 *-*-aix3*|*-*-sunos4*|*-*-osf*|*-*-hpux1[[01]]*)
619         krb_cv_sys_streamspty=no
620         ;;
622         krb_cv_sys_streamspty=yes
623         ;;
624 esac
625 AC_MSG_RESULT($krb_cv_sys_streamspty)
627 if test "$krb_cv_sys_streamspty" = yes; then
628         AC_DEFINE(STREAMSPTY, 1, [Define if you have streams ptys.])
631 AC_AUTH_MODULES
633 dnl This is done by AC_OUTPUT but we need the result here.
635 test "x$prefix" = xNONE && prefix=$ac_default_prefix
636 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
638 for i in bin lib libexec sbin; do
639         i=${i}dir
640         foo=`echo $i | tr 'xindiscernible' 'XINDISCERNIBLE'`
641         x="\$${i}"
642         eval y="$x"
643         while test "x$y" != "x$x"; do
644                 x="$y"
645                 eval y="$x"
646         done
647         AC_DEFINE_UNQUOTED($foo,"$x")
648 done
649 AH_BOTTOM([#undef BINDIR 
650 #undef LIBDIR
651 #undef LIBEXECDIR
652 #undef SBINDIR])
654 if false; then
655         # hack to shut up automake
656         LIBOBJS="$LIBOBJS make-print-version.o"
658 LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/\.lo/g'`
659 AC_SUBST(LTLIBOBJS)
660 AC_CONFIG_FILES(Makefile                \
661         include/Makefile                \
662         include/kadm5/Makefile          \
663         lib/Makefile                    \
664         lib/45/Makefile                 \
665         lib/auth/Makefile               \
666         lib/auth/afskauthlib/Makefile   \
667         lib/auth/pam/Makefile           \
668         lib/auth/sia/Makefile           \
669         lib/asn1/Makefile               \
670         lib/com_err/Makefile            \
671         lib/des/Makefile                \
672         lib/editline/Makefile           \
673         lib/gssapi/Makefile             \
674         lib/hdb/Makefile                \
675         lib/kadm5/Makefile              \
676         lib/kafs/Makefile               \
677         lib/kdfs/Makefile               \
678         lib/krb5/Makefile               \
679         lib/otp/Makefile                \
680         lib/roken/Makefile              \
681         lib/sl/Makefile                 \
682         lib/vers/Makefile               \
683         kuser/Makefile                  \
684         kpasswd/Makefile                \
685         kadmin/Makefile                 \
686         admin/Makefile                  \
687         kdc/Makefile                    \
688         appl/Makefile                   \
689         appl/afsutil/Makefile           \
690         appl/ftp/Makefile               \
691         appl/ftp/common/Makefile        \
692         appl/ftp/ftp/Makefile           \
693         appl/ftp/ftpd/Makefile          \
694         appl/kx/Makefile                \
695         appl/login/Makefile             \
696         appl/otp/Makefile               \
697         appl/popper/Makefile            \
698         appl/push/Makefile              \
699         appl/rsh/Makefile               \
700         appl/rcp/Makefile               \
701         appl/su/Makefile                \
702         appl/xnlock/Makefile            \
703         appl/telnet/Makefile            \
704         appl/telnet/libtelnet/Makefile  \
705         appl/telnet/telnet/Makefile     \
706         appl/telnet/telnetd/Makefile    \
707         appl/test/Makefile              \
708         appl/kf/Makefile                \
709         appl/dceutils/Makefile          \
710         doc/Makefile                    \
711         tools/Makefile                  \
714 AC_OUTPUT
717 dnl This is the release version name-number[beta]
719 HEIMDALVERSION="$PACKAGE-$VERSION"
721 cat > include/newversion.h.in <<EOF
722 const char *heimdal_long_version = "@(#)\$Version: $HEIMDALVERSION by @USER@ on @HOST@ ($host) @DATE@ \$";
723 const char *heimdal_version = "$HEIMDALVERSION";
726 if test -f include/version.h && cmp -s include/newversion.h.in include/version.h.in; then
727         echo "include/version.h is unchanged"
728         rm -f include/newversion.h.in
729 else
730         echo "creating include/version.h"
731         User=${USER-${LOGNAME}}
732         Host=`(hostname || uname -n || echo unknown) 2>/dev/null | sed 1q`
733         Date=`date`
734         mv -f include/newversion.h.in include/version.h.in
735         sed -e "s/@USER@/$User/" -e "s/@HOST@/$Host/" -e "s/@DATE@/$Date/" include/version.h.in > include/version.h