]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-pdf.m4
Merge changes from CUPS 1.4.0 (r8750)
[thirdparty/cups.git] / config-scripts / cups-pdf.m4
index f76974883748ced0075eaa8433db7891c4b1e9d4..5d71f4d3f098c12c2d3b36952f2de0006e38033e 100644 (file)
@@ -1,43 +1,68 @@
 dnl
-dnl "$Id: cups-pdf.m4 5466 2006-04-26 19:52:27Z mike $"
+dnl "$Id: cups-pdf.m4 7449 2008-04-14 18:27:53Z mike $"
 dnl
 dnl   PDF filter configuration stuff for the Common UNIX Printing System (CUPS).
 dnl
+dnl   Copyright 2007-2009 by Apple Inc.
 dnl   Copyright 2006 by Easy Software Products, all rights reserved.
 dnl
 dnl   These coded instructions, statements, and computer programs are the
-dnl   property of Easy Software Products and are protected by Federal
-dnl   copyright law.  Distribution and use rights are outlined in the file
-dnl   "LICENSE.txt" which should have been included with this file.  If this
-dnl   file is missing or damaged please contact Easy Software Products
-dnl   at:
-dnl
-dnl       Attn: CUPS Licensing Information
-dnl       Easy Software Products
-dnl       44141 Airport View Drive, Suite 204
-dnl       Hollywood, Maryland 20636 USA
-dnl
-dnl       Voice: (301) 373-9600
-dnl       EMail: cups-info@cups.org
-dnl         WWW: http://www.cups.org
+dnl   property of Apple Inc. and are protected by Federal copyright
+dnl   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+dnl   which should have been included with this file.  If this file is
+dnl   file is missing or damaged, see the license at "http://www.cups.org/".
 dnl
 
-AC_ARG_ENABLE(pdftops, [  --enable-pdftops        build pdftops filter, default=auto ])
+AC_ARG_WITH(pdftops, [  --with-pdftops          set pdftops filter (gs,pdftops,none), default=pdftops ])
 
 PDFTOPS=""
+CUPS_PDFTOPS=""
+CUPS_GHOSTSCRIPT=""
+
+case "x$with_pdftops" in
+       x) # Default/auto
+       if test $uname != Darwin; then
+               AC_PATH_PROG(CUPS_PDFTOPS, pdftops)
+               if test "x$CUPS_PDFTOPS" != x; then
+                       AC_DEFINE(HAVE_PDFTOPS)
+                       PDFTOPS="pdftops"
+               else
+                       AC_PATH_PROG(CUPS_GHOSTSCRIPT, gs)
+                       if test "x$CUPS_GHOSTSCRIPT" != x; then
+                               AC_DEFINE(HAVE_GHOSTSCRIPT)
+                               PDFTOPS="pdftops"
+                       fi
+               fi
+       fi
+       ;;
+
+       xgs)
+       AC_PATH_PROG(CUPS_GHOSTSCRIPT, gs)
+       if test "x$CUPS_GHOSTSCRIPT" != x; then
+               AC_DEFINE(HAVE_GHOSTSCRIPT)
+               PDFTOPS="pdftops"
+       else
+               AC_MSG_ERROR(Unable to find gs program!)
+               exit 1
+       fi
+       ;;
 
-if test "x$enable_pdftops" != xno; then
-       AC_MSG_CHECKING(whether to build pdftops filter)
-       if test "x$enable_pdftops" = xyes -o $uname != Darwin; then
+       xpdftops)
+       AC_PATH_PROG(CUPS_PDFTOPS, pdftops)
+       if test "x$CUPS_PDFTOPS" != x; then
+               AC_DEFINE(HAVE_PDFTOPS)
                PDFTOPS="pdftops"
-               AC_MSG_RESULT(yes)
        else
-               AC_MSG_RESULT(no)
+               AC_MSG_ERROR(Unable to find pdftops program!)
+               exit 1
        fi
-fi
+       ;;
+esac
 
+AC_DEFINE_UNQUOTED(CUPS_PDFTOPS, "$CUPS_PDFTOPS")
+AC_DEFINE_UNQUOTED(CUPS_GHOSTSCRIPT, "$CUPS_GHOSTSCRIPT")
 AC_SUBST(PDFTOPS)
 
 dnl
-dnl End of "$Id: cups-pdf.m4 5466 2006-04-26 19:52:27Z mike $".
+dnl End of "$Id: cups-pdf.m4 7449 2008-04-14 18:27:53Z mike $".
 dnl