pier 02/05/03 02:38:52
Modified: webapp/support wa_apxs.m4 wa_util.m4
Log:
Added WA_PATH_PROG (cuz' AC_PATH_PROG is just plain silly), and HTTPD
version discovery.
Revision Changes Path
1.6 +27 -14 jakarta-tomcat-connectors/webapp/support/wa_apxs.m4
Index: wa_apxs.m4
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/support/wa_apxs.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- wa_apxs.m4 1 May 2002 20:58:36 -0000 1.5
+++ wa_apxs.m4 3 May 2002 09:38:52 -0000 1.6
@@ -57,7 +57,7 @@
dnl --------------------------------------------------------------------------
dnl Author Pier Fumagalli <[EMAIL PROTECTED]>
-dnl Version $Id: wa_apxs.m4,v 1.5 2002/05/01 20:58:36 pier Exp $
+dnl Version $Id: wa_apxs.m4,v 1.6 2002/05/03 09:38:52 pier Exp $
dnl --------------------------------------------------------------------------
dnl --------------------------------------------------------------------------
@@ -86,19 +86,7 @@
esac
])
AC_MSG_RESULT([${wa_apxs_tempval}])
- if test -x "${wa_apxs_tempval}" ; then
- wa_apxs_tempdir=`dirname "${wa_apxs_tempval}"`
- wa_apxs_tempfil=`basename "${wa_apxs_tempval}"`
- WA_PATH_DIR([wa_apxs_tempdir],[${wa_apxs_tempdir}],[apxs])
- $1="${wa_apxs_tempdir}/${wa_apxs_tempfil}"
- else
- AC_PATH_PROG($1,[${wa_apxs_tempval}])
- fi
-
- if test -z "${$1}" ; then
- AC_MSG_ERROR([cannot find apxs utility "${wa_apxs_tempval}"])
- exit 1
- fi
+ WA_PATH_PROG([$1],[${wa_apxs_tempval}],[apxs])
unset wa_apxs_tempval
])
@@ -153,4 +141,29 @@
AC_MSG_RESULT([${wa_apxs_get_tempval}])
WA_APPEND([$1],[${wa_apxs_get_tempval}])
unset wa_apxs_get_tempval
+ ])
+
+dnl --------------------------------------------------------------------------
+dnl WA_APXS_SERVER
+dnl Retrieve the HTTP server version via APXS
+dnl $1 => Environment variable where the info string will be stored
+dnl $2 => Name of the APXS script (as returned by WA_APXS)
+dnl --------------------------------------------------------------------------
+AC_DEFUN(
+ [WA_APXS_SERVER],
+ [
+ WA_APXS_GET([wa_apxs_server_sbindir],[$2],[SBINDIR])
+ WA_APXS_GET([wa_apxs_server_target],[$2],[TARGET])
+ wa_apxs_server_daemon="${wa_apxs_server_sbindir}/${wa_apxs_server_target}"
+ WA_PATH_PROG([wa_apxs_server_daemon],[${wa_apxs_server_daemon}],[httpd])
+ AC_MSG_CHECKING([httpd version])
+ wa_apxs_server_info="`${wa_apxs_server_daemon} -v | head -1`"
+ wa_apxs_server_info="`echo ${wa_apxs_server_info} | cut -d: -f2`"
+ wa_apxs_server_info="`echo ${wa_apxs_server_info}`"
+ AC_MSG_RESULT([${wa_apxs_server_info}])
+ $1="${wa_apxs_server_info}"
+ unset wa_apxs_server_sbindir
+ unset wa_apxs_server_target
+ unset wa_apxs_server_daemon
+ unset wa_apxs_server_info
])
1.5 +30 -2 jakarta-tomcat-connectors/webapp/support/wa_util.m4
Index: wa_util.m4
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/support/wa_util.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- wa_util.m4 1 May 2002 20:58:36 -0000 1.4
+++ wa_util.m4 3 May 2002 09:38:52 -0000 1.5
@@ -57,7 +57,7 @@
dnl --------------------------------------------------------------------------
dnl Author Pier Fumagalli <[EMAIL PROTECTED]>
-dnl Version $Id: wa_util.m4,v 1.4 2002/05/01 20:58:36 pier Exp $
+dnl Version $Id: wa_util.m4,v 1.5 2002/05/03 09:38:52 pier Exp $
dnl --------------------------------------------------------------------------
dnl --------------------------------------------------------------------------
@@ -105,6 +105,34 @@
])
dnl --------------------------------------------------------------------------
+dnl WA_PATH_PROG
+dnl Resolve the FULL path name of an executable.
+dnl $1 => The variable where the full path name will be stored.
+dnl $2 => The executable to resolve.
+dnl $3 => The description of what we're trying to locate.
+dnl --------------------------------------------------------------------------
+AC_DEFUN(
+ [WA_PATH_PROG],
+ [
+ wa_path_prog_tempval="`echo $2`"
+ if test -x "${wa_path_prog_tempval}" ; then
+ wa_path_prog_tempdir=`dirname "${wa_path_prog_tempval}"`
+ wa_path_prog_tempfil=`basename "${wa_path_prog_tempval}"`
+ WA_PATH_DIR([wa_path_prog_tempdir],[${wa_path_prog_tempdir}],[$3])
+ $1="${wa_path_prog_tempdir}/${wa_path_prog_tempfil}"
+ else
+ AC_PATH_PROG($1,[${wa_path_prog_tempval}])
+ fi
+ AC_MSG_CHECKING([for $3 binary path])
+ if test -z "${$1}" ; then
+ AC_MSG_ERROR([cannot find $3 "${wa_apxs_tempval}"])
+ exit 1
+ fi
+ AC_MSG_RESULT([${$1}])
+ ])
+
+
+dnl --------------------------------------------------------------------------
dnl WA_PATH_DIR
dnl Resolve the FULL path name of a directory.
dnl $1 => The variable where the full path name will be stored.
@@ -114,7 +142,7 @@
AC_DEFUN(
[WA_PATH_DIR],
[
- AC_MSG_CHECKING([for $3 path])
+ AC_MSG_CHECKING([for $3 directory path])
wa_path_dir_tempval="`echo $2`"
if test -d "${wa_path_dir_tempval}" ; then
wa_path_dir_curdir="`pwd`"
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>