~ubuntu-branches/ubuntu/raring/hplip/raring

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2009-12-14 20:08:44 UTC
  • mfrom: (2.1.118 lucid)
  • Revision ID: james.westby@ubuntu.com-20091214200844-z8qhqwgppbu3t7ze
Tags: 3.9.10-4
KBSD patch from KiBi (Closes: #560796)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#   103 = no jpeg-devel
26
26
#   104 = no libdl
27
27
 
28
 
AC_PREREQ(2.59)
29
 
AC_INIT([HP Linux Imaging and Printing], [3.9.4b], [3.9.4b.10], [hplip])
30
 
AM_INIT_AUTOMAKE([1.9 foreign])
 
28
#AC_PREREQ(2.59)
 
29
AC_INIT([HP Linux Imaging and Printing], [3.9.10], [3.9.10.72], [hplip])
 
30
#AM_INIT_AUTOMAKE([1.9 foreign])
 
31
AM_INIT_AUTOMAKE
31
32
AC_DISABLE_STATIC
32
33
AC_PROG_LIBTOOL
33
34
 
110
111
  hpijs_only_build=$enableval, hpijs_only_build=no)
111
112
if test "$hpijs_only_build" = "yes"; then
112
113
   AC_MSG_RESULT(yes)
113
 
else
114
 
   AC_MSG_RESULT(no)
115
 
   AC_DEFINE(HAVE_LIBHPIP) 
116
 
fi
117
 
AM_CONDITIONAL(HPLIP_BUILD, test x$hpijs_only_build = xno)
 
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)
118
203
 
119
204
AC_MSG_CHECKING([for network build])
120
205
AC_ARG_ENABLE(network_build,
129
214
 
130
215
AC_MSG_CHECKING([for parallel port build])
131
216
AC_ARG_ENABLE(pp_build,
132
 
  [  --enable-pp-build    enable parallel port build (default=yes)],
133
 
  pp_build=$enableval, pp_build=yes)
 
217
  [  --enable-pp-build    enable parallel port build (default=no)],
 
218
  pp_build=$enableval, pp_build=no)
134
219
if test "$pp_build" = "yes"; then
135
220
   AC_MSG_RESULT(yes)
136
221
   AC_DEFINE(HAVE_PPORT) 
144
229
  scan_build=$enableval, scan_build=yes)
145
230
if test "$scan_build" = "yes"; then
146
231
   AC_MSG_RESULT(yes)
 
232
   epm_scan=
147
233
else
148
234
   AC_MSG_RESULT(no)
 
235
   epm_scan=\#
149
236
fi
150
237
AM_CONDITIONAL(SCAN_BUILD, test x$scan_build = xyes)
151
238
 
177
264
  dbus_build=$enableval, dbus_build=yes)
178
265
if test "$dbus_build" = "yes"; then
179
266
   AC_MSG_RESULT(yes)
180
 
   AC_DEFINE(HAVE_DBUS) 
181
267
else
182
268
   AC_MSG_RESULT(no)
183
269
fi
193
279
   AC_MSG_RESULT(no)
194
280
fi
195
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
 
196
293
AC_MSG_CHECKING([for shadow build])
197
294
AC_ARG_ENABLE(shadow_build,
198
295
  [  --enable-shadow-build    enable shadow build (default=no)],
239
336
 
240
337
AC_MSG_CHECKING([for foomatic drv install])
241
338
AC_ARG_ENABLE(foomatic_drv_install,
242
 
  [  --enable-foomatic-drv-install    enable foomatic dynamic ppd install (default=yes), uses drvdir and hpppddir],
243
 
  foomatic_drv_install=$enableval, foomatic_drv_install=yes)
 
339
  [  --enable-foomatic-drv-install    enable foomatic dynamic ppd install (default=no), uses drvdir and hpppddir],
 
340
  foomatic_drv_install=$enableval, foomatic_drv_install=no)
244
341
if test $foomatic_drv_install = yes; then
245
342
   AC_MSG_RESULT(yes)
 
343
   epm_foomatic_drv_install=yes
246
344
else
247
345
   AC_MSG_RESULT(no)
248
346
fi
250
348
 
251
349
AC_MSG_CHECKING([for cups drv install])
252
350
AC_ARG_ENABLE(cups_drv_install,
253
 
  [  --enable-cups-drv-install    enable cups dynamic ppd install (default=no), uses drvdir and hpppddir],
254
 
  cups_drv_install=$enableval, cups_drv_install=no)
255
 
if test $cups_drv_install = yes; then
 
351
  [  --enable-cups-drv-install    enable cups dynamic ppd install (default=yes), uses drvdir and hpppddir],
 
352
  cups_drv_install=$enableval, cups_drv_install=yes)
 
353
if test $cups_drv_install = yes && test $hpijs_only_build = no; then
256
354
   AC_MSG_RESULT(yes)
 
355
   epm_cups_drv_install=yes
257
356
else
258
357
   AC_MSG_RESULT(no)
259
358
fi
260
 
AM_CONDITIONAL(CUPS_DRV_INSTALL, test x$cups_drv_install = xyes)
 
359
AM_CONDITIONAL(CUPS_DRV_INSTALL, test x$cups_drv_install = xyes && test x$hpijs_only_build = xno)
261
360
 
262
361
AC_MSG_CHECKING([for cups ppd install])
263
362
AC_ARG_ENABLE(cups_ppd_install,
264
363
  [  --enable-cups-ppd-install    enable cups static ppd install (default=no), uses hpppddir],
265
364
  cups_ppd_install=$enableval, cups_ppd_install=no)
266
 
if test $cups_ppd_install = yes; then
 
365
if test $cups_ppd_install = yes && test $hpijs_only_build = no; then
267
366
   AC_MSG_RESULT(yes)
268
367
   epm_cups_ppd_install=yes
269
368
else
270
369
   AC_MSG_RESULT(no)
271
370
fi
272
 
AM_CONDITIONAL(CUPS_PPD_INSTALL, test x$cups_ppd_install = xyes)
 
371
AM_CONDITIONAL(CUPS_PPD_INSTALL, test x$cups_ppd_install = xyes && test x$hpijs_only_build = xno)
273
372
 
274
373
AC_MSG_CHECKING([for foomatic-rip-hplip install])
275
374
AC_ARG_ENABLE(foomatic_rip_hplip_install,
312
411
   qt4=no
313
412
fi
314
413
 
 
414
epm_qt3=\#
 
415
epm_qt4=\#
 
416
if test "$hpcups_only_build" = "no" && test "$hpijs_only_build" = "no"; then
315
417
if test "$qt3" = "yes" && test "$qt4" = "no"; then
316
418
   ui_toolkit=qt3
 
419
   epm_qt3=
317
420
elif test "$qt4" = "yes"; then
318
421
   ui_toolkit=qt4
319
 
   epm_qt4_install=yes
 
422
   epm_qt4=
320
423
else
321
424
   ui_toolkit=no
322
425
fi
 
426
fi
323
427
 
324
428
AC_MSG_CHECKING([for policykit])
325
429
AC_ARG_ENABLE(policykit,
332
436
fi
333
437
AM_CONDITIONAL(POLICYKIT_INSTALL, test x$policykit = xyes)
334
438
 
 
439
# Determine where the PolicyKit policy file goes
 
440
if test "$policykit" = "yes"; then
 
441
   if test -d /usr/share/polkit-1; then
 
442
      policykit_dir=/usr/share/polkit-1/actions
 
443
   elif test -d /usr/share/PolicyKit; then
 
444
      policykit_dir=/usr/share/PolicyKit/policy
 
445
   else
 
446
      policykit_dir=/usr/share/PolicyKit/policy
 
447
   fi
 
448
else
 
449
   policykit_dir=
 
450
fi
 
451
 
335
452
AC_MSG_CHECKING(for host machine platform)
336
453
machine=`uname -m`
337
454
if test "$machine" = "x86_32" || test "$machine" = "i686"; then
348
465
# Check conditional packages.
349
466
 
350
467
if test "$hpijs_only_build" = "no" && test "$network_build" = "yes"; then
351
 
   AC_CHECK_LIB([crypto], [CRYPTO_free], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find net-snmp support (or --disable-network-build)], 4)])
352
 
   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)])
 
468
#   AC_CHECK_LIB([crypto], [CRYPTO_free], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find net-snmp support (or --disable-network-build)], 4)])
 
469
#   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)])
 
470
#   AC_CHECK_HEADERS(net-snmp/net-snmp-config.h,, [AC_MSG_ERROR([cannot find net-snmp-devel support (or --disable-network-build)], 5)])
 
471
 
 
472
   old_LIBS="$LIBS"
 
473
   AC_CHECK_LIB([crypto], [CRYPTO_free],, [AC_MSG_ERROR([cannot find net-snmp support (or --disable-network-build)], 4)])
 
474
   AC_CHECK_LIB([netsnmp], [snmp_timeout], [LIBS="$old_LIBS" AC_DEFINE([HAVE_LIBNETSNMP]) SNMPLIB="netsnmp"], check_ucd=yes)
 
475
if test "$check_ucd" = "yes"; then
 
476
   AC_CHECK_LIB([snmp], [snmp_timeout], [LIBS="$old_LIBS" AC_DEFINE([HAVE_LIBNETSNMP]) AC_DEFINE([HAVE_UCDSNMP]) SNMPLIB="snmp"], 
 
477
          [AC_MSG_ERROR([cannot find net/ucd-snmp support (or --disable-network-build)], 4)])
 
478
   AC_CHECK_HEADERS(ucd-snmp/ucd-snmp-config.h,, [AC_MSG_ERROR([cannot find ucd-snmp-devel support (or --disable-network-build)], 5)])
 
479
else
353
480
   AC_CHECK_HEADERS(net-snmp/net-snmp-config.h,, [AC_MSG_ERROR([cannot find net-snmp-devel support (or --disable-network-build)], 5)])
354
481
fi
 
482
fi
355
483
 
356
484
if test "$hpijs_only_build" = "no" && test "$pp_build" = "yes"; then
357
485
   AC_CHECK_HEADERS(linux/ppdev.h, ,[AC_MSG_ERROR([cannot find ppdev-devel support (or --disable-pp-build)], 8)])
362
490
   AC_CHECK_HEADERS(cups/cups.h, ,[AC_MSG_ERROR([cannot find cups-devel support], 3)])
363
491
   AC_CHECK_LIB([usb], [usb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb support], 2)])
364
492
   AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)])
 
493
fi
 
494
 
 
495
if test "$hpijs_only_build" = "no" && test "$lite_build" = "no" && test "$hpcups_only_build" = "no"; then
365
496
   AC_ARG_VAR([PYTHON], [Python interpreter/compiler command])
366
497
   AM_PATH_PYTHON([2.2])
367
498
   AC_MSG_CHECKING([for path to Python.h])
371
502
   AC_CHECK_HEADERS(python$PYTHON_VERSION/Python.h, ,[AC_MSG_ERROR([cannot find python-devel support], 6)])
372
503
fi
373
504
 
374
 
if test "$hpijs_only_build" = "no" && test "$scan_build" = "yes"; then
 
505
if test "$hpijs_only_build" = "no" && test "$scan_build" = "yes" && test "$hpcups_only_build" = "no"; then
375
506
   AC_CHECK_LIB([sane], [sane_open], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find sane-backends-devel support (or --disable-scan-build)], 12)])
376
507
fi
377
508
 
378
 
if test "$hpijs_only_build" = "no" && test "$dbus_build" = "yes"; then
 
509
# The PKG_CHECK_MODULES macro requires the pkgconfig package (pkg-config). Otherwise you get a strange shell script error
 
510
# "syntax error near upexpected token: DBUS".
 
511
if test "$hpijs_only_build" = "no" && test "$lite_build" = "no" && test "$hpcups_only_build" = "no" && test "$dbus_build" = "yes"; then
379
512
#   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)])
380
513
   PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.0.0],,[AC_MSG_ERROR([cannot find dbus-devel support: $DBUS_PKG_ERRORS], 14)])
381
 
   AC_CHECK_LIB([dbus-1], [dbus_connection_open], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libdbus support], 13)])
 
514
   AC_CHECK_LIB([dbus-1], [dbus_connection_open], [LIBS="$LIBS" AC_DEFINE([HAVE_DBUS])], [AC_MSG_ERROR([cannot find libdbus support], 13)])
382
515
fi
383
516
 
384
 
if test "$hpijs_only_build" = "no" && test "$fax_build" = "yes" && test "$dbus_build" = "no"; then
 
517
if test "$hpijs_only_build" = "no" && test "$lite_build" = "no" && test "$hpcups_only_build" = "no" && test "$fax_build" = "yes" && test "$dbus_build" = "no"; then
385
518
   AC_MSG_ERROR([fax requires dbus support], 15)
386
519
fi
387
520
 
439
572
AC_SUBST(foomatic_filter)
440
573
AC_SUBST(cups_ppd_install)
441
574
AC_SUBST(cups_drv_install)
 
575
AC_SUBST(hpijs_install)
 
576
AC_SUBST(hpcups_install)
442
577
AC_SUBST(doc_build)
443
578
AC_SUBST(shadow_build)
444
579
AC_SUBST(APDK_ENDIAN_FLAG)
450
585
AC_SUBST(epm_foomatic_rip_hplip_install)
451
586
AC_SUBST(epm_foomatic_ppd_install)
452
587
AC_SUBST(epm_cups_ppd_install)
453
 
AC_SUBST(epm_qt4_install)
 
588
AC_SUBST(epm_foomatic_drv_install)
 
589
AC_SUBST(epm_cups_drv_install)
 
590
AC_SUBST(epm_hpijs_install)
 
591
AC_SUBST(epm_hpcups_install)
 
592
AC_SUBST(epm_qt4)
 
593
AC_SUBST(epm_qt3)
 
594
AC_SUBST(epm_full)
 
595
AC_SUBST(epm_lite)
 
596
AC_SUBST(epm_hpcups_only)
 
597
AC_SUBST(epm_hpijs_only)
 
598
AC_SUBST(epm_print_only_exclude)
 
599
AC_SUBST(epm_scan)
454
600
AC_SUBST(policykit)
 
601
AC_SUBST(policykit_dir)
 
602
AC_SUBST(hpijs_only_build)
 
603
AC_SUBST(lite_build)
 
604
AC_SUBST(hpcups_only_build)
 
605
AC_SUBST(SNMPLIB)
455
606
AC_SUBST(prefix)
 
607
AC_SUBST(udev_acl_rules)
456
608
 
457
609
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)
458
610
AC_OUTPUT