diff options
Diffstat (limited to '')
| -rw-r--r-- | auto/func | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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 |
