1 | -*- mode: m4 -*- |
---|
2 | AC_PREREQ(2.52) |
---|
3 | AC_INIT(libglade, 0.17, |
---|
4 | [http://bugzilla.gnome.org/enter_bug.cgi?product=libglade]) |
---|
5 | AC_CONFIG_SRCDIR([test-libglade.c]) |
---|
6 | AM_CONFIG_HEADER(config.h) |
---|
7 | |
---|
8 | AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) |
---|
9 | AM_MAINTAINER_MODE |
---|
10 | |
---|
11 | dnl get the GNOME macros |
---|
12 | AM_ACLOCAL_INCLUDE(macros) |
---|
13 | |
---|
14 | AC_ARG_ENABLE(debug, |
---|
15 | AC_HELP_STRING([--enable-debug], [enable debugging output]),, |
---|
16 | [enable_debug=no]) |
---|
17 | |
---|
18 | if test "x$enable_debug" != xno; then |
---|
19 | AC_DEFINE(DEBUG) |
---|
20 | fi |
---|
21 | |
---|
22 | AC_PROG_CC |
---|
23 | AC_ISC_POSIX |
---|
24 | AC_HEADER_STDC |
---|
25 | AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H)) |
---|
26 | |
---|
27 | AC_ARG_PROGRAM |
---|
28 | |
---|
29 | AM_PROG_LIBTOOL |
---|
30 | |
---|
31 | AM_PATH_GTK(1.2.0) |
---|
32 | |
---|
33 | AC_PATH_PROG(XML_CONFIG,xml-config,no) |
---|
34 | if test x$XML_CONFIG = xno; then |
---|
35 | AC_MSG_ERROR(Couldn't find xml-config) |
---|
36 | fi |
---|
37 | XML_LIBS=`xml-config --libs` |
---|
38 | XML_CFLAGS=`xml-config --cflags` |
---|
39 | AC_SUBST(XML_LIBS) |
---|
40 | AC_SUBST(XML_CFLAGS) |
---|
41 | |
---|
42 | dnl Check to make sure that we have libxml >= 1.7.2 installed |
---|
43 | old_LIBS="$LIBS" |
---|
44 | LIBS="$XML_LIBS $LIBS" |
---|
45 | AC_CHECK_FUNC(xmlSAXUserParseFile,, |
---|
46 | AC_MSG_ERROR([*** libxml >= 1.7.2 is required to compile libglade])) |
---|
47 | LIBS="$old_LIBS" |
---|
48 | |
---|
49 | |
---|
50 | have_gnome=false |
---|
51 | GNOME_INIT_HOOK([ |
---|
52 | have_gnome=true |
---|
53 | AC_DEFINE(ENABLE_GNOME) |
---|
54 | ]) |
---|
55 | AM_CONDITIONAL(GNOME_SUPPORT, $have_gnome) |
---|
56 | |
---|
57 | AC_ARG_ENABLE(bonobo, |
---|
58 | AC_HELP_STRING([--enable-bonobo], [enable bonobo support]),, |
---|
59 | [enable_bonobo=no]) |
---|
60 | have_bonobo=false |
---|
61 | if test x$enable_bonobo != xno; then |
---|
62 | AM_PATH_BONOBO(0.27, have_bonobo=true) |
---|
63 | fi |
---|
64 | AM_CONDITIONAL(BONOBO_SUPPORT, $have_bonobo) |
---|
65 | |
---|
66 | AC_ARG_ENABLE(gnomedb, |
---|
67 | AC_HELP_STRING([--enable-gnomedb], [enable gnome-db support]),, |
---|
68 | [enable_gnomedb=yes]) |
---|
69 | have_gnomedb=false |
---|
70 | if test x$enable_gnomedb != xno && test x$have_gnome != xfalse; then |
---|
71 | AC_PATH_PROG(GNOMEDB_CONFIG, gnomedb-config, no) |
---|
72 | AC_MSG_CHECKING(for gnome-db) |
---|
73 | if test x$GNOMEDB_CONFIG != xno; then |
---|
74 | have_gnomedb=true |
---|
75 | GNOMEDB_CFLAGS="`gnomedb-config --cflags`" |
---|
76 | GNOMEDB_LIBS="`gnomedb-config --libs`" |
---|
77 | AC_MSG_RESULT(found) |
---|
78 | else |
---|
79 | AC_MSG_RESULT(not found) |
---|
80 | fi |
---|
81 | fi |
---|
82 | AM_CONDITIONAL(GNOMEDB_SUPPORT, $have_gnomedb) |
---|
83 | AC_SUBST(GNOMEDB_LIBS) |
---|
84 | AC_SUBST(GNOMEDB_CFLAGS) |
---|
85 | |
---|
86 | GNOME_COMPILE_WARNINGS |
---|
87 | |
---|
88 | AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) |
---|
89 | AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC) |
---|
90 | |
---|
91 | dnl gettext stuff ... there is no message catalog for libglade -- libglade |
---|
92 | dnl provides translation for the XML files it reads in. |
---|
93 | ALL_LINGUAS="" |
---|
94 | AM_GNOME_GETTEXT |
---|
95 | |
---|
96 | AC_CONFIG_FILES([Makefile |
---|
97 | libglade.spec |
---|
98 | macros/Makefile |
---|
99 | intl/Makefile |
---|
100 | glade/Makefile |
---|
101 | doc/Makefile |
---|
102 | libglade-config |
---|
103 | libgladeConf.sh |
---|
104 | libglade.pc |
---|
105 | libglade-gnome.pc |
---|
106 | libglade-bonobo.pc |
---|
107 | libglade-gnomedb.pc]) |
---|
108 | |
---|
109 | AC_OUTPUT |
---|