~ubuntu-branches/ubuntu/saucy/hplip/saucy-proposed

« back to all changes in this revision

Viewing changes to .pc/85_rebuild_python_ui.dpatch/configure.in

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2012-05-26 11:20:39 UTC
  • mfrom: (1.5.6) (31.1.3 precise)
  • Revision ID: package-import@ubuntu.com-20120526112039-bevxczegxnbyr5m7
Tags: 3.12.4-1
* New upstream release
* Switch to source/format 3.0 (quilt) - drop dpatch
* Refreshed debian/patches
* dh_autoreconf debian/autogen.sh & set local-options single-debian-patch
* Update to debian/compat -> 9
* Fix "hardened build flags" patch from Moritz - thanks (Closes: #667828)
* Fix "duplex descriptor uninitialized" patch from Matej (Closes: #583273)
* Fix "please migrate to kde-runtime" patch from Pino (Closes: #666544)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
#  configure.in - hplip autoconf input file
 
3
 
4
#  (c) 2004-2007 Copyright Hewlett-Packard Development Company, LP
 
5
 
6
# exit status:
 
7
#   0 = ok
 
8
#   1 = error
 
9
#   2 = no libusb
 
10
#   3 = no cups-devel
 
11
#   4 = no libnetsnmp
 
12
#   5 = no netsnmp-devel
 
13
#   6 = no python-devel
 
14
#   7 = no pthread-devel
 
15
#   8 = no ppdev-devel
 
16
#   9 = no libcups
 
17
#   10 = no libm
 
18
#   11 = no libusb-devel
 
19
#   12 = no sane-backends-devel
 
20
#   13 = no libdbus-1 support
 
21
#   14 = no dbus-devel support
 
22
#   15 = fax requries dbus support
 
23
#
 
24
#   102 = no libjpeg
 
25
#   103 = no jpeg-devel
 
26
#   104 = no libdl
 
27
 
 
28
#AC_PREREQ(2.59)
 
29
AC_INIT([HP Linux Imaging and Printing], [3.12.4], [3.12.4], [hplip])
 
30
#AM_INIT_AUTOMAKE([1.9 foreign])
 
31
AM_INIT_AUTOMAKE
 
32
AC_DISABLE_STATIC
 
33
 
 
34
# Checks for programs.
 
35
AC_PROG_CXX
 
36
AC_PROG_CC
 
37
AC_PROG_INSTALL
 
38
AC_PROG_LIBTOOL
 
39
 
 
40
# Checks for required libraries, don't set global -lpthread, -lm, -ljpeg, ... here, set in Makefile.
 
41
AC_CHECK_LIB([pthread], [pthread_create], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libpthread support], 7)])
 
42
AC_CHECK_LIB([m], [pow], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libm math support], 10)])
 
43
AC_CHECK_LIB([jpeg], [jpeg_set_defaults],[LIBS="$LIBS"], [AC_MSG_ERROR(["cannot find libjpeg support"], 102)])
 
44
AC_CHECK_LIB([dl], [dlopen], [LIBS="$LIBS" AC_DEFINE([HAVE_LIBDL])], [AC_MSG_ERROR(["cannot find libdl support"], 104)])
 
45
 
 
46
# Checks for required header files.
 
47
AC_CHECK_HEADERS(pthread.h,, [AC_MSG_ERROR([cannot find pthread-devel support], 7)])
 
48
AC_CHECK_HEADERS(jpeglib.h,, [AC_MSG_ERROR([cannot find libjpeg-devel support], 103)])
 
49
 
 
50
# Checks for typedefs, structures, and compiler characteristics.
 
51
AC_C_BIGENDIAN(,[APDK_ENDIAN_FLAG="-DAPDK_LITTLE_ENDIAN"])
 
52
 
 
53
# Autoconf-style header tests for APDK
 
54
cat >prnt/hpijs/auto-include.h <<EOFH
 
55
#ifdef HAVE_INTTYPES_H
 
56
#include <inttypes.h>
 
57
#endif
 
58
#ifdef HAVE_STDINT_H
 
59
#include <stdint.h>
 
60
#endif
 
61
#ifdef HAVE_MACHINE_TYPES_H
 
62
#include <machine/types.h>
 
63
#endif
 
64
EOFH
 
65
AC_CHECK_TYPES([uint32_t], [APDK_AUTO_INCLUDE_FLAG="-DAPDK_AUTO_INCLUDE"],, [#include "prnt/hpijs/auto-include.h"])
 
66
 
 
67
AC_MSG_CHECKING("for platform-dependencies")
 
68
darwin_build="no"
 
69
case "$host" in
 
70
   *-darwin*)
 
71
      AC_MSG_RESULT("using Mac OS X platform.h")
 
72
      cat >prnt/hpijs/platform.h <<EOF
 
73
#include <stdlib.h>
 
74
#include <sys/types.h>
 
75
#include <sys/malloc.h>
 
76
#include <memory.h>
 
77
#include <string.h>
 
78
#include <stdio.h>
 
79
#include <math.h>
 
80
EOF
 
81
      darwin_build="yes"
 
82
      ;;
 
83
 
 
84
     *)
 
85
      AC_MSG_RESULT("using Default platform.h")
 
86
      cat >prnt/hpijs/platform.h <<EOF
 
87
#include <stdlib.h>
 
88
#include <memory.h>
 
89
#include <string.h>
 
90
#include <stdio.h>
 
91
#include <math.h>
 
92
EOF
 
93
      ;;
 
94
esac
 
95
AM_CONDITIONAL(DARWIN_BUILD, test x$darwin_build = xyes)
 
96
 
 
97
AC_MSG_CHECKING([for documentation build])
 
98
AC_ARG_ENABLE(doc_build,
 
99
  [  --enable-doc-build     enable documentation build (default=yes)],
 
100
  doc_build=$enableval, doc_build=yes)
 
101
if test "$doc_build" = "yes"; then
 
102
   AC_MSG_RESULT(yes)
 
103
else
 
104
   AC_MSG_RESULT(no)
 
105
fi
 
106
AM_CONDITIONAL(DOC_BUILD, test x$doc_build = xyes)
 
107
 
 
108
AC_MSG_CHECKING([for hpijs only build])
 
109
AC_ARG_ENABLE(hpijs_only_build,
 
110
  [  --enable-hpijs-only-build     enable hpijs only build (default=yes)],
 
111
  hpijs_only_build=$enableval, hpijs_only_build=no)
 
112
if test "$hpijs_only_build" = "yes"; then
 
113
   AC_MSG_RESULT(yes)
 
114
   epm_full=\#
 
115
   epm_lite=\#
 
116
   epm_hpcups_only=\#
 
117
   epm_print_only_exclude=\#
 
118
   epm_hpijs_only=
 
119
else
 
120
   AC_MSG_RESULT(no)
 
121
   epm_hpijs_only=\#
 
122
   AC_DEFINE(HAVE_LIBHPIP) 
 
123
fi
 
124
AM_CONDITIONAL(HPIJS_ONLY_BUILD, test x$hpijs_only_build = xyes)
 
125
 
 
126
AC_MSG_CHECKING([for lite build])
 
127
AC_ARG_ENABLE(lite_build,
 
128
  [  --enable-lite-build     enable lite build, print & scan only (default=no)],
 
129
  lite_build=$enableval, lite_build=no)
 
130
if test "$lite_build" = "yes"; then
 
131
   AC_MSG_RESULT(yes)
 
132
   epm_full=\#
 
133
   epm_hpcups_only=\#
 
134
   epm_print_only_exclude=
 
135
   epm_lite=
 
136
else
 
137
   AC_MSG_RESULT(no)
 
138
fi
 
139
AM_CONDITIONAL(LITE_BUILD, test x$lite_build = xyes)
 
140
 
 
141
AC_MSG_CHECKING([for hpcups only build])
 
142
AC_ARG_ENABLE(hpcups_only_build,
 
143
  [  --enable-hpcups-only-build     enable hpcups only build, print only (default=no)],
 
144
  hpcups_only_build=$enableval, hpcups_only_build=no)
 
145
if test "$hpcups_only_build" = "yes"; then
 
146
   AC_MSG_RESULT(yes)
 
147
   epm_full=\#
 
148
   epm_lite=\#
 
149
   epm_hpcups_only=
 
150
   epm_print_only_exclude=\#
 
151
else
 
152
   AC_MSG_RESULT(no)
 
153
fi
 
154
AM_CONDITIONAL(HPCUPS_ONLY_BUILD, test x$hpcups_only_build = xyes)
 
155
 
 
156
AM_CONDITIONAL(HPLIP_BUILD, test x$hpcups_only_build = xno && test x$hpijs_only_build = xno)
 
157
if test "$hpijs_only_build" = "no" && test "$hpcups_only_build" = "no"; then
 
158
   AC_DEFINE(HAVE_LIBHPIP) 
 
159
fi
 
160
 
 
161
if test "$lite_build" = "no" && test "$hpcups_only_build" = "no" && test "$hpijs_only_build" = "no"; then
 
162
   epm_full=
 
163
   epm_lite=\#
 
164
   epm_hpcups_only=\#
 
165
   epm_print_only_exclude=
 
166
fi
 
167
AM_CONDITIONAL(FULL_BUILD, test x$hpcups_only_build = xno && test x$lite_build = xno && test x$hpijs_only_build = xno)
 
168
 
 
169
AC_MSG_CHECKING([for hpijs install])
 
170
AC_ARG_ENABLE(hpijs_install,
 
171
  [  --enable-hpijs-install     enable hpijs install (default=no)],
 
172
  hpijs_install=$enableval, hpijs_install=no)
 
173
if test "$hpijs_install" = "yes"; then
 
174
   AC_MSG_RESULT(yes)
 
175
   epm_hpijs_install=yes
 
176
else
 
177
   AC_MSG_RESULT(no)
 
178
fi
 
179
AM_CONDITIONAL(HPIJS_INSTALL, test x$hpijs_install = xyes)
 
180
 
 
181
AC_MSG_CHECKING([for hpcups install])
 
182
AC_ARG_ENABLE(hpcups_install,
 
183
  [  --enable-hpcups-install     enable hpcups install (default=yes)],
 
184
  hpcups_install=$enableval, hpcups_install=yes)
 
185
if test "$hpcups_install" = "yes" && test "$hpijs_only_build" = "no"; then
 
186
   AC_MSG_RESULT(yes)
 
187
   epm_hpcups_install=yes
 
188
else
 
189
   AC_MSG_RESULT(no)
 
190
fi
 
191
AM_CONDITIONAL(HPCUPS_INSTALL, test x$hpcups_install = xyes && test x$hpijs_only_build = xno)
 
192
 
 
193
AC_MSG_CHECKING([for new hpcups install])
 
194
AC_ARG_ENABLE(new_hpcups,
 
195
  [  --enable-new-hpcups     enable new hpcups install (default=no)],
 
196
  new_hpcups=$enableval, new_hpcups=no)
 
197
if test "$new_hpcups" = "yes"; then
 
198
   AC_MSG_RESULT(yes)
 
199
else
 
200
   AC_MSG_RESULT(no)
 
201
fi
 
202
AM_CONDITIONAL(NEW_HPCUPS, test x$new_hpcups = xyes)
 
203
 
 
204
AC_MSG_CHECKING([for network build])
 
205
AC_ARG_ENABLE(network_build,
 
206
  [  --enable-network-build    enable network build (default=yes)],
 
207
  network_build=$enableval, network_build=yes)
 
208
if test "$network_build" = "yes"; then
 
209
   AC_MSG_RESULT(yes)
 
210
else
 
211
   AC_MSG_RESULT(no)
 
212
fi
 
213
AM_CONDITIONAL(NETWORK_BUILD, test x$network_build = xyes)
 
214
 
 
215
AC_MSG_CHECKING([for parallel port build])
 
216
AC_ARG_ENABLE(pp_build,
 
217
  [  --enable-pp-build    enable parallel port build (default=no)],
 
218
  pp_build=$enableval, pp_build=no)
 
219
if test "$pp_build" = "yes"; then
 
220
   AC_MSG_RESULT(yes)
 
221
   AC_DEFINE(HAVE_PPORT) 
 
222
else
 
223
   AC_MSG_RESULT(no)
 
224
fi
 
225
   
 
226
AC_MSG_CHECKING([for scanner build])
 
227
AC_ARG_ENABLE(scan_build,
 
228
  [  --enable-scan-build    enable scanner build (default=yes)],
 
229
  scan_build=$enableval, scan_build=yes)
 
230
if test "$scan_build" = "yes"; then
 
231
   AC_MSG_RESULT(yes)
 
232
   epm_scan=
 
233
else
 
234
   AC_MSG_RESULT(no)
 
235
   epm_scan=\#
 
236
fi
 
237
AM_CONDITIONAL(SCAN_BUILD, test x$scan_build = xyes)
 
238
 
 
239
AC_MSG_CHECKING([for gui build])
 
240
AC_ARG_ENABLE(gui_build,
 
241
  [  --enable-gui-build    enable gui build (default=yes)],
 
242
  gui_build=$enableval, gui_build=yes)
 
243
if test "$gui_build" = "yes"; then
 
244
   AC_MSG_RESULT(yes)
 
245
else
 
246
   AC_MSG_RESULT(no)
 
247
fi
 
248
AM_CONDITIONAL(GUI_BUILD, test x$gui_build = xyes)
 
249
 
 
250
AC_MSG_CHECKING([for fax build])
 
251
AC_ARG_ENABLE(fax_build,
 
252
  [  --enable-fax-build    enable fax build (default=yes)],
 
253
  fax_build=$enableval, fax_build=yes)
 
254
if test "$fax_build" = "yes"; then
 
255
   AC_MSG_RESULT(yes)
 
256
else
 
257
   AC_MSG_RESULT(no)
 
258
fi
 
259
AM_CONDITIONAL(FAX_BUILD, test x$fax_build = xyes)
 
260
 
 
261
AC_MSG_CHECKING([for dbus build])
 
262
AC_ARG_ENABLE(dbus_build,
 
263
  [  --enable-dbus-build    enable dbus build (default=yes)],
 
264
  dbus_build=$enableval, dbus_build=yes)
 
265
if test "$dbus_build" = "yes"; then
 
266
   AC_MSG_RESULT(yes)
 
267
else
 
268
   AC_MSG_RESULT(no)
 
269
fi
 
270
 
 
271
AC_MSG_CHECKING([for cups 1.1.x build])
 
272
AC_ARG_ENABLE(cups11_build,
 
273
  [  --enable-cups11-build    enable cups 1.1.x build (default=no)],
 
274
  cups11_build=$enableval, cups11_build=no)
 
275
if test "$cups11_build" = "yes"; then
 
276
   AC_MSG_RESULT(yes)
 
277
   AC_DEFINE(HAVE_CUPS11) 
 
278
else
 
279
   AC_MSG_RESULT(no)
 
280
fi
 
281
 
 
282
AC_MSG_CHECKING([for udev acl rules])
 
283
AC_ARG_ENABLE(udev_acl_rules,
 
284
  [  --enable-udev-acl-rules    enable udev acl rules (default=no)],
 
285
  udev_acl_rules=$enableval, udev_acl_rules=no)
 
286
if test "$udev_acl_rules" = "yes"; then
 
287
   AC_MSG_RESULT(yes)
 
288
else
 
289
   AC_MSG_RESULT(no)
 
290
fi
 
291
AM_CONDITIONAL(UDEV_ACL_RULES, test x$udev_acl_rules = xyes)
 
292
 
 
293
AC_MSG_CHECKING([for shadow build])
 
294
AC_ARG_ENABLE(shadow_build,
 
295
  [  --enable-shadow-build    enable shadow build (default=no)],
 
296
  shadow_build=$enableval, shadow_build=no)
 
297
if test "$shadow_build" = "yes"; then
 
298
   AC_MSG_RESULT(yes)
 
299
else
 
300
   AC_MSG_RESULT(no)
 
301
fi
 
302
AM_CONDITIONAL(SHADOW_BUILD, test x$shadow_build = xyes)
 
303
 
 
304
AC_ARG_WITH(cupsbackenddir, AC_HELP_STRING([--with-cupsbackenddir=DIR], [set cups backend install directory [default=/usr/lib/cups/backend]]),
 
305
   cupsbackenddir=$withval, cupsbackenddir="/usr/lib/cups/backend")
 
306
 
 
307
AC_ARG_WITH(cupsfilterdir, AC_HELP_STRING([--with-cupsfilterdir=DIR], [set cups filter install directory [default=/usr/lib/cups/filter]]),
 
308
   cupsfilterdir=$withval, cupsfilterdir="/usr/lib/cups/filter")
 
309
 
 
310
AC_ARG_WITH(icondir, AC_HELP_STRING([--with-icondir=DIR], [set hplip.desktop install directory [default=/usr/share/applications]]),
 
311
   icondir=$withval, icondir="/usr/share/applications")
 
312
 
 
313
AC_ARG_WITH(systraydir, AC_HELP_STRING([--with-systraydir=DIR], [set hplip-systray.desktop install directory [default=/etc/xdg/autostart]]),
 
314
   systraydir=$withval, systraydir="/etc/xdg/autostart")
 
315
 
 
316
AC_ARG_WITH(hpppddir, AC_HELP_STRING([--with-hpppddir=DIR], [set hp ppd install directory [default=datadir/ppd/HP]]),
 
317
   hpppddir=$withval, hpppddir="$datadir/ppd/HP")
 
318
 
 
319
if test -f "/usr/share/cups/mime/mime.types"; then 
 
320
   abs_mimedir="/usr/share/cups/mime/"
 
321
else
 
322
   abs_mimedir="/etc/cups/"
 
323
fi
 
324
AC_ARG_WITH(mimedir, AC_HELP_STRING([--with-mimedir=DIR], [set cups mime.types location [default=abs_mimedir]]),
 
325
   mimedir=$withval, mimedir="$abs_mimedir")
 
326
 
 
327
AC_ARG_WITH(docdir, AC_HELP_STRING([--with-docdir=DIR], [set hplip documentation directory [default=datadir/doc]]),
 
328
   hpdocdir=$withval, hpdocdir="$datadir/doc/hplip-$VERSION")
 
329
 
 
330
AC_MSG_CHECKING([for foomatic ppd install])
 
331
AC_ARG_ENABLE(foomatic_ppd_install,
 
332
  [  --enable-foomatic-ppd-install    enable foomatic static ppd install (default=no), uses hpppddir],
 
333
  foomatic_ppd_install=$enableval, foomatic_ppd_install=no)
 
334
if test $foomatic_ppd_install = yes; then
 
335
   AC_MSG_RESULT(yes)
 
336
   epm_foomatic_ppd_install=yes
 
337
else
 
338
   AC_MSG_RESULT(no)
 
339
fi
 
340
AM_CONDITIONAL(FOOMATIC_PPD_INSTALL, test x$foomatic_ppd_install = xyes)
 
341
 
 
342
AC_ARG_WITH(drvdir, AC_HELP_STRING([--with-drvdir=DIR], [set cups drv install directory [default=datadir/cups/drv/hp]]),
 
343
   drvdir=$withval, drvdir="$datadir/cups/drv/hp")
 
344
 
 
345
AC_MSG_CHECKING([for foomatic drv install])
 
346
AC_ARG_ENABLE(foomatic_drv_install,
 
347
  [  --enable-foomatic-drv-install    enable foomatic dynamic ppd install (default=no), uses drvdir and hpppddir],
 
348
  foomatic_drv_install=$enableval, foomatic_drv_install=no)
 
349
if test $foomatic_drv_install = yes; then
 
350
   AC_MSG_RESULT(yes)
 
351
   epm_foomatic_drv_install=yes
 
352
else
 
353
   AC_MSG_RESULT(no)
 
354
fi
 
355
AM_CONDITIONAL(FOOMATIC_DRV_INSTALL, test x$foomatic_drv_install = xyes)
 
356
 
 
357
AC_MSG_CHECKING([for cups drv install])
 
358
AC_ARG_ENABLE(cups_drv_install,
 
359
  [  --enable-cups-drv-install    enable cups dynamic ppd install (default=yes), uses drvdir and hpppddir],
 
360
  cups_drv_install=$enableval, cups_drv_install=yes)
 
361
if test $cups_drv_install = yes && test $hpijs_only_build = no; then
 
362
   AC_MSG_RESULT(yes)
 
363
   epm_cups_drv_install=yes
 
364
else
 
365
   AC_MSG_RESULT(no)
 
366
fi
 
367
AM_CONDITIONAL(CUPS_DRV_INSTALL, test x$cups_drv_install = xyes && test x$hpijs_only_build = xno)
 
368
 
 
369
AC_MSG_CHECKING([for cups ppd install])
 
370
AC_ARG_ENABLE(cups_ppd_install,
 
371
  [  --enable-cups-ppd-install    enable cups static ppd install (default=no), uses hpppddir],
 
372
  cups_ppd_install=$enableval, cups_ppd_install=no)
 
373
if test $cups_ppd_install = yes && test $hpijs_only_build = no; then
 
374
   AC_MSG_RESULT(yes)
 
375
   epm_cups_ppd_install=yes
 
376
else
 
377
   AC_MSG_RESULT(no)
 
378
fi
 
379
AM_CONDITIONAL(CUPS_PPD_INSTALL, test x$cups_ppd_install = xyes && test x$hpijs_only_build = xno)
 
380
 
 
381
AC_MSG_CHECKING([for foomatic-rip-hplip install])
 
382
AC_ARG_ENABLE(foomatic_rip_hplip_install,
 
383
  [  --enable-foomatic-rip-hplip-install    enable foomatic-rip-hplip install (default=no), uses cupsfilterdir],
 
384
  foomatic_rip_hplip_install=$enableval, foomatic_rip_hplip_install=no)
 
385
if test "$foomatic_rip_hplip_install" = "yes"; then
 
386
   AC_MSG_RESULT(yes)
 
387
   foomatic_filter="foomatic-rip-hplip"
 
388
   epm_foomatic_rip_hplip_install=yes
 
389
else
 
390
   AC_MSG_RESULT(no)
 
391
   foomatic_filter="foomatic-rip"
 
392
fi
 
393
AM_CONDITIONAL(RIP_INSTALL, test x$foomatic_rip_hplip_install = xyes)
 
394
 
 
395
AC_MSG_CHECKING([for qt4])
 
396
AC_ARG_ENABLE(qt4,
 
397
  [  --enable-qt4    enable qt4 (default=yes)],
 
398
  qt4=$enableval, qt4=yes)
 
399
if test "$qt4" = "yes"; then
 
400
   AC_MSG_RESULT(yes)
 
401
else
 
402
   AC_MSG_RESULT(no)
 
403
fi
 
404
AM_CONDITIONAL(QT4_INSTALL, test x$qt4 = xyes)
 
405
 
 
406
AC_MSG_CHECKING([for qt3])
 
407
AC_ARG_ENABLE(qt3,
 
408
  [  --enable-qt3    enable qt3 (default=no)],
 
409
  qt3=$enableval, qt3=no)
 
410
if test "$qt3" = "yes"; then
 
411
   AC_MSG_RESULT(yes)
 
412
else
 
413
   AC_MSG_RESULT(no)
 
414
fi
 
415
AM_CONDITIONAL(QT3_INSTALL, test x$qt3 = xyes)
 
416
 
 
417
if test "$gui_build" = "no"; then
 
418
   qt3=no
 
419
   qt4=no
 
420
fi
 
421
 
 
422
epm_qt3=\#
 
423
epm_qt4=\#
 
424
if test "$hpcups_only_build" = "no" && test "$hpijs_only_build" = "no"; then
 
425
if test "$qt3" = "yes" && test "$qt4" = "no"; then
 
426
   ui_toolkit=qt3
 
427
   epm_qt3=
 
428
elif test "$qt4" = "yes"; then
 
429
   ui_toolkit=qt4
 
430
   epm_qt4=
 
431
else
 
432
   ui_toolkit=no
 
433
fi
 
434
fi
 
435
 
 
436
AC_MSG_CHECKING([for policykit])
 
437
AC_ARG_ENABLE(policykit,
 
438
  [  --enable-policykit    enable PolicyKit (default=no)],
 
439
  policykit=$enableval, policykit=no)
 
440
if test "$policykit" = "yes"; then
 
441
   AC_MSG_RESULT(yes)
 
442
else
 
443
   AC_MSG_RESULT(no)
 
444
fi
 
445
AM_CONDITIONAL(POLICYKIT_INSTALL, test x$policykit = xyes)
 
446
 
 
447
# Determine where the PolicyKit policy file goes
 
448
if test "$policykit" = "yes"; then
 
449
   if test -d /usr/share/polkit-1; then
 
450
      policykit_dir=/usr/share/polkit-1/actions
 
451
   elif test -d /usr/share/PolicyKit; then
 
452
      policykit_dir=/usr/share/PolicyKit/policy
 
453
   else
 
454
      policykit_dir=/usr/share/PolicyKit/policy
 
455
   fi
 
456
else
 
457
   policykit_dir=
 
458
fi
 
459
 
 
460
AC_MSG_CHECKING(for host machine platform)
 
461
machine=`uname -m`
 
462
if test "$machine" = "x86_32" || test "$machine" = "i686"; then
 
463
    platform="x86_32"
 
464
elif test "$machine" = "x86_64"; then
 
465
    platform="x86_64"
 
466
elif test "$machine" = "ppc"; then
 
467
    platform="ppc"
 
468
else
 
469
    platform="unsupport"
 
470
fi
 
471
AC_MSG_RESULT($platform)
 
472
 
 
473
# Check conditional packages.
 
474
 
 
475
if test "$hpijs_only_build" = "no" && test "$network_build" = "yes"; then
 
476
#   AC_CHECK_LIB([crypto], [CRYPTO_free], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find net-snmp support (or --disable-network-build)], 4)])
 
477
#   AC_CHECK_LIB([netsnmp], [snmp_timeout], [LIBS="$LIBS" AC_DEFINE([HAVE_LIBNETSNMP])], [AC_MSG_ERROR([cannot find net-snmp support (or --disable-network-build)], 4)])
 
478
#   AC_CHECK_HEADERS(net-snmp/net-snmp-config.h,, [AC_MSG_ERROR([cannot find net-snmp-devel support (or --disable-network-build)], 5)])
 
479
 
 
480
   old_LIBS="$LIBS"
 
481
   AC_CHECK_LIB([crypto], [CRYPTO_free],, [AC_MSG_ERROR([cannot find net-snmp support (or --disable-network-build)], 4)])
 
482
   AC_CHECK_LIB([netsnmp], [snmp_timeout], [LIBS="$old_LIBS" AC_DEFINE([HAVE_LIBNETSNMP]) SNMPLIB="netsnmp"], check_ucd=yes)
 
483
if test "$check_ucd" = "yes"; then
 
484
   AC_CHECK_LIB([snmp], [snmp_timeout], [LIBS="$old_LIBS" AC_DEFINE([HAVE_LIBNETSNMP]) AC_DEFINE([HAVE_UCDSNMP]) SNMPLIB="snmp"], 
 
485
          [AC_MSG_ERROR([cannot find net/ucd-snmp support (or --disable-network-build)], 4)])
 
486
   AC_CHECK_HEADERS(ucd-snmp/ucd-snmp-config.h,, [AC_MSG_ERROR([cannot find ucd-snmp-devel support (or --disable-network-build)], 5)])
 
487
else
 
488
   AC_CHECK_HEADERS(net-snmp/net-snmp-config.h,, [AC_MSG_ERROR([cannot find net-snmp-devel support (or --disable-network-build)], 5)])
 
489
fi
 
490
fi
 
491
 
 
492
if test "$hpijs_only_build" = "no" && test "$pp_build" = "yes"; then
 
493
   AC_CHECK_HEADERS(linux/ppdev.h, ,[AC_MSG_ERROR([cannot find ppdev-devel support (or --disable-pp-build)], 8)])
 
494
fi
 
495
 
 
496
if test "$hpijs_only_build" = "no"; then
 
497
   AC_CHECK_LIB([cups], [cupsDoFileRequest], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libcups support], 9)])
 
498
   AC_CHECK_HEADERS(cups/cups.h, ,[AC_MSG_ERROR([cannot find cups-devel support], 3)])
 
499
   AC_CHECK_LIB([usb], [usb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb support], 2)])
 
500
   AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)])
 
501
fi
 
502
 
 
503
if test "$hpijs_only_build" = "no" && test "$lite_build" = "no" && test "$hpcups_only_build" = "no"; then
 
504
   AC_ARG_VAR([PYTHON], [Python interpreter/compiler command])
 
505
   AM_PATH_PYTHON([2.2])
 
506
   AC_MSG_CHECKING([for path to Python.h])
 
507
   PYTHONINCLUDEDIR=`$PYTHON -c "from distutils.sysconfig import get_python_inc; print get_python_inc();"`
 
508
   AC_MSG_RESULT("using $PYTHONINCLUDEDIR")
 
509
   AC_ARG_VAR(PYTHONINCLUDEDIR, [path to Python.h C header file])
 
510
   AC_CHECK_HEADERS(python$PYTHON_VERSION/Python.h, ,[AC_MSG_ERROR([cannot find python-devel support], 6)])
 
511
fi
 
512
 
 
513
if test "$hpijs_only_build" = "no" && test "$scan_build" = "yes" && test "$hpcups_only_build" = "no"; then
 
514
   AC_CHECK_LIB([sane], [sane_open], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find sane-backends-devel support (or --disable-scan-build)], 12)])
 
515
fi
 
516
 
 
517
# The PKG_CHECK_MODULES macro requires the pkgconfig package (pkg-config). Otherwise you get a strange shell script error
 
518
# "syntax error near upexpected token: DBUS".
 
519
if test "$hpijs_only_build" = "no" && test "$lite_build" = "no" && test "$hpcups_only_build" = "no" && test "$dbus_build" = "yes"; then
 
520
#   PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0.0, dbus-glib-1 >= 0.61],,[AC_MSG_ERROR([cannot find dbus-devel support: $DBUS_PKG_ERRORS], 14)])
 
521
   PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.0.0],,[AC_MSG_ERROR([cannot find dbus-devel support: $DBUS_PKG_ERRORS], 14)])
 
522
   AC_CHECK_LIB([dbus-1], [dbus_connection_open], [LIBS="$LIBS" AC_DEFINE([HAVE_DBUS])], [AC_MSG_ERROR([cannot find libdbus support], 13)])
 
523
fi
 
524
 
 
525
if test "$hpijs_only_build" = "no" && test "$lite_build" = "no" && test "$hpcups_only_build" = "no" && test "$fax_build" = "yes" && test "$dbus_build" = "no"; then
 
526
   AC_MSG_ERROR([fax requires dbus support], 15)
 
527
fi
 
528
 
 
529
# AC_DEFINE_DIR([DATADIR], [datadir])
 
530
# Copyright © 2006 Stepan Kasal  <kasal@ucw.cz>
 
531
# Copyright © 2006 Andreas Schwab <schwab@suse.de>
 
532
# Copyright © 2006 Guido U. Draheim <guidod@gmx.de>
 
533
# Copyright © 2006 Alexandre Oliva
 
534
# Copying and distribution of this file, with or without modification, are permitted in any medium without
 
535
# royalty provided the copyright notice and this notice are preserved.
 
536
AC_DEFUN([AC_DEFINE_DIR], [
 
537
  prefix_NONE=
 
538
  exec_prefix_NONE=
 
539
  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
 
540
  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
 
541
dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
 
542
dnl refers to ${prefix}.  Thus we have to use `eval' twice.
 
543
  eval ac_define_dir="\"[$]$2\""
 
544
  eval ac_define_dir="\"$ac_define_dir\""
 
545
  $1="$ac_define_dir"
 
546
  test "$prefix_NONE" && prefix=NONE
 
547
  test "$exec_prefix_NONE" && exec_prefix=NONE
 
548
])
 
549
 
 
550
AC_DEFINE_DIR([abs_datadir], [datadir])
 
551
AC_DEFINE_DIR([abs_sbindir], [sbindir])
 
552
AC_DEFINE_DIR([abs_hpppddir], [hpppddir])
 
553
AC_DEFINE_DIR([abs_docdir], [hpdocdir])
 
554
abs_ppddir=${abs_hpppddir%/*}
 
555
AC_DEFINE_DIR([abs_drvdir], [drvdir])
 
556
 
 
557
AC_SUBST(abs_datadir) 
 
558
AC_SUBST(abs_sbindir) 
 
559
AC_SUBST(abs_hpppddir) 
 
560
AC_SUBST(abs_docdir) 
 
561
AC_SUBST(abs_ppddir) 
 
562
AC_SUBST(abs_drvdir) 
 
563
AC_SUBST(abs_mimedir) 
 
564
AC_SUBST(mimedir) 
 
565
AC_SUBST(icondir)
 
566
AC_SUBST(systraydir)
 
567
AC_SUBST(cupsbackenddir)
 
568
AC_SUBST(cupsfilterdir)
 
569
AC_SUBST(hpppddir)
 
570
AC_SUBST(hpdocdir)
 
571
AC_SUBST(drvdir)
 
572
AC_SUBST(network_build)
 
573
AC_SUBST(pp_build)
 
574
AC_SUBST(gui_build)
 
575
AC_SUBST(scan_build)
 
576
AC_SUBST(fax_build)
 
577
AC_SUBST(dbus_build)
 
578
AC_SUBST(cups11_build)
 
579
AC_SUBST(foomatic_drv_install)
 
580
AC_SUBST(foomatic_ppd_install)
 
581
AC_SUBST(foomatic_rip_hplip_install)
 
582
AC_SUBST(foomatic_filter)
 
583
AC_SUBST(cups_ppd_install)
 
584
AC_SUBST(cups_drv_install)
 
585
AC_SUBST(hpijs_install)
 
586
AC_SUBST(hpcups_install)
 
587
AC_SUBST(doc_build)
 
588
AC_SUBST(shadow_build)
 
589
AC_SUBST(APDK_ENDIAN_FLAG)
 
590
AC_SUBST(APDK_AUTO_INCLUDE_FLAG)
 
591
AC_SUBST(ui_toolkit)
 
592
AC_SUBST(platform)
 
593
AC_SUBST(qt3)
 
594
AC_SUBST(qt4)
 
595
AC_SUBST(epm_foomatic_rip_hplip_install)
 
596
AC_SUBST(epm_foomatic_ppd_install)
 
597
AC_SUBST(epm_cups_ppd_install)
 
598
AC_SUBST(epm_foomatic_drv_install)
 
599
AC_SUBST(epm_cups_drv_install)
 
600
AC_SUBST(epm_hpijs_install)
 
601
AC_SUBST(epm_hpcups_install)
 
602
AC_SUBST(epm_qt4)
 
603
AC_SUBST(epm_qt3)
 
604
AC_SUBST(epm_full)
 
605
AC_SUBST(epm_lite)
 
606
AC_SUBST(epm_hpcups_only)
 
607
AC_SUBST(epm_hpijs_only)
 
608
AC_SUBST(epm_print_only_exclude)
 
609
AC_SUBST(epm_scan)
 
610
AC_SUBST(policykit)
 
611
AC_SUBST(policykit_dir)
 
612
AC_SUBST(hpijs_only_build)
 
613
AC_SUBST(lite_build)
 
614
AC_SUBST(hpcups_only_build)
 
615
AC_SUBST(SNMPLIB)
 
616
AC_SUBST(prefix)
 
617
AC_SUBST(udev_acl_rules)
 
618
 
 
619
AC_CONFIG_FILES(Makefile hplip.conf hplip.desktop hplip-systray.desktop prnt/drv/hpijs.drv prnt/drv/hpcups.drv hplip.list data/policykit/com.hp.hplip.service)
 
620
AC_OUTPUT