8
8
AC_CONFIG_AUX_DIR(config)
9
9
AC_CONFIG_HEADERS([config.h])
11
# Save some variables and the command line options for mysqlbug
14
SAVE_ASFLAGS="$ASFLAGS"
16
SAVE_CXXFLAGS="$CXXFLAGS"
17
SAVE_LDFLAGS="$LDFLAGS"
18
SAVE_CXXLDFLAGS="$CXXLDFLAGS"
19
CONF_COMMAND="$0 $ac_configure_args"
20
AC_SUBST(CONF_COMMAND)
23
AC_SUBST(SAVE_ASFLAGS)
25
AC_SUBST(SAVE_CXXFLAGS)
26
AC_SUBST(SAVE_LDFLAGS)
27
AC_SUBST(SAVE_CXXLDFLAGS)
11
# Setting CFLAGS here prevents AC_CANONICAL_TARGET from injecting them
13
SAVE_CXXFLAGS=${CXXFLAGS}
30
17
AC_CANONICAL_TARGET
20
CXXFLAGS=${SAVE_CXXFLAGS}
31
22
AM_INIT_AUTOMAKE(nostdinc -Wall -Werror)
23
if test "x${enable_dependency_tracking}" = "x"
25
enable_dependency_tracking=yes
35
29
# See the libtool docs for information on how to do shared lib versions.
36
30
SHARED_LIB_MAJOR_VERSION=1
37
31
SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0
39
##############################################################################
40
# The below section needs to be done before AC_PROG_CC
41
##############################################################################
43
if test "x${CFLAGS-}" = x ; then
49
if test "x${CPPFLAGS-}" = x ; then
55
if test "x${LDFLAGS-}" = x ; then
61
if test "x${enable_dependency_tracking}" = "x"
63
enable_dependency_tracking=yes
66
################ End of section to be done before AC_PROG_CC #################
32
AC_SUBST(SHARED_LIB_MAJOR_VERSION)
33
AC_SUBST(SHARED_LIB_VERSION)
68
36
dnl Checks for programs.
70
ifdef([AC_PROG_CC_C99],[
71
dnl TODO: Need to fix this to use c99 instead of gnu99
72
AC_PROG_CC_C99([],[AC_MSG_ERROR([C99 support required for compiling Drizzle])])
74
],[C99_SUPPORT_HACK="-std=gnu99"])
76
AC_USE_SYSTEM_EXTENSIONS
39
ACX_USE_SYSTEM_EXTENSIONS
78
41
AC_CXX_HEADER_STDCXX_98
79
42
if test "$ac_cv_cxx_stdcxx_98" = "no"
112
77
DRIZZLE_BASE_VERSION=`echo $DRIZZLE_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
113
78
DRIZZLE_VERSION_ID=`echo $DRIZZLE_NUMERIC_VERSION | \
114
79
awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'`
80
AC_DEFINE_UNQUOTED(DRIZZLE_BASE_VERSION,["$DRIZZLE_BASE_VERSION"],
81
[Major and minor version])
82
AC_DEFINE_UNQUOTED([DRIZZLE_VERSION_ID],[$DRIZZLE_VERSION_ID],
83
[Version ID that can be easily used for numeric comparison])
116
85
# The port should be constant for a LONG time
117
86
DRIZZLE_TCP_PORT_DEFAULT=4427
119
88
sinclude(m4/dtrace.m4)
120
90
sinclude(m4/character_sets.m4)
91
AC_SUBST(AVAILABLE_LANGUAGES)
121
93
sinclude(m4/gettext.m4)
123
94
AM_GNU_GETTEXT([external])
125
95
AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
127
AC_SUBST(DRIZZLE_NO_DASH_VERSION)
128
AC_DEFINE_UNQUOTED(DRIZZLE_BASE_VERSION,["$DRIZZLE_BASE_VERSION"],
129
[Major and minor version])
130
AC_SUBST(DRIZZLE_VERSION_ID)
131
AC_DEFINE_UNQUOTED([DRIZZLE_VERSION_ID],[$DRIZZLE_VERSION_ID],
132
[Version ID that can be easily used for numeric comparison])
133
AC_SUBST(DRIZZLE_PREVIOUS_BASE_VERSION)
134
AC_SUBST(PROTOCOL_VERSION)
135
AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION],
136
[mysql client protocol version])
137
AC_SUBST(DOT_FRM_VERSION)
138
AC_DEFINE_UNQUOTED([FRM_VER], [$DOT_FRM_VERSION],
139
[Version of .frm files])
140
AC_DEFINE_UNQUOTED([DRIZZLE_CONFIG_NAME],["drizzled"],[Name of server config section])
142
AC_SUBST(SHARED_LIB_MAJOR_VERSION)
143
AC_SUBST(SHARED_LIB_VERSION)
144
AC_SUBST(AVAILABLE_LANGUAGES)
146
dnl Ok. This is sort of lame, but we need to be nice to plugins Makefile.am's.
147
AM_CONDITIONAL(BUILD_DRIZZLE,[test "x" = "x"])
151
AC_DEFINE([IO_SIZE], [4096], [Io buffer size; Must be a power of 2 and
152
a multiple of 512. May be
153
smaller what the disk page size. This influences the speed of the
154
isam btree library. eg to big to slow.])
155
AC_DEFINE([SC_MAXWIDTH],[256], [Max width of screen (for error messages)])
156
AC_DEFINE([FN_LEN],[256 ], [Max file name len ])
157
AC_DEFINE([FN_EXTLEN],[20], [Max length of extension (part of FN_LEN) ])
158
AC_DEFINE([FN_REFLEN],[512], [Max length of full path-name ])
159
AC_DEFINE([FN_EXTCHAR],['.'], [File extension character])
160
AC_DEFINE([FN_HOMELIB],['~'], [~/ is used as abbrev for home dir ])
161
AC_DEFINE([FN_CURLIB],['.'], [./ is used as abbrev for current dir ])
162
AC_DEFINE([FN_PARENTDIR],[".."], [Parent directory; Must be a string ])
164
AC_DEFINE([MASTER],[1],[Compile without unireg])
166
AH_VERBATIM([QUOTE_ARG],[
167
/* Quote argument (before cpp) */
169
# define QUOTE_ARG(x) #x
171
/* Quote argument, (after cpp) */
172
#ifndef STRINGIFY_ARG
173
# define STRINGIFY_ARG(x) QUOTE_ARG(x)
177
AH_VERBATIM([builtin_expect],[
179
* The macros below are borrowed from include/linux/compiler.h in the
180
* Linux kernel. Use them to indicate the likelyhood of the truthfulness
181
* of a condition. This serves two purposes - newer versions of gcc will be
182
* able to optimize for branch predication, which could yield siginficant
183
* performance gains in frequently executed sections of the code, and the
184
* other reason to use them is for documentation
186
#if !defined(__GNUC__)
187
#define __builtin_expect(x, expected_value) (x)
190
#define likely(x) __builtin_expect((x),1)
191
#define unlikely(x) __builtin_expect((x),0)
194
dnl InnoDB depends on some Drizzle's internals which other plugins should not
195
dnl need. This is because of InnoDB's foreign key support, "safe" binlog
196
dnl truncation, and other similar legacy features.
198
dnl We define accessors for these internals unconditionally, but do not
199
dnl expose them in mysql/plugin.h. They are declared in ha_innodb.h for
202
AC_DEFINE([INNODB_COMPATIBILITY_HOOKS],[1],[TODO: Remove the need for this])
203
dnl TODO: Make a test for when this needs to be set.
204
AC_DEFINE([_REENTRANT],[1],[Some thread libraries require this])
206
AH_VERBATIM([posix_pthread],[
207
/* We want posix threads */
208
#ifndef _POSIX_PTHREAD_SEMANTICS
209
#define _POSIX_PTHREAD_SEMANTICS
97
# Set this for plugins to use
98
ac_build_drizzle="yes"
214
101
# Canonicalize the configuration name.