summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Estienne <sebastien.estienne@gmail.com>2006-04-01 12:14:17 +0000
committerSebastien Estienne <sebastien.estienne@gmail.com>2006-04-01 12:14:17 +0000
commit8b1e1fcd11c613b04e6f3d9885ea752502339062 (patch)
tree0c194f929e53d2638649fed9648181a62e667fdd
parenta8d6caaa05da75bdd7cb408f867fc5e72edb303e (diff)
check for apache 2
git-svn-id: file:///home/lennart/svn/public/mod_dnssd/trunk@54 634eccf8-0006-0410-930e-e16565b0b7de
-rw-r--r--configure.ac35
1 files changed, 32 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index c32ec64..4eaf062 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@
# implied. See the License for the specific language governing
# permissions and limitations under the License.
-AC_PREREQ(2.57)
+AC_PREREQ(2.59)
AC_INIT([mod_dnssd],[0.4],[mzzbqqaffq (at) 0pointer (dot) net])
AC_CONFIG_SRCDIR([src/mod_dnssd.c])
AC_CONFIG_HEADERS([config.h])
@@ -51,8 +51,7 @@ if test "x$GCC" = "xyes" ; then
AC_MSG_CHECKING([checking whether rtnetlink.h can be included with -std=c99])
OLDCFLAGS="$CFLAGS"
CFLAGS="-std=c99"
- AC_TRY_COMPILE([#include <linux/rtnetlink.h>], [],
- use_stdc99=yes, use_stdc99=no)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <linux/rtnetlink.h>]], [[]])],[use_stdc99=yes],[use_stdc99=no])
if test x"$use_stdc99" = xyes; then
DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS"
@@ -91,6 +90,36 @@ AC_ARG_WITH(apachectl,
[ AC_PATH_PROGS(APACHECTL, [apache2ctl apachectl], "notfound", "$withval:$PATH") ],
[ AC_PATH_PROGS(APACHECTL, [apache2ctl apachectl], "notfound", "/usr/local/apache/bin:/usr/local/bin:/usr/sbin:$PATH")])
+
+#
+# Checking that we have Apache version 2
+#
+
+# saving current CFLAGS
+CFLAGS_SAVED=$CFLAGS
+CFLAGS="$CFLAGS -I`${APXS} -q INCLUDEDIR`"
+
+AC_MSG_CHECKING([for Apache 2])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <ap_release.h>
+]], [[
+ char *version = AP_SERVER_BASEREVISION;
+]])],[
+ APACHE_2="yes"
+],[
+ APACHE_2="no"
+])
+
+AC_MSG_RESULT($APACHE_2)
+
+if test "x$APACHE_2" = "xno" ; then
+ AC_MSG_ERROR([*** Sorry, you need apache 2 ***])
+fi
+
+# restoring CFLAGS
+CFLAGS=$CFLAGS_SAVED
+
+
PKG_CHECK_MODULES(AVAHI, [ avahi-client >= 0.6 ])
AC_SUBST(AVAHI_CFLAGS)
AC_SUBST(AVAHI_LIBS)