COMMON_SRC=$(wildcard services/*.c util/*.c)
COMMON_OBJ=$(addprefix $(BUILD),$(COMMON_SRC:.c=.o))
-COMPAT_OBJ=$(addprefix $(BUILD)compat/,$(LIBOBJS)))
+COMPAT_OBJ=$(addprefix $(BUILD)compat/,$(LIBOBJS))
UNITTEST_SRC=testcode/unitmain.c $(COMMON_SRC)
UNITTEST_OBJ=$(addprefix $(BUILD),$(UNITTEST_SRC:.c=.o)) $(COMPAT_OBJ)
DAEMON_SRC=$(wildcard daemon/*.c) $(COMMON_SRC)
AC_CHECK_HEADERS([event.h],,, [AC_INCLUDES_DEFAULT])
AC_CHECK_FUNCS([event_base_free]) # only in libevent 1.2 and later
-AC_ARG_WITH(ldns,
- AC_HELP_STRING([--with-ldns=PATH specify prefix of path of ldns library to use])
- , [ specialldnsdir="$withval"
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval -L$withval/lib -lldns"
- ldnsdir="$withval"
- AC_SUBST(ldnsdir)
-])
-
-AC_CHECK_LIB(ldns, ldns_rr_new,, [AC_MSG_ERROR([Can't find ldns library])])
-
# check to see if libraries are needed for these functions.
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, inet_pton)
AC_LIBOBJ([fake-rfc2553])
fi
+# check this after all other compilation checks, since the linking of the lib
+# may break checks after this.
+AC_ARG_WITH(ldns,
+ AC_HELP_STRING([--with-ldns=PATH specify prefix of path of ldns library to use])
+ , [ specialldnsdir="$withval"
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ LDFLAGS="$LDFLAGS -L$withval -L$withval/lib -lldns"
+ ldnsdir="$withval"
+ AC_SUBST(ldnsdir)
+])
+
+AC_CHECK_LIB(ldns, ldns_rr_new,, [AC_MSG_ERROR([Can't find ldns library])])
+
AC_DEFINE_UNQUOTED([MAXSYSLOGMSGLEN], [512], [Define to the maximum message length to pass to syslog.])
AH_BOTTOM([
16 February 2007: Wouter
- Updated testbed script, works better by using make on remote end.
- removed check decls, we can compile without them.
+ - makefile supports LIBOBJ replacements.
15 February 2007: Wouter
- port to FreeBSD 4.11 Dec Alpha. Also works on Solaris 10 sparc64,