nginx/auto/func

43 lines
597 B
Plaintext
Raw Normal View History

2003-11-25 14:44:56 -06:00
2003-12-14 14:10:27 -06:00
echo -n "checking for $ngx_func ..."
echo >> $NGX_ERR
echo "checking for $ngx_func" >> $NGX_ERR
2003-11-25 14:44:56 -06:00
2003-12-14 14:10:27 -06:00
ngx_found=no
2003-11-27 01:45:22 -06:00
2003-12-14 14:10:27 -06:00
func=`echo $ngx_func | sed -e 's/()$//' | tr '[a-z]' '[A-Z]'`
2003-11-26 09:42:18 -06:00
2003-12-14 14:10:27 -06:00
cat << END > $NGX_AUTOTEST.c
2003-11-25 14:44:56 -06:00
2003-12-14 14:10:27 -06:00
$NGX_UNISTD_H
$ngx_func_inc
2003-11-25 14:44:56 -06:00
2003-12-14 14:10:27 -06:00
int main() {
$ngx_func_test;
return 0;
}
2003-11-25 14:44:56 -06:00
2003-12-14 14:10:27 -06:00
END
2003-11-27 01:45:22 -06:00
2003-12-14 14:10:27 -06:00
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
2003-11-27 01:45:22 -06:00
2003-11-25 14:44:56 -06:00
else
2003-12-14 14:10:27 -06:00
echo " not found"
2003-11-25 14:44:56 -06:00
fi
2003-12-14 14:10:27 -06:00
rm $NGX_AUTOTEST*