diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/configure.in b/configure.in index bbcbb71c..de75e532 100644 --- a/configure.in +++ b/configure.in @@ -317,16 +317,34 @@ AS_IF([test "x$with_ldap" != "xno"], [ ]) dnl Check for headers used by check_ide_smart -AC_CHECK_HEADER(linux/hdreg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) -if test "$FOUNDINCLUDE" = "yes" ; then - AC_CHECK_HEADER(linux/types.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) -fi +case $host in + *linux*) + AC_CHECK_HEADER(linux/hdreg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) + if test "$FOUNDINCLUDE" = "yes" ; then + AC_CHECK_HEADER(linux/types.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) + fi + if test "$FOUNDINCLUDE" = "no" ; then + AC_MSG_WARN([Skipping check_ide_smart plugin.]) + AC_MSG_WARN([check_ide_smart requires linux/hdreg.h and linux/types.h.]) + fi + ;; + *netbsd*) + AC_CHECK_HEADER(dev/ata/atareg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) + if test "$FOUNDINCLUDE" = "yes" ; then + AC_CHECK_HEADER(dev/ic/wdcreg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) + fi + if test "$FOUNDINCLUDE" = "no" ; then + AC_MSG_WARN([Skipping check_ide_smart plugin.]) + AC_MSG_WARN([check_ide_smart requires dev/ata/atareg.h and dev/ic/wdcreg.h]) + fi + ;; + *) + AC_MSG_WARN([Skipping check_ide_smart plugin.]) + AC_MSG_WARN([check_ide_smart works only on Linux and NetBSD]) +esac if test "$FOUNDINCLUDE" = "yes" ; then EXTRAS="$EXTRAS check_ide_smart" -else - AC_MSG_WARN([Skipping check_ide_smart plugin.]) - AC_MSG_WARN([check_ide_smart is linux specific. It requires linux/hdreg.h and linux/types.h.]) fi dnl Check for mysql libraries |