| [ Return to Bugs & Features | Post Text | Post File | Prev | Next ]
STR #2180
Application: | FLTK Library |
Status: | 5 - New |
Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Config Files |
Summary: | pkg-config support |
Version: | 1.4-feature |
Created By: | sanel.z |
Assigned To: | Unassigned |
Fix Version: | Unassigned |
Update Notification: | |
Trouble Report Files:
[ Post File ]No files
Trouble Report Comments:
[ Post Text ]
|
#1 | sanel.z 05:45 Mar 24, 2009 |
| pkg-config is today de-facto standard for library config files. Besides it unifies correct flags and library fetching, it intoduces one important feature: dependency resolving, which simplifies cases when one library is used by another.
For example, edelib (EDE library) uses FLTK in some parts, so to compile sample programs from command line, one should type:
g++ sample.cpp -o sample `pkg-config edelib --cflags --libs` `fltk-config --cxxflags` `fltk-config --ldflags`
For these cases, pkg-config introduce "Requires" key that will automatically load required libraries. If fltk.pc, fltk-imags.pc and/or fltk-opengl.pc existed, it could be used as this:
g++ sample.cpp -o sample `pkg-config edelib --cflags --libs`
and pkg-config will fill needed parts.
fltk-config could/should be retained, because pkg-config is not available on all platforms. | |
|
#2 | fabien 11:23 Mar 24, 2009 |
| Because pkg-config is not available/compatible in all platforms it makes it difficult to handle it in multiplatform development. So I having we should avoid it in FLTK. | |
|
#3 | yuri 11:35 Mar 24, 2009 |
| >So I having we should avoid it in FLTK.
Why not? it is simle to add. from my point of view it's good idea for Linux, Ming/Cygwin and may be other. it may be optional. | |
|
#4 | fabien 12:00 Mar 24, 2009 |
| >Why not? Please read my previous answer. >it is simle to add. And apparently a hell to maintain if we want FLTK to be still used correctly on non GNU/Linux *nix platforms. >from my point of view it's good idea for >Linux, Ming/Cygwin and may be other. it may be optional. IMHO, the 'may be' is the key of the problem because FLTK is not a linux toolkit, it's a multiplatform toolkit. That said, may be one could make this tool available only for those platforms, but still a question I will ask is: Are we sure that all users have the pkg-config package installed even in the Linux/Cygin/Mingw world ? | |
|
#5 | yuri 12:13 Mar 24, 2009 |
| but when we use cairo - we use pkg-config for determine cairo libs. | |
|
#6 | fabien 12:30 Mar 24, 2009 |
| Sure, and just before this line I (also) added : dnl FIXME This part should be fixed so configure do not depend on dnl we do not rely on pkg-config .
This is exactly why Bill and I started a thread in favor of more freedom of cairo integration in the Cairo forum because until recently, cairo would not give us a choice, fortunately for us ; they finally decided to change the include scheme (mostly for other reasons) making our suggestion implemented in recent cairo releases ... | |
|
#7 | sanel.z 02:48 Mar 25, 2009 |
| > And apparently a hell to maintain if we want FLTK to be still used correctly I'm not sure what you mean by "hell to maintain". configure script will fill it with needed data and files should be installed on ordinary place.
Since FLTK already uses configure to replace library names and paths, this could be used in .pc files too. For example, there could be created pc directory, with fltk.pc.in, fltk-images.pc.in, fltk-opengl.pc.in and rest will be done by the scripts.
I don't see how difficult is to maintain this file (e.g. fltk.pc.in): -------------------------------- prefix=@prefix@ exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include
Name: fltk Description: FLTK Library Version: @FLTK_API_VERSION@ URL: http://www.fltk.org --------------------------------
or this (e.g. fltk-images.pc.in) -------------------------------- prefix=@prefix@ exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include
Name: fltk-images Description: FLTK Library Version: @FLTK_API_VERSION@ URL: http://www.fltk.org Requires: @FLLIBNAME@ -------------------------------- > Are we sure that all users have the pkg-config package installed even in the Linux/Cygin/Mingw world
Yes. In Linux world, pkg-config is always installed with anything that has *-dev in some distribution. Cairo, D-BUS, even latest X are comming with .pc files.
I'm not saying how fltk-config should be dumped in favour of pkg-config, but how .pc files could be optional; if pkg-config does not exists, user could use fltk-config, or if does exists, user can choose what to do. | |
|
#8 | ianmacarthur 02:52 Mar 25, 2009 |
| For what little it is worth, I am in favour of adding support for pkg-config, expecially if someone else does it!
In practice, I rarely use pkg-config myself (and I do use fltk-config a lot) but I can see that having both available would be useful. -- Ian | |
[ Return to Bugs & Features | Post Text | Post File ]
|
| |