Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

full path in 'configure --with-pdftops=...' #3278

Closed

Description

@michaelrsweet

Version: 1.4rc1
CUPS.org User: jsmeix.suse

Currently e.g. 'configure --with-pdftops=pdftops'
does a test if the specified binary exists
during compile time via
'AC_PATH_PROG(CUPS_PDFTOPS, pdftops)' in cups-pdf.m4

When we build our cups RPMs we install a build-system
in a chroot environment to make sure the RPM gets
built in a known clean environmnmt.

To satify the test I could install xpdf-tools
which contains /usr/bin/pdftops in the build-system
but this would be only needed to satisfy the test.
As far as I see the actual /usr/bin/pdftops is not
needed to perform the build.

Therefore I would like to specify the full path via
'configure --with-pdftops=/usr/bin/pdftops'
but without the need to actualy install xpdf-tools
to avoid that the build-system gets bloated because
installing whatever applications in the build-system
may pull in huge amounts of other packages which
are required by the application.

The attached patch adds support to specify a full path
as follows 'configure --with-pdftops=/usr/bin/pdftops'
or 'configure --with-pdftops=/usr/bin/gs'
but e.g. 'configure --with-pdftops=/usr/bin/myfilter'
is currently not supported.

Furthermore the patch lets configure abort if
an unsupported value was specified.

In particular the latter is very important
because without the patch one could specify
'configure --with-pdftops=/usr/bin/myfilter'
but then this would be silently ignored and
CUPS would be built without any pdftops filter.

Activity

  1. michaelrsweet commented on Aug 5, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Will pick up for 1.4.0.

  2. michaelrsweet commented on Aug 7, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: jsmeix.suse

    The replacement patch
    cups-1.4-full_path_to_configure_with-pdftops.patch
    has support for 'with_pdftops=none'
    which was missing in my initial patch
    full_path_to_configure_with-pdftops.patch

  3. michaelrsweet commented on Aug 7, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in Subversion repository.

  4. michaelrsweet commented on Aug 7, 2009

    @michaelrsweet
    ContributorAuthor

    "full_path_to_configure_with-pdftops.patch":

    --- config-scripts/cups-pdf.m4.orig 2009-03-12 22:50:44.000000000 +0100
    +++ config-scripts/cups-pdf.m4 2009-08-04 12:43:12.000000000 +0200
    @@ -13,7 +13,7 @@ dnl which should have been included wi
    dnl file is missing or damaged, see the license at "http://www.cups.org/".
    dnl

    -AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,pdftops,none), default=pdftops ])
    +AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,/path/to/gs,pdftops,/path/to/pdftops,none), default=pdftops ])

    PDFTOPS=""
    CUPS_PDFTOPS=""
    @@ -47,6 +47,12 @@ case "x$with_pdftops" in
    fi
    ;;

    • x/*/gs) # Use /path/to/gs without any check:
    • CUPS_GHOSTSCRIPT="$with_pdftops"
    • AC_DEFINE(HAVE_GHOSTSCRIPT)
    • PDFTOPS="pdftops"
    • ;;

    xpdftops)
    AC_PATH_PROG(CUPS_PDFTOPS, pdftops)
    if test "x$CUPS_PDFTOPS" != x; then
    @@ -57,6 +63,17 @@ case "x$with_pdftops" in
    exit 1
    fi
    ;;
    +

    • x/*/pdftops) # Use /path/to/pdftops without any check:
    • CUPS_PDFTOPS="$with_pdftops"
    • AC_DEFINE(HAVE_PDFTOPS)
    • PDFTOPS="pdftops"
    • ;;
    • *) # Invalid with_pdftops value:
    • AC_MSG_ERROR(Invalid with_pdftops value!)
    • exit 1
    • ;;
      esac

    AC_DEFINE_UNQUOTED(CUPS_PDFTOPS, "$CUPS_PDFTOPS")

  5. michaelrsweet commented on Aug 7, 2009

    @michaelrsweet
    ContributorAuthor

    "cups-1.4-full_path_to_configure_with-pdftops.patch":

    --- config-scripts/cups-pdf.m4.orig 2009-03-12 22:50:44.000000000 +0100
    +++ config-scripts/cups-pdf.m4 2009-08-07 12:35:38.000000000 +0200
    @@ -13,7 +13,7 @@ dnl which should have been included wi
    dnl file is missing or damaged, see the license at "http://www.cups.org/".
    dnl

    -AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,pdftops,none), default=pdftops ])
    +AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,/path/to/gs,pdftops,/path/to/pdftops,none), default=pdftops ])

    PDFTOPS=""
    CUPS_PDFTOPS=""
    @@ -47,6 +47,12 @@ case "x$with_pdftops" in
    fi
    ;;

    • x/*/gs) # Use /path/to/gs without any check:
    • CUPS_GHOSTSCRIPT="$with_pdftops"
    • AC_DEFINE(HAVE_GHOSTSCRIPT)
    • PDFTOPS="pdftops"
    • ;;

    xpdftops)
    AC_PATH_PROG(CUPS_PDFTOPS, pdftops)
    if test "x$CUPS_PDFTOPS" != x; then
    @@ -57,6 +63,20 @@ case "x$with_pdftops" in
    exit 1
    fi
    ;;
    +

    • x/*/pdftops) # Use /path/to/pdftops without any check:
    • CUPS_PDFTOPS="$with_pdftops"
    • AC_DEFINE(HAVE_PDFTOPS)
    • PDFTOPS="pdftops"
    • ;;
    • xnone) # Make no pdftops filter if with_pdftops=none:
    • ;;
    • *) # Invalid with_pdftops value:
    • AC_MSG_ERROR(Invalid with_pdftops value!)
    • exit 1
    • ;;
      esac

    AC_DEFINE_UNQUOTED(CUPS_PDFTOPS, "$CUPS_PDFTOPS")

  6. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions