Added gtkhtml dependency

master
Yevgen Muntyan 2006-04-06 12:10:21 -05:00
parent 73b3669148
commit 401cf06fb6
7 changed files with 83 additions and 12 deletions

View File

@ -6,6 +6,7 @@ EXTRA_DIST = \
moo-flags.m4 \ moo-flags.m4 \
moo-funcs.m4 \ moo-funcs.m4 \
moo-gtk.m4 \ moo-gtk.m4 \
moo-gtkhtml.m4 \
moo-os.m4 \ moo-os.m4 \
moo-pcre.m4 \ moo-pcre.m4 \
moo-pygtk.m4 \ moo-pygtk.m4 \

View File

@ -5,6 +5,7 @@ AC_DEFUN([MOO_AC_FLAGS],[
AC_REQUIRE([MOO_AC_FAM]) AC_REQUIRE([MOO_AC_FAM])
AC_REQUIRE([MOO_PKG_CHECK_GTK_VERSIONS]) AC_REQUIRE([MOO_PKG_CHECK_GTK_VERSIONS])
AC_REQUIRE([MOO_AC_SET_DIRS]) AC_REQUIRE([MOO_AC_SET_DIRS])
AC_REQUIRE([MOO_AC_GTKHTML])
moo_top_src_dir=`cd $srcdir && pwd` moo_top_src_dir=`cd $srcdir && pwd`
moo_top_build_dir=`cd ./$ac_top_builddir && pwd` moo_top_build_dir=`cd ./$ac_top_builddir && pwd`
@ -17,6 +18,11 @@ AC_DEFUN([MOO_AC_FLAGS],[
MOO_CFLAGS="$MOO_CFLAGS -DMOO_DATA_DIR=\\\"${MOO_DATA_DIR}\\\" -DMOO_LIB_DIR=\\\"${MOO_LIB_DIR}\\\"" MOO_CFLAGS="$MOO_CFLAGS -DMOO_DATA_DIR=\\\"${MOO_DATA_DIR}\\\" -DMOO_LIB_DIR=\\\"${MOO_LIB_DIR}\\\""
if test x$MOO_USE_GTKHTML = xyes; then
MOO_CFLAGS="$MOO_CFLAGS $GTKHTML_CFLAGS"
MOO_LIBS="$MOO_LIBS $GTKHTML_LIBS"
fi
################################################################################ ################################################################################
# MooEdit stuff # MooEdit stuff
# #

33
m4/moo-gtkhtml.m4 Normal file
View File

@ -0,0 +1,33 @@
##############################################################################
# MOO_AC_GTKHTML()
#
AC_DEFUN([MOO_AC_GTKHTML],[
MOO_USE_GTKHTML=auto
AC_ARG_WITH([gtkhtml],
AC_HELP_STRING([--with-gtkhtml], [whether to use gtkhtml (default = AUTO)]),[
if test x$with_gtkhtml = "xyes"; then
MOO_USE_GTKHTML="yes"
else
MOO_USE_GTKHTML="no"
fi
])
if test x$MOO_USE_GTKHTML != xno; then
PKG_CHECK_MODULES(GTKHTML, [libgtkhtml-2.0], [
MOO_USE_GTKHTML=yes
MOO_GTKHTML_PACKAGE=libgtkhtml-2.0
AC_DEFINE(MOO_USE_GTKHTML, 1, [use libgtkhtml-2.0])
],[
if test x$MOO_USE_GTKHTML = xyes; then
AC_MSG_ERROR([libgtkhtml-2 not found.])
else
MOO_USE_GTKHTML=no
fi
])
fi
AC_SUBST(MOO_USE_GTKHTML)
AC_SUBST(MOO_GTKHTML_PACKAGE)
AM_CONDITIONAL(MOO_USE_GTKHTML, test x$MOO_USE_GTKHTML = "xyes")
])

View File

@ -286,16 +286,16 @@
</kdevdoctreeview> </kdevdoctreeview>
<kdevfilecreate> <kdevfilecreate>
<filetypes> <filetypes>
<type icon="source" ext="g" create="template" name="GAP source" > <type icon="source" ext="g" name="GAP source" create="template" >
<descr>A new empty GAP source file</descr> <descr>A new empty GAP source file</descr>
</type> </type>
<type icon="source_cpp" ext="cpp" create="template" name="C++ Source" > <type icon="source_cpp" ext="cpp" name="C++ Source" create="template" >
<descr>A new empty C++ file.</descr> <descr>A new empty C++ file.</descr>
</type> </type>
<type icon="source_h" ext="h" create="template" name="C/C++ Header" > <type icon="source_h" ext="h" name="C/C++ Header" create="template" >
<descr>A new empty header file for C/C++.</descr> <descr>A new empty header file for C/C++.</descr>
</type> </type>
<type icon="source_c" ext="c" create="template" name="C Source" > <type icon="source_c" ext="c" name="C Source" create="template" >
<descr>A new empty C file.</descr> <descr>A new empty C file.</descr>
</type> </type>
</filetypes> </filetypes>

View File

@ -9,7 +9,7 @@ pluginsdir=@MOO_LIB_DIR@/plugins
Name: moo Name: moo
Description: A text editor and terminal emulator library Description: A text editor and terminal emulator library
Requires: gtk+-2.0 @MOO_XML_PKG_NAME@ Requires: gtk+-2.0 @MOO_XML_PKG_NAME@ @MOO_GTKHTML_PACKAGE@
Version: @MOO_VERSION_UNQUOTED@ Version: @MOO_VERSION_UNQUOTED@
Cflags: -I@moo_includedir@ -I@moo_libincludedir@ Cflags: -I@moo_includedir@ -I@moo_libincludedir@
Libs: -L${libdir} -lmoo @MOO_FAM_LIBS@ @PYTHON_LDFLAGS@ Libs: -L${libdir} -lmoo @MOO_FAM_LIBS@ @PYTHON_LDFLAGS@

View File

@ -22,9 +22,22 @@ mooapp_sources = \
$(mooapp)/mooappinput.c \ $(mooapp)/mooappinput.c \
$(mooapp)/mooappinput.h \ $(mooapp)/mooappinput.h \
$(mooapp)/mooappoutput.c \ $(mooapp)/mooappoutput.c \
$(mooapp)/mooappoutput.h \ $(mooapp)/mooappoutput.h
mooapp_extra_dist = \
$(mooapp)/gpl \
$(mooapp)/moohtml.c \
$(mooapp)/moohtml.h
if MOO_USE_GTKHTML
mooapp_sources += \
$(mooapp)/moohelp.c \ $(mooapp)/moohelp.c \
$(mooapp)/moohelp.h $(mooapp)/moohelp.h
else
mooapp_extra_dist += \
$(mooapp)/moohelp.c \
$(mooapp)/moohelp.h
endif
if MOO_USE_XML if MOO_USE_XML
mooapp_sources += \ mooapp_sources += \
@ -32,11 +45,6 @@ mooapp_sources += \
$(mooapp)/moohtml.h $(mooapp)/moohtml.h
endif endif
mooapp_extra_dist = \
$(mooapp)/gpl \
$(mooapp)/moohtml.c \
$(mooapp)/moohtml.h
$(mooapp)/mooappabout-glade.h: $(mooapp_srcdir)/glade/mooappabout.glade $(XML2H) $(mooapp)/mooappabout-glade.h: $(mooapp_srcdir)/glade/mooappabout.glade $(XML2H)
mkdir -p $(mooapp) mkdir -p $(mooapp)
sh $(XML2H) MOO_APP_ABOUT_GLADE_UI $(mooapp_srcdir)/glade/mooappabout.glade > $(mooapp)/mooappabout-glade.h sh $(XML2H) MOO_APP_ABOUT_GLADE_UI $(mooapp_srcdir)/glade/mooappabout.glade > $(mooapp)/mooappabout-glade.h

View File

@ -14,12 +14,35 @@
#ifndef __MOO_HELP_H__ #ifndef __MOO_HELP_H__
#define __MOO_HELP_H__ #define __MOO_HELP_H__
#include "mooapp/moohtml.h" #include <libgtkhtml/gtkhtml.h>
G_BEGIN_DECLS G_BEGIN_DECLS
#define MOO_TYPE_HELP (moo_help_get_type ())
#define MOO_HELP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), MOO_TYPE_HELP, MooHelp))
#define MOO_HELP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOO_TYPE_HELP, MooHelpClass))
#define MOO_IS_HELP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), MOO_TYPE_HELP))
#define MOO_IS_HELP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOO_TYPE_HELP))
#define MOO_HELP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOO_TYPE_HELP, MooHelpClass))
typedef struct _MooHelp MooHelp;
typedef struct _MooHelpPrivate MooHelpPrivate;
typedef struct _MooHelpClass MooHelpClass;
struct _MooHelp
{
HtmlView parent;
};
struct _MooHelpClass
{
HtmlViewClass parent_class;
};
GType moo_help_get_type (void) G_GNUC_CONST;
GtkWidget *moo_help_new (void);
G_END_DECLS G_END_DECLS