summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@codefactory.se>2003-07-08 12:05:50 +0000
committerAnders Carlsson <andersca@src.gnome.org>2003-07-08 12:05:50 +0000
commit7e168d61b79a8d1b4a6702dfe2721bedb1e06013 (patch)
tree37d879abc388fce8cec81891a535fa691dcbd8f9
parent2898dfec075c9c67c1bcc06253172687b7ba831b (diff)
downloadyelp-7e168d61b79a8d1b4a6702dfe2721bedb1e06013.tar.gz
Move help readers over from libgnome.
2003-07-08 Anders Carlsson <andersca@codefactory.se> * configure.in: * src/Makefile.am: * src/info2html/Makefile.am: * src/man2html/Makefile.am: * src/yelp-reader.c: (reader_convert_start): Move help readers over from libgnome.
-rw-r--r--ChangeLog9
-rw-r--r--configure.in59
-rw-r--r--src/Makefile.am2
-rw-r--r--src/info2html/Makefile.am8
-rw-r--r--src/man2html/Makefile.am15
-rw-r--r--src/yelp-reader.c12
6 files changed, 69 insertions, 36 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d122c30..a3e100e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-07-08 Anders Carlsson <andersca@codefactory.se>
+
+ * configure.in:
+ * src/Makefile.am:
+ * src/info2html/Makefile.am:
+ * src/man2html/Makefile.am:
+ * src/yelp-reader.c: (reader_convert_start):
+ Move help readers over from libgnome.
+
2003-07-02 Jordi Mallach <jordi@sindominio.net>
* yelp.desktop.in: Add StartupNotify support.
diff --git a/configure.in b/configure.in
index 7e646c0b..f603c4ca 100644
--- a/configure.in
+++ b/configure.in
@@ -35,18 +35,6 @@ 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
@@ -79,13 +67,12 @@ 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 =>
+dnl Check for whereis
+AC_CANONICAL_HOST
+ case $host in
+ *-linux-gnu | *-irix6*) AC_DEFINE(HAVE_MAN_WHEREIS, 1, [man(1) understands -w option]);;
+ *-solaris*) AC_DEFINE(HAVE_MAN_DEBUG, 1, [man(1) has a -d debug option]);;
+ esac
dnl ===================================================
dnl = Check for popt, reported to be needed on AIX
@@ -95,9 +82,43 @@ AC_CHECK_LIB(popt, poptGetArgs, [POPT_LIBS="-lpopt"],
AC_SUBST(POPT_LIBS)
+
+dnl ====================================
+dnl = zlib for help converters
+dnl ====================================
+AC_CHECK_LIB(z, gzopen, [Z_LIBS=-lz
+AC_SUBST(Z_LIBS)], AC_MSG_ERROR([*** zlib is required]))
+
+dnl ====================================
+dnl = Bzip2, for the help converters
+dnl ====================================
+BZ_LIBS=
+AC_CHECK_LIB(bz2, bzread, [AC_DEFINE(HAVE_LIBBZ2, 1, [Compile with libbz2 suppot])
+ BZ_LIBS="-lbz2"])
+dnl <= Check for bzip2 > 1.0.0
+ AC_CHECK_LIB(bz2, BZ2_bzread, [AC_DEFINE(HAVE_LIBBZ2, 1, [Compile with libbz2 support])
+ BZ_LIBS="-lbz2"
+ dnl <= define the wrapper-functions to get the Bzip2 stuff working .. =>
+ AC_DEFINE(bzread,BZ2_bzread, [Needed to get Bzip2 working])
+ AC_DEFINE(bzopen,BZ2_bzopen, [Needed to get Bzip2 working])
+ AC_DEFINE(bzdopen,BZ2_bzdopen, [Needed to get Bzip2 working])
+ AC_DEFINE(bzwrite,BZ2_bzwrite, [Needed to get Bzip2 working])
+ AC_DEFINE(bzerror,BZ2_bzerror, [Needed to get Bzip2 working])
+ AC_DEFINE(bzclose,BZ2_bzclose, [Needed to get Bzip2 working])
+ AC_DEFINE(bzflush,BZ2_bzflush, [Needed to get Bzip2 working])
+ AC_DEFINE(bzCompress,BZ2_bzCompress, [Needed to get Bzip2 working])
+ AC_DEFINE(bzCompressInit,BZ2_bzCompressInit, [Needed to get Bzip2 working])
+ AC_DEFINE(bzDecompress,BZ2_bzDecompress, [Needed to get Bzip2 working])
+ AC_DEFINE(bzDecompressInit,BZ2_bzDecompressInit, [Needed to get Bzip2 working])
+ ])
+ dnl =>
+AC_SUBST(BZ_LIBS)
+
AC_OUTPUT([
Makefile
src/Makefile
+src/man2html/Makefile
+src/info2html/Makefile
stylesheets/Makefile
stylesheets/docbook/Makefile
stylesheets/docbook/catalog
diff --git a/src/Makefile.am b/src/Makefile.am
index 013b1b9d..614c73c6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,5 @@
+SUBDIRS = man2html info2html
+
INCLUDES = \
-I$(top_srcdir) \
@YELP_CFLAGS@ \
diff --git a/src/info2html/Makefile.am b/src/info2html/Makefile.am
index 938eb40a..090bd889 100644
--- a/src/info2html/Makefile.am
+++ b/src/info2html/Makefile.am
@@ -1,9 +1,9 @@
## Process this file with automake to produce Makefile.in.
-INCLUDES = $(LIBGNOME_CFLAGS)
+INCLUDES = @YELP_CFLAGS@
-libexec_PROGRAMS = gnome2-info2html
+libexec_PROGRAMS = yelp-info2html
-gnome2_info2html_SOURCES = main.c parse.c utils.c html.c data.h html.h parse.h utils.h version.h
+yelp_info2html_SOURCES = main.c parse.c utils.c html.c data.h html.h parse.h utils.h version.h
-gnome2_info2html_LDADD = $(LIBGNOME_LIBS) $(Z_LIBS) $(BZ_LIBS)
+yelp_info2html_LDADD = @YELP_LIBS@ $(Z_LIBS) $(BZ_LIBS)
diff --git a/src/man2html/Makefile.am b/src/man2html/Makefile.am
index 435dab3f..f3d08b11 100644
--- a/src/man2html/Makefile.am
+++ b/src/man2html/Makefile.am
@@ -1,15 +1,16 @@
## Process this file with automake to produce Makefile.in.
-INCLUDES = $(LIBGNOME_CFLAGS) \
- -I$(top_srcdir)
+INCLUDES = \
+ -I$(top_srcdir) \
+ @YELP_CFLAGS@
-libexec_PROGRAMS = gnome2-man2html
-gnome2_man2html_SOURCES = gnome-man2html.c
+libexec_PROGRAMS = yelp-man2html
-gnome2_man2html_LDADD = \
- $(top_builddir)/libgnome/libgnome-2.la \
- $(LIBGNOME_LIBS) $(Z_LIBS) $(BZ_LIBS)
+yelp_man2html_SOURCES = yelp-man2html.c
+
+yelp_man2html_LDADD = \
+ @YELP_LIBS@ $(Z_LIBS) $(BZ_LIBS)
#CFLAGS += -Wall
diff --git a/src/yelp-reader.c b/src/yelp-reader.c
index 8ee228bc..b018fd7b 100644
--- a/src/yelp-reader.c
+++ b/src/yelp-reader.c
@@ -240,21 +240,21 @@ reader_convert_start (ReaderThreadData *th_data)
switch (yelp_uri_get_type (uri)) {
case YELP_URI_TYPE_MAN:
- command_line = g_strdup_printf ("%s %s",
- LIBGNOME_MAN2HTML,
+ command_line = g_strdup_printf ("%s/yelp-man2html %s",
+ SERVERDIR,
yelp_uri_get_path (uri));
break;
case YELP_URI_TYPE_INFO:
if (yelp_uri_get_section (uri)) {
command_line =
- g_strdup_printf ("%s %s?%s",
- LIBGNOME_INFO2HTML,
+ g_strdup_printf ("%s/yelp-info2html %s?%s",
+ SERVERDIR,
yelp_uri_get_path (uri),
yelp_uri_get_section (uri));
} else {
command_line =
- g_strdup_printf ("%s %s",
- LIBGNOME_INFO2HTML,
+ g_strdup_printf ("%s/yelp-info2html %s",
+ SERVERDIR,
yelp_uri_get_path (uri));
}