kopia lustrzana https://gitlab.com/sane-project/backends
Added a switch to disable libusb. Removed switch to enable ipv6
uncondinionally. Check for sys/poll.h.merge-requests/1/head
rodzic
284ff7a543
commit
749ceed2e6
|
@ -16,6 +16,10 @@
|
|||
addresses and website as dead. Fixed AT3 misdectection that was
|
||||
on the TODO list for some time. Initialize global variables in
|
||||
sane_init.
|
||||
* acinclude.m4 aclocal.m4 configure configure.in
|
||||
include/sane/config.h.in frontend/saned.c: Added a switch to
|
||||
disable libusb. Removed switch to enable ipv6 uncondinionally.
|
||||
Check for sys/poll.h.
|
||||
|
||||
2003-03-31 Henning Meier-Geinitz <henning@meier-geinitz.de>
|
||||
|
||||
|
|
45
acinclude.m4
45
acinclude.m4
|
@ -349,22 +349,17 @@ AC_DEFUN([SANE_CHECK_GPHOTO2],
|
|||
# Check for AF_INET6, determines whether or not to enable IPv6 support
|
||||
AC_DEFUN([SANE_CHECK_IPV6],
|
||||
[
|
||||
AC_MSG_CHECKING([whether to enable IPv6])
|
||||
AC_ARG_ENABLE(ipv6,
|
||||
[ --enable-ipv6 enable IPv6 (with IPv4) support
|
||||
--disable-ipv6 disable IPv6 support],
|
||||
[ case "$enableval" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
ipv6=no
|
||||
;;
|
||||
*) AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([ENABLE_IPV6], 1, [Define to 1 if the system supports IPv6])
|
||||
ipv6=yes
|
||||
;;
|
||||
esac ],
|
||||
|
||||
AC_TRY_COMPILE([
|
||||
AC_MSG_CHECKING([whether to enable IPv6])
|
||||
AC_ARG_ENABLE(ipv6,
|
||||
AC_HELP_STRING([--disable-ipv6],[disable IPv6 support]),
|
||||
[ if test "$enableval" = "no" ; then
|
||||
AC_MSG_RESULT([no, manually disabled])
|
||||
ipv6=no
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$ipv6" != "no" ; then
|
||||
AC_TRY_COMPILE([
|
||||
#define INET6
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h> ], [
|
||||
|
@ -373,15 +368,15 @@ AC_ARG_ENABLE(ipv6,
|
|||
exit(1);
|
||||
else
|
||||
exit(0);
|
||||
],
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([ENABLE_IPV6], 1, [Define to 1 if the system supports IPv6])
|
||||
ipv6=yes,
|
||||
AC_MSG_RESULT(no)
|
||||
ipv6=no,
|
||||
AC_MSG_RESULT(no)
|
||||
ipv6=no
|
||||
))
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([ENABLE_IPV6], 1, [Define to 1 if the system supports IPv6])
|
||||
ipv6=yes
|
||||
],[
|
||||
AC_MSG_RESULT([no (couldn't compile test program)])
|
||||
ipv6=no
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
#
|
||||
|
|
|
@ -361,22 +361,17 @@ AC_DEFUN([SANE_CHECK_GPHOTO2],
|
|||
# Check for AF_INET6, determines whether or not to enable IPv6 support
|
||||
AC_DEFUN([SANE_CHECK_IPV6],
|
||||
[
|
||||
AC_MSG_CHECKING([whether to enable IPv6])
|
||||
AC_ARG_ENABLE(ipv6,
|
||||
[ --enable-ipv6 enable IPv6 (with IPv4) support
|
||||
--disable-ipv6 disable IPv6 support],
|
||||
[ case "$enableval" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
ipv6=no
|
||||
;;
|
||||
*) AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([ENABLE_IPV6], 1, [Define to 1 if the system supports IPv6])
|
||||
ipv6=yes
|
||||
;;
|
||||
esac ],
|
||||
|
||||
AC_TRY_COMPILE([
|
||||
AC_MSG_CHECKING([whether to enable IPv6])
|
||||
AC_ARG_ENABLE(ipv6,
|
||||
AC_HELP_STRING([--disable-ipv6],[disable IPv6 support]),
|
||||
[ if test "$enableval" = "no" ; then
|
||||
AC_MSG_RESULT([no, manually disabled])
|
||||
ipv6=no
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$ipv6" != "no" ; then
|
||||
AC_TRY_COMPILE([
|
||||
#define INET6
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h> ], [
|
||||
|
@ -385,15 +380,15 @@ AC_ARG_ENABLE(ipv6,
|
|||
exit(1);
|
||||
else
|
||||
exit(0);
|
||||
],
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([ENABLE_IPV6], 1, [Define to 1 if the system supports IPv6])
|
||||
ipv6=yes,
|
||||
AC_MSG_RESULT(no)
|
||||
ipv6=no,
|
||||
AC_MSG_RESULT(no)
|
||||
ipv6=no
|
||||
))
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([ENABLE_IPV6], 1, [Define to 1 if the system supports IPv6])
|
||||
ipv6=yes
|
||||
],[
|
||||
AC_MSG_RESULT([no (couldn't compile test program)])
|
||||
ipv6=no
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
#
|
||||
|
|
|
@ -468,7 +468,7 @@ ac_includes_default="\
|
|||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS V_MAJOR V_MINOR V_REV PACKAGE VERSION NUMBER_VERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE CPP EGREP SANE_CONFIG_PATH MSGFMT XGETTEXT MSGMERGE INCLUDES LINKER_RPATH DL_LIB DYNAMIC_FLAG HAVE_GPHOTO2 ac_ct_HAVE_GPHOTO2 ALLOCA LIBOBJS LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LIBTOOL DC210 DC240 DJPEG CANON_PP HPSJ5S GPHOTO2 PINT QCAM V4L NET SANED SM3600 SNAPSCAN DLL_PRELOAD PNM INSTALL_TRANSLATIONS SELECTED_BACKENDS DISTCLEAN_FILES LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS V_MAJOR V_MINOR V_REV PACKAGE VERSION NUMBER_VERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE CPP EGREP SANE_CONFIG_PATH MSGFMT XGETTEXT MSGMERGE INCLUDES LINKER_RPATH DL_LIB DYNAMIC_FLAG HAVE_GPHOTO2 ac_ct_HAVE_GPHOTO2 ALLOCA LIBOBJS LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LIBTOOL DC210 DC240 DJPEG CANON_PP HPSJ5S GPHOTO2 PINT QCAM V4L NET SANED SNAPSCAN DLL_PRELOAD PNM SM3600 INSTALL_TRANSLATIONS SELECTED_BACKENDS DISTCLEAN_FILES LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
|
@ -1011,7 +1011,7 @@ Optional Features:
|
|||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--enable-warnings turn on tons of compiler warnings (GCC only)
|
||||
--enable-ipv6 enable IPv6 (with IPv4) support
|
||||
--disable-libusb disable support for libusb
|
||||
--disable-ipv6 disable IPv6 support
|
||||
--enable-static=PKGS build static libraries default=no
|
||||
--enable-shared=PKGS build shared libraries default=yes
|
||||
|
@ -5618,6 +5618,7 @@ fi
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for ac_header in fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \
|
||||
|
@ -5627,7 +5628,7 @@ for ac_header in fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \
|
|||
camlib.h os2.h sys/socket.h sys/io.h gscdds.h sys/hw.h \
|
||||
sys/types.h sys/scsi/scsi.h sys/scsi/sgdefs.h sys/scsi/targets/scgio.h \
|
||||
apollo/scsi.h sys/sdi_comm.h sys/passthrudef.h linux/ppdev.h usb.h \
|
||||
sys/bitypes.h sys/sem.h
|
||||
sys/bitypes.h sys/sem.h sys/poll.h
|
||||
do
|
||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||
|
@ -8225,7 +8226,19 @@ cat >>confdefs.h <<\_ACEOF
|
|||
_ACEOF
|
||||
|
||||
fi
|
||||
if test "${ac_cv_header_usb_h}" = "yes" ; then
|
||||
|
||||
USE_LIBUSB=yes
|
||||
# Check whether --enable-libusb or --disable-libusb was given.
|
||||
if test "${enable_libusb+set}" = set; then
|
||||
enableval="$enable_libusb"
|
||||
|
||||
if eval "test x$enable_libusb = xno"; then
|
||||
USE_LIBUSB=
|
||||
fi
|
||||
|
||||
fi;
|
||||
|
||||
if test "${ac_cv_header_usb_h}" = "yes" && test "$USE_LIBUSB" = "yes" ; then
|
||||
|
||||
echo "$as_me:$LINENO: checking for usb_get_busses in -lusb" >&5
|
||||
echo $ECHO_N "checking for usb_get_busses in -lusb... $ECHO_C" >&6
|
||||
|
@ -8305,29 +8318,21 @@ fi
|
|||
|
||||
if test "$ac_cv_func_getnameinfo" = "yes" && test "$ac_cv_func_getaddrinfo" = "yes" ; then
|
||||
|
||||
echo "$as_me:$LINENO: checking whether to enable IPv6" >&5
|
||||
echo "$as_me:$LINENO: checking whether to enable IPv6" >&5
|
||||
echo $ECHO_N "checking whether to enable IPv6... $ECHO_C" >&6
|
||||
# Check whether --enable-ipv6 or --disable-ipv6 was given.
|
||||
# Check whether --enable-ipv6 or --disable-ipv6 was given.
|
||||
if test "${enable_ipv6+set}" = set; then
|
||||
enableval="$enable_ipv6"
|
||||
case "$enableval" in
|
||||
no)
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
ipv6=no
|
||||
;;
|
||||
*) echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
if test "$enableval" = "no" ; then
|
||||
echo "$as_me:$LINENO: result: no, manually disabled" >&5
|
||||
echo "${ECHO_T}no, manually disabled" >&6
|
||||
ipv6=no
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define ENABLE_IPV6 1
|
||||
_ACEOF
|
||||
fi;
|
||||
|
||||
ipv6=yes
|
||||
;;
|
||||
esac
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
if test "$ipv6" != "no" ; then
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
|
@ -8364,24 +8369,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define ENABLE_IPV6 1
|
||||
_ACEOF
|
||||
|
||||
ipv6=yes
|
||||
ipv6=yes
|
||||
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
ipv6=no
|
||||
|
||||
echo "$as_me:$LINENO: result: no (couldn't compile test program)" >&5
|
||||
echo "${ECHO_T}no (couldn't compile test program)" >&6
|
||||
ipv6=no
|
||||
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest.$ac_ext
|
||||
fi;
|
||||
fi
|
||||
|
||||
else
|
||||
ipv6="no"
|
||||
|
@ -9564,7 +9573,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
|
|||
case $host in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 9567 "configure"' > conftest.$ac_ext
|
||||
echo '#line 9576 "configure"' > conftest.$ac_ext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -10093,7 +10102,7 @@ chmod -w .
|
|||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
|
||||
compiler_c_o=no
|
||||
if { (eval echo configure:10096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
|
||||
if { (eval echo configure:10105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
if test -s out/conftest.err; then
|
||||
|
@ -11925,7 +11934,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 11928 "configure"
|
||||
#line 11937 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -12023,7 +12032,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 12026 "configure"
|
||||
#line 12035 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -12835,14 +12844,6 @@ else
|
|||
fi
|
||||
|
||||
|
||||
if test "${HAVE_LIBUSB}" = "yes" ; then
|
||||
echo "enabling SM3600 backend"
|
||||
SM3600=sm3600
|
||||
else
|
||||
echo "disabling SM3600 backend"
|
||||
SM3600=
|
||||
fi
|
||||
|
||||
if test "${ac_cv_header_sys_sem_h}" = "no" ; then
|
||||
echo "disabling SnapScan backend"
|
||||
SNAPSCAN=
|
||||
|
@ -12906,6 +12907,15 @@ if test "${enable_parport_directio+set}" = set; then
|
|||
|
||||
fi;
|
||||
|
||||
if test "${HAVE_LIBUSB}" = "yes" ; then
|
||||
echo "enabling SM3600 backend"
|
||||
SM3600=sm3600
|
||||
else
|
||||
echo "disabling SM3600 backend"
|
||||
SM3600=
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-translations or --disable-translations was given.
|
||||
if test "${enable_translations+set}" = set; then
|
||||
enableval="$enable_translations"
|
||||
|
@ -13634,10 +13644,10 @@ s,@QCAM@,$QCAM,;t t
|
|||
s,@V4L@,$V4L,;t t
|
||||
s,@NET@,$NET,;t t
|
||||
s,@SANED@,$SANED,;t t
|
||||
s,@SM3600@,$SM3600,;t t
|
||||
s,@SNAPSCAN@,$SNAPSCAN,;t t
|
||||
s,@DLL_PRELOAD@,$DLL_PRELOAD,;t t
|
||||
s,@PNM@,$PNM,;t t
|
||||
s,@SM3600@,$SM3600,;t t
|
||||
s,@INSTALL_TRANSLATIONS@,$INSTALL_TRANSLATIONS,;t t
|
||||
s,@SELECTED_BACKENDS@,$SELECTED_BACKENDS,;t t
|
||||
s,@DISTCLEAN_FILES@,$DISTCLEAN_FILES,;t t
|
||||
|
|
33
configure.in
33
configure.in
|
@ -101,7 +101,7 @@ AC_CHECK_HEADERS(fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \
|
|||
camlib.h os2.h sys/socket.h sys/io.h gscdds.h sys/hw.h \
|
||||
sys/types.h sys/scsi/scsi.h sys/scsi/sgdefs.h sys/scsi/targets/scgio.h \
|
||||
apollo/scsi.h sys/sdi_comm.h sys/passthrudef.h linux/ppdev.h usb.h \
|
||||
sys/bitypes.h sys/sem.h)
|
||||
sys/bitypes.h sys/sem.h sys/poll.h)
|
||||
AC_CHECK_HEADERS([asm/io.h],,,[#include <sys/types.h>])
|
||||
SANE_CHECK_MISSING_HEADERS
|
||||
SANE_V4L_VERSION
|
||||
|
@ -196,8 +196,20 @@ dnl ***********************************************************************
|
|||
if test -c /dev/urandom ; then
|
||||
AC_DEFINE(HAVE_DEV_URANDOM, 1, [Is /dev/urandom available?])
|
||||
fi
|
||||
|
||||
dnl libusb on enabled by default (if found)
|
||||
USE_LIBUSB=yes
|
||||
AC_ARG_ENABLE(libusb,
|
||||
AC_HELP_STRING([--disable-libusb],
|
||||
[disable support for libusb]),
|
||||
[
|
||||
if eval "test x$enable_libusb = xno"; then
|
||||
USE_LIBUSB=
|
||||
fi
|
||||
])
|
||||
|
||||
dnl we need both libusb header and a libusb providing usb_get_busses
|
||||
if test "${ac_cv_header_usb_h}" = "yes" ; then
|
||||
if test "${ac_cv_header_usb_h}" = "yes" && test "$USE_LIBUSB" = "yes" ; then
|
||||
AC_CHECK_LIB(usb, usb_get_busses)
|
||||
if test "${ac_cv_lib_usb_usb_get_busses}" = "yes" ; then
|
||||
HAVE_LIBUSB="yes"
|
||||
|
@ -311,14 +323,6 @@ else
|
|||
fi
|
||||
AC_SUBST(NET)
|
||||
AC_SUBST(SANED)
|
||||
if test "${HAVE_LIBUSB}" = "yes" ; then
|
||||
echo "enabling SM3600 backend"
|
||||
SM3600=sm3600
|
||||
else
|
||||
echo "disabling SM3600 backend"
|
||||
SM3600=
|
||||
fi
|
||||
AC_SUBST(SM3600)
|
||||
if test "${ac_cv_header_sys_sem_h}" = "no" ; then
|
||||
echo "disabling SnapScan backend"
|
||||
SNAPSCAN=
|
||||
|
@ -375,6 +379,15 @@ AC_ARG_ENABLE(parport-directio,
|
|||
fi
|
||||
])
|
||||
|
||||
if test "${HAVE_LIBUSB}" = "yes" ; then
|
||||
echo "enabling SM3600 backend"
|
||||
SM3600=sm3600
|
||||
else
|
||||
echo "disabling SM3600 backend"
|
||||
SM3600=
|
||||
fi
|
||||
AC_SUBST(SM3600)
|
||||
|
||||
AC_ARG_ENABLE(translations,
|
||||
AC_HELP_STRING([--disable-translations],
|
||||
[don't install translations of backend options]),
|
||||
|
|
|
@ -64,7 +64,9 @@
|
|||
#include <sys/param.h>
|
||||
#include <sys/socket.h>
|
||||
#ifdef SANED_USES_AF_INDEP
|
||||
# include <sys/poll.h>
|
||||
# ifdef HAVE_SYS_POLL_H
|
||||
# include <sys/poll.h>
|
||||
# endif /* HAVE_SYS_POLL_H */
|
||||
#endif /* SANED_USES_AF_INDEP */
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -219,6 +219,9 @@
|
|||
/* Define to 1 if you have the <sys/passthrudef.h> header file. */
|
||||
#undef HAVE_SYS_PASSTHRUDEF_H
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#undef HAVE_SYS_POLL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/scanio.h> header file. */
|
||||
#undef HAVE_SYS_SCANIO_H
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue