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