link to it with `pkg-config --cflags --libs chimara`.
- Plugins need <glib.h> to compile, for the definition of glui32 and glsi32
in glk.h; don't know why this worked before.
- Fixed libtool craziness. Apparently when you declare your plugins "noinst"
then libtool "figures out" that it doesn't need to build shared libraries.
+*.pc
aclocal.m4
autom4te.cache
bugreports
-chimara.anjuta
compile
config.*
configure
SUBDIRS = src po docs
chimaradocdir = ${prefix}/doc/chimara
-chimaradoc_DATA = \
+dist_chimaradoc_DATA = \
README\
COPYING\
AUTHORS\
INSTALL\
NEWS
-EXTRA_DIST = $(chimaradoc_DATA) \
- intltool-extract.in intltool-merge.in intltool-update.in
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = chimara.pc chimara-plugin.pc
-# Copy all the spec files. Of cource, only one is actually used.
-dist-hook:
- for specfile in *.spec; do \
- if test -f $$specfile; then \
- cp -p $$specfile $(distdir); \
- fi \
- done
+EXTRA_DIST = intltool-extract.in intltool-merge.in intltool-update.in \
+ chimara.pc.in chimara-plugin.pc.in
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
--- /dev/null
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Chimara
+Description: Multi-session Glk library, with interactive fiction plugins
+Version: @PACKAGE_VERSION@
+URL: http://no.public.website.yet
+Requires: glib-2.0
+Libs: -module -shared -avoid-version -export-symbols-regex "^glk_main$$"
+Cflags: -I${includedir}/chimara
+
--- /dev/null
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Chimara
+Description: Multi-session Glk library, with interactive fiction plugins
+Version: @PACKAGE_VERSION@
+URL: http://no.public.website.yet
+Requires: glib-2.0 >= @GLIB_REQUIRED_VERSION@, gtk+-2.0 >= @GTK_REQUIRED_VERSION@
+Requires.private: gthread-2.0, gmodule-2.0
+Libs: -L${libdir} -lchimara
+Cflags: -I${includedir}/chimara
AC_PROG_CC # C compiler
AM_PROG_CC_C_O # Automake requires this for per-target CFLAGS
AC_PROG_INSTALL # Install
-LT_INIT # Libtool
+LT_INIT # Libtool 2.2.6 and up
+#LT_INIT([dlopen]) # Should call it this way, but
+#LT_PREREQ([2.2.6]) # ...goddamn Fedora 10 still has 1.5
AC_PROG_LIBTOOL # Old way of declaring Libtool
AM_GLIB_GNU_GETTEXT # Use GLib gettext instead of standard
IT_PROG_INTLTOOL([0.35.0]) # Intltool
### CHECK FOR LIBRARIES #######################################################
+GTK_REQUIRED_VERSION=2.8
+GLIB_REQUIRED_VERSION=2.6
+
+AC_SUBST(GTK_REQUIRED_VERSION)
+AC_SUBST(GLIB_REQUIRED_VERSION)
+
# Libraries needed to build Chimara library
PKG_CHECK_MODULES([CHIMARA], [
- glib-2.0 >= 2.6
- gtk+-2.0 >= 2.8
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
+ gtk+-2.0 >= $GTK_REQUIRED_VERSION
gthread-2.0
gmodule-2.0
])
-AC_SUBST(CHIMARA_CFLAGS)
-AC_SUBST(CHIMARA_LIBS)
# Libraries needed to build test programs
PKG_CHECK_MODULES([TEST], [
- gtk+-2.0 >= 2.8
+ gtk+-2.0 >= $GTK_REQUIRED_VERSION
gmodule-2.0
])
-AC_SUBST(TEST_CFLAGS)
-AC_SUBST(TEST_LIBS)
+# GLib CFLAGS for plugins
+PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $GLIB_REQUIRED_VERSION])
### GTK-DOC ###################################################################
# List of other files for Autoconf to output
AC_CONFIG_FILES([
Makefile
+chimara.pc
+chimara-plugin.pc
src/Makefile
docs/Makefile
docs/reference/Makefile
-DG_LOG_DOMAIN=\"Chimara\"
libchimara_la_CFLAGS = @CHIMARA_CFLAGS@ $(AM_CFLAGS)
libchimara_la_LIBADD = @CHIMARA_LIBS@
-libchimara_la_LDFLAGS = -no-undefined -export-symbols-regex "^chimara_glk_|^glk_"
+libchimara_la_LDFLAGS = -no-undefined -export-symbols-regex "^(chimara_)?glk_"
libchimara_includedir = $(includedir)/chimara/chimara
libchimara_include_HEADERS = chimara-glk.h
-PLUGIN_LDFLAGS = -module -shared -avoid-version -export-symbols-regex "^glk_main$$"
-noinst_LTLIBRARIES = first.la model.la gridtest.la splittest.la
+pkglib_LTLIBRARIES = first.la model.la gridtest.la splittest.la
+PLUGIN_LIBTOOL_FLAGS=-module -avoid-version -export-symbols-regex "^glk_main$$"
+
first_la_SOURCES = first.c
-first_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+first_la_CFLAGS = @GLIB_CFLAGS@
+first_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
+
model_la_SOURCES = model.c
-model_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+model_la_CFLAGS = @GLIB_CFLAGS@
+model_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
+
gridtest_la_SOURCES = gridtest.c
-gridtest_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+gridtest_la_CFLAGS = @GLIB_CFLAGS@
+gridtest_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
+
splittest_la_SOURCES = splittest.c
-splittest_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+splittest_la_CFLAGS = @GLIB_CFLAGS@
+splittest_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
CLEANFILES = chimara.ui
}
/* Internal function: Request either latin-1 or unicode line input, in a text grid window. */
-void
+static void
text_grid_request_line_event_common(winid_t win, glui32 maxlen, gboolean insert, gchar *inserttext)
{
GtkTextBuffer *buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(win->widget) );
}
/* Internal function: Request either latin-1 or unicode line input, in a text buffer window. */
-void
+static void
text_buffer_request_line_event_common(winid_t win, glui32 maxlen, gboolean insert, gchar *inserttext)
{
GtkTextBuffer *buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(win->widget) );
/* Internal function: Read one character from a stream. Returns a value which
can be returned unchanged by glk_get_char_stream_uni(), but
glk_get_char_stream() must replace high values by the placeholder character. */
-glsi32
+static glsi32
get_char_stream_common(strid_t str)
{
switch(str->type)