Hi,

since 2333, "make install" will also install all header files which can
be used in plugins and additionally a pkg-config file is installed.
This means for plugin authors, they can query the necessary CFLAGS and
LDFLAGS for compiling their sources. This makes it quite easy to use
the autotools for configuring the plugin sources. The package name for
pkg-config is "geany".

This makes it also possible to create -dev or -devel packages of Geany
which would allow a user to compile plugins for Geany without to have
the full sources installed. 

At the moment, all Geany header files are installed in
$prefix/include/geany and a few Scintilla header files in
$prefix/include/geany/scintilla and the tagmanager header files are
installed in $prefix/include/geany/tagmanager. All include paths can be
obtained with
pkg-config --cflags geany

I think this is the cleanest solution. Or would it be better to have
_all_ header files(Geany ones mixed with Scintilla and tagmanager) in
$prefix/include/geany?

Additionally, I only added SciLexer.h, Scintilla.h and
ScintillaWidget.h to the list of installed header files from Scintilla.
But I think plugins won't use anything from the other files directly.
Let me know if I'm wrong.

Attached is a patch against the geanyvc plugin which I used for
testing ;-).


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.key
diff --git a/Makefile.am b/Makefile.am
index 74b8939..602a1c1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,13 +10,9 @@ noinst_HEADERS = geanyvc.h makefile.win32
 lib_LTLIBRARIES = geanyvc.la
 geanyvc_la_SOURCES = geanyvc.c vc_git.c vc_cvs.c vc_svn.c vc_svk.c vc_bzr.c vc_hg.c
 geanyvc_la_LDFLAGS = -module -avoid-version
-geanyvc_la_LIBADD  = @GTK_LIBS@
+geanyvc_la_LIBADD  = @GEANY_LIBS@

-AM_CPPFLAGS = @GTK_CFLAGS@ \
-		-I$(GEANY_SRC)/src \
-		-I$(GEANY_SRC)/plugins \
-		-I$(GEANY_SRC)/tagmanager/include \
-		-I$(GEANY_SRC)/scintilla/include
+AM_CPPFLAGS = @GEANY_CFLAGS@


 install: .libs/geanyvc.so
diff --git a/configure.in b/configure.in
index 39eacdf..4830536 100644
--- a/configure.in
+++ b/configure.in
@@ -11,25 +11,9 @@ AM_CONFIG_HEADER(config.h)
 AC_PROG_CC
 AC_PROG_LIBTOOL

-PKG_CHECK_MODULES(GTK, [gtk+-2.0])
-AC_SUBST(GTK_CFLAGS)
-AC_SUBST(GTK_LIBS)
-
-dnl check for geany source location
-
-AC_ARG_WITH(geany-src, [  --with-geany-src=ARG	Geany source code location (default ../geany)],[
-GEANY_SRC=${withval}
-],[
-GEANY_SRC=../geany
-])
-AC_CHECK_FILE(${GEANY_SRC}/src/geany.h,[],[
-echo "FATAL ERROR: Geany source code not found"
-echo "make sure you install Geany source code"
-echo "Use --with-geany-src=ARG option to"
-echo "specify it's location"
-exit 1
-])
-AC_SUBST(GEANY_SRC)
+PKG_CHECK_MODULES(GEANY, [geany])
+AC_SUBST(GEANY_CFLAGS)
+AC_SUBST(GEANY_LIBS)

 dnl Check for GtkSpell support
 AC_MSG_CHECKING([whether to use GtkSpell])

Attachment: pgpIDBmCy25dz.pgp
Description: PGP signature

_______________________________________________
Geany mailing list
[email protected]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany

Reply via email to