mirror of
https://github.com/nginx/nginx.git
synced 2024-12-11 17:59:00 +08:00
43 lines
608 B
Plaintext
43 lines
608 B
Plaintext
|
|
echo $ngx_n "checking for $ngx_func ..." $ngx_c
|
|
echo >> $NGX_ERR
|
|
echo "checking for $ngx_func" >> $NGX_ERR
|
|
|
|
ngx_found=no
|
|
|
|
func=`echo $ngx_func | sed -e 's/()$//' | tr '[a-z]' '[A-Z]'`
|
|
|
|
cat << END > $NGX_AUTOTEST.c
|
|
|
|
$NGX_UNISTD_H
|
|
$ngx_func_inc
|
|
|
|
int main() {
|
|
$ngx_func_test;
|
|
return 0;
|
|
}
|
|
|
|
END
|
|
|
|
eval "$CC $CC_TEST_FLAGS -o $NGX_AUTOTEST $NGX_AUTOTEST.c $ngx_func_libs \
|
|
>> $NGX_ERR 2>&1"
|
|
|
|
if [ -x $NGX_AUTOTEST ]; then
|
|
echo " found"
|
|
|
|
cat << END >> $NGX_AUTO_CONFIG_H
|
|
|
|
#ifndef HAVE_$func
|
|
#define HAVE_$func 1
|
|
#endif
|
|
|
|
END
|
|
|
|
ngx_found=yes
|
|
|
|
else
|
|
echo " not found"
|
|
fi
|
|
|
|
rm $NGX_AUTOTEST*
|