[Nagiosplug-checkins] CVS: nagiosplug configure.in,1.9,1.10
Karl DeBisschop
kdebisschop at users.sourceforge.net
Tue Oct 15 21:42:02 CEST 2002
Update of /cvsroot/nagiosplug/nagiosplug
In directory usw-pr-cvs1:/tmp/cvs-serv26420
Modified Files:
configure.in
Log Message:
work with newer automake, begin swithc to asprintf
Index: configure.in
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/configure.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** configure.in 16 Sep 2002 00:47:17 -0000 1.9
--- configure.in 16 Oct 2002 04:41:06 -0000 1.10
***************
*** 1,4 ****
--- 1,5 ----
dnl Process this file with autoconf to produce a configure script.
include(`aclocal.m4')
+ include(`getloadavg.m4')
AC_REVISION ($Revision$)
AC_INIT(Helper.pm)
***************
*** 36,40 ****
AC_SUBST(SUPPORT)
! AC_ARG_PROGRAM
dnl AC_ARG_WITH(nonposix_state_defs,--with-nonposix-state-defs uses POSIXLY incorrect states for netsaint < 0.0.7b2,,AC_DEFINE(POSIX_STATE_DEFS))
--- 37,41 ----
AC_SUBST(SUPPORT)
! dnl AC_ARG_PROGRAM
dnl AC_ARG_WITH(nonposix_state_defs,--with-nonposix-state-defs uses POSIXLY incorrect states for netsaint < 0.0.7b2,,AC_DEFINE(POSIX_STATE_DEFS))
***************
*** 43,47 ****
AC_ARG_WITH(cgiurl,--with-cgiurl=<dir> sets URL for cgi programs,cgiurl=$withval,cgiurl=/nagios/cgi-bin)
CGIURL="$cgiurl"
! AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL")
AC_ARG_WITH(nagios_user,--with-nagios-user=<user> sets user name to run nagios,nagios_usr=$withval,nagios_usr=nagios)
--- 44,48 ----
AC_ARG_WITH(cgiurl,--with-cgiurl=<dir> sets URL for cgi programs,cgiurl=$withval,cgiurl=/nagios/cgi-bin)
CGIURL="$cgiurl"
! AC_DEFINE_UNQUOTED(CGIURL,"$CGIURL",[URL of CGI programs])
AC_ARG_WITH(nagios_user,--with-nagios-user=<user> sets user name to run nagios,nagios_usr=$withval,nagios_usr=nagios)
***************
*** 77,81 ****
dnl
! AC_FUNC_GETLOADAVG
AC_CHECK_LIB(dce,main,SOCKETLIBS="$SOCKETLIBS -ldce")
--- 78,82 ----
dnl
! AC_FUNC_GETLOADAVG(plugins)
AC_CHECK_LIB(dce,main,SOCKETLIBS="$SOCKETLIBS -ldce")
***************
*** 247,251 ****
if test "$FOUNDINCLUDE" = "yes"; then
AC_SUBST(SSLLIBS)
! AC_DEFINE(HAVE_SSL)
fi
fi
--- 248,252 ----
if test "$FOUNDINCLUDE" = "yes"; then
AC_SUBST(SSLLIBS)
! AC_DEFINE(HAVE_SSL,1,[Define if SSL libraries are found])
fi
fi
***************
*** 269,272 ****
--- 270,275 ----
AC_TYPE_SIGNAL
+ dnl AC_CHECK_MEMBER(struct timeb.millitm,[AC_DEFINE(HAVE_STRUCT_TIMEB_MILLITM)],,[#include <sys/timeb.h>])
+
dnl EXTRA_LIBRARIES="libgetopt.a libsnprintf.a"
dnl noinst_LIBRARIES="libgetopt.a libsnprintf.a"
***************
*** 279,311 ****
dnl AC_SUBST(libsnprintf_a_SOURCES)
AC_MSG_CHECKING(for getopt_long)
AC_TRY_COMPILE([#include <getopt.h>
! #include <stdlib.h>],
! [int option_index=0;
! static struct option *long_options;
! getopt_long(0,NULL,"+h",long_options,&option_index);],
! [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(yes)],
! [AC_DEFINE(HAVE_GETOPT_H) AC_DEFINE(HAVE_GETOPT_LONG) AC_MSG_RESULT(no) import_sources=getopt])
AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
! AC_CHECK_FUNC(vsnprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
dnl Checks for library functions.
! AC_CHECK_FUNCS(select socket strdup strstr strtod strtol strtoul)
AC_MSG_CHECKING(for type of socket size)
AC_TRY_COMPILE([#include <stdlib.h>
! #include <sys/types.h>
! #include <sys/socket.h>
! ],
! [int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);],
! [AC_DEFINE(SOCKET_SIZE_TYPE, size_t) AC_MSG_RESULT(size_t)],
! [AC_DEFINE(SOCKET_SIZE_TYPE, int) AC_MSG_RESULT(int)])
if test -f "/proc/loadavg"
then
! AC_DEFINE(HAVE_PROC_LOADAVG)
! AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg")
fi
--- 282,322 ----
dnl AC_SUBST(libsnprintf_a_SOURCES)
+ dnl We used to not do long options unless a compatible lib was found
+ dnl Now we provide code and make libgetopt if native is not suitable
AC_MSG_CHECKING(for getopt_long)
AC_TRY_COMPILE([#include <getopt.h>
! #include <stdlib.h>],
! [int option_index=0;
! static struct option *long_options;
! getopt_long(0,NULL,"+h",long_options,&option_index);],
! [AC_DEFINE(HAVE_GETOPT_H,1,[Define if getopt headers are found])
! AC_DEFINE(HAVE_GETOPT_LONG,1,[Define if getopt_long_only() is found])
! AC_MSG_RESULT(yes)],
! [AC_DEFINE(HAVE_GETOPT_H,1,[Define if getopt headers are found])
! AC_DEFINE(HAVE_GETOPT_LONG,1,[Define if getopt_long_only() is found])
! AC_MSG_RESULT(no)
! import_sources=getopt])
AC_CHECK_FUNCS(getopt_long_only,,LIBS="$LIBS -lgetopt" DEPLIBS="$DEPLIBS libgetopt.a")
! AC_CHECK_FUNC(asprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
dnl Checks for library functions.
! AC_CHECK_FUNCS(select socket strdup strstr strtod strtol strtoul gettimeofday)
AC_MSG_CHECKING(for type of socket size)
AC_TRY_COMPILE([#include <stdlib.h>
! #include <sys/types.h>
! #include <sys/socket.h>],
! [int a = send(1, (const void *) buffer, (size_t *) 0, (int *) 0);],
! [AC_DEFINE(SOCKET_SIZE_TYPE, size_t, [Define type of socket size])
! AC_MSG_RESULT(size_t)],
! [AC_DEFINE(SOCKET_SIZE_TYPE, int, [Define type of socket size])
! AC_MSG_RESULT(int)])
if test -f "/proc/loadavg"
then
! AC_DEFINE(HAVE_PROC_LOADAVG,1,[Define if /proc/loadavg or similar exists])
! AC_DEFINE_UNQUOTED(PROC_LOADAVG,"/proc/loadavg"[Location of /proc/loadavg])
fi
***************
*** 761,774 ****
then
echo "found swap command"
! AC_DEFINE(HAVE_SWAP)
AC_PATH_PROG(PATH_TO_SWAP,swap)
! AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$PATH_TO_SWAP -l")
if [swap -l 2>/dev/null | egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" >/dev/null]
then
! AC_DEFINE_UNQUOTED(SWAP_FORMAT,[" %*d %*s %*d,%*d %*d %*d %d %d"])
echo " using IRIX format"
elif [swap -l 2>/dev/null | egrep -i "^swapfile +dev +swaplo +blocks +free" >/dev/null]
then
! AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %*[[0-9,-]] %*d %d %d"])
echo " using Solaris format"
fi
--- 772,785 ----
then
echo "found swap command"
! AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found])
AC_PATH_PROG(PATH_TO_SWAP,swap)
! AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$PATH_TO_SWAP -l"[Path to swap/swapinfo binary, with any args])
if [swap -l 2>/dev/null | egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" >/dev/null]
then
! AC_DEFINE_UNQUOTED(SWAP_FORMAT,[" %*d %*s %*d,%*d %*d %*d %d %d"],[Format string for parsing swap output])
echo " using IRIX format"
elif [swap -l 2>/dev/null | egrep -i "^swapfile +dev +swaplo +blocks +free" >/dev/null]
then
! AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %*[[0-9,-]] %*d %d %d"],[Format string for parsing swap output])
echo " using Solaris format"
fi
***************
*** 777,786 ****
then
echo "found swapinfo command"
! AC_DEFINE(HAVE_SWAP)
AC_PATH_PROG(PATH_TO_SWAP,swapinfo)
! AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$PATH_TO_SWAP -k")
if [swapinfo -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null]
then
! AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %d %*d %d"])
echo " using FreeBSD format"
fi
--- 788,797 ----
then
echo "found swapinfo command"
! AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found])
AC_PATH_PROG(PATH_TO_SWAP,swapinfo)
! AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$PATH_TO_SWAP -k",[Path to swap/swapinfo binary, with any args])
if [swapinfo -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null]
then
! AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %d %*d %d"],[Format string for parsing swap output])
echo " using FreeBSD format"
fi
***************
*** 789,793 ****
AC_PATH_PROG(PATH_TO_DIG,dig)
! AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG")
if test -n "$PATH_TO_DIG"; then
EXTRAS="$EXTRAS check_dig"
--- 800,804 ----
AC_PATH_PROG(PATH_TO_DIG,dig)
! AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG",[Path to dig command, if present])
if test -n "$PATH_TO_DIG"; then
EXTRAS="$EXTRAS check_dig"
***************
*** 817,821 ****
AC_SUBST(DEPLIBS)
! AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"${VERSION}")
AC_OUTPUT(Makefile subst plugins/Makefile plugins-scripts/Makefile plugins-scripts/subst plugins-scripts/utils.pm plugins-scripts/utils.sh command.cfg test.pl,echo timestamp > plugins/stamp-h1;echo timestamp > plugins/stamp-h2;echo timestamp > plugins/stamp-h3;echo timestamp > plugins/stamp-h4;echo timestamp > plugins/stamp-h5;echo timestamp > plugins/stamp-h6;PATH=.:..:$PATH subst.sh command.cfg)
--- 828,832 ----
AC_SUBST(DEPLIBS)
! AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"${VERSION}",[package version])
AC_OUTPUT(Makefile subst plugins/Makefile plugins-scripts/Makefile plugins-scripts/subst plugins-scripts/utils.pm plugins-scripts/utils.sh command.cfg test.pl,echo timestamp > plugins/stamp-h1;echo timestamp > plugins/stamp-h2;echo timestamp > plugins/stamp-h3;echo timestamp > plugins/stamp-h4;echo timestamp > plugins/stamp-h5;echo timestamp > plugins/stamp-h6;PATH=.:..:$PATH subst.sh command.cfg)
More information about the Commits
mailing list