[sword-devel] sword-config

Sven Vollbehr sword-devel@crosswire.org
Wed, 29 May 2002 00:08:08 +0300


I have a small idea to improve the configuring phrase of other packages 
(against sword).

Why couldn't we write a small application, 'sword-config', which purpose 
is to "return configuration information about the installed version of 
the software. It may also be used to retrieve the C and C++ compilers 
and linker which were used for its building and the corresponding 
flags." That text was copied from wx-config tool, which runs on the same 
basic idea.

I mean this would REALLY help me (and probably others as well) to 
configure my (their) software. Instead of writing a small application to 
check the sword version, I could write one line shell script to check 
`sword-config --version`.

The information I could think it to return would be:
	* version
	* static-ness
	* libs needed in linking
	* cppflags, cflags
	* cc, cxx, and ld

A simple showcase: I want to compile my sample application against 
sword. The first thing I need to do is to find out where the sword has 
been installed. The second thing would be to figure out whether it's 
statically linked or not and to find out the approprietare library 
files. I might also need to check the correct version of the library, 
the compiler that was used in build (for consistency), any compiler 
flags needed by sword, etc etc. I mean this needs a whole lot more 
effort than it should need, don't you agree.

The alternative is to write a simple shell script (into configure.ac for 
example) to use the approprietare system calls. Only thing you need to 
check is whether sword-config exists.

Any comments?

-- 
Sven Vollbehr.  I don't know what this block of code does. It seems
to serve no purpose, but if I remove it, the program stops working.