3
# (C) 2011 Percona Inc.
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; version 2 of the License.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
AC_INIT([Percona PAM plugin], [0.1], [mysql-dev@percona.com])
21
AC_CONFIG_SRCDIR([src/lib_auth_pam_client.h])
24
# Checks for programs.
35
AC_CHECK_PROGS([BZR], [bzr])
38
AC_ARG_WITH([mysql_config],
40
[--with-mysql_config=PROGRAM],
41
[location of the mysql_config program]),
42
[mysql_config_prog="$withval"])
43
AC_PATH_PROG([MYSQL_CONFIG], [mysql_config], [$mysql_config_prog])
45
if test "x$MYSQL_CONFIG" = "x"
47
AC_MSG_ERROR([Unable to find mysql_config. Please install or specify.])
50
# Checks for libraries.
51
AC_CHECK_LIB([pam], [pam_start], ,
53
[Unable to find PAM. Please install the PAM development libraries])
56
# Checks for header files.
57
MYSQL_INCLUDES="$(mysql_config --include)"
59
save_CFLAGS="${CFLAGS}"
60
save_CPPFLAGS="${CPPFLAGS}"
62
CFLAGS="${CFLAGS} ${MYSQL_INCLUDES}"
63
CPPFLAGS="${CPPFLAGS} ${MYSQL_INCLUDES}"
65
AC_CHECK_HEADERS([string.h unistd.h])
66
AC_CHECK_HEADER([mysql/plugin.h], [],
68
[Unable to find mysql/plugin.h. Please install the mysql
69
development headers]))
71
CFLAGS="${save_CFLAGS}"
72
CPPFLAGS="${save_CPPFLAGS}"
74
AC_SUBST([MYSQL_INCLUDES])
76
# Checks for typedefs, structures, and compiler characteristics.
78
# Checks for library functions.
80
AC_CHECK_FUNCS([getpass strchr strdup])
83
PLUGINDIR=$([$MYSQL_CONFIG --plugindir])
86
# Get the revision if bzr is present
87
if test "x${BZR}" != "x"
89
if cd "$(dirname "$0")" && bzr status >& /dev/null
91
REVISION="$(cd "$(dirname "$0")"; ${BZR} log -r-1 | grep ^revno: | cut -d ' ' -f 2)"
102
AC_CONFIG_FILES([Makefile
104
build/build-binary.sh
105
build/percona-pam-plugin.spec])