diff options
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 59 |
1 files changed, 22 insertions, 37 deletions
diff --git a/configure.ac b/configure.ac index 705183a2..ae7eb30b 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 |
| @@ -461,30 +475,6 @@ AC_ARG_WITH([ipv6], | |||
| 461 | [AS_HELP_STRING([--with-ipv6], [support IPv6 @<:@default=check@:>@])], | 475 | [AS_HELP_STRING([--with-ipv6], [support IPv6 @<:@default=check@:>@])], |
| 462 | [], [with_ipv6=check]) | 476 | [], [with_ipv6=check]) |
| 463 | 477 | ||
| 464 | dnl Check for AF_INET6 support - unistd.h required for Darwin | ||
| 465 | if test "$with_ipv6" != "no"; then | ||
| 466 | AC_CACHE_CHECK([for IPv6 support], np_cv_sys_ipv6, [ | ||
| 467 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_UNISTD_H | ||
| 468 | #include <unistd.h> | ||
| 469 | #endif | ||
| 470 | #include <netinet/in.h> | ||
| 471 | #include <sys/socket.h>]], [[struct sockaddr_in6 sin6; | ||
| 472 | void *p; | ||
| 473 | |||
| 474 | sin6.sin6_family = AF_INET6; | ||
| 475 | sin6.sin6_port = 587; | ||
| 476 | p = &sin6.sin6_addr;]])],[np_cv_sys_ipv6=yes],[np_cv_sys_ipv6=no]) | ||
| 477 | ]) | ||
| 478 | if test "$np_cv_sys_ipv6" = "no" -a "$with_ipv6" != "check"; then | ||
| 479 | AC_MSG_FAILURE([--with-ipv6 was given, but test for IPv6 support failed]) | ||
| 480 | fi | ||
| 481 | if test "$np_cv_sys_ipv6" = "yes"; then | ||
| 482 | AC_DEFINE(USE_IPV6,1,[Enable IPv6 support]) | ||
| 483 | fi | ||
| 484 | with_ipv6="$np_cv_sys_ipv6" | ||
| 485 | fi | ||
| 486 | |||
| 487 | |||
| 488 | dnl Checks for Kerberos. Must come before openssl checks for Redhat EL 3 | 478 | dnl Checks for Kerberos. Must come before openssl checks for Redhat EL 3 |
| 489 | AC_CHECK_HEADERS(krb5.h,FOUNDINCLUDE=yes,FOUNDINCLUDE=no) | 479 | AC_CHECK_HEADERS(krb5.h,FOUNDINCLUDE=yes,FOUNDINCLUDE=no) |
| 490 | if test "$FOUNDINCLUDE" = "no"; then | 480 | if test "$FOUNDINCLUDE" = "no"; then |
| @@ -796,7 +786,7 @@ elif ps axwo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \ | |||
| 796 | then | 786 | then |
| 797 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" | 787 | 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'" | 788 | ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" |
| 799 | ac_cv_ps_format="%s %u %d %d %d %d %f %s %s %n" | 789 | ac_cv_ps_format="%s %d %d %d %d %d %f %s %s %n" |
| 800 | ac_cv_ps_cols=10 | 790 | ac_cv_ps_cols=10 |
| 801 | AC_MSG_RESULT([$ac_cv_ps_command]) | 791 | AC_MSG_RESULT([$ac_cv_ps_command]) |
| 802 | 792 | ||
| @@ -1832,11 +1822,6 @@ if test -n "$PATH_TO_APTGET" ; then | |||
| 1832 | fi | 1822 | fi |
| 1833 | 1823 | ||
| 1834 | 1824 | ||
| 1835 | if test -f $srcdir/plugins/check_nt.c ; then | ||
| 1836 | EXTRAS="$EXTRAS check_nt\$(EXEEXT)" | ||
| 1837 | fi | ||
| 1838 | |||
| 1839 | |||
| 1840 | dnl used in check_dhcp | 1825 | dnl used in check_dhcp |
| 1841 | AC_CHECK_HEADERS(sys/sockio.h) | 1826 | AC_CHECK_HEADERS(sys/sockio.h) |
| 1842 | 1827 | ||
