2003-11-25 14:44:56 -06:00
|
|
|
|
|
|
|
echo "checking for $NGX_FUNC"
|
|
|
|
|
2003-11-27 01:45:22 -06:00
|
|
|
NGX_FOUND=NO
|
|
|
|
|
2003-11-26 09:42:18 -06:00
|
|
|
func=`echo $NGX_FUNC | sed -e 's/()$//' | tr '[a-z]' '[A-Z]'`
|
|
|
|
|
2003-11-25 14:44:56 -06: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-27 13:01:37 -06:00
|
|
|
eval "$CC $CC_TEST_FLAGS -o autotest autotest.c $NGX_FUNC_LIBS > $NGX_ERR 2>&1"
|
2003-11-25 14:44:56 -06:00
|
|
|
|
|
|
|
if [ -x autotest ]; then
|
|
|
|
echo " + $NGX_FUNC found"
|
|
|
|
|
2003-11-26 09:42:18 -06: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 01:45:22 -06:00
|
|
|
|
|
|
|
NGX_FOUND=YES
|
|
|
|
|
2003-11-25 14:44:56 -06:00
|
|
|
else
|
|
|
|
echo " + $NGX_FUNC not found"
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm autotest*
|