diff options
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac index bec50cb4..abd90413 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -205,32 +205,46 @@ fi | |||
| 205 | dnl Check for PostgreSQL libraries | 205 | dnl Check for PostgreSQL libraries |
| 206 | _SAVEDLIBS="$LIBS" | 206 | _SAVEDLIBS="$LIBS" |
| 207 | _SAVEDCPPFLAGS="$CPPFLAGS" | 207 | _SAVEDCPPFLAGS="$CPPFLAGS" |
| 208 | case $host in | ||
| 209 | *openbsd*) | ||
| 210 | _CRYPTLIB="crypto" | ||
| 211 | ;; | ||
| 212 | *) | ||
| 213 | _CRYPTLIB="crypt" | ||
| 214 | esac | ||
| 215 | |||
| 208 | AC_ARG_WITH(pgsql, | 216 | AC_ARG_WITH(pgsql, |
| 209 | ACX_HELP_STRING([--with-pgsql=DIR], | 217 | ACX_HELP_STRING([--with-pgsql=DIR], |
| 210 | [sets path to pgsql installation]), | 218 | [sets path to pgsql installation]), |
| 211 | PGSQL=$withval,) | 219 | PGSQL=$withval,) |
| 212 | AC_CHECK_LIB(crypt,main) | 220 | AC_CHECK_LIB(crypt,main) |
| 213 | if test "$ac_cv_lib_crypt_main" = "yes" -a "x$PGSQL" != "xno"; then | 221 | AC_CHECK_LIB(crypto,main) |
| 222 | if test \( "$ac_cv_lib_crypt_main" = "yes" -o "$ac_cv_lib_crypto_main" = "yes" \) -a "x$PGSQL" != "xno"; then | ||
| 214 | if test -n "$PGSQL"; then | 223 | if test -n "$PGSQL"; then |
| 215 | LDFLAGS="$LDFLAGS -L$PGSQL/lib" | 224 | LDFLAGS="$LDFLAGS -L$PGSQL/lib" |
| 216 | CPPFLAGS="$CPPFLAGS -I$PGSQL/include" | 225 | CPPFLAGS="$CPPFLAGS -I$PGSQL/include" |
| 217 | fi | 226 | fi |
| 218 | AC_CHECK_LIB(pq,PQsetdbLogin,,,-lcrypt) | 227 | AC_CHECK_LIB(pq,PQsetdbLogin,,,"-l$_CRYPTLIB") |
| 219 | if test "$ac_cv_lib_pq_PQsetdbLogin" = "yes"; then | 228 | if test "$ac_cv_lib_pq_PQsetdbLogin" = "yes"; then |
| 220 | AC_CHECK_HEADERS(pgsql/libpq-fe.h) | 229 | AC_CHECK_HEADERS(pgsql/libpq-fe.h) |
| 221 | AC_CHECK_HEADERS(postgresql/libpq-fe.h) | 230 | AC_CHECK_HEADERS(postgresql/libpq-fe.h) |
| 222 | AC_CHECK_HEADERS(libpq-fe.h) | 231 | AC_CHECK_HEADERS(libpq-fe.h) |
| 223 | if [[ -n "$PGSQL" -a "$ac_cv_header_libpq_fe_h" = "yes" ]]; then | 232 | if [[ -n "$PGSQL" -a "$ac_cv_header_libpq_fe_h" = "yes" ]]; then |
| 224 | PGLIBS="-L$PGSQL/lib -lpq -lcrypt" | 233 | PGLIBS="-L$PGSQL/lib -lpq -l$_CRYPTLIB" |
| 225 | PGINCLUDE="-I$PGSQL/include" | 234 | PGINCLUDE="-I$PGSQL/include" |
| 226 | elif test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then | 235 | elif test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then |
| 227 | PGLIBS="-lpq -lcrypt" | 236 | PGLIBS="-lpq -l$_CRYPTLIB" |
| 228 | PGINCLUDE="-I/usr/include/pgsql" | 237 | PGINCLUDE="-I/usr/include/pgsql" |
| 229 | elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then | 238 | elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then |
| 230 | PGLIBS="-L$PGSQL/lib -lpq -lcrypt" | 239 | PGLIBS="-L$PGSQL/lib -lpq -l$_CRYPTLIB" |
| 231 | PGINCLUDE="-I/usr/include/postgresql" | 240 | case $host in |
| 241 | *openbsd*) | ||
| 242 | PGINCLUDE="-I$PGSQL/include/postgresql" ;; | ||
| 243 | *) | ||
| 244 | PGINCLUDE="-I/usr/include/postgresql" | ||
| 245 | esac | ||
| 232 | elif test "$ac_cv_header_libpq_fe_h" = "yes"; then | 246 | elif test "$ac_cv_header_libpq_fe_h" = "yes"; then |
| 233 | PGLIBS="-L$PGSQL/lib -lpq -lcrypt" | 247 | PGLIBS="-L$PGSQL/lib -lpq -l$_CRYPTLIB" |
| 234 | PGINCLUDE="-I$PGSQL/include" | 248 | PGINCLUDE="-I$PGSQL/include" |
| 235 | fi | 249 | fi |
| 236 | if test -z "$PGINCLUDE"; then | 250 | if test -z "$PGINCLUDE"; then |
| @@ -796,7 +810,7 @@ elif ps axwo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \ | |||
| 796 | then | 810 | then |
| 797 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" | 811 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" |
| 798 | ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" | 812 | ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" |
| 799 | ac_cv_ps_format="%s %d %d %d %d %d %f %s %s %n" | 813 | ac_cv_ps_format="%s %u %d %d %d %d %f %s %s %n" |
| 800 | ac_cv_ps_cols=10 | 814 | ac_cv_ps_cols=10 |
| 801 | AC_MSG_RESULT([$ac_cv_ps_command]) | 815 | AC_MSG_RESULT([$ac_cv_ps_command]) |
| 802 | 816 | ||
| @@ -1470,17 +1484,6 @@ AC_ARG_WITH(snmpgetnext_command, | |||
| 1470 | AS_IF([test -n "$PATH_TO_SNMPGET"], [ | 1484 | AS_IF([test -n "$PATH_TO_SNMPGET"], [ |
| 1471 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) | 1485 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) |
| 1472 | EXTRAS="$EXTRAS check_hpjd" | 1486 | EXTRAS="$EXTRAS check_hpjd" |
| 1473 | |||
| 1474 | dnl PATH_TO_SNMPGETNEXT is used unconditionally in check_snmp: | ||
| 1475 | dnl | ||
| 1476 | dnl https://github.com/nagios-plugins/nagios-plugins/issues/788 | ||
| 1477 | dnl | ||
| 1478 | AS_IF([test -n "$PATH_TO_SNMPGETNEXT"], [ | ||
| 1479 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT",[path to snmpgetnext binary]) | ||
| 1480 | EXTRAS="$EXTRAS check_snmp\$(EXEEXT)" | ||
| 1481 | ], [ | ||
| 1482 | AC_MSG_WARN([Get snmpgetnext from https://net-snmp.sourceforge.io/ to build the check_snmp plugin]) | ||
| 1483 | ]) | ||
| 1484 | ], [ | 1487 | ], [ |
| 1485 | AC_MSG_WARN([Get snmpget from https://net-snmp.sourceforge.io/ to build the check_hpjd and check_snmp plugins]) | 1488 | AC_MSG_WARN([Get snmpget from https://net-snmp.sourceforge.io/ to build the check_hpjd and check_snmp plugins]) |
| 1486 | ]) | 1489 | ]) |
| @@ -1493,6 +1496,16 @@ else | |||
| 1493 | AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins]) | 1496 | AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins]) |
| 1494 | fi | 1497 | fi |
| 1495 | 1498 | ||
| 1499 | dnl Check whether DES encryption is available (might not on RHEL) | ||
| 1500 | AC_COMPILE_IFELSE( | ||
| 1501 | [AC_LANG_PROGRAM( | ||
| 1502 | [[#include <net-snmp/net-snmp-config.h> | ||
| 1503 | #include <net-snmp/net-snmp-includes.h>]], [[oid *foo = usmDESPrivProtocol;]] | ||
| 1504 | )], | ||
| 1505 | [AC_DEFINE(HAVE_USM_DES_PRIV_PROTOCOL,1,Define whether we have DES Privacy Protocol)], | ||
| 1506 | [] | ||
| 1507 | ) | ||
| 1508 | |||
| 1496 | AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) | 1509 | AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) |
| 1497 | AC_PATH_PROG(PATH_TO_QSTAT,qstat) | 1510 | AC_PATH_PROG(PATH_TO_QSTAT,qstat) |
| 1498 | AC_ARG_WITH(qstat_command, | 1511 | AC_ARG_WITH(qstat_command, |
| @@ -1833,11 +1846,6 @@ if test -n "$PATH_TO_APTGET" ; then | |||
| 1833 | fi | 1846 | fi |
| 1834 | 1847 | ||
| 1835 | 1848 | ||
| 1836 | if test -f $srcdir/plugins/check_nt.c ; then | ||
| 1837 | EXTRAS="$EXTRAS check_nt\$(EXEEXT)" | ||
| 1838 | fi | ||
| 1839 | |||
| 1840 | |||
| 1841 | dnl used in check_dhcp | 1849 | dnl used in check_dhcp |
| 1842 | AC_CHECK_HEADERS(sys/sockio.h) | 1850 | AC_CHECK_HEADERS(sys/sockio.h) |
| 1843 | 1851 | ||
