
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3394 ec53bebd-3082-4978-b11e-865c3cabbd6b
432 lines
10 KiB
Plaintext
432 lines
10 KiB
Plaintext
dnl Process this file with autoconf to produce a configure script.
|
|
AC_REVISION($Revision$)
|
|
AC_INIT(lib/krb5/send_to_kdc.c)
|
|
AM_CONFIG_HEADER(include/config.h)
|
|
|
|
AM_INIT_AUTOMAKE(heimdal,0.0g)
|
|
|
|
AC_PREFIX_DEFAULT(/usr/heimdal)
|
|
|
|
AC_CANONICAL_HOST
|
|
CANONICAL_HOST=$host
|
|
AC_SUBST(CANONICAL_HOST)
|
|
|
|
case "$host" in
|
|
*-*-sunos4*)
|
|
AC_DEFINE(SunOS, 4)
|
|
;;
|
|
esac
|
|
|
|
dnl Checks for programs.
|
|
AC_PROG_CC
|
|
|
|
dnl AC_KRB_PROG_YACC
|
|
AC_PROG_YACC
|
|
AC_PROG_LEX
|
|
AC_PROG_RANLIB
|
|
AC_PROG_AWK
|
|
AC_KRB_PROG_LN_S
|
|
|
|
if test "$GCC" = "yes"; then
|
|
WFLAGS="-Wall -Wno-unused -Wmissing-prototypes"
|
|
fi
|
|
AC_SUBST(WFLAGS)
|
|
CFLAGS="-g"
|
|
|
|
berkeley_db=db
|
|
AC_ARG_WITH(berkeley-db,
|
|
[ --without-berkeley-db if you don't want berkeley db],[
|
|
if test "$withval" = no; then
|
|
berkeley_db=""
|
|
fi
|
|
])
|
|
|
|
AC_TEST_PACKAGE(krb4,krb.h,libkrb.a,-lkrb)
|
|
|
|
if test "$with_krb4"; then
|
|
AC_DEFINE(KRB4, 1)
|
|
LIB_krb4="$KRB4LIB -ldes"
|
|
INCLUDE_krb4="$KRB4INCLUDE"
|
|
EXTRA_LIB45=lib45.a
|
|
AC_SUBST(EXTRA_LIB45)
|
|
fi
|
|
AM_CONDITIONAL(KRB4, test "$with_krb4")
|
|
AC_SUBST(LIB_krb4)
|
|
AC_SUBST(INCLUDE_krb4)
|
|
|
|
AC_ARG_ENABLE(kaserver,
|
|
[ --enable-kaserver if you want the KDC to try to emulate a kaserver],
|
|
[
|
|
if test "$enableval" != no; then
|
|
AC_DEFINE(KASERVER, 1)
|
|
if test "x$with_krb4" = "x"; then
|
|
AC_MSG_ERROR(kaserver requires krb4)
|
|
exit 1
|
|
fi
|
|
fi
|
|
])
|
|
|
|
AC_PATH_PROG(NROFF, nroff)
|
|
AC_PATH_PROG(GROFF, groff)
|
|
AC_CACHE_CHECK(how to format man pages,ac_cv_sys_man_format,
|
|
[cat > conftest.1 << END
|
|
.Dd January 1, 1970
|
|
.Dt CONFTEST 1
|
|
.Sh NAME
|
|
.Nm conftest
|
|
.Nd
|
|
foobar
|
|
END
|
|
|
|
if test "$NROFF" ; then
|
|
for i in "-mdoc" "-mandoc"; do
|
|
if "$NROFF" $i conftest.1 2> /dev/null | \
|
|
grep Jan > /dev/null 2>&1 ; then
|
|
ac_cv_sys_man_format="$NROFF $i"
|
|
break
|
|
fi
|
|
done
|
|
fi
|
|
if test "$ac_cv_sys_man_format" = "" -a "$GROFF" ; then
|
|
for i in "-mdoc" "-mandoc"; do
|
|
if "$GROFF" -Tascii $i conftest.1 2> /dev/null | \
|
|
grep Jan > /dev/null 2>&1 ; then
|
|
ac_cv_sys_man_format="$GROFF -Tascii $i"
|
|
break
|
|
fi
|
|
done
|
|
fi
|
|
if test "$ac_cv_sys_man_format"; then
|
|
ac_cv_sys_man_format="$ac_cv_sys_man_format \$< > \$@"
|
|
fi
|
|
])
|
|
if test "$ac_cv_sys_man_format"; then
|
|
CATMAN="$ac_cv_sys_man_format"
|
|
AC_SUBST(CATMAN)
|
|
fi
|
|
AM_CONDITIONAL(CATMAN, test "$CATMAN")
|
|
AC_CACHE_CHECK(extension of pre-formatted manual pages,ac_cv_sys_catman_ext,
|
|
if grep _suffix /etc/man.conf > /dev/null 2>&1; then
|
|
ac_cv_sys_catman_ext=0
|
|
else
|
|
ac_cv_sys_catman_ext=number
|
|
fi
|
|
)
|
|
if test "$ac_cv_sys_catman_ext" = number; then
|
|
CATMANEXT='$$section'
|
|
else
|
|
CATMANEXT=0
|
|
fi
|
|
AC_SUBST(CATMANEXT)
|
|
|
|
AC_TEST_PACKAGE(readline,readline.h,libreadline.a,-lreadline)
|
|
|
|
AC_C_BIGENDIAN
|
|
AC_C_INLINE
|
|
|
|
dnl AM_C_PROTOTYPES
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
AC_C_CONST
|
|
AC_TYPE_OFF_T
|
|
AC_TYPE_SIZE_T
|
|
AC_TYPE_MODE_T
|
|
AC_HEADER_TIME
|
|
AC_STRUCT_TM
|
|
AC_DECL_YYTEXT
|
|
|
|
dnl Checks for header files.
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS(arpa/inet.h arpa/telnet.h bsdsetjmp.h crypt.h)
|
|
AC_CHECK_HEADERS(curses.h db.h dbm.h dirent.h err.h errno.h)
|
|
AC_CHECK_HEADERS(fcntl.h grp.h inttypes.h limits.h ndbm.h net/if.h netdb.h)
|
|
AC_CHECK_HEADERS(netinet/in.h netinet/in6.h)
|
|
AC_CHECK_HEADERS(netinet/in6_machtypes.h netinet/in_systm.h)
|
|
AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinfo/ni.h paths.h pty.h pwd.h)
|
|
AC_CHECK_HEADERS(rpcsvc/dbm.h sac.h sgtty.h shadow.h signal.h stropts.h)
|
|
AC_CHECK_HEADERS(sys/bitypes.h sys/file.h sys/filio.h sys/ioctl.h)
|
|
AC_CHECK_HEADERS(sys/param.h sys/proc.h sys/pty.h sys/ptyio.h)
|
|
AC_CHECK_HEADERS(sys/ptyvar.h sys/resource.h sys/select.h)
|
|
AC_CHECK_HEADERS(sys/socket.h sys/sockio.h sys/stat.h sys/stream.h)
|
|
AC_CHECK_HEADERS(sys/stropts.h sys/sysctl.h sys/time.h sys/timeb.h)
|
|
AC_CHECK_HEADERS(sys/times.h sys/tty.h sys/types.h sys/uio.h)
|
|
AC_CHECK_HEADERS(sys/utsname.h sys/wait.h syslog.h termio.h)
|
|
AC_CHECK_HEADERS(termios.h tmpdir.h unistd.h util.h utmp.h utmpx.h)
|
|
|
|
if test "$ac_cv_header_err_h" = no; then
|
|
EXTRA_HDRS="$EXTRA_HDRS err.h"
|
|
AC_SUBST(EXTRA_HDRS)
|
|
fi
|
|
|
|
dnl Checks for libraries.
|
|
|
|
AC_FIND_FUNC(socket, socket)
|
|
AC_FIND_FUNC(gethostbyname, nsl)
|
|
AC_FIND_FUNC(dbopen, $berkeley_db)
|
|
AC_FIND_FUNC(dbm_firstkey, $berkeley_db gdbm ndbm)
|
|
AC_FIND_FUNC(syslog, syslog)
|
|
|
|
AC_FIND_FUNC(logwtmp, util)
|
|
AC_FIND_FUNC_NO_LIBS(tgetent, termcap)
|
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_BROKEN_SNPRINTF
|
|
AC_BROKEN_VSNPRINTF
|
|
|
|
AC_CHECK_FUNCS(_getpty asnprintf asprintf fcntl gethostname)
|
|
AC_CHECK_FUNCS(getmsg grantpt logwtmp mktime ptsname rand random)
|
|
AC_CHECK_FUNCS(revoke select setitimer setlogin setpcred setpgid)
|
|
AC_CHECK_FUNCS(setsid setsockopt sigaction strstr timegm ttyname umask)
|
|
AC_CHECK_FUNCS(unlockpt vasnprintf vasprintf vhangup)
|
|
|
|
AC_TYPE_SIGNAL
|
|
if test "$ac_cv_type_signal" = "void" ; then
|
|
AC_DEFINE(VOID_RETSIGTYPE, 1)
|
|
fi
|
|
AC_SUBST(VOID_RETSIGTYPE)
|
|
|
|
AC_FIND_IF_NOT_BROKEN(hstrerror, resolv,
|
|
[#ifdef HAVE_NETDB_H
|
|
#include <netdb.h>
|
|
#endif],
|
|
17)
|
|
|
|
AC_BROKEN(chown daemon err errx fchown flock getcwd)
|
|
AC_BROKEN(getdtablesize getusershell inet_aton initgroups)
|
|
AC_BROKEN(lstat memmove mkstemp putenv rcmd setegid setenv)
|
|
AC_BROKEN(seteuid strcasecmp strdup strerror strftime)
|
|
AC_BROKEN(strlwr strnlen strsep strtok_r strupr unsetenv)
|
|
AC_BROKEN(verr verrx vsyslog vwarn vwarnx warn warnx)
|
|
|
|
AC_CACHE_CHECK(if realloc if broken, ac_cv_func_realloc_broken, [
|
|
ac_cv_func_realloc_broken=no
|
|
AC_TRY_RUN([
|
|
#include <stddef.h>
|
|
#include <stdlib.h>
|
|
|
|
int main()
|
|
{
|
|
return realloc(NULL, 17) == NULL;
|
|
}
|
|
],:, ac_cv_func_realloc_broken=yes, :)
|
|
])
|
|
if test "$ac_cv_func_realloc_broken" = yes ; then
|
|
AC_DEFINE(BROKEN_REALLOC)
|
|
fi
|
|
|
|
dnl AC_KRB_FUNC_GETCWD_BROKEN
|
|
|
|
dnl
|
|
dnl Checks for prototypes and declarations
|
|
dnl
|
|
|
|
AC_NEED_PROTO([
|
|
#ifdef HAVE_CRYPT_H
|
|
#include <crypt.h>
|
|
#endif
|
|
#ifdef HAVE_UNISTD_H
|
|
#include <unistd.h>
|
|
#endif
|
|
],
|
|
crypt)
|
|
|
|
AC_NEED_PROTO([
|
|
#include <string.h>
|
|
],
|
|
strtok_r)
|
|
|
|
AC_CHECK_VAR([#ifdef HAVE_SYS_TYPES_H
|
|
#include <sys/types.h>
|
|
#endif
|
|
#ifdef HAVE_NETDB_H
|
|
#include <netdb.h>
|
|
#endif],
|
|
h_errno)
|
|
|
|
AC_CHECK_VAR([#ifdef HAVE_NETDB_H
|
|
#include <netdb.h>
|
|
#endif],
|
|
h_errlist)
|
|
|
|
AC_CHECK_VAR([#ifdef HAVE_NETDB_H
|
|
#include <netdb.h>
|
|
#endif],
|
|
h_nerr)
|
|
|
|
AC_CHECK_VAR([#ifdef HAVE_ERR_H
|
|
#include <err.h>
|
|
#endif],[__progname])
|
|
|
|
AC_CHECK_DECLARATION([#include <stdlib.h>], optarg)
|
|
AC_CHECK_DECLARATION([#include <stdlib.h>], optind)
|
|
AC_CHECK_DECLARATION([#include <stdlib.h>], opterr)
|
|
AC_CHECK_DECLARATION([#include <stdlib.h>], optopt)
|
|
|
|
dnl
|
|
dnl Check for fields in struct utmp
|
|
dnl
|
|
AC_EGREP_HEADER(ut_user, utmp.h, AC_DEFINE(HAVE_UT_USER))
|
|
AC_EGREP_HEADER(ut_host, utmp.h, AC_DEFINE(HAVE_UT_HOST))
|
|
AC_EGREP_HEADER(ut_addr, utmp.h, AC_DEFINE(HAVE_UT_ADDR))
|
|
AC_EGREP_HEADER(ut_type, utmp.h, AC_DEFINE(HAVE_UT_TYPE))
|
|
AC_EGREP_HEADER(ut_pid, utmp.h, AC_DEFINE(HAVE_UT_PID))
|
|
AC_EGREP_HEADER(ut_id, utmp.h, AC_DEFINE(HAVE_UT_ID))
|
|
AC_EGREP_HEADER(ut_syslen, utmpx.h, AC_DEFINE(HAVE_UT_SYSLEN))
|
|
|
|
dnl
|
|
dnl Check for struct winsize
|
|
dnl
|
|
|
|
AC_KRB_STRUCT_WINSIZE
|
|
|
|
dnl
|
|
dnl Check for sa_len in struct sockaddr
|
|
dnl
|
|
|
|
AC_KRB_STRUCT_SOCKADDR_SA_LEN
|
|
|
|
dnl
|
|
dnl Check for some common types
|
|
dnl
|
|
|
|
AC_TYPE_PID_T
|
|
AC_TYPE_UID_T
|
|
AC_TYPE_OFF_T
|
|
AC_TYPE_SIZE_T
|
|
AC_CHECK_TYPE(ssize_t, int)
|
|
AC_TYPE_SIG_ATOMIC_T
|
|
|
|
dnl AC_SUBST(LIBOBJS)
|
|
|
|
AC_GROK_TYPES(int8_t int16_t int32_t int64_t)
|
|
AC_GROK_TYPES(u_int8_t u_int16_t u_int32_t u_int64_t)
|
|
|
|
dnl
|
|
dnl Tests for editline
|
|
dnl
|
|
|
|
AC_FIND_FUNC_NO_LIBS(el_init, edit)
|
|
AC_FIND_FUNC_NO_LIBS(readline, readline)
|
|
|
|
if test "$with_readline"; then
|
|
AC_DEFINE(HAVE_READLINE, 1)
|
|
editline_OBJS=
|
|
LIB_readline="$READLINELIB "'$(LIB_tgetent)'
|
|
INCLUDE_readline="$READLINEINCLUDE"
|
|
elif test "$ac_cv_func_el_init" = yes; then
|
|
AC_DEFINE(HAVE_READLINE, 1)
|
|
|
|
editline_OBJS=edit_compat.o
|
|
LIB_readline='-L$(top_builddir)/lib/editline -leditline '"$LIB_el_init"' $(LIB_tgetent)'
|
|
|
|
INCLUDE_readline='-I$(top_builddir)/lib/editline -I$(top_srcdir)/lib/editline'
|
|
elif test "$ac_cv_func_readline" = yes; then
|
|
AC_DEFINE(HAVE_READLINE, 1)
|
|
editline_OBJS=
|
|
LIB_readline='-lreadline $(LIB_tgetent)'
|
|
INCLUDE_readline=
|
|
else
|
|
AC_DEFINE(HAVE_READLINE, 1)
|
|
editline_OBJS="editline.o complete.o sysunix.o"
|
|
LIB_readline='-L$(top_builddir)/lib/editline -leditline $(LIB_tgetent)'
|
|
INCLUDE_readline='-I$(top_builddir)/lib/editline -I$(top_srcdir)/lib/editline'
|
|
fi
|
|
AC_SUBST(LIB_tgetent)
|
|
AC_SUBST(LIB_readline)
|
|
AC_SUBST(INCLUDE_readline)
|
|
AC_SUBST(editline_OBJS)
|
|
|
|
dnl telnet muck --------------------------------------------------
|
|
|
|
AC_DEFINE(AUTHENTICATION)dnl
|
|
AC_DEFINE(KRB5)dnl
|
|
AC_DEFINE(ENCRYPTION)dnl
|
|
AC_DEFINE(DES_ENCRYPTION)dnl
|
|
AC_DEFINE(DIAGNOSTICS)dnl
|
|
AC_DEFINE(OLD_ENVIRON)dnl
|
|
|
|
# Simple test for streamspty, based on the existance of getmsg(), alas
|
|
# this breaks on SunOS4 which have streams but BSD-like ptys
|
|
#
|
|
# And also something wierd has happend with dec-osf1, fallback to bsd-ptys
|
|
|
|
AC_MSG_CHECKING(for streamspty)
|
|
case "`uname -sr`" in
|
|
SunOS\ 4*|OSF1*|IRIX\ 4*|HP-UX\ ?.10.*)
|
|
krb_cv_sys_streamspty=no
|
|
;;
|
|
AIX*)
|
|
os_rel=`uname -v`.`uname -r`
|
|
if expr "$os_rel" : "3*" >/dev/null 2>&1; then
|
|
krb_cv_sys_streamspty=no
|
|
else
|
|
krb_cv_sys_streamspty="$ac_cv_func_getmsg"
|
|
fi
|
|
;;
|
|
*)
|
|
krb_cv_sys_streamspty="$ac_cv_func_getmsg"
|
|
;;
|
|
esac
|
|
if test "$krb_cv_sys_streamspty" = yes; then
|
|
AC_DEFINE(STREAMSPTY)
|
|
fi
|
|
dnl AC_SUBST(STREAMSPTY)
|
|
AC_MSG_RESULT($krb_cv_sys_streamspty)
|
|
|
|
AC_OUTPUT(Makefile \
|
|
include/Makefile \
|
|
lib/Makefile \
|
|
lib/roken/Makefile \
|
|
lib/editline/Makefile \
|
|
lib/sl/Makefile \
|
|
lib/error/Makefile \
|
|
lib/error/compile_et \
|
|
lib/asn1/Makefile \
|
|
lib/des/Makefile \
|
|
lib/krb5/Makefile \
|
|
lib/hdb/Makefile \
|
|
lib/gssapi/Makefile \
|
|
lib/45/Makefile \
|
|
lib/otp/Makefile \
|
|
lib/kafs/Makefile \
|
|
kuser/Makefile \
|
|
kpasswd/Makefile \
|
|
admin/Makefile \
|
|
kdc/Makefile \
|
|
appl/Makefile \
|
|
appl/test/Makefile \
|
|
appl/rsh/Makefile \
|
|
appl/popper/Makefile \
|
|
appl/push/Makefile \
|
|
appl/telnet/Makefile \
|
|
appl/telnet/libtelnet/Makefile \
|
|
appl/telnet/telnet/Makefile \
|
|
appl/telnet/telnetd/Makefile \
|
|
appl/afsutil/Makefile \
|
|
doc/Makefile \
|
|
)
|
|
|
|
dnl
|
|
dnl This is the release version name-number[beta]
|
|
dnl
|
|
HEIMDALVERSION="$PACKAGE-$VERSION"
|
|
|
|
cat > include/newversion.h.in <<EOF
|
|
char *heimdal_long_version = "@(#)\$Version: $HEIMDALVERSION by @USER@ on @HOST@ ($host) @DATE@ \$";
|
|
char *heimdal_version = "$HEIMDALVERSION";
|
|
EOF
|
|
|
|
if test -f include/version.h && cmp -s include/newversion.h.in include/version.h.in; then
|
|
echo "include/version.h is unchanged"
|
|
rm -f include/newversion.h.in
|
|
else
|
|
echo "creating include/version.h"
|
|
User=${USER-${LOGNAME}}
|
|
Host=`(hostname || uname -n) 2>/dev/null | sed 1q`
|
|
Date=`date`
|
|
mv -f include/newversion.h.in include/version.h.in
|
|
sed -e "s/@USER@/$User/" -e "s/@HOST@/$Host/" -e "s/@DATE@/$Date/" include/version.h.in > include/version.h
|
|
fi
|