--- configure.in.orig Mon Dec 1 03:55:32 2003 +++ configure.in Sat Nov 27 13:52:10 2004 @@ -10,7 +10,7 @@ RELEASE=1 AC_SUBST(RELEASE) -AC_PREFIX_DEFAULT(/usr/local/nagios) +dnl AC_PREFIX_DEFAULT(/usr/local/nagios) dnl Figure out how to invoke "install" and what install options to use. AC_PROG_INSTALL @@ -71,8 +71,6 @@ with_nagios_group=nagios) AC_SUBST(with_nagios_user) AC_SUBST(with_nagios_group) -INSTALL_OPTS="-o $with_nagios_user -g $with_nagios_group" -AC_SUBST(INSTALL_OPTS) AC_ARG_WITH(trusted_path, ACX_HELP_STRING([--with-trusted-path=PATH], @@ -181,25 +179,32 @@ LIBS="$_SAVEDLIBS" CPPFLAGS="$_SAVEDCPPFLAGS" +AC_ARG_ENABLE(radius,--enable-radius compile check_radius) +if test x$enable_radius = xyes; then dnl Check for radius libraries _SAVEDLIBS="$LIBS" -AC_CHECK_LIB(radiusclient,rc_read_config) +AC_CHECK_LIB(radiusclient,rc_read_config,,,-L${LOCALBASE}/lib) if test "$ac_cv_lib_radiusclient_rc_read_config" = "yes"; then EXTRAS="$EXTRAS check_radius" - RADIUSLIBS="-lradiusclient" + RADIUSLIBS="-L${LOCALBASE}/lib -lradiusclient"\ + RADIUSINCLUDE="-I${LOCALBASE}/include" AC_SUBST(RADIUSLIBS) + AC_SUBST(RADIUSINCLUDE) else AC_MSG_WARN([Skipping radius plugin]) AC_MSG_WARN([install radius libs to compile this plugin (see REQUIREMENTS).]) fi LIBS="$_SAVEDLIBS" +fi +AC_ARG_ENABLE(ldap,--enable-ldap compile check_ldap) +if test x$enable_ldap = xyes; then dnl Check for LDAP libraries _SAVEDLIBS="$LIBS" -AC_CHECK_LIB(ldap,main,,,-llber) -if test "$ac_cv_lib_ldap_main" = "yes"; then - LDAPLIBS="-lldap -llber"\ - LDAPINCLUDE="-I/usr/include/ldap" +AC_CHECK_LIB(ldap,ldap_simple_bind,,,-L${LOCALBASE}/lib -llber) +if test "$ac_cv_lib_ldap_ldap_simple_bind" = "yes"; then + LDAPLIBS="-L${LOCALBASE}/lib -lldap -llber"\ + LDAPINCLUDE="-I${LOCALBASE}/include" AC_SUBST(LDAPLIBS) AC_SUBST(LDAPINCLUDE) AC_CHECK_FUNCS(ldap_set_option) @@ -209,6 +214,7 @@ AC_MSG_WARN([install LDAP libs to compile this plugin (see REQUIREMENTS).]) fi LIBS="$_SAVEDLIBS" +fi dnl Check for mysql libraries @@ -251,7 +257,7 @@ AC_MSG_WARN([Skipping mysql plugin]) AC_MSG_WARN([install mysql client libs to compile this plugin (see REQUIREMENTS).]) fi -CPPFLAGS="$_SAVEDCPPFLAGS" +CPPFLAGS="$_SAVEDCPPFLAGS $MYSQLINCLUDE" LIBS="$_SAVEDLIBS" dnl Check for OpenSSL location @@ -658,7 +664,7 @@ egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PPID"] >/dev/null then ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" - ac_cv_ps_command="$PATH_TO_PS waxco 'state uid ppid vsz rss pcpu command command'" + ac_cv_ps_command="$PATH_TO_PS -axwo 'state uid ppid vsz rss pcpu command command'" ac_cv_ps_format="%s %d %d %d %d %f %s %n" ac_cv_ps_cols=8 AC_MSG_RESULT([$ac_cv_ps_command]) @@ -1184,6 +1190,8 @@ AC_DEFINE_UNQUOTED(WHO_COMMAND,"$ac_cv_path_to_who", [path and arguments for invoking 'who']) +AC_ARG_ENABLE(snmp,--enable-snmp compile check_hpjd and check_snmp) +if test x$enable_snmp = xyes; then AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) if test -x "$PATH_TO_SNMPGET" then @@ -1206,7 +1214,10 @@ else AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins]) fi +fi +AC_ARG_ENABLE(qstat,--enable-qstat compile check_game) +if test x$enable_qstat = xyes; then AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) AC_PATH_PROG(PATH_TO_QSTAT,qstat) @@ -1228,7 +1239,10 @@ AC_DEFINE_UNQUOTED(PATH_TO_QSTAT,"$ac_cv_path_to_qstat", [path to qstat/quakestat]) fi +fi +AC_ARG_ENABLE(fping,--enable-fping compile check_fping) +if test x$enable_fping = xyes; then AC_PATH_PROG(PATH_TO_FPING,fping) if test -x "$PATH_TO_FPING" then @@ -1236,6 +1250,7 @@ EXTRAS="$EXTRAS check_fping" else AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) +fi fi AC_PATH_PROG(PATH_TO_SSH,ssh)