rename check_status to wait_for_process, and export it; function
[heimdal.git] / configure.in
blobdc9ba643fc6e134e745fa881c4b4b74c93ea444c
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.3f, 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.3f)
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)
191 AC_ARG_ENABLE(kaserver,
192 [  --enable-kaserver      if you want the KDC to try to emulate a kaserver])
193 if test "$enable_kaserver" = yes; then
194         AC_DEFINE(KASERVER, 1,
195                 [Define if you want to use the KDC as a kaserver.])
196         if test "$with_krb4" = "no"; then
197                 AC_MSG_ERROR(kaserver requires krb4)
198                 exit 1
199         fi
202 AC_ARG_ENABLE(kaserver-db,
203 [  --enable-kaserver-db   if you want support for reading kaserver databases in hprop])
204 if test "$enable_kaserver_db" = yes; then
205         AC_DEFINE(KASERVER_DB, 1,
206                 [Define if you want support in hprop for reading kaserver databases])
207         if test "$with_krb4" = "no"; then
208                 AC_MSG_ERROR(kaserver-db requires krb4)
209                 exit 1
210         fi
213 otp=yes
214 AC_ARG_ENABLE(otp,
215 [  --disable-otp          if you don't want OTP support],
217 if test "$enableval" = "no"; then
218         otp=no
221 if test "$otp" = "yes"; then
222         AC_DEFINE(OTP, 1, [Define if you want OTP support in applications.])
223         LIB_otp='$(top_builddir)/lib/otp/libotp.la'
225 AC_SUBST(LIB_otp)
226 AM_CONDITIONAL(OTP, test "$otp" = yes)dnl
228 AC_CHECK_OSFC2
230 rk_CHECK_MAN
232 AC_TEST_PACKAGE_NEW(readline,
233 [#include <stdio.h>
234  #include <readline.h>],-lreadline,,, READLINE)
236 AC_TEST_PACKAGE_NEW(hesiod,[#include <hesiod.h>],-lhesiod,,, HESIOD)
238 KRB_C_BIGENDIAN
239 AC_C_INLINE
241 KRB_AIX
242 KRB_IRIX
244 KRB_CHECK_X
246 AM_CONDITIONAL(HAVE_X, test "$no_x" != yes)
248 AC_CHECK_XAU
250 dnl AM_C_PROTOTYPES
252 dnl Checks for typedefs, structures, and compiler characteristics.
253 AC_C_CONST
254 AC_TYPE_OFF_T
255 AC_TYPE_SIZE_T
256 AC_CHECK_TYPE_EXTRA(ssize_t, int, [#include <unistd.h>])
257 AC_TYPE_PID_T
258 AC_TYPE_UID_T
259 AC_CHECK_TYPE_EXTRA(mode_t, unsigned short, [])
260 AC_CHECK_TYPE_EXTRA(sig_atomic_t, int, [#include <signal.h>])
261 AC_HAVE_TYPE([long long])
262 AC_HEADER_TIME
263 AC_STRUCT_TM
265 dnl Checks for header files.
266 AC_HEADER_STDC
268 AC_CHECK_HEADERS([\
269         arpa/ftp.h                              \
270         arpa/inet.h                             \
271         arpa/nameser.h                          \
272         arpa/telnet.h                           \
273         bind/bitypes.h                          \
274         bsdsetjmp.h                             \
275         crypt.h                                 \
276         curses.h                                \
277         dbm.h                                   \
278         dirent.h                                \
279         dlfcn.h                                 \
280         err.h                                   \
281         errno.h                                 \
282         fcntl.h                                 \
283         fnmatch.h                               \
284         gdbm/ndbm.h                             \
285         grp.h                                   \
286         inttypes.h                              \
287         io.h                                    \
288         limits.h                                \
289         maillock.h                              \
290         ndbm.h                                  \
291         net/if.h                                \
292         netdb.h                                 \
293         netinet/in.h                            \
294         netinet/in6.h                           \
295         netinet/in6_machtypes.h                 \
296         netinet/in6_var.h                       \
297         netinet/in_systm.h                      \
298         netinet6/in6.h                          \
299         netinfo/ni.h                            \
300         paths.h                                 \
301         pthread.h                               \
302         pty.h                                   \
303         pwd.h                                   \
304         resolv.h                                \
305         rpcsvc/dbm.h                            \
306         sac.h                                   \
307         security/pam_modules.h                  \
308         sgtty.h                                 \
309         shadow.h                                \
310         siad.h                                  \
311         signal.h                                \
312         stropts.h                               \
313         sys/bitypes.h                           \
314         sys/category.h                          \
315         sys/file.h                              \
316         sys/filio.h                             \
317         sys/ioccom.h                            \
318         sys/ioctl.h                             \
319         sys/param.h                             \
320         sys/proc.h                              \
321         sys/pty.h                               \
322         sys/ptyio.h                             \
323         sys/ptyvar.h                            \
324         sys/resource.h                          \
325         sys/select.h                            \
326         sys/socket.h                            \
327         sys/sockio.h                            \
328         sys/stat.h                              \
329         sys/str_tty.h                           \
330         sys/stream.h                            \
331         sys/stropts.h                           \
332         sys/strtty.h                            \
333         sys/syscall.h                           \
334         sys/sysctl.h                            \
335         sys/termio.h                            \
336         sys/time.h                              \
337         sys/timeb.h                             \
338         sys/times.h                             \
339         sys/tty.h                               \
340         sys/types.h                             \
341         sys/uio.h                               \
342         sys/un.h                                \
343         sys/utsname.h                           \
344         sys/wait.h                              \
345         syslog.h                                \
346         term.h                                  \
347         termio.h                                \
348         termios.h                               \
349         time.h                                  \
350         tmpdir.h                                \
351         udb.h                                   \
352         unistd.h                                \
353         userconf.h                              \
354         usersec.h                               \
355         util.h                                  \
356         utmp.h                                  \
357         utmpx.h                                 \
360 CHECK_NETINET_IP_AND_TCP
363 AC_ARG_ENABLE(netinfo,
364 [  --enable-netinfo      enable netinfo for configuration lookup])
366 if test "$ac_cv_header_netinfo_ni_h" = yes -a "$enable_netinfo" = yes; then
367        AC_DEFINE(HAVE_NETINFO, 1,
368                [Define if you want to use Netinfo instead of krb5.conf.])
371 AM_CONDITIONAL(have_err_h, test "$ac_cv_header_err_h" = yes)
372 AM_CONDITIONAL(have_fnmatch_h, test "$ac_cv_header_fnmatch_h" = yes)
374 AC_KRB_IPV6
376 dnl Checks for libraries.
378 AC_FIND_FUNC(socket, socket)
379 AC_FIND_FUNC(gethostbyname, nsl)
380 AC_FIND_FUNC(syslog, syslog)
382 AC_FIND_FUNC_NO_LIBS(logwtmp, util)
383 AC_FIND_FUNC_NO_LIBS(tgetent, termcap ncurses curses)
384 AC_FIND_FUNC(gethostbyname2, inet6 ip6)
386 AC_FIND_FUNC(res_search, resolv,
388 #include <stdio.h>
389 #ifdef HAVE_SYS_TYPES_H
390 #include <sys/types.h>
391 #endif
392 #ifdef HAVE_NETINET_IN_H
393 #include <netinet/in.h>
394 #endif
395 #ifdef HAVE_ARPA_NAMESER_H
396 #include <arpa/nameser.h>
397 #endif
398 #ifdef HAVE_RESOLV_H
399 #include <resolv.h>
400 #endif
402 [0,0,0,0,0])
404 AC_FIND_FUNC(dn_expand, resolv,
406 #include <stdio.h>
407 #ifdef HAVE_SYS_TYPES_H
408 #include <sys/types.h>
409 #endif
410 #ifdef HAVE_NETINET_IN_H
411 #include <netinet/in.h>
412 #endif
413 #ifdef HAVE_ARPA_NAMESER_H
414 #include <arpa/nameser.h>
415 #endif
416 #ifdef HAVE_RESOLV_H
417 #include <resolv.h>
418 #endif
420 [0,0,0,0,0])
422 dnl Checks for library functions.
424 AC_BROKEN_SNPRINTF
425 AC_BROKEN_VSNPRINTF
427 AC_CHECK_FUNCS([                                \
428         _getpty                                 \
429         _scrsize                                \
430         fcntl                                   \
431         gettimeofday                            \
432         getuid                                  \
433         grantpt                                 \
434         mktime                                  \
435         ptsname                                 \
436         rand                                    \
437         random                                  \
438         revoke                                  \
439         select                                  \
440         setitimer                               \
441         setpcred                                \
442         setpgid                                 \
443         setproctitle                            \
444         setregid                                \
445         setresgid                               \
446         setresuid                               \
447         setreuid                                \
448         setsid                                  \
449         setutent                                \
450         sigaction                               \
451         strstr                                  \
452         timegm                                  \
453         ttyname                                 \
454         ttyslot                                 \
455         umask                                   \
456         unlockpt                                \
457         vhangup                                 \
458         yp_get_default_domain                   \
461 KRB_CAPABILITIES
463 AC_CHECK_GETPWNAM_R_POSIX
465 AC_FIND_FUNC_NO_LIBS(getsockopt,,
466 [#ifdef HAVE_SYS_TYPES_H
467 #include <sys/types.h>
468 #endif
469 #ifdef HAVE_SYS_SOCKET_H
470 #include <sys/socket.h>
471 #endif],
472 [0,0,0,0,0])
473 AC_FIND_FUNC_NO_LIBS(setsockopt,,
474 [#ifdef HAVE_SYS_TYPES_H
475 #include <sys/types.h>
476 #endif
477 #ifdef HAVE_SYS_SOCKET_H
478 #include <sys/socket.h>
479 #endif],
480 [0,0,0,0,0])
482 dnl Cray stuff
483 AC_CHECK_FUNCS(getudbnam setlim)
485 rk_RETSIGTYPE
487 rk_BROKEN_REALLOC
489 dnl AC_KRB_FUNC_GETCWD_BROKEN
492 dnl Check for fields in struct utmp
495 AC_HAVE_STRUCT_FIELD(struct utmp, ut_addr, [#include <utmp.h>])
496 AC_HAVE_STRUCT_FIELD(struct utmp, ut_host, [#include <utmp.h>])
497 AC_HAVE_STRUCT_FIELD(struct utmp, ut_id, [#include <utmp.h>])
498 AC_HAVE_STRUCT_FIELD(struct utmp, ut_pid, [#include <utmp.h>])
499 AC_HAVE_STRUCT_FIELD(struct utmp, ut_type, [#include <utmp.h>])
500 AC_HAVE_STRUCT_FIELD(struct utmp, ut_user, [#include <utmp.h>])
501 AC_HAVE_STRUCT_FIELD(struct utmpx, ut_exit, [#include <utmpx.h>])
502 AC_HAVE_STRUCT_FIELD(struct utmpx, ut_syslen, [#include <utmpx.h>])
505 dnl Check for fields in struct tm
508 AC_HAVE_STRUCT_FIELD(struct tm, tm_gmtoff, [#include <time.h>])
509 AC_HAVE_STRUCT_FIELD(struct tm, tm_zone, [#include <time.h>])
512 dnl or do we have a variable `timezone' ?
515 rk_CHECK_VAR(timezone, [#include <time.h>])
517 AC_HAVE_TYPE([sa_family_t],[#include <sys/socket.h>])
519 AC_HAVE_TYPE([socklen_t],[#include <sys/socket.h>])
521 AC_HAVE_TYPE([struct sockaddr], [#include <sys/socket.h>])
523 AC_HAVE_TYPE([struct sockaddr_storage], [#include <sys/socket.h>])
525 AC_HAVE_TYPE([struct addrinfo], [#include <netdb.h>])
528 dnl Check for struct winsize
531 AC_KRB_STRUCT_WINSIZE
534 dnl Check for struct spwd
537 AC_KRB_STRUCT_SPWD
540 dnl Check for sa_len in struct sockaddr
543 AC_HAVE_STRUCT_FIELD(struct sockaddr, sa_len, [#include <sys/types.h>
544 #include <sys/socket.h>])
547 AC_GROK_TYPES([int8_t int16_t int32_t int64_t \
548         u_int8_t u_int16_t u_int32_t u_int64_t \
549         uint8_t uint16_t uint32_t uint64_t])
552 dnl crypto functions tests
555 AC_CHECK_HEADERS([                              \
556         openssl/md4.h                           \
557         openssl/md5.h                           \
558         openssl/sha.h                           \
559         openssl/des.h                           \
560         openssl/rc4.h                           \
563 AC_FIND_FUNC_NO_LIBS2(MD4_Init, crypto des, [], [], [], [$test_LIB_krb4])
564 AC_FIND_FUNC_NO_LIBS2(MD5_Init, crypto des, [], [], [], [$test_LIB_krb4])
565 AC_FIND_FUNC_NO_LIBS2(SHA1_Init, crypto des, [], [], [], [$test_LIB_krb4])
566 AC_FIND_FUNC_NO_LIBS2(des_cbc_encrypt, crypto des, [], [], [], [$test_LIB_krb4])
567 AC_FIND_FUNC_NO_LIBS2(RC4, crypto des, [], [], [], [$test_LIB_krb4])
568 if test "$ac_cv_func_des_cbc_encrypt" = "yes" -a \
569 "$ac_cv_func_MD4_Init"  = "yes" -a \
570 "$ac_cv_func_MD5_Init"  = "yes" -a \
571 "$ac_cv_func_SHA1_Init" = "yes" -a \
572 "$ac_cv_func_RC4" = "yes"; then
573   DIR_des=''
574   LIB_des=''
575   if test "$krb4_libdir" != ""; then
576     LIB_des="-R $krb4_libdir -L$krb4_libdir"
577   fi
578   LIB_des="$LIB_des $ac_cv_funclib_MD4_Init"
579   LIB_des_appl="$LIB_des"
580 else
581   DIR_des='des'
582   LIB_des='$(top_builddir)/lib/des/libdes.la'
583   LIB_des_appl="-ldes"
585 AC_SUBST(DIR_des)
586 AC_SUBST(LIB_des)
587 AC_SUBST(LIB_des_appl)
589 KRB_READLINE
591 dnl telnet muck --------------------------------------------------
593 AC_DEFINE(AUTHENTICATION, 1, 
594         [Define if you want authentication support in telnet.])dnl
595 AC_DEFINE(ENCRYPTION, 1,
596         [Define if you want encryption support in telnet.])dnl
597 AC_DEFINE(DES_ENCRYPTION, 1,
598         [Define if you want to use DES encryption in telnet.])dnl
599 AC_DEFINE(DIAGNOSTICS, 1,
600         [Define this to enable diagnostics in telnet.])dnl
601 AC_DEFINE(OLD_ENVIRON, 1,
602         [Define this to enable old environment option in telnet.])dnl
603 if false; then
604 AC_DEFINE(ENV_HACK, 1,
605         [Define this if you want support for broken ENV_{VAR,VAL} telnets.])
608 # Simple test for streamspty, based on the existance of getmsg(), alas
609 # this breaks on SunOS4 which have streams but BSD-like ptys
611 # And also something wierd has happend with dec-osf1, fallback to bsd-ptys
613 AC_CHECK_FUNC(getmsg)
615 if test "$ac_cv_func_getmsg" = "yes"; then
617 AC_CACHE_CHECK(for working getmsg, ac_cv_func_getmsg_work,
618 AC_TRY_RUN(
620 #include <stdio.h>
621 #include <errno.h>
623 int main()
625   int ret;
626   ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL);
627   if(ret < 0 && errno == ENOSYS)
628     return 1;
629   return 0;
631 ], ac_cv_func_getmsg_work=yes, ac_cv_func_getmsg_work=no,
632 ac_cv_func_getmsg_work=no))
633 test "$ac_cv_func_getmsg_work" = "yes" &&
634 AC_DEFINE(HAVE_GETMSG, 1, [Define if you have a working getmsg.])
638 if test "$ac_cv_func_getmsg_work" = yes; then
639 AC_MSG_CHECKING(for streamspty)
640 case "$host" in
641 *-*-aix3*|*-*-sunos4*|*-*-osf*|*-*-hpux1[[01]]*)
642         krb_cv_sys_streamspty=no
643         ;;
645         krb_cv_sys_streamspty=yes
646         ;;
647 esac
648 AC_MSG_RESULT($krb_cv_sys_streamspty)
650 if test "$krb_cv_sys_streamspty" = yes; then
651         AC_DEFINE(STREAMSPTY, 1, [Define if you have streams ptys.])
654 AC_AUTH_MODULES
656 dnl This is done by AC_OUTPUT but we need the result here.
658 test "x$prefix" = xNONE && prefix=$ac_default_prefix
659 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
661 for i in bin lib libexec sbin; do
662         i=${i}dir
663         foo=`echo $i | tr 'xindiscernible' 'XINDISCERNIBLE'`
664         x="\$${i}"
665         eval y="$x"
666         while test "x$y" != "x$x"; do
667                 x="$y"
668                 eval y="$x"
669         done
670         AC_DEFINE_UNQUOTED($foo,"$x")
671 done
672 AH_BOTTOM([#undef BINDIR 
673 #undef LIBDIR
674 #undef LIBEXECDIR
675 #undef SBINDIR])
677 if false; then
678         # hack to shut up automake
679         LIBOBJS="$LIBOBJS make-print-version.o"
681 LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/\.lo/g'`
682 AC_SUBST(LTLIBOBJS)
683 AC_CONFIG_FILES(Makefile                \
684         include/Makefile                \
685         include/kadm5/Makefile          \
686         lib/Makefile                    \
687         lib/45/Makefile                 \
688         lib/auth/Makefile               \
689         lib/auth/afskauthlib/Makefile   \
690         lib/auth/pam/Makefile           \
691         lib/auth/sia/Makefile           \
692         lib/asn1/Makefile               \
693         lib/com_err/Makefile            \
694         lib/des/Makefile                \
695         lib/editline/Makefile           \
696         lib/gssapi/Makefile             \
697         lib/hdb/Makefile                \
698         lib/kadm5/Makefile              \
699         lib/kafs/Makefile               \
700         lib/kdfs/Makefile               \
701         lib/krb5/Makefile               \
702         lib/otp/Makefile                \
703         lib/roken/Makefile              \
704         lib/sl/Makefile                 \
705         lib/vers/Makefile               \
706         kuser/Makefile                  \
707         kpasswd/Makefile                \
708         kadmin/Makefile                 \
709         admin/Makefile                  \
710         kdc/Makefile                    \
711         appl/Makefile                   \
712         appl/afsutil/Makefile           \
713         appl/ftp/Makefile               \
714         appl/ftp/common/Makefile        \
715         appl/ftp/ftp/Makefile           \
716         appl/ftp/ftpd/Makefile          \
717         appl/kx/Makefile                \
718         appl/login/Makefile             \
719         appl/otp/Makefile               \
720         appl/popper/Makefile            \
721         appl/push/Makefile              \
722         appl/rsh/Makefile               \
723         appl/rcp/Makefile               \
724         appl/su/Makefile                \
725         appl/xnlock/Makefile            \
726         appl/telnet/Makefile            \
727         appl/telnet/libtelnet/Makefile  \
728         appl/telnet/telnet/Makefile     \
729         appl/telnet/telnetd/Makefile    \
730         appl/test/Makefile              \
731         appl/kf/Makefile                \
732         appl/dceutils/Makefile          \
733         doc/Makefile                    \
734         tools/Makefile                  \
737 AC_OUTPUT
740 dnl This is the release version name-number[beta]
742 HEIMDALVERSION="$PACKAGE-$VERSION"
744 cat > include/newversion.h.in <<EOF
745 const char *heimdal_long_version = "@(#)\$Version: $HEIMDALVERSION by @USER@ on @HOST@ ($host) @DATE@ \$";
746 const char *heimdal_version = "$HEIMDALVERSION";
749 if test -f include/version.h && cmp -s include/newversion.h.in include/version.h.in; then
750         echo "include/version.h is unchanged"
751         rm -f include/newversion.h.in
752 else
753         echo "creating include/version.h"
754         User=${USER-${LOGNAME}}
755         Host=`(hostname || uname -n || echo unknown) 2>/dev/null | sed 1q`
756         Date=`date`
757         mv -f include/newversion.h.in include/version.h.in
758         sed -e "s/@USER@/$User/" -e "s/@HOST@/$Host/" -e "s/@DATE@/$Date/" include/version.h.in > include/version.h