summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in85
1 files changed, 56 insertions, 29 deletions
diff --git a/configure.in b/configure.in
index a91d584..96a52e5 100644
--- a/configure.in
+++ b/configure.in
@@ -3,10 +3,10 @@ dnl Process this file with autoconf to produce a configure script. -*-m4-*-
dnl ***********************************************************************
dnl When preparing a release, increase the numeric and string version numbers,
dnl remove the "cvs" suffix, and set is_release=yes
-AC_INIT([sane-backends],[1.0.24],[sane-devel@lists.alioth.debian.org])
+AC_INIT([sane-backends],[1.0.25],[sane-devel@lists.alioth.debian.org])
V_MAJOR=1
V_MINOR=0
-V_REV=24
+V_REV=25
is_release=yes
dnl ***********************************************************************
@@ -82,7 +82,6 @@ AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
dnl ***********************************************************************
dnl set compiler/linker flags
dnl ***********************************************************************
-INCLUDES="${INCLUDES} -I/usr/local/include"
AC_SUBST(INCLUDES)
SANE_SET_CFLAGS([$is_release])
SANE_SET_LDFLAGS
@@ -123,6 +122,7 @@ AC_SUBST(SYSLOG_LIBS)
SANE_CHECK_JPEG
SANE_CHECK_TIFF
+SANE_CHECK_PNG
SANE_CHECK_IEEE1284
SANE_CHECK_PTHREAD
SANE_CHECK_LOCKING
@@ -185,8 +185,8 @@ else
fi
if test "$with_snmp" = "yes" -a "${LIBSNMP_EXISTS}x" = "yesx"; then
- LIBS="$LIBS $SNMP_LIBS"
- CFLAGS="$CFLAGS $SNMP_CFLAGS"
+ AC_SUBST(SNMP_LIBS)
+ AC_SUBST(SNMP_CFLAGS)
AC_DEFINE(HAVE_LIBSNMP, 1, [Define to 1 if you have the net-snmp library.])
else
AC_MSG_WARN([*** Warning: net-snmp library disabled, autodetecting network scanners will not be supported.])
@@ -314,6 +314,25 @@ AC_CHECK_FUNCS(atexit ioperm i386_set_ioperm \
AC_REPLACE_FUNCS(getenv isfdtype sigprocmask snprintf \
strcasestr strdup strndup strsep usleep sleep syslog vsyslog)
+dnl sys/io.h might provide ioperm but not inb,outb (like for
+dnl non i386/x32/x86_64 with musl libc)
+if test "${ac_cv_header_sys_io_h}" = "yes"; then
+ AC_MSG_CHECKING([for inb,outb (provided by sys/io.h)])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <sys/io.h>]],
+ [[inb(0);outb(0,0);]])],
+ [AC_MSG_RESULT([yes])
+ sane_cv_have_sys_io_h_with_inb_outb="yes"],
+ [AC_MSG_RESULT([no])
+ sane_cv_have_sys_io_h_with_inb_outb="no"
+ AC_MSG_WARN([sys/io.h does not provide inb,outb (non i386/x32/x86_64 arch?)])])
+ if test "$sane_cv_have_sys_io_h_with_inb_outb" = "yes"; then
+ AC_DEFINE(SANE_HAVE_SYS_IO_H_WITH_INB_OUTB, 1, [Define to 1 if you have the <sys/io.h> providing inb,outb.])
+ fi
+else
+ sane_cv_have_sys_io_h_with_inb_outb="no"
+fi
+
SANE_PROTOTYPES
if test "$ac_cv_header_os2_h" = "yes" ; then
@@ -332,29 +351,33 @@ if test -c /dev/urandom ; then
AC_DEFINE(HAVE_DEV_URANDOM, 1, [Is /dev/urandom available?])
fi
-dnl added by PN 3/2/12 to detect cups
-$as_echo "checking for cups"
-if test -e /usr/include/cups/cups.h ; then
- AC_DEFINE(HAVE_CUPS, 1, [Is /usr/include/cups/cups.h available?])
- with_cups="yes"
- LIBS="-lcups $LIBS"
-else
- $as_echo "cups.h not found, you may want to install a cups development package"
- $as_echo "in order to autodetect network scanners in kodakaio."
- with_cups="no"
-fi
-
-dnl added by llagendijk 12/7/2012 to detect systemd for saned
-$as_echo_n "Checking for systemd..."
-if test -e /usr/include/systemd/sd-daemon.h ; then
+dnl added by PN 3/2/12 to detect cups commented out 15/10/13 since avahi is now used instead
+dnl $as_echo "checking for cups"
+dnl if test -e /usr/include/cups/cups.h ; then
+dnl AC_DEFINE(HAVE_CUPS, 1, [Is /usr/include/cups/cups.h available?])
+dnl with_cups="yes"
+dnl LIBS="-lcups $LIBS"
+dnl else
+dnl $as_echo "cups.h not found, you may want to install a cups development package"
+dnl $as_echo "in order to autodetect network scanners in kodakaio."
+dnl with_cups="no"
+dnl fi
+
+AC_ARG_WITH(systemd,
+ AC_HELP_STRING([--with-systemd], [enable systemd support @<:@default=yes@:>@]))
+if test "x$with_systemd" != xno ; then
+ PKG_CHECK_MODULES(SYSTEMD, [libsystemd], have_systemd=yes, have_systemd=no)
+ if test "x$have_systemd" = xno; then
+ PKG_CHECK_MODULES(SYSTEMD, [libsystemd-daemon], have_systemd=yes, have_systemd=no)
+ fi
+ if test "x$have_systemd" = xyes; then
AC_DEFINE(HAVE_SYSTEMD, 1, [Is /usr/include/systemd/sd-daemon.h available?])
- with_systemd="yes"
- SYSTEMD_LIBS=" -lsystemd-daemon"
AC_SUBST(SYSTEMD_LIBS)
- $as_echo "yes"
-else
- with_systemd="no"
- $as_echo "no"
+ else
+ if test "x$with_systemd" = xyes; then
+ AC_MSG_ERROR([Systemd support was requested but systemd was not found])
+ fi
+ fi
fi
dnl ***********
@@ -610,12 +633,12 @@ 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 fujitsu genesys \
+ dell1600n_net dmc epjitsu epson epson2 epsonds 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 pint \
+ mustek_usb mustek_usb2 nec net niash pie pieusb pint \
pixma plustek plustek_pp qcam ricoh rts8891 s9036 \
sceptre sharp sm3600 sm3840 snapscan sp15c st400 \
stv680 tamarack teco1 teco2 teco3 test u12 umax
@@ -663,8 +686,12 @@ for backend in ${BACKENDS} ; do
BACKEND_LIBS_ENABLED="${BACKEND_LIBS_ENABLED} libsane-${backend}.la"
BACKEND_CONFS_ENABLED="${BACKEND_CONFS_ENABLED} ${backend}.conf"
BACKEND_MANS_ENABLED="${BACKEND_MANS_ENABLED} sane-${backend}.5"
+ if test x$backend = xumax_pp; then
+ install_umax_pp_tools=yes
+ fi
done
AC_SUBST(BACKEND_LIBS_ENABLED)
+AM_CONDITIONAL(INSTALL_UMAX_PP_TOOLS, test xyes = x$install_umax_pp_tools)
AC_ARG_VAR(PRELOADABLE_BACKENDS, [list of backends to preload into single DLL])
if test "${enable_preload}" = "auto"; then
@@ -816,7 +843,7 @@ fi
echo "IPv6 support: `eval eval echo ${ipv6}`"
echo "Avahi support: `eval eval echo ${enable_avahi}`"
echo "SNMP support: `eval eval echo ${with_snmp}`"
-echo "CUPS support: `eval eval echo ${with_cups}`"
+dnl echo "CUPS support: `eval eval echo ${with_cups}`" commented out 15/10/13
echo "-> The following backends will be built:"
for backend in ${BACKENDS} ; do
echo $ECHO_N "${backend} "