diff options
| author | Eudald Gubert i Roldan <hola@eudald.gr> | 2020-04-03 20:17:52 +0200 |
|---|---|---|
| committer | Raspbeguy <raspbeguy@users.noreply.github.com> | 2020-04-06 13:58:06 +0200 |
| commit | 73c9c332463b4c0d744a5cb1f570609f1e19ea26 (patch) | |
| tree | 0d7d0cf5ae491540f64f8c8e061fd543e0bd95fa /configure | |
| parent | a7fb9a80ce0c6021096b34b170f771a1bff022f7 (diff) | |
| download | btpd-73c9c332463b4c0d744a5cb1f570609f1e19ea26.tar.gz btpd-73c9c332463b4c0d744a5cb1f570609f1e19ea26.zip | |
Removed automake dependency
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/configure b/configure new file mode 100755 index 0000000..aaba04d --- /dev/null +++ b/configure @@ -0,0 +1,43 @@ +#!/bin/sh + +evloop=POLL + +for arg in "$@"; do + case "$arg" in + --with-evloop-method=*) + evloop=`echo $arg | sed 's/--with-evloop-method=//'` + ;; + + --help|-h|*) + echo 'usage: ./configure [options]' + echo 'options:' + echo ' --with-evloop-method=<option>: select evloop method (EPOLL,POLL,KQUEUE)' + echo ' --help: show this' + exit 0 + ;; + esac +done + +case "$evloop" in + POLL|EPOLL|KQUEUE) + sed -i "s/DEVLOOP_.*/DEVLOOP_$evloop/g" config.mk + case "$evloop" in + POLL) + sed -i "s|filter-out .*|filter-out evloop/epoll.c evloop/kqueue.c, \${EVLOOP_SRC}}|g" config.mk + ;; + + EPOLL) + sed -i "s|filter-out .*|filter-out evloop/poll.c evloop/kqueue.c, \${EVLOOP_SRC}}|g" config.mk + ;; + + KQUEUE) + sed -i "s|filter-out .*|filter-out evloop/poll.c evloop/epoll.c, \${EVLOOP_SRC}}|g" config.mk + ;; + esac + ;; + + *) + sed -i "s/DEVLOOP_.*/DEVLOOP_NONE/g" config.mk + sed -i "s|filter-out .*|filter-out evloop/poll.c evloop/epoll.c evloop/kqueue.c, \${EVLOOP_SRC}}|g" config.mk + ;; +esac |