Add --disable-dynamic/--disable-preload and update docs

Options were in README but removed at some point.  They
are useful so add them back.

Document BACKENDS and PRELOADABLE_BACKENDS variables in
README as well as in configure --help output.
merge-requests/1/head
Chris Bagwell 2011-11-08 21:28:30 -06:00
rodzic c64249fc31
commit e7f01c3b36
15 zmienionych plików z 91 dodań i 17 usunięć

Wyświetl plik

@ -4,6 +4,14 @@
If it needs to have two behaviors then we need to
create two libraries. Now preloading is working in
libsane.so again and disabled in libsane-dll.so.
* configure.in, configure, README, */Makefile.*:
Update README to describe use of BACKENDS and
PRELOADABLE_BACKENDS to limit backend compiles.
Also, mark those in configure.in as variables so
they show up in "configure --help".
Add back the useful --disable-dynamic and
--disable-preload that appear to have been removed
at some point but are documented in README.
2011-11-07 Chris Bagwell <chris at cnpbagwell dot com>
* ltmain.sh: Disable sane's soname libtool hack for

Wyświetl plik

@ -138,6 +138,7 @@ AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BACKENDS = @BACKENDS@
BACKEND_CONFS_ENABLED = @BACKEND_CONFS_ENABLED@
BACKEND_LIBS_ENABLED = @BACKEND_LIBS_ENABLED@
BACKEND_MANS_ENABLED = @BACKEND_MANS_ENABLED@

29
README
Wyświetl plik

@ -45,7 +45,7 @@ libraries and their respective header files are available before running
configure. On some Linux distributions the header files are part of separate
packages (e.g. usb.h in libusb-devel or libusb-dev). These must also be
installed.
- libusb (>=0.1.8): Strongly recommended if you use a USB scanner.
Some backends won't work without libusb at all.
@ -87,18 +87,19 @@ configure options, there are the following SANE specific options:
Disable dynamic loading of backends (in the dll backend).
configure normally turns on dynamic loading when it
can find the appropriate header files and libraries
(<dlfcn.h> and -dl).
(<dlfcn.h> and -ldl).
--enable-static
Use static libraries (turned off by default).
--enable-preload
Preload backends into DLL backend. This is useful for debugging,
when dynamic loading is unavailable, or to reduce runtime linking
overheads. If dynamic loading or shared libraries are unavailable
or disabled, this option is turned on automatically.
--enable-scsibuffersize=N
when dynamic loading is unavailable, to reduce runtime linking
overheads, or when you only want to distribute a single DLL with
all backends available. If dynamic loading or shared libraries are
unavailable or disabled, this option is turned on automatically.
--enable-scsibuffersize=N
Specify the buffer size of the buffer for SCSI commands. The default
value is 131072 bytes (128 kb). This may be changed at runtime by
setting the environment variable SANE_SG_BUFFERSIZE to the desired
@ -118,11 +119,23 @@ configure options, there are the following SANE specific options:
Means, that some backends will use a lockfile for allowing multiple
access to one scanner. This is useful, i.e. one frontend is scanning
the button status and another one will scan. The path to the lock
files is define by --localstatedir at the configure step and is
files is define by --localstatedir at the configure step and is
$localstatedir/lock/sane. The default group is uucp and can be
changed by using --with-group=newgroup. If you do not want any
backend to use a lockfile, simply use --disable-locking.
To limit the backends that are compiled, set the variable BACKENDS to
the list of backends to compile. The following will limit compiling
to the epson2 and fujitsu backends:
./configure BACKENDS="epson2 fujitsu"
To limit the backends that are preloaded into the DLL, set the variable
PRELOADABLE_BACKENDS. The following will limit compiling to the epson2
and fujitsu backends but only preloads the epson2 backend:
./configure BACKENDS="epson2 futjisu" PRELOADABLE_BACKENDS="epson2"
In addition to these configuration options, there are some more SANE-specific
options and many standard-options. To get a description of available options,
invoke configure with option --help.

Wyświetl plik

@ -1501,6 +1501,7 @@ AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BACKENDS = @BACKENDS@
BACKEND_CONFS_ENABLED = @BACKEND_CONFS_ENABLED@
BACKEND_LIBS_ENABLED = @BACKEND_LIBS_ENABLED@
BACKEND_MANS_ENABLED = @BACKEND_MANS_ENABLED@

39
configure vendored
Wyświetl plik

@ -628,6 +628,7 @@ BACKEND_LIBS_ENABLED
SANEI_SANEI_JPEG_LO
HAVE_JPEG_FALSE
HAVE_JPEG_TRUE
BACKENDS
COMPILE_SANED_FALSE
COMPILE_SANED_TRUE
configdir
@ -809,6 +810,8 @@ enable_libusb
enable_scsibuffersize
enable_scsi_directio
enable_ipv6
enable_dynamic
enable_preload
enable_static
enable_shared
with_pic
@ -840,7 +843,9 @@ LIBV4L_LIBS
AVAHI_CFLAGS
AVAHI_LIBS
LIBUSB_1_0_CFLAGS
LIBUSB_1_0_LIBS'
LIBUSB_1_0_LIBS
BACKENDS
PRELOADABLE_BACKENDS'
# Initialize some variables set by options.
@ -1480,6 +1485,8 @@ Optional Features:
--enable-scsi-directio enable SCSI direct IO (Linux only, dangerous, see
README.linux)
--disable-ipv6 disable IPv6 support
--disable-dynamic Disable dynamic loading of backends
--disable-preload Disable preloading of backends
--enable-static[=PKGS] build static libraries [default=no]
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-fast-install[=PKGS]
@ -1534,6 +1541,9 @@ Some influential environment variables:
C compiler flags for LIBUSB_1_0, overriding pkg-config
LIBUSB_1_0_LIBS
linker flags for LIBUSB_1_0, overriding pkg-config
BACKENDS list of backends to compile
PRELOADABLE_BACKENDS
list of backends to preload into single DLL
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@ -10140,6 +10150,21 @@ else
ipv6="no"
fi
# Check whether --enable-dynamic was given.
if test "${enable_dynamic+set}" = set; then :
enableval=$enable_dynamic; enable_dynamic=$enableval
else
enable_dynamic=yes
fi
# Check whether --enable-preload was given.
if test "${enable_preload+set}" = set; then :
enableval=$enable_preload; enable_preload=$enableval
else
enable_preload=auto
fi
enable_win32_dll=yes
case $host in
@ -17566,6 +17591,7 @@ ALL_BACKENDS="abaton agfafocus apple artec artec_eplus48u as6e \
# are in automatic mode then remove backend from list instead.
user_selected_backends="yes"
if eval "test x$enable_local_backends = xno"; then
BACKENDS="net"
else
@ -17713,10 +17739,13 @@ for backend in ${BACKENDS} ; do
done
if test "${enable_shared}" = "no"; then
enable_preload=yes
if test "${enable_preload}" = "auto"; then
if test "${enable_shared}" = "no" || test "${enable_dynamic}" != "yes"; then
enable_preload=yes
fi
fi
if test "${enable_dynamic}" != yes || test "${enable_preload}" = "yes"; then
if test "${enable_preload}" = "yes"; then
echo "preloading backends into DLL"
# If user specifies backends manually then cause configure
@ -17731,7 +17760,7 @@ if test "${enable_dynamic}" != yes || test "${enable_preload}" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Manually selected preloadable backends: ${PRELOADABLE_BACKENDS}" >&5
$as_echo "$as_me: Manually selected preloadable backends: ${PRELOADABLE_BACKENDS}" >&6;}
else
PRELOADABLE_BACKENDS="$ALL_BACKENDS"
PRELOADABLE_BACKENDS="$BACKENDS"
user_selected_backends="no"
fi
fi

Wyświetl plik

@ -508,6 +508,15 @@ fi
dnl ***********************************************************************
dnl initialize libtool
dnl ***********************************************************************
AC_ARG_ENABLE(dynamic,
AC_HELP_STRING([--disable-dynamic],
[Disable dynamic loading of backends]),
[enable_dynamic=$enableval], [enable_dynamic=yes])
AC_ARG_ENABLE(preload,
AC_HELP_STRING([--disable-preload],
[Disable preloading of backends]),
[enable_preload=$enableval], [enable_preload=auto])
AC_LIBTOOL_WIN32_DLL
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
@ -571,6 +580,7 @@ ALL_BACKENDS="abaton agfafocus apple artec artec_eplus48u as6e \
# are in automatic mode then remove backend from list instead.
user_selected_backends="yes"
AC_ARG_VAR(BACKENDS, [list of backends to compile])
if eval "test x$enable_local_backends = xno"; then
BACKENDS="net"
else
@ -607,10 +617,13 @@ for backend in ${BACKENDS} ; do
done
AC_SUBST(BACKEND_LIBS_ENABLED)
if test "${enable_shared}" = "no"; then
enable_preload=yes
AC_ARG_VAR(PRELOADABLE_BACKENDS, [list of backends to preload into single DLL])
if test "${enable_preload}" = "auto"; then
if test "${enable_shared}" = "no" || test "${enable_dynamic}" != "yes"; then
enable_preload=yes
fi
fi
if test "${enable_dynamic}" != yes || test "${enable_preload}" = "yes"; then
if test "${enable_preload}" = "yes"; then
echo "preloading backends into DLL"
# If user specifies backends manually then cause configure
@ -624,7 +637,7 @@ if test "${enable_dynamic}" != yes || test "${enable_preload}" = "yes"; then
if test "${PRELOADABLE_BACKENDS}" != "" ; then
AC_MSG_NOTICE([Manually selected preloadable backends: ${PRELOADABLE_BACKENDS}])
else
PRELOADABLE_BACKENDS="$ALL_BACKENDS"
PRELOADABLE_BACKENDS="$BACKENDS"
user_selected_backends="no"
fi
fi

Wyświetl plik

@ -92,6 +92,7 @@ AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BACKENDS = @BACKENDS@
BACKEND_CONFS_ENABLED = @BACKEND_CONFS_ENABLED@
BACKEND_LIBS_ENABLED = @BACKEND_LIBS_ENABLED@

Wyświetl plik

@ -100,6 +100,7 @@ AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BACKENDS = @BACKENDS@
BACKEND_CONFS_ENABLED = @BACKEND_CONFS_ENABLED@
BACKEND_LIBS_ENABLED = @BACKEND_LIBS_ENABLED@
BACKEND_MANS_ENABLED = @BACKEND_MANS_ENABLED@

Wyświetl plik

@ -86,6 +86,7 @@ AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BACKENDS = @BACKENDS@
BACKEND_CONFS_ENABLED = @BACKEND_CONFS_ENABLED@
BACKEND_LIBS_ENABLED = @BACKEND_LIBS_ENABLED@
BACKEND_MANS_ENABLED = @BACKEND_MANS_ENABLED@

Wyświetl plik

@ -109,6 +109,7 @@ AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BACKENDS = @BACKENDS@
BACKEND_CONFS_ENABLED = @BACKEND_CONFS_ENABLED@
BACKEND_LIBS_ENABLED = @BACKEND_LIBS_ENABLED@
BACKEND_MANS_ENABLED = @BACKEND_MANS_ENABLED@

Wyświetl plik

@ -85,6 +85,7 @@ AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BACKENDS = @BACKENDS@
BACKEND_CONFS_ENABLED = @BACKEND_CONFS_ENABLED@
BACKEND_LIBS_ENABLED = @BACKEND_LIBS_ENABLED@
BACKEND_MANS_ENABLED = @BACKEND_MANS_ENABLED@

Wyświetl plik

@ -62,6 +62,7 @@ AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BACKENDS = @BACKENDS@
BACKEND_CONFS_ENABLED = @BACKEND_CONFS_ENABLED@
BACKEND_LIBS_ENABLED = @BACKEND_LIBS_ENABLED@
BACKEND_MANS_ENABLED = @BACKEND_MANS_ENABLED@

Wyświetl plik

@ -100,6 +100,7 @@ AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BACKENDS = @BACKENDS@
BACKEND_CONFS_ENABLED = @BACKEND_CONFS_ENABLED@
BACKEND_LIBS_ENABLED = @BACKEND_LIBS_ENABLED@
BACKEND_MANS_ENABLED = @BACKEND_MANS_ENABLED@

Wyświetl plik

@ -59,6 +59,7 @@ AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BACKENDS = @BACKENDS@
BACKEND_CONFS_ENABLED = @BACKEND_CONFS_ENABLED@
BACKEND_LIBS_ENABLED = @BACKEND_LIBS_ENABLED@
BACKEND_MANS_ENABLED = @BACKEND_MANS_ENABLED@

Wyświetl plik

@ -119,6 +119,7 @@ AUTOMAKE = @AUTOMAKE@
AVAHI_CFLAGS = @AVAHI_CFLAGS@
AVAHI_LIBS = @AVAHI_LIBS@
AWK = @AWK@
BACKENDS = @BACKENDS@
BACKEND_CONFS_ENABLED = @BACKEND_CONFS_ENABLED@
BACKEND_LIBS_ENABLED = @BACKEND_LIBS_ENABLED@
BACKEND_MANS_ENABLED = @BACKEND_MANS_ENABLED@