Added state-change signal to AtkObject (will deprecate accessible-state property)
[atk.git] / configure.in
blob3d1415481ac0b9315cdf1cf2633d0096af2cf188
1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(ChangeLog)
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 ==========================================================================
12 GLIB_REQUIRED_VERSION=1.3.9
13 AC_SUBST(GLIB_REQUIRED_VERSION)
15 dnl ==========================================================================
18 # Making releases:
19 #   ATK_MICRO_VERSION += 1;
20 #   ATK_INTERFACE_AGE += 1;
21 #   ATK_BINARY_AGE += 1;
22 # if any functions have been added, set ATK_INTERFACE_AGE to 0.
23 # if backwards compatibility has been broken,
24 # set ATK_BINARY_AGE and ATK_INTERFACE_AGE to 0.
27 ATK_MAJOR_VERSION=0
28 ATK_MINOR_VERSION=0
29 ATK_MICRO_VERSION=7
30 ATK_INTERFACE_AGE=0
31 ATK_BINARY_AGE=0
32 ## with 1.0 you'd insert MINOR_VERSION in here, i.e. 0.3->1.0.0->1.0.1->1.0.2
33 ## note that micro version has to go in the libtool stuff below
34 ATK_VERSION=$ATK_MAJOR_VERSION.$ATK_MICRO_VERSION
35 AM_INIT_AUTOMAKE(atk, $ATK_VERSION)
37 AC_SUBST(ATK_MAJOR_VERSION)
38 AC_SUBST(ATK_MINOR_VERSION)
39 AC_SUBST(ATK_MICRO_VERSION)
40 AC_SUBST(ATK_VERSION)
42 # libtool versioning
43 LT_RELEASE=$ATK_MAJOR_VERSION.$ATK_MINOR_VERSION
44 LT_CURRENT=`expr $ATK_MICRO_VERSION - $ATK_INTERFACE_AGE`
45 LT_REVISION=$ATK_INTERFACE_AGE
46 LT_AGE=`expr $ATK_BINARY_AGE - $ATK_INTERFACE_AGE`
47 LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
48 AC_SUBST(LT_RELEASE)
49 AC_SUBST(LT_CURRENT)
50 AC_SUBST(LT_REVISION)
51 AC_SUBST(LT_AGE)
52 AC_SUBST(LT_CURRENT_MINUS_AGE)
54 AC_PROG_CC
55 AM_DISABLE_STATIC
56 AC_LIBTOOL_WIN32_DLL
57 AM_PROG_LIBTOOL
59 AC_MSG_CHECKING([for Win32])
60 case "$host" in
61   *-*-mingw*)
62     atk_native_win32=yes
63     ;;
64   *)
65     atk_native_win32=no
66     ;;
67 esac
68 AC_MSG_RESULT([$atk_native_win32])
69 AM_CONDITIONAL(OS_WIN32, test "$atk_native_win32" = "yes")
71 if test "$atk_native_win32" = "yes"; then
72   AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
74 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
76 dnl Cache $ACLOCAL_FLAGS
77 AC_CACHE_CHECK([for aclocal flags], ac_cv_atk_aclocal_flags,[
78    ac_cv_atk_aclocal_flags="$ACLOCAL_FLAGS"
80 ACLOCAL="$ACLOCAL $ac_cv_atk_aclocal_flags"
82 AC_ARG_ENABLE(rebuilds, [  --disable-rebuilds      disable all source autogeneration rules],,enable_rebuilds=yes)
84 changequote(,)dnl
85 if test "x$GCC" = "xyes"; then
86   case " $CFLAGS " in
87   *[\ \ ]-Wall[\ \      ]*) ;;
88   *) CFLAGS="$CFLAGS -Wall" ;;
89   esac
91 changequote([,])dnl
93 GLIB_PACKAGES="gobject-2.0 gmodule-2.0"
94 AC_SUBST(GLIB_PACKAGES)
96 dnl This PATH_GLIB is somewhat redundant, but does a sanity compile and 
97 dnl importantly defines the GLIB_GENMARSHAL variable for subst into the
98 dnl Makefile
99 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION)
101 PKG_CHECK_MODULES(DEP, glib-2.0 >= $GLIB_REQUIRED_VERSION $GLIB_PACKAGES, , AC_MSG_ERROR([
102         *** GLib not found. You can find it on ftp://ftp.gtk.org
103         *** Errors follow:
104             $DEP_PKG_ERRORS]))
106 # Rerun PKG_CONFIG to add gthread-2.0 cflags, but not libs
107 DEP_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES gthread-2.0`
109 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
111 gtk_doc_min_version=0.6
112 if $GTKDOC ; then
113     gtk_doc_version=`gtkdoc-mkdb --version`
114     AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
115     if perl <<EOF ; then
116         exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
117             ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
119       AC_MSG_RESULT(yes)
120    else
121       AC_MSG_RESULT(no)
122         GTKDOC=false
123    fi
126 dnl Let people disable the gtk-doc stuff.
127 AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc  Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
129 if test x$enable_gtk_doc = xauto ; then
130   if test x$GTKDOC = xtrue ; then
131     enable_gtk_doc=yes
132   else
133     enable_gtk_doc=no
134   fi
137 dnl NOTE: We need to use a separate automake conditional for this
138 dnl       to make this work with the tarballs.
139 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
141 # define a MAINT-like variable REBUILD which is set if Perl
142 # and awk are found, so autogenerated sources can be rebuilt
144 AC_PROG_AWK
145 AC_CHECK_PROGS(PERL, perl5 perl)
147 REBUILD=\#
148 if test "x$enable_rebuilds" = "xyes" && \
149         test -n "$PERL" && \
150         $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
151      test -n "$AWK" ; then
152   REBUILD=
154 AC_SUBST(REBUILD)
156 AC_OUTPUT([
157 Makefile
158 atk.pc
159 atk-uninstalled.pc
160 atk/Makefile
161 tests/Makefile
162 docs/Makefile
163 atk.spec
164 atk-zip.sh