config.guess and config.sub don't work properly when specifying CC
Hello list, on Ubuntu 8.04 I find that if I specify CC when I run configure, the configure script dies when it runs config.sub. I get this output $ CC=/usr/local/gcc-4.3.0/bin/gcc ./config.guess x86_64-unknown-linux- but when I run with the system compiler (gcc 4.2.4): $ ./config.guess x86_64-unknown-linux-gnu config.sub does not like x86_64-unknown-linux- and dies. I don't find this behavior on a gentoo installation or Ubuntu 9.10. The dist tar file is the same. Since the config.guess scripts I am using on the ubuntu and the gentoo systems are the same, I guess the problem lies outside config.guess. I have tried to understand what config.guess does, but haven't gotten very far, so I can't tell what's going on. nick
Re: config.guess and config.sub don't work properly when specifying CC
Hello Nicolas, * Nicolas Bock wrote on Wed, Jan 13, 2010 at 08:41:35PM CET: on Ubuntu 8.04 I find that if I specify CC when I run configure, the configure script dies when it runs config.sub. I get this output $ CC=/usr/local/gcc-4.3.0/bin/gcc ./config.guess x86_64-unknown-linux- but when I run with the system compiler (gcc 4.2.4): $ ./config.guess x86_64-unknown-linux-gnu config.sub does not like x86_64-unknown-linux- and dies. config.{guess,sub} are maintained by the email address listed in the comments at the beginning of the scripts. Please write there, don't forget to mention the $timestamp value of the script as well as the output of /usr/local/gcc-4.3.0/bin/gcc -v Thanks, Ralf
Re: config.guess and config.sub don't work properly when specifying CC
Thanks, I forwarded my original question. nick On Wed, Jan 13, 2010 at 13:06, Ralf Wildenhues ralf.wildenh...@gmx.dewrote: Hello Nicolas, * Nicolas Bock wrote on Wed, Jan 13, 2010 at 08:41:35PM CET: on Ubuntu 8.04 I find that if I specify CC when I run configure, the configure script dies when it runs config.sub. I get this output $ CC=/usr/local/gcc-4.3.0/bin/gcc ./config.guess x86_64-unknown-linux- but when I run with the system compiler (gcc 4.2.4): $ ./config.guess x86_64-unknown-linux-gnu config.sub does not like x86_64-unknown-linux- and dies. config.{guess,sub} are maintained by the email address listed in the comments at the beginning of the scripts. Please write there, don't forget to mention the $timestamp value of the script as well as the output of /usr/local/gcc-4.3.0/bin/gcc -v Thanks, Ralf
making config files
Hi, I've been working on a project, Ganglia, that is built with autotools Included in the source tree are templates for various configuration files (e.g. modpython.conf.in). Some of these include hard coded paths. It seems appropriate to replace the hardcoded paths with substitutions (e.g. @sysconfdir@) - however, if the template is processed by configure, then the generated config file sometimes includes a value like ${prefix}/etc rather than an absolute path like /opt/ganglia-3.1/etc Therefore, I felt that I should be aiming to have the config files generated at the last moment - probably during `make install', just before they are installed. Can anyone suggest best practice for doing this? Regards, Daniel
Re: making config files
Daniel Pocock wrote: Therefore, I felt that I should be aiming to have the config files generated at the last moment - probably during `make install', just before they are installed. Can anyone suggest best practice for doing this? please refer to http://www.gnu.org/software/autoconf/manual/autoconf.html#Installation-Directory-Variables cheers, Peter
Re: making config files
Peter Johansson wrote: Daniel Pocock wrote: Therefore, I felt that I should be aiming to have the config files generated at the last moment - probably during `make install', just before they are installed. Can anyone suggest best practice for doing this? please refer to http://www.gnu.org/software/autoconf/manual/autoconf.html#Installation-Directory-Variables Thanks for that - the sed example appears to be the type of thing I want. However, is there a more concise way to do this? I was thinking there may be some way to invoke sed or m4 on a template in much the way that gcc is invoked for *.c
Re: making config files
Daniel Pocock dan...@pocock.com.au writes: Thanks for that - the sed example appears to be the type of thing I want. However, is there a more concise way to do this? I was thinking there may be some way to invoke sed or m4 on a template in much the way that gcc is invoked for *.c Half of that equation would be a more generic script. Attached is what we use for INN (which has a bunch of INN-specific bits, but also has the basic framework for things). The other half would be to set up a way of automatically running that script on particular files, and that's something I've never done. I just write explicit rules. -- Russ Allbery (r...@stanford.edu) http://www.eyrie.org/~eagle/ #! /bin/sh ## $Id: fixconfig.in 8471 2009-05-17 08:25:35Z iulius $ ## ## Make variable substitutions in configuration files. ## ## This script does something very similar to what config.status does, but ## it fully resolves the various path variables (prefix, exec_prefix, etc.) ## so that they don't contain any variable substitutions. It's easier to ## do this in a separate script than try to use eval or the like to resolve ## the variable names inside configure, particularly since prefix and ## exec_prefix aren't set until the end of the script. # The paths set by configure. pref...@prefix@ exec_pref...@exec_prefix@ bind...@bindir@ libexecd...@libexecdir@ libd...@libdir@ sbind...@sbindir@ sysconfd...@sysconfdir@ # Additional paths specific to INN. controld...@controldir@ dbd...@dbdir@ filterd...@filterdir@ httpd...@httpdir@ libperld...@libperldir@ logd...@logdir@ rund...@rundir@ spoold...@spooldir@ tmpd...@tmpdir@ # Additional variables that are substituted into configuration files. do_pgpveri...@do_pgpverify@ hostna...@hostname@ sendma...@sendmail@ # We can probably just assume sed is on the path, but since we have it, we may # as well use it. s...@sed@ input=$1 if [ -z $input ] ; then echo No input file specified 2 exit 1 fi output=$2 if [ -z $output ] ; then output=`echo $input | $SED -e 's/\.in$//'` fi if [ x$input = x$output ] ; then echo No output file specified and input file doesn't end in .in 2 exit 1 fi $SED -e s,@pref...@],$prefix,g \ -e s,@bind...@],$bindir,g \ -e s,@libexecd...@],$libexecdir,g \ -e s,@libd...@],$libdir,g \ -e s,@sbind...@],$sbindir,g \ -e s,@sysconfd...@],$sysconfdir,g \ -e s,@controld...@],$CONTROLDIR,g \ -e s,@dbd...@],$DBDIR,g \ -e s,@filterd...@],$FILTERDIR,g \ -e s,@httpd...@],$HTTPDIR,g \ -e s,@libperld...@],$LIBPERLDIR,g \ -e s,@logd...@],$LOGDIR,g \ -e s,@rund...@],$RUNDIR,g \ -e s,@spoold...@],$SPOOLDIR,g \ -e s,@tmpd...@],$tmpdir,g \ -e s,@do_pgpveri...@],$DO_PGPVERIFY,g \ -e s,@hostna...@],$HOSTNAME,g \ -e s,@sendma...@],$SENDMAIL,g $input $output
Re: making config files
Russ Allbery wrote: Daniel Pocock dan...@pocock.com.au writes: Thanks for that - the sed example appears to be the type of thing I want. However, is there a more concise way to do this? I was thinking there may be some way to invoke sed or m4 on a template in much the way that gcc is invoked for *.c Half of that equation would be a more generic script. Attached is what we use for INN (which has a bunch of INN-specific bits, but also has the basic framework for things). The other half would be to set up a way of automatically running that script on particular files, and that's something I've never done. I just write explicit rules. Hi Russ, Thanks for this - it may be just what we need to get some nasty hacks out of configure.in In case I use this as-is, can you kindly confirm that it is compatible with the Ganglia license? http://ganglia.svn.sourceforge.net/viewvc/ganglia/trunk/monitor-core/COPYING?revision=560view=markup Regards, Daniel