2003-11-26 23:42:18 +08:00
|
|
|
|
2003-12-15 04:10:27 +08:00
|
|
|
echo -n "checking for $ngx_inc ..."
|
|
|
|
echo >> $NGX_ERR
|
|
|
|
echo "checking for $ngx_inc" >> $NGX_ERR
|
2003-11-26 23:42:18 +08:00
|
|
|
|
2003-12-15 04:10:27 +08:00
|
|
|
ngx_found=no
|
2003-11-27 15:45:22 +08:00
|
|
|
|
2003-12-15 04:10:27 +08:00
|
|
|
inc=`echo $ngx_inc | sed -e 's/\./_/' | 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 23:42:18 +08:00
|
|
|
|
2003-12-15 04:10:27 +08:00
|
|
|
#include <$ngx_inc>
|
2003-11-26 23:42:18 +08:00
|
|
|
|
2003-12-15 04:10:27 +08:00
|
|
|
int main() {
|
|
|
|
return 0;
|
|
|
|
}
|
2003-11-26 23:42:18 +08:00
|
|
|
|
2003-12-15 04:10:27 +08:00
|
|
|
END
|
2003-11-26 23:42:18 +08:00
|
|
|
|
2003-12-15 04:10:27 +08:00
|
|
|
eval "${CC} -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1"
|
|
|
|
|
|
|
|
if [ -x $NGX_AUTOTEST ]; then
|
|
|
|
echo " found"
|
|
|
|
|
|
|
|
cat << END >> $NGX_AUTO_CONFIG_H
|
|
|
|
|
|
|
|
#ifndef HAVE_$inc
|
|
|
|
#define HAVE_$inc 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
END
|
|
|
|
|
|
|
|
eval "NGX_$inc='#include <$ngx_inc>'"
|
|
|
|
ngx_found=yes
|
2003-11-26 23:42:18 +08:00
|
|
|
|
|
|
|
else
|
2003-12-15 04:10:27 +08:00
|
|
|
echo " not found"
|
2003-11-26 23:42:18 +08:00
|
|
|
fi
|
|
|
|
|
2003-12-15 04:10:27 +08:00
|
|
|
rm $NGX_AUTOTEST*
|