Skip to content

Commit 67f3747

Browse files
committed
Upgrade ax_lib_mysql.m4
1 parent 55ee764 commit 67f3747

File tree

2 files changed

+27
-30
lines changed

2 files changed

+27
-30
lines changed

configure.ac

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ AC_INIT(lib_mysqludf_str, 0.3, [email protected])
1010
AC_CONFIG_MACRO_DIR([m4])
1111
AC_CONFIG_AUX_DIR(config)
1212

13-
m4_include(config/ax_lib_mysql.m4)
14-
1513
# Initialize automake
1614
AM_INIT_AUTOMAKE
1715

config/ax_lib_mysql.m4 renamed to m4/ax_lib_mysql.m4

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
##### http://autoconf-archive.cryp.to/ax_lib_mysql.html
1+
# ===========================================================================
2+
# http://www.gnu.org/software/autoconf-archive/ax_lib_mysql.html
3+
# ===========================================================================
24
#
35
# SYNOPSIS
46
#
57
# AX_LIB_MYSQL([MINIMUM-VERSION])
68
#
79
# DESCRIPTION
810
#
9-
# This macro provides tests of availability of MySQL client library
10-
# of particular version or newer.
11+
# This macro provides tests of availability of MySQL client library of
12+
# particular version or newer.
1113
#
12-
# AX_LIB_MYSQL macro takes only one argument which is optional. If
13-
# there is no required version passed, then macro does not run
14-
# version test.
14+
# AX_LIB_MYSQL macro takes only one argument which is optional. If there
15+
# is no required version passed, then macro does not run version test.
1516
#
1617
# The --with-mysql option takes one of three possible values:
1718
#
1819
# no - do not check for MySQL client library
1920
#
20-
# yes - do check for MySQL library in standard locations
21-
# (mysql_config should be in the PATH)
21+
# yes - do check for MySQL library in standard locations (mysql_config
22+
# should be in the PATH)
2223
#
2324
# path - complete path to mysql_config utility, use this option if
2425
# mysql_config can't be found in the PATH
@@ -33,22 +34,21 @@
3334
#
3435
# HAVE_MYSQL
3536
#
36-
# LAST MODIFICATION
37+
# LICENSE
3738
#
38-
# 2006-07-16
39+
# Copyright (c) 2008 Mateusz Loskot <[email protected]>
3940
#
40-
# COPYLEFT
41-
#
42-
# Copyright (c) 2006 Mateusz Loskot <[email protected]>
43-
#
44-
# Copying and distribution of this file, with or without
45-
# modification, are permitted in any medium without royalty provided
46-
# the copyright notice and this notice are preserved.
41+
# Copying and distribution of this file, with or without modification, are
42+
# permitted in any medium without royalty provided the copyright notice
43+
# and this notice are preserved. This file is offered as-is, without any
44+
# warranty.
45+
46+
#serial 12
4747

4848
AC_DEFUN([AX_LIB_MYSQL],
4949
[
5050
AC_ARG_WITH([mysql],
51-
AC_HELP_STRING([--with-mysql=@<:@ARG@:>@],
51+
AS_HELP_STRING([--with-mysql=@<:@ARG@:>@],
5252
[use MySQL client library @<:@default=yes@:>@, optionally specify path to mysql_config]
5353
),
5454
[
@@ -63,37 +63,31 @@ AC_DEFUN([AX_LIB_MYSQL],
6363
],
6464
[want_mysql="yes"]
6565
)
66+
AC_ARG_VAR([MYSQL_CONFIG], [Full path to mysql_config program])
6667
6768
MYSQL_CFLAGS=""
6869
MYSQL_LDFLAGS=""
6970
MYSQL_VERSION=""
7071
7172
dnl
72-
dnl Check MySQL libraries (libpq)
73+
dnl Check MySQL libraries
7374
dnl
7475
7576
if test "$want_mysql" = "yes"; then
7677
77-
if test -z "$MYSQL_CONFIG" -o test; then
78-
AC_PATH_PROG([MYSQL_CONFIG], [mysql_config], [no])
78+
if test -z "$MYSQL_CONFIG" ; then
79+
AC_PATH_PROGS([MYSQL_CONFIG], [mysql_config mysql_config5], [no])
7980
fi
8081
8182
if test "$MYSQL_CONFIG" != "no"; then
82-
AC_MSG_CHECKING([for MySQL libraries])
83-
8483
MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"
8584
MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`"
8685
8786
MYSQL_VERSION=`$MYSQL_CONFIG --version`
8887
89-
AC_DEFINE([HAVE_MYSQL], [1],
90-
[Define to 1 if MySQL libraries are available])
91-
9288
found_mysql="yes"
93-
AC_MSG_RESULT([yes])
9489
else
9590
found_mysql="no"
96-
AC_MSG_RESULT([no])
9791
fi
9892
fi
9993
@@ -142,6 +136,11 @@ AC_DEFUN([AX_LIB_MYSQL],
142136
fi
143137
fi
144138
139+
if test "$found_mysql" = "yes" ; then
140+
AC_DEFINE([HAVE_MYSQL], [1],
141+
[Define to 1 if MySQL libraries are available])
142+
fi
143+
145144
AC_SUBST([MYSQL_VERSION])
146145
AC_SUBST([MYSQL_CFLAGS])
147146
AC_SUBST([MYSQL_LDFLAGS])

0 commit comments

Comments
 (0)