1 | -*- mode: autoconf -*- |
---|
2 | AC_PREREQ(2.52) |
---|
3 | AC_INIT(libglade, 2.0.1, |
---|
4 | [http://bugzilla.gnome.org/enter_bug.cgi?product=libglade]) |
---|
5 | |
---|
6 | AC_CONFIG_SRCDIR([test-libglade.c]) |
---|
7 | AM_CONFIG_HEADER(config.h) |
---|
8 | |
---|
9 | AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) |
---|
10 | |
---|
11 | AC_ARG_ENABLE(debug, |
---|
12 | AC_HELP_STRING([--enable-debug], [check LIBGLADE_DEBUG env var]),, |
---|
13 | [enable_debug=yes]) |
---|
14 | |
---|
15 | AC_MSG_CHECKING([if debuging support was requested]) |
---|
16 | if test "x$enable_debug" != xno; then |
---|
17 | AC_DEFINE(DEBUG,, [enable use of LIBGLADE_DEBUG environment variable]) |
---|
18 | AC_MSG_RESULT(yes) |
---|
19 | else |
---|
20 | AC_MSG_RESULT(no) |
---|
21 | fi |
---|
22 | |
---|
23 | AC_PROG_CC |
---|
24 | AC_ISC_POSIX |
---|
25 | AC_HEADER_STDC |
---|
26 | |
---|
27 | AM_PROG_LIBTOOL |
---|
28 | |
---|
29 | AM_PATH_GTK_2_0(2.0.0) |
---|
30 | |
---|
31 | save_LIBS=$LIBS |
---|
32 | LIBS="$GTK_LIBS $LIBS" |
---|
33 | AC_CHECK_FUNC(gtk_plug_get_type, |
---|
34 | AC_DEFINE(HAVE_GTK_PLUG,1,[gtk has GtkPlug/GtkSocket implementation])) |
---|
35 | LIBS=$save_LIBS |
---|
36 | |
---|
37 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
---|
38 | |
---|
39 | PKG_CHECK_MODULES(LIBGLADE, libxml-2.0 >= 2.4.10 atk >= 1.0.0 gtk+-2.0 >= 2.0.0) |
---|
40 | AC_SUBST(LIBGLADE_LIBS) |
---|
41 | AC_SUBST(LIBGLADE_CFLAGS) |
---|
42 | |
---|
43 | dnl should gtk-doc stuff be rebuilt? |
---|
44 | AC_ARG_ENABLE(gtk-doc, |
---|
45 | AC_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation]), |
---|
46 | enable_gtk_doc="$enableval", enable_gtk_doc=no) |
---|
47 | |
---|
48 | AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) |
---|
49 | if test x$enable_gtk_doc = xyes; then |
---|
50 | if test x$GTKDOC != xtrue; then |
---|
51 | enable_gtk_doc=no |
---|
52 | fi |
---|
53 | fi |
---|
54 | AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) |
---|
55 | |
---|
56 | dnl gettext stuff ... there is no message catalog for libglade -- libglade |
---|
57 | dnl provides translation for the XML files it reads in. |
---|
58 | GETTEXT_PACKAGE=libglade-2.0 |
---|
59 | AC_SUBST(GETTEXT_PACKAGE) |
---|
60 | |
---|
61 | ALL_LINGUAS="" |
---|
62 | AM_GLIB_GNU_GETTEXT |
---|
63 | |
---|
64 | dnl stuff to go in the config.h file |
---|
65 | AH_TOP( |
---|
66 | [#ifndef GLADE_CONFIG_H |
---|
67 | #define GLADE_CONFIG_H]) |
---|
68 | AH_BOTTOM( |
---|
69 | [#endif /* GLADE_CONFIG_H */]) |
---|
70 | |
---|
71 | dnl check for a copy of python >= 2.0 with the xml.parsers.expat module. |
---|
72 | AC_MSG_CHECKING([for Python >= 2.0 with expat support]) |
---|
73 | JH_PYTHON_CHECK( |
---|
74 | (2,0,0), |
---|
75 | [try: |
---|
76 | import xml.parsers.expat |
---|
77 | except ImportError: |
---|
78 | sys.exit(1)], |
---|
79 | [AC_MSG_RESULT([$PYTHON]) |
---|
80 | have_python=true], |
---|
81 | [AC_MSG_RESULT([not found.]) |
---|
82 | have_python=false]) |
---|
83 | |
---|
84 | AM_CONDITIONAL(HAVE_PYTHON, $have_python) |
---|
85 | AC_SUBST(PYTHON) |
---|
86 | |
---|
87 | dnl add debugging options ... |
---|
88 | changequote(,)dnl |
---|
89 | if test "x$GCC" = xyes; then |
---|
90 | case " $CFLAGS " in |
---|
91 | *[\ \ ]-Wall[\ \ ]*) ;; |
---|
92 | *) CFLAGS="$CFLAGS -Wall" ;; |
---|
93 | esac |
---|
94 | |
---|
95 | case " $CFLAGS " in |
---|
96 | *[\ \ ]-std=c9x[\ \ ]*) ;; |
---|
97 | *) CFLAGS="$CFLAGS -std=c9x" ;; |
---|
98 | esac |
---|
99 | fi |
---|
100 | changequote([,])dnl |
---|
101 | |
---|
102 | dnl hack to get aclocal to use the ACLOCAL_FLAGS env var |
---|
103 | ACLOCAL_AMFLAGS=\${ACLOCAL_FLAGS} |
---|
104 | AC_SUBST(ACLOCAL_AMFLAGS) |
---|
105 | |
---|
106 | AC_OUTPUT([ |
---|
107 | Makefile |
---|
108 | libglade.spec |
---|
109 | glade/Makefile |
---|
110 | doc/Makefile |
---|
111 | tests/Makefile |
---|
112 | libglade-2.0.pc |
---|
113 | libglade-convert |
---|
114 | ]) |
---|
115 | |
---|
116 | rm -f po/po2tbl.sed |
---|
117 | |
---|
118 | echo |
---|
119 | echo "This is the development branch of libglade" |
---|
120 | echo "If you want something that works with gtk+ 1.2, checkout the" |
---|
121 | echo "libglade-1-0 branch with the following command" |
---|
122 | echo " cvs update -r libglade-1-0 ." |
---|
123 | echo |
---|
124 | |
---|
125 | if test -z "$jh_cv_path_python"; then |
---|
126 | echo "*****************************************************" |
---|
127 | echo " A usable version of python was not found, so the" |
---|
128 | echo " libglade-convert program was not installed. This" |
---|
129 | echo " script requires Python >= 2.0 with expat support." |
---|
130 | echo |
---|
131 | echo " Some packages require libglade-convert to build" |
---|
132 | echo " correctly. If you wish to build one of these" |
---|
133 | echo " packages, you must install expat and python," |
---|
134 | echo " and then rebuild libglade." |
---|
135 | echo "*****************************************************" |
---|
136 | echo |
---|
137 | fi |
---|