diff --git a/configure.in b/configure.in index 1f502e026..a2f425c6e 100644 --- a/configure.in +++ b/configure.in @@ -316,6 +316,46 @@ AC_REPLACE_FUNCS(getenv isfdtype sigprocmask snprintf \ SANE_PROTOTYPES +dnl This should be replaced with AC_CHECK_LIB type macro calls +if test "${ac_cv_header_sys_io_h}" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inb,outb (provided by sys/io.h)" >&5 +$as_echo_n "checking for inb,outb (provided by sys/io.h)... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +inb(0);outb(0,0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + sane_cv_have_sys_io_h_with_inb_outb="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + sane_cv_have_sys_io_h_with_inb_outb="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sys/io.h does not provide inb,outb (non i386/x32/x86_64 arch?)" >&5 +$as_echo "$as_me: WARNING: sys/io.h does not provide inb,outb (non i386/x32/x86_64 arch?)" >&2;} +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$sane_cv_have_sys_io_h_with_inb_outb" = "yes"; then + +$as_echo "#define SANE_HAVE_SYS_IO_H_WITH_INB_OUTB 1" >>confdefs.h + + fi +else + sane_cv_have_sys_io_h_with_inb_outb="no" +fi + + + + if test "$ac_cv_header_os2_h" = "yes" ; then AC_DEFINE(strncasecmp, strnicmp, [Define for OS/2 only]) AC_DEFINE(strcasecmp, stricmp, [Define for OS/2 only])