summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-03-30 21:30:45 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-03-30 21:30:45 +0200
commitee770c2346eb37e0dcb8b6cf3eaacf3d8efd6bbc (patch)
tree58f05092be1a17a939e861f8cadcda1b6ca2ecef /configure.ac
parent0da9e21872802cfc6e975b1ebaf9efb9e5934d84 (diff)
parentfef76e17ed4c607ea73b81279f9ef1d7121be900 (diff)
Merge branch 'release/experimental/1.0.29-1_experimental1'experimental/1.0.29-1_experimental1
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac105
1 files changed, 79 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac
index fc6e8a2..bed7e1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,13 +5,13 @@ dnl Set up autoconf and automake
dnl When preparing a release, modify the numeric version components
dnl and remove the git suffix.
dnl ******************************************************************
-AC_INIT([sane-backends],[1.0.27],
- [sane-devel@lists.alioth.debian.org])
-AC_PREREQ(2.69) dnl minimum autoconf version required
+AC_INIT([sane-backends],m4_esyscmd_s([git describe --dirty]),
+ [sane-devel@alioth-lists.debian.net])
+AC_PREREQ([2.69]) dnl minimum autoconf version required
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([include/sane/config.h])
-AM_INIT_AUTOMAKE([1.11.6 subdir-objects -Wall])
+AM_INIT_AUTOMAKE([1.15 subdir-objects -Wall])
AM_SILENT_RULES
dnl Turn off feature were automake will automatically run autoreconf.
dnl This is because we used to check in generated files into CVS which
@@ -27,7 +27,7 @@ AS_IF([test x = "x`echo $VERSION | sed 's/[[.0-9]]//g'`"],
[is_release=no])
V_MAJOR=`echo $VERSION | $AWK -F. '{print $1}'`
V_MINOR=`echo $VERSION | $AWK -F. '{print $2}'`
-V_REV=`echo $VERSION | $AWK -F. '{print $3}' | sed 's/[[^0-9]]//g'`;
+V_REV=`echo $VERSION | $AWK -F. '{print $3}' | sed 's/^\([[0-9]]*\).*/\1/'`;
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])
@@ -40,6 +40,7 @@ dnl ******************************************************************
dnl Set up the compiler and linker
dnl ******************************************************************
AC_PROG_CC
+AC_PROG_CXX
AM_PROG_CC_C_O
sane_save_CC=$CC
AC_PROG_CC_C99 dnl enables extensions to ISO C99 :-(
@@ -58,13 +59,13 @@ AC_USE_SYSTEM_EXTENSIONS dnl call before running the C compiler
AM_PROG_AR
LT_INIT([disable-static win32-dll])
-LT_PREREQ([2.4.2])
+LT_PREREQ([2.4.6])
dnl *****************************************************************
dnl Set up I18N/L10N support
dnl *****************************************************************
AM_GNU_GETTEXT([external])
-AM_GNU_GETTEXT_VERSION([0.18.1])
+AM_GNU_GETTEXT_VERSION([0.19.8])
dnl ***********************************************************************
dnl Checks for programs.
@@ -80,6 +81,7 @@ dnl ***********************************************************************
dnl set compiler/linker flags
dnl ***********************************************************************
SANE_SET_AM_CFLAGS([$is_release])
+AX_CXX_COMPILE_STDCXX_11([noext], [optional])
SANE_SET_AM_LDFLAGS
dnl ***********************************************************************
@@ -138,6 +140,7 @@ if test "$enable_avahi" = "yes"; then
PKG_CHECK_MODULES(AVAHI, [ avahi-client >= 0.6.24 ],
[AC_DEFINE(WITH_AVAHI, 1, [define if Avahi support is enabled for saned and the net backend])], enable_avahi=no)
fi
+AM_CONDITIONAL([have_libavahi], [test x != "x$AVAHI_LIBS"])
dnl check sane to make sure we don't have two installations
AC_CHECK_LIB(sane, sane_init, LIBSANE_EXISTS="yes")
@@ -192,7 +195,7 @@ dnl Checks for header files.
dnl ***********************************************************************
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \
- sys/time.h sys/shm.h sys/ipc.h sys/signal.h sys/scanio.h os2.h \
+ sys/time.h sys/shm.h sys/ipc.h sys/scanio.h os2.h \
sys/socket.h sys/io.h sys/hw.h sys/types.h linux/ppdev.h \
dev/ppbus/ppi.h machine/cpufunc.h sys/sem.h sys/poll.h \
windows.h be/kernel/OS.h limits.h sys/ioctl.h asm/types.h\
@@ -273,14 +276,14 @@ dnl ***********************************************************************
dnl Functions for which we provide an implementation if missing
AC_CONFIG_LIBOBJ_DIR([lib])
AC_FUNC_ALLOCA
-AC_REPLACE_FUNCS([getenv inet_ntop inet_pton isfdtype sigprocmask \
+AC_REPLACE_FUNCS([getenv inet_ntop inet_pton sigprocmask \
sleep snprintf strcasestr strdup strndup strsep syslog usleep \
vsyslog])
AS_IF([test x != x$ALLOCA],
[LTALLOCA=`echo "$ALLOCA" | sed 's/\.o$//; s/\.obj$//'`.lo])
AC_SUBST(LTALLOCA)
-dnl Define SOCKET_LIB, NSL_LIB, BIND_LIB, and RESOLV_LIB when required
+dnl Define SOCKET_LIB, NSL_LIB, BIND_LIB, and RESOLV_LIB when required
dnl for functions we use.
AC_CHECK_FUNC(gethostbyaddr,, [AC_CHECK_LIB(bind, gethostbyaddr, BIND_LIB="-lbind")])
AC_CHECK_FUNC(gethostbyaddr,, [AC_CHECK_LIB(nsl, gethostbyaddr, NSL_LIB="-lnsl")])
@@ -381,9 +384,9 @@ AC_ARG_WITH(usb,
AS_IF([test xno != "x$with_usb"],
[have_usb=no
AS_CASE(x$host_os, dnl odd-ball operating systems first
- [beos*],
+ [xbeos*],
[AC_CHECK_HEADER(be/drivers/USB_scanner.h, [have_usb=yes])],
- [os2*],
+ [xos2*],
[AC_CHECK_HEADER(usbcalls.h,
[AC_CHECK_LIB(usbcall, UsbQueryNumberDevices,
[USB_LIBS="-lusbcall"
@@ -428,6 +431,48 @@ AS_IF([test xyes = "x$with_usb" && test xyes != "x$have_usb"],
])
AM_CONDITIONAL([have_usblib], [test x != "x$USB_LIBS"])
+dnl ******************************************************************
+dnl Check for libcurl availability
+dnl ******************************************************************
+AC_ARG_WITH(libcurl,
+ AS_HELP_STRING([--with-libcurl],
+ [enable functionality that needs libcurl @<:@default=check@:>@]),
+ [],
+ [with_libcurl=check])
+AC_DEFINE(HAVE_LIBCURL,
+ [0], [Define to 1 if libcurl is available])
+AS_IF([test xno != "x$with_libcurl"],
+ [PKG_CHECK_MODULES(libcurl, [libcurl],
+ [AC_DEFINE([HAVE_LIBCURL], [1])
+ with_libcurl=yes
+ ],
+ [AS_IF([test xcheck != "x$with_libcurl"],
+ [AC_MSG_ERROR([libcurl requested but not found])])
+ with_libcurl=no
+ ])
+ ])
+AM_CONDITIONAL([have_libcurl], [test x != "x$libcurl_LIBS"])
+
+dnl ******************************************************************
+dnl Check for USB record/replay support
+dnl ******************************************************************
+AC_ARG_WITH(usb_record_replay,
+ AS_HELP_STRING([--with-usb-record-replay],
+ [enable USB record and replay to XML files @<:@default=yes@:>@]))
+
+if test "x$with_usb_record_replay" != "xno"; then
+ PKG_CHECK_MODULES([XML], [libxml-2.0], have_libxml=yes, have_libxml=no)
+ if test "x$have_libxml" = xyes; then
+ AC_DEFINE(HAVE_LIBXML2, 1, [Define to 1 if libxml2 is available])
+ AC_DEFINE(WITH_USB_RECORD_REPLAY, 1, [define if USB record replay is enabled])
+ else
+ if test "x$with_usb_record_replay" = xyes; then
+ AC_MSG_ERROR([USB record and replay support was requested but libxml-2.0 was not found])
+ fi
+ fi
+fi
+AM_CONDITIONAL([have_libxml2], [test x != "x$XML_LIBS"])
+
dnl ************
dnl SCSI Support
dnl ************
@@ -439,7 +484,7 @@ dnl conditional scans for more specific only as needed.
# Unset VERSION during the SCSI header check
sed "s!^#define VERSION .*!/* & */!" confdefs.h > confdefs.h.tmp
mv confdefs.h.tmp confdefs.h
-
+
AC_CHECK_HEADERS(IOKit/scsi/SCSITaskLib.h IOKit/cdb/IOSCSILib.h \
IOKit/scsi/SCSICommandOperationCodes.h \
IOKit/scsi-commands/SCSICommandOperationCodes.h scsi.h sys/scsi.h \
@@ -506,7 +551,7 @@ fi
# Multiple platforms can set SCSI_LIBS so do substitution at end.
AC_SUBST(SCSI_LIBS)
-AC_ARG_ENABLE(scsibuffersize,
+AC_ARG_ENABLE(scsibuffersize,
AS_HELP_STRING([--enable-scsibuffersize=N],
[specify the default size in bytes of the buffer for SCSI
commands @<:@default=131072@:>@]),
@@ -591,15 +636,15 @@ AC_ARG_ENABLE(local-backends,
ALL_BACKENDS="abaton agfafocus apple artec artec_eplus48u as6e \
avision bh canon canon630u canon_dr canon_pp cardscan \
coolscan coolscan2 coolscan3 dc25 dc210 dc240 \
- dell1600n_net dmc epjitsu epson epson2 epsonds fujitsu genesys \
- gphoto2 gt68xx hp hp3500 hp3900 hp4200 hp5400 \
+ dell1600n_net dmc epjitsu epson epson2 epsonds escl fujitsu \
+ genesys gphoto2 gt68xx hp hp3500 hp3900 hp4200 hp5400 \
hp5590 hpsj5s hpljm1005 hs2p ibm kodak kodakaio kvs1025 kvs20xx \
kvs40xx leo lexmark ma1509 magicolor \
matsushita microtek microtek2 mustek mustek_pp \
mustek_usb mustek_usb2 nec net niash pie pieusb pint \
- pixma plustek plustek_pp qcam ricoh rts8891 s9036 \
+ pixma plustek plustek_pp qcam ricoh ricoh2 rts8891 s9036 \
sceptre sharp sm3600 sm3840 snapscan sp15c st400 \
- stv680 tamarack teco1 teco2 teco3 test u12 umax
+ stv680 tamarack teco1 teco2 teco3 test u12 umax
umax_pp umax1220u v4l xerox_mfp p5"
# If user specifies backends manually then cause configure
@@ -608,7 +653,7 @@ ALL_BACKENDS="abaton agfafocus apple artec artec_eplus48u as6e \
user_selected_backends="yes"
AC_ARG_VAR(BACKENDS, [list of backends to compile])
-if eval "test x$enable_local_backends = xno"; then
+if eval "test x$enable_local_backends = xno"; then
BACKENDS="net"
else
if test "${BACKENDS}" != "" ; then
@@ -627,7 +672,7 @@ fi
AM_CONDITIONAL(HAVE_JPEG, test x$sane_cv_use_libjpeg = xyes)
AC_SUBST(SANEI_SANEI_JPEG_LO)
-AC_ARG_ENABLE(pnm-backend,
+AC_ARG_ENABLE(pnm-backend,
AS_HELP_STRING([--enable-pnm-backend],
[enable the pnm backend for testing frontends (possible security risk, see PROBLEMS file)]),
[FILTERED_BACKENDS="${FILTERED_BACKENDS} pnm"],
@@ -662,7 +707,7 @@ if test "${enable_preload}" = "yes"; then
# are in automatic mode then remove backend from list instead.
user_selected_backends="yes"
- if eval "test x$enable_local_backends = xno"; then
+ if eval "test x$enable_local_backends = xno"; then
PRELOADABLE_BACKENDS="net"
else
if test "${PRELOADABLE_BACKENDS}" != "" ; then
@@ -698,6 +743,8 @@ for backend in ${PRELOADABLE_BACKENDS} ; do
fi
PRELOADABLE_BACKENDS_ENABLED="${PRELOADABLE_BACKENDS_ENABLED} lib${backend}.la"
done
+AM_CONDITIONAL([preloadable_backends_enabled],
+ [test x != "x$PRELOADABLE_BACKENDS_ENABLED"])
AC_SUBST(PRELOADABLE_BACKENDS)
AC_SUBST(PRELOADABLE_BACKENDS_ENABLED)
@@ -714,7 +761,7 @@ esac
AC_ARG_ENABLE(parport-directio,
AS_HELP_STRING([--enable-parport-directio],
- [enable direct hardware access to the parallel port, so
+ [enable direct hardware access to the parallel port, so
frontends will require special permission level]),
[
if eval "test x$enable_parport_directio = xyes"; then
@@ -776,11 +823,15 @@ dnl ***********************************************************************
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(AM_CFLAGS)
+AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_LDFLAGS)
AC_CONFIG_FILES([Makefile lib/Makefile sanei/Makefile frontend/Makefile \
japi/Makefile backend/Makefile include/Makefile doc/Makefile \
- po/Makefile.in testsuite/Makefile testsuite/sanei/Makefile testsuite/tools/Makefile \
+ po/Makefile.in testsuite/Makefile \
+ testsuite/backend/Makefile \
+ testsuite/backend/genesys/Makefile \
+ testsuite/sanei/Makefile testsuite/tools/Makefile \
tools/Makefile doc/doxygen-sanei.conf doc/doxygen-genesys.conf])
AC_CONFIG_FILES([tools/sane-config], [chmod a+x tools/sane-config])
AC_CONFIG_FILES([tools/sane-backends.pc])
@@ -793,6 +844,7 @@ dnl ***********************************************************************
echo "-> Variables used for compilation/linking:"
echo AM_CPPFLAGS=\"${AM_CPPFLAGS}\"
echo AM_CFLAGS=\"${AM_CFLAGS}\"
+echo AM_CXXFLAGS=\"${AM_CXXFLAGS}\"
echo AM_LDFLAGS=\"${AM_LDFLAGS}\"
echo LIBS=\"${LIBS}\"
echo "-> Installation directories:"
@@ -814,16 +866,17 @@ else
fi
echo "IPv6 support: `eval eval echo ${ipv6}`"
echo "Avahi support: `eval eval echo ${enable_avahi}`"
+echo "cURL support: `eval eval echo ${with_libcurl}`"
echo "SNMP support: `eval eval echo ${with_snmp}`"
echo "-> The following backends will be built:"
for backend in ${BACKENDS} ; do
- echo $ECHO_N "${backend} "
+ echo $ECHO_N "${backend} "
done
-echo
+echo
echo
echo "-> The following preload backends will be built:"
for backend in ${PRELOADABLE_BACKENDS} ; do
- echo $ECHO_N "${backend} "
+ echo $ECHO_N "${backend} "
done
echo