1 | AC_INIT(src/yelp-main.c) |
---|
2 | AM_CONFIG_HEADER(config.h) |
---|
3 | AM_INIT_AUTOMAKE(yelp, 2.2.0) |
---|
4 | |
---|
5 | AC_PROG_INTLTOOL |
---|
6 | |
---|
7 | AC_ARG_WITH(html-widget, [ --with-html-widget=[gtkhtml1/gtkhtml2] html widget to use]) |
---|
8 | |
---|
9 | AM_MAINTAINER_MODE |
---|
10 | |
---|
11 | AC_PROG_CC |
---|
12 | AC_ISC_POSIX |
---|
13 | AC_HEADER_STDC |
---|
14 | AM_PROG_LIBTOOL |
---|
15 | AM_PATH_ORBIT2 |
---|
16 | AM_PATH_GLIB_2_0 |
---|
17 | |
---|
18 | dnl NOTE : it appears that some systems do not like it when you use line |
---|
19 | dnl continuation charactes to split CFLAGS into readable chunks |
---|
20 | if test "x$GCC" = "xyes"; then |
---|
21 | CFLAGS="$CFLAGS -Wall -Wno-uninitialized -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -Wsign-promo" |
---|
22 | fi |
---|
23 | |
---|
24 | AC_SUBST(CFLAGS) |
---|
25 | AC_SUBST(LDFLAGS) |
---|
26 | |
---|
27 | GETTEXT_PACKAGE=yelp |
---|
28 | AC_SUBST(GETTEXT_PACKAGE) |
---|
29 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE") |
---|
30 | |
---|
31 | ALL_LINGUAS="am ar az be bg ca cs da de el es et fi fr gl he hi hu it ja ko lv mk ms nl nn no pl pt pt_BR ro ru sk sl sq sv ta tr uk vi wa zh_CN zh_TW" |
---|
32 | AM_GLIB_GNU_GETTEXT |
---|
33 | |
---|
34 | # AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME |
---|
35 | # this is the directory where the *.{mo,gmo} files are installed |
---|
36 | yelplocaledir='${prefix}/${DATADIRNAME}/locale' |
---|
37 | AC_SUBST(yelplocaledir) |
---|
38 | |
---|
39 | |
---|
40 | # libgnome |
---|
41 | LIBGNOME_SERVERDIR=`$PKG_CONFIG --variable=libgnome_serverdir libgnome-2.0` |
---|
42 | if test x"$LIBGNOME_SERVERDIR" = x; then |
---|
43 | LIBGNOME_MAN2HTML="gnome2-man2html" |
---|
44 | LIBGNOME_INFO2HTML="gnome2-info2html" |
---|
45 | else |
---|
46 | LIBGNOME_MAN2HTML="$LIBGNOME_SERVERDIR/gnome2-man2html" |
---|
47 | LIBGNOME_INFO2HTML="$LIBGNOME_SERVERDIR/gnome2-info2html" |
---|
48 | fi |
---|
49 | AC_SUBST(LIBGNOME_MAN2HTML) |
---|
50 | AC_SUBST(LIBGNOME_INFO2HTML) |
---|
51 | |
---|
52 | if test "x$prefix" = "xNONE"; then |
---|
53 | GNOMELOCALEDIR=$ac_default_prefix/share/locale |
---|
54 | else |
---|
55 | GNOMELOCALEDIR=$prefix/share/locale |
---|
56 | fi |
---|
57 | AC_DEFINE_UNQUOTED(GNOMELOCALEDIR, "$GNOMELOCALEDIR") |
---|
58 | |
---|
59 | PKG_CHECK_MODULES(DB2HTML, |
---|
60 | [ |
---|
61 | glib-2.0 >= 2.0.6 |
---|
62 | libxslt >= 1.0.15 |
---|
63 | ]) |
---|
64 | |
---|
65 | PKG_CHECK_MODULES(YELP, |
---|
66 | [ |
---|
67 | gnome-vfs-2.0 >= 1.1 |
---|
68 | libgnome-2.0 >= 2.0.2 |
---|
69 | libgnomeui-2.0 >= 1.103.0 |
---|
70 | libbonobo-2.0 >= 1.108.0 |
---|
71 | libxslt >= 1.0.15 |
---|
72 | libglade-2.0 >= 2.0.0 |
---|
73 | gconf-2.0 |
---|
74 | ]) |
---|
75 | |
---|
76 | CFLAGS="$YELP_CFLAGS $CFLAGS" |
---|
77 | |
---|
78 | YELP_MODULES="gnome-vfs-2.0 libgnomeui-2.0 libbonobo-2.0" |
---|
79 | |
---|
80 | YELP_IDL_INCLUDES="`$PKG_CONFIG --variable=idldir gnome-vfs-2.0 libgnomeui-2.0 libbonobo-2.0 bonobo-activation-2.0| sed -e 's/^/ /' -e 's/ \+$//' -e 's/ \+/ -I /g' -e 's/^ \+//'`" |
---|
81 | AC_SUBST(YELP_IDL_INCLUDES) |
---|
82 | |
---|
83 | dnl ==================================== |
---|
84 | dnl = Bzip2, for the help converters |
---|
85 | dnl ==================================== |
---|
86 | AC_CHECK_LIB(bz2, bzread, [AC_DEFINE(HAVE_LIBBZ2)]) |
---|
87 | dnl <= Check for bzip2 > 1.0.0 |
---|
88 | AC_CHECK_LIB(bz2, BZ2_bzread, [AC_DEFINE(HAVE_LIBBZ2)]) |
---|
89 | dnl => |
---|
90 | |
---|
91 | dnl =================================================== |
---|
92 | dnl = Check for popt, reported to be needed on AIX |
---|
93 | dnl =================================================== |
---|
94 | AC_CHECK_LIB(popt, poptGetArgs, [POPT_LIBS="-lpopt"], |
---|
95 | [AC_MSG_ERROR([popt is required to build yelp])]) |
---|
96 | |
---|
97 | AC_SUBST(POPT_LIBS) |
---|
98 | |
---|
99 | if test x$with_html_widget = xgtkhtml1; then |
---|
100 | PKG_CHECK_MODULES(HTML_WIDGET, libgtkhtml-3.0 >= 3.0) |
---|
101 | else |
---|
102 | PKG_CHECK_MODULES(HTML_WIDGET, libgtkhtml-2.0 >= 2.1.2) |
---|
103 | fi |
---|
104 | |
---|
105 | CFLAGS="$HTML_WIDGET_CFLAGS $CFLAGS" |
---|
106 | |
---|
107 | AM_CONDITIONAL(HTML_WIDGET_GTKHTML1, test x$with_html_widget = xgtkhtml1) |
---|
108 | if test x$with_html_widget = xgtkhtml1; then |
---|
109 | echo "***" |
---|
110 | echo "*** Using GtkHMTML 1 instead of the default GtkHTML 2" |
---|
111 | echo "***" |
---|
112 | fi |
---|
113 | |
---|
114 | AC_OUTPUT([ |
---|
115 | Makefile |
---|
116 | src/Makefile |
---|
117 | stylesheets/Makefile |
---|
118 | stylesheets/docbook/Makefile |
---|
119 | stylesheets/docbook/catalog |
---|
120 | stylesheets/docbook/dtd/Makefile |
---|
121 | data/Makefile |
---|
122 | data/images/Makefile |
---|
123 | data/ui/Makefile |
---|
124 | po/Makefile.in |
---|
125 | ]) |
---|