summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2013-10-24 08:59:12 +0100
committerChris Liddell <chris.liddell@artifex.com>2013-10-24 08:59:12 +0100
commit184dcfd570a96328798e36d8e08495eb426d67f9 (patch)
treea253e06c8fd4f8d0518915859dc43f67f4bce20e /configure.ac
parent38ed5ffaf81405a3e8ff094afbc2ada05eaf630c (diff)
downloadghostpdl-184dcfd570a96328798e36d8e08495eb426d67f9.tar.gz
Allow user to override configure's color index setting
This command line parameter is not listed in the "configure --help" output as it is really intended for our use, and not generally by end users. To build with 32 bit colour indices, issue: ./configure --with-large_color_index=0 to build with 64 bit color indices: ./configure --with-large_color_index=1 This works for both Ghostscript and GhostPDL builds. The only "wrinkle" is that Ghostscript default to: "--with-large_color_index=1" (so 64 bit indices) whilst GhostPDL defaults to: "--with-large_color_index=0" (so 32 bit indices) This retains the previous default settings. No cluster differences.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac59
1 files changed, 59 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 8c28b6643..d327d7ca2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,7 +197,66 @@ AC_SUBST(FAPIUFST_MAK)
AC_SUBST(FT_BRIDGE)
+dnl --------------------------------------------------
+dnl Should we use 64 bit color index
+dnl --------------------------------------------------
+large_color_index=0
+
+AC_ARG_WITH([large_color_index],, large_color_index="$with_large_color_index")
+
+if test x"$large_color_index" != "x0"; then
+
+ dnl try to find a 64 bit type for devicen color index
+ color_ind_type="none"
+ AC_CHECK_SIZEOF(unsigned long int)
+ if test $ac_cv_sizeof_unsigned_long_int = 8; then
+ color_ind_type="unsigned long int"
+ else
+ AC_CHECK_SIZEOF(unsigned long long)
+ if test $ac_cv_sizeof_unsigned_long_long = 8; then
+ color_ind_type="unsigned long long"
+ else
+ AC_CHECK_SIZEOF(unsigned __int64)
+ if test $ac_cv_sizeof_unsigned___int64 = 8; then
+ color_ind_type="unsigned __int64"
+ else
+ AC_CHECK_SIZEOF(u_int64_t)
+ if test $ac_cv_sizeof_u_int64_t = 8; then
+ color_ind_type="u_int64_t"
+ fi
+ fi
+ fi
+ fi
+else
+ dnl try to find a 32 bit type for devicen color index
+ color_ind_type="none"
+ AC_CHECK_SIZEOF(unsigned long int)
+ if test $ac_cv_sizeof_unsigned_long_int = 4; then
+ color_ind_type="unsigned long int"
+ else
+ AC_CHECK_SIZEOF(unsigned int)
+ if test $ac_cv_sizeof_unsigned_int = 4; then
+ color_ind_type="unsigned int"
+ else
+ AC_CHECK_SIZEOF(unsigned __int32)
+ if test $ac_cv_sizeof_unsigned___int32 = 4; then
+ color_ind_type="unsigned __int32"
+ else
+ AC_CHECK_SIZEOF(u_int32_t)
+ if test $ac_cv_sizeof_u_int32_t = 4; then
+ color_ind_type="u_int32_t"
+ fi
+ fi
+ fi
+ fi
+fi
+dnl if a suitable type wasn't found above, we fall back to
+dnl a default in genarch.
+if test "$color_ind_type" != "none"; then
+ COLOR_INDEX_TYPE_DEFINE="-DGX_COLOR_INDEX_TYPE=\"$color_ind_type\""
+fi
+AC_SUBST(COLOR_INDEX_TYPE_DEFINE)
dnl --------------------------------------------------
dnl check for big/little endian for LCMS