Skip to content

Commit

Permalink
all the config tests together
Browse files Browse the repository at this point in the history
  • Loading branch information
slact committed Jul 26, 2018
1 parent 6ef915d commit ebc11be
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions config
Expand Up @@ -32,6 +32,24 @@ else
_NCHAN_HIREDIS_SRCS=""
fi

#do we have memrchr() on the platform?
ngx_feature="memrchr()"
ngx_feature_name="NCHAN_HAVE_MEMRCHR"
ngx_feature_run=yes
ngx_feature_path=
ngx_feature_libs=
ngx_feature_incs=" \
#include <string.h>
#include <stddef.h>
"
ngx_feature_test=" \
const char *str = \"aboobar\"; \
const void *place = &str[4]; \
const void *found = memrchr(str, 'b', strlen(str)); \
if(place != found) { return 1; } \
"
. auto/feature

_NCHAN_SUBSCRIBERS_SRCS="\
${ngx_addon_dir}/src/subscribers/common.c \
${ngx_addon_dir}/src/subscribers/longpoll.c \
Expand Down Expand Up @@ -86,28 +104,6 @@ _NCHAN_UTIL_SRCS=" \
$_nchan_util_dir/nchan_subrequest.c \
"

#do we have memrchr() on the platform?
ngx_feature="memrchr()"
ngx_feature_name="NCHAN_HAVE_MEMRCHR"
ngx_feature_run=yes
ngx_feature_path=
ngx_feature_libs=
ngx_feature_incs=" \
#include <string.h>
#include <stddef.h>
"
ngx_feature_test=" \
const char *str = \"aboobar\"; \
const void *place = &str[4]; \
const void *found = memrchr(str, 'b', strlen(str)); \
if(place != found) { return 1; } \
"
. auto/feature

if [ $ngx_found = no ]; then
_NCHAN_UTIL_SRCS="$_NCHAN_UTIL_SRCS $_nchan_util_dir/memrchr.c"
fi

_NCHAN_STORE_SRCS="\
${ngx_addon_dir}/src/store/spool.c \
${ngx_addon_dir}/src/store/ngx_rwlock.c \
Expand Down

0 comments on commit ebc11be

Please sign in to comment.