AC_CHECK_HEADERS(ncurses.h,,,[ ])
fi
-AC_CHECK_HEADER(resolv.h,,,
+AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H),,
[#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <arpa/nameser.h>
#endif])
-AC_SUBST(SMTP)
-AC_SUBST(DOMAIN)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
#include <string.h>
#include <netinet/in.h>
#include <stdio.h>
+
+#ifdef HAVE_RESOLV_H
#include <arpa/nameser.h>
#include <resolv.h>
+#endif
+
#include "sysdep_decls.h"
#include "citadel.h"
#include "domain.h"
*
*/
int getmx(char *mxbuf, char *dest) {
+
+#ifdef HAVE_RESOLV_H
union {
u_char bytes[1024];
HEADER header;
} answer;
+#endif
+
int ret;
unsigned char *startptr, *endptr, *ptr;
char expanded_buf[1024];
* No smart-host? Look up the best MX for a site.
*/
-#ifdef __CYGWIN__
+#ifndef HAVE_RESOLV_H
/*
* On systems with b0rken or non-standard resolver libraries, learn
pclose(fp);
return(0); /* FIXME */
-#else /* __CYGWIN__ */
+#else /* HAVE_RESOLV_H */
/*
* Make a call to the standard resolver library.
}
}
}
-#endif /* __CYGWIN__ */
+#endif /* HAVE_RESOLV_H */
sort_mxrecs(mxrecs, num_mxrecs);