]> andersk Git - moira.git/blobdiff - configure.in
Add support for get_host_by_account_number query.
[moira.git] / configure.in
index cf3406bcc832c81c57339bb3d81ee7b8f798fcb0..b3b1384f266ddae08bbeaf256b020d6c71ff8bce 100755 (executable)
@@ -32,11 +32,12 @@ AC_PROG_MAKE_SET
 
 if test "$athena" = true; then
     enable_athena=yes
-    with_readline=/mit/gnu
-    unset with_com_err
-    prefix=/afs/athena.mit.edu/system/moira
+    prefix=/afs/.athena.mit.edu/system/moira
     bindir=$prefix/arch/$ATHENA_SYS/bin
     sbindir=$bindir
+    MR_INCLUDE(/usr/athena/include)
+    MR_INCLUDE(/usr/athena/include/kerberosIV)
+    MR_LIBS(/usr/athena/lib)
 fi
 
 # We currently just don't support changing this
@@ -108,13 +109,15 @@ if test "$krb4" != yes; then
 elif test -d /usr/include/kerberosIV; then
     MR_INCLUDE(/usr/include/kerberosIV)
 fi
+AC_CHECK_LIB(crypto, main, crypto="crypto",
+             [AC_CHECK_LIB(k5crypto, main, crypto="k5crypto")])
 AC_CHECK_LIB(krb4, krb_rd_req,
-            [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lcrypto"],
+            [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -l${crypto}"],
             [AC_CHECK_LIB(krb, krb_rd_req,
                           [KRB4_LIBS="-lkrb -ldes"],
                           [AC_MSG_ERROR(Kerberos 4 libraries not found)],
                           $LIBPATH -ldes)],
-            $LIBPATH -ldes425 -lkrb5 -lcrypto -lcom_err)
+            $LIBPATH -ldes425 -lkrb5 -l${crypto} -lcom_err)
 
 AC_MSG_CHECKING(for Kerberos 5)
 AC_ARG_WITH(krb5,
@@ -127,7 +130,7 @@ if test "$krb5" != no; then
        REG_SVR_INCLUDES=-I$krb5/include
        REG_SVR_LIBS=-L$krb5/lib
     fi
-    REG_SVR_LIBS="$REG_SVR_LIBS -lkadm5clnt -lgssapi_krb5 -lgssrpc -ldyn -lkrb4 -ldes425 -lkrb5 -lcrypto"
+    REG_SVR_LIBS="$REG_SVR_LIBS -lkadm5clnt -lgssapi_krb5 -lgssrpc -ldyn -lkrb4 -ldes425 -lkrb5 -l${crypto}"
 else
     REG_SVR_DEFS=-DKRB4
     REG_SVR_LIBS=-lkadm
@@ -172,44 +175,6 @@ if test "$zephyr" != no; then
     MR_DEFINE(HAVE_ZEPHYR)
 fi
 
-# GDSS support (default: build util/gdss if present)
-AC_MSG_CHECKING(for GDSS)
-AC_ARG_WITH(gdss,
-    [  --with-gdss=PREFIX      Specify location of GDSS],
-    [gdss="$withval"
-     MR_INCLUDE("$gdss/include")
-     GDSS_LIBS="-L$gdss/lib -lgdss"],
-    [if test -d $srcdir/util/gdss; then
-         gdss=$srcdir/util/gdss
-        GDSS_SUBDIR=util/gdss
-        GDSS_OUTPUT_FILES="util/gdss/Makefile util/gdss/lib/Makefile \
-            util/gdss/lib/crypto/Makefile util/gdss/lib/crypto/bignum/Makefile \
-            util/gdss/lib/crypto/algorithm/Makefile"
-        # autoconf can't deal with creating util/gdss if util doesn't exist
-        if test ! -d util; then
-            mkdir util
-        fi
-        MR_INCLUDE('$(SRCTOP)/util/gdss/include')
-        GDSS_LIBS='-L$(BUILDTOP)/util/gdss/lib -lgdss'
-        GDSS_LIBDEP='$(BUILDTOP)/util/gdss/lib/libgdss.a'
-     else
-         gdss=no
-     fi])
-AC_MSG_RESULT($gdss)
-if test "$gdss" != no; then
-    GDSS_OBJS='$(GDSS_OBJS)'
-    GDSS_CFILES='$(GDSS_CFILES)'
-    GDSS_TARGET='$(GDSS_TARGET)'
-    MR_DEFINE(HAVE_GDSS)
-fi
-AC_SUBST(GDSS_CPPFLAGS)
-AC_SUBST(GDSS_LIBS)
-AC_SUBST(GDSS_SUBDIR)
-AC_SUBST(GDSS_OBJS)
-AC_SUBST(GDSS_CFILES)
-AC_SUBST(GDSS_TARGET)
-AC_SUBST(GDSS_LIBDEP)
-
 # RSAREF support (default: build util/rsaref if present)
 AC_MSG_CHECKING(for RSAREF)
 AC_ARG_WITH(rsaref,
@@ -265,7 +230,7 @@ if test "$oracle" != no; then
            ;;
     esac
     SVRSUBDIRS='$(SVRDIRS)'
-    SERVER_OUTPUT_FILES="db/Makefile server/Makefile afssync/Makefile backup/Makefile dbck/Makefile dcm/Makefile gen/Makefile incremental/Makefile reg_svr/Makefile regtape/Makefile"
+    SERVER_OUTPUT_FILES="db/Makefile server/Makefile backup/Makefile dbck/Makefile dcm/Makefile gen/Makefile incremental/Makefile reg_svr/Makefile regtape/Makefile"
     PRO_C=$oracle/bin/proc
     PRO_C_OPTS=CODE=ANSI_C
     PRO_C_DEFS="DEFINE=_PROC_ $PRO_C_DEFS"
@@ -277,6 +242,31 @@ AC_SUBST(PRO_C_OPTS)
 AC_SUBST(SQL_LIBS)
 AC_SUBST(SVRSUBDIRS)
 
+# LDAP support
+AC_MSG_CHECKING(for LDAP)
+AC_ARG_WITH(ldap,
+    [  --with-ldap=PREFIX      Specify location of LDAP libs (for server)],
+    [ ldap="$withval"], 
+    [if test -n "$LDAP_HOME" -a -d "$LDAP_HOME"; then
+         ldap=$LDAP_HOME
+     else
+        ldap=no
+     fi])
+AC_MSG_RESULT($ldap)
+if test "$ldap" != no -a "$oracle" != no; then
+    if test "$ldap" != yes; then
+        LDAP_CPPFLAGS="-I$ldap/include"
+       LDAP_LIBS="-L$ldap/lib"
+    fi
+    MR_DEFINE(HAVE_LDAP)
+
+    WINAD_SUBDIRS="winad"
+    WINAD_OUTPUT_FILES="incremental/winad/Makefile"
+fi
+AC_SUBST(LDAP_CPPFLAGS)
+AC_SUBST(LDAP_LIBS)
+AC_SUBST(WINAD_SUBDIRS)
+
 # AFS support
 AC_MSG_CHECKING(for AFS)
 AC_ARG_WITH(afs,
@@ -300,24 +290,41 @@ if test "$afs" != no -a "$oracle" != no; then
                 [AC_MSG_ERROR(AFS libraries not found)],
                 $AFS_LIBS -lrx -llwp -lsys $AFS_EXTRA_LIBS)
     MR_DEFINE(HAVE_AFS)
+
+    AFS_SUBDIRS="afs"
+    AFS_OUTPUT_FILES="incremental/afs/Makefile"
+    if test -d $srcdir/afssync; then
+       AFS_SYNCDIR="afssync"
+       AFS_OUTPUT_FILES="$AFS_OUTPUT_FILES afssync/Makefile"
+    fi
 fi
 AC_SUBST(AFS_CPPFLAGS)
 AC_SUBST(AFS_PRO_C_INCLUDES)
 AC_SUBST(AFS_LIBS)
 AC_SUBST(AFS_EXTRA_LIBS)
 AC_SUBST(AFS_DIR)
+AC_SUBST(AFS_SUBDIRS)
+AC_SUBST(AFS_SYNCDIR)
 
 # GNU readline
 AC_CHECKING(for GNU readline...)
 AC_ARG_WITH(readline,
     [  --with-readline=PREFIX  Specify location of GNU readline],
-    [readline="$withval"],
-    [AC_CHECK_LIB(readline, readline, [readline=yes], :, -ltermcap)])
+    [readline="$withval"; AC_MSG_RESULT($withval)],
+    [AC_CHECK_LIB(readline, readline, [readline=yes],
+       [if test "$athena" = true; then
+            unset ac_cv_lib_readline_readline
+            AC_CHECK_LIB(readline, readline, [readline=/mit/gnu], :,
+                -L/mit/gnu/lib -ltermcap)
+        fi],
+       -ltermcap)])
 if test "$readline" != no; then
     if test "$readline" != yes; then
-       READLINE_CPPFLAGS="-I$readline/include -I$readline/include/readline -DHAVE_READLINE"
-       READLINE_LIBS="-L$readline/lib -lreadline -ltermcap"
+       READLINE_CPPFLAGS="-I$readline/include"
+       READLINE_LIBS="-L$readline/lib"
     fi
+    READLINE_CPPFLAGS="$READLINE_CPPFLAGS -DHAVE_READLINE"
+    READLINE_LIBS="$READLINE_LIBS -lreadline -ltermcap"
 fi
 AC_SUBST(READLINE_CPPFLAGS)
 AC_SUBST(READLINE_LIBS)
@@ -360,6 +367,8 @@ if test -n "$CURSES_LIBS"; then
                AC_TRY_COMPILE([#include <curses.h>],[WINDOW *w; w->_maxx;],
                               [CURSES_CPPFLAGS="-D'getmaxx(w)=w->_maxx'"],
                               [CURSES_CPPFLAGS="-D'getmaxx(w)=w->maxx'"]))
+    AC_TRY_LINK([#include <curses.h>],[newterm(NULL, NULL, NULL);],
+               [CURSES_CPPFLAGS="$CURSES_CPPFLAGS -DCURSES_HAS_NEWTERM"])
     LIBS=$OLDLIBS
     CURSES_CPPFLAGS="-DHAVE_CURSES $CURSES_CPPFLAGS"
     CURSES_SUBDIRS='$(CURSES_SUBDIRS)'
@@ -371,7 +380,11 @@ AC_SUBST(CURSES_LIBS)
 AC_SUBST(CURSES_SUBDIRS)
 
 
-AC_CHECK_FUNCS(getusershell)
+AC_CHECK_FUNCS(getusershell strlcpy strlcat uname)
+
+AC_CHECK_FUNC(sigaction, AC_DEFINE(HAVE_POSIX_SIGNALS))
+
+AC_CHECK_HEADERS(unistd.h getopt.h netinet/in.h)
 
 MR_EXTEND(PRO_C_INCLUDES, INCLUDE='$(srcdir)')
 MR_INCLUDE('$(SRCTOP)/include')
@@ -388,8 +401,11 @@ MR_LIBDEP='$(BUILDTOP)/lib/libmoira.a'
 AC_SUBST(MR_LIBDEP)
 
 AC_OUTPUT(Makefile lib/Makefile include/Makefile clients/Makefile \
-         clients/addusr/Makefile clients/blanche/Makefile \
+         clients/lib/Makefile clients/addusr/Makefile \
+         clients/blanche/Makefile clients/chfn/Makefile \
+         clients/chpobox/Makefile clients/chsh/Makefile \
          clients/mailmaint/Makefile clients/moira/Makefile \
          clients/mrcheck/Makefile clients/mrtest/Makefile \
-         clients/passwd/Makefile update/Makefile man/Makefile \
-         $SERVER_OUTPUT_FILES $GDSS_OUTPUT_FILES $RSAREF_OUTPUT_FILES)
+         clients/stella/Makefile update/Makefile man/Makefile \
+         $SERVER_OUTPUT_FILES $WINAD_OUTPUT_FILES $AFS_OUTPUT_FILES \
+         $RSAREF_OUTPUT_FILES)
This page took 0.038659 seconds and 4 git commands to generate.