17b66cf61Sopenharmony_ci# Process this file with autoconf to create configure. 27b66cf61Sopenharmony_ci 37b66cf61Sopenharmony_ciAC_PREREQ([2.65]) 47b66cf61Sopenharmony_ci 57b66cf61Sopenharmony_ci# ==================== 67b66cf61Sopenharmony_ci# Version informations 77b66cf61Sopenharmony_ci# ==================== 87b66cf61Sopenharmony_cim4_define([cups_filters_version_major],[1]) 97b66cf61Sopenharmony_cim4_define([cups_filters_version_minor],[28]) 107b66cf61Sopenharmony_cim4_define([cups_filters_version_micro],[17]) 117b66cf61Sopenharmony_cim4_define([cups_filters_version],[cups_filters_version_major.cups_filters_version_minor.cups_filters_version_micro]) 127b66cf61Sopenharmony_ci 137b66cf61Sopenharmony_ci# ============= 147b66cf61Sopenharmony_ci# Automake init 157b66cf61Sopenharmony_ci# ============= 167b66cf61Sopenharmony_ciAC_INIT([cups-filters],[cups_filters_version]) 177b66cf61Sopenharmony_ciAC_CONFIG_MACRO_DIR([m4]) 187b66cf61Sopenharmony_cim4_include([m4/ac_define_dir.m4]) 197b66cf61Sopenharmony_cim4_include([m4/ax_compare_version.m4]) 207b66cf61Sopenharmony_cim4_include([m4/basic-directories.m4]) 217b66cf61Sopenharmony_ciAM_INIT_AUTOMAKE([1.11 gnu dist-xz dist-bzip2 subdir-objects]) 227b66cf61Sopenharmony_ciAM_SILENT_RULES([yes]) 237b66cf61Sopenharmony_ciAC_LANG([C++]) 247b66cf61Sopenharmony_ciAC_CONFIG_HEADERS([config.h]) 257b66cf61Sopenharmony_ci# Extra defines for the config.h 267b66cf61Sopenharmony_ciAH_BOTTOM([ 277b66cf61Sopenharmony_ci#ifdef HAVE_LONG_LONG 287b66cf61Sopenharmony_ci# define CUPS_LLFMT "%lld" 297b66cf61Sopenharmony_ci# define CUPS_LLCAST (long long) 307b66cf61Sopenharmony_ci#else 317b66cf61Sopenharmony_ci# define CUPS_LLFMT "%ld" 327b66cf61Sopenharmony_ci# define CUPS_LLCAST (long) 337b66cf61Sopenharmony_ci#endif /* HAVE_LONG_LONG */ 347b66cf61Sopenharmony_ci 357b66cf61Sopenharmony_ci#ifdef HAVE_ARC4RANDOM 367b66cf61Sopenharmony_ci# define CUPS_RAND() arc4random() 377b66cf61Sopenharmony_ci# define CUPS_SRAND(v) arc4random_stir() 387b66cf61Sopenharmony_ci#elif defined(HAVE_RANDOM) 397b66cf61Sopenharmony_ci# define CUPS_RAND() random() 407b66cf61Sopenharmony_ci# define CUPS_SRAND(v) srandom(v) 417b66cf61Sopenharmony_ci#elif defined(HAVE_LRAND48) 427b66cf61Sopenharmony_ci# define CUPS_RAND() lrand48() 437b66cf61Sopenharmony_ci# define CUPS_SRAND(v) srand48(v) 447b66cf61Sopenharmony_ci#else 457b66cf61Sopenharmony_ci# define CUPS_RAND() rand() 467b66cf61Sopenharmony_ci# define CUPS_SRAND(v) srand(v) 477b66cf61Sopenharmony_ci#endif /* HAVE_ARC4RANDOM */ 487b66cf61Sopenharmony_ci]) 497b66cf61Sopenharmony_ci 507b66cf61Sopenharmony_ci# =========================== 517b66cf61Sopenharmony_ci# Find required base packages 527b66cf61Sopenharmony_ci# =========================== 537b66cf61Sopenharmony_ciAC_PROG_CC 547b66cf61Sopenharmony_ciAC_PROG_CXX 557b66cf61Sopenharmony_ciAX_CXX_COMPILE_STDCXX([11],[noext],[mandatory]) 567b66cf61Sopenharmony_ciAM_PROG_CC_C_O 577b66cf61Sopenharmony_ciAM_ICONV 587b66cf61Sopenharmony_ciAC_PROG_CPP 597b66cf61Sopenharmony_ciAC_PROG_INSTALL 607b66cf61Sopenharmony_ciAC_PROG_LN_S 617b66cf61Sopenharmony_ciAS_LN_SRF_PREPARE 627b66cf61Sopenharmony_ciAC_PROG_LN_SRF 637b66cf61Sopenharmony_ciAC_PROG_MAKE_SET 647b66cf61Sopenharmony_ciAC_PROG_LIBTOOL 657b66cf61Sopenharmony_ciPKG_PROG_PKG_CONFIG([0.20]) 667b66cf61Sopenharmony_ci 677b66cf61Sopenharmony_ciAM_GNU_GETTEXT_VERSION([0.18.3]) 687b66cf61Sopenharmony_ciAM_GNU_GETTEXT([external]) 697b66cf61Sopenharmony_ci 707b66cf61Sopenharmony_ci# ======================================== 717b66cf61Sopenharmony_ci# Specify the fontdir patch if not default 727b66cf61Sopenharmony_ci# ======================================== 737b66cf61Sopenharmony_ciAC_ARG_WITH([fontdir], 747b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-fontdir=path], [Specify path to font config directory (default: fonts/conf.d/).])], 757b66cf61Sopenharmony_ci [FONTDIR="$withval"], 767b66cf61Sopenharmony_ci [FONTDIR="fonts/conf.d"] 777b66cf61Sopenharmony_ci) 787b66cf61Sopenharmony_ciAC_SUBST(FONTDIR) 797b66cf61Sopenharmony_ci 807b66cf61Sopenharmony_ci# ================================ 817b66cf61Sopenharmony_ci# Find CUPS internals (no pc file) 827b66cf61Sopenharmony_ci# ================================ 837b66cf61Sopenharmony_ciAC_ARG_WITH([cups-config], 847b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-cups-config=path], [Specify path to cups-config executable.])], 857b66cf61Sopenharmony_ci [with_cups_config="$withval"], 867b66cf61Sopenharmony_ci [with_cups_config=system] 877b66cf61Sopenharmony_ci) 887b66cf61Sopenharmony_ci 897b66cf61Sopenharmony_ciAS_IF([test "x$with_cups_config" != "xsystem"], [ 907b66cf61Sopenharmony_ci CUPSCONFIG=$with_cups_config 917b66cf61Sopenharmony_ci], [ 927b66cf61Sopenharmony_ci AC_PATH_TOOL(CUPSCONFIG, [cups-config]) 937b66cf61Sopenharmony_ci AS_IF([test -z "$CUPSCONFIG"], [ 947b66cf61Sopenharmony_ci AC_MSG_ERROR([Required cups-config is missing. Please install CUPS developer packages.]) 957b66cf61Sopenharmony_ci ]) 967b66cf61Sopenharmony_ci]) 977b66cf61Sopenharmony_ciCUPS_CFLAGS=`$CUPSCONFIG --cflags`' -D_PPD_DEPRECATED=""' 987b66cf61Sopenharmony_ciCUPS_LIBS=`$CUPSCONFIG --image --libs` 997b66cf61Sopenharmony_ciCUPS_VERSION=`$CUPSCONFIG --version` 1007b66cf61Sopenharmony_ciAC_SUBST(CUPS_CFLAGS) 1017b66cf61Sopenharmony_ciAC_SUBST(CUPS_LIBS) 1027b66cf61Sopenharmony_ci 1037b66cf61Sopenharmony_ciCUPS_DATADIR="`$CUPSCONFIG --datadir`" 1047b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED(CUPS_DATADIR, "$CUPS_DATADIR", [CUPS datadir]) 1057b66cf61Sopenharmony_ciAC_SUBST(CUPS_DATADIR) 1067b66cf61Sopenharmony_ci 1077b66cf61Sopenharmony_ciCUPS_SERVERROOT="`$CUPSCONFIG --serverroot`" 1087b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$CUPS_SERVERROOT", [CUPS serverroot]) 1097b66cf61Sopenharmony_ciAC_SUBST(CUPS_SERVERROOT) 1107b66cf61Sopenharmony_ci 1117b66cf61Sopenharmony_ciCUPS_FONTPATH="$CUPS_DATADIR/fonts" 1127b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH", [Path to CUPS fonts dir]) 1137b66cf61Sopenharmony_ciAC_SUBST(CUPS_FONTPATH) 1147b66cf61Sopenharmony_ci 1157b66cf61Sopenharmony_ciCUPS_SERVERBIN="`$CUPSCONFIG --serverbin`" 1167b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN", [Path to CUPS binaries dir]) 1177b66cf61Sopenharmony_ciAC_SUBST(CUPS_SERVERBIN) 1187b66cf61Sopenharmony_ci 1197b66cf61Sopenharmony_ciAX_COMPARE_VERSION([$CUPS_VERSION],[gt],[1.4], [ 1207b66cf61Sopenharmony_ci AC_DEFINE(CUPS_1_4, 1, [CUPS Version is 1.4 or newer]) 1217b66cf61Sopenharmony_ci]) 1227b66cf61Sopenharmony_ci 1237b66cf61Sopenharmony_ciAC_ARG_ENABLE([driverless], [AS_HELP_STRING([--enable-driverless], [enable PPD generator for driverless printing in /usr/lib/cups/driver/, for manual setup of driverless printers with printer setup tool.])], 1247b66cf61Sopenharmony_ci [enable_driverless="$enableval"], 1257b66cf61Sopenharmony_ci [enable_driverless=yes] 1267b66cf61Sopenharmony_ci) 1277b66cf61Sopenharmony_ciAX_COMPARE_VERSION([$CUPS_VERSION],[lt],[1.6], [ 1287b66cf61Sopenharmony_ci enable_driverless=no 1297b66cf61Sopenharmony_ci]) 1307b66cf61Sopenharmony_ciAM_CONDITIONAL([ENABLE_DRIVERLESS], 1317b66cf61Sopenharmony_ci[test "x$enable_driverless" != "xno"]) 1327b66cf61Sopenharmony_ci 1337b66cf61Sopenharmony_ciAPPLE_RASTER_FILTER=rastertopdf 1347b66cf61Sopenharmony_ciAX_COMPARE_VERSION([$CUPS_VERSION],[lt],[2.2.2], [ 1357b66cf61Sopenharmony_ci APPLE_RASTER_FILTER=urftopdf 1367b66cf61Sopenharmony_ci]) 1377b66cf61Sopenharmony_ciAC_ARG_WITH([apple-raster-filter], 1387b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-apple-raster-filter=rastertopdf|urftopdf], [Select filter for Apple Raster input. Default: rastertopdf for CUPS 2.2.2+, urftopdf for older CUPS])], 1397b66cf61Sopenharmony_ci [with_apple_raster_filter="$withval"], 1407b66cf61Sopenharmony_ci [with_apple_raster_filter="$APPLE_RASTER_FILTER"] 1417b66cf61Sopenharmony_ci) 1427b66cf61Sopenharmony_ciAS_CASE([x$with_apple_raster_filter], 1437b66cf61Sopenharmony_ci [xrastertopdf|xurftopdf], [APPLE_RASTER_FILTER=$with_apple_raster_filter], 1447b66cf61Sopenharmony_ci [AC_MSG_ERROR([Unknown value of with-apple-raster-filter provided: $with_apple_raster_filter])] 1457b66cf61Sopenharmony_ci) 1467b66cf61Sopenharmony_ciAM_CONDITIONAL([ENABLE_URFTOPDF], 1477b66cf61Sopenharmony_ci [test "x$APPLE_RASTER_FILTER" = "xurftopdf"]) 1487b66cf61Sopenharmony_ciAC_SUBST(APPLE_RASTER_FILTER) 1497b66cf61Sopenharmony_ci 1507b66cf61Sopenharmony_ciAC_DEFINE(PDFTOPDF, [], [Needed for pdftopdf filter compilation]) 1517b66cf61Sopenharmony_ciAC_DEFINE_DIR(BANNERTOPDF_DATADIR, "{CUPS_DATADIR}/data", [Directory where bannertopdf finds its data files (PDF templates)]) 1527b66cf61Sopenharmony_ci 1537b66cf61Sopenharmony_ciAC_ARG_ENABLE([auto-setup-local-only], [AS_HELP_STRING([--enable-auto-setup-local-only], [enable automatic setup of only local IPP printers.])], 1547b66cf61Sopenharmony_ci [enable_auto_setup_local_only="$enableval"], 1557b66cf61Sopenharmony_ci [enable_auto_setup_local_only=no] 1567b66cf61Sopenharmony_ci) 1577b66cf61Sopenharmony_ciif test "x$enable_auto_setup_local_only" != "xno"; then 1587b66cf61Sopenharmony_ci AC_DEFINE([ONLY_LOCAL_IPP_PRINTERS_AUTO_SETUP], [], [Auto-setup only local IPP network printers?]) 1597b66cf61Sopenharmony_cifi 1607b66cf61Sopenharmony_ci 1617b66cf61Sopenharmony_ciAC_ARG_ENABLE([auto-setup-driverless-only], [AS_HELP_STRING([--enable-auto-setup-driverless-only], [enable automatic setup of only IPP network printers with driverless printing support.])], 1627b66cf61Sopenharmony_ci [enable_auto_setup_driverless_only="$enableval"], 1637b66cf61Sopenharmony_ci [enable_auto_setup_driverless_only=no] 1647b66cf61Sopenharmony_ci) 1657b66cf61Sopenharmony_ciif test "x$enable_auto_setup_driverless_only" != "xno"; then 1667b66cf61Sopenharmony_ci AC_DEFINE([ONLY_DRIVERLESS_IPP_PRINTERS_AUTO_SETUP], [], [Auto-setup only driverless IPP network printers?]) 1677b66cf61Sopenharmony_cifi 1687b66cf61Sopenharmony_ci 1697b66cf61Sopenharmony_ciif test "x$enable_auto_setup_local_only" != "xno"; then 1707b66cf61Sopenharmony_ci enable_auto_setup_driverless_only=no 1717b66cf61Sopenharmony_ci enable_auto_setup_all=no 1727b66cf61Sopenharmony_cielse 1737b66cf61Sopenharmony_ci if test "x$enable_auto_setup_driverless_only" != "xno"; then 1747b66cf61Sopenharmony_ci enable_auto_setup_all=no 1757b66cf61Sopenharmony_ci else 1767b66cf61Sopenharmony_ci enable_auto_setup_all=yes 1777b66cf61Sopenharmony_ci fi 1787b66cf61Sopenharmony_cifi 1797b66cf61Sopenharmony_ci 1807b66cf61Sopenharmony_ciAC_SEARCH_LIBS([dlopen], 1817b66cf61Sopenharmony_ci [dl], 1827b66cf61Sopenharmony_ci [AS_IF([test "$ac_cv_search_dlopen" != "none required"], [ 1837b66cf61Sopenharmony_ci DLOPEN_LIBS="$ac_cv_search_dlopen" 1847b66cf61Sopenharmony_ci ])], 1857b66cf61Sopenharmony_ci AC_MSG_ERROR([unable to find the dlopen() function]) 1867b66cf61Sopenharmony_ci) 1877b66cf61Sopenharmony_ciAC_SUBST(DLOPEN_LIBS) 1887b66cf61Sopenharmony_ci 1897b66cf61Sopenharmony_ci# Transient run-time state dir of CUPS 1907b66cf61Sopenharmony_ciCUPS_STATEDIR="" 1917b66cf61Sopenharmony_ciAC_ARG_WITH(cups-rundir, [ --with-cups-rundir set transient run-time state directory of CUPS],CUPS_STATEDIR="$withval",[ 1927b66cf61Sopenharmony_ci case "$uname" in 1937b66cf61Sopenharmony_ci Darwin*) 1947b66cf61Sopenharmony_ci # Darwin (OS X) 1957b66cf61Sopenharmony_ci CUPS_STATEDIR="$CUPS_SERVERROOT" 1967b66cf61Sopenharmony_ci ;; 1977b66cf61Sopenharmony_ci *) 1987b66cf61Sopenharmony_ci # All others 1997b66cf61Sopenharmony_ci CUPS_STATEDIR="$localstatedir/run/cups" 2007b66cf61Sopenharmony_ci ;; 2017b66cf61Sopenharmony_ci esac]) 2027b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR", [Transient run-time state dir of CUPS]) 2037b66cf61Sopenharmony_ciAC_SUBST(CUPS_STATEDIR) 2047b66cf61Sopenharmony_ci 2057b66cf61Sopenharmony_ci# Domain socket of CUPS... 2067b66cf61Sopenharmony_ciCUPS_DEFAULT_DOMAINSOCKET="" 2077b66cf61Sopenharmony_ciAC_ARG_WITH(cups-domainsocket, [ --with-cups-domainsocket set unix domain socket name used by CUPS 2087b66cf61Sopenharmony_ci], 2097b66cf61Sopenharmony_ci default_domainsocket="$withval", 2107b66cf61Sopenharmony_ci default_domainsocket="") 2117b66cf61Sopenharmony_ci 2127b66cf61Sopenharmony_ciif test x$enable_domainsocket != xno -a x$default_domainsocket != xno; then 2137b66cf61Sopenharmony_ci if test "x$default_domainsocket" = x; then 2147b66cf61Sopenharmony_ci case "$uname" in 2157b66cf61Sopenharmony_ci Darwin*) 2167b66cf61Sopenharmony_ci # Darwin and MaxOS X do their own thing... 2177b66cf61Sopenharmony_ci CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd" 2187b66cf61Sopenharmony_ci ;; 2197b66cf61Sopenharmony_ci *) 2207b66cf61Sopenharmony_ci # All others use FHS standard... 2217b66cf61Sopenharmony_ci CUPS_DEFAULT_DOMAINSOCKET="$CUPS_STATEDIR/cups.sock" 2227b66cf61Sopenharmony_ci ;; 2237b66cf61Sopenharmony_ci esac 2247b66cf61Sopenharmony_ci else 2257b66cf61Sopenharmony_ci CUPS_DEFAULT_DOMAINSOCKET="$default_domainsocket" 2267b66cf61Sopenharmony_ci fi 2277b66cf61Sopenharmony_cifi 2287b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED(CUPS_DEFAULT_DOMAINSOCKET, "$CUPS_DEFAULT_DOMAINSOCKET", "Domain socket of CUPS") 2297b66cf61Sopenharmony_ciAC_SUBST(CUPS_DEFAULT_DOMAINSOCKET) 2307b66cf61Sopenharmony_ci 2317b66cf61Sopenharmony_ci# ====================== 2327b66cf61Sopenharmony_ci# Check system functions 2337b66cf61Sopenharmony_ci# ====================== 2347b66cf61Sopenharmony_ciAC_CHECK_FUNCS(strlcat) 2357b66cf61Sopenharmony_ciAC_CHECK_FUNCS(strlcpy) 2367b66cf61Sopenharmony_ciAC_CHECK_FUNCS(sigaction) 2377b66cf61Sopenharmony_ciAC_CHECK_FUNCS(waitpid wait3) 2387b66cf61Sopenharmony_ciAC_CHECK_FUNCS(strtoll) 2397b66cf61Sopenharmony_ciAC_CHECK_FUNCS(open_memstream) 2407b66cf61Sopenharmony_ciAC_CHECK_FUNCS(getline,[],AC_SUBST([GETLINE],['bannertopdf-getline.$(OBJEXT)'])) 2417b66cf61Sopenharmony_ciAC_CHECK_FUNCS(strcasestr,[],AC_SUBST([STRCASESTR],['pdftops-strcasestr.$(OBJEXT)'])) 2427b66cf61Sopenharmony_ciAC_SEARCH_LIBS(pow, m) 2437b66cf61Sopenharmony_ci 2447b66cf61Sopenharmony_ci# ======================== 2457b66cf61Sopenharmony_ci# Check for system headers 2467b66cf61Sopenharmony_ci# ======================== 2477b66cf61Sopenharmony_ciAC_CHECK_HEADERS([stdlib.h]) 2487b66cf61Sopenharmony_ciAC_CHECK_HEADERS([sys/stat.h]) 2497b66cf61Sopenharmony_ciAC_CHECK_HEADERS([sys/types.h]) 2507b66cf61Sopenharmony_ciAC_CHECK_HEADERS([unistd.h]) 2517b66cf61Sopenharmony_ciAC_CHECK_HEADERS([zlib.h]) 2527b66cf61Sopenharmony_ciAC_CHECK_HEADERS([endian.h]) 2537b66cf61Sopenharmony_ciAC_CHECK_HEADERS([dirent.h]) 2547b66cf61Sopenharmony_ciAC_CHECK_HEADERS([sys/ioctl.h]) 2557b66cf61Sopenharmony_ci 2567b66cf61Sopenharmony_ci# ============= 2577b66cf61Sopenharmony_ci# Image options 2587b66cf61Sopenharmony_ci# ============= 2597b66cf61Sopenharmony_ciAC_ARG_ENABLE([imagefilters], 2607b66cf61Sopenharmony_ci [AS_HELP_STRING([--disable-imagefilters], [Build the image filters.])], 2617b66cf61Sopenharmony_ci [enable_imagefilters="$enableval"], 2627b66cf61Sopenharmony_ci [enable_imagefilters=yes] 2637b66cf61Sopenharmony_ci) 2647b66cf61Sopenharmony_ciAM_CONDITIONAL([ENABLE_IMAGEFILTERS], [test "x$enable_imagefilters" != "xno"]) 2657b66cf61Sopenharmony_ci 2667b66cf61Sopenharmony_ci# Libraries 2677b66cf61Sopenharmony_ciAC_ARG_WITH([jpeg], 2687b66cf61Sopenharmony_ci [AS_HELP_STRING([--without-jpeg], [Disable jpeg support.])], 2697b66cf61Sopenharmony_ci [with_jpeg="$withval"], 2707b66cf61Sopenharmony_ci [with_jpeg=yes] 2717b66cf61Sopenharmony_ci) 2727b66cf61Sopenharmony_ciAS_IF([test x"$with_jpeg" != "xno"], [ 2737b66cf61Sopenharmony_ci AC_DEFINE([HAVE_LIBJPEG], [], [Defines if we provide jpeg library.]) 2747b66cf61Sopenharmony_ci AC_CHECK_HEADERS([jpeglib.h]) 2757b66cf61Sopenharmony_ci AC_SEARCH_LIBS([jpeg_destroy_decompress], 2767b66cf61Sopenharmony_ci [jpeg], 2777b66cf61Sopenharmony_ci LIBJPEG_LIBS="-ljpeg", 2787b66cf61Sopenharmony_ci AC_MSG_ERROR([jpeg libraries not found.]) 2797b66cf61Sopenharmony_ci ) 2807b66cf61Sopenharmony_ci AC_SUBST(LIBJPEG_LIBS) 2817b66cf61Sopenharmony_ci]) 2827b66cf61Sopenharmony_ci 2837b66cf61Sopenharmony_ciAC_ARG_WITH([png], 2847b66cf61Sopenharmony_ci [AS_HELP_STRING([--without-png], [Disable png support.])], 2857b66cf61Sopenharmony_ci [with_png="$withval"], 2867b66cf61Sopenharmony_ci [with_png=yes] 2877b66cf61Sopenharmony_ci) 2887b66cf61Sopenharmony_ciAS_IF([test x"$with_png" != "xno"], [ 2897b66cf61Sopenharmony_ci PKG_CHECK_MODULES([LIBPNG], [libpng]) 2907b66cf61Sopenharmony_ci AC_DEFINE([HAVE_LIBPNG], [], [Defines if we provide png library.]) 2917b66cf61Sopenharmony_ci]) 2927b66cf61Sopenharmony_ci 2937b66cf61Sopenharmony_ciAC_ARG_WITH([tiff], 2947b66cf61Sopenharmony_ci [AS_HELP_STRING([--without-tiff], [Disable tiff support.])], 2957b66cf61Sopenharmony_ci [with_tiff="$withval"], 2967b66cf61Sopenharmony_ci [with_tiff=yes] 2977b66cf61Sopenharmony_ci) 2987b66cf61Sopenharmony_ciAS_IF([test x"$with_tiff" != "xno"], [ 2997b66cf61Sopenharmony_ci AC_DEFINE([HAVE_LIBTIFF], [], [Defines if we provide tiff library.]) 3007b66cf61Sopenharmony_ci AC_CHECK_HEADERS([tiff.h]) 3017b66cf61Sopenharmony_ci AC_SEARCH_LIBS([TIFFReadScanline], 3027b66cf61Sopenharmony_ci [tiff], 3037b66cf61Sopenharmony_ci LIBJPEG_LIBS="-ltiff", 3047b66cf61Sopenharmony_ci AC_MSG_ERROR([tiff libraries not found.]) 3057b66cf61Sopenharmony_ci ) 3067b66cf61Sopenharmony_ci AC_SUBST(LIBTIFF_LIBS) 3077b66cf61Sopenharmony_ci]) 3087b66cf61Sopenharmony_ci 3097b66cf61Sopenharmony_ci# ================================== 3107b66cf61Sopenharmony_ci# Check for modules needed by utils/ 3117b66cf61Sopenharmony_ci# ================================== 3127b66cf61Sopenharmony_ci 3137b66cf61Sopenharmony_cidnl including EXIF library 3147b66cf61Sopenharmony_ciEXIF_LIBS="" 3157b66cf61Sopenharmony_ciEXIF_CFLAGS="" 3167b66cf61Sopenharmony_ci 3177b66cf61Sopenharmony_ciAC_ARG_ENABLE([exif], 3187b66cf61Sopenharmony_ci [AS_HELP_STRING([--disable-exif], [Disable exif metadata readout from images])], 3197b66cf61Sopenharmony_ci [enable_exif="$enableval"], 3207b66cf61Sopenharmony_ci [enable_exif=yes] 3217b66cf61Sopenharmony_ci) 3227b66cf61Sopenharmony_ciAM_CONDITIONAL([ENABLE_EXIF], [test "x$enable_exif" != "xno"]) 3237b66cf61Sopenharmony_ci 3247b66cf61Sopenharmony_ciAC_ARG_WITH(exif-libs, 3257b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-exif-libs], [Set directory for exif library.])], 3267b66cf61Sopenharmony_ci EXIF_LIBS="-L$withval $EXIF_LIBS",) 3277b66cf61Sopenharmony_ciAC_ARG_WITH(exif-includes, 3287b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-exif-includes], [Set directory for exif includes.])], 3297b66cf61Sopenharmony_ci EXIF_CFLAGS="-I$withval $EXIF_CFLAGS",) 3307b66cf61Sopenharmony_ci 3317b66cf61Sopenharmony_ciif test "x$enable_exif" != xno; then 3327b66cf61Sopenharmony_ci PKG_CHECK_MODULES(EXIF, libexif, 3337b66cf61Sopenharmony_ci [AC_DEFINE(HAVE_EXIF, [], [Define if you have the libexif library])]) 3347b66cf61Sopenharmony_cifi 3357b66cf61Sopenharmony_ci 3367b66cf61Sopenharmony_ciAC_SUBST(EXIF_LIBS) 3377b66cf61Sopenharmony_ciAC_SUBST(EXIF_CFLAGS) 3387b66cf61Sopenharmony_ci 3397b66cf61Sopenharmony_cidnl Avahi for cups-browsed 3407b66cf61Sopenharmony_ciAVAHI_LIBS="" 3417b66cf61Sopenharmony_ciAVAHI_CFLAGS="" 3427b66cf61Sopenharmony_ciAVAHI_GLIB_CFLAGS="" 3437b66cf61Sopenharmony_ciAVAHI_GLIB_LIBS="" 3447b66cf61Sopenharmony_ci 3457b66cf61Sopenharmony_ciAC_ARG_ENABLE([avahi], 3467b66cf61Sopenharmony_ci [AS_HELP_STRING([--disable-avahi], [Disable DNS Service Discovery support using Avahi.])], 3477b66cf61Sopenharmony_ci [enable_avahi="$enableval"], 3487b66cf61Sopenharmony_ci [enable_avahi=yes] 3497b66cf61Sopenharmony_ci) 3507b66cf61Sopenharmony_ciAM_CONDITIONAL([ENABLE_AVAHI], [test "x$enable_avahi" != "xno"]) 3517b66cf61Sopenharmony_ci 3527b66cf61Sopenharmony_ciAC_ARG_WITH(avahi-libs, 3537b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-avahi-libs], [Set directory for Avahi library.])], 3547b66cf61Sopenharmony_ci AVAHI_LIBS="-L$withval $AVAHI_LIBS",) 3557b66cf61Sopenharmony_ciAC_ARG_WITH(avahi-includes, 3567b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-avahi-includes], [Set directory for Avahi includes])], 3577b66cf61Sopenharmony_ci AVAHI_CFLAGS="-I$withval $AVAHI_CFLAGS",) 3587b66cf61Sopenharmony_ci 3597b66cf61Sopenharmony_ciif test "x$enable_avahi" != xno; then 3607b66cf61Sopenharmony_ci PKG_CHECK_MODULES(AVAHI, avahi-client, 3617b66cf61Sopenharmony_ci [AC_DEFINE(HAVE_AVAHI, [], [Define if you have the avahi library])]) 3627b66cf61Sopenharmony_cifi 3637b66cf61Sopenharmony_ci 3647b66cf61Sopenharmony_ciAC_SUBST(AVAHI_LIBS) 3657b66cf61Sopenharmony_ciAC_SUBST(AVAHI_CFLAGS) 3667b66cf61Sopenharmony_ci 3677b66cf61Sopenharmony_cidnl 3687b66cf61Sopenharmony_cidnl LDAP configuration stuff for CUPS. 3697b66cf61Sopenharmony_cidnl 3707b66cf61Sopenharmony_cidnl Copyright 2007-2011 by Apple Inc. 3717b66cf61Sopenharmony_cidnl Copyright 2003-2006 by Easy Software Products, all rights reserved. 3727b66cf61Sopenharmony_cidnl 3737b66cf61Sopenharmony_cidnl These coded instructions, statements, and computer programs are the 3747b66cf61Sopenharmony_cidnl property of Apple Inc. and are protected by Federal copyright 3757b66cf61Sopenharmony_cidnl law. Distribution and use rights are outlined in the file "COPYING" 3767b66cf61Sopenharmony_cidnl which should have been included with this file. 3777b66cf61Sopenharmony_cidnl 3787b66cf61Sopenharmony_ci 3797b66cf61Sopenharmony_ciAC_ARG_ENABLE([ldap], [AS_HELP_STRING([--disable-ldap], [disable LDAP support.])], 3807b66cf61Sopenharmony_ci [enable_ldap="$enableval"], 3817b66cf61Sopenharmony_ci [enable_ldap=yes] 3827b66cf61Sopenharmony_ci) 3837b66cf61Sopenharmony_ciAC_ARG_WITH([ldap-libs], [AS_HELP_STRING([--with-ldap-libs], [set directory for LDAP library.])], 3847b66cf61Sopenharmony_ci LDFLAGS="-L$withval $LDFLAGS" 3857b66cf61Sopenharmony_ci DSOFLAGS="-L$withval $DSOFLAGS",) 3867b66cf61Sopenharmony_ciAC_ARG_WITH([ldap-includes], [AS_HELP_STRING([--with-ldap-includes], [set directory for LDAP includes.])], 3877b66cf61Sopenharmony_ci CFLAGS="-I$withval $CFLAGS" 3887b66cf61Sopenharmony_ci CPPFLAGS="-I$withval $CPPFLAGS",) 3897b66cf61Sopenharmony_ci 3907b66cf61Sopenharmony_ciif test x$enable_ldap != xno; then 3917b66cf61Sopenharmony_ci 3927b66cf61Sopenharmony_ci AC_CHECK_HEADER([ldap.h], [ 3937b66cf61Sopenharmony_ci AC_SEARCH_LIBS([ldap_initialize], [ldap], [ 3947b66cf61Sopenharmony_ci AC_DEFINE([HAVE_LDAP], [], [Define if LDAP support should be enabled]) 3957b66cf61Sopenharmony_ci AC_DEFINE([HAVE_OPENLDAP], [], [If LDAP support is that of OpenLDAP]) 3967b66cf61Sopenharmony_ci AC_CHECK_LIB([ldap], [ldap_start_tls], 3977b66cf61Sopenharmony_ci AC_DEFINE([HAVE_LDAP_SSL], [], [If LDAP has SSL/TLS support enabled]))],[ 3987b66cf61Sopenharmony_ci 3997b66cf61Sopenharmony_ci AC_CHECK_LIB([ldap], [ldap_init], [ 4007b66cf61Sopenharmony_ci AC_DEFINE([HAVE_LDAP], [], [Define if LDAP support should be enabled]) 4017b66cf61Sopenharmony_ci AC_DEFINE([HAVE_MOZILLA_LDAP], [], [If LDAP support is that of Mozilla]) 4027b66cf61Sopenharmony_ci AC_CHECK_HEADERS([ldap_ssl.h], [], [], [#include <ldap.h>]) 4037b66cf61Sopenharmony_ci AC_CHECK_LIB([ldap], [ldapssl_init], 4047b66cf61Sopenharmony_ci AC_DEFINE([HAVE_LDAP_SSL], [], [If LDAP has SSL/TLS support enabled]))])] 4057b66cf61Sopenharmony_ci ) 4067b66cf61Sopenharmony_ci AC_CHECK_LIB([ldap], [ldap_set_rebind_proc], AC_DEFINE([HAVE_LDAP_REBIND_PROC], [], [If libldap implements ldap_set_rebind_proc])) 4077b66cf61Sopenharmony_ci ]) 4087b66cf61Sopenharmony_ci 4097b66cf61Sopenharmony_cifi 4107b66cf61Sopenharmony_ci 4117b66cf61Sopenharmony_ciPKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.30.2]) 4127b66cf61Sopenharmony_ciAC_SUBST(GLIB_CFLAGS) 4137b66cf61Sopenharmony_ciAC_SUBST(GLIB_LIBS) 4147b66cf61Sopenharmony_ci 4157b66cf61Sopenharmony_ciif test x$enable_avahi != xno; then 4167b66cf61Sopenharmony_ci PKG_CHECK_MODULES(AVAHI_GLIB, [avahi-glib]) 4177b66cf61Sopenharmony_cifi 4187b66cf61Sopenharmony_ci 4197b66cf61Sopenharmony_ciAC_SUBST(AVAHI_GLIB_CFLAGS) 4207b66cf61Sopenharmony_ciAC_SUBST(AVAHI_GLIB_LIBS) 4217b66cf61Sopenharmony_ci 4227b66cf61Sopenharmony_ciPKG_CHECK_MODULES(GIO, [gio-2.0]) 4237b66cf61Sopenharmony_ciAC_SUBST(GIO_CFLAGS) 4247b66cf61Sopenharmony_ciAC_SUBST(GIO_LIBS) 4257b66cf61Sopenharmony_ci 4267b66cf61Sopenharmony_ciPKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0]) 4277b66cf61Sopenharmony_ciAC_SUBST(GIO_UNIX_CFLAGS) 4287b66cf61Sopenharmony_ciAC_SUBST(GIO_UNIX_LIBS) 4297b66cf61Sopenharmony_ci 4307b66cf61Sopenharmony_ciAC_ARG_WITH([browseremoteprotocols], 4317b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-browseremoteprotocols=value], [Set which protocols to listen for in cups-browsed (default: dnssd cups)])], 4327b66cf61Sopenharmony_ci [with_browseremoteprotocols="$withval"], 4337b66cf61Sopenharmony_ci [with_browseremoteprotocols="dnssd cups"] 4347b66cf61Sopenharmony_ci) 4357b66cf61Sopenharmony_ciBROWSEREMOTEPROTOCOLS="$with_browseremoteprotocols" 4367b66cf61Sopenharmony_ciAC_SUBST(BROWSEREMOTEPROTOCOLS) 4377b66cf61Sopenharmony_ci 4387b66cf61Sopenharmony_cidnl Setup init.d locations... 4397b66cf61Sopenharmony_ciAC_ARG_WITH(rcdir, [AS_HELP_STRING([--with-rcdir], [Set path for rc scripts])],rcdir="$withval",rcdir="") 4407b66cf61Sopenharmony_ciAC_ARG_WITH(rclevels, [AS_HELP_STRING([--with-rclevels], [Set run levels for rc scripts])],rclevels="$withval",rclevels="2 3 5") 4417b66cf61Sopenharmony_ciAC_ARG_WITH(rcstart, [AS_HELP_STRING([--with-rcstart], [Set start number for rc scripts])],rcstart="$withval",rcstart="99") 4427b66cf61Sopenharmony_ciAC_ARG_WITH(rcstop, [AS_HELP_STRING([--with-rcstop], [Set stop number for rc scripts])],rcstop="$withval",rcstop="00") 4437b66cf61Sopenharmony_ci 4447b66cf61Sopenharmony_ciINITDIR="" 4457b66cf61Sopenharmony_ciINITDDIR="" 4467b66cf61Sopenharmony_ciRCLEVELS="$rclevels" 4477b66cf61Sopenharmony_ciRCSTART="$rcstart" 4487b66cf61Sopenharmony_ciRCSTOP="$rcstop" 4497b66cf61Sopenharmony_ci 4507b66cf61Sopenharmony_ciif test x$rcdir = x; then 4517b66cf61Sopenharmony_ci case "`uname`" in 4527b66cf61Sopenharmony_ci FreeBSD* | OpenBSD* | MirBSD* | ekkoBSD*) 4537b66cf61Sopenharmony_ci # FreeBSD and OpenBSD 4547b66cf61Sopenharmony_ci ;; 4557b66cf61Sopenharmony_ci 4567b66cf61Sopenharmony_ci Linux | GNU | GNU/k*BSD*) 4577b66cf61Sopenharmony_ci # Linux/HURD seems to choose an init.d directory at random... 4587b66cf61Sopenharmony_ci if test -d /sbin/init.d; then 4597b66cf61Sopenharmony_ci # SuSE 4607b66cf61Sopenharmony_ci INITDIR="/sbin/init.d" 4617b66cf61Sopenharmony_ci else 4627b66cf61Sopenharmony_ci if test -d /etc/init.d; then 4637b66cf61Sopenharmony_ci # Others 4647b66cf61Sopenharmony_ci INITDIR="/etc" 4657b66cf61Sopenharmony_ci else 4667b66cf61Sopenharmony_ci # RedHat 4677b66cf61Sopenharmony_ci INITDIR="/etc/rc.d" 4687b66cf61Sopenharmony_ci fi 4697b66cf61Sopenharmony_ci fi 4707b66cf61Sopenharmony_ci RCSTART="82" 4717b66cf61Sopenharmony_ci RCSTOP="35" 4727b66cf61Sopenharmony_ci ;; 4737b66cf61Sopenharmony_ci 4747b66cf61Sopenharmony_ci NetBSD*) 4757b66cf61Sopenharmony_ci # NetBSD 4767b66cf61Sopenharmony_ci INITDDIR="/etc/rc.d" 4777b66cf61Sopenharmony_ci ;; 4787b66cf61Sopenharmony_ci 4797b66cf61Sopenharmony_ci *) 4807b66cf61Sopenharmony_ci INITDIR="/etc" 4817b66cf61Sopenharmony_ci ;; 4827b66cf61Sopenharmony_ci 4837b66cf61Sopenharmony_ci esac 4847b66cf61Sopenharmony_cielif test "x$rcdir" != xno; then 4857b66cf61Sopenharmony_ci if test "x$rclevels" = x; then 4867b66cf61Sopenharmony_ci INITDDIR="$rcdir" 4877b66cf61Sopenharmony_ci else 4887b66cf61Sopenharmony_ci INITDIR="$rcdir" 4897b66cf61Sopenharmony_ci fi 4907b66cf61Sopenharmony_cifi 4917b66cf61Sopenharmony_ci 4927b66cf61Sopenharmony_ciAM_CONDITIONAL([RCLINKS], [test "x$INITDIR" != "x"]) 4937b66cf61Sopenharmony_ci 4947b66cf61Sopenharmony_ciif test "x${INITDIR}" != "x" -a "x${INITDDIR}" = "x"; then 4957b66cf61Sopenharmony_ci INITDDIR="${INITDIR}/init.d" 4967b66cf61Sopenharmony_cifi 4977b66cf61Sopenharmony_ci 4987b66cf61Sopenharmony_ciAC_SUBST(INITDIR) 4997b66cf61Sopenharmony_ciAC_SUBST(INITDDIR) 5007b66cf61Sopenharmony_ciAC_SUBST(RCLEVELS) 5017b66cf61Sopenharmony_ciAC_SUBST(RCSTART) 5027b66cf61Sopenharmony_ciAC_SUBST(RCSTOP) 5037b66cf61Sopenharmony_ci 5047b66cf61Sopenharmony_ci# ====================================== 5057b66cf61Sopenharmony_ci# Check for various pdf required modules 5067b66cf61Sopenharmony_ci# ====================================== 5077b66cf61Sopenharmony_ciPKG_CHECK_MODULES([LCMS], [lcms2], [lcms2=yes], [lcms2=no]) 5087b66cf61Sopenharmony_ciAS_IF([test x"$lcms2" = "xno"], [ 5097b66cf61Sopenharmony_ci PKG_CHECK_MODULES([LCMS], [lcms]) 5107b66cf61Sopenharmony_ci AC_DEFINE([USE_LCMS1], [1], [Defines if use lcms1]) 5117b66cf61Sopenharmony_ci]) 5127b66cf61Sopenharmony_ciPKG_CHECK_MODULES([FREETYPE], [freetype2], [AC_DEFINE([HAVE_FREETYPE_H], [1], [Have FreeType2 include files])]) 5137b66cf61Sopenharmony_ciPKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.0.0]) 5147b66cf61Sopenharmony_ciPKG_CHECK_MODULES([ZLIB], [zlib]) 5157b66cf61Sopenharmony_ciAC_DEFINE([HAVE_LIBZ], [], [Define that we use zlib]) 5167b66cf61Sopenharmony_ciPKG_CHECK_MODULES([LIBQPDF], [libqpdf >= 8.3.0]) 5177b66cf61Sopenharmony_ci 5187b66cf61Sopenharmony_ci# =============================== 5197b66cf61Sopenharmony_ci# Check for PCLm printing support 5207b66cf61Sopenharmony_ci# =============================== 5217b66cf61Sopenharmony_ciAC_ARG_ENABLE([pclm], [AS_HELP_STRING([--enable-pclm], [enable PCLm printing.])], 5227b66cf61Sopenharmony_ci [enable_pclm="$enableval"], 5237b66cf61Sopenharmony_ci [enable_pclm=yes] 5247b66cf61Sopenharmony_ci) 5257b66cf61Sopenharmony_ciif test "x$enable_pclm" != "xno"; then 5267b66cf61Sopenharmony_ci AC_DEFINE([QPDF_HAVE_PCLM], [1], [QPDF has PCLm support?]) 5277b66cf61Sopenharmony_ci QPDF_NO_PCLM= 5287b66cf61Sopenharmony_cielse 5297b66cf61Sopenharmony_ci QPDF_NO_PCLM=\# 5307b66cf61Sopenharmony_cifi 5317b66cf61Sopenharmony_ciAC_SUBST(QPDF_NO_PCLM) 5327b66cf61Sopenharmony_ci 5337b66cf61Sopenharmony_ci 5347b66cf61Sopenharmony_ci 5357b66cf61Sopenharmony_ci# ================= 5367b66cf61Sopenharmony_ci# Check for Poppler 5377b66cf61Sopenharmony_ci# ================= 5387b66cf61Sopenharmony_ciAC_ARG_ENABLE(poppler, AS_HELP_STRING([--enable-poppler],[enable Poppler-based filters]), 5397b66cf61Sopenharmony_ci enable_poppler=$enableval,enable_poppler=yes) 5407b66cf61Sopenharmony_ciAM_CONDITIONAL(ENABLE_POPPLER, test x$enable_poppler = xyes) 5417b66cf61Sopenharmony_ciif test x$enable_poppler = xyes; then 5427b66cf61Sopenharmony_ci PKG_CHECK_MODULES([POPPLER], [poppler-cpp >= 0.19]) 5437b66cf61Sopenharmony_ci AC_CHECK_HEADER([poppler/cpp/poppler-version.h], [AC_DEFINE([HAVE_CPP_POPPLER_VERSION_H],,[Define if you have Poppler's "cpp/poppler-version.h" header file.])], []) 5447b66cf61Sopenharmony_cifi 5457b66cf61Sopenharmony_ci 5467b66cf61Sopenharmony_ci# =============== 5477b66cf61Sopenharmony_ci# Check for D-Bus 5487b66cf61Sopenharmony_ci# =============== 5497b66cf61Sopenharmony_ciAC_ARG_ENABLE(dbus, AS_HELP_STRING([--enable-dbus],[enable DBus CMS code]), 5507b66cf61Sopenharmony_ci enable_dbus=$enableval,enable_dbus=yes) 5517b66cf61Sopenharmony_ciAM_CONDITIONAL(BUILD_DBUS, test x$enable_dbus = xyes) 5527b66cf61Sopenharmony_ciif test x$enable_dbus = xyes; then 5537b66cf61Sopenharmony_ci PKG_CHECK_MODULES(DBUS, dbus-1) 5547b66cf61Sopenharmony_cifi 5557b66cf61Sopenharmony_ci 5567b66cf61Sopenharmony_ci# =================================== 5577b66cf61Sopenharmony_ci# Check for large files and long long 5587b66cf61Sopenharmony_ci# =================================== 5597b66cf61Sopenharmony_ciAC_SYS_LARGEFILE 5607b66cf61Sopenharmony_ciLARGEFILE="" 5617b66cf61Sopenharmony_ciAS_IF([test x"$enable_largefile" != "xno"], [ 5627b66cf61Sopenharmony_ci LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" 5637b66cf61Sopenharmony_ci AS_IF([test x"$ac_cv_sys_large_files" = "x1"], [LARGEFILE="$LARGEFILE -D_LARGE_FILES"]) 5647b66cf61Sopenharmony_ci AS_IF([test x"$ac_cv_sys_file_offset_bits" = "x64"], [LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64"]) 5657b66cf61Sopenharmony_ci]) 5667b66cf61Sopenharmony_ciAC_SUBST(LARGEFILE) 5677b66cf61Sopenharmony_ci 5687b66cf61Sopenharmony_ciAC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no]) 5697b66cf61Sopenharmony_ciAS_IF([test x"$long_long_found" = "xyes"], [ 5707b66cf61Sopenharmony_ci AC_DEFINE([HAVE_LONG_LONG], [], [Platform supports long long type]) 5717b66cf61Sopenharmony_ci]) 5727b66cf61Sopenharmony_ci 5737b66cf61Sopenharmony_ci# ================ 5747b66cf61Sopenharmony_ci# Check for Mutool 5757b66cf61Sopenharmony_ci# ================ 5767b66cf61Sopenharmony_ciAC_ARG_ENABLE([mutool], 5777b66cf61Sopenharmony_ci [AS_HELP_STRING([--disable-mutool], [Disable filters using mutool.])], 5787b66cf61Sopenharmony_ci [enable_mutool="$enableval"], 5797b66cf61Sopenharmony_ci [enable_mutool=yes] 5807b66cf61Sopenharmony_ci) 5817b66cf61Sopenharmony_ci 5827b66cf61Sopenharmony_ciAC_ARG_WITH([mutool-path], 5837b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-mutool-path=value], [Set path to mutool binary (default: system).])], 5847b66cf61Sopenharmony_ci [with_mutool_path="$withval"], 5857b66cf61Sopenharmony_ci [with_mutool_path=system] 5867b66cf61Sopenharmony_ci) 5877b66cf61Sopenharmony_ci 5887b66cf61Sopenharmony_ci# ================ 5897b66cf61Sopenharmony_ci# Check for pdf2ps 5907b66cf61Sopenharmony_ci# ================ 5917b66cf61Sopenharmony_ciAC_ARG_ENABLE([ghostscript], 5927b66cf61Sopenharmony_ci [AS_HELP_STRING([--disable-ghostscript], [Disable filters using Ghostscript.])], 5937b66cf61Sopenharmony_ci [enable_ghostscript="$enableval"], 5947b66cf61Sopenharmony_ci [enable_ghostscript=yes] 5957b66cf61Sopenharmony_ci) 5967b66cf61Sopenharmony_ciAC_ARG_WITH([pdftops], 5977b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-pdftops=value], [Set which pdftops to use (gs,pdftops,pdftocairo,acroread,mupdf,hybrid).])], 5987b66cf61Sopenharmony_ci [with_pdftops="$withval"], 5997b66cf61Sopenharmony_ci [with_pdftops=hybrid] 6007b66cf61Sopenharmony_ci) 6017b66cf61Sopenharmony_ciAS_CASE([x$with_pdftops], 6027b66cf61Sopenharmony_ci [xgs|xpdftops|xpdftocairo|xacroread|xmupdf|xhybrid], [], 6037b66cf61Sopenharmony_ci [AC_MSG_ERROR([Unknown value of with-pdftops provided: $with_pdftops])] 6047b66cf61Sopenharmony_ci) 6057b66cf61Sopenharmony_ciAC_ARG_WITH([gs-path], 6067b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-gs-path=value], [Set path to ghostcript binary (default: system).])], 6077b66cf61Sopenharmony_ci [with_gs_path="$withval"], 6087b66cf61Sopenharmony_ci [with_gs_path=system] 6097b66cf61Sopenharmony_ci) 6107b66cf61Sopenharmony_ciAC_ARG_WITH([pdftops-path], 6117b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-pdftops-path=value], [Set path to pdftops/ghostscript binary (default: system).])], 6127b66cf61Sopenharmony_ci [with_pdftops_path="$withval"], 6137b66cf61Sopenharmony_ci [with_pdftops_path=system] 6147b66cf61Sopenharmony_ci) 6157b66cf61Sopenharmony_ciAC_ARG_WITH([pdftocairo-path], 6167b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-pdftocairo-path=value], [Set path to pdftocairo binary (default: system).])], 6177b66cf61Sopenharmony_ci [with_pdftocairo_path="$withval"], 6187b66cf61Sopenharmony_ci [with_pdftocairo_path=system] 6197b66cf61Sopenharmony_ci) 6207b66cf61Sopenharmony_ciAC_ARG_WITH([acroread-path], 6217b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-acroread-path=value], [Set path to acroread binary (default: system).])], 6227b66cf61Sopenharmony_ci [with_acroread_path="$withval"], 6237b66cf61Sopenharmony_ci [with_acroread_path=system] 6247b66cf61Sopenharmony_ci) 6257b66cf61Sopenharmony_ciAC_ARG_WITH([ippfind-path], 6267b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-ippfind-path=value], [Set path to ippfind binary (default: system).])], 6277b66cf61Sopenharmony_ci [with_ippfind_path="$withval"], 6287b66cf61Sopenharmony_ci [with_ippfind_path=system] 6297b66cf61Sopenharmony_ci) 6307b66cf61Sopenharmony_ciAC_ARG_WITH([pdftops-maxres], 6317b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-pdftops-maxres=value], [Set maximum image rendering resolution for pdftops filter (0, 75, 150, 300, 600, 1200, 2400, 4800, 90, 180, 360, 720, 1440, 2880, 5760, unlimited). Default: 1440])], 6327b66cf61Sopenharmony_ci [with_pdftops_maxres="$withval"], 6337b66cf61Sopenharmony_ci [with_pdftops_maxres=1440] 6347b66cf61Sopenharmony_ci) 6357b66cf61Sopenharmony_ciAS_CASE([x$with_pdftops_maxres], 6367b66cf61Sopenharmony_ci [x0|x75|x150|x300|x600|x1200|x2400|x4800|x90|x180|x360|x720|x1440|x2880|x5760], [CUPS_PDFTOPS_MAXRES=$with_pdftops_maxres], 6377b66cf61Sopenharmony_ci [xunlimited], [CUPS_PDFTOPS_MAXRES=0], 6387b66cf61Sopenharmony_ci [AC_MSG_ERROR([Unknown value of with-pdftops-maxres provided: $with_pdftops])] 6397b66cf61Sopenharmony_ci) 6407b66cf61Sopenharmony_ciAC_ARG_ENABLE([gs-ps2write], 6417b66cf61Sopenharmony_ci [AS_HELP_STRING([--disable-gs-ps2write], [Ghostscript doesn't support ps2write device.])], 6427b66cf61Sopenharmony_ci [enable_gs_ps2write="$enableval"], 6437b66cf61Sopenharmony_ci [enable_gs_ps2write=yes] 6447b66cf61Sopenharmony_ci) 6457b66cf61Sopenharmony_ci 6467b66cf61Sopenharmony_ciCUPS_GHOSTSCRIPT="" 6477b66cf61Sopenharmony_ciAS_IF([test "x$enable_ghostscript" != "xyes"], [ 6487b66cf61Sopenharmony_ci with_gs_path="" 6497b66cf61Sopenharmony_ci], [ 6507b66cf61Sopenharmony_ci AS_IF([test "x$with_gs_path" != "xsystem"], [ 6517b66cf61Sopenharmony_ci CUPS_GHOSTSCRIPT="$with_gs_path" 6527b66cf61Sopenharmony_ci ], [ 6537b66cf61Sopenharmony_ci AS_IF([test "x$cross_compiling" = "xyes"], [ 6547b66cf61Sopenharmony_ci CUPS_GHOSTSCRIPT="gs" 6557b66cf61Sopenharmony_ci ], [ 6567b66cf61Sopenharmony_ci AC_CHECK_PROG(CUPS_GHOSTSCRIPT, gs, gs) 6577b66cf61Sopenharmony_ci ]) 6587b66cf61Sopenharmony_ci ]) 6597b66cf61Sopenharmony_ci AS_IF([test "x$CUPS_GHOSTSCRIPT" = "x"], [ 6607b66cf61Sopenharmony_ci AC_MSG_ERROR([Required gs binary is missing. Please install ghostscript-gpl package.]) 6617b66cf61Sopenharmony_ci ]) 6627b66cf61Sopenharmony_ci AC_DEFINE([HAVE_GHOSTSCRIPT], [], [Define that we provide ghostscript binary]) 6637b66cf61Sopenharmony_ci AS_IF([test x"$with_pdftops" = xgs], [AC_DEFINE_UNQUOTED([CUPS_PDFTOPS_RENDERER], [GS], [Define default renderer])]) 6647b66cf61Sopenharmony_ci 6657b66cf61Sopenharmony_ci AS_IF([test x"$enable_gs_ps2write" = "xyes"], [ 6667b66cf61Sopenharmony_ci AC_DEFINE([HAVE_GHOSTSCRIPT_PS2WRITE], [], [gs supports ps2write]) 6677b66cf61Sopenharmony_ci ]) 6687b66cf61Sopenharmony_ci AS_IF([test "x$cross_compiling" != "xyes"], [ 6697b66cf61Sopenharmony_ci AC_MSG_CHECKING(whether gs supports the ps2write device) 6707b66cf61Sopenharmony_ci AS_IF([`$CUPS_GHOSTSCRIPT -h 2>&1 | grep -q ps2write`], [ 6717b66cf61Sopenharmony_ci AC_MSG_RESULT([yes]) 6727b66cf61Sopenharmony_ci AC_DEFINE([HAVE_GHOSTSCRIPT_PS2WRITE], [], [gs supports ps2write]) 6737b66cf61Sopenharmony_ci ], [ 6747b66cf61Sopenharmony_ci AC_MSG_RESULT([no]) 6757b66cf61Sopenharmony_ci ]) 6767b66cf61Sopenharmony_ci ]) 6777b66cf61Sopenharmony_ci]) 6787b66cf61Sopenharmony_ciAM_CONDITIONAL(ENABLE_GHOSTSCRIPT, test "x$enable_ghostscript" = xyes) 6797b66cf61Sopenharmony_ciAC_SUBST(CUPS_GHOSTSCRIPT) 6807b66cf61Sopenharmony_ci 6817b66cf61Sopenharmony_ciCUPS_MUTOOL="" 6827b66cf61Sopenharmony_ciAS_IF([test "x$enable_mutool" != "xyes"], [ 6837b66cf61Sopenharmony_ci with_mutool_path="" 6847b66cf61Sopenharmony_ci], [ 6857b66cf61Sopenharmony_ci AS_IF([test "x$with_mutool_path" != "xsystem"], [ 6867b66cf61Sopenharmony_ci CUPS_MUTOOL="$with_mutool_path" 6877b66cf61Sopenharmony_ci ], [ 6887b66cf61Sopenharmony_ci AS_IF([test "x$cross_compiling" = "xyes"], [ 6897b66cf61Sopenharmony_ci CUPS_MUTOOL="mutool" 6907b66cf61Sopenharmony_ci ], [ 6917b66cf61Sopenharmony_ci AC_CHECK_PROG(CUPS_MUTOOL, mutool, mutool) 6927b66cf61Sopenharmony_ci ]) 6937b66cf61Sopenharmony_ci ]) 6947b66cf61Sopenharmony_ci AS_IF([test "x$CUPS_MUTOOL" = "x"], [ 6957b66cf61Sopenharmony_ci AC_MSG_ERROR([Required mutool binary is missing. Please install mutool.]) 6967b66cf61Sopenharmony_ci ]) 6977b66cf61Sopenharmony_ci AS_IF([test x"$with_pdftops" = xmupdf], [AC_DEFINE_UNQUOTED([CUPS_PDFTOPS_RENDERER], [MUPDF], [Define default renderer])]) 6987b66cf61Sopenharmony_ci]) 6997b66cf61Sopenharmony_ciAM_CONDITIONAL(ENABLE_MUTOOL, test "x$enable_mutool" = xyes) 7007b66cf61Sopenharmony_ciAC_SUBST(CUPS_MUTOOL) 7017b66cf61Sopenharmony_ci 7027b66cf61Sopenharmony_ciAS_IF([test "x$with_pdftops_path" != "xsystem"], [ 7037b66cf61Sopenharmony_ci CUPS_PDFTOPS="$with_pdftops_path" 7047b66cf61Sopenharmony_ci], [ 7057b66cf61Sopenharmony_ci AS_IF([test "x$cross_compiling" = "xyes"], [ 7067b66cf61Sopenharmony_ci CUPS_PDFTOPS="/usr/bin/pdftops" 7077b66cf61Sopenharmony_ci ], [ 7087b66cf61Sopenharmony_ci AC_CHECK_PROG(CUPS_PDFTOPS, pdftops, /usr/bin/pdftops) 7097b66cf61Sopenharmony_ci ]) 7107b66cf61Sopenharmony_ci AS_IF([test "x$CUPS_PDFTOPS" = "x"], [ 7117b66cf61Sopenharmony_ci AC_MSG_ERROR([Required pdftops is missing. Please install the pdftops utility of Poppler.]) 7127b66cf61Sopenharmony_ci ]) 7137b66cf61Sopenharmony_ci]) 7147b66cf61Sopenharmony_ciAS_IF([test "x$CUPS_PDFTOPS" != "x"], [ 7157b66cf61Sopenharmony_ci AC_DEFINE([HAVE_POPPLER_PDFTOPS], [], [Define that we provide poppler pdftops.]) 7167b66cf61Sopenharmony_ci AS_IF([test x"$with_pdftops" = xpdftops], [AC_DEFINE_UNQUOTED([CUPS_PDFTOPS_RENDERER], [PDFTOPS], [Define default renderer])]) 7177b66cf61Sopenharmony_ci 7187b66cf61Sopenharmony_ci AS_IF([test "x$cross_compiling" != "xyes"], [ 7197b66cf61Sopenharmony_ci AC_MSG_CHECKING([whether pdftops supports -origpagesizes]) 7207b66cf61Sopenharmony_ci AS_IF([`$CUPS_PDFTOPS -h 2>&1 | grep -q -- -origpagesizes`], [ 7217b66cf61Sopenharmony_ci AC_MSG_RESULT([yes]) 7227b66cf61Sopenharmony_ci AC_DEFINE([HAVE_POPPLER_PDFTOPS_WITH_ORIGPAGESIZES], [] , [pdftops supports -origpagesizes.]) 7237b66cf61Sopenharmony_ci ], [ 7247b66cf61Sopenharmony_ci AC_MSG_RESULT([no]) 7257b66cf61Sopenharmony_ci ]) 7267b66cf61Sopenharmony_ci AC_MSG_CHECKING([whether pdftops supports -r]) 7277b66cf61Sopenharmony_ci AS_IF([`$CUPS_PDFTOPS -h 2>&1 | grep -q -- '-r '`], [ 7287b66cf61Sopenharmony_ci AC_MSG_RESULT([yes]) 7297b66cf61Sopenharmony_ci AC_DEFINE([HAVE_POPPLER_PDFTOPS_WITH_RESOLUTION], [] , [pdftops supports -r argument.]) 7307b66cf61Sopenharmony_ci ], [ 7317b66cf61Sopenharmony_ci AC_MSG_RESULT([no]) 7327b66cf61Sopenharmony_ci ]) 7337b66cf61Sopenharmony_ci ]) 7347b66cf61Sopenharmony_ci]) 7357b66cf61Sopenharmony_ciAS_IF([test "x$with_pdftocairo_path" != "xsystem"], [ 7367b66cf61Sopenharmony_ci CUPS_PDFTOCAIRO="$with_pdftocairo_path" 7377b66cf61Sopenharmony_ci], [ 7387b66cf61Sopenharmony_ci CUPS_PDFTOCAIRO="pdftocairo" 7397b66cf61Sopenharmony_ci]) 7407b66cf61Sopenharmony_ciAS_IF([test "x$CUPS_PDFTOCAIRO" != "x"], [ 7417b66cf61Sopenharmony_ci AS_IF([test x"$with_pdftops" = xpdftocairo], [AC_DEFINE_UNQUOTED([CUPS_PDFTOPS_RENDERER], [PDFTOCAIRO], [Define default renderer])]) 7427b66cf61Sopenharmony_ci], [ 7437b66cf61Sopenharmony_ci AC_MSG_ERROR([Required pdftocairo is missing. Please install Poppler developer packages.]) 7447b66cf61Sopenharmony_ci]) 7457b66cf61Sopenharmony_ciAS_IF([test "x$with_acroread_path" != "xsystem"], [ 7467b66cf61Sopenharmony_ci CUPS_ACROREAD="$with_acroread_path" 7477b66cf61Sopenharmony_ci], [ 7487b66cf61Sopenharmony_ci CUPS_ACROREAD="acroread" 7497b66cf61Sopenharmony_ci]) 7507b66cf61Sopenharmony_ciAS_IF([test "x$CUPS_ACROREAD" != "x"], [ 7517b66cf61Sopenharmony_ci AS_IF([test x"$with_pdftops" = xacroread], [AC_DEFINE_UNQUOTED([CUPS_PDFTOPS_RENDERER], [ACROREAD], [Define default renderer])]) 7527b66cf61Sopenharmony_ci]) 7537b66cf61Sopenharmony_ciAS_IF([test "x$with_ippfind_path" != "xsystem"], [ 7547b66cf61Sopenharmony_ci CUPS_IPPFIND="$with_ippfind_path" 7557b66cf61Sopenharmony_ci], [ 7567b66cf61Sopenharmony_ci CUPS_IPPFIND="ippfind" 7577b66cf61Sopenharmony_ci]) 7587b66cf61Sopenharmony_ci 7597b66cf61Sopenharmony_ciAS_IF([test "x$CUPS_GHOSTSCRIPT" != "x" -a "x$CUPS_PDFTOPS" != "x"], [ 7607b66cf61Sopenharmony_ci AS_IF([test x"$with_pdftops" = xhybrid], [AC_DEFINE_UNQUOTED([CUPS_PDFTOPS_RENDERER], [HYBRID], [Define default renderer])]) 7617b66cf61Sopenharmony_ci]) 7627b66cf61Sopenharmony_ci 7637b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED([CUPS_GHOSTSCRIPT], "$CUPS_GHOSTSCRIPT", [gs binary to use]) 7647b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED([CUPS_MUTOOL],"$CUPS_MUTOOL",[mutool binary to use]) 7657b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED([CUPS_POPPLER_PDFTOPS], "$CUPS_PDFTOPS", [pdftops binary to use.]) 7667b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED([CUPS_POPPLER_PDFTOCAIRO], "$CUPS_PDFTOCAIRO", [pdftocairo binary to use.]) 7677b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED([CUPS_ACROREAD], "$CUPS_ACROREAD", [acroread binary to use.]) 7687b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED([CUPS_IPPFIND], "$CUPS_IPPFIND", [ippfind binary to use.]) 7697b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED([CUPS_PDFTOPS_MAX_RESOLUTION], [$CUPS_PDFTOPS_MAXRES], [max resolution used for pdftops when converting images]) 7707b66cf61Sopenharmony_ci 7717b66cf61Sopenharmony_ci# ================== 7727b66cf61Sopenharmony_ci# Check for foomatic 7737b66cf61Sopenharmony_ci# ================== 7747b66cf61Sopenharmony_ciAC_ARG_ENABLE([foomatic], 7757b66cf61Sopenharmony_ci [AS_HELP_STRING([--disable-foomatic], [Disable Foomatic-based filters.])], 7767b66cf61Sopenharmony_ci [enable_foomatic="$enableval"], 7777b66cf61Sopenharmony_ci [enable_foomatic=yes] 7787b66cf61Sopenharmony_ci) 7797b66cf61Sopenharmony_ciAM_CONDITIONAL([ENABLE_FOOMATIC], [test "x$enable_foomatic" = "xyes"]) 7807b66cf61Sopenharmony_ci 7817b66cf61Sopenharmony_ci# ============= 7827b66cf61Sopenharmony_ci# Check for php 7837b66cf61Sopenharmony_ci# ============= 7847b66cf61Sopenharmony_ci# NOTE: This stuff is broken, requires internal cups headers. 7857b66cf61Sopenharmony_ciAC_ARG_WITH([php], 7867b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-php], [Determine whether to build php cups extension.])], 7877b66cf61Sopenharmony_ci [with_php="$withval"], 7887b66cf61Sopenharmony_ci [with_php=no] 7897b66cf61Sopenharmony_ci) 7907b66cf61Sopenharmony_ciAC_ARG_WITH([php-config], 7917b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-php-config=path], [Specify path to php-config executable.])], 7927b66cf61Sopenharmony_ci [with_php_config="$withval"], 7937b66cf61Sopenharmony_ci [with_php_config=system] 7947b66cf61Sopenharmony_ci) 7957b66cf61Sopenharmony_ciAM_CONDITIONAL([WITH_PHP], [test "x$with_php" = "xyes"]) 7967b66cf61Sopenharmony_ciAS_IF([test x"$with_php" = "xyes"], [ 7977b66cf61Sopenharmony_ci AS_IF([test "x$with_php_config" != "xsystem"], [ 7987b66cf61Sopenharmony_ci PHPCONFIG=$with_php_config 7997b66cf61Sopenharmony_ci ], [ 8007b66cf61Sopenharmony_ci AC_PATH_TOOL(PHPCONFIG, [php-config]) 8017b66cf61Sopenharmony_ci AS_IF([test -z "$PHPCONFIG"], [ 8027b66cf61Sopenharmony_ci AC_MSG_ERROR([Required php-config is missing. Please install PHP developer packages.]) 8037b66cf61Sopenharmony_ci ]) 8047b66cf61Sopenharmony_ci ]) 8057b66cf61Sopenharmony_ci PHPDIR="`$PHPCONFIG --extension-dir`" 8067b66cf61Sopenharmony_ci AC_SUBST(PHPDIR) 8077b66cf61Sopenharmony_ci]) 8087b66cf61Sopenharmony_ci 8097b66cf61Sopenharmony_ci# ========= 8107b66cf61Sopenharmony_ci# Test ARGS 8117b66cf61Sopenharmony_ci# ========= 8127b66cf61Sopenharmony_ciAC_ARG_WITH([test-font-path], 8137b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-test-font-path=value], [Set path to font used for tests (default: /usr/share/fonts/dejavu/DejaVuSans.ttf).])], 8147b66cf61Sopenharmony_ci [with_test_font_path="$withval"], 8157b66cf61Sopenharmony_ci [with_test_font_path=`( find /usr/share/fonts -name DejaVuSans.ttf; echo /usr/share/fonts/dejavu/DejaVuSans.ttf ) | head -1`] 8167b66cf61Sopenharmony_ci) 8177b66cf61Sopenharmony_ci 8187b66cf61Sopenharmony_ciAS_IF([test "x$cross_compiling" != "xyes" && ! test -f "$with_test_font_path"], 8197b66cf61Sopenharmony_ci [AC_MSG_WARN(DejaVuSans.ttf font file is missing. Please install a package providing it.) && [with_test_font_path=no]] 8207b66cf61Sopenharmony_ci) 8217b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED([TESTFONT], ["$with_test_font_path"], [Path to font used in tests]) 8227b66cf61Sopenharmony_ci 8237b66cf61Sopenharmony_ci# ================ 8247b66cf61Sopenharmony_ci# Check for cflags 8257b66cf61Sopenharmony_ci# ================ 8267b66cf61Sopenharmony_ciAC_ARG_ENABLE([werror], 8277b66cf61Sopenharmony_ci [AS_HELP_STRING([--enable-werror], [Treat all warnings as errors, useful for development.])], 8287b66cf61Sopenharmony_ci [enable_werror="$enableval"], 8297b66cf61Sopenharmony_ci [enable_werror=no] 8307b66cf61Sopenharmony_ci) 8317b66cf61Sopenharmony_ciAS_IF([test x"$enable_werror" = "xyes"], [ 8327b66cf61Sopenharmony_ci CFLAGS="$CFLAGS -Werror" 8337b66cf61Sopenharmony_ci]) 8347b66cf61Sopenharmony_ciAS_IF([test x"$GCC" = "xyes"], [ 8357b66cf61Sopenharmony_ci # Be tough with warnings and produce less careless code 8367b66cf61Sopenharmony_ci CFLAGS="$CFLAGS -Wall -std=gnu11" 8377b66cf61Sopenharmony_ci CXXFLAGS="$CXXFLAGS -Wall " # -Weffc++" # TODO: enable when it does not print 1MB of warnings 8387b66cf61Sopenharmony_ci]) 8397b66cf61Sopenharmony_ciCFLAGS="$CFLAGS -D_GNU_SOURCE" 8407b66cf61Sopenharmony_ciCXXFLAGS="$CXXFLAGS -D_GNU_SOURCE" 8417b66cf61Sopenharmony_ci 8427b66cf61Sopenharmony_ci# ========================== 8437b66cf61Sopenharmony_ci# Braille embossing/liblouis 8447b66cf61Sopenharmony_ci# ========================== 8457b66cf61Sopenharmony_ciAC_ARG_ENABLE(braille, AS_HELP_STRING([--enable-braille],[enable Braille embosing filters, requires liblouis]), 8467b66cf61Sopenharmony_ci enable_braille=$enableval,enable_braille=yes) 8477b66cf61Sopenharmony_ciAC_MSG_CHECKING(for liblouis) 8487b66cf61Sopenharmony_ciPKG_CHECK_EXISTS([liblouis], [ 8497b66cf61Sopenharmony_ci AC_MSG_RESULT(yes) 8507b66cf61Sopenharmony_ci if test "x$enable_braille" = xyes; then 8517b66cf61Sopenharmony_ci TABLESDIR=`$PKG_CONFIG --variable=tablesdir liblouis` 8527b66cf61Sopenharmony_ci else 8537b66cf61Sopenharmony_ci TABLESDIR=/usr/share/liblouis/tables 8547b66cf61Sopenharmony_ci fi 8557b66cf61Sopenharmony_ci], [ 8567b66cf61Sopenharmony_ci AC_MSG_RESULT(no) 8577b66cf61Sopenharmony_ci TABLESDIR=/usr/share/liblouis/tables 8587b66cf61Sopenharmony_ci]) 8597b66cf61Sopenharmony_ciAM_CONDITIONAL(ENABLE_BRAILLE, test "x$enable_braille" = xyes) 8607b66cf61Sopenharmony_ciAC_SUBST(TABLESDIR) 8617b66cf61Sopenharmony_ci 8627b66cf61Sopenharmony_ci# =============================================== 8637b66cf61Sopenharmony_ci# Should we keep generated queues after shutdown? 8647b66cf61Sopenharmony_ci# =============================================== 8657b66cf61Sopenharmony_ciAC_ARG_ENABLE(saving-created-queues, AS_HELP_STRING([--enable-saving-created-queues], [enable saving created queues during shutdown]), 8667b66cf61Sopenharmony_ci [SAVING_CREATED_QUEUES=$enableval],[SAVING_CREATED_QUEUES="no"]) 8677b66cf61Sopenharmony_ci 8687b66cf61Sopenharmony_ciAS_IF([test "x$SAVING_CREATED_QUEUES" != "xno"], 8697b66cf61Sopenharmony_ci [AC_DEFINE([SAVING_CREATED_QUEUES], [1], [Define whether we save queues during shutdown])] 8707b66cf61Sopenharmony_ci) 8717b66cf61Sopenharmony_ci 8727b66cf61Sopenharmony_ci# ========================================= 8737b66cf61Sopenharmony_ci# Local queue naming for remote CUPS queues 8747b66cf61Sopenharmony_ci# ========================================= 8757b66cf61Sopenharmony_ciAC_ARG_WITH([remote-cups-local-queue-naming], 8767b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-remote-cups-local-queue-naming=DNS-SD|MakeModel|RemoteName], [Choose the origin of local queue naming for remote CUPS queues, default based on DNS-SD ID])], 8777b66cf61Sopenharmony_ci [case "x$withval" in 8787b66cf61Sopenharmony_ci "xMakeModel") 8797b66cf61Sopenharmony_ci REMOTE_CUPS_LOCAL_QUEUE_NAMING="MakeModel" 8807b66cf61Sopenharmony_ci AC_DEFINE([NAMING_MAKE_MODEL], [1], [Define that we create local queues for remote CUPS queues based on printer Make-Model]) 8817b66cf61Sopenharmony_ci ;; 8827b66cf61Sopenharmony_ci "xRemoteName") 8837b66cf61Sopenharmony_ci REMOTE_CUPS_LOCAL_QUEUE_NAMING="RemoteName" 8847b66cf61Sopenharmony_ci AC_DEFINE([NAMING_REMOTE_NAME], [1], [Define that we create local queues for remote CUPS queues based on their print queue name on the server]) 8857b66cf61Sopenharmony_ci ;; 8867b66cf61Sopenharmony_ci *) 8877b66cf61Sopenharmony_ci REMOTE_CUPS_LOCAL_QUEUE_NAMING="DNS-SD" 8887b66cf61Sopenharmony_ci AC_DEFINE([NAMING_DNSSD], [1], [Define that we create local queues for remote CUPS queues based on DNS-SD name]) 8897b66cf61Sopenharmony_ci ;; 8907b66cf61Sopenharmony_ci esac], 8917b66cf61Sopenharmony_ci [REMOTE_CUPS_LOCAL_QUEUE_NAMING="DNS-SD" 8927b66cf61Sopenharmony_ci AC_DEFINE([NAMING_DNSSD], [1], [Define that we create local queues for remote CUPS queues based on DNS-SD name])] 8937b66cf61Sopenharmony_ci) 8947b66cf61Sopenharmony_ci 8957b66cf61Sopenharmony_ci# ========================================================= 8967b66cf61Sopenharmony_ci# Select a different shell instead of the default /bin/bash 8977b66cf61Sopenharmony_ci# ========================================================= 8987b66cf61Sopenharmony_ciAC_ARG_WITH([shell], 8997b66cf61Sopenharmony_ci [AS_HELP_STRING([--with-shell=path], [Specify path for a modern shell.])], 9007b66cf61Sopenharmony_ci [with_shell="$withval"], 9017b66cf61Sopenharmony_ci [with_shell="/bin/bash"] 9027b66cf61Sopenharmony_ci) 9037b66cf61Sopenharmony_ciAC_DEFINE_UNQUOTED([SHELL], "$with_shell", [Path for a modern shell]) 9047b66cf61Sopenharmony_ci 9057b66cf61Sopenharmony_ci# ===================== 9067b66cf61Sopenharmony_ci# Prepare all .in files 9077b66cf61Sopenharmony_ci# ===================== 9087b66cf61Sopenharmony_ciAC_CONFIG_FILES([ 9097b66cf61Sopenharmony_ci libcupsfilters.pc 9107b66cf61Sopenharmony_ci libfontembed.pc 9117b66cf61Sopenharmony_ci Makefile 9127b66cf61Sopenharmony_ci utils/cups-browsed 9137b66cf61Sopenharmony_ci utils/cups-browsed.conf 9147b66cf61Sopenharmony_ci filter/foomatic-rip/foomatic-rip.1 9157b66cf61Sopenharmony_ci filter/braille/drivers/index/indexv4.sh 9167b66cf61Sopenharmony_ci filter/braille/drivers/index/indexv3.sh 9177b66cf61Sopenharmony_ci filter/braille/drivers/index/index.sh 9187b66cf61Sopenharmony_ci filter/braille/drivers/index/textbrftoindexv3 9197b66cf61Sopenharmony_ci filter/braille/drivers/index/imageubrltoindexv3 9207b66cf61Sopenharmony_ci filter/braille/drivers/index/imageubrltoindexv4 9217b66cf61Sopenharmony_ci filter/braille/drivers/generic/brftoembosser 9227b66cf61Sopenharmony_ci filter/braille/filters/cups-braille.sh 9237b66cf61Sopenharmony_ci filter/braille/filters/imagetobrf 9247b66cf61Sopenharmony_ci filter/braille/filters/texttobrf 9257b66cf61Sopenharmony_ci filter/braille/filters/brftopagedbrf 9267b66cf61Sopenharmony_ci filter/braille/filters/vectortopdf 9277b66cf61Sopenharmony_ci filter/braille/filters/vectortobrf 9287b66cf61Sopenharmony_ci filter/braille/filters/musicxmltobrf 9297b66cf61Sopenharmony_ci filter/braille/filters/liblouis1.defs.gen 9307b66cf61Sopenharmony_ci mime/cupsfilters.convs 9317b66cf61Sopenharmony_ci]) 9327b66cf61Sopenharmony_ciAC_CONFIG_COMMANDS([executable-scripts], [ 9337b66cf61Sopenharmony_ci chmod +x filter/braille/filters/liblouis1.defs.gen 9347b66cf61Sopenharmony_ci]) 9357b66cf61Sopenharmony_ciAC_OUTPUT 9367b66cf61Sopenharmony_ci 9377b66cf61Sopenharmony_ci# ============================================== 9387b66cf61Sopenharmony_ci# Display final informations about configuration 9397b66cf61Sopenharmony_ci# ============================================== 9407b66cf61Sopenharmony_ciAC_MSG_NOTICE([ 9417b66cf61Sopenharmony_ci============================================================================== 9427b66cf61Sopenharmony_ciEnvironment settings: 9437b66cf61Sopenharmony_ci CFLAGS: ${CFLAGS} 9447b66cf61Sopenharmony_ci CXXFLAGS: ${CXXFLAGS} 9457b66cf61Sopenharmony_ci LDFLAGS: ${LDFLAGS} 9467b66cf61Sopenharmony_ciBuild configuration: 9477b66cf61Sopenharmony_ci cups-config: ${with_cups_config} 9487b66cf61Sopenharmony_ci font directory: ${sysconfdir}/${FONTDIR} 9497b66cf61Sopenharmony_ci foomatic: ${enable_foomatic} 9507b66cf61Sopenharmony_ci init directory: ${INITDDIR} 9517b66cf61Sopenharmony_ci cups dom socket: ${CUPS_DEFAULT_DOMAINSOCKET} 9527b66cf61Sopenharmony_ci poppler: ${enable_poppler} 9537b66cf61Sopenharmony_ci ghostscript: ${enable_ghostscript} 9547b66cf61Sopenharmony_ci gs-path: ${with_gs_path} 9557b66cf61Sopenharmony_ci mutool: ${enable_mutool} 9567b66cf61Sopenharmony_ci mutool-path: ${with_mutool_path} 9577b66cf61Sopenharmony_ci ippfind-path: ${with_ippfind_path} 9587b66cf61Sopenharmony_ci imagefilters: ${enable_imagefilters} 9597b66cf61Sopenharmony_ci jpeg: ${with_jpeg} 9607b66cf61Sopenharmony_ci exif: ${enable_exif} 9617b66cf61Sopenharmony_ci pdftocairo-path: ${with_pdftocairo_path} 9627b66cf61Sopenharmony_ci pdftops: ${with_pdftops} 9637b66cf61Sopenharmony_ci pdftops-path: ${with_pdftops_path} 9647b66cf61Sopenharmony_ci png: ${with_png} 9657b66cf61Sopenharmony_ci php: ${with_php} 9667b66cf61Sopenharmony_ci php-config: ${with_php_config} 9677b66cf61Sopenharmony_ci shell: ${with_shell} 9687b66cf61Sopenharmony_ci test-font: ${with_test_font_path} 9697b66cf61Sopenharmony_ci tiff: ${with_tiff} 9707b66cf61Sopenharmony_ci avahi: ${enable_avahi} 9717b66cf61Sopenharmony_ci dbus: ${enable_dbus} 9727b66cf61Sopenharmony_ci browsing: ${with_browseremoteprotocols} 9737b66cf61Sopenharmony_ci werror: ${enable_werror} 9747b66cf61Sopenharmony_ci braille: ${enable_braille} 9757b66cf61Sopenharmony_ci braille tables: ${TABLESDIR} 9767b66cf61Sopenharmony_ci driverless: ${enable_driverless} 9777b66cf61Sopenharmony_ci apple-raster: ${APPLE_RASTER_FILTER} 9787b66cf61Sopenharmony_ci pclm: ${enable_pclm} 9797b66cf61Sopenharmony_ci local queue naming for remote CUPS queues: ${REMOTE_CUPS_LOCAL_QUEUE_NAMING} 9807b66cf61Sopenharmony_ci keep generated queues during shutdown: ${SAVING_CREATED_QUEUES} 9817b66cf61Sopenharmony_ci all ipp printer auto-setup: ${enable_auto_setup_all} 9827b66cf61Sopenharmony_ci only driverless auto-setup: ${enable_auto_setup_driverless_only} 9837b66cf61Sopenharmony_ci only local auto-setup: ${enable_auto_setup_local_only} 9847b66cf61Sopenharmony_ci============================================================================== 9857b66cf61Sopenharmony_ci]) 986