~maria-captains/percona-pam-for-mysql/use_dialog

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Sergei Golubchik
  • Date: 2011-10-27 11:14:52 UTC
  • Revision ID: sergii@pisem.net-20111027111452-hd7frf392x3lxq7d
rewrite to use dialog plugin.
simplify configure.ac.
support builds from within 5.5 tree.
fix make distcheck target.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#
18
18
#
19
19
AC_PREREQ([2.61])
20
 
AC_INIT([Percona PAM plugin], [0.1], [mysql-dev@percona.com])
21
 
AC_CONFIG_SRCDIR([src/lib_auth_pam_client.h])
 
20
AC_INIT([Percona PAM plugin], [1.0], [mysql-dev@percona.com])
 
21
AC_CONFIG_SRCDIR([src/auth_pam.c])
22
22
AM_INIT_AUTOMAKE
23
23
 
24
24
# Checks for programs.
25
 
AC_PROG_CXX
26
 
AC_PROG_AWK
27
 
AC_PROG_CC
28
 
AC_PROG_CPP
29
 
AC_PROG_INSTALL
30
 
AC_PROG_LN_S
31
 
AC_PROG_MAKE_SET
32
 
AC_PROG_RANLIB
33
25
AC_PROG_LIBTOOL
34
26
 
35
27
AC_CHECK_PROGS([BZR], [bzr])
36
28
 
37
29
# mysql_config
 
30
AC_PATH_PROG([MYSQL_CONFIG], [mysql_config])
38
31
AC_ARG_WITH([mysql_config],
39
32
    AC_HELP_STRING(
40
 
        [--with-mysql_config=PROGRAM],
 
33
        [--with-mysql_config=PATH],
41
34
        [location of the mysql_config program]),
42
 
    [mysql_config_prog="$withval"])
43
 
AC_PATH_PROG([MYSQL_CONFIG], [mysql_config], [$mysql_config_prog])
 
35
    [MYSQL_CONFIG="$withval"])
44
36
 
45
 
if test "x$MYSQL_CONFIG" = "x"
 
37
if test "x$MYSQL_CONFIG" = "x" -o ! -x "$MYSQL_CONFIG"
46
38
then
47
39
    AC_MSG_ERROR([Unable to find mysql_config. Please install or specify.])
48
40
fi
54
46
)
55
47
 
56
48
# Checks for header files.
57
 
MYSQL_INCLUDES="$(mysql_config --include)"
 
49
MYSQL_INCLUDES=`"$MYSQL_CONFIG" --include`
58
50
 
59
 
save_CFLAGS="${CFLAGS}"
60
51
save_CPPFLAGS="${CPPFLAGS}"
61
52
 
62
 
CFLAGS="${CFLAGS} ${MYSQL_INCLUDES}"
63
53
CPPFLAGS="${CPPFLAGS} ${MYSQL_INCLUDES}"
64
54
 
65
 
AC_CHECK_HEADERS([string.h unistd.h])
66
55
AC_CHECK_HEADER([mysql/plugin.h], [],
67
56
    AC_MSG_ERROR(
68
57
       [Unable to find mysql/plugin.h. Please install the mysql
69
58
        development headers]))
70
59
 
71
 
CFLAGS="${save_CFLAGS}"
72
60
CPPFLAGS="${save_CPPFLAGS}"
73
61
 
74
62
AC_SUBST([MYSQL_INCLUDES])
75
63
 
76
 
# Checks for typedefs, structures, and compiler characteristics.
77
 
 
78
 
# Checks for library functions.
79
 
AC_FUNC_MALLOC
80
 
AC_CHECK_FUNCS([getpass strchr strdup])
81
 
 
82
64
# Get the plugin dir
83
 
PLUGINDIR=$([$MYSQL_CONFIG --plugindir])
 
65
PLUGINDIR=`"$MYSQL_CONFIG" --plugindir`
84
66
AC_SUBST([PLUGINDIR])
85
67
 
86
68
# Get the revision if bzr is present
87
69
if test "x${BZR}" != "x"
88
70
then
89
 
    if cd "$(dirname "$0")" && bzr status >& /dev/null
90
 
    then
91
 
        REVISION="$(cd "$(dirname "$0")"; ${BZR} log -r-1 | grep ^revno: | cut -d ' ' -f 2)"
92
 
    else
93
 
        REVISION=0
94
 
    fi
95
 
else
96
 
    REVISION=0
 
71
    REVISION=`"${BZR}" revno "$srcdir"`
97
72
fi
 
73
REVISION=${REVISION:-0}
98
74
 
99
75
AC_SUBST([REVISION])
100
76
 
104
80
                 build/build-binary.sh
105
81
                 build/percona-pam-plugin.spec])
106
82
AC_OUTPUT
 
83