Bruce Dubbs bdubbs at
Mon Oct 31 18:24:02 PST 2005

Lennon Cook wrote:

> The idea of it is that the options to configure simply cause it to set
> some vars. To find the right values for everything, configure parses
> the command line options, then parses, then applies it's
> defaults. is just a shell script. So, we can set
> *anything* in, so long as we know the appropriate var to
> set. According to the docs, this is usually found by taking the
> ./configure option, removing the leading '--', and turning all other
> hyphens into underscores. So, to set the prefix we would have
> 'prefix=/usr'. Except that that would override anything we've passed
> directly to ./configure, so we would actually do 'test prefix=NONE &&
> prefix=/usr'. For the others, I think it would be 'enable_final=yes',
> 'enable_debug=no', and 'enable_dependancy_tracking=no' (with
> appropriate tests).

Yes, I see now.  The configure script does (removing error checking):

 -disable-* | --disable-*)
    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    eval "enable_$ac_feature=no" ;;

  -enable-* | --enable-*)
    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    case $ac_option in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) ac_optarg=yes ;;
    eval "enable_$ac_feature='$ac_optarg'" ;;

[That last sed is quite interesting!]  :)

In any case, it might be useful for KDE or possibly Gnome where there
are related packages, but its usefulness seems to be a bit limited for
LFS in general.

Thanks for the info.

  -- Bruce

More information about the lfs-dev mailing list