On Sat, Jun 14, 2003 at 05:47:55PM +0300, Ciprian Popovici wrote:> On Fri, 13 Jun 2003 08:45:54 +0200 Olivier Chapuis > <olivier.chapuis@free.fr> wrote: > > On Thu, Jun 12, 2003 at 10:26:49PM -0400, Ambrose Li wrote: > > > On Thu, Jun 12, 2003 at 05:29:08PM -0500, Keith Packard wrote: > > > > > > > > I switched the configuration from autoconf to automake and didn''t > > > > bother to bring that app forwards. I prefer ''pkg-config'', but if > > > > you think fontconfig-config is necessary, please feel free to > > > > submit a working version to the bugzilla... > > > > > > It seems that fontconfig-config can be created quite trivially as a > > > wrapper of pkg-config; patch to make a working fontconfig-config > > > follows (patch is against the fontconfig-config as shipped with > > > XFree86 4.3.0). > > > > > > > The problem with this solution (fontconfig-config as a warper > > of pkg-config) is that: > > > > 1 - You need pkg-config and so the compilation of a package which can > > use fontconfig needs pkg-config: you add a dependence. > > 2 - If fontconfig is installed at a no standard place (vs pkg-config) > > you should set the PKG_CONFIG_PATH env variable. In the other hand > > if you have installed fontconfig in a no standard place you must > > have set your PATH accordingly and fontconfig-config is found. > > > > By the way, I prefer fontconfig-config than ''pkg-config''. For me > > ''pkg-config'' add only complication for low level library. > > Maybe, but try using an environment full of applications installed in > odd (ie. non-standard) places, based on *-config rather than pkg-config. > Sooner or later, as more packages are added or upgraded, you''re gonna > have some trouble with dependencies and whatnot and you''re gonna have to > fix stuff by hand. On the other hand, with pkg-config all you have to do > is make sure PKG_CONFIG_PATH contains all the relevant *.pc files'' > locations. >I do not see the difference. With *-config the PATH give you the good stuff and with pkg-config PKG_CONFIG_PATH do the trick. Anyway, all this is not very important. By the way, I was not very happy to receive bug reports of the type "your soft do not detect xft" simply because fontconfig-config has been removed (lost 1 hours of free development: detect the problem and add pkg-config support in the configure stuff). Also, now for compiling a package which needs fontconfig you need pkg-config. Again, adding this dependence for fontconfig (a "universal library") is IMHO a bad idea (but I will surely not lost one more hour to send a patch for reestablish it). Finally I''ve nothing against pkg-config, I get no special difficulty to use it. Moreover, it has surely some advantage when you consider stuff which use one tone of libraries. Regards, Olivier
On Fri, 13 Jun 2003 08:45:54 +0200 Olivier Chapuis <olivier.chapuis@free.fr> wrote:> On Thu, Jun 12, 2003 at 10:26:49PM -0400, Ambrose Li wrote: > > On Thu, Jun 12, 2003 at 05:29:08PM -0500, Keith Packard wrote: > > > > > > I switched the configuration from autoconf to automake and didn''t > > > bother to bring that app forwards. I prefer ''pkg-config'', but if > > > you think fontconfig-config is necessary, please feel free to > > > submit a working version to the bugzilla... > > > > It seems that fontconfig-config can be created quite trivially as a > > wrapper of pkg-config; patch to make a working fontconfig-config > > follows (patch is against the fontconfig-config as shipped with > > XFree86 4.3.0). > > > > The problem with this solution (fontconfig-config as a warper > of pkg-config) is that: > > 1 - You need pkg-config and so the compilation of a package which can > use fontconfig needs pkg-config: you add a dependence. > 2 - If fontconfig is installed at a no standard place (vs pkg-config) > you should set the PKG_CONFIG_PATH env variable. In the other hand > if you have installed fontconfig in a no standard place you must > have set your PATH accordingly and fontconfig-config is found. > > By the way, I prefer fontconfig-config than ''pkg-config''. For me > ''pkg-config'' add only complication for low level library.Maybe, but try using an environment full of applications installed in odd (ie. non-standard) places, based on *-config rather than pkg-config. Sooner or later, as more packages are added or upgraded, you''re gonna have some trouble with dependencies and whatnot and you''re gonna have to fix stuff by hand. On the other hand, with pkg-config all you have to do is make sure PKG_CONFIG_PATH contains all the relevant *.pc files'' locations. It was enlightening when I switched from Gnome 1.x to 2.x. Before that I had just the type of trouble I mentioned, plus all kinds of quirks and workarounds when compiling from source. Now all I do is keep PKG_CONFIG_PATH up to date and all packages that use it compile basically out of the box. An outstanding example was Galeon 1.2.x (a Gnome 1.x app) which required (for me) a rare, ugly and non-obvious hack against gnome-config to compile. I don''t really know if pkg-config adds another level of obfuscation but even if it does I think it also does a good job towards unification and standardization so it''s worth it. -- Ciprian Popovici
Keith Packard wrote:> Around 0 o''clock on Jun 13, Olivier Chapuis wrote: > > >>Can one can explain me why fontconfig-config has been removed from >>the fontconfig package? > > > I switched the configuration from autoconf to automake and didn''t bother > to bring that app forwards. I prefer ''pkg-config'', but if you think > fontconfig-config is necessary, please feel free to submit a working > version to the bugzilla...Keith, The acutual fix is rather trivial, becuase you didn''t really "loose" anything by moving to Automake. Attached is a patch which resurrects and properly generates fontconfig-config. Also included in the patch is a new AM_CONDITIONAL to handle shared library generation on native Cygwin builds. Yes, Cygwin is different from mingw, in that we are targeting Cygwin/XFree86 rather then the generic w32api. Anyhow, it was fairly trivial to add that support in. Also, I''ve cleaned up the configure.in a bit to be more in compliance with the current autoconf standards. Hope this helps! Cheers, Nicholas -------------- next part -------------- 2003-06-14 Nicholas Wourms <nwourms@myrealbox.com> * Makefile.am: Resurrect fontconfig-config.in and configure the Makefile to install it. * configure.in: Fix deprecated use of AM_INIT_AUTOMAKE by moving package name & version to AC_INIT. Add AC_CONFIG_SRCDIR macro for source directory detection. Add a new AM_CONDITIONAL check "OS_CYGWIN" for proper handling of native Cygwin (XFree86) builds. Fix some Autoconf quoting. Fix deprecated use of AC_OUTPUT by moving arguments to the new macro AC_CONFIG_FILES. Add the newly resurrected fontconfig-config to AC_CONFIG_FILES and make it executable. * fontconfig-config.in: Resurrect from 2.1.X and update the "version" output variable substitution to reflect recent changes. * src/Makefile.am: Fix an obvious cut&paste error in OS_WIN32''s install-libtool-import-lib statement. Add a conditional statement for Cygwin to handle the shared-library generation in the newer libtools. -------------- next part -------------- A non-text attachment was scrubbed... Name: fontconfig-cygwin-fixes.patch Type: application/octet-stream Size: 5660 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20030614/03956043/fontconfig-cygwin-fixes.obj
Around 0 o''clock on Jun 13, Olivier Chapuis wrote:> Can one can explain me why fontconfig-config has been removed from > the fontconfig package?I switched the configuration from autoconf to automake and didn''t bother to bring that app forwards. I prefer ''pkg-config'', but if you think fontconfig-config is necessary, please feel free to submit a working version to the bugzilla... -keith
On Thu, Jun 12, 2003 at 10:26:49PM -0400, Ambrose Li wrote:> On Thu, Jun 12, 2003 at 05:29:08PM -0500, Keith Packard wrote: > > > > I switched the configuration from autoconf to automake and didn''t bother > > to bring that app forwards. I prefer ''pkg-config'', but if you think > > fontconfig-config is necessary, please feel free to submit a working > > version to the bugzilla... > > It seems that fontconfig-config can be created quite trivially as a > wrapper of pkg-config; patch to make a working fontconfig-config > follows (patch is against the fontconfig-config as shipped with > XFree86 4.3.0). >The problem with this solution (fontconfig-config as a warper of pkg-config) is that: 1 - You need pkg-config and so the compilation of a package which can use fontconfig needs pkg-config: you add a dependence. 2 - If fontconfig is installed at a no standard place (vs pkg-config) you should set the PKG_CONFIG_PATH env variable. In the other hand if you have installed fontconfig in a no standard place you must have set your PATH accordingly and fontconfig-config is found. By the way, I prefer fontconfig-config than ''pkg-config''. For me ''pkg-config'' add only complication for low level library. Regards, Olivier
On Thu, Jun 12, 2003 at 05:29:08PM -0500, Keith Packard wrote:> > I switched the configuration from autoconf to automake and didn''t bother > to bring that app forwards. I prefer ''pkg-config'', but if you think > fontconfig-config is necessary, please feel free to submit a working > version to the bugzilla...It seems that fontconfig-config can be created quite trivially as a wrapper of pkg-config; patch to make a working fontconfig-config follows (patch is against the fontconfig-config as shipped with XFree86 4.3.0). This way, it doesn''t even need to be updated (since it gets all the real stuff from pkg-config). ------------- cut here -------------- 8< ----------------------------- --- /usr/X11R6/bin/fontconfig-config Mon May 26 17:44:53 2003 +++ /tmp/fontconfig-config Thu Jun 12 22:17:26 2003 @@ -1,15 +1,12 @@ #! /bin/sh -prefix="/usr/X11R6" -exec_prefix="/usr/X11R6/bin" -libdir="/usr/X11R6/lib" -includedir="/usr/X11R6/include" -version="1.0.1" +prefix="`pkg-config --variable=prefix fontconfig`" +exec_prefix="`pkg-config --variable=exec_prefix fontconfig`" usage() { cat <<EOF -Usage: fontconfig-config [OPTIONS] [LIBRARIES] +Usage: fontconfig-config [OPTIONS] Options: [--prefix[=DIR]] [--exec-prefix[=DIR]] @@ -47,7 +44,7 @@ echo_exec_prefix=yes ;; --version) - echo $version + pkg-config --modversion fontconfig exit 0 ;; --cflags) @@ -78,17 +75,11 @@ fi if test "$echo_cflags" = "yes" ; then - cflags="-I${includedir}" - echo $cflags + pkg-config --cflags fontconfig fi if test "$echo_libs" = "yes" ; then - libs="-lfontconfig" - if test "${libdir}" != "/usr/lib" ; then - echo -L${libdir} $libs - else - echo $libs - fi + pkg-config --libs fontconfig fi # EOF ------------- cut here -------------- 8< -----------------------------> -keith-- Ambrose LI Cheuk-Wing <a.c.li@ieee.org> http://ada.dhs.org/~acli/