1#!/bin/sh
2
3program=libkqueue-test
4version=0.1
5cflags="-g -O0 -Wall -Werror"
6sources="main.c kevent.c test.c proc.c read.c signal.c timer.c vnode.c"
7
8pre_configure_hook() {
9
10  check_header "err.h"
11  check_header "sys/event.h" \
12      && sys_event_h="sys/event.h" \
13      || {
14            sys_event_h="../include/sys/event.h"
15            cflags="$cflags -I../include"
16            ldadd="$ldadd ../libkqueue.a -lpthread -lrt"
17         }
18
19
20  test "$target" = "linux" && cflags="$cflags -rdynamic"
21  test "$target" = "solaris" && ldadd="$ldadd -lsocket -lnsl -m64"
22
23  check_symbol $sys_event_h EV_DISPATCH
24  check_symbol $sys_event_h EV_RECEIPT
25  check_symbol $sys_event_h NOTE_TRUNCATE
26  check_symbol $sys_event_h EVFILT_TIMER
27  check_symbol $sys_event_h EVFILT_USER && \
28     sources="$sources user.c"
29}
30