nginx/auto/func

29 lines
682 B
Plaintext
Raw Normal View History

2003-11-26 04:44:56 +08:00
echo "checking for $NGX_FUNC"
2003-11-27 15:45:22 +08:00
NGX_FOUND=NO
2003-11-26 23:42:18 +08:00
func=`echo $NGX_FUNC | sed -e 's/()$//' | tr '[a-z]' '[A-Z]'`
2003-11-26 04:44:56 +08:00
echo "$NGX_UNISTD_H" > autotest.c
echo "$NGX_FUNC_INC" >> autotest.c
echo "int main() { $NGX_FUNC_TEST; return 0; }" >> autotest.c
2003-11-28 03:01:37 +08:00
eval "$CC $CC_TEST_FLAGS -o autotest autotest.c $NGX_FUNC_LIBS > $NGX_ERR 2>&1"
2003-11-26 04:44:56 +08:00
if [ -x autotest ]; then
echo " + $NGX_FUNC found"
2003-11-26 23:42:18 +08:00
echo "#ifndef HAVE_$func" >> $NGX_AUTO_CONFIG_H
echo "#define HAVE_$func 1" >> $NGX_AUTO_CONFIG_H
echo "#endif" >> $NGX_AUTO_CONFIG_H
echo >> $NGX_AUTO_CONFIG_H
2003-11-27 15:45:22 +08:00
NGX_FOUND=YES
2003-11-26 04:44:56 +08:00
else
echo " + $NGX_FUNC not found"
fi
rm autotest*