From e28799dcc9ccc3c3230a9b97a36f79994e8135d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sun, 13 Jan 2008 19:39:55 +0000 Subject: [PATCH] * openbsd has no -lresolv, its in their libc. * TODO: can we get rid of AM macros, as we don't require automake in the whole other configure? * socket.h requires types.h --- citadel/configure.ac | 28 ++++++++++++++++++---------- citadel/threads.c | 1 + 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/citadel/configure.ac b/citadel/configure.ac index cb7ed9be8..8f7f4495a 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -289,9 +289,9 @@ AC_SUBST(DEPEND_FLAG) AC_PROG_INSTALL AC_PROG_YACC -missing_dir=`cd $ac_aux_dir && pwd` -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) -AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +dnl missing_dir=`cd $ac_aux_dir && pwd` +dnl AC_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +dnl AC_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) dnl Checks for system services. @@ -381,13 +381,20 @@ dnl (Linux shadow passwords) fi fi -test -f /usr/local/lib/libresolv.a && LDFLAGS="$LDFLAGS -L/usr/local/lib" -AC_CHECK_LIB(resolv, res_query, - RESOLV="$RESOLV -lresolv", - [ - AC_MSG_ERROR(libresolv was not found. Citadel requires the resolver library.) - ] -) +case "`uname -a`" in + OpenBSD*) + echo "we don't need to check for resolv on openbsd" + ;; + *) + test -f /usr/local/lib/libresolv.a && LDFLAGS="$LDFLAGS -L/usr/local/lib" + AC_CHECK_LIB(resolv, res_query, + RESOLV="$RESOLV -lresolv", + [ + AC_MSG_ERROR(libresolv was not found. Citadel requires the resolver library.) + ] + ) + ;; +esac if test "x$with_ncurses" != "xno"; then AC_SEARCH_LIBS(tgetent, [ncurses curses termcap]) @@ -759,6 +766,7 @@ dnl AC_CHECK_FUNCS(res_query) AC_CACHE_CHECK([for the resolver calls], ac_cv_resquery_ok, [AC_TRY_COMPILE([#include +#include #include #include ], [ diff --git a/citadel/threads.c b/citadel/threads.c index 6e95ed3b3..9dee678ff 100644 --- a/citadel/threads.c +++ b/citadel/threads.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include -- 2.30.2