Fix improper uses of delete and free.
[shibboleth/cpp-sp.git] / configure.ac
index 9d5f3cc..3c6d1e0 100644 (file)
@@ -335,13 +335,15 @@ AC_ARG_WITH(fastcgi,
 AC_MSG_RESULT($WANT_FASTCGI)
 
 if test "$WANT_FASTCGI" != "no"; then
-    AC_MSG_CHECKING(for FastCGI include files)
-    if test x_$WANT_FASTCGI != x_/usr; then
-        FASTCGI_INCLUDE="-I$WANT_FASTCGI/include"
-        FASTCGI_LDFLAGS="-L$WANT_FASTCGI/lib"
+    if test "$WANT_FASTCGI" != "yes"; then
+        if test x_$WANT_FASTCGI != x_/usr; then
+            FASTCGI_INCLUDE="-I$WANT_FASTCGI/include"
+            FASTCGI_LDFLAGS="-L$WANT_FASTCGI/lib"
+        fi
     fi
+    AC_CHECK_HEADER([fcgio.h],,
+        AC_MSG_ERROR([unable to find FastCGI header files]))
     FASTCGI_LIBS="-lfcgi -lfcgi++"
-    AC_CHECK_HEADER([fcgio.h])
 fi
 
 AC_SUBST(FASTCGI_INCLUDE)
@@ -390,7 +392,7 @@ if test "$need_default" = "yes"; then
   # ask the daemon for the version and set parameters
   AC_MSG_CHECKING(default apache version)
   httpd="`$xs -q SBINDIR`/`$xs -q TARGET`"
-  if test "x$httpd" != "x"; then
+  if test "x$httpd" != "x" && test -f $httpd ; then
      v=`$httpd -v|$SED -n -e 's/.*Apache\/\.*//p'`
      case $v in
        1.3*)   [enable_apache_13]=yes