diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2013-06-24 08:31:55 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2013-06-24 08:31:55 +0000 |
commit | 979f91be27c416b983cee7ad50e5fed2272e0336 (patch) | |
tree | caa0d752edb4ad9c5e63ac61df26914010ca51c6 /Build/source/libs/cairo/m4 | |
parent | 98bd36b19e0aee9d8ef2d560d4fc32ed2036251b (diff) |
cairo 1.12.14 with proxy build system, no more need for pkg-config
git-svn-id: svn://tug.org/texlive/trunk@30883 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/cairo/m4')
-rw-r--r-- | Build/source/libs/cairo/m4/cairo-bigendian.m4 | 35 | ||||
-rw-r--r-- | Build/source/libs/cairo/m4/cairo-features.m4 | 27 | ||||
-rw-r--r-- | Build/source/libs/cairo/m4/float.m4 | 64 |
3 files changed, 126 insertions, 0 deletions
diff --git a/Build/source/libs/cairo/m4/cairo-bigendian.m4 b/Build/source/libs/cairo/m4/cairo-bigendian.m4 new file mode 100644 index 00000000000..f7499f6888f --- /dev/null +++ b/Build/source/libs/cairo/m4/cairo-bigendian.m4 @@ -0,0 +1,35 @@ +dnl ========================================================================== +dnl +dnl Cairo-specific macros +dnl + +dnl ========================================================================== + +dnl Usage: +dnl CAIRO_BIGENDIAN +dnl +AC_DEFUN([CAIRO_BIGENDIAN], +[dnl + case $host_os in + darwin*) + AH_VERBATIM([X_BYTE_ORDER], +[ +/* Deal with multiple architecture compiles on Mac OS X */ +#ifdef __APPLE_CC__ +#ifdef __BIG_ENDIAN__ +#define WORDS_BIGENDIAN 1 +#define FLOAT_WORDS_BIGENDIAN 1 +#else +#undef WORDS_BIGENDIAN +#undef FLOAT_WORDS_BIGENDIAN +#endif +#endif +]) + ;; + *) + AC_C_BIGENDIAN + AX_C_FLOAT_WORDS_BIGENDIAN + ;; + esac +]) + diff --git a/Build/source/libs/cairo/m4/cairo-features.m4 b/Build/source/libs/cairo/m4/cairo-features.m4 new file mode 100644 index 00000000000..f7a58c9e17c --- /dev/null +++ b/Build/source/libs/cairo/m4/cairo-features.m4 @@ -0,0 +1,27 @@ +# Public macros for the TeX Live (TL) tree. +# Copyright (C) 2013 Peter Breitenlohner <tex-live@tug.org> +# +# This file is free software; the copyright holder +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# CAIRO_FEATURES(FEATURE1, FEATURE2, ...) +# --------------------------------------- +# Where each feature has the form '[1-or-o], [text]'. +dnl +AC_DEFUN([CAIRO_FEATURES], [dnl +m4_foreach([Cairo_Feature], [$1], + [m4_ifset([Cairo_Feature], + [_CAIRO_FEATURE(Cairo_Feature)])])[]dnl +]) # CAIRO_FEATURES + +# _CAIRO_FEATURE(COND, TEXT) +# -------------------------- +m4_define([_CAIRO_FEATURE], [dnl +if test "x$1" = x1; then + AC_DEFINE([CAIRO_HAS_]AS_TR_CPP($2), [1], + [Define to 1 if $2 enabled.]) +fi +AM_CONDITIONAL([CAIRO_HAS_]AS_TR_CPP($2), [test "x$1" = x1]) +]) # _CAIRO_FEATURE + diff --git a/Build/source/libs/cairo/m4/float.m4 b/Build/source/libs/cairo/m4/float.m4 new file mode 100644 index 00000000000..18ec3161840 --- /dev/null +++ b/Build/source/libs/cairo/m4/float.m4 @@ -0,0 +1,64 @@ +# AX_C_FLOAT_WORDS_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], +# [ACTION-IF-UNKNOWN]) +# +# Checks the ordering of words within a multi-word float. This check +# is necessary because on some systems (e.g. certain ARM systems), the +# float word ordering can be different from the byte ordering. In a +# multi-word float context, "big-endian" implies that the word containing +# the sign bit is found in the memory location with the lowest address. +# This implemenation was inspired by the AC_C_BIGENDIAN macro in autoconf. +# ------------------------------------------------------------------------- +AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN], + [AC_CACHE_CHECK(whether float word ordering is bigendian, + ax_cv_c_float_words_bigendian, [ + +# The endianess is detected by first compiling C code that contains a special +# double float value, then grepping the resulting object file for certain +# strings of ascii values. The double is specially crafted to have a +# binary representation that corresponds with a simple string. In this +# implementation, the string "noonsees" was selected because the individual +# word values ("noon" and "sees") are palindromes, thus making this test +# byte-order agnostic. If grep finds the string "noonsees" in the object +# file, the target platform stores float words in big-endian order. If grep +# finds "seesnoon", float words are in little-endian order. If neither value +# is found, the user is instructed to specify the ordering. + +ax_cv_c_float_words_bigendian=unknown +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + +double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0; + +]])], [ + +if strings - conftest.$ac_objext | grep noonsees >/dev/null ; then + ax_cv_c_float_words_bigendian=yes +fi +if strings - conftest.$ac_objext | grep seesnoon >/dev/null ; then + if test "$ax_cv_c_float_words_bigendian" = unknown; then + ax_cv_c_float_words_bigendian=no + else + ax_cv_c_float_words_bigendian=unknown + fi +fi + +])]) + +case $ax_cv_c_float_words_bigendian in + yes) + m4_default([$1], + [AC_DEFINE([FLOAT_WORDS_BIGENDIAN], 1, + [Define to 1 if your system stores words within floats + with the most significant word first])]) ;; + no) + $2 ;; + *) + m4_default([$3], + [AC_MSG_ERROR([ + +Unknown float word ordering. You need to manually preset +ax_cv_c_float_words_bigendian=no (or yes) according to your system. + + ])]) ;; +esac + +])# AX_C_FLOAT_WORDS_BIGENDIAN |