Fixed HTTP-client query-string handling bug.
[doldaconnect.git] / acinclude.m4
index 5589ce6..9f24860 100644 (file)
@@ -30,6 +30,22 @@ AC_CHECK_HEADER($1, $2, $3)
 CPPFLAGS="$cpp_bak"
 ])
 
+# DOLDA_CHECK_FUNC(FUNCTION, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND,
+#       [EXTRA-CFLAGS], [EXTRA-LDFLAGS])
+#
+# Augmented version of AC_CHECK_HEADER that overrides CPPFLAGS and
+# LDFLAGS
+
+AC_DEFUN([DOLDA_CHECK_FUNC],[dnl
+cpp_bak="$CPPFLAGS"
+ld_bak="$LDFLAGS"
+ifelse([$4], , , [CPPFLAGS="$CPPFLAGS $4"])
+ifelse([$5], , , [LDFLAGS="$LDFLAGS $5"])
+AC_CHECK_FUNC($1, $2, $3)
+CPPFLAGS="$cpp_bak"
+LDFLAGS="$ldflags"
+])
+
 # DOLDA_ENABLE(NAME, HELP, DEFAULT, DEPS)
 #
 # DEPS is a space-separated listing of required variables that must be
@@ -39,7 +55,7 @@ AC_DEFUN([DOLDA_ENABLE],[dnl
 AC_ARG_ENABLE([$1], [$2])
 if test "[$enable_][$1]" = yes; then
        for var in [$4]; do
-               if test "${!var}" != yes; then
+               if test "$(eval "echo \$$var")" != yes; then
                        AC_MSG_ERROR([*** cannot enable $1 without $var])
                fi
        done
@@ -47,7 +63,7 @@ elif test -z "[$enable_][$1]"; then
        ifelse([$3], yes, [dnl
        [enable_][$1]=yes
        for var in [$4]; do
-               if test "${!var}" != yes; then
+               if test "$(eval "echo \$$var")" != yes; then
                        [enable_][$1]=no
                        break
                fi