You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by so...@apache.org on 2005/08/13 01:51:57 UTC

svn commit: r232405 - in /httpd/mod_smtpd/trunk: configure configure.ac

Author: soc-rian
Date: Fri Aug 12 16:51:55 2005
New Revision: 232405

URL: http://svn.apache.org/viewcvs?rev=232405&view=rev
Log:
Added version check to configure.

Modified:
    httpd/mod_smtpd/trunk/configure
    httpd/mod_smtpd/trunk/configure.ac

Modified: httpd/mod_smtpd/trunk/configure
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/configure?rev=232405&r1=232404&r2=232405&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/configure (original)
+++ httpd/mod_smtpd/trunk/configure Fri Aug 12 16:51:55 2005
@@ -1232,6 +1232,8 @@
 
 
 
+
+
 # Define a macro that is used to parse a --with-apxs parameter
 # The macro is named "APACHE_DIR"
 
@@ -1298,6 +1300,26 @@
    { (exit 1); exit 1; }; }
 		{ { echo "$as_me:$LINENO: error: *** Use the --with-apxs option with the full path to apxs" >&5
 echo "$as_me: error: *** Use the --with-apxs option with the full path to apxs" >&2;}
+   { (exit 1); exit 1; }; }
+	fi
+
+
+	min_apache_version=2.0
+	AP_BIN=`$APXS_BIN -q BINDIR`
+	our_apache_version=`$AP_BIN/httpd -v | grep version | tr -dc ^0-9.`
+
+	echo "$as_me:$LINENO: checking for Apache version >= $min_apache_version" >&5
+echo $ECHO_N "checking for Apache version >= $min_apache_version... $ECHO_C" >&6
+
+	if test "$our_apache_version" \> "$min_apache_version" ||
+	   test "$our_apache_version" = "$min_apache_version"; then
+		echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+	else
+		echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+		{ { echo "$as_me:$LINENO: error: *** Apache version $min_apache_version not found!" >&5
+echo "$as_me: error: *** Apache version $min_apache_version not found!" >&2;}
    { (exit 1); exit 1; }; }
 	fi
 

Modified: httpd/mod_smtpd/trunk/configure.ac
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/configure.ac?rev=232405&r1=232404&r2=232405&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/configure.ac (original)
+++ httpd/mod_smtpd/trunk/configure.ac Fri Aug 12 16:51:55 2005
@@ -1,6 +1,22 @@
 # Required initializer
 AC_INIT(mod_smtpd, 0.9)
 
+AC_DEFUN([CHECK_VERSION],[dnl
+	min_apache_version=ifelse([$1], ,no,$1)
+	AP_BIN=`$APXS_BIN -q BINDIR`
+	our_apache_version=`$AP_BIN/httpd -v | grep version | tr -dc [^0-9.]`
+
+	AC_MSG_CHECKING(for Apache version >= $min_apache_version)
+	
+	if test "$our_apache_version" \> "$min_apache_version" ||
+	   test "$our_apache_version" = "$min_apache_version"; then
+		AC_MSG_RESULT(yes)
+	else
+		AC_MSG_RESULT(no)
+		AC_MSG_ERROR([*** Apache version $min_apache_version not found!])
+	fi
+])
+
 # Define a macro that is used to parse a --with-apxs parameter
 # The macro is named "APACHE_DIR"
 AC_DEFUN([APACHE_DIR],[dnl
@@ -27,6 +43,8 @@
 
 # Now call the APACHE_DIR macro that was just specified
 APACHE_DIR
+
+CHECK_VERSION(2.0)
 
 # Write the Makefile
 AC_OUTPUT(Makefile)