aboutsummaryrefslogtreecommitdiffstats
path: root/md5.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2000-03-05 22:28:50 +0000
committerEric S. Raymond <esr@thyrsus.com>2000-03-05 22:28:50 +0000
commit3a04ee22d1b955e9e1f1f27f5e8473e07b2b1afc (patch)
tree858e729ff0d836b09eeffefa66676c5a0924e929 /md5.h
parentb4a6572a6a6afeedbc23e84e0536728ab01dcf04 (diff)
downloadfetchmail-3a04ee22d1b955e9e1f1f27f5e8473e07b2b1afc.tar.gz
fetchmail-3a04ee22d1b955e9e1f1f27f5e8473e07b2b1afc.tar.bz2
fetchmail-3a04ee22d1b955e9e1f1f27f5e8473e07b2b1afc.zip
Deal with the possibility that we might be running as a subprocess.
svn path=/trunk/; revision=2783
Diffstat (limited to 'md5.h')
0 files changed, 0 insertions, 0 deletions
19'>119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
dnl Autoconfigure input file for fetchmail
dnl Eric S. Raymond <esr@thyrsus.com>
dnl
dnl Process this file with autoconf to produce a configure script.
dnl

AC_INIT(fetchmail.h)		dnl A distinctive file to look for in srcdir. 
AC_CONFIG_HEADER(config.h)

# We want these before the checks, so the checks can modify their values.
test -z "$CFLAGS" && CFLAGS=-g AC_SUBST(CFLAGS)
test -z "$LDFLAGS" && LDFLAGS=-g AC_SUBST(LDFLAGS)

AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_CPP			dnl Later checks need this.
AC_PROG_CC_C_O
AC_AIX
AC_ISC_POSIX
AC_MINIX
AC_HEADER_STDC
AC_TYPE_SIZE_T
AC_TYPE_PID_T
AC_TYPE_SIGNAL
AC_CHECK_HEADERS(unistd.h termios.h termio.h sgtty.h stdarg.h alloca.h) 

AC_C_CONST			dnl getopt needs this.

AC_PROG_LEX
AC_PROG_YACC
AC_SUBST(LIBOBJS)

AC_CHECK_LIB(socket,socket)
AC_CHECK_LIB(nsl,inet_addr)


# Under Red Hat 4.0 (and many other Linuxes) -lresolv is seriously flaky
# and breaks gethostbyname(2).  It's better to use the bind stuff in the C
# library.  So don't add -lresolv to the link list unless it's necessary
AC_CHECK_FUNC(res_search,, AC_CHECK_LIB(resolv,res_search))

AC_CHECK_FUNC(strstr, AC_DEFINE(HAVE_STRSTR), 
              [EXTRASRC="$EXTRASRC \$(srcdir)/strstr.c"
               EXTRAOBJ="$EXTRAOBJ strstr.o"])

AC_CHECK_FUNC(strcasecmp, AC_DEFINE(HAVE_STRCASECMP), 
              [EXTRASRC="$EXTRASRC \$(srcdir)/strcasecmp.c"
               EXTRAOBJ="$EXTRAOBJ strcasecmp.o"])
             
AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPTLONG),
              [EXTRASRC="$EXTRASRC \$(srcdir)/getopt.c \$(srcdir)/getopt1.c"
               EXTRAOBJ="$EXTRAOBJ getopt.o getopt1.o"])

AC_FUNC_VPRINTF
AC_FUNC_ALLOCA
if test -n "$ALLOCA" 
then
  EXTRASRC="$EXTRASRC \$(srcdir)/alloca.c"
  EXTRAOBJ="$EXTRAOBJ alloca.o"
fi

if test -f "/usr/kerberos/include/krb.h"
then
  CFLAGS="$CFLAGS -DKERBEROS_V4 -I/usr/kerberos/include"
  LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
  LIBS="$LIBS -lkrb -ldes"
fi

if test -f "/usr/athena/include/krb.h"
then
  CFLAGS="$CFLAGS -DKERBEROS_V4 -I/usr/athena/include"
  LDFLAGS="$LDFLAGS -L/usr/athena/lib"
  LIBS="$LIBS -lkrb -ldes"
fi

dnl All AC_CHECK_FUNCs must precede the following AC_SUBSTs

AC_SUBST(EXTRASRC)
AC_SUBST(EXTRAOBJ)

AC_CHECK_FUNCS(tcsetattr stty setsid seteuid gethostbyname res_search herror \
  strrchr strstr strerror setlinebuf syslog snprintf vsnprintf vsyslog)

dnl AC_FUNC_SETVBUF_REVERSED

dnl Check for usuable void pointer type
AC_MSG_CHECKING(use of void pointer type)
AC_TRY_COMPILE([],
   [char *p;
    void *xmalloc();
    p = (char *) xmalloc(1);
   ],
 [AC_DEFINE(HAVE_VOIDPOINTER) AC_MSG_RESULT(yes)],
 AC_MSG_RESULT(no))

dnl Check out the wait reality.  We have to assume sys/wait.h is present.
AC_CHECK_FUNCS(waitpid wait3)
AC_MSG_CHECKING(for union wait);
AC_TRY_LINK([#include <sys/types.h>
#include <sys/wait.h>],
	 	 [union wait status; int pid; pid = wait (&status);
#ifdef WEXITSTATUS
/* Some POSIXoid systems have both the new-style macros and the old
   union wait type, and they do not work together.  If union wait
   conflicts with WEXITSTATUS et al, we don't want to use it at all.  */
if (WEXITSTATUS (status) != 0) pid = -1;
#endif
#ifdef HAVE_WAITPID
/* Make sure union wait works with waitpid.  */
pid = waitpid (-1, &status, 0);
#endif
],
  [AC_DEFINE(HAVE_UNION_WAIT) AC_MSG_RESULT(yes)],
  AC_MSG_RESULT(no))

AC_MSG_CHECKING(sys_siglist declaration in signal.h or unistd.h)
AC_TRY_LINK([#include <signal.h>
/* NetBSD declares sys_siglist in <unistd.h>.  */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif], [char *msg = *(sys_siglist + 1);],
  [AC_DEFINE(SYS_SIGLIST_DECLARED) AC_MSG_RESULT(yes)],
  AC_MSG_RESULT(no))

AC_OUTPUT(Makefile, [
# Makefile uses this timestamp file to know when to remake Makefile,
# build.sh, and glob/Makefile.
touch stamp-config])

dnl Local Variables:
dnl comment-start: "dnl "
dnl comment-end: ""
dnl comment-start-skip: "\\bdnl\\b\\s *"
dnl compile-command: "make configure config.h.in"
dnl End: