On Wed, Jan 17, 2001 at 01:57:08AM -0800, [EMAIL PROTECTED] 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 <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Development Team
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland (for a few weeks)
       <___/   www.mysql.com

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to