]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
Add a configure option for texttopdf filter (#630)
authorNathan Muggli <muggli.nathan@gmail.com>
Wed, 19 Mar 2025 07:52:45 +0000 (01:52 -0600)
committerGitHub <noreply@github.com>
Wed, 19 Mar 2025 07:52:45 +0000 (08:52 +0100)
Add --enable-texttopdf/--disable-texttopdf configure options.  If this
is enabled, build the texttopdf filter. If not enabled, don't build that
filter.

If texttopdf is not enabled, don't add the texttopdf option in
cupsfilters-individual.convs

.gitignore
Makefile.am
configure.ac
mime/cupsfilters-individual.convs.in [moved from mime/cupsfilters-individual.convs with 97% similarity]

index 707edb89f7e20872dd0ba18ac49f1c3281616e81..c967172892ccef494669e9349c297da49127257e 100644 (file)
@@ -39,6 +39,7 @@ m4/ltsugar.m4
 m4/ltversion.m4
 m4/lt~obsolete.m4
 mime/cupsfilters.convs
+mime/cupsfilters-individual.convs
 utils/driverless-fax
 beh
 parallel
index 0da4b8edc785eba2347badd422749360d5cb655b..f4ff7a1a348fa27a8595366e0dfc20682d3e67aa 100644 (file)
@@ -195,7 +195,6 @@ pkgfilter_PROGRAMS += \
 endif
 pkgfilter_PROGRAMS += \
        pdftops \
-       texttopdf \
        pwgtopclm \
        pwgtopdf \
        bannertopdf \
@@ -210,6 +209,10 @@ if ENABLE_PSTOPS
 pkgfilter_PROGRAMS += \
        pstops
 endif
+if ENABLE_TEXTTOPDF
+pkgfilter_PROGRAMS += \
+       texttopdf
+endif
 if ENABLE_POPPLER
 pkgfilter_PROGRAMS += \
        pdftoraster
index e77cb4b5ebf3ffc090220f3248572ab3c3f2306e..3fed334bcdc466394ec9cce30c2ab60341367c28 100644 (file)
@@ -305,6 +305,16 @@ AC_ARG_ENABLE([pstops],
 )
 AM_CONDITIONAL([ENABLE_PSTOPS], [test "x$enable_pstops" = "xyes"])
 
+# ===================
+# Check for texttopdf
+# ===================
+AC_ARG_ENABLE([texttopdf],
+       [AS_HELP_STRING([--disable-texttopdf], [Disable the texttopdf filter.])],
+       [enable_texttopdf="$enableval"],
+       [enable_texttopdf=yes]
+)
+AM_CONDITIONAL([ENABLE_TEXTTOPDF], [test "x$enable_texttopdf" = "xyes"])
+
 # =====================
 # Check for rastertopwg
 # =====================
@@ -373,6 +383,7 @@ AC_DEFINE_UNQUOTED([SHELL], "$with_shell", [Path for a modern shell])
 AC_CONFIG_FILES([
        Makefile
        filter/foomatic-rip/foomatic-rip.1
+       mime/cupsfilters-individual.convs
 ])
 AC_OUTPUT
 
@@ -395,6 +406,7 @@ Build configuration:
        ippfind-path:    ${with_ippfind_path}
        imagefilters:    ${enable_imagefilters}
        pstops:          ${enable_pstops}
+       texttopdf:       ${enable_texttopdf}
        rastertopwg:     ${enable_rastertopwg}
        shell:           ${with_shell}
        universal CUPS filter: ${enable_universal_cups_filter}
similarity index 97%
rename from mime/cupsfilters-individual.convs
rename to mime/cupsfilters-individual.convs.in
index f9985c1a8c125ce7d386dd187ed3129e1effd695..29969348529b88d6721d793698fa0d84bdb8668c 100644 (file)
@@ -39,7 +39,7 @@
 #
 
 application/pdf                application/vnd.cups-pdf                66      pdftopdf
-text/plain             application/pdf                         32      texttopdf
+@ENABLE_TEXTTOPDF_TRUE@text/plain              application/pdf                         32      texttopdf
 image/pwg-raster       application/pdf                         32      pwgtopdf
 image/png              application/vnd.cups-pdf                65      imagetopdf
 image/jpeg             application/vnd.cups-pdf                65      imagetopdf