Remove compatibility functions that are always provided by the
[mmh] / configure.in
index 8e8fb1c..9d750c0 100644 (file)
@@ -1,8 +1,6 @@
 dnl
 dnl configure.in -- autoconf template for nmh
 dnl
-dnl $Id$
-dnl
 
 dnl Move this up a bit
 AC_PREREQ(2.61)
@@ -39,17 +37,6 @@ dnl --------------------------
 dnl CHECK COMMAND LINE OPTIONS
 dnl --------------------------
 
-dnl Do you want client-side support for apop?
-AC_ARG_ENABLE(apop, AS_HELP_STRING([--enable-apop],
-  [enable client-side support for POP3 and APOP]))
-if test x"$enable_apop" = x"yes"; then
-  AC_DEFINE(APOP, 1,
-    [Define to compile client-side support for apop into inc and msgchk.])dnl
-  APOPLIB=md5.o
-  enable_pop=yes
-fi
-AC_SUBST(APOPLIB)dnl
-
 dnl Do you want to debug nmh?
 AC_ARG_ENABLE(debug,
   AS_HELP_STRING([--enable-debug],[enable nmh code debugging]))
@@ -66,8 +53,7 @@ AC_ARG_ENABLE(masquerade,
     masquerade="draft_from mmailid username_extension"
   else
     masquerade="$enable_masquerade"
-  fi],
-  masquerade="draft_from mmailid username_extension")
+  fi], [masquerade="draft_from mmailid username_extension"])
 AC_SUBST(masquerade)dnl
 
 dnl Do you want mhe support?
@@ -107,6 +93,10 @@ AC_ARG_WITH(cyrus-sasl, AS_HELP_STRING([--with-cyrus-sasl],
 if test x"$with_cyrus_sasl" != x -a x"$with_cyrus_sasl" != x"no"; then
   AC_DEFINE(CYRUS_SASL, 1,
     [Define to use the Cyrus SASL library for authentication of POP and SMTP.])dnl
+  if test x"$with_cyrus_sasl" != xyes; then
+    AC_MSG_WARN([Arguments to --with-cyrus-sasl now ignored])
+    AC_MSG_WARN([Please pass the appropriate arguments to CPPFLAGS/LDFLAGS])
+  fi
   sasl_support=yes
 else
   sasl_support=no
@@ -140,13 +130,6 @@ fi
 AC_DEFINE_UNQUOTED(BACKUP_PREFIX, "$backup_prefix",
     [The prefix that is prepended to the name of message files when they are "removed" by rmm. This should typically be `,' or `#'.])dnl
 
-dnl Do you want support for hesiod
-AC_ARG_WITH(hesiod,
-  AS_HELP_STRING([--with-hesiod=DIR],[specify location of Hesiod]))
-if test x"$with_hesiod" != x -a x"$with_hesiod" != x"no"; then
-  AC_DEFINE(HESIOD,1,[Define this to compile support for using Hesiod.])dnl
-fi
-
 dnl After we know if we're including apop and kpop support, do pop stuff
 if test x"$enable_pop" = x"yes"; then
   AC_DEFINE(POP, 1,
@@ -484,11 +467,9 @@ AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
 AC_HEADER_STAT
 AC_HEADER_TIOCGWINSZ
-AC_CHECK_HEADERS(string.h memory.h stdlib.h unistd.h errno.h fcntl.h \
-                 limits.h crypt.h termcap.h termio.h termios.h locale.h \
+AC_CHECK_HEADERS(errno.h fcntl.h crypt.h termcap.h \
                  langinfo.h wchar.h wctype.h iconv.h netdb.h \
-                 sys/param.h sys/time.h sys/utsname.h sys/stream.h \
-                 arpa/inet.h arpa/ftp.h)
+                 sys/param.h sys/time.h sys/stream.h)
  
 dnl
 dnl Checks for _IO_write_ptr. A Linuxism used by nmh on linux. We
@@ -509,10 +490,9 @@ AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM,1,
 dnl ---------------
 dnl CHECK FUNCTIONS
 dnl ---------------
-AC_FUNC_VFORK
 AC_CHECK_LIB(mkstemp,mkstemp)
 AC_CHECK_FUNCS(waitpid wait3 sigaction sigprocmask sigblock sigsetmask \
-               sighold sigrelse writev lstat uname tzset killpg mkstemp \
+               sighold sigrelse writev lstat uname tzset mkstemp \
                getutent nl_langinfo mbtowc wcwidth)
 
 dnl sigsetjmp may be a macro
@@ -522,8 +502,6 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <setjmp.h>]],
     [Define to 1 if you have the `sigsetjmp'.]) AC_MSG_RESULT(yes)],
   [AC_MSG_RESULT(no)])
 
-AC_REPLACE_FUNCS(memmove snprintf strerror strdup)
-
 dnl Look for the initgroups() declaration.  On AIX 4.[13], Solaris 4.1.3, and
 dnl ULTRIX 4.2A the function is defined in libc but there's no declaration in
 dnl any system header.  
@@ -676,28 +654,18 @@ else
   AC_SUBST(NDBM_LIBS)
 fi
 
+dnl ------------------
+dnl Set RPM build root
+dnl ------------------
+dnl nmhrpm is used in the final summary, see below.  The default value is
+dnl reported there as ./RPM, consistent with the reporting of the default
+dnl source code location as ., but its absolute path is used in the Makefile.
+AC_ARG_WITH(rpmdir,
+  AS_HELP_STRING([--with-rpmdir=RPMDIR], [RPM build directory @<:@RPM@:>@]))
+  AS_IF([test x"$with_rpmdir" = x], [rpmdir='$(abs_srcdir)/RPM'; nmhrpm=./RPM],
+          [rpmdir="$with_rpmdir"; eval "nmhrpm=${rpmdir}"])
+AC_SUBST(rpmdir)
 
-dnl ----------------
-dnl CHECK FOR HESIOD
-dnl ----------------
-if test x"$with_hesiod" != x -a x"$with_hesiod" != x"no"; then
-  if test x"$with_hesiod" != x"yes"; then
-    HESIOD_INCLUDES="-I$with_hesiod/include"
-    HESIOD_LIBS="-L$with_hesiod/lib"
-  fi
-  AC_CHECK_FUNC(res_send,
-       [AC_CHECK_LIB(hesiod, hes_resolve,
-               [HESIOD_LIBS="$HESIOD_LIBS -lhesiod"],
-               [AC_MSG_ERROR(Hesiod library not found)],
-               $HESIOD_LIBS)],
-       [AC_CHECK_LIB(hesiod, hes_resolve,
-               [HESIOD_LIBS="$HESIOD_LIBS -lhesiod -lresolv"],
-               [AC_MSG_ERROR(Hesiod library not found)],
-               $HESIOD_LIBS -lresolv)])
-
-fi
-AC_SUBST(HESIOD_INCLUDES)dnl
-AC_SUBST(HESIOD_LIBS)dnl
 
 dnl --------------------
 dnl CHECK FOR CYRUS-SASL
@@ -728,35 +696,6 @@ dnl tests will find it when it tries to link test programs.
 nmh_save_LIBS="$LIBS"
 LIBS="$TERMLIB $LIBS"
 
-dnl Checks for external variable ospeed in the termcap library.
-AC_CACHE_CHECK(if an include file defines ospeed,
-nmh_cv_decl_ospeed_include_defines,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#if HAVE_TERMIOS_H
-#include <termios.h>
-#endif
-#if HAVE_TERMCAP_H
-#include <termcap.h>
-#endif]], [[ospeed = 0;]])],
-nmh_cv_decl_ospeed_include_defines=yes,nmh_cv_decl_ospeed_include_defines=no)])
-if test $nmh_cv_decl_ospeed_include_defines = no; then
-  AC_CACHE_CHECK(if you must define ospeed,
-  nmh_cv_decl_ospeed_must_define,
-  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
-  [[extern short ospeed; ospeed = 0;]])],
-  nmh_cv_decl_ospeed_must_define=yes,nmh_cv_decl_ospeed_must_define=no)])
-fi
-AH_TEMPLATE(HAVE_OSPEED, [Define to 1 if your termcap library has the ospeed variable.])
-if test $nmh_cv_decl_ospeed_include_defines = yes; then
-  AC_DEFINE(HAVE_OSPEED)dnl
-elif test $nmh_cv_decl_ospeed_must_define = yes; then
-  AC_DEFINE(HAVE_OSPEED)
-  AC_DEFINE(MUST_DEFINE_OSPEED, 1,
-    [Define to 1 if you have ospeed, but it is not defined in termcap.h.])
-fi
-
 dnl Check if tgetent accepts NULL (and will allocate its own termcap buffer)
 dnl Some termcaps reportedly accept a zero buffer, but then dump core
 dnl in tgetstr().
@@ -1017,6 +956,7 @@ eval "nmhbin=${bindir}";         eval "nmhbin=${nmhbin}"
 eval "nmhsysconf=${sysconfdir}"; eval "nmhsysconf=${nmhsysconf}"
 eval "nmhlib=${libdir}";         eval "nmhlib=${nmhlib}"
 eval "nmhman=${mandir}";         eval "nmhman=${nmhman}"
+eval "nmhrpm=${nmhrpm}";
 
 pop_kinds=no
 if test x"$enable_pop" = x"yes"; then
@@ -1043,6 +983,7 @@ binary install path        : ${nmhbin}
 library install path       : ${nmhlib}
 config files install path  : ${nmhsysconf}
 man page install path      : ${nmhman}
+RPM build root             : ${nmhrpm}
 backup prefix              : ${backup_prefix}
 transport system           : ${MTS}
 file locking type          : ${LOCKTYPE}