summaryrefslogtreecommitdiff
path: root/debian/patches/0XXX-test.patch
blob: 940caba2c2567e82f7df60862dd62d135af82c99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
Index: trunk/acinclude.m4
===================================================================
--- trunk.orig/acinclude.m4
+++ trunk/acinclude.m4
@@ -613,7 +613,7 @@ for be in ${BACKENDS}; do
     ;;
 
     escl)
-    if test "x${with_avahi}" != "xyes"; then
+    if test "x${enable_avahi}" != "xyes"; then
       echo "*** $be backend requires AVAHI library - $DISABLE_MSG"
       backend_supported="no"
     fi
@@ -629,14 +629,7 @@ for be in ${BACKENDS}; do
     if test "x${sane_cv_use_libjpeg}" != "xyes"; then
       echo "*** $be backend currently requires JPEG library - $DISABLE_MSG"
       backend_supported="no"
-    else
-      if test "x${ac_cv_func_jpeg_crop_scanline}"  != "xyes" \
-      || test "x${ac_cv_func_jpeg_skip_scanlines}" != "xyes"; then
-        echo "*** $be backend requires a newer JPEG library - $DISABLE_MSG"
-        backend_supported="no"
-      fi
     fi
-
     ;;
 
     gphoto2)
Index: trunk/configure.ac
===================================================================
--- trunk.orig/configure.ac
+++ trunk/configure.ac
@@ -129,26 +129,17 @@ AC_ARG_WITH(v4l,
              # as "$with_v4l" will be set to "no"])
 
 if test "$with_v4l" != "no" ; then
-  PKG_CHECK_MODULES(LIBV4L, [libv4l1 >= 0.8.3], have_libv4l1=yes, have_libv4l1=no)
+  PKG_CHECK_MODULES(LIBV4L, libv4l1, have_libv4l1=yes, have_libv4l1=no)
 fi
 
-AC_ARG_WITH(avahi,
-  AS_HELP_STRING([--with-avahi],
-    [enable Avahi support @<:@default=check@:>@]),
-  [],
-  [with_avahi=check])
-AC_DEFINE(WITH_AVAHI,
-  [0], [Define to 1 if Avahi support is available])
-AS_IF([test xno != "x$with_avahi"],
-  [PKG_CHECK_MODULES(AVAHI, [avahi-client >= 0.6.24],
-    [AC_DEFINE([WITH_AVAHI], [1])
-     with_avahi=yes
-    ],
-    [AS_IF([test xcheck != "x$with_avahi"],
-       [AC_MSG_ERROR([Avahi support requested but not found])])
-     with_avahi=no
-    ])
-  ])
+AC_ARG_ENABLE(avahi,
+	AS_HELP_STRING([--enable-avahi], [enable Avahi support for saned and the net backend]),
+	[enable_avahi=$enableval], [enable_avahi=no])
+
+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
@@ -463,28 +454,6 @@ AS_IF([test xno != "x$with_libcurl"],
 AM_CONDITIONAL([have_libcurl], [test x != "x$libcurl_LIBS"])
 
 dnl ******************************************************************
-dnl Check for poppler-glib availability
-dnl ******************************************************************
-AC_ARG_WITH(poppler-glib,
-  AS_HELP_STRING([--with-poppler-glib],
-    [enable functionality that needs poppler-glib @<:@default=check@:>@]),
-  [],
-  [with_poppler_glib=check])
-AC_DEFINE(HAVE_POPPLER_GLIB,
-  [0], [Define to 1 if libpoppler-glib is available])
-AS_IF([test xno != "x$with_poppler_glib"],
-  [PKG_CHECK_MODULES(POPPLER_GLIB, [poppler-glib],
-     [AC_DEFINE([HAVE_POPPLER_GLIB], [1])
-      with_poppler_glib=yes
-     ],
-     [AS_IF([test xcheck != "x$with_poppler_glib"],
-        [AC_MSG_ERROR([poppler-glib requested but not found])])
-      with_poppler_glib=no
-     ])
-  ])
-AM_CONDITIONAL([have_poppler_glib], [test x != "x$POPPLER_GLIB_LIBS"])
-
-dnl ******************************************************************
 dnl Check for USB record/replay support
 dnl ******************************************************************
 AC_ARG_WITH(usb_record_replay,
@@ -665,7 +634,7 @@ AC_ARG_ENABLE(local-backends,
                  [turn off compilation of all backends but net]))
 
 ALL_BACKENDS="abaton agfafocus apple artec artec_eplus48u as6e \
-        avision bh canon canon630u canon_dr canon_lide70 canon_pp cardscan \
+        avision bh canon canon630u canon_dr canon_pp cardscan \
         coolscan coolscan2 coolscan3 dc25 dc210 dc240 \
         dell1600n_net dmc epjitsu epson epson2 epsonds escl fujitsu \
         genesys gphoto2 gt68xx hp hp3500 hp3900 hp4200 hp5400 \
@@ -695,18 +664,14 @@ else
   fi
 fi
 
+SANE_CHECK_BACKENDS
+
 if test "${sane_cv_use_libjpeg}" = "yes"; then
   SANEI_SANEI_JPEG_LO="../sanei/sanei_jpeg.lo"
-  saved_LIBS="${LIBS}"
-  LIBS="${JPEG_LIBS}"
-  AC_CHECK_FUNCS(jpeg_crop_scanline jpeg_skip_scanlines)
-  LIBS="${saved_LIBS}"
 fi
 AM_CONDITIONAL(HAVE_JPEG, test x$sane_cv_use_libjpeg = xyes)
 AC_SUBST(SANEI_SANEI_JPEG_LO)
 
-SANE_CHECK_BACKENDS
-
 AC_ARG_ENABLE(pnm-backend,
   AS_HELP_STRING([--enable-pnm-backend],
                  [enable the pnm backend for testing frontends (possible security risk, see PROBLEMS file)]),
@@ -804,6 +769,54 @@ AC_ARG_ENABLE(parport-directio,
     fi
   ])
 
+dnl ******************************************************************
+dnl  SANE API specification format conversion support
+dnl ******************************************************************
+AC_ARG_WITH(api-spec,
+  AS_HELP_STRING([--with-api-spec],
+    [convert API spec to supported output formats @<:@default=check@:>@]),
+    [],
+    [with_api_spec=check])
+dnl  Test for all tools that may be involved.  These tests are fast and
+dnl  running them allows for the Makefile targets to be formulated such
+dnl  that any non-requested formats can be made using a one-off without
+dnl  the need to reconfigure.
+AC_PATH_PROG(MAKEINDEX, makeindex, no)
+AC_PATH_PROG(DVIPS, dvips, no)
+AC_PATH_PROG(LATEX, latex, no)
+AC_PATH_PROG(PDFLATEX, pdflatex, no)
+AC_PATH_PROG(FIG2DEV, fig2dev, no)
+AC_PATH_PROG(GS, gs, no)
+AC_PATH_PROG(DLH, dlh, no)
+AC_PATH_PROG(PPMTOGIF, ppmtogif, no)
+AS_IF([test xno != "x$with_api_spec"],
+  [dnl  Flag formats for which all required tools have been found
+   AS_IF([   test xno != "x$MAKEINDEX" \
+          && test xno != "x$DVIPS" \
+          && test xno != "x$FIG2DEV" \
+          && test xno != "x$LATEX"],       [with_api_ps=yes])
+   AS_IF([   test xno != "x$MAKEINDEX" \
+          && test xno != "x$PDFLATEX" \
+          && test xno != "x$FIG2DEV" \
+          && test xno != "x$GS"],          [with_api_pdf=yes])
+   AS_IF([   test xno != "x$MAKEINDEX" \
+          && test xno != "x$DVIPS" \
+          && test xno != "x$FIG2DEV" \
+          && test xno != "x$DLH" \
+          && test xno != "x$GS" \
+          && test xno != "x$PPMTOFIG" ],   [with_api_html=yes])
+
+   AS_IF([test xyes = "x$with_api_spec" \
+          && test xyes != "x$with_api_ps" \
+          && test xyes != "x$with_api_pdf" \
+          && test xyes != "x$with_api_html"],
+     [AC_MSG_ERROR([tools to convert the API spec are missing])
+     ])
+  ])
+AM_CONDITIONAL(WITH_API_PS, [test x$with_api_ps = xyes])
+AM_CONDITIONAL(WITH_API_PDF, [test x$with_api_pdf = xyes])
+AM_CONDITIONAL(WITH_API_HTML, [test x$with_api_html = xyes])
+
 dnl ***********************************************************************
 dnl Write output files
 dnl ***********************************************************************
@@ -852,9 +865,8 @@ else
   echo "Build saned:   no"
 fi
 echo "IPv6 support:  `eval eval echo ${ipv6}`"
-echo "Avahi support: `eval eval echo ${with_avahi}`"
+echo "Avahi support: `eval eval echo ${enable_avahi}`"
 echo "cURL support:  `eval eval echo ${with_libcurl}`"
-echo "POPPLER_GLIB support:  `eval eval echo ${with_poppler_glib}`"
 echo "SNMP support:  `eval eval echo ${with_snmp}`"
 echo "-> The following backends will be built:"
 for backend in ${BACKENDS} ; do