[Nagiosplug-help] Re: check_mysql cleanup in configure

Ton Voon ton.voon at altinity.com
Wed Mar 22 08:20:03 CET 2006

On 22 Mar 2006, at 15:54, sean finney wrote:

> heyo,
> On Wed, Mar 22, 2006 at 11:23:51AM +0000, Ton Voon wrote:
>> However, I'm not too keen on --with-mysql-config. I've just tried ./
>> configure PATH=$PATH:/usr/local/mysql/bin and that picks up
>> mysql_config correctly (and vice verse if PATH doesn't point to it).
>> Given that a --with-mysql-config implementation would just add to
>> PATH, why not just use the PATH= syntax instead?
> i meant for --with-mysql-config to point to the binary, and not
> alter PATH.  that is, something like:
> ...
> if [ "$with_mysqlconfig" ]; then
> 	mysqlconfig="$with_mysqlconfig"
> elif which mysql_config; then
> 	mysqlconfig=`which mysql_config`
> fi
> if [ "$mysqlconfig" ]; then
> 	dostufftoenablemysql()
> fi
> ...
> if we didn't provide this, i'd suggest that we either
> (a) keep --with-mysql and use it to override our search for
> $with_mysql/bin/mysql_config (which if not existing should result  
> in an
> error) or at least (b) add something like
> 	--with-mysql: disabled (make sure mysql_config is in PATH)
> to the configuration summary at the end of successful configurations.
>> I wouldn't mind adding --with-mysql-config if this was a pure mysql
>> project, but to do something similar for each technology (--with-
>> postgres-config, --with-oracle-headers, --with-snmp-includes, etc)
>> seems to be overkill.
> i'd say that it is reasonable for each $feature where non default
> lib/include dirs or paths are possible to have *some* kind of --with
> option.  especially if there is no foo_config type program.  i should
> mention that we *do* have something for postgres in ./configure :)
> otherwise the configure command lines will start getting really
> ugly really quickly as various CFLAGS/PATH/CPPFLAGS/etc will need
> to be passed instead of the corresponding --with options (which while
> perhaps cleaner for us is much uglier for users), and they may also
> interfere with other parts of the configure or compile process as
> these settings are global (istr openssl and krb having issues on some
> platforms, for example).  that would also imply that we would have no
> --without options, which would prevent people from disabling  
> autodetection
> for such features.

You've convinced me by the --without argument (we should allow users  
to disable certain features at configure time) and the "setting PATH  
may screw up other things".

I think --with-mysql should be the name, because --without-mysql- 
config does not make sense.

My pseudo code would be:
   - save PATH
   - if without-mysql specified, don't set anything for mysql_config.  
Move on
   - if with-mysql=file, consider that to be mysql_config
   - if with-mysql=dir, add dir and dir/bin to PATH (for backward  
   - find mysql_config in PATH
   - restore PATH
   - if not found, pop up warning
   - add summary at end



T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon

More information about the Help mailing list