discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

possible idea: GNUstep and pkg-config?


From: Andrew Sveikauskas
Subject: possible idea: GNUstep and pkg-config?
Date: Wed, 24 May 2006 18:06:35 -0400

Hi,

I'm curious to know what people think of this idea. I made a quick hack that generates pkg-config .pc files for GNUstep base and gui:

http://mail.rochester.edu/~asveikau/gnustep-pkg-config.tar.gz

This is obviously not meant to replace GNUstep make, rather provide a quick way to compile and link GNUstep programs on the command line without the makefile package:

$ gcc -c -o foo.o foo.m `pkg-config --cflags gnustep-gui`
$ gcc -o foo foo.o `pkg-config --libs gnustep-gui`

My original thinking was that this would be useful for a program which has frontends for several windowing toolkits and is not GNUstep-specific. Let's say I wanted to write a GNUstep-based mplayer output driver, just as an example. mplayer already has lots of configure scripts and makefile stuff, and (1) it would be a bad idea to make mplayer require GNUstep make on all platforms/toolkits, and (2) GNUstep make might not "fit in" with some of the other build scripts. So, in this example, the configure script could use pkg-config to check if GNUstep is there, and then get the objcflags and libs that way. (Though sure, this is not the only way to do such a thing.)

But I guess this thing might have other benefits. On this system, the output of pkg-config --cflags gnustep-base:

-fPIC -DGSWARN -DGSDIAGNOSE -O2 -pipe -fgnu-runtime -fconstant-string-class=NSConstantString -I. -I/usr/local/include -IGNUstep/Library/Headers -I/usr/local/GNUstep/Local/Library/Headers -I/usr/local/GNUstep/Network/Library/Headers -I/usr/local/GNUstep/System/Library/Headers

Which is quite a lot to type. If I want to write quick throwaway dummy code to test some objc snippet, that would be a pain to include every time, as would bothering to write a makefile. This might be convenient for such a purpose.

So I've tested this a little bit on OpenBSD, Linux, and Mac OS with Cocoa. Seems to work. What do people think? Good idea, bad idea?

Andrew





reply via email to

[Prev in Thread] Current Thread [Next in Thread]