Use labs(rand()) instead of abs(rand()) in tommath
[heimdal.git] / configure.ac
blob793196a286f9046e979820132b612e844d1734a7
1 dnl Process this file with autoconf to produce a configure script.
2 AC_REVISION($Revision$)
3 AC_PREREQ(2.62)
4 test -z "$CFLAGS" && CFLAGS="-g"
5 AC_INIT([Heimdal],[7.99.1],[https://github.com/heimdal/heimdal/issues])
6 AC_CONFIG_SRCDIR([kuser/kinit.c])
7 AC_CONFIG_HEADERS(include/config.h)
8 AC_CONFIG_MACRO_DIR([cf])
10 srcdir=`cd "$srcdir" && pwd || echo "$srcdir"`
12 AM_INIT_AUTOMAKE([foreign 1.11])
13 AM_MAINTAINER_MODE
15 LT_PREREQ([2.2])
16 LT_INIT([shared static win32-dll])
19 dnl Checks for programs.
20 AC_PROG_CC
21 AM_PROG_CC_C_O
22 AC_PROG_CPP
24 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
26 AC_PREFIX_DEFAULT(/usr/heimdal)
28 test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc'
29 test "$localstatedir" = '${prefix}/var' && localstatedir='/var/heimdal'
31 AC_CANONICAL_HOST
32 CANONICAL_HOST=$host
33 AC_SUBST(CANONICAL_HOST)
35 rk_SYS_LARGEFILE
37 rk_AIX
38 rk_IRIX
39 rk_SUNOS
41 dnl
42 dnl this is needed to run the configure tests against glibc
43 dnl
44 AC_DEFINE([_GNU_SOURCE], 1,
45         [Define to enable extensions on glibc-based systems such as Linux.])
47 AC_OBJEXT
48 AC_EXEEXT
50 dnl
51 dnl this is needed when der-protos.h or der-private.h has to be generated
52 dnl
53 if ! test -f "$srcdir/lib/asn1/der-protos.h" ||
54    ! test -f "$srcdir/lib/asn1/der-private.h"; then
55     AC_KRB_PROG_PERL
56     AC_KRB_PERL_MOD(Getopt::Std)
57     AC_KRB_PERL_MOD(File::Compare)
58     AC_KRB_PERL_MOD(JSON)
61 dnl AC_KRB_PROG_YACC
62 AC_PROG_YACC
63 AM_PROG_LEX
64 dnl AC_PROG_RANLIB
65 AC_PROG_AWK
66 AC_KRB_PROG_LN_S
68 AC_MIPS_ABI
69 CC="$CC $abi"
70 libdir="$libdir$abilibdirext"
72 AC_C___ATTRIBUTE__
74 AM_CONDITIONAL(ENABLE_SHARED, test "$enable_shared" = "yes")
75 rk_VERSIONSCRIPT
77 dnl
78 dnl Helper bits for cross compiling
79 dnl
83 AM_CONDITIONAL(CROSS_COMPILE, test "${cross_compiling}" = yes)
85 AC_ARG_WITH(cross-tools,
86         AS_HELP_STRING([--with-cross-tools=dir], [use cross tools in dir]),
87         [if test "$withval" = "yes"; then
88                 AC_MSG_ERROR([Need path to cross tools])
89         fi
90         with_cross_tools="${with_cross_tools}/"
91         ])
93 if test "${cross_compiling}" != yes ; then
95    ASN1_COMPILE="\$(top_builddir)/lib/asn1/asn1_compile\$(EXEEXT)"
96    SLC="\$(top_builddir)/lib/sl/slc"
98    ASN1_COMPILE_DEP="\$(ASN1_COMPILE)"
99    SLC_DEP="\$(SLC)"
100 else
101    ASN1_COMPILE="${with_cross_tools}asn1_compile"
102    SLC="${with_cross_tools}slc"
104    ASN1_COMPILE_DEP=
105    SLC_DEP=
107    ac_cv_prog_COMPILE_ET=${with_cross_tools}compile_et
111 AC_SUBST([ASN1_COMPILE])
112 AC_SUBST([ASN1_COMPILE_DEP])
113 AC_SUBST([SLC])
114 AC_SUBST([SLC_DEP])
116 dnl ---
118 AC_DEFINE(HEIM_WEAK_CRYPTO, 1, [Define if you want support for weak crypto])
120 rk_TEST_PACKAGE(openldap,
121 [#include <lber.h>
122 #include <ldap.h>],
123 [-lldap -llber],,,OPENLDAP)
125 AC_ARG_ENABLE(hdb-openldap-module, 
126         AS_HELP_STRING([--enable-hdb-openldap-module],
127                 [if you want support to build openldap hdb as shared object]))
128 if test "$enable_hdb_openldap_module" = yes -a "$with_openldap" = yes; then
129     AC_DEFINE(OPENLDAP_MODULE, 1, [Define if you want support for hdb ldap module])
131 AM_CONDITIONAL(OPENLDAP_MODULE, test "$enable_hdb_openldap_module" = yes -a "$with_openldap" = yes)
134 dnl Optional modules, pk-init, digest, kx509
137 AC_ARG_ENABLE(pk-init, 
138         AS_HELP_STRING([--disable-pk-init],
139                 [if you want disable to PK-INIT support]))
140 if test "$enable_pk_init" != no ;then
141         AC_DEFINE([PKINIT], 1, [Define to enable PKINIT.])
143 AM_CONDITIONAL(PKINIT, test "$enable_pk_init" != no)
145 AC_ARG_ENABLE(digest, 
146         AS_HELP_STRING([--disable-digest],
147                 [if you want disable to DIGEST support]))
148 if test "$enable_digest" != no ;then
149         AC_DEFINE([DIGEST], 1, [Define to enable DIGEST.])
152 AC_ARG_ENABLE(kx509, 
153         AS_HELP_STRING([--disable-kx509],
154                 [if you want disable to kx509 support]))
155 if test "$enable_kx509" != no ;then
156         AC_DEFINE([KX509], 1, [Define to enable kx509.])
159 dnl Need to test if pkg-config exists
160 PKG_PROG_PKG_CONFIG
162 dnl libcap-ng
163 AC_ARG_WITH([capng],
164   AC_HELP_STRING([--with-capng], [use libcap-ng to drop KDC privileges @<:@default=check@:>@]),
165   [],
166   [with_capng=check])
167 if test "$with_capng" != "no"; then
168   PKG_CHECK_MODULES([CAPNG], [libcap-ng >= 0.4.0],
169                     [with_capng=yes],[with_capng=no])
171 if test "$with_capng" = "yes"; then
172   AC_DEFINE_UNQUOTED([HAVE_CAPNG], 1, [whether capng is available for privilege reduction])
174 AM_CONDITIONAL([HAVE_CAPNG], [test "$with_capng" != "no"])
175 AC_SUBST([CAPNG_CFLAGS])
176 AC_SUBST([CAPNG_LIBS])
178 dnl Check for sqlite
179 rk_TEST_PACKAGE(sqlite3,
180 [#include <sqlite3.h>
181 #ifndef SQLITE_OPEN_CREATE
182 #error "old version"
183 #endif],
184 [-lsqlite3],,,SQLITE3)
186 if test "X$with_sqlite3" != Xyes ; then
187    INCLUDE_sqlite3="-I\$(top_srcdir)/lib/sqlite"
188    LIB_sqlite3="\$(top_builddir)/lib/sqlite/libheimsqlite.la"
190 AM_CONDITIONAL(SQLITE3,  test "X$with_sqlite3" = Xyes)
192 AC_DEFINE(HAVE_SQLITE3, 1, [Define if you want support for sqlite in Heimdal.])
194 AC_ARG_ENABLE(sqlite-cache, 
195         AS_HELP_STRING([--disable-sqlite-cache],[if you want support for cache in sqlite]))
196 if test "$enable_sqlite_cache" != no; then
197     AC_DEFINE(HAVE_SCC, 1, [Define if you want support for cache in sqlite.])
199 AM_CONDITIONAL(have_scc, test "$enable_sqlite_cache" != no)
202 dnl check for libintl
203 rk_TEST_PACKAGE(libintl,
204 [#include <libintl.h>],
205 [-lintl],,,LIBINTL)
207 dnl path where the hdb directory is stored
208 AC_ARG_WITH([hdbdir], 
209         [AS_HELP_STRING([--with-hdbdir],[Default location for KDC database @<:@default=/var/heimdal@:>@])],
210         [],
211         [with_hdbdir=/var/heimdal])
212 DIR_hdbdir="$with_hdbdir"
213 AC_SUBST([DIR_hdbdir])
216 AM_CONDITIONAL(KRB5, true)
217 AM_CONDITIONAL(do_roken_rename, true)
219 AC_DEFINE(SUPPORT_INETD, 1, [Enable use of inetd style startup.])dnl
222 AC_DEFINE(KRB5, 1, [Enable Kerberos 5 support in applications.])dnl
223 AC_SUBST(LIB_kdb)dnl
225 KRB_CRYPTO
227 KRB_PTHREADS
229 AC_ARG_ENABLE(dce, 
230         AS_HELP_STRING([--enable-dce],[if you want support for DCE/DFS PAG's]))
231 if test "$enable_dce" = yes; then
232     AC_DEFINE(DCE, 1, [Define if you want support for DCE/DFS PAG's.])
234 AM_CONDITIONAL(DCE, test "$enable_dce" = yes)
236 ## XXX quite horrible:
237 if test -f /etc/ibmcxx.cfg; then
238         dpagaix_ldadd=`sed -n '/^xlc_r4/,/^$/p' /etc/ibmcxx.cfg | sed -n -e '/libraries/{;s/^[[^=]]*=\(.*\)/\1/;s/,/ /gp;}'`
239         dpagaix_cflags=`sed -n '/^xlc_r4/,/^$/p' /etc/ibmcxx.cfg | sed -n -e '/options/{;s/^[[^=]]*=\(.*\)/\1/;s/-q[^,]*//;s/,/ /gp;}'`
240         dpagaix_ldflags=
241 else
242         dpagaix_cflags="-D_THREAD_SAFE -D_AIX_PTHREADS_D7 -D_AIX32_THREADS=1 -D_AES_SOURCE -D_AIX41 -I/usr/include/dce"
243         dpagaix_ldadd="-L/usr/lib/threads -ldcelibc_r -ldcepthreads -lpthreads_compat lpthreads -lc_r"
244         dpagaix_ldflags="-Wl,-bI:dfspag.exp"
246 AC_SUBST(dpagaix_cflags)
247 AC_SUBST(dpagaix_ldadd)
248 AC_SUBST(dpagaix_ldflags)
250 AC_ARG_ENABLE([afs-support],
251         AS_HELP_STRING([--disable-afs-support],[if you don't want support for AFS]))
252 if test "$enable_afs_support" = no; then
253         AC_DEFINE(NO_AFS, 1, [Define if you don't wan't support for AFS.])
254         NO_AFS="1"
256 AC_SUBST(NO_AFS)dnl
257 AM_CONDITIONAL(NO_AFS, test "$enable_afs_support" = no)
259 rk_DB
261 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])
263 rk_ROKEN(lib/roken)
264 LIBADD_roken="$LIB_roken"
265 AC_SUBST(LIBADD_roken)dnl
266 LIB_roken="\$(top_builddir)/lib/vers/libvers.la $LIB_roken"
268 rk_OTP
270 rk_LIBDISPATCH
272 AC_CHECK_OSFC2
274 AC_ARG_ENABLE(mmap,
275         AS_HELP_STRING([--disable-mmap],[disable use of mmap]))
276 if test "$enable_mmap" = "no"; then
277         AC_DEFINE(NO_MMAP, 1, [Define if you don't want to use mmap.])
280 AC_ARG_ENABLE(afs-string-to-key,
281         AS_HELP_STRING([--disable-afs-string-to-key],
282         [disable use of weak AFS string-to-key functions]),
283         [], [enable_afs_string_to_key=yes])
285 if test "$enable_afs_string_to_key" = "yes"; then
286         AC_DEFINE(ENABLE_AFS_STRING_TO_KEY, 1, [Define if want to use the weak AFS string to key functions.])
287         ENABLE_AFS_STRING_TO_KEY=1
289 AC_SUBST(ENABLE_AFS_STRING_TO_KEY)dnl
292 rk_CHECK_MAN
294 rk_TEST_PACKAGE(readline,
295 [#include <stdio.h>
296 #if defined(HAVE_READLINE_READLINE_H)
297 #include <readline/readline.h>
298 #elif defined(HAVE_READLINE_H)
299 #include <readline.h>
300 #endif
301 ],-lreadline,,, READLINE,, [readline.h readline/readline.h])
303 rk_TEST_PACKAGE(libedit,
304 [#include <stdio.h>
305 #if defined(HAVE_READLINE_READLINE_H)
306 #include <readline/readline.h>
307 #elif defined(HAVE_READLINE_H)
308 #include <readline.h>
309 #elif defined(HAVE_EDITLINE_READLINE_H)
310 #include <editline/readline.h>
311 #endif
312 ],-ledit,,, READLINE,, [readline.h readline/readline.h editline/readline.h])
314 AC_CONFIG_SUBDIRS([lib/libedit])
316 KRB_C_BIGENDIAN
317 AC_C_INLINE
319 dnl AM_C_PROTOTYPES
321 dnl Checks for typedefs, structures, and compiler characteristics.
322 AC_C_CONST
323 AC_TYPE_OFF_T
324 AC_CHECK_TYPE_EXTRA(mode_t, unsigned short, [])
325 AC_CHECK_TYPE_EXTRA(sig_atomic_t, int, [#include <signal.h>])
326 AC_HAVE_TYPE([long long])
327 AC_HEADER_TIME
328 AC_STRUCT_TM
330 dnl Checks for header files.
331 AC_HEADER_STDC
333 AC_CHECK_HEADERS([\
334         CommonCrypto/CommonDigest.h             \
335         CommonCrypto/CommonCryptor.h            \
336         arpa/telnet.h                           \
337         bind/bitypes.h                          \
338         bsdsetjmp.h                             \
339         curses.h                                \
340         dlfcn.h                                 \
341         execinfo.h                              \
342         fnmatch.h                               \
343         inttypes.h                              \
344         io.h                                    \
345         libutil.h                               \
346         limits.h                                \
347         maillock.h                              \
348         netgroup.h                              \
349         netinet/in6_machtypes.h                 \
350         pthread.h                               \
351         pty.h                                   \
352         sac.h                                   \
353         sgtty.h                                 \
354         siad.h                                  \
355         signal.h                                \
356         strings.h                               \
357         stropts.h                               \
358         sys/bitypes.h                           \
359         sys/category.h                          \
360         sys/file.h                              \
361         sys/filio.h                             \
362         sys/ioccom.h                            \
363         sys/mman.h                              \
364         sys/param.h                             \
365         sys/pty.h                               \
366         sys/ptyio.h                             \
367         sys/select.h                            \
368         sys/socket.h                            \
369         sys/str_tty.h                           \
370         sys/stream.h                            \
371         sys/stropts.h                           \
372         sys/syscall.h                           \
373         sys/termio.h                            \
374         sys/timeb.h                             \
375         sys/times.h                             \
376         sys/types.h                             \
377         sys/un.h                                \
378         locale.h                                \
379         termcap.h                               \
380         termio.h                                \
381         termios.h                               \
382         time.h                                  \
383         tmpdir.h                                \
384         udb.h                                   \
385         util.h                                  \
388 dnl On Solaris 8 there's a compilation warning for term.h because
389 dnl it doesn't define `bool'.
390 AC_CHECK_HEADERS(term.h, , , -)
392 dnl aix have asl.h (A/IX screen library) that we don't want
393 AC_CHECK_HEADERS(asl.h, , , [
394 #include <asl.h>
395 #ifndef ASL_STRING_EMERG
396 #error ASL_STRING_EMERG missing
397 #endif])
399 AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT
400 #if HAVE_SYS_SOCKET_H
401 #include <sys/socket.h>
402 #endif])
404 AC_CHECK_HEADERS(sys/ptyvar.h, , , [AC_INCLUDES_DEFAULT
405 #if HAVE_SYS_TTY_H
406 #include <sys/tty.h>
407 #endif])
409 AC_CHECK_HEADERS(sys/strtty.h, , , [AC_INCLUDES_DEFAULT
410 #if HAVE_TERMIOS_H
411 #include <termios.h>
412 #endif
413 #if HAVE_SYS_STREAM_H
414 #include <sys/stream.h>
415 #endif])
417 AC_CHECK_HEADERS(sys/ucred.h, , , [AC_INCLUDES_DEFAULT
418 #if HAVE_SYS_TYPES_H
419 #include <sys/types.h>
420 #endif
421 #if HAVE_SYS_PARAM_H
422 #include <sys/param.h>
423 #endif])
425 AC_CHECK_HEADERS(security/pam_modules.h, , , [AC_INCLUDES_DEFAULT
426 #include <security/pam_appl.h>
429 dnl export symbols
430 rk_WIN32_EXPORT(BUILD_KRB5_LIB, KRB5_LIB)
431 rk_WIN32_EXPORT(BUILD_ROKEN_LIB, ROKEN_LIB)
432 rk_WIN32_EXPORT(BUILD_GSSAPI_LIB, GSSAPI_LIB)
434 dnl Checks for libraries.
436 AC_FIND_FUNC_NO_LIBS(logwtmp, util,[
437 #ifdef HAVE_UTIL_H
438 #include <util.h>
439 #endif
440 ],[0,0,0])
441 AC_FIND_FUNC_NO_LIBS(logout, util,[
442 #ifdef HAVE_UTIL_H
443 #include <util.h>
444 #endif
445 ],[0])
446 AC_FIND_FUNC_NO_LIBS(openpty, util,[
447 #ifdef HAVE_UTIL_H
448 #include <util.h>
449 #endif
450 ],[0,0,0,0,0])
452 AC_FIND_FUNC_NO_LIBS(tgetent, termcap ncurses curses,[
453 #ifdef HAVE_TERMCAP_H
454 #include <termcap.h>
455 #endif
456 #ifdef HAVE_CURSES_H
457 #include <curses.h>
458 #endif
459 ],[0,0])
461 dnl Checks for library functions.
463 AC_CHECK_FUNCS([                                \
464         _getpty                                 \
465         _scrsize                                \
466         arc4random                              \
467         backtrace                               \
468         fcntl                                   \
469         fork                                    \
470         getpeereid                              \
471         getpeerucred                            \
472         grantpt                                 \
473         kill                                    \
474         mktime                                  \
475         ptsname                                 \
476         rand                                    \
477         revoke                                  \
478         select                                  \
479         setitimer                               \
480         setpcred                                \
481         setpgid                                 \
482         setproctitle                            \
483         setregid                                \
484         setresgid                               \
485         setresuid                               \
486         setreuid                                \
487         setsid                                  \
488         setutent                                \
489         sigaction                               \
490         strstr                                  \
491         ttyname                                 \
492         ttyslot                                 \
493         umask                                   \
494         unlockpt                                \
495         vhangup                                 \
496         waitpid                                 \
497         yp_get_default_domain                   \
500 AC_MSG_CHECKING([checking for __sync_add_and_fetch])
501 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>]],
502         [[unsigned int foo, bar; bar = __sync_add_and_fetch(&foo, 1);]])],
503         [ac_rk_have___sync_add_and_fetch=yes], [ac_rk_have___sync_add_and_fetch=no])
504 if test "$ac_rk_have___sync_add_and_fetch" = "yes" ; then
505         AC_DEFINE_UNQUOTED(HAVE___SYNC_ADD_AND_FETCH, 1, [have __sync_add_and_fetch])
507 AC_MSG_RESULT($ac_rk_have___sync_add_and_fetch)
509 AC_FUNC_MMAP
511 KRB_CAPABILITIES
512 rk_DLADDR
514 AC_CHECK_GETPWNAM_R_POSIX
516 dnl detect doors on solaris
517 if test "$enable_pthread_support" != no; then
518    saved_LIBS="$LIBS"
519    LIBS="$LIBS $PTHREADS_LIBS"
520    AC_FIND_FUNC_NO_LIBS(door_create, door)
521    LIBS="$saved_LIBS"
524 AC_ARG_ENABLE(kcm,
525         AS_HELP_STRING([--enable-kcm],[enable Kerberos Credentials Manager]),
526 ,[enable_kcm=yes])
528 if test "$enable_kcm" = yes ; then
529    if test  "$ac_cv_header_sys_un_h" != yes -a "$ac_cv_funclib_door_create" != yes ; then
530         enable_kcm=no
531    fi
533 if test "$enable_kcm" = yes; then
534        AC_DEFINE(HAVE_KCM, 1,
535                [Define if you want to use the Kerberos Credentials Manager.])
537 AM_CONDITIONAL(KCM, test "$enable_kcm" = yes)
541 dnl Cray stuff
542 AC_CHECK_FUNCS(getudbnam setlim)
544 dnl AC_KRB_FUNC_GETCWD_BROKEN
546 AC_CHECK_TYPES([int8_t, int16_t, int32_t, int64_t, 
547         u_int8_t, u_int16_t, u_int32_t, u_int64_t,
548         uint8_t, uint16_t, uint32_t, uint64_t],,,[
549 #ifdef HAVE_INTTYPES_H
550 #include <inttypes.h>
551 #endif
552 #ifdef HAVE_SYS_TYPES_H
553 #include <sys/types.h>
554 #endif
555 #ifdef HAVE_SYS_BITYPES_H
556 #include <sys/bitypes.h>
557 #endif
558 #ifdef HAVE_BIND_BITYPES_H
559 #include <bind/bitypes.h>
560 #endif
561 #ifdef HAVE_NETINET_IN6_MACHTYPES_H
562 #include <netinet/in6_machtypes.h>
563 #endif
566 rk_FRAMEWORK_SECURITY
568 KRB_READLINE
570 rk_TELNET
572 dnl Some operating systems already have com_err and compile_et
573 CHECK_COMPILE_ET
575 rk_AUTH_MODULES([sia afskauthlib])
577 rk_DESTDIRS
579 rk_WFLAGS([-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs])
582 AH_BOTTOM([#ifdef __APPLE__
583 #include <AvailabilityMacros.h>
584 #endif])
586 AH_BOTTOM([#ifdef ROKEN_RENAME
587 #include "roken_rename.h"
588 #endif])
590 AC_ARG_ENABLE(heimdal-documentation,
591         AS_HELP_STRING([--disable-heimdal-documentation],
592                 [if you want disable to heimdal documentation]))
593 AM_CONDITIONAL(HEIMDAL_DOCUMENTATION, test "$enable_heimdal_documentation" != no)
595 AC_CONFIG_FILES(Makefile                \
596         etc/Makefile                    \
597         include/Makefile                \
598         include/gssapi/Makefile         \
599         include/hcrypto/Makefile        \
600         include/kadm5/Makefile          \
601         lib/Makefile                    \
602         lib/base/Makefile                       \
603         lib/asn1/Makefile               \
604         lib/com_err/Makefile            \
605         lib/hcrypto/Makefile            \
606         lib/hx509/Makefile              \
607         lib/gssapi/Makefile             \
608         lib/ntlm/Makefile               \
609         lib/hdb/Makefile                \
610         lib/ipc/Makefile                \
611         lib/kadm5/Makefile              \
612         lib/kafs/Makefile               \
613         lib/kdfs/Makefile               \
614         lib/krb5/Makefile               \
615         lib/otp/Makefile                \
616         lib/roken/Makefile              \
617         lib/sl/Makefile                 \
618         lib/sqlite/Makefile             \
619         lib/vers/Makefile               \
620         lib/wind/Makefile               \
621         po/Makefile                     \
622         kuser/Makefile                  \
623         kpasswd/Makefile                \
624         kadmin/Makefile                 \
625         admin/Makefile                  \
626         kcm/Makefile                    \
627         kdc/Makefile                    \
628         appl/Makefile                   \
629         appl/afsutil/Makefile           \
630         appl/dbutils/Makefile           \
631         appl/gssmask/Makefile           \
632         appl/otp/Makefile               \
633         appl/su/Makefile                \
634         appl/test/Makefile              \
635         appl/kf/Makefile                \
636         appl/dceutils/Makefile          \
637         tests/Makefile                  \
638         tests/bin/Makefile              \
639         tests/can/Makefile              \
640         tests/db/Makefile               \
641         tests/kdc/Makefile              \
642         tests/ldap/Makefile             \
643         tests/gss/Makefile              \
644         tests/java/Makefile             \
645         tests/plugin/Makefile           \
646         packages/Makefile               \
647         packages/mac/Makefile           \
648         doc/Makefile                    \
649         tools/Makefile                  \
652 AC_OUTPUT
655 dnl This is the release version name-number[beta]
658 cat > include/newversion.h.in <<EOF
659 #ifndef VERSION_HIDDEN
660 #define VERSION_HIDDEN
661 #endif
662 VERSION_HIDDEN const char *heimdal_long_version = "@([#])\$Version: $PACKAGE_STRING by @USER@ on @HOST@ ($host) @DATE@ \$";
663 VERSION_HIDDEN const char *heimdal_version = "AC_PACKAGE_STRING";
666 if test -f include/version.h && cmp -s include/newversion.h.in include/version.h.in; then
667         echo "include/version.h is unchanged"
668         rm -f include/newversion.h.in
669 else
670         echo "creating include/version.h"
671         User=${USER-${LOGNAME}}
672         Host=`(hostname || uname -n || echo unknown) 2>/dev/null | sed 1q`
673         Date=`date`
674         mv -f include/newversion.h.in include/version.h.in
675         sed -e "s/@USER@/$User/" -e "s/@HOST@/$Host/" -e "s/@DATE@/$Date/" include/version.h.in > include/version.h