~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to support-files/drizzle.m4

  • Committer: Grant Limberg
  • Date: 2008-08-12 21:13:01 UTC
  • mto: (322.1.1 codestyle)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: grant@glsoftware.net-20080812211301-ym3wsowelkgp16s2
renamed all instances of MYSQL_ to DRIZZLE_

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
# with this program; if not, write to the Free Software Foundation, Inc., 59
14
14
# Temple Place, Suite 330, Boston, MA  02111-1307  USA
15
15
 
16
 
AC_DEFUN([_MYSQL_CONFIG],[
 
16
AC_DEFUN([_DRIZZLE_CONFIG],[
17
17
  AC_ARG_WITH([mysql-config],
18
18
  AS_HELP_STRING([--with-mysql-config=PATH], [A path to mysql_config script]),
19
19
                 [mysql_config="$withval"], [mysql_config=mysql_config])
22
22
dnl
23
23
dnl Usage:
24
24
dnl
25
 
dnl  MYSQL_CLIENT([version], [client|thread-safe|embedded])
 
25
dnl  DRIZZLE_CLIENT([version], [client|thread-safe|embedded])
26
26
dnl
27
27
dnl Two optional arguments:
28
28
dnl   first: The minimal version of the MySQL to use
33
33
dnl           if not specified, a user will be able to choose
34
34
dnl           between client (non-thread-safe) and embedded
35
35
dnl
36
 
dnl On successful execution sets MYSQL_CLIENT_CFLAGS and
37
 
dnl MYSQL_CLIENT_LIBS shell variables and makes substitutions
 
36
dnl On successful execution sets DRIZZLE_CLIENT_CFLAGS and
 
37
dnl DRIZZLE_CLIENT_LIBS shell variables and makes substitutions
38
38
dnl out of them (calls AC_SUBST)
39
39
dnl
40
40
 
41
 
AC_DEFUN([MYSQL_CLIENT],[
42
 
  AC_REQUIRE([_MYSQL_CONFIG])
 
41
AC_DEFUN([DRIZZLE_CLIENT],[
 
42
  AC_REQUIRE([_DRIZZLE_CONFIG])
43
43
  AC_MSG_CHECKING([for MySQL])
44
44
  ifelse([$2], [client],
45
45
               [mysql_libs=--libs mysql_cflags=--cflags],
59
59
    esac
60
60
]
61
61
                   ],
62
 
          [AC_FATAL([Bad second (library flavor) argument to MYSQL_CLIENT])])
 
62
          [AC_FATAL([Bad second (library flavor) argument to DRIZZLE_CLIENT])])
63
63
[
64
64
    mysql_version=`$mysql_config --version`
65
65
    if test -z "$mysql_version" ; then
68
68
]
69
69
    ifelse([$1], [], [], [
70
70
      ifelse(regexp([$1], [^[0-9][0-9]?\.[0-9][0-9]?\.[0-9][0-9]?$]), -1,
71
 
      [AC_FATAL([Bad first (version) argument to MYSQL_CLIENT])], [
 
71
      [AC_FATAL([Bad first (version) argument to DRIZZLE_CLIENT])], [
72
72
dnl
73
73
dnl Transformation below works as follows:
74
74
dnl   assume, we have a number 1.2.3-beta
96
96
    fi
97
97
    ])])
98
98
 
99
 
    MYSQL_CLIENT_CFLAGS=`$mysql_config $mysql_cflags`
100
 
    MYSQL_CLIENT_LIBS=`$mysql_config $mysql_libs`
101
 
    AC_SUBST(MYSQL_CLIENT_CFLAGS)
102
 
    AC_SUBST(MYSQL_CLIENT_LIBS)
 
99
    DRIZZLE_CLIENT_CFLAGS=`$mysql_config $mysql_cflags`
 
100
    DRIZZLE_CLIENT_LIBS=`$mysql_config $mysql_libs`
 
101
    AC_SUBST(DRIZZLE_CLIENT_CFLAGS)
 
102
    AC_SUBST(DRIZZLE_CLIENT_LIBS)
103
103
 
104
104
    # should we try to build a test program ?
105
105