summaryrefslogtreecommitdiff
path: root/configure.in
blob: e56508622b7726ec042140b2a96e1a71f8556730 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
AC_INIT(src/yelp-main.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(yelp, 1.0.1)

AC_PROG_INTLTOOL

AC_ARG_WITH(html-widget, [  --with-html-widget=[gtkhtml1/gtkhtml2] html widget to use])

AM_MAINTAINER_MODE
GNOME_COMMON_INIT
GNOME_COMPILE_WARNINGS(error)

AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC
AM_PROG_LIBTOOL
AM_PATH_ORBIT2
AM_PATH_GLIB_2_0
 
dnl NOTE : it appears that some systems do not like it when you use line
dnl        continuation charactes to split CFLAGS into readable chunks
if test "x$GCC" = "xyes"; then
   CFLAGS="$CFLAGS -Wall -Wno-uninitialized -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith	 -Wno-sign-compare -Wsign-promo"
fi

AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)

GETTEXT_PACKAGE=yelp
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")

ALL_LINGUAS="az bg ca da de el es et fr gl hu it ja ko lv ms nl nn no pl pt pt_BR ru sk sl sv tr uk vi wa zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT

# AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed
yelplocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(yelplocaledir)


# libgnome
LIBGNOME_SERVERDIR=`$PKG_CONFIG --variable=libgnome_serverdir libgnome-2.0`
if test x"$LIBGNOME_SERVERDIR" = x; then
   LIBGNOME_MAN2HTML="gnome2-man2html"
   LIBGNOME_INFO2HTML="gnome2-info2html"
else
   LIBGNOME_MAN2HTML="$LIBGNOME_SERVERDIR/gnome2-man2html"
   LIBGNOME_INFO2HTML="$LIBGNOME_SERVERDIR/gnome2-info2html"
fi
AC_SUBST(LIBGNOME_MAN2HTML)
AC_SUBST(LIBGNOME_INFO2HTML)

if test "x$prefix" = "xNONE"; then
  GNOMELOCALEDIR=$ac_default_prefix/share/locale
else
  GNOMELOCALEDIR=$prefix/share/locale
fi
AC_DEFINE_UNQUOTED(GNOMELOCALEDIR, "$GNOMELOCALEDIR")

PKG_CHECK_MODULES(YELP, gnome-vfs-2.0 >= 1.1		\
			libgnome-2.0 >= 1.117.2		\
			libgnomeui-2.0 >= 1.103.0	\
			libbonobo-2.0 >= 1.108.0	\
			libxslt >= 1.0.15		\
			gconf-2.0)

CFLAGS="$YELP_CFLAGS $CFLAGS"

YELP_MODULES="gnome-vfs-2.0 libgnomeui-2.0 libbonobo-2.0"

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/^ \+//'`"
AC_SUBST(YELP_IDL_INCLUDES)

dnl ====================================
dnl = Bzip2, for the help converters
dnl ====================================
AC_CHECK_LIB(bz2, bzread, [AC_DEFINE(HAVE_LIBBZ2)])
dnl <= Check for bzip2 > 1.0.0
    AC_CHECK_LIB(bz2, BZ2_bzread, [AC_DEFINE(HAVE_LIBBZ2)])
    dnl =>

if test x$with_html_widget = xgtkhtml1; then
	PKG_CHECK_MODULES(HTML_WIDGET, libgtkhtml-3.0 >= 3.0)
else
	PKG_CHECK_MODULES(HTML_WIDGET, libgtkhtml-2.0 >= 1.99.9)
fi
	
CFLAGS="$HTML_WIDGET_CFLAGS $CFLAGS"

AM_CONDITIONAL(HTML_WIDGET_GTKHTML1, test x$with_html_widget = xgtkhtml1)
if test x$with_html_widget = xgtkhtml1; then
   echo "***"
   echo "*** Using GtkHMTML 1 instead of the default GtkHTML 2"
   echo "***"
fi
	
AC_OUTPUT([
Makefile
src/Makefile
stylesheets/Makefile
stylesheets/docbook/Makefile
stylesheets/docbook/catalog
stylesheets/docbook/dtd/Makefile
data/Makefile
data/images/Makefile
po/Makefile.in
])