increment version to 1.1.0, in view of the fact that we've branched for
[platform/upstream/atk.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT(ChangeLog)
4
5 dnl ==========================================================================
6 dnl
7 dnl If you add a version number here, you *must* add an AC_SUBST line for
8 dnl it too, or it will never make it into the spec file!
9 dnl
10 dnl ==========================================================================
11
12 GLIB_REQUIRED_VERSION=2.0.0
13 AC_SUBST(GLIB_REQUIRED_VERSION)
14
15 dnl ==========================================================================
16 dnl                              Versioning              
17 dnl ==========================================================================
18
19 dnl Making releases:
20 dnl   ATK_MICRO_VERSION += 1;
21 dnl   ATK_INTERFACE_AGE += 1;
22 dnl   ATK_BINARY_AGE += 1;
23 dnl if any functions have been added, set ATK_INTERFACE_AGE to 0.
24 dnl if backwards compatibility has been broken,
25 dnl set ATK_BINARY_AGE _and_ ATK_INTERFACE_AGE to 0.
26
27 dnl The triplet 
28 ATK_MAJOR_VERSION=1
29 ATK_MINOR_VERSION=1
30 ATK_MICRO_VERSION=0
31 ATK_VERSION=$ATK_MAJOR_VERSION.$ATK_MINOR_VERSION.$ATK_MICRO_VERSION
32
33 dnl The X.Y in -latk-X.Y line. This is expected to stay 1.0 until Atk 2.
34 ATK_API_VERSION=1.0
35
36 dnl Number of releases since we've added interfaces
37 ATK_INTERFACE_AGE=0
38
39 ATK_BINARY_AGE=100
40
41 AC_SUBST(ATK_MAJOR_VERSION)
42 AC_SUBST(ATK_MINOR_VERSION)
43 AC_SUBST(ATK_VERSION)
44 AC_SUBST(ATK_API_VERSION)
45 AC_SUBST(ATK_MICRO_VERSION)
46 AC_SUBST(ATK_INTERFACE_AGE)
47 AC_SUBST(ATK_BINARY_AGE)
48
49 dnl libtool versioning
50 lt_current=`expr 100 '*' $ATK_MINOR_VERSION + $ATK_MICRO_VERSION - $ATK_INTERFACE_AGE`
51 lt_revision=$ATK_INTERFACE_AGE
52 lt_age=`expr $ATK_BINARY_AGE - $ATK_INTERFACE_AGE`
53 LT_VERSION_INFO="$lt_current:$lt_revision:$lt_age"
54 LT_CURRENT_MINUS_AGE=`expr $lt_current - $lt_age`
55
56 AC_SUBST(LT_VERSION_INFO)
57 AC_SUBST(LT_CURRENT_MINUS_AGE)
58
59 dnl ==========================================================================
60
61 AM_INIT_AUTOMAKE(atk,$ATK_VERSION)
62
63 AC_PROG_CC
64 AM_DISABLE_STATIC
65 AC_LIBTOOL_WIN32_DLL
66 AM_PROG_LIBTOOL
67
68 AC_MSG_CHECKING([for Win32])
69 case "$host" in
70   *-*-mingw*)
71     atk_native_win32=yes
72     ;;
73   *)
74     atk_native_win32=no
75     ;;
76 esac
77 AC_MSG_RESULT([$atk_native_win32])
78 AM_CONDITIONAL(OS_WIN32, test "$atk_native_win32" = "yes")
79
80 if test "$atk_native_win32" = "yes"; then
81   AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
82 fi
83 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
84
85 dnl Cache $ACLOCAL_FLAGS
86 AC_CACHE_CHECK([for aclocal flags], ac_cv_atk_aclocal_flags,[
87    ac_cv_atk_aclocal_flags="$ACLOCAL_FLAGS"
88 ])
89 ACLOCAL="$ACLOCAL $ac_cv_atk_aclocal_flags"
90
91 AC_ARG_ENABLE(rebuilds, [  --disable-rebuilds      disable all source autogeneration rules],,enable_rebuilds=yes)
92
93 changequote(,)dnl
94 if test "x$GCC" = "xyes"; then
95   case " $CFLAGS " in
96   *[\ \ ]-Wall[\ \      ]*) ;;
97   *) CFLAGS="$CFLAGS -Wall" ;;
98   esac
99 fi
100 changequote([,])dnl
101
102 GLIB_PACKAGES="gobject-2.0 gmodule-2.0"
103 AC_SUBST(GLIB_PACKAGES)
104
105 dnl This PATH_GLIB is somewhat redundant, but does a sanity compile and 
106 dnl importantly defines the GLIB_GENMARSHAL variable for subst into the
107 dnl Makefile
108 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
109   AC_MSG_ERROR([
110 *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of 
111 *** GLIB is always available from ftp://ftp.gtk.org/.]),
112   gobject gmodule)
113
114 PKG_CHECK_MODULES(DEP, glib-2.0 >= $GLIB_REQUIRED_VERSION $GLIB_PACKAGES, , AC_MSG_ERROR([
115         *** GLib not found. You can find it on ftp://ftp.gtk.org
116         *** Errors follow:
117             $DEP_PKG_ERRORS]))
118
119 # Rerun PKG_CONFIG to add gthread-2.0 cflags, but not libs
120 DEP_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES gthread-2.0`
121
122 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
123
124 gtk_doc_min_version=0.6
125 if $GTKDOC ; then
126     gtk_doc_version=`gtkdoc-mkdb --version`
127     AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
128     if perl <<EOF ; then
129         exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
130             ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
131 EOF
132       AC_MSG_RESULT(yes)
133    else
134       AC_MSG_RESULT(no)
135         GTKDOC=false
136    fi
137 fi
138
139 atktargetlib=libatk-$ATK_API_VERSION.la
140
141 AC_SUBST(atktargetlib)
142
143 AC_MSG_CHECKING(whether make is GNU Make)
144 STRIP_BEGIN=
145 STRIP_END=
146 if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
147         STRIP_BEGIN='$(strip $(STRIP_DUMMY)'
148         STRIP_END=')'
149         AC_MSG_RESULT(yes)
150 else
151         AC_MSG_RESULT(no)
152 fi
153 STRIP_DUMMY=
154 AC_SUBST(STRIP_DUMMY)
155 AC_SUBST(STRIP_BEGIN)
156 AC_SUBST(STRIP_END)
157
158 dnl Disable the gtk-doc stuff by default to avoid Jade hassles
159 AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc        use gtk-doc to build documentation [default=no]], enable_gtk_doc="$enableval", enable_gtk_doc=no)
160
161 if test x$enable_gtk_doc = xyes ; then
162   if test x$GTKDOC = xtrue ; then
163     enable_gtk_doc=yes
164   else
165     enable_gtk_doc=no
166   fi
167 fi
168
169 dnl NOTE: We need to use a separate automake conditional for this
170 dnl       to make this work with the tarballs.
171 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
172
173 # define a MAINT-like variable REBUILD which is set if Perl
174 # and awk are found, so autogenerated sources can be rebuilt
175
176 AC_PROG_AWK
177 AC_CHECK_PROGS(PERL, perl5 perl)
178
179 REBUILD=\#
180 if test "x$enable_rebuilds" = "xyes" && \
181         test -n "$PERL" && \
182         $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
183      test -n "$AWK" ; then
184   REBUILD=
185 fi
186 AC_SUBST(REBUILD)
187
188 AC_OUTPUT([
189 Makefile
190 atk.pc
191 atk-uninstalled.pc
192 atk/Makefile
193 tests/Makefile
194 docs/Makefile
195 atk.spec
196 atk-zip.sh
197 ])