Fix typo
[profile/ivi/pixman.git] / configure.ac
1 dnl  Copyright 2005 Red Hat, Inc.
2 dnl 
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.
12 dnl 
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.
20 dnl
21 dnl Process this file with autoconf to create configure.
22
23 AC_PREREQ([2.57])
24
25 AC_INIT(pixman, 0.9.3, "sandmann@daimi.au.dk", pixman)
26 AM_INIT_AUTOMAKE([dist-bzip2])
27
28 AM_CONFIG_HEADER(config.h)
29
30 AC_PROG_CC
31 AC_PROG_LIBTOOL
32 AC_CHECK_FUNCS([getisax])
33 AC_C_BIGENDIAN
34
35 # Check for dependencies
36 #PKG_CHECK_MODULES(DEP, x11)
37
38 changequote(,)dnl
39 if test "x$GCC" = "xyes"; then
40   case " $CFLAGS " in
41   *[\ \ ]-Wall[\ \      ]*) ;;
42   *) CFLAGS="$CFLAGS -Wall" ;;
43   esac fi changequote([,])dnl
44
45 dnl ===========================================================================
46 dnl Check for MMX
47
48 MMX_CFLAGS="-mmmx -msse -Winline --param inline-unit-growth=10000 --param large-function-growth=10000"
49
50 have_mmx_intrinsics=no
51 AC_MSG_CHECKING(For MMX/SSE intrinsics in the compiler)
52 xserver_save_CFLAGS=$CFLAGS
53 CFLAGS="$CFLAGS $MMX_CFLAGS"
54 AC_COMPILE_IFELSE([
55 #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
56 #error "Need GCC >= 3.4 for MMX intrinsics"
57 #endif
58 #include <mmintrin.h>
59 #include <xmmintrin.h>
60 int main () {
61     __m64 v = _mm_cvtsi32_si64 (1);
62     v = _mm_shuffle_pi16 (v, _MM_SHUFFLE(3, 3, 3, 3));
63     return _mm_cvtsi64_si32 (v);
64 }], have_mmx_intrinsics=yes)
65 CFLAGS=$xserver_save_CFLAGS
66 AC_MSG_RESULT($have_mmx_intrinsics)
67
68 if test $have_mmx_intrinsics = yes ; then
69    AC_DEFINE(USE_MMX, 1, [use MMX compiler intrinsics])
70 else
71    MMX_CFLAGS=
72 fi
73 AC_SUBST(MMX_CFLAGS)
74
75 AM_CONDITIONAL(USE_MMX, test $have_mmx_intrinsics = yes)
76
77 dnl ========================================================
78
79 PKG_CHECK_MODULES(GTK, [gtk+-2.0], [HAVE_GTK=yes], [HAVE_GTK=no])
80 AM_CONDITIONAL(HAVE_GTK, [test "x$HAVE_GTK" = xyes])
81
82 AC_SUBST(GTK_CFLAGS)
83 AC_SUBST(GTK_LIBS)
84 AC_SUBST(DEP_CFLAGS)
85 AC_SUBST(DEP_LIBS)
86                   
87 AC_OUTPUT([pixman.pc
88            Makefile
89            pixman/Makefile
90            test/Makefile])