devhelp r1067 - in trunk: . src
- From: rhult svn gnome org
- To: svn-commits-list gnome org
- Subject: devhelp r1067 - in trunk: . src
- Date: Wed, 1 Oct 2008 19:52:32 +0000 (UTC)
Author: rhult
Date: Wed Oct 1 19:52:32 2008
New Revision: 1067
URL: http://svn.gnome.org/viewvc/devhelp?rev=1067&view=rev
Log:
2008-10-01 Richard Hult <richard imendio com>
* configure.in:
* src/Makefile.am:
* src/dh-book-tree.c: (book_tree_create_pixbufs):
* src/dh-main.c: (main):
* src/dh-parser.c: (parser_read_gz_file):
* src/dh-preferences.c: (dh_preferences_show_dialog):
* src/dh-window.c: Modernize the build setup, and make zlib an
unconditional dependency.
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/src/Makefile.am
trunk/src/dh-book-tree.c
trunk/src/dh-main.c
trunk/src/dh-parser.c
trunk/src/dh-preferences.c
trunk/src/dh-window.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Wed Oct 1 19:52:32 2008
@@ -1,24 +1,18 @@
+AC_PREREQ(2.60)
AC_INIT([Devhelp],[0.21],[http://bugzilla.gnome.org/enter_bug.cgi?product=devhelp],[devhelp])
-
-AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip])
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_SRCDIR([src/dh-window.c])
-AM_SANITY_CHECK
-AM_MAINTAINER_MODE
+AC_CONFIG_HEADERS(config.h)
+AM_INIT_AUTOMAKE([1.9 no-define -Wall])
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
AC_PROG_CC
+AC_PROG_CPP
AM_PROG_CC_C_O
-AC_ISC_POSIX
-AC_HEADER_STDC
-
-AM_DISABLE_STATIC
-F77=no
-AM_PROG_LIBTOOL
AM_PATH_GLIB_2_0
-IT_PROG_INTLTOOL([0.35.5])
+IT_PROG_INTLTOOL([0.40.0])
AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2
@@ -50,64 +44,41 @@
AC_SUBST(REQUIRES_LIBWNCK)
PKG_CHECK_MODULES(DEVHELP, [
- gtk+-2.0 >= 2.8.0
- $gconf_pkgconfig
+ gtk+-2.0 >= 2.8.0
+ $gconf_pkgconfig
])
PKG_CHECK_MODULES(LIBDEVHELP, [
- gthread-2.0 >= 2.8.0
- gtk+-2.0 >= 2.8.0
- libglade-2.0 >= 2.4.0
- $gconf_pkgconfig
- $libwnck_pkgconfig
- $igemacintegration_pkgconfig
+ gthread-2.0 >= 2.8.0
+ gtk+-2.0 >= 2.8.0
+ libglade-2.0 >= 2.4.0
+ $gconf_pkgconfig
+ $libwnck_pkgconfig
+ $igemacintegration_pkgconfig
+ webkit-1.0
])
-PKG_CHECK_MODULES([WEBKIT], [webkit-1.0])
-
-dnl Checks for zlib library.
-AC_LANG_PUSH([C])
-_SAVE_CPPFLAGS="$CPPFLAGS"
-_SAVE_LDFLAGS="$LDFLAGS"
-
-AC_ARG_WITH(zlib,
-[ --with-zlib[=DIR] use libz in DIR],[
- if test "$withval" != "no" -a "$withval" != "yes"; then
- Z_DIR=$withval
- CPPFLAGS="$CPPFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib"
- fi
-])
-if test "$with_zlib" = "no"; then
- echo "Disabling compression support"
-else
- AC_CHECK_HEADERS(zlib.h,
- AC_CHECK_LIB(z, gzread,[
- AC_DEFINE(HAVE_LIBZ,1,[zlib is available])
- if test "x${Z_DIR}" != "x"; then
- Z_CFLAGS="-I${Z_DIR}/include"
- Z_LIBS="-L${Z_DIR}/lib -lz"
- [case ${host} in
- *-*-solaris*)
- Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
- ;;
- esac]
- else
- Z_LIBS="-lz"
- fi]))
+AC_ARG_WITH(zlib, [ --with-zlib=DIR use zlib in DIR], zlibdir=$with_zlib)
+have_zlib=no
+if test "x$zlibdir" != x; then
+ ZLIB_CPPFLAGS=-I$zlibdir/include
+ ZLIB_LDFLAGS=-L$zlibdir/lib
fi
-
-AC_SUBST(Z_CFLAGS)
-AC_SUBST(Z_LIBS)
-
-CPPFLAGS="$_SAVE_CPPFLAGS"
-LDFLAGS="$_SAVE_LDFLAGS"
-AC_LANG_POP([C])
+save_CPPFLAGS="$CPPFLAGS"
+save_LDFLAGS="$LDFLAGS"
+CPPFLAGS="$CPPFLAGS $ZLIB_CPPFLAGS"
+LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
+AC_CHECK_HEADERS(zlib.h, AC_CHECK_LIB(z, gzread, have_zlib=yes))
+CPPFLAGS="$save_CPPFLAGS"
+LDFLAGS="$save_LDFLAGS"
+ZLIB_LIBS=-lz
+AC_SUBST(ZLIB_CFLAGS)
+AC_SUBST(ZLIB_LDFLAGS)
+AC_SUBST(ZLIB_LIBS)
GETTEXT_PACKAGE=devhelp
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Package name for gettext])
-
AM_GLIB_GNU_GETTEXT
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Wed Oct 1 19:52:32 2008
@@ -1,10 +1,7 @@
-DEFINES = \
+AM_CPPFLAGS = \
-DLOCALEDIR=\""$(datadir)/locale"\" \
-DPREFIX="\"$(prefix)"\" \
- -DSYSCONFDIR=\""$(sysconfdir)"\" \
-DDATADIR=\""$(datadir)"\" \
- -DLIBDIR=\""$(libdir)"\" \
- -DSHAREDIR=\""$(pkgdatadir)"\" \
-DG_LOG_DOMAIN=\"Devhelp\"
bin_PROGRAMS = devhelp
@@ -13,20 +10,16 @@
dh-main.c
devhelp_CPPFLAGS = \
- $(DEFINES) \
$(AM_CPPFLAGS)
devhelp_CFLAGS = \
$(WARN_CFLAGS) \
- $(DEVHELP_CFLAGS) \
- $(AM_CFLAGS)
+ $(DEVHELP_CFLAGS)
devhelp_LDADD = \
$(DEVHELP_LIBS) \
libdevhelp-1.la
-devhelp_LDFLAGS = $(AM_LDFLAGS)
-
lib_LTLIBRARIES = libdevhelp-1.la
devhelpincludedir = $(includedir)/devhelp-1.0/devhelp
@@ -40,8 +33,7 @@
dh-parser.h \
dh-preferences.h \
dh-util.h \
- dh-window.h \
- eggfindbar.h
+ dh-window.h
libdevhelp_1_la_SOURCES = \
bacon-message-connection.c \
@@ -57,24 +49,23 @@
dh-preferences.c \
dh-util.c \
dh-window.c \
- eggfindbar.c
+ eggfindbar.c \
+ eggfindbar.h
libdevhelp_1_la_CPPFLAGS = \
- $(DEFINES) \
- $(AM_CPPFLAGS)
+ $(AM_CPPFLAGS) \
+ $(ZLIB_CPPFLAGS)
libdevhelp_1_la_CFLAGS = \
$(WARN_CFLAGS) \
- $(LIBDEVHELP_CFLAGS) \
- $(WEBKIT_CFLAGS) \
- $(AM_CFLAGS)
+ $(LIBDEVHELP_CFLAGS)
libdevhelp_1_la_LIBADD = \
$(LIBDEVHELP_LIBS) \
- $(WEBKIT_LIBS) \
- $(WEBKIT_EXTRA_LIBS)
+ $(ZLIB_LIBS)
-libdevhelp_1_la_LDFLAGS = $(AM_LDFLAGS)
+libdevhelp_1_la_LDFLAGS = \
+ $(ZLIB_LDFLAGS)
dh-marshal.h: dh-marshal.list
(cd $(srcdir) && \
@@ -95,7 +86,8 @@
dh-marshal.c
EXTRA_DIST = \
- dh-marshal.list \
- $(devhelpinclude_HEADERS)
+ dh-marshal.list
+
+# $(devhelpinclude_HEADERS)
CLEANFILES = $(BUILT_SOURCES)
Modified: trunk/src/dh-book-tree.c
==============================================================================
--- trunk/src/dh-book-tree.c (original)
+++ trunk/src/dh-book-tree.c Wed Oct 1 19:52:32 2008
@@ -298,9 +298,9 @@
pixbufs = g_new0 (DhBookTreePixbufs, 1);
- pixbufs->pixbuf_closed = gdk_pixbuf_new_from_file (SHAREDIR "/images/book_closed.png", NULL);
- pixbufs->pixbuf_opened = gdk_pixbuf_new_from_file (SHAREDIR "/images/book_open.png", NULL);
- pixbufs->pixbuf_helpdoc = gdk_pixbuf_new_from_file (SHAREDIR "/images/helpdoc.png", NULL);
+ pixbufs->pixbuf_closed = gdk_pixbuf_new_from_file (DATADIR "/images/book_closed.png", NULL);
+ pixbufs->pixbuf_opened = gdk_pixbuf_new_from_file (DATADIR "/images/book_open.png", NULL);
+ pixbufs->pixbuf_helpdoc = gdk_pixbuf_new_from_file (DATADIR "/images/helpdoc.png", NULL);
tree->priv->pixbufs = pixbufs;
}
Modified: trunk/src/dh-main.c
==============================================================================
--- trunk/src/dh-main.c (original)
+++ trunk/src/dh-main.c Wed Oct 1 19:52:32 2008
@@ -59,8 +59,7 @@
gtk_window_present (GTK_WINDOW (window));
}
- if (strncmp (message, COMMAND_SEARCH, strlen (COMMAND_SEARCH)) == 0) {
-
+ if (g_str_has_prefix (message, COMMAND_SEARCH)) {
dh_window_search (DH_WINDOW (window),
message + strlen (COMMAND_SEARCH) + 1);
}
@@ -134,7 +133,7 @@
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (PACKAGE);
+ textdomain (GETTEXT_PACKAGE);
g_thread_init (NULL);
Modified: trunk/src/dh-parser.c
==============================================================================
--- trunk/src/dh-parser.c (original)
+++ trunk/src/dh-parser.c Wed Oct 1 19:52:32 2008
@@ -23,11 +23,8 @@
#include <config.h>
#include <string.h>
#include <errno.h>
-#include <glib/gi18n.h>
-
-#ifdef HAVE_LIBZ
#include <zlib.h>
-#endif
+#include <glib/gi18n.h>
#include "dh-error.h"
#include "dh-link.h"
@@ -547,7 +544,6 @@
GList **keywords,
GError **error)
{
-#ifdef HAVE_LIBZ
DhParser *parser;
gchar buf[BYTES_PER_READ];
gzFile file;
@@ -641,13 +637,6 @@
g_free (parser);
return TRUE;
-#else
- g_set_error (error,
- DH_ERROR,
- DH_ERROR_INTERNAL_ERROR,
- _("Devhelp is not built with zlib support"));
- return FALSE;
-#endif
}
Modified: trunk/src/dh-preferences.c
==============================================================================
--- trunk/src/dh-preferences.c (original)
+++ trunk/src/dh-preferences.c Wed Oct 1 19:52:32 2008
@@ -425,7 +425,7 @@
return;
}
- gui = dh_glade_get_file (SHAREDIR "/devhelp.glade",
+ gui = dh_glade_get_file (DATADIR "/devhelp.glade",
"preferences_dialog",
NULL,
"preferences_dialog", &prefs->dialog,
Modified: trunk/src/dh-window.c
==============================================================================
--- trunk/src/dh-window.c (original)
+++ trunk/src/dh-window.c Wed Oct 1 19:52:32 2008
@@ -834,7 +834,7 @@
gtk_show_about_dialog (GTK_WINDOW (window),
"name",_("Devhelp"),
- "version", VERSION,
+ "version", PACKAGE_VERSION,
"comments", _("A developer's help browser for GNOME 2"),
"authors", authors,
"documenters", documenters,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]