summaryrefslogtreecommitdiffhomepage
path: root/auto/func
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-11-26 15:42:18 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-11-26 15:42:18 +0000
commitc0f8d91bde06aeeb53ff16d6c26490f5961f5a31 (patch)
tree034ba6291b7d4975868371dae533e4ab985c63f5 /auto/func
parenta8fa0a6a37b6e90324e0dcbf4733324199623841 (diff)
downloadnginx-c0f8d91bde06aeeb53ff16d6c26490f5961f5a31.tar.gz
nginx-c0f8d91bde06aeeb53ff16d6c26490f5961f5a31.tar.bz2
nginx-0.0.1-2003-11-26-18:42:18 import
Diffstat (limited to 'auto/func')
-rw-r--r--auto/func12
1 files changed, 7 insertions, 5 deletions
diff --git a/auto/func b/auto/func
index 77216f936..553333dc0 100644
--- a/auto/func
+++ b/auto/func
@@ -1,19 +1,21 @@
echo "checking for $NGX_FUNC"
+func=`echo $NGX_FUNC | sed -e 's/()$//' | tr '[a-z]' '[A-Z]'`
+
echo "$NGX_UNISTD_H" > autotest.c
echo "$NGX_FUNC_INC" >> autotest.c
echo "int main() { $NGX_FUNC_TEST; return 0; }" >> autotest.c
-eval "${CC} -o autotest autotest.c > /dev/null 2>&1"
+eval "$CC $CC_TEST_FLAGS -o autotest autotest.c > /dev/null 2>&1"
if [ -x autotest ]; then
echo " + $NGX_FUNC found"
- echo "#ifndef $NGX_HAVE" >> $NGX_AUTO_CONFIG_H
- echo "#define $NGX_HAVE 1" >> $NGX_AUTO_CONFIG_H
- echo "#endif" >> $NGX_AUTO_CONFIG_H
- echo >> $NGX_AUTO_CONFIG_H
+ 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
else
echo " + $NGX_FUNC not found"
fi