2002-11-29 18:19:58 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script. -*-m4-*-
|
1999-08-09 18:05:39 +00:00
|
|
|
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
|
|
|
dnl When preparing a release, increase the numeric and string version numbers,
|
|
|
|
dnl remove the "-cvs" suffix, and set is_release=yes
|
2005-08-07 10:04:34 +00:00
|
|
|
AC_INIT([sane-backends],[1.0.16],[sane-devel@lists.alioth.debian.org])
|
1999-08-09 18:05:39 +00:00
|
|
|
V_MAJOR=1
|
|
|
|
V_MINOR=0
|
2005-08-07 10:04:34 +00:00
|
|
|
V_REV=16
|
2005-07-31 15:37:53 +00:00
|
|
|
is_release=yes
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
|
|
|
|
|
|
|
AC_CONFIG_HEADERS([include/sane/config.h])
|
2003-04-30 23:00:15 +00:00
|
|
|
AC_PREREQ(2.54)dnl dnl Minimum Autoconf version required.
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_ARG_PROGRAM
|
|
|
|
|
2002-11-29 18:19:58 +00:00
|
|
|
PACKAGE=AC_PACKAGE_NAME
|
|
|
|
VERSION=AC_PACKAGE_VERSION
|
2002-01-08 18:47:26 +00:00
|
|
|
NUMBER_VERSION=${V_MAJOR}.${V_MINOR}.${V_REV}
|
2001-11-04 20:20:48 +00:00
|
|
|
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE",
|
|
|
|
[Define to the name of the distribution.])
|
|
|
|
AC_DEFINE_UNQUOTED(VERSION, "$VERSION",
|
|
|
|
[Define to the version of the distribution.])
|
|
|
|
AC_DEFINE_UNQUOTED(SANE_DLL_V_MAJOR, $V_MAJOR, [SANE DLL major number])
|
|
|
|
AC_DEFINE_UNQUOTED(SANE_DLL_V_MINOR, $V_MINOR, [SANE DLL minor number])
|
|
|
|
AC_DEFINE_UNQUOTED(SANE_DLL_V_BUILD, $V_REV, [SANE DLL revision number])
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_SUBST(V_MAJOR)
|
|
|
|
AC_SUBST(V_MINOR)
|
|
|
|
AC_SUBST(V_REV)
|
1999-08-09 18:05:39 +00:00
|
|
|
AC_SUBST(PACKAGE)
|
|
|
|
AC_SUBST(VERSION)
|
2002-01-08 18:47:26 +00:00
|
|
|
AC_SUBST(NUMBER_VERSION)
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_CANONICAL_BUILD
|
|
|
|
AC_CANONICAL_HOST
|
1999-08-09 18:05:39 +00:00
|
|
|
|
2005-07-15 21:59:25 +00:00
|
|
|
dnl no bloody way to have a decent --docdir...
|
|
|
|
AC_ARG_WITH(docdir,
|
|
|
|
AC_HELP_STRING([--with-docdir=DIR],
|
|
|
|
[documentation @<:@PREFIX/doc/sane-VERSION@:>@]),
|
|
|
|
[
|
|
|
|
docdir="${withval}"
|
|
|
|
AC_SUBST([docdir])dnl
|
|
|
|
], [
|
|
|
|
AC_SUBST([docdir], ['${prefix}/doc/sane-${VERSION}'])dnl
|
|
|
|
])
|
|
|
|
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
1999-08-09 18:05:39 +00:00
|
|
|
dnl Checks for programs.
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
1999-08-09 18:05:39 +00:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_PATH_PROG(SANE_CONFIG_PATH, sane-config, no)
|
|
|
|
AC_PATH_PROG(MSGFMT, msgfmt$EXEEXT, no)
|
|
|
|
AC_PATH_PROG(XGETTEXT, xgettext$EXEEXT, no)
|
|
|
|
AC_PATH_PROG(MSGMERGE, msgmerge$EXEEXT, no)
|
2003-04-30 23:00:15 +00:00
|
|
|
AC_PATH_PROG(LATEX, latex$EXEEXT, no)
|
|
|
|
AC_PATH_PROG(DVIPS, dvips$EXEEXT, no)
|
|
|
|
AC_PATH_PROG(MAKEINDEX, makeindex$EXEEXT, no)
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_SUBST(MSGFMT)
|
|
|
|
AC_SUBST(XGETTEXT)
|
|
|
|
AC_SUBST(MSGMERGE)
|
2003-04-30 23:00:15 +00:00
|
|
|
AC_SUBST(LATEX)
|
|
|
|
AC_SUBST(DVIPS)
|
|
|
|
AC_SUBST(MAKEINDEX)
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
|
|
|
dnl set compiler/linker flags
|
|
|
|
dnl ***********************************************************************
|
|
|
|
INCLUDES="${INCLUDES} -I/usr/local/include"
|
|
|
|
AC_SUBST(INCLUDES)
|
|
|
|
SANE_SET_CFLAGS([$is_release])
|
|
|
|
SANE_SET_LDFLAGS
|
|
|
|
SANE_LINKER_RPATH
|
|
|
|
CPPFLAGS="${CPPFLAGS} -DPATH_SANE_CONFIG_DIR=\$(configdir) \
|
|
|
|
-DPATH_SANE_DATA_DIR=\$(datadir) \
|
2005-04-01 13:54:32 +00:00
|
|
|
-DPATH_SANE_LOCK_DIR=\$(localstatedir) \
|
2002-12-04 17:48:10 +00:00
|
|
|
-DV_MAJOR=${V_MAJOR} -DV_MINOR=${V_MINOR}"
|
|
|
|
|
|
|
|
dnl ***********************************************************************
|
|
|
|
dnl Checks for unix variants
|
|
|
|
dnl ***********************************************************************
|
|
|
|
AC_GNU_SOURCE
|
1999-08-09 18:05:39 +00:00
|
|
|
AC_AIX
|
|
|
|
AC_MINIX
|
|
|
|
AC_ISC_POSIX
|
|
|
|
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
|
|
|
dnl Checks for libraries
|
|
|
|
dnl ***********************************************************************
|
|
|
|
SANE_CHECK_DLL_LIB
|
|
|
|
dnl Checks for Backend libraries.
|
|
|
|
AC_CHECK_LIB(m,sqrt)
|
|
|
|
AC_CHECK_LIB(scsi, scsireq_enter) # FreeBSD needs this
|
|
|
|
AC_CHECK_LIB(cam, cam_open_device) # FreeBSD 3+ needs this
|
|
|
|
dnl IRIX sometimes has SYSVR3/4 network DSOs, but we do not need or want
|
|
|
|
dnl to use them!
|
|
|
|
if test "`uname`" != "IRIX" -a "`uname`" != "IRIX64"; then
|
2005-07-15 21:59:25 +00:00
|
|
|
AC_SEARCH_LIBS(gethostbyaddr, nsl bind)
|
|
|
|
AC_SEARCH_LIBS(socket, socket)
|
|
|
|
AC_SEARCH_LIBS(syslog, syslog be) # OS/2 needs -lsyslog, BeOS needs -lbe
|
2002-12-04 17:48:10 +00:00
|
|
|
fi
|
|
|
|
SANE_CHECK_JPEG
|
|
|
|
SANE_CHECK_IEEE1284
|
2003-10-05 16:00:30 +00:00
|
|
|
SANE_CHECK_PTHREAD
|
2005-04-01 13:54:32 +00:00
|
|
|
SANE_CHECK_LOCKING
|
2002-12-04 17:48:10 +00:00
|
|
|
SANE_CHECK_GPHOTO2
|
|
|
|
dnl check sane to make sure we don't have two installations
|
|
|
|
AC_CHECK_LIB(sane, sane_init, LIBSANE_EXISTS="yes")
|
2002-03-24 14:19:11 +00:00
|
|
|
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
1999-08-09 18:05:39 +00:00
|
|
|
dnl Checks for header files.
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
1999-08-09 18:05:39 +00:00
|
|
|
AC_HEADER_STDC
|
2001-11-04 20:20:48 +00:00
|
|
|
AC_CHECK_HEADERS(fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \
|
2005-07-15 21:59:25 +00:00
|
|
|
sys/time.h sys/shm.h sys/ipc.h sys/signal.h \
|
1999-08-09 18:05:39 +00:00
|
|
|
sys/scanio.h scsi.h sys/scsi.h sys/scsicmd.h sys/scsiio.h \
|
2005-07-30 16:39:00 +00:00
|
|
|
bsd/dev/scsireg.h scsi/sg.h /usr/src/linux/include/scsi/sg.h \
|
2002-04-07 14:50:18 +00:00
|
|
|
camlib.h os2.h sys/socket.h sys/io.h gscdds.h sys/hw.h \
|
2001-11-04 20:20:48 +00:00
|
|
|
sys/types.h sys/scsi/scsi.h sys/scsi/sgdefs.h sys/scsi/targets/scgio.h \
|
2003-04-18 20:10:56 +00:00
|
|
|
apollo/scsi.h sys/sdi_comm.h sys/passthrudef.h linux/ppdev.h \
|
2003-09-24 03:41:48 +00:00
|
|
|
dev/ppbus/ppi.h machine/cpufunc.h usb.h sys/bitypes.h sys/sem.h sys/poll.h \
|
2003-12-21 22:51:42 +00:00
|
|
|
IOKit/cdb/IOSCSILib.h IOKit/scsi-commands/SCSICommandOperationCodes.h \
|
2005-07-15 21:59:25 +00:00
|
|
|
windows.h be/kernel/OS.h be/drivers/USB_scanner.h limits.h sys/ioctl.h asm/types.h)
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_CHECK_HEADERS([asm/io.h],,,[#include <sys/types.h>])
|
2005-07-30 16:39:00 +00:00
|
|
|
AC_CHECK_HEADERS([io/cam/cam.h],,,[#include <io/common/iotypes.h>])
|
|
|
|
|
2002-12-04 17:48:10 +00:00
|
|
|
SANE_CHECK_MISSING_HEADERS
|
1999-08-09 18:05:39 +00:00
|
|
|
|
2004-07-26 15:15:39 +00:00
|
|
|
AC_CHECK_HEADER(resmgr.h,[
|
|
|
|
AC_CHECK_LIB(
|
|
|
|
resmgr,
|
|
|
|
rsm_open_device,[
|
2004-10-06 11:09:14 +00:00
|
|
|
AC_DEFINE(HAVE_RESMGR,1,[define if you have the resmgr library])
|
2004-07-26 15:15:39 +00:00
|
|
|
LIBS="$LIBS -lresmgr"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
|
|
|
dnl Checks for types and structures
|
|
|
|
dnl ***********************************************************************
|
1999-08-09 18:05:39 +00:00
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_TYPE_PID_T
|
|
|
|
AC_CHECK_TYPE(ssize_t, long)
|
2001-11-04 20:20:48 +00:00
|
|
|
SANE_CHECK_U_TYPES
|
1999-08-09 18:05:39 +00:00
|
|
|
|
2002-05-29 05:34:11 +00:00
|
|
|
# from Python, check for "long long" type
|
|
|
|
AC_MSG_CHECKING(for long long support)
|
|
|
|
have_long_long=no
|
|
|
|
AC_TRY_COMPILE([], [long long x; x = (long long)0;], AC_DEFINE(HAVE_LONG_LONG, 1, [Define if the long long type is available.]) have_long_long=yes)
|
|
|
|
AC_MSG_RESULT($have_long_long)
|
|
|
|
|
1999-08-09 18:05:39 +00:00
|
|
|
if test "$ac_cv_header_sys_scsiio_h" = "yes" \
|
|
|
|
-a "$ac_cv_header_scsi_h" = "yes";
|
|
|
|
then
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/scsiio.h>
|
|
|
|
#include <scsi.h>
|
|
|
|
],[scsireq_t req],,
|
2001-11-04 20:20:48 +00:00
|
|
|
AC_DEFINE(scsireq_t, struct scsireq_t,
|
|
|
|
[Define scsireq_t as \`struct scsireq\' if necessary.]))
|
1999-08-09 18:05:39 +00:00
|
|
|
fi
|
|
|
|
|
2001-11-04 20:20:48 +00:00
|
|
|
AC_MSG_CHECKING([for socklen_t in <sys/socket.h>])
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/socket.h>
|
|
|
|
],[socklen_t len],AC_MSG_RESULT(yes),
|
|
|
|
[AC_MSG_RESULT(no); AC_DEFINE(socklen_t,int,
|
|
|
|
[Define socklen_t as \`int\' if necessary.])])
|
2000-11-24 15:24:55 +00:00
|
|
|
|
2002-01-27 18:24:47 +00:00
|
|
|
AC_MSG_CHECKING([for union semun in <sys/sem.h>])
|
|
|
|
AC_TRY_COMPILE([
|
2002-02-02 17:09:00 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/ipc.h>
|
2002-01-27 18:24:47 +00:00
|
|
|
#include <sys/sem.h>
|
|
|
|
],[union semun test_semun],[AC_MSG_RESULT(yes);
|
|
|
|
AC_DEFINE(HAVE_UNION_SEMUN,1,[Define if union semun is available.])],
|
|
|
|
AC_MSG_RESULT(no))
|
|
|
|
|
2002-03-10 14:34:11 +00:00
|
|
|
AC_MSG_CHECKING([for sg_header.target_status in <scsi/sg.h>])
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <scsi/sg.h>
|
|
|
|
],[
|
|
|
|
struct sg_header hdr;
|
|
|
|
hdr.target_status = 1;
|
|
|
|
return 0;
|
|
|
|
],[AC_MSG_RESULT(yes);
|
|
|
|
AC_DEFINE(HAVE_SG_TARGET_STATUS,1,[Define if sg_header.target_status is
|
|
|
|
available.])],
|
|
|
|
AC_MSG_RESULT(no))
|
2002-01-27 18:24:47 +00:00
|
|
|
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_MSG_CHECKING([for struct flock in fcntl.h])
|
|
|
|
AC_EGREP_HEADER([struct flock], fcntl.h, [AC_MSG_RESULT(yes) ;
|
|
|
|
AC_DEFINE(HAVE_STRUCT_FLOCK, 1,
|
|
|
|
[Define if struct flock is available.])], AC_MSG_RESULT(no))
|
2001-11-04 20:20:48 +00:00
|
|
|
|
2003-12-21 22:51:42 +00:00
|
|
|
AC_MSG_CHECKING([for Linux ioctl defines])
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#include <asm/types.h>
|
|
|
|
],[
|
|
|
|
__u32 houba = _IOR('v',14, unsigned long);
|
|
|
|
],[AC_MSG_RESULT(yes);
|
|
|
|
have_linux_ioctl_defines="yes";],AC_MSG_RESULT(no))
|
|
|
|
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
|
|
|
dnl Checks for compiler characteristics
|
|
|
|
dnl ***********************************************************************
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
2001-11-04 20:20:48 +00:00
|
|
|
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
|
|
|
dnl Checks for library functions
|
|
|
|
dnl ***********************************************************************
|
2005-07-15 21:59:25 +00:00
|
|
|
if test "$ac_cv_header_be_kernel_OS_h" = "yes" ; then
|
|
|
|
dnl those are known to be broken in BeOS (BONE)
|
|
|
|
ac_cv_func_getaddrinfo=no
|
|
|
|
ac_cv_func_getnameinfo=no
|
|
|
|
fi
|
2001-11-04 20:20:48 +00:00
|
|
|
AC_FUNC_ALLOCA
|
1999-08-09 18:05:39 +00:00
|
|
|
AC_FUNC_MMAP
|
2003-09-18 05:17:23 +00:00
|
|
|
AC_CHECK_FUNCS(atexit inet_addr inet_aton inet_ntoa ioperm i386_set_ioperm mkdir \
|
2002-02-14 19:34:52 +00:00
|
|
|
scsireq_enter strftime strstr strtod \
|
2003-03-30 19:07:18 +00:00
|
|
|
cfmakeraw tcsendbreak strcasecmp strncasecmp _portaccess \
|
2003-10-22 07:02:36 +00:00
|
|
|
getaddrinfo getnameinfo poll setitimer iopl )
|
2002-02-14 19:34:52 +00:00
|
|
|
AC_REPLACE_FUNCS(getenv inet_ntop inet_pton isfdtype sigprocmask snprintf \
|
2002-02-10 18:35:29 +00:00
|
|
|
strdup strndup strsep usleep vsyslog)
|
2003-01-24 14:06:08 +00:00
|
|
|
SANE_PROTOTYPES
|
2002-07-03 12:09:29 +00:00
|
|
|
if test "$ac_cv_header_os2_h" = "yes" ; then
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_DEFINE(strncasecmp, strnicmp, [Define for OS/2 only])
|
|
|
|
AC_DEFINE(strcasecmp, stricmp, [Define for OS/2 only])
|
2002-07-03 09:00:47 +00:00
|
|
|
fi
|
2005-07-09 13:19:51 +00:00
|
|
|
dnl On OS/2, libc knows getopt
|
|
|
|
AH_BOTTOM([
|
|
|
|
#ifdef __INNOTEK_LIBC__
|
|
|
|
#define ELIDE_CODE 1
|
|
|
|
#endif
|
|
|
|
])
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
|
|
|
dnl checks for system services
|
|
|
|
dnl ***********************************************************************
|
|
|
|
if test -c /dev/urandom ; then
|
|
|
|
AC_DEFINE(HAVE_DEV_URANDOM, 1, [Is /dev/urandom available?])
|
|
|
|
fi
|
2003-04-02 16:21:07 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
])
|
|
|
|
|
2004-11-19 16:44:32 +00:00
|
|
|
dnl we need both libusb header and a libusb providing usb_interrupt_read
|
2003-04-02 16:21:07 +00:00
|
|
|
if test "${ac_cv_header_usb_h}" = "yes" && test "$USE_LIBUSB" = "yes" ; then
|
2004-11-19 16:44:32 +00:00
|
|
|
AC_CHECK_LIB(usb, usb_interrupt_read)
|
|
|
|
if test "${ac_cv_lib_usb_usb_interrupt_read}" = "yes" ; then
|
2002-12-04 17:48:10 +00:00
|
|
|
HAVE_LIBUSB="yes"
|
|
|
|
fi
|
|
|
|
fi
|
2001-04-16 17:23:37 +00:00
|
|
|
|
2003-01-17 12:21:16 +00:00
|
|
|
dnl disable Linux SCSI generic version 3 to avoid 32/64 bit problems
|
2003-01-21 16:02:56 +00:00
|
|
|
if sparc64 -q > /dev/null 2>&1 ; then
|
2003-01-17 12:21:16 +00:00
|
|
|
AC_DEFINE(DISABLE_LINUX_SG_IO, 1, [Should we disable SCSI generic v3?])
|
|
|
|
fi
|
|
|
|
|
2003-03-30 19:07:18 +00:00
|
|
|
dnl check for IPv6 (can be overriden by --enable-ipv6)
|
2003-05-02 09:41:12 +00:00
|
|
|
if test "$ac_cv_func_getnameinfo" = "yes" \
|
2003-05-26 23:33:12 +00:00
|
|
|
&& test "$ac_cv_func_getaddrinfo" = "yes" ; then
|
2003-03-30 19:07:18 +00:00
|
|
|
SANE_CHECK_IPV6
|
|
|
|
else
|
|
|
|
ipv6="no"
|
|
|
|
fi
|
|
|
|
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
1999-08-09 18:05:39 +00:00
|
|
|
dnl initialize libtool
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
2001-11-04 20:20:48 +00:00
|
|
|
AC_LIBTOOL_WIN32_DLL
|
2002-03-21 20:26:54 +00:00
|
|
|
AC_DISABLE_STATIC
|
2002-02-10 18:35:29 +00:00
|
|
|
AC_PROG_LIBTOOL
|
1999-08-09 18:05:39 +00:00
|
|
|
|
2003-09-24 03:41:48 +00:00
|
|
|
dnl Windows/Cygwin needs this, else the library creation fails
|
2005-07-15 21:59:25 +00:00
|
|
|
dnl BeOS also needs this (why isnt it the default anyway ???)
|
|
|
|
if test "$ac_cv_header_windows_h" = "yes" -o "$ac_cv_header_be_kernel_OS_h" = "yes" ; then
|
2003-09-24 03:41:48 +00:00
|
|
|
LIBTOOL_LINK_EXTRA=-no-undefined
|
|
|
|
AC_SUBST(LIBTOOL_LINK_EXTRA)
|
|
|
|
fi
|
|
|
|
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl ***********************************************************************
|
|
|
|
dnl enable/disable backends and features based on previous tests and user's
|
|
|
|
dnl choice
|
|
|
|
dnl ***********************************************************************
|
1999-08-09 18:05:39 +00:00
|
|
|
|
|
|
|
if test "${ac_cv_header_sys_socket_h}" = "no"; then
|
2003-06-06 17:07:02 +00:00
|
|
|
echo "*** disabling saned (sys/socket.h not found)"
|
1999-08-09 18:05:39 +00:00
|
|
|
SANED=
|
|
|
|
else
|
|
|
|
SANED=saned
|
|
|
|
fi
|
|
|
|
AC_SUBST(SANED)
|
2003-06-06 17:07:02 +00:00
|
|
|
|
|
|
|
dnl These are the backends that are build in any case:
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(local-backends,
|
|
|
|
AC_HELP_STRING([--disable-local-backends],
|
|
|
|
[turn off compilation of all backends but net]))
|
|
|
|
|
|
|
|
if eval "test x$enable_local_backends = xno"; then
|
|
|
|
BACKENDS="net"
|
2001-11-04 20:20:48 +00:00
|
|
|
else
|
2003-06-06 17:07:02 +00:00
|
|
|
if test "${BACKENDS}" != "" ; then
|
|
|
|
AC_MSG_NOTICE([Manually selected backends: ${BACKENDS}])
|
|
|
|
else
|
|
|
|
BACKENDS="abaton agfafocus apple artec as6e avision bh canon \
|
|
|
|
canon630u coolscan coolscan2 dc25 dmc \
|
2005-06-30 19:46:06 +00:00
|
|
|
epson fujitsu genesys gt68xx hp leo matsushita microtek \
|
2004-09-06 18:30:54 +00:00
|
|
|
microtek2 mustek mustek_usb nec pie plustek \
|
2003-10-04 10:40:00 +00:00
|
|
|
plustek_pp ricoh s9036 sceptre sharp \
|
2003-06-06 17:07:02 +00:00
|
|
|
sp15c st400 tamarack test teco1 teco2 teco3 umax umax_pp umax1220u \
|
2005-02-20 20:08:04 +00:00
|
|
|
artec_eplus48u ma1509 ibm hp5400 u12 snapscan niash sm3840"
|
2003-06-06 17:07:02 +00:00
|
|
|
|
|
|
|
if test "${sane_cv_use_libjpeg}" != "yes"; then
|
|
|
|
echo "*** disabling DC210 backend (failed to find JPEG library)"
|
|
|
|
echo "*** disabling DC240 backend (failed to find JPEG library)"
|
|
|
|
else
|
|
|
|
BACKENDS="${BACKENDS} dc210 dc240"
|
2003-07-26 17:07:36 +00:00
|
|
|
SANEI_JPEG="sanei_jpeg.o"
|
|
|
|
SANEI_JPEG_LO="sanei_jpeg.lo"
|
2003-06-06 17:07:02 +00:00
|
|
|
fi
|
2003-07-26 17:07:36 +00:00
|
|
|
AC_SUBST(SANEI_JPEG)
|
|
|
|
AC_SUBST(SANEI_JPEG_LO)
|
2003-06-06 17:07:02 +00:00
|
|
|
|
|
|
|
if test "${sane_cv_use_libieee1284}" != "yes"
|
|
|
|
then
|
|
|
|
echo "*** disabling CANON_PP backend (failed to find libieee1284 library)"
|
|
|
|
echo "*** disabling HPSJ5S backend (failed to find libieee1284 library)"
|
|
|
|
else
|
|
|
|
BACKENDS="${BACKENDS} canon_pp hpsj5s"
|
|
|
|
fi
|
|
|
|
|
2004-09-06 18:30:54 +00:00
|
|
|
if test "${sane_cv_use_libieee1284}" != "yes" && test "${enable_parport_directio}" != "yes"
|
|
|
|
then
|
|
|
|
echo "*** disabling MUSTEK_PP backend (failed to find libieee1284 library"
|
|
|
|
echo "*** and parport-directio is disabled)"
|
|
|
|
else
|
|
|
|
BACKENDS="${BACKENDS} mustek_pp"
|
|
|
|
fi
|
|
|
|
|
2004-05-30 18:55:35 +00:00
|
|
|
if test "${HAVE_GPHOTO2}" != "true" \
|
2003-06-06 17:07:02 +00:00
|
|
|
-o "${sane_cv_use_libjpeg}" != "yes"; then
|
2004-06-19 19:16:54 +00:00
|
|
|
echo "*** disabling GPHOTO2 backend (not requested, or failed to find required libraries)"
|
2003-06-06 17:07:02 +00:00
|
|
|
else
|
|
|
|
BACKENDS="${BACKENDS} gphoto2"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${ac_cv_header_sys_scanio_h}" = "no"; then
|
|
|
|
echo "*** disabling PINT backend (sys/scanio.h not found)"
|
|
|
|
else
|
|
|
|
BACKENDS="${BACKENDS} pint"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${ac_cv_func_ioperm}" = "no" \
|
|
|
|
&& test "${ac_cv_func__portaccess}" = "no"
|
|
|
|
then
|
|
|
|
echo "*** disabling qcam backend (ioperm or portaccess not found)"
|
|
|
|
else
|
|
|
|
BACKENDS="${BACKENDS} qcam"
|
|
|
|
fi
|
|
|
|
|
2003-12-21 22:51:42 +00:00
|
|
|
if test "${have_linux_ioctl_defines}" != "yes"
|
2003-06-06 17:07:02 +00:00
|
|
|
then
|
2003-12-21 22:51:42 +00:00
|
|
|
echo "*** disabling v4l (Video for Linux) backend"
|
2003-06-06 17:07:02 +00:00
|
|
|
else
|
|
|
|
BACKENDS="${BACKENDS} v4l"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${ac_cv_header_sys_socket_h}" = "no"; then
|
|
|
|
echo "*** disabling net backend (sys/socket.h not found)"
|
|
|
|
else
|
|
|
|
BACKENDS="${BACKENDS} net"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(pnm-backend,
|
|
|
|
AC_HELP_STRING([--enable-pnm-backend],
|
|
|
|
[enable the pnm backend for testing frontends (possible
|
|
|
|
security risk, see PROBLEMS file)]),
|
|
|
|
[
|
|
|
|
BACKENDS="${BACKENDS} pnm"
|
|
|
|
], [
|
|
|
|
echo "*** disabling pnm backend (not selected manually)"
|
|
|
|
])
|
|
|
|
|
|
|
|
if test "${HAVE_LIBUSB}" != "yes" ; then
|
|
|
|
echo "*** disabling SM3600 backend (libusb or usb.h not found)"
|
|
|
|
else
|
|
|
|
BACKENDS="${BACKENDS} sm3600"
|
|
|
|
fi
|
2005-07-15 21:59:25 +00:00
|
|
|
fi
|
2001-11-04 20:20:48 +00:00
|
|
|
fi
|
2003-06-06 17:07:02 +00:00
|
|
|
|
|
|
|
AC_SUBST(BACKENDS)
|
2001-11-04 20:20:48 +00:00
|
|
|
|
1999-08-09 18:05:39 +00:00
|
|
|
if test "${enable_shared}" = "no"; then
|
|
|
|
enable_preload=yes
|
|
|
|
fi
|
|
|
|
if test "${enable_dynamic}" != yes || test "${enable_preload}" = "yes"; then
|
|
|
|
echo "preloading backends into DLL"
|
|
|
|
DLL_PRELOAD="\$(PRELOADABLE_BACKENDS)"
|
|
|
|
else
|
|
|
|
DLL_PRELOAD=""
|
|
|
|
fi
|
2002-06-07 16:43:07 +00:00
|
|
|
AC_SUBST(DLL_PRELOAD)
|
2001-11-04 20:20:48 +00:00
|
|
|
|
2005-07-15 21:59:25 +00:00
|
|
|
dnl in BeOS, backends are not installed in lib/sane, but add-ons/SANE/
|
|
|
|
dnl we account for both installing in /boot/beos and ~/config
|
|
|
|
dnl faster than: if test "`uname`" = "BeOS" -o "`uname`" = "Zeta" ; then
|
|
|
|
if test "$ac_cv_header_be_kernel_OS_h" = "yes" ; then
|
|
|
|
BEOS_ADDONDIR="${libdir}/../add-ons/SANE"
|
|
|
|
AC_SUBST(BEOS_ADDONDIR)
|
|
|
|
BE_INSTALL_FLAVOR=-beos
|
|
|
|
AC_SUBST(BE_INSTALL_FLAVOR)
|
|
|
|
fi
|
|
|
|
|
2001-11-04 20:20:48 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(scsibuffersize,
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_HELP_STRING([--enable-scsibuffersize=N],
|
|
|
|
[specify the default size in bytes of the buffer for SCSI
|
|
|
|
commands [[default=131072]]]),
|
2001-11-04 20:20:48 +00:00
|
|
|
[set_scsibuffersize="$enableval"], [set_scsibuffersize=131072])
|
|
|
|
AC_DEFINE_UNQUOTED(SCSIBUFFERSIZE, $set_scsibuffersize,
|
|
|
|
[SCSI command buffer size])
|
|
|
|
echo "scsi buffersize: $set_scsibuffersize"
|
|
|
|
|
2001-12-28 13:26:12 +00:00
|
|
|
AC_ARG_ENABLE(scsi-directio,
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_HELP_STRING([--enable-scsi-directio],
|
|
|
|
[enable SCSI direct IO (Linux only, dangerous, see
|
|
|
|
README.linux)]),
|
2001-11-04 20:20:48 +00:00
|
|
|
[
|
2001-12-28 13:26:12 +00:00
|
|
|
if eval "test x$enable_scsi_directio = xyes"; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_SCSI_DIRECTIO"
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(parport-directio,
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_HELP_STRING([--enable-parport-directio],
|
|
|
|
[enable direct hardware access to the parallel port, so
|
|
|
|
frontends will require special permission level]),
|
2001-12-28 13:26:12 +00:00
|
|
|
[
|
|
|
|
if eval "test x$enable_parport_directio = xyes"; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_PARPORT_DIRECTIO"
|
2001-11-04 20:20:48 +00:00
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
2002-01-07 22:21:22 +00:00
|
|
|
AC_ARG_ENABLE(translations,
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_HELP_STRING([--disable-translations],
|
|
|
|
[don't install translations of backend options]),
|
2002-11-03 16:14:27 +00:00
|
|
|
[
|
2002-12-04 17:48:10 +00:00
|
|
|
if eval "test x$enable_translations = xno"; then
|
2002-11-03 16:14:27 +00:00
|
|
|
INSTALL_TRANSLATIONS=
|
|
|
|
else
|
|
|
|
INSTALL_TRANSLATIONS=install-translations
|
|
|
|
fi
|
|
|
|
],
|
|
|
|
INSTALL_TRANSLATIONS=install-translations
|
2002-01-07 22:21:22 +00:00
|
|
|
)
|
2002-11-03 16:14:27 +00:00
|
|
|
if eval "test x$INSTALL_TRANSLATIONS = xinstall-translations" ; then
|
|
|
|
if test x$MSGFMT = xno || test x$XGETTEXT = xno || test $MSGMERGE = no ; then
|
|
|
|
INSTALL_TRANSLATIONS=
|
2002-12-04 17:48:10 +00:00
|
|
|
echo "disabling translations (missing msgfmt, xgettext or msgmerge)"
|
2002-11-03 16:14:27 +00:00
|
|
|
else
|
|
|
|
echo "enabling translations"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "disabling translations"
|
|
|
|
fi
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_SUBST(INSTALL_TRANSLATIONS)
|
2002-11-03 16:14:27 +00:00
|
|
|
|
|
|
|
|
2003-04-30 23:00:15 +00:00
|
|
|
if test "$LATEX" != "no" && test "$DVIPS" != "no" && test "$MAKEINDEX" != "no" ; then
|
|
|
|
USE_LATEX="yes"
|
|
|
|
else
|
|
|
|
USE_LATEX="no"
|
|
|
|
fi
|
|
|
|
AC_SUBST(USE_LATEX)
|
2002-12-04 17:48:10 +00:00
|
|
|
|
|
|
|
dnl ***********************************************************************
|
|
|
|
dnl Write output files
|
|
|
|
dnl ***********************************************************************
|
2001-11-04 20:20:48 +00:00
|
|
|
|
2002-03-29 16:46:37 +00:00
|
|
|
DISTCLEAN_FILES="*~ .*~ *.log *.bak *.old *.orig *.out *.rej \"\#\"* \".\\#\"*"
|
2002-02-13 20:48:29 +00:00
|
|
|
AC_SUBST(DISTCLEAN_FILES)
|
|
|
|
|
2003-09-24 03:41:48 +00:00
|
|
|
AC_CONFIG_FILES([Makefile lib/Makefile sanei/Makefile frontend/Makefile \
|
|
|
|
japi/Makefile backend/Makefile include/Makefile doc/Makefile \
|
2003-09-30 13:31:05 +00:00
|
|
|
po/Makefile testsuite/Makefile tools/Makefile doc/doxygen-sanei.conf])
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_CONFIG_FILES([tools/sane-config], [chmod a+x tools/sane-config])
|
|
|
|
AC_OUTPUT
|
|
|
|
|
|
|
|
dnl ***********************************************************************
|
|
|
|
dnl print configuration information
|
|
|
|
dnl ***********************************************************************
|
|
|
|
|
2003-06-06 17:07:02 +00:00
|
|
|
echo "-> Variables used for compilation/linking:"
|
|
|
|
echo CPPFLAGS=\"${CPPFLAGS}\"
|
|
|
|
echo CFLAGS=\"${CFLAGS}\"
|
|
|
|
echo LDFLAGS=\"${LDFLAGS}\"
|
|
|
|
echo LIBS=\"${LIBS}\"
|
|
|
|
echo "-> Installation directories:"
|
2002-10-31 17:48:34 +00:00
|
|
|
echo "Configuration: `eval eval echo ${sysconfdir}`"
|
|
|
|
echo "Libraries: `eval eval echo ${libdir}`"
|
|
|
|
echo "Binaries: `eval eval echo ${bindir}` and `eval eval echo ${sbindir}`"
|
|
|
|
echo "Manpages: `eval eval echo ${mandir}`"
|
2004-07-26 15:15:39 +00:00
|
|
|
echo "Documentation: `eval eval echo ${docdir}`"
|
2005-04-01 13:54:32 +00:00
|
|
|
if eval "test x$INSTALL_LOCKPATH = xinstall-lockpath" ; then
|
|
|
|
echo "Lockfiles: `eval eval echo ${localstatedir}/lock/sane`"
|
|
|
|
else
|
2005-04-11 07:49:14 +00:00
|
|
|
echo "Lockfiles: Feature is disabled!"
|
2005-04-01 13:54:32 +00:00
|
|
|
fi
|
2003-06-06 17:07:02 +00:00
|
|
|
echo "-> Network parameters:"
|
|
|
|
if test "${SANED}" = "saned" ; then
|
|
|
|
echo "Build saned: yes"
|
|
|
|
else
|
|
|
|
echo "Build saned: no"
|
|
|
|
fi
|
2003-03-30 19:07:18 +00:00
|
|
|
echo "IPv6 support: `eval eval echo ${ipv6}`"
|
2003-06-06 17:07:02 +00:00
|
|
|
echo "-> The following backends will be built:"
|
|
|
|
for backend in ${BACKENDS} ; do
|
|
|
|
echo $ECHO_N "${backend} "
|
|
|
|
done
|
|
|
|
echo
|
2002-10-31 17:48:34 +00:00
|
|
|
|
2001-11-04 20:20:48 +00:00
|
|
|
if test "$SANE_CONFIG_PATH" != "no" ; then
|
|
|
|
SANE_INSTALLED_VERSION=`$SANE_CONFIG_PATH --version`
|
|
|
|
SANE_INSTALLED_PREFIX=`$SANE_CONFIG_PATH --prefix`
|
|
|
|
if test "$SANE_INSTALLED_PREFIX" != "$prefix" ; then
|
|
|
|
echo "*** WARNING: SANE is already installed (version $SANE_INSTALLED_VERSION). The old"
|
|
|
|
echo "*** installation is at $SANE_INSTALLED_PREFIX while SANE will now be installed"
|
|
|
|
echo "*** at $prefix. It is recommended to uninstall the old SANE version"
|
|
|
|
echo "*** before installing the new one to avoid problems."
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if test "$LIBSANE_EXISTS" = "yes" ; then
|
|
|
|
echo "*** Warning: An old version of SANE was detected but the sane-config program"
|
|
|
|
echo "*** couldn't be found. If you encounter any problems with SANE remove the old"
|
|
|
|
echo "*** SANE files and reinstall this version."
|
|
|
|
fi
|
|
|
|
fi
|
2002-10-27 12:58:51 +00:00
|
|
|
if eval "test x${sysconfdir} = x/usr/etc" ; then
|
|
|
|
echo "*** WARNING: Configuration files are stored in /usr/etc. If this is not"
|
|
|
|
echo "*** intended, use --sysconfdir to set another path (e.g. "/etc")."
|
|
|
|
fi
|
2002-06-02 18:56:56 +00:00
|
|
|
if test "$SELECTED_BACKENDS" != "" ; then
|
|
|
|
echo "*** Warning: Local backends have been disabled. This means that scanners"
|
|
|
|
echo "*** connected to your local computer won't be supported. Only a network"
|
2002-10-27 12:58:51 +00:00
|
|
|
echo "*** connection to a remote host is possible."
|
2002-06-02 18:56:56 +00:00
|
|
|
fi
|
2001-04-22 20:01:24 +00:00
|
|
|
|
1999-08-09 18:05:39 +00:00
|
|
|
echo "****************************************************************"
|
|
|
|
echo "* Please be sure to read file PROBLEMS in this directory *"
|
|
|
|
echo "* BEFORE running any of the SANE applications. Some devices *"
|
|
|
|
echo "* may be damaged by inproper operation, so please do heed this *"
|
|
|
|
echo "* advice. *"
|
|
|
|
echo "****************************************************************"
|