Re: MySQL client library upgrade: 3.3.31

From: Date: Wed, 17 Jan 2001 10:20:11 +0000
Subject: Re: MySQL client library upgrade: 3.3.31
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-44343@lists.php.net to get a copy of this message
On Wed, Jan 17, 2001 at 01:57:08AM -0800, chrisv@b0rked.dhs.org wrote: > +AC_DEFUN(PHP_MYSQL_VERSION,[ > + if test "$PHP_MYSQL" != "yes"; then > + AC_MSG_CHECKING(for MySQL version) > + MYSQL_VERSION=$( strings $MYSQL_LIB_DIR/libmysqlclient.so | grep '3\.' ) > + if test "x$( echo $MYSQL_VERSION | cut -f2 -d. )" = "x23" ; then > + AC_MSG_RESULT($MYSQL_VERSION) > + PHP_EVAL_LIBLINE($PHP_MYSQL/bin/mysql_config --libs) > + else > + AC_MSG_RESULT($MYSQL_VERSION) > + fi > + fi > +]) I think it would be better to simply check if mysql_config exists. If so, use it; if not, assume that the version is older and doesn't need -lz. One trouble with the above is that it won't work when 4.0 comes out (alpha should be pretty soon). Of course an extra test could be added, but I don't think it's needed. Did you mean to 'test "$PHP_MYSQL" = "yes"' up there, instead of '!='? You could remove the else clause, and just put the AC_MSG_RESULT() outside the if. Plus, there are some bashisms there that aren't portable. Tim -- __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Tim Smith <tim@mysql.com> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Development Team /_/ /_/\_, /___/\___\_\___/ Helsinki, Finland (for a few weeks) <___/ www.mysql.com

« previous php.dev (#44343) next »