2003-11-26 04:44:56 +08:00
|
|
|
|
2004-02-04 04:27:11 +08:00
|
|
|
echo $ngx_n "checking for $ngx_func ..." $ngx_c
|
2003-12-15 04:10:27 +08:00
|
|
|
echo >> $NGX_ERR
|
|
|
|
echo "checking for $ngx_func" >> $NGX_ERR
|
2003-11-26 04:44:56 +08:00
|
|
|
|
2003-12-15 04:10:27 +08:00
|
|
|
ngx_found=no
|
2003-11-27 15:45:22 +08:00
|
|
|
|
2004-06-18 01:18:53 +08:00
|
|
|
func=`echo $ngx_func | sed -e 's/()$//' | tr '[a-z]' '[A-Z]'`
|
2003-11-26 23:42:18 +08:00
|
|
|
|
2003-12-15 04:10:27 +08:00
|
|
|
cat << END > $NGX_AUTOTEST.c
|
2003-11-26 04:44:56 +08:00
|
|
|
|
2004-06-16 01:47:16 +08:00
|
|
|
#include <sys/types.h>
|
2003-12-15 04:10:27 +08:00
|
|
|
$NGX_UNISTD_H
|
|
|
|
$ngx_func_inc
|
2003-11-26 04:44:56 +08:00
|
|
|
|
2003-12-15 04:10:27 +08:00
|
|
|
int main() {
|
|
|
|
$ngx_func_test;
|
|
|
|
return 0;
|
|
|
|
}
|
2003-11-26 04:44:56 +08:00
|
|
|
|
2003-12-15 04:10:27 +08:00
|
|
|
END
|
2003-11-27 15:45:22 +08:00
|
|
|
|
2004-06-18 01:18:53 +08:00
|
|
|
test="$CC_WARN $CC_TEST_FLAGS -o $NGX_AUTOTEST $NGX_AUTOTEST.c $ngx_func_libs"
|
|
|
|
eval "$test >> $NGX_ERR 2>&1"
|
2003-12-15 04:10:27 +08:00
|
|
|
|
|
|
|
if [ -x $NGX_AUTOTEST ]; then
|
|
|
|
echo " found"
|
2004-02-09 15:46:43 +08:00
|
|
|
have=HAVE_$func . auto/have
|
2003-12-15 04:10:27 +08:00
|
|
|
ngx_found=yes
|
2003-11-27 15:45:22 +08:00
|
|
|
|
2003-11-26 04:44:56 +08:00
|
|
|
else
|
2003-12-15 04:10:27 +08:00
|
|
|
echo " not found"
|
2004-06-18 01:18:53 +08:00
|
|
|
echo "---------" >> $NGX_ERR
|
|
|
|
cat $NGX_AUTOTEST.c >> $NGX_ERR
|
|
|
|
echo "---------" >> $NGX_ERR
|
|
|
|
echo $test >> $NGX_ERR
|
|
|
|
echo "---------" >> $NGX_ERR
|
2003-11-26 04:44:56 +08:00
|
|
|
fi
|
|
|
|
|
2003-12-15 04:10:27 +08:00
|
|
|
rm $NGX_AUTOTEST*
|