Guillaume Laurent <[EMAIL PROTECTED]> wrote:
>
> On Friday 08 July 2005 21:56, William wrote:
>>
>> While you're at it, please mention the issue of scons searching in
>> /usr/lib/pkgconfig but not in /usr/local/lib/pkgconfig
>> causing scons potentially to miss any updated liblo installations:
> 
> My liblo and several other rg-related libs are installed in /usr/local and 
> scons detects them just fine... Your problem must have other causes.

Ok, I have looked into this in more detail.
I think the problem is that trusty old GNU autoconf's configure
goes to the trouble of explicitly setting PKG_CONFIG_PATH to include
/usr/local/lib/pkgconfig :

configure.in.in, line 18:
  export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig

That's why RG usually configures ok across so many common distros when using
GNU autoconf.  The difference with scons is that it does not set any value
in PKG_CONFIG_PATH:

scons_admin/sound.py, line 29 has got:
  if os.environ.has_key("PKG_CONFIG_PATH"):
     pkg_config_command = "PKG_CONFIG_PATH="+os.environ["PKG_CONFIG_PATH"]+" 
pkg-config "

This just uses the default value which might be null as on some major distros.
I guess the reason scons works for you is probably that on your distro
PKG_CONFIG_PATH is set to include "/usr/local/lib/pkgconfig"?
I know it is easy to set PKG_CONFIG_PATH yourself to make scons work on a
"problem" distro but that misses the point that RG's old configure system
just works out-of-the-box on most distros, whereas RG's new scons does not.
I'd like to suggest we make RG's scons do the same thing
as the old GNU autoconf system:

--- a/scons_admin/sound.py      2005-05-18 10:40:13.000000000 +0100
+++ b/scons_admin/sound.py      2005-07-10 19:12:18.000000000 +0100
@@ -25,18 +25,20 @@
 
        def Check_pkg_config(context, version):
                context.Message('Checking for pkg-config ... ')
-               pkg_config_command = 'pkg-config'
                if os.environ.has_key("PKG_CONFIG_PATH"):
                        pkg_config_command = 
"PKG_CONFIG_PATH="+os.environ["PKG_CONFIG_PATH"]+" pkg-config "
+               else:
+                       pkg_config_command = 
"PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config "
                ret = context.TryAction(pkg_config_command+' 
--atleast-pkgconfig-version=%s' % version)[0]
                context.Result(ret)
                return ret
 
        def Check_package(context, module, version):
                context.Message('Checking for %s >= %s ... ' % (module, 
version))
-               pkg_config_command = 'pkg-config'
                if os.environ.has_key("PKG_CONFIG_PATH"):
                        pkg_config_command = 
"PKG_CONFIG_PATH="+os.environ["PKG_CONFIG_PATH"]+" pkg-config "
+               else:
+                       pkg_config_command = 
"PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config "
                ret = context.TryAction(pkg_config_command+' %s 
--atleast-version=%s' % (module, version))[0]
                if ret:
                        env.ParseConfig(pkg_config_command+' %s --cflags 
--libs' % module);

William


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to