1 dnl Copyright 2005 Red Hat, Inc.
3 dnl Permission to use, copy, modify, distribute, and sell this software and its
4 dnl documentation for any purpose is hereby granted without fee, provided that
5 dnl the above copyright notice appear in all copies and that both that
6 dnl copyright notice and this permission notice appear in supporting
7 dnl documentation, and that the name of Red Hat not be used in
8 dnl advertising or publicity pertaining to distribution of the software without
9 dnl specific, written prior permission. Red Hat makes no
10 dnl representations about the suitability of this software for any purpose. It
11 dnl is provided "as is" without express or implied warranty.
13 dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
14 dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
15 dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
16 dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
17 dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 dnl PERFORMANCE OF THIS SOFTWARE.
21 dnl Process this file with autoconf to create configure.
25 # Pixman versioning scheme
27 # - If the changes don't affect API or ABI, then increment pixman_micro
28 # - If API is added, then increment PIXMAN_MINOR, and set MICRO to 0
30 # - If you break ABI, then
31 # - In the first development release where you break ABI, find all instances of
32 # "pixman-n" and change it to pixman-(n+1)
34 # This needs to be done at least in
39 # This ensures that binary incompatible versions can be installed in parallel.
40 # See http://www106.pair.com/rhp/parallel.html for more information
43 m4_define([pixman_major], 0)
44 m4_define([pixman_minor], 9)
45 m4_define([pixman_micro], 5)
47 m4_define([pixman_version],[pixman_major.pixman_minor.pixman_micro])
49 AC_INIT(pixman, pixman_version, "sandmann@daimi.au.dk", pixman)
50 AM_INIT_AUTOMAKE([dist-bzip2])
52 AM_CONFIG_HEADER(config.h)
56 AC_CHECK_FUNCS([getisax])
60 # We ignore pixman_major in the version here because the major version should
61 # always be encoded in the actual library name. Ie., the soname is:
63 # pixman-$(pixman_major).0.minor.micro
65 m4_define([lt_current], [pixman_minor])
66 m4_define([lt_revision], [pixman_micro])
67 m4_define([lt_age], [pixman_minor])
69 LT_VERSION_INFO="lt_current:lt_revision:lt_age"
71 PIXMAN_MAJOR=pixman_major
72 AC_SUBST(PIXMAN_MAJOR)
74 AC_SUBST(LT_VERSION_INFO)
76 # Check for dependencies
77 #PKG_CHECK_MODULES(DEP, x11)
80 if test "x$GCC" = "xyes"; then
82 *[\ \ ]-Wall[\ \ ]*) ;;
83 *) CFLAGS="$CFLAGS -Wall" ;;
84 esac fi changequote([,])dnl
86 dnl ===========================================================================
89 MMX_CFLAGS="-mmmx -msse -Winline --param inline-unit-growth=10000 --param large-function-growth=10000"
91 have_mmx_intrinsics=no
92 AC_MSG_CHECKING(For MMX/SSE intrinsics in the compiler)
93 xserver_save_CFLAGS=$CFLAGS
94 CFLAGS="$CFLAGS $MMX_CFLAGS"
96 #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
97 #error "Need GCC >= 3.4 for MMX intrinsics"
100 #include <xmmintrin.h>
102 __m64 v = _mm_cvtsi32_si64 (1);
103 v = _mm_shuffle_pi16 (v, _MM_SHUFFLE(3, 3, 3, 3));
104 return _mm_cvtsi64_si32 (v);
105 }], have_mmx_intrinsics=yes)
106 CFLAGS=$xserver_save_CFLAGS
107 AC_MSG_RESULT($have_mmx_intrinsics)
109 if test $have_mmx_intrinsics = yes ; then
110 AC_DEFINE(USE_MMX, 1, [use MMX compiler intrinsics])
116 AM_CONDITIONAL(USE_MMX, test $have_mmx_intrinsics = yes)
118 dnl ========================================================
120 dnl Check for VMX/Altivec
121 if test -n "`$CC -v 2>&1 | grep version | grep Apple`"; then
122 VMX_CFLAGS="-faltivec"
124 VMX_CFLAGS="-maltivec -mabi=altivec"
127 have_vmx_intrinsics=no
128 AC_MSG_CHECKING(For VMX/Altivec intrinsics in the compiler)
129 xserver_save_CFLAGS=$CFLAGS
130 CFLAGS="$CFLAGS $VMX_CFLAGS"
132 #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
133 #error "Need GCC >= 3.4 for sane altivec support"
137 vector unsigned int v = vec_splat_u32 (1);
140 }], have_vmx_intrinsics=yes)
141 CFLAGS=$xserver_save_CFLAGS
142 AC_MSG_RESULT($have_vmx_intrinsics)
144 if test $have_vmx_intrinsics = yes ; then
145 AC_DEFINE(USE_VMX, 1, [use VMX compiler intrinsics])
151 AM_CONDITIONAL(USE_VMX, test $have_vmx_intrinsics = yes)
153 dnl ===========================================================================
155 PKG_CHECK_MODULES(GTK, [gtk+-2.0], [HAVE_GTK=yes], [HAVE_GTK=no])
156 AM_CONDITIONAL(HAVE_GTK, [test "x$HAVE_GTK" = xyes])
163 AC_OUTPUT([pixman-1.pc