summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorGravatar Greg Hudson <ghudson@mit.edu>1997-09-23 15:17:41 +0000
committerGravatar Greg Hudson <ghudson@mit.edu>1997-09-23 15:17:41 +0000
commite7d8f097974246d7a4e86840c73e35539644c2c4 (patch)
treee8fd2d54dcbd603d4e0f7ea9cd6f1592adad1c32 /configure.in
parent550d81faeaffab9077f256b651595105723d67b1 (diff)
Use aclocal.m4 for Hesiod and Zephyr.
Rely on config.site for Athena paths. Remove regexp check; we need to bundle a regexp library, probably. Return to old directory structure.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in94
1 files changed, 11 insertions, 83 deletions
diff --git a/configure.in b/configure.in
index 9b12934..905fff5 100644
--- a/configure.in
+++ b/configure.in
@@ -1,66 +1,17 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(server/server.c)
-if test ! -d h; then mkdir h; fi
-if test ! -d h/zephyr; then mkdir h/zephyr; fi
+test -d h || mkdir h
+test -d h/zephyr || mkdir h/zephyr
-dnl Command-line option to enable Athena paths.
-AC_ARG_ENABLE(athena,
- [ --enable-athena Use Athena defaults],
- [hesiod=yes
- kerberos=yes
- if test "${prefix}" = "NONE"; then prefix=/usr/athena; fi
- datadir=${datadir-'$(prefix)/lib/zephyr'}
- confdir=${confdir-'/etc/athena/zephyr'}
- sbindir=${sbindir-'$(exec_prefix)/etc'}
- lsbindir=${lsbindir-'/etc/athena'}
- COMPILE_ET=compile_et
- MK_CMDS=mk_cmds
- CPPFLAGS="${CPPFLAGS} -I/usr/athena/include"
- LDFLAGS="${LDFLAGS} -L/usr/athena/lib"
- INITPROGS=${lsbindir}/zinit],
- [datadir=${datadir-'$(prefix)/share/zephyr'}
- confdir=${confdir-'$(prefix)/etc/zephyr'}
- sbindir=${sbindir-'$(exec_prefix)/sbin'}
- lsbindir=${lsbindir-'$(exec_prefix)/sbin'}
- SUPPORT_LIBS="et ss"
- ET_LDFLAGS='-L$(BUILDTOP)/lib/et'
- ETDEP='$(BUILDTOP)/lib/et/libcom_err.a'
- SS_LDFLAGS='-L$(BUILDTOP)/lib/ss'
- SSDEP='$(BUILDTOP)/lib/ss/libss.a'
- COMPILE_ET='$(BUILDTOP)/lib/et/compile_et'
- MK_CMDS='$(BUILDTOP)/lib/ss/mk_cmds'
- INITPROGS=true
- if test ! -d h/ss; then mkdir h/ss; fi
- cp ${srcdir}/lib/et/com_err.h h
- cp ${srcdir}/lib/ss/*.h h/ss])
-
-AC_SUBST(confdir)
-AC_SUBST(datadir)
-AC_SUBST(sbindir)
+test -z "$lbindir" && lbindir='${bindir}'
+test -z "$lsbindir" && lsbindir='${sbindir}'
+AC_SUBST(lbindir)
AC_SUBST(lsbindir)
-AC_SUBST(SUPPORT_LIBS)
-AC_SUBST(ET_LDFLAGS)
-AC_SUBST(ETDEP)
-AC_SUBST(SS_LDFLAGS)
-AC_SUBST(SSDEP)
-AC_SUBST(COMPILE_ET)
-AC_SUBST(MK_CMDS)
-AC_SUBST(INITPROGS)
AC_CANONICAL_SYSTEM
AC_DEFINE_UNQUOTED(MACHINE_TYPE, "$host")
-dnl Command-line option to enable Hesiod support
-AC_ARG_WITH(hesiod,
- [ --with-hesiod=PREFIX Compile with Hesiod support],
- [hesiod="$withval"], [hesiod=${hesiod-no}])
-
-dnl Command-line option to enable Kerberos support
-AC_ARG_WITH(krb4,
- [ --with-krb4=PREFIX Compile with Kerberos 4 support],
- [kerberos="$withval"], [kerberos=${kerberos-no}])
-
dnl Checks for programs.
AC_PROG_CC
AC_PROG_YACC
@@ -138,34 +89,13 @@ AC_SUBST(TLIB)
AC_SUBST(RLIB)
AC_SUBST(SLIB)
-if test "$hesiod" != "no"; then
- if test "$hesiod" != "yes"; then
- CPPFLAGS="${CPPFLAGS} -I${hesiod}/include"
- LDFLAGS="${LDFLAGS} -L${hesiod}/lib"
- fi
- AC_DEFINE(ZEPHYR_USES_HESIOD)
- AC_CHECK_LIB(hesiod, hes_resolve, LIBS="-lhesiod ${LIBS}",
- [AC_CHECK_FUNC(hes_resolve),,
- AC_ERROR(Hesiod library not found)])
-fi
-
-if test "$kerberos" != "no"; then
- if test "$kerberos" != "yes"; then
- CPPFLAGS="${CPPFLAGS} -I${kerberos}/include"
- LDFLAGS="${LDFLAGS} -L${kerberos}/lib"
- fi
- AC_DEFINE(ZEPHYR_USES_KERBEROS)
- AC_CHECK_LIB(krb, krb_mk_req,,
- [AC_ERROR(Kerberos library not found)], -ldes)
- LIBS="-lkrb -ldes ${LIBS}"
-else
- AC_WARN(compiling without Kerberos support; Zephyr will be insecure.)
-fi
+ATHENA_KRB4
+ATHENA_HESIOD
+LIBS="$LIBS $KRB4_LIBS $HESIOD_LIBS"
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_VPRINTF
-ZEPHYR_FUNC_REGCOMP
AC_CHECK_FUNCS(putenv re_comp strchr memcpy memmove waitpid getlogin)
AC_CHECK_FUNCS(strerror random lrand48 gethostid krb_get_err_text krb_log)
@@ -175,8 +105,6 @@ AC_OUTPUT(Makefile clients/Makefile clients/syslogd/Makefile
clients/zleave/Makefile clients/zlocate/Makefile
clients/zmailnotify/Makefile clients/znol/Makefile
clients/zpopnotify/Makefile clients/zshutdown_notify/Makefile
- clients/zstat/Makefile clients/zwgc/Makefile clients/zwrite/Makefile
- lib/Makefile lib/dyn/Makefile lib/et/Makefile lib/ss/Makefile
- lib/zephyr/Makefile server/Makefile zhm/Makefile
- clients/xzwrite/XZwrite clients/zwgc/zephyr.vars)
-
+ clients/zstat/Makefile clients/zwrite/Makefile lib/Makefile
+ libdyn/Makefile server/Makefile zhm/Makefile zwgc/Makefile
+ clients/xzwrite/XZwrite zwgc/zephyr.vars)