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)
115
AC_DEFINE(HAVE_LIBHPIP)
117
AM_CONDITIONAL(HPLIP_BUILD, test x$hpijs_only_build = xno)
117
epm_print_only_exclude=\#
122
AC_DEFINE(HAVE_LIBHPIP)
124
AM_CONDITIONAL(HPIJS_ONLY_BUILD, test x$hpijs_only_build = xyes)
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
134
epm_print_only_exclude=
139
AM_CONDITIONAL(LITE_BUILD, test x$lite_build = xyes)
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
150
epm_print_only_exclude=\#
154
AM_CONDITIONAL(HPCUPS_ONLY_BUILD, test x$hpcups_only_build = xyes)
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)
161
if test "$lite_build" = "no" && test "$hpcups_only_build" = "no" && test "$hpijs_only_build" = "no"; then
165
epm_print_only_exclude=
167
AM_CONDITIONAL(FULL_BUILD, test x$hpcups_only_build = xno && test x$lite_build = xno && test x$hpijs_only_build = xno)
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
175
epm_hpijs_install=yes
179
AM_CONDITIONAL(HPIJS_INSTALL, test x$hpijs_install = xyes)
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
187
epm_hpcups_install=yes
191
AM_CONDITIONAL(HPCUPS_INSTALL, test x$hpcups_install = xyes && test x$hpijs_only_build = xno)
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
202
AM_CONDITIONAL(NEW_HPCUPS, test x$new_hpcups = xyes)
119
204
AC_MSG_CHECKING([for network build])
120
205
AC_ARG_ENABLE(network_build,
193
279
AC_MSG_RESULT(no)
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
291
AM_CONDITIONAL(UDEV_ACL_RULES, test x$udev_acl_rules = xyes)
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)],
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
247
345
AC_MSG_RESULT(no)
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
258
357
AC_MSG_RESULT(no)
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)
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
270
369
AC_MSG_RESULT(no)
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)
274
373
AC_MSG_CHECKING([for foomatic-rip-hplip install])
275
374
AC_ARG_ENABLE(foomatic_rip_hplip_install,
333
437
AM_CONDITIONAL(POLICYKIT_INSTALL, test x$policykit = xyes)
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
446
policykit_dir=/usr/share/PolicyKit/policy
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.
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)])
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)])
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)])
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)])
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)])
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)])
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)])
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)
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)
596
AC_SUBST(epm_hpcups_only)
597
AC_SUBST(epm_hpijs_only)
598
AC_SUBST(epm_print_only_exclude)
454
600
AC_SUBST(policykit)
601
AC_SUBST(policykit_dir)
602
AC_SUBST(hpijs_only_build)
604
AC_SUBST(hpcups_only_build)
607
AC_SUBST(udev_acl_rules)
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)