Change the library name to pixman-1
[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 #   Pixman versioning scheme
26 #
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
29 #
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)
33 #
34 #          This needs to be done at least in 
35 #                    configure.ac
36 #                    all Makefile.am's
37 #                    pixman-n.pc.in
38 #
39 #      This ensures that binary incompatible versions can be installed in parallel.
40 #      See http://www106.pair.com/rhp/parallel.html for more information
41 #
42
43 m4_define([pixman_major], 0)
44 m4_define([pixman_minor], 9)
45 m4_define([pixman_micro], 3)
46
47 m4_define([pixman_version],[pixman_major.pixman_minor.pixman_micro])
48
49 AC_INIT(pixman, pixman_version, "sandmann@daimi.au.dk", pixman)
50 AM_INIT_AUTOMAKE([dist-bzip2])
51
52 AM_CONFIG_HEADER(config.h)
53
54 AC_PROG_CC
55 AC_PROG_LIBTOOL
56 AC_CHECK_FUNCS([getisax])
57 AC_C_BIGENDIAN
58
59
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:
62 #
63 #      pixman-$(pixman_major).0.minor.micro
64 #
65 m4_define([lt_current], [pixman_minor)])
66 m4_define([lt_revision], [pixman_micro])
67 m4_define([lt_age], [pixman_minor])
68
69 LT_VERSION_INFO="lt_current:lt_revision:lt_age"
70
71 PIXMAN_MAJOR=pixman_major
72 AC_SUBST(AC_MAJOR)
73
74 AC_SUBST(LT_VERSION_INFO)
75
76 # Check for dependencies
77 #PKG_CHECK_MODULES(DEP, x11)
78
79 changequote(,)dnl
80 if test "x$GCC" = "xyes"; then
81   case " $CFLAGS " in
82   *[\ \ ]-Wall[\ \      ]*) ;;
83   *) CFLAGS="$CFLAGS -Wall" ;;
84   esac fi changequote([,])dnl
85
86 dnl ===========================================================================
87 dnl Check for MMX
88
89 MMX_CFLAGS="-mmmx -msse -Winline --param inline-unit-growth=10000 --param large-function-growth=10000"
90
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"
95 AC_COMPILE_IFELSE([
96 #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
97 #error "Need GCC >= 3.4 for MMX intrinsics"
98 #endif
99 #include <mmintrin.h>
100 #include <xmmintrin.h>
101 int main () {
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)
108
109 if test $have_mmx_intrinsics = yes ; then
110    AC_DEFINE(USE_MMX, 1, [use MMX compiler intrinsics])
111 else
112    MMX_CFLAGS=
113 fi
114 AC_SUBST(MMX_CFLAGS)
115
116 AM_CONDITIONAL(USE_MMX, test $have_mmx_intrinsics = yes)
117
118 dnl ========================================================
119
120 PKG_CHECK_MODULES(GTK, [gtk+-2.0], [HAVE_GTK=yes], [HAVE_GTK=no])
121 AM_CONDITIONAL(HAVE_GTK, [test "x$HAVE_GTK" = xyes])
122
123 AC_SUBST(GTK_CFLAGS)
124 AC_SUBST(GTK_LIBS)
125 AC_SUBST(DEP_CFLAGS)
126 AC_SUBST(DEP_LIBS)
127                   
128 AC_OUTPUT([pixman-1.pc
129            Makefile
130            pixman/Makefile
131            test/Makefile])