blob: ac9a6cc95a635272cef2a418699c87e67ce80baa [file] [log] [blame]
# Copyright (C) Igor Sysoev
# Copyright (C) NGINX, Inc.
NXT_PCRE_CFLAGS=
NXT_PCRE_LIB=
nxt_found=no
if /bin/sh -c "(pcre-config --version)" >> $NXT_AUTOCONF_ERR 2>&1; then
NXT_PCRE_CFLAGS=`pcre-config --cflags`
NXT_PCRE_LIB=`pcre-config --libs`
nxt_feature="PCRE library"
nxt_feature_name=NXT_HAVE_PCRE
nxt_feature_run=no
nxt_feature_incs=$NXT_PCRE_CFLAGS
nxt_feature_libs=$NXT_PCRE_LIB
nxt_feature_test="#include <pcre.h>
int main() {
pcre *re;
re = pcre_compile(NULL, 0, NULL, 0, NULL);
if (re == NULL)
return 1;
return 0;
}"
. ${NXT_AUTO}feature
fi
if [ $nxt_found = no ]; then
$nxt_echo
$nxt_echo $0: error: no PCRE library found.
$nxt_echo
exit 1;
fi
$nxt_echo " + PCRE version: `pcre-config --version`"
cat << END >> $NXT_MAKEFILE_CONF
NXT_PCRE_CFLAGS = ${NXT_PCRE_CFLAGS}
NXT_PCRE_LIB = ${NXT_PCRE_LIB}
END