[ghemical-devel] pkg-config?

Michael Banck mbanck@gmx.net
Thu, 10 Apr 2003 17:22:09 +0200


On Thu, Apr 10, 2003 at 12:59:49PM +0300, Tommi Hassinen wrote:
> have you got any more information about that dynamic_cast issue yet? 

No, sorry. I've just wrote another mail to Curt about this. AFAICT,
ghemical seems alright, but mpqc might be broken.

> I would like to release a new version, say v1.60, soon, and that will be
> the first one to have separate libghemical and ghemical packages. 

I had another look at libghemical. Some comments, I don't know if I
wrote that earlier already:

1. You don't seem to build a shared library of libghemical. That would
   be quite required I guess
2. Why do you include miniMOPAC? Wouldn't it be better to split that
   off, perhaps as a slowly crawling sourceforge-project (or on
   bioinformatics, I don't care) 
3. Did you consider using automake?

> Yet there is no proper detection where libghemical files are, but only
> /usr/local prefix is assumed for both library and header files.

> Perhaps the above stuff could be handled using pkg-config in future? To
> use it one should only make a simple config file package_name.pc to
> /usr/lib/pkgconfig. Then the pkg-config program could be used very much
> like we use sc-ocnfig currently (pkg-config just is a generic program).
> However there are some questions:
> 
> 	1) is the install path always /usr/lib/pkgconfig and not
> 		/usr/local/lib/pkgconfig (for example)?

Automake enabled programs seem to have

pkgconfigdir = $(libdir)/pkgconfig

and

pkgconfig_DATA = foo.pc

that pc file then gets installed in $(DESTDIR)$(libdir)/pkgconfig, so I
guess that could be anywhere you like.

> 	2) what could be the best way of generating the libghemical.pc
> 		file (it's contents depends on prefix (and perhaps other
> 		settings as well) set in the configure script)?

> I guess there should be a libghemical.pc.in file, and the configure
> script would generate the final libghemical.pc file.

Well, gchemutils (gcu.pc) e.g. does it like you say above:

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: GtkPeriodic
Description: A Mendeleiev table widget for GTK+-2.0
Version: @VERSION@
Requires: gtk+-2.0
Libs: -L${libdir} @GCU_LIBS@ -lgtkperiodic -lgcu @gtkcrystalviewer@
Cflags: -I${includedir}/gcu @GCU_CFLAGS@ @gl_flags@

cheers,

Michael