~drizzle-trunk/drizzle/development

575.4.7 by Monty Taylor
More header cleanup.
1
dnl -*- bash -*-
1 by brian
clean slate
2
dnl Process this file with autoconf to produce a configure script.
3
77.1.65 by Monty Taylor
We don't really require 2.61, 2.59 is actually fine.
4
AC_PREREQ(2.59)dnl		Minimum Autoconf version required.
1 by brian
clean slate
5
261.2.5 by Monty Taylor
Changed bug contact location to a url..
6
AC_INIT(drizzle, [7.0.0], [http://bugs.launchpad.net/drizzle])
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
7
AC_CONFIG_SRCDIR([drizzled/drizzled.cc])
39 by Brian Aker
Move build helper files into config
8
AC_CONFIG_AUX_DIR(config)
236.1.9 by Monty Taylor
Cleaned up configure.ac line.
9
AC_CONFIG_HEADERS([config.h])
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
10
11
# Save some variables and the command line options for mysqlbug
12
SAVE_CC="$CC"
13
SAVE_CXX="$CXX"
14
SAVE_ASFLAGS="$ASFLAGS"
15
SAVE_CFLAGS="$CFLAGS"
16
SAVE_CXXFLAGS="$CXXFLAGS"
17
SAVE_LDFLAGS="$LDFLAGS"
18
SAVE_CXXLDFLAGS="$CXXLDFLAGS"
19
CONF_COMMAND="$0 $ac_configure_args"
20
AC_SUBST(CONF_COMMAND)
21
AC_SUBST(SAVE_CC)
22
AC_SUBST(SAVE_CXX)
23
AC_SUBST(SAVE_ASFLAGS)
24
AC_SUBST(SAVE_CFLAGS)
25
AC_SUBST(SAVE_CXXFLAGS)
26
AC_SUBST(SAVE_LDFLAGS)
27
AC_SUBST(SAVE_CXXLDFLAGS)
28
AC_SUBST(CXXLDFLAGS)
29
28.1.33 by Monty Taylor
Added -Wall
30
AC_CANONICAL_TARGET
492.1.7 by Monty Taylor
Moved test() to its own file.
31
AM_INIT_AUTOMAKE(-Wall -Wno-portability -Werror)
1 by brian
clean slate
32
33
PROTOCOL_VERSION=10
34
DOT_FRM_VERSION=6
35
# See the libtool docs for information on how to do shared lib versions.
383.1.47 by Monty Taylor
Couple of tiny changes.
36
SHARED_LIB_MAJOR_VERSION=1
1 by brian
clean slate
37
SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0
38
528 by Monty Taylor
Re-arragned a few things in configure.ac.
39
##############################################################################
40
# The below section needs to be done before AC_PROG_CC
41
##############################################################################
42
43
if test "x${CFLAGS-}" = x ; then
44
  cflags_is_set=no
45
else
46
  cflags_is_set=yes
47
fi
48
49
if test "x${CPPFLAGS-}" = x ; then
50
  cppflags_is_set=no
51
else
52
  cppflags_is_set=yes
53
fi
54
55
if test "x${LDFLAGS-}" = x ; then
56
  ldflags_is_set=no
57
else
58
  ldflags_is_set=yes
59
fi
60
612.3.1 by Monty Taylor
Turn on automake dependency tracking for solaris by default.
61
if test "x${enable_dependency_tracking}" = "x"
62
then
63
  enable_dependency_tracking=yes
64
fi
65
528 by Monty Taylor
Re-arragned a few things in configure.ac.
66
################ End of section to be done before AC_PROG_CC #################
67
68
dnl Checks for programs.
69
AC_PROG_CC
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])])
73
  C99_SUPPORT_HACK=""
74
],[C99_SUPPORT_HACK="-std=gnu99"])
554 by Monty
Added impl of macro missing from old systems.
75
656.1.30 by Monty Taylor
Reverted gnulib changes.
76
AC_USE_SYSTEM_EXTENSIONS
528 by Monty Taylor
Re-arragned a few things in configure.ac.
77
AC_PROG_CXX
78
AC_CXX_HEADER_STDCXX_98
79
if test "$ac_cv_cxx_stdcxx_98" = "no"
80
then
81
  AC_MSG_ERROR([C++ Compiler required to compile Drizzle])
82
fi
83
AC_PROG_CPP
84
AM_PROG_CC_C_O
85
520.4.37 by Monty Taylor
Added some Sun compile flags.
86
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
87
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
88
dnl AC_CANONICAL_HOST thinks it's a good idea to just set CFLAGS to 
89
dnl -g -O2 if you're running gcc. We would like to use something else, thanks.
90
if test "x${CFLAGS}" = "x-g -O2"
91
then
92
  CFLAGS=
93
fi
94
if test "x${CXXFLAGS}" = "x-g -O2"
95
then
96
  CXXFLAGS=
97
fi
98
1 by brian
clean slate
99
100
# Set all version vars based on $VERSION. How do we do this more elegant ?
101
# Remember that regexps needs to quote [ and ] since this is run through m4
102
# We take some made up examples
103
#
104
#  VERSION                  5.1.40sp1-alpha     5.0.34a
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
105
#  DRIZZLE_NO_DASH_VERSION    5.1.40sp1           5.0.34a
106
#  DRIZZLE_NUMERIC_VERSION    5.1.40              5.0.34
107
#  DRIZZLE_BASE_VERSION       5.1                 5.0
108
#  DRIZZLE_VERSION_ID         50140               50034
1 by brian
clean slate
109
#
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
110
DRIZZLE_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
111
DRIZZLE_NUMERIC_VERSION=`echo $DRIZZLE_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
112
DRIZZLE_BASE_VERSION=`echo $DRIZZLE_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
113
DRIZZLE_VERSION_ID=`echo $DRIZZLE_NUMERIC_VERSION | \
1 by brian
clean slate
114
    awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'`
115
116
# The port should be constant for a LONG time
301 by Brian Aker
Clean up port startup
117
DRIZZLE_TCP_PORT_DEFAULT=4427
1 by brian
clean slate
118
475 by Monty Taylor
Added m4 files for deficient systems. Changed include mechanism to not need
119
sinclude(m4/dtrace.m4)
202.3.14 by Monty Taylor
Moved m4 macros to top-level m4 dir, per GNU standards (and where gettext wanted it :)
120
sinclude(m4/character_sets.m4)
520.4.39 by mordred
Made a change to gettext.m4 to help building on solaris.
121
sinclude(m4/gettext.m4)
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
122
202.3.2 by Monty Taylor
Added gettext calls in to my_getopt.c and drizzle.c
123
AM_GNU_GETTEXT([external])
287.3.25 by Monty Taylor
Make autoreconf happy.
124
384 by Monty Taylor
Expanded po subdir trap to catch the case where we're setting programs to :.
125
AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
1 by brian
clean slate
126
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
127
AC_SUBST(DRIZZLE_NO_DASH_VERSION)
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
128
AC_DEFINE_UNQUOTED(DRIZZLE_BASE_VERSION,["$DRIZZLE_BASE_VERSION"],
129
                  [Major and minor version])
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
130
AC_SUBST(DRIZZLE_VERSION_ID)
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
131
AC_DEFINE_UNQUOTED([DRIZZLE_VERSION_ID],[$DRIZZLE_VERSION_ID],
132
		   [Version ID that can be easily used for numeric comparison])
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
133
AC_SUBST(DRIZZLE_PREVIOUS_BASE_VERSION)
1 by brian
clean slate
134
AC_SUBST(PROTOCOL_VERSION)
135
AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION],
136
                   [mysql client protocol version])
137
AC_SUBST(DOT_FRM_VERSION)
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
138
AC_DEFINE_UNQUOTED([FRM_VER], [$DOT_FRM_VERSION],
1 by brian
clean slate
139
                   [Version of .frm files])
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
140
AC_DEFINE_UNQUOTED([DRIZZLE_CONFIG_NAME],["drizzled"],[Name of server config section])
141
1 by brian
clean slate
142
AC_SUBST(SHARED_LIB_MAJOR_VERSION)
143
AC_SUBST(SHARED_LIB_VERSION)
144
AC_SUBST(AVAILABLE_LANGUAGES)
145
520.4.1 by Monty Taylor
Imported InnoDB plugin with changes.
146
dnl Ok. This is sort of lame, but we need to be nice to plugins Makefile.am's.
632.1.25 by Monty Taylor
Removed AM_CONDITIONAL from SEARCH_FOR_LIB. Aligned naming of AM_CONDITIONALS.
147
AM_CONDITIONAL(BUILD_DRIZZLE,[test "x" = "x"])
520.4.1 by Monty Taylor
Imported InnoDB plugin with changes.
148
149
390.1.6 by Monty Taylor
Oh dear god the changes. The changes. I'd tell you what they are, but I'd just be making stuff up. Suffice it to day it's mostly all around splitting files in libdrizzle into different files and removing interdepends. And whatever else I happened to see...
150
# General Constants
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 ])
1 by brian
clean slate
163
448 by Monty Taylor
Moved global defines to configure.ac.
164
AC_DEFINE([MASTER],[1],[Compile without unireg])
165
457 by Monty
Re-worked a few defines to work around old autoconf version.
166
AH_VERBATIM([QUOTE_ARG],[
167
/* Quote argument (before cpp) */
168
#ifndef QUOTE_ARG
169
# define QUOTE_ARG(x) #x
170
#endif
171
/* Quote argument, (after cpp) */
172
#ifndef STRINGIFY_ARG
173
# define STRINGIFY_ARG(x) QUOTE_ARG(x)
174
#endif
175
])
176
177
AH_VERBATIM([builtin_expect],[
178
/*
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
185
 */
186
#if !defined(__GNUC__)
187
#define __builtin_expect(x, expected_value) (x)
188
#endif
189
190
#define likely(x)  __builtin_expect((x),1)
191
#define unlikely(x)  __builtin_expect((x),0)
192
])
448 by Monty Taylor
Moved global defines to configure.ac.
193
441 by Monty Taylor
Move unconditional defines to config.h.
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.
197
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
200
dnl  InnoDB's use.
201
443 by Monty Taylor
Moved POSIX_PTHREAD flag.
202
AC_DEFINE([INNODB_COMPATIBILITY_HOOKS],[1],[TODO: Remove the need for this])
444 by Monty Taylor
Moved REENTRANT.
203
dnl TODO: Make a test for when this needs to be set.
204
AC_DEFINE([_REENTRANT],[1],[Some thread libraries require this])
443 by Monty Taylor
Moved POSIX_PTHREAD flag.
205
206
AH_VERBATIM([posix_pthread],[
207
/* We want posix threads */
208
#ifndef _POSIX_PTHREAD_SEMANTICS
209
#define _POSIX_PTHREAD_SEMANTICS
210
#endif
211
])
441 by Monty Taylor
Move unconditional defines to config.h.
212
213
1 by brian
clean slate
214
# Canonicalize the configuration name.
215
216
# Check whether --with-system-type or --without-system-type was given.
28.1.33 by Monty Taylor
Added -Wall
217
AC_ARG_WITH([system-type],
218
    [AS_HELP_STRING([--with-system-type],
219
       [Set the system type, like "sun-solaris10"])],
1 by brian
clean slate
220
    [SYSTEM_TYPE="$withval"],
221
    [SYSTEM_TYPE="$host_vendor-$host_os"])
28.1.33 by Monty Taylor
Added -Wall
222
AC_ARG_WITH([machine-type],
223
    [AS_HELP_STRING([--with-machine-type],
224
       [Set the machine type, like "powerpc"])],
1 by brian
clean slate
225
    [MACHINE_TYPE="$withval"],
226
    [MACHINE_TYPE="$host_cpu"])
227
AC_SUBST(SYSTEM_TYPE)
228
AC_DEFINE_UNQUOTED([SYSTEM_TYPE], ["$SYSTEM_TYPE"],
229
                   [Name of system, eg sun-solaris])
230
AC_SUBST(MACHINE_TYPE)
231
AC_DEFINE_UNQUOTED([MACHINE_TYPE], ["$MACHINE_TYPE"],
232
                   [Machine type name, eg sparc])
233
234
# Detect intel x86 like processor
235
BASE_MACHINE_TYPE=$MACHINE_TYPE
236
case $MACHINE_TYPE in
237
  i?86) BASE_MACHINE_TYPE=i386 ;;
238
esac
239
240
AM_SANITY_CHECK
241
# This is needed is SUBDIRS is set
242
AC_PROG_MAKE_SET
243
481.1.9 by Monty Taylor
Added autoconf tests for location of cstdint and cinttypes. Use those in C++ programs now, so that we don't have to define _STDC_LIMIT_MACROS, etc by hand. Stop, in fact, defining those by hand.
244
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
245
case "$target_os" in
246
  *linux*)
247
  TARGET_LINUX="true"
248
  AC_SUBST(TARGET_LINUX)
249
  AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
250
    ;;
271 by Brian Aker
OSX fix
251
  *apple-darwin*)
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
252
    TARGET_OSX="true"
253
    AC_SUBST(TARGET_OSX)
271 by Brian Aker
OSX fix
254
    AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX])
1 by brian
clean slate
255
    ;;
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
256
  *solaris*)
257
    TARGET_SOLARIS="true"
258
    AC_SUBST(TARGET_SOLARIS)
259
    AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
260
    ;;
1 by brian
clean slate
261
  *)
262
    ;;
263
esac
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
264
265
dnl AC_CANONICAL_HOST thinks it's a good idea to just set CFLAGS to 
266
dnl -g -O2 if you're running gcc. We would like to use something else, thanks.
267
if test "x${CFLAGS}" = "x-g -O2"
268
then
269
  CFLAGS=
270
fi
271
if test "x${CXXFLAGS}" = "x-g -O2"
272
then
273
  CXXFLAGS=
274
fi
275
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
276
DRIZZLE_CHECK_C_VERSION
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
277
DRIZZLE_CHECK_CXX_VERSION
1 by brian
clean slate
278
590.2.23 by Monty Taylor
Fixed a few things for solaris builds.
279
AC_SYS_LARGEFILE
280
230.3.1 by Monty Taylor
Bug 252805: ./configure not detecting missing g++
281
AC_PROG_AWK
282
28.1.33 by Monty Taylor
Added -Wall
283
if test "$ac_cv_c_compiler_gnu" = "yes"
1 by brian
clean slate
284
then
285
  AS="$CC -c"
286
  AC_SUBST(AS)
287
else
288
  AC_PATH_PROG(AS, as, as)
289
fi
290
446 by Monty Taylor
Moved GNU_SOURCE define to configure.
291
dnl TODO: This needs to go away and be replaced with _ISOC99_SOURCE
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
292
if test "$ac_cv_c_compiler_gnu" = "yes" -o "$target_os" = "linux-gnu"
446 by Monty Taylor
Moved GNU_SOURCE define to configure.
293
then
294
  AC_DEFINE([_GNU_SOURCE],[1],[Fix problem with S_ISLNK() on Linux])
295
fi
296
445 by Monty Taylor
Moved sun defines to configure.ac.
297
dnl  Solaris 9 include file <sys/feature_tests.h> refers to X/Open document
298
299
dnl  System Interfaces and Headers, Issue 5
300
301
dnl  saying we should define _XOPEN_SOURCE=500 to get POSIX.1c prototypes,
302
dnl  but apparently other systems (namely FreeBSD) don't agree.
303
304
dnl  On a newer Solaris 10, the above file recognizes also _XOPEN_SOURCE=600.
305
dnl  Furthermore, it tests that if a program requires older standard
306
dnl  (_XOPEN_SOURCE<600 or _POSIX_C_SOURCE<200112L) it cannot be
307
dnl  run on a new compiler (that defines _STDC_C99) and issues an #error.
308
dnl  It's also an #error if a program requires new standard (_XOPEN_SOURCE=600
309
dnl  or _POSIX_C_SOURCE=200112L) and a compiler does not define _STDC_C99.
310
311
dnl  To add more to this mess, Sun Studio C compiler defines _STDC_C99 while
312
dnl  C++ compiler does not!
313
455 by Monty Taylor
Rewored Sun C99 stuff in autoconf. (Trond... will this work?)
314
dnl TODO: Can _ISOC99_SOURCE be defined on all platforms and remove the 
315
dnl       Need for all of this? 
520.9.3 by mordred
zomg. Solaris actually builds all the way!!!
316
if test "$GCC" = "yes"
317
then
318
  case "$target_os" in
319
    *solaris*)
320
    CFLAGS="${CFLAGS} -D_XOPEN_SOURCE=600"
321
    CXXFLAGS="${CXXFLAGS} -D__C99FEATURES__"
322
    ;;
323
  esac
324
fi
445 by Monty Taylor
Moved sun defines to configure.ac.
325
1 by brian
clean slate
326
# We use libtool
327
AC_PROG_LIBTOOL
328
329
# Ensure that we have --preserve-dup-deps defines, otherwise we get link
330
# problems of 'mysql' with CXX=g++
331
LIBTOOL="$LIBTOOL --preserve-dup-deps"
332
AC_SUBST(LIBTOOL)dnl
333
334
AC_SUBST(NM)dnl
335
336
AC_PROG_INSTALL
337
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
338
579.1.1 by Toru Maesaka
Added tests for groupaad and useradd
339
# Look for "(group|user)add". 
340
# TODO: If the programs do not exist, inform the DBA that the user
341
#       was not created at the end of the install routine.
342
AC_CHECK_PROGS(GROUPADD, groupadd addgroup)
343
AC_CHECK_PROGS(USERADD, useradd adduser)
344
590.2.2 by Monty Taylor
Configure cleanups. Added generic search_for_lib m4 macro.
345
dnl Needed for ltmain
346
AC_PROG_RANLIB
347
348
dnl Not critical since the generated file is distributed
629.1.1 by Monty Taylor
More solaris fixes.
349
AC_CHECK_PROGS(YACC, ['bison -y'])
77.1.70 by Monty Taylor
Added a failure if you don't have bison and you're building from a .bzr branch.
350
if test -z "$YACC" && test -d ".bzr"
351
then
352
  AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
353
fi
1 by brian
clean slate
354
355
AC_PATH_PROG(uname_prog, uname, no)
356
357
# We should go through this and put all the explictly system dependent
358
# stuff in one place
359
AC_MSG_CHECKING(operating system)
360
AC_CACHE_VAL(mysql_cv_sys_os,
361
[
362
if test "$uname_prog" != "no"; then
363
  mysql_cv_sys_os="`uname`"
364
else
365
  mysql_cv_sys_os="Not Solaris"
366
fi
367
])
368
AC_MSG_RESULT($mysql_cv_sys_os)
369
370
371
# The following is required for portable results of floating point calculations
372
# on PowerPC. The same must also be done for IA-64, but this options is missing
373
# in the IA-64 gcc backend.
374
375
if test "$GCC" = "yes"
376
then
377
  case "$host_cpu" in
378
    *ppc* | *powerpc*)
287.3.28 by Monty Taylor
Expanded the move to AM_CFLAGS and AM_CXXFLAGS. Now we should be more correct.
379
      AM_CFLAGS="$CFLAGS -mno-fused-madd"
380
      AM_CXXFLAGS="$CXXFLAGS -mno-fused-madd"
1 by brian
clean slate
381
    ;;
382
  esac
383
fi
520.4.40 by mordred
Added an option to specify --with-probuf=<location>
384
# Build optimized or debug version ?
385
# First check for gcc and g++
386
SYMBOLS_FLAGS="-g"
387
DEBUG_OPTIMIZE_CC=""
388
OPTIMIZE_CFLAGS="-O"
389
DEBUG_OPTIMIZE_CXX=""
390
OPTIMIZE_CXXFLAGS="-O"
391
if test "$GCC" = "yes"
392
then
393
  SYMBOLS_FLAGS="-ggdb3"
394
  DEBUG_OPTIMIZE_CC="-O0"
395
  OPTIMIZE_CFLAGS="-O3"
396
  DEBUG_OPTIMIZE_CXX="-O0"
397
  OPTIMIZE_CXXFLAGS="-O3"
398
fi
399
if test "$SUNCC" = "yes"
400
then
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
401
  dnl I'm cheating here and sticking C99 support in SYMBOLS_FLAGS
402
  SYMBOLS_FLAGS=""
520.4.40 by mordred
Added an option to specify --with-probuf=<location>
403
  DEBUG_OPTIMIZE_CC=""
520.4.44 by mordred
A whole bunch of solaris/sun studio compile fixes.
404
  OPTIMIZE_CFLAGS="-xO4 -xlibmil -xdepend -Xa -mt -xstrconst -D_FORTEC_"
520.4.40 by mordred
Added an option to specify --with-probuf=<location>
405
  DEBUG_OPTIMIZE_CXX=""
520.9.1 by mordred
More solaris fixes.
406
  #Put back in once isnan is figured out
407
  OPTIMIZE_CXXFLAGS="-xO4 -xlibmil -mt -D_FORTEC_ -xlang=c99 -compat=5 -library=stlport4"
520.4.40 by mordred
Added an option to specify --with-probuf=<location>
408
fi
409
410
dnl TODO: Remove this define once we are using 2.61 across the board.
411
# AX_HEADER_ASSERT
412
# ----------------
413
# Check whether to enable assertions.
414
AC_DEFUN([AX_HEADER_ASSERT],
415
[
416
  AC_MSG_CHECKING([whether to enable assertions])
417
  AC_ARG_ENABLE([assert],
418
    [AS_HELP_STRING([--disable-assert],
419
       [Turn off assertions])],
420
    [ac_cv_assert="no"],
421
    [ac_cv_assert="yes"])
422
  AC_MSG_RESULT([$ac_cv_assert])
423
])
424
425
AX_HEADER_ASSERT
426
427
CFLAGS="${SYMBOLS_FLAGS} ${CFLAGS}"
428
CXXFLAGS="${SYMBOLS_FLAGS} ${CXXFLAGS}"
429
430
AC_ARG_WITH([debug],
431
    [AS_HELP_STRING([--with-debug],
432
       [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
433
    [with_debug=$withval],
434
    [with_debug=no])
435
if test "$with_debug" = "yes"
436
then
437
  # Medium debug.
438
  CFLAGS="$DEBUG_OPTIMIZE_CC -DDEBUG $CFLAGS ${SAVE_CFLAGS}"
439
  CXXFLAGS="$DEBUG_OPTIMIZE_CXX -DDEBUG $CXXFLAGS ${SAVE_CXXFLAGS}"
440
else
441
  # Optimized version. No debug
442
  CFLAGS="${OPTIMIZE_CFLAGS} ${CFLAGS} ${SAVE_CFLAGS}"
443
  CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS ${SAVE_CXXFLAGS}"
444
fi
1 by brian
clean slate
445
446
AC_SUBST(CC)
447
AC_SUBST(CFLAGS)
448
AC_SUBST(CXX)
449
AC_SUBST(CXXFLAGS)
450
AC_SUBST(ASFLAGS)
451
AC_SUBST(LD)
452
AC_SUBST(INSTALL_SCRIPT)
453
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
454
1 by brian
clean slate
455
export CC CXX CFLAGS LD LDFLAGS AR ARFLAGS
456
520.4.44 by mordred
A whole bunch of solaris/sun studio compile fixes.
457
AC_CXX_STL_HASH
458
AC_CXX_CSTDINT
459
AC_CXX_CINTTYPES
460
AC_CXX_CMATH
1 by brian
clean slate
461
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
462
DRIZZLE_PROG_AR
1 by brian
clean slate
463
261.2.3 by Monty Taylor
Moved libdrizzle.ver.in to libdrizzle.ver.
464
# libdrizzle versioning when linked with GNU ld.
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
465
if test "x$EGREP" != "x"
466
then
467
  if test "$lt_cv_prog_gnu_ld" = "yes" -a $LD --version 2>/dev/null|${EGREP} -q GNU
468
  then
469
    LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libdrizzle/libdrizzle.ver"
470
  fi
1 by brian
clean slate
471
fi
472
AC_SUBST(LD_VERSION_SCRIPT)
473
287.3.30 by Monty Taylor
Added step one of finding libprotobuf.
474
#--------------------------------------------------------------------
475
# Check for Google Proto Buffers
476
#--------------------------------------------------------------------
477
629.2.4 by Monty Taylor
Cleaned up the lib searching - now base some searches off of the prefix.
478
AC_LANG_PUSH([C++])
479
SEARCH_FOR_LIB(protobuf, printf, google/protobuf/message.h,
480
               AC_MSG_ERROR([protobuf is required for Drizzle]))
481
482
AC_PATH_PROG([PROTOC],[protoc],[no],[$PROTOBUF_PATH])
520.4.47 by Monty Taylor
Added check for protoc to protobuf checks.
483
if test "x$PROTOC" = "xno"
484
then
485
  AC_MSG_ERROR([Couldn't find protoc. Try installing Google Protocol Buffer.])
486
fi
487
287.3.30 by Monty Taylor
Added step one of finding libprotobuf.
488
AC_LANG_POP()
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
489
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
490
#--------------------------------------------------------------------
520.4.27 by Monty Taylor
Fail if we don't find uuid/uuid.h.
491
# Check for libuuid
492
#--------------------------------------------------------------------
493
590.2.13 by Monty Taylor
Reverted libuuid check code.
494
dnl Do this by hand instead of with SEARCH_FOR_LIB, because uuid is weird.
495
AC_CHECK_HEADERS(uuid/uuid.h)
496
if test "x$ac_cv_header_uuid_uuid_h" = "xno"
497
then
498
  AC_MSG_ERROR([Couldn't find uuid/uuid.h. Try installing libuuid development packages])
499
fi
500
AC_CHECK_LIB(uuid, uuid_generate)
520.4.27 by Monty Taylor
Fail if we don't find uuid/uuid.h.
501
502
#--------------------------------------------------------------------
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
503
# Check for libevent
504
#--------------------------------------------------------------------
505
590.2.2 by Monty Taylor
Configure cleanups. Added generic search_for_lib m4 macro.
506
SEARCH_FOR_LIB(event, event_loop, event.h, 
507
               AC_MSG_ERROR([libevent is required for Drizzle]))
508
134.2.1 by Antony Curtis
Changes for proper detection of libraries
509
590.2.4 by Monty Taylor
ac_cv_libevent_works needs to be named right.
510
AC_CACHE_CHECK([for bufferevent in libevent], ac_cv_libevent_works, [
573.1.1 by mozo at mozo
Fix build and indents
511
  save_CPPFLAGS="$CPPFLAGS"
134.2.1 by Antony Curtis
Changes for proper detection of libraries
512
  save_LIBS="$LIBS"
629.2.4 by Monty Taylor
Cleaned up the lib searching - now base some searches off of the prefix.
513
  CPPFLAGS="$EVENT_CFLAGS"
590.2.2 by Monty Taylor
Configure cleanups. Added generic search_for_lib m4 macro.
514
  LIBS="$EVENT_LIBS"
134.2.1 by Antony Curtis
Changes for proper detection of libraries
515
  AC_TRY_LINK([
516
#include <sys/types.h>
517
#include <sys/time.h>
518
#include <stdlib.h>
519
#include <event.h>],[
520
	struct bufferevent bev;
521
	bufferevent_settimeout(&bev, 1, 1);
590.2.4 by Monty Taylor
ac_cv_libevent_works needs to be named right.
522
  ], ac_cv_libevent_works=yes, [
590.2.2 by Monty Taylor
Configure cleanups. Added generic search_for_lib m4 macro.
523
        AC_MSG_ERROR([you need to install a more recent version of libevent,
134.2.1 by Antony Curtis
Changes for proper detection of libraries
524
	check http://www.monkey.org/~provos/libevent/])
525
  ])
526
573.1.1 by mozo at mozo
Fix build and indents
527
  CPPFLAGS="$save_CPPFLAGS"
134.2.1 by Antony Curtis
Changes for proper detection of libraries
528
  LIBS="$save_LIBS"
529
])
530
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
531
532
#--------------------------------------------------------------------
533
# Check for libpthread
534
#--------------------------------------------------------------------
535
536
AC_CHECK_HEADERS(pthread.h)
537
if test "x$ac_cv_header_pthread_h" != "xyes"
538
then
539
  AC_MSG_ERROR([Couldn't find pthread.h.])
540
fi
541
AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR(could not find libpthread)])
542
543
#--------------------------------------------------------------------
612.2.5 by Monty Taylor
Added test for mtmalloc, if we haven't explicitly asked for tcmalloc.
544
# Check for tcmalloc/mtmalloc
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
545
#--------------------------------------------------------------------
546
547
AC_ARG_ENABLE([tcmalloc],
548
    [AS_HELP_STRING([--enable-tcmalloc],
549
       [Enable linking with tcmalloc @<:@default=off@:>@])],
236.1.14 by Monty Taylor
Merged build changes from Antony.
550
    [ac_enable_tcmalloc="$enableval"],
551
    [ac_enable_tcmalloc="no"])
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
552
612.2.5 by Monty Taylor
Added test for mtmalloc, if we haven't explicitly asked for tcmalloc.
553
if test "x$ac_enable_tcmalloc" != "xno"
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
554
then
555
  AC_CHECK_LIB(tcmalloc,malloc,[],[])
556
fi
557
612.2.5 by Monty Taylor
Added test for mtmalloc, if we haven't explicitly asked for tcmalloc.
558
if test "x$ac_cv_lib_tcmalloc_malloc" != "xyes"
559
then
560
  AC_CHECK_LIB(mtmalloc,malloc,[],[])
561
fi
562
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
563
#--------------------------------------------------------------------
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
564
# Check for libz
565
#--------------------------------------------------------------------
566
590.2.2 by Monty Taylor
Configure cleanups. Added generic search_for_lib m4 macro.
567
SEARCH_FOR_LIB(z, crc32, zlib.h, 
568
               AC_MSG_ERROR([libz is required for Drizzle]))
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
569
612.2.9 by Monty Taylor
Woot. No more extra CFLAGS on the command line!
570
#--------------------------------------------------------------------
571
# Check for libncurses
572
#--------------------------------------------------------------------
573
574
635.1.4 by Elan Ruusamäe
- search for tgetent from -ltinfo too
575
SEARCH_FOR_LIB(ncurses, tgetent, ncurses/ncurses.h, [
576
	SEARCH_FOR_LIB(tinfo, tgetent, ncurses/ncurses.h,
577
		AC_MSG_ERROR([Couldn't find ncurses])
578
	)
579
	]
580
)
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
581
182.1.5 by Jim Winstead
Detect and make the Mac OS X libedit readline interface look like the
582
#--------------------------------------------------------------------
583
# Check for libreadline or compatible (libedit on Mac OS X)
584
#--------------------------------------------------------------------
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
585
612.2.9 by Monty Taylor
Woot. No more extra CFLAGS on the command line!
586
587
SEARCH_FOR_LIB(readline, rl_initialize, readline/readline.h,
588
               AC_MSG_ERROR([libreadline is required for Drizzle]),
589
               [$NCURSES_LIBS]) 
590
591
save_CPPFLAGS="$CPPFLAGS"
629.2.8 by Monty Taylor
Fixed a configure oops.
592
CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
612.2.9 by Monty Taylor
Woot. No more extra CFLAGS on the command line!
593
AC_CHECK_HEADERS(readline/history.h)
236.1.14 by Monty Taylor
Merged build changes from Antony.
594
AC_CHECK_TYPES([HIST_ENTRY], [], [], [AC_INCLUDES_DEFAULT[
595
#ifdef HAVE_READLINE_HISTORY_H
596
#include <readline/history.h>
597
#endif
598
#include <readline/readline.h>
599
]])
600
AC_CHECK_DECLS([completion_matches], [], [], [AC_INCLUDES_DEFAULT[
601
#ifdef HAVE_READLINE_HISTORY_H
602
#include <readline/history.h>
603
#endif
604
#include <readline/readline.h>
605
]])
207.1.2 by Jim Winstead
Fix test for libreadline to test a function that exists in all usable
606
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
607
DRIZZLE_CHECK_NEW_RL_INTERFACE
612.2.9 by Monty Taylor
Woot. No more extra CFLAGS on the command line!
608
CPPFLAGS="$save_CPPFLAGS"
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
609
287.3.30 by Monty Taylor
Added step one of finding libprotobuf.
610
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
611
#--------------------------------------------------------------------
612
# Check for libpcre
613
#--------------------------------------------------------------------
614
615
AC_PATH_PROG(PKG_CONFIG, pkg-config, AC_MSG_ERROR([pkg-config wasn't found.]))
612.2.7 by Monty Taylor
Switched from pcrecpp to plain pcre - mainly so that we can build on OpenSolaris without dealing with G++ vs. SunStudio C++. This all goes away with new test framework - so I did not write pretty replacement code.
616
PKG_CHECK_MODULES(PCRE, [libpcre >= 3], [found_pcre="yes"],[found_pcre="no"])
236.1.18 by Monty Taylor
Put in actual PCRE linking test.
617
618
if test "$found_pcre" = "no"
619
then
612.2.7 by Monty Taylor
Switched from pcrecpp to plain pcre - mainly so that we can build on OpenSolaris without dealing with G++ vs. SunStudio C++. This all goes away with new test framework - so I did not write pretty replacement code.
620
  SEARCH_FOR_LIB(pcre, pcre_compile, pcre.h, 
621
                 AC_MSG_ERROR([libpcre is required for Drizzle]))
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
622
fi
623
AC_SUBST(PCRE_LIBS)
624
AC_SUBST(PCRE_CFLAGS)
625
1 by brian
clean slate
626
dnl Find paths to some shell programs
627
AC_PATH_PROG(LN, ln, ln)
628
# This must be able to take a -f flag like normal unix ln.
629
AC_PATH_PROG(LN_CP_F, ln, ln)
630
631
AC_PATH_PROG(MV, mv, mv)
632
AC_PATH_PROG(RM, rm, rm)
633
AC_PATH_PROG(CP, cp, cp)
634
AC_PATH_PROG(SED, sed, sed)
635
AC_PATH_PROG(CMP, cmp, cmp)
636
AC_PATH_PROG(CHMOD, chmod, chmod)
637
AC_PATH_PROG(HOSTNAME, hostname, hostname)
638
# Check for a GNU tar named 'gtar', or 'gnutar' (MacOS X) and
639
# fall back to 'tar' otherwise and hope that it's a GNU tar as well
640
AC_CHECK_PROGS(TAR, gnutar gtar tar)
641
642
dnl We use a path for perl so the script startup works
643
dnl We make sure to use perl, not perl5, in hopes that the RPMs will
644
dnl not depend on the perl5 binary being installed (probably a bug in RPM)
645
AC_PATH_PROG(PERL, perl, no)
646
if test "$PERL" != "no" && $PERL -e 'require 5' > /dev/null 2>&1
647
then
648
  PERL5=$PERL
649
else
650
  AC_PATH_PROG(PERL5, perl5, no)
651
  if test "$PERL5" != no
652
  then
653
    PERL=$PERL5
654
    ac_cv_path_PERL=$ac_cv_path_PERL5
655
  fi
656
fi
657
658
AC_SUBST(HOSTNAME)
659
AC_SUBST(PERL)
660
AC_SUBST(PERL5)
661
662
# icheck, used for ABI check
663
AC_PATH_PROG(ICHECK, icheck, no)
664
# "icheck" is also the name of a file system check program on Tru64.
665
# Verify the program found is really the interface checker.
666
if test "x$ICHECK" != "xno"
667
then
668
  AC_MSG_CHECKING(if $ICHECK works as expected)
669
  echo "int foo;" > conftest.h
670
  $ICHECK --canonify -o conftest.ic conftest.h 2>/dev/null
671
  if test -f "conftest.ic"
672
  then
673
    AC_MSG_RESULT(yes)
674
  else
675
    AC_MSG_RESULT(no)
676
    ICHECK=no
677
  fi
678
  rm -f conftest.ic conftest.h
679
fi
680
AC_SUBST(ICHECK)
681
682
# Lock for PS
683
AC_PATH_PROG(PS, ps, ps)
684
AC_MSG_CHECKING("how to check if pid exists")
685
PS=$ac_cv_path_PS
686
# Linux style
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
687
if $PS p $$ 2> /dev/null | grep `echo $0 | sed s/\-//` > /dev/null
1 by brian
clean slate
688
then
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
689
  FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
1 by brian
clean slate
690
# Solaris
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
691
elif $PS -fp $$ 2> /dev/null | grep $0 > /dev/null
1 by brian
clean slate
692
then
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
693
  FIND_PROC="$PS -p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
1 by brian
clean slate
694
# BSD style
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
695
elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
1 by brian
clean slate
696
then
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
697
  FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
1 by brian
clean slate
698
# SysV style
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
699
elif $PS -ef 2> /dev/null | grep $0 > /dev/null
1 by brian
clean slate
700
then
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
701
  FIND_PROC="$PS -ef | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
1 by brian
clean slate
702
# Do anybody use this?
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
703
elif $PS $$ 2> /dev/null | grep $0 > /dev/null
1 by brian
clean slate
704
then
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
705
  FIND_PROC="$PS \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
1 by brian
clean slate
706
else
707
  case $SYSTEM_TYPE in
394 by Monty Taylor
Fix configure problem on cygwin. Thanks awfief.
708
    *freebsd*|*dragonfly*|*cygwin*)
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
709
      FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
1 by brian
clean slate
710
      ;;
711
    *darwin*)
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
712
      FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
1 by brian
clean slate
713
      ;;
714
    *)
715
      AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
236.1.39 by Monty Taylor
autoconf warning cleanups.
716
      ;;
1 by brian
clean slate
717
  esac
718
fi
719
AC_SUBST(FIND_PROC)
720
AC_MSG_RESULT("$FIND_PROC")
721
722
# Check if a pid is valid
723
AC_PATH_PROG(KILL, kill, kill)
724
AC_MSG_CHECKING("for kill switches")
725
if $ac_cv_path_KILL -0 $$
726
then
727
  CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
728
elif kill -s 0 $$
729
then
730
  CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
731
else
732
  AC_MSG_WARN([kill -0 to check for pid seems to fail])
733
    CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
734
fi
735
AC_SUBST(CHECK_PID)
736
AC_MSG_RESULT("$CHECK_PID")
737
738
# We need an ANSI C compiler
739
AM_PROG_CC_STDC
740
741
# We need an assembler, too
742
AM_PROG_AS
743
CCASFLAGS="$CCASFLAGS $ASFLAGS"
744
745
# Check if we need noexec stack for assembler
746
AC_CHECK_NOEXECSTACK
747
748
if test "$am_cv_prog_cc_stdc" = "no"
749
then
91 by Brian Aker
Main binary now named drizzled
750
  AC_MSG_ERROR([Drizzle requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
1 by brian
clean slate
751
fi
752
753
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
754
AC_ARG_WITH([server-suffix],
755
    [AS_HELP_STRING([--with-server-suffix],
756
      [Append value to the version string.])],
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
757
    [ DRIZZLE_SERVER_SUFFIX=`echo "$withval" | sed -e  's/^\(...................................\)..*$/\1/'` ],
758
    [ DRIZZLE_SERVER_SUFFIX= ]
1 by brian
clean slate
759
    )
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
760
AC_DEFINE_UNQUOTED([DRIZZLE_SERVER_SUFFIX],[$DRIZZLE_SERVER_SUFFIX],
761
                   [Append value to the version string])
1 by brian
clean slate
762
763
# Force use of a curses libs
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
764
AC_ARG_WITH([named-curses-libs],
765
    [AS_HELP_STRING([--with-named-curses-libs=ARG],
766
            [Use specified curses libraries instead of those
767
		automatically found by configure.])],
1 by brian
clean slate
768
    [ with_named_curses=$withval ],
769
    [ with_named_curses=no ]
770
    )
771
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
772
AC_ARG_WITH([tcp-port],
773
    [AS_HELP_STRING([--with-tcp-port=port-number],
165.1.1 by Elliot Murphy
new port number from IANA
774
            [Which port to use for Drizzle services @<:@default=4427@:>@])],
301 by Brian Aker
Clean up port startup
775
    [ DRIZZLE_TCP_PORT=$withval ],
776
    [ DRIZZLE_TCP_PORT=$DRIZZLE_TCP_PORT_DEFAULT
1 by brian
clean slate
777
      # if we actually defaulted (as opposed to the pathological case of
301 by Brian Aker
Clean up port startup
778
      # --with-tcp-port=<DRIZZLE_TCP_PORT_DEFAULT> which might in theory
1 by brian
clean slate
779
      # happen if whole batch of servers was built from a script), set
780
      # the default to zero to indicate that; we don't lose information
781
      # that way, because 0 obviously indicates that we can get the
301 by Brian Aker
Clean up port startup
782
      # default value from DRIZZLE_TCP_PORT. this seems really evil, but
783
      # testing for DRIZZLE_TCP_PORT==DRIZZLE_TCP_PORT_DEFAULT would make a
784
      # a port of DRIZZLE_TCP_PORT_DEFAULT magic even if the builder did not
1 by brian
clean slate
785
      # intend it to mean "use the default, in fact, look up a good default
165.1.1 by Elliot Murphy
new port number from IANA
786
      # from /etc/services if you can", but really, really meant 4427 when
787
      # they passed in 4427. When they pass in a specific value, let them
1 by brian
clean slate
788
      # have it; don't second guess user and think we know better, this will
789
      # just make people cross.  this makes the the logic work like this
790
      # (which is complicated enough):
791
      #
792
      # - if a port was set during build, use that as a default.
793
      #
794
      # - otherwise, try to look up a port in /etc/services; if that fails,
301 by Brian Aker
Clean up port startup
795
      #   use DRIZZLE_TCP_PORT_DEFAULT (at the time of this writing 4427)
1 by brian
clean slate
796
      #
301 by Brian Aker
Clean up port startup
797
      # - allow the DRIZZLE_TCP_PORT environment variable to override that.
1 by brian
clean slate
798
      #
799
      # - allow command-line parameters to override all of the above.
800
      #
301 by Brian Aker
Clean up port startup
801
      # the top-most DRIZZLE_TCP_PORT_DEFAULT is read from win/configure.js,
1 by brian
clean slate
802
      # so don't mess with that.
301 by Brian Aker
Clean up port startup
803
      DRIZZLE_TCP_PORT_DEFAULT=0 ]
1 by brian
clean slate
804
    )
301 by Brian Aker
Clean up port startup
805
AC_SUBST(DRIZZLE_TCP_PORT)
1 by brian
clean slate
806
# We might want to document the assigned port in the manual.
301 by Brian Aker
Clean up port startup
807
AC_SUBST(DRIZZLE_TCP_PORT_DEFAULT)
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
808
AC_DEFINE_UNQUOTED([DRIZZLE_PORT],[$DRIZZLE_TCP_PORT],
809
                   [Drizzle port to use])
810
AC_DEFINE_UNQUOTED([DRIZZLE_PORT_DEFAULT],[$DRIZZLE_TCP_PORT_DEFAULT],
811
		   [If we defaulted to DRIZZLE_PORT, then this will be zero])
1 by brian
clean slate
812
813
# Use this to set the place used for unix socket used to local communication.
572.2.1 by ysano
Replace --with-mysqld-user configure option with --with-drizzled-user.
814
AC_ARG_WITH([drizzled-user],
815
    [AS_HELP_STRING([--with-drizzled-user=username],
816
            [What user the drizzled daemon shall be run as.
817
		@<:@default=drizzle@:>@])],
818
    [ DRIZZLED_USER=$withval ],
819
    [ DRIZZLED_USER=drizzle ]
1 by brian
clean slate
820
    )
572.2.1 by ysano
Replace --with-mysqld-user configure option with --with-drizzled-user.
821
AC_SUBST(DRIZZLED_USER)
1 by brian
clean slate
822
823
# If we should allow LOAD DATA LOCAL
824
AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default)
825
AC_ARG_ENABLE(local-infile,
826
    [  --enable-local-infile   Enable LOAD DATA LOCAL INFILE (default: disabled)],
827
    [ ENABLED_LOCAL_INFILE=$enableval ],
828
    [ ENABLED_LOCAL_INFILE=no ]
829
    )
830
if test "$ENABLED_LOCAL_INFILE" = "yes"
831
then
832
  AC_MSG_RESULT([yes])
833
  AC_DEFINE([ENABLED_LOCAL_INFILE], [1],
834
            [If LOAD DATA LOCAL INFILE should be enabled by default])
835
else
836
  AC_MSG_RESULT([no])
837
fi
838
839
# Types that must be checked AFTER large file support is checked
840
AC_TYPE_SIZE_T
841
842
#--------------------------------------------------------------------
843
# Check for system header files
844
#--------------------------------------------------------------------
845
846
AC_HEADER_DIRENT
847
AC_HEADER_STDC
848
AC_HEADER_SYS_WAIT
53.2.2 by Monty Taylor
Updated everything that needs updating to compile with -std=gnu99 -pedantic
849
AC_HEADER_STDBOOL
77.1.22 by Monty Taylor
Removed refs to floatingpoint.h (which we only used for fconvert) and fconvert
850
AC_CHECK_HEADERS(fcntl.h float.h fpu_control.h ieeefp.h)
53.2.29 by Monty Taylor
Cleaned up headers a little more.
851
AC_CHECK_HEADERS(limits.h pwd.h select.h linux/config.h)
852
AC_CHECK_HEADERS(sys/fpu.h utime.h sys/utime.h )
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
853
AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h)
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
854
AC_CHECK_HEADERS([curses.h term.h],[],[],
855
[[#ifdef HAVE_CURSES_H
856
# include <curses.h>
857
#endif
858
]])
202.1.4 by Monty Taylor
Removed openssl refs.
859
AC_CHECK_HEADERS(termio.h termios.h sched.h alloca.h)
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
860
AC_CHECK_HEADERS(sys/prctl.h ieeefp.h)
53.2.29 by Monty Taylor
Cleaned up headers a little more.
861
AC_CHECK_HEADERS(execinfo.h)
1 by brian
clean slate
862
77.1.31 by Monty Taylor
Replaced regex lib with pcre. Reworked mysqltest to use it.
863
#--------------------------------------------------------------------
1 by brian
clean slate
864
# Check for system libraries. Adds the library to $LIBS
865
# and defines HAVE_LIBM etc
866
#--------------------------------------------------------------------
867
868
AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
869
236.1.39 by Monty Taylor
autoconf warning cleanups.
870
AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)])
871
AC_CHECK_FUNC(yp_get_default_domain, [],
872
  [AC_CHECK_LIB(nsl, yp_get_default_domain)])
873
AC_CHECK_FUNC(p2open, [], [AC_CHECK_LIB(gen, p2open)])
1 by brian
clean slate
874
# This may get things to compile even if bind-8 is installed
236.1.39 by Monty Taylor
autoconf warning cleanups.
875
AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)])
1 by brian
clean slate
876
# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
877
AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
878
879
# Check rt for aio_read
880
AC_CHECK_LIB(rt, aio_read)
881
882
# For the sched_yield() function on Solaris
236.1.39 by Monty Taylor
autoconf warning cleanups.
883
AC_CHECK_FUNC(sched_yield, [],
884
  [AC_CHECK_LIB(posix4, [sched_yield],
885
    [AC_DEFINE(HAVE_SCHED_YIELD) LIBS="$LIBS -lposix4"])])
1 by brian
clean slate
886
887
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
888
then
236.1.39 by Monty Taylor
autoconf warning cleanups.
889
  AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)])
1 by brian
clean slate
890
fi
891
892
AC_CHECK_TYPES([fp_except], [], [], [
893
#include <sys/types.h>
894
#include <ieeefp.h>
895
])
896
25 by Brian Aker
Clean up of configure.in
897
my_save_LIBS="$LIBS"
898
LIBS=""
899
AC_CHECK_LIB(dl,dlopen)
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
900
AC_CHECK_FUNCS(dlopen)
177.3.1 by mark
remove ifdef HAVE_DLOPEN, make configure require dlopen()
901
if test "$ac_cv_func_dlopen" != "yes"
902
then
903
  AC_MSG_ERROR([Drizzle requires dlopen])
904
fi
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
905
LIBDL_LIBS="$LIBS"
25 by Brian Aker
Clean up of configure.in
906
LIBS="$my_save_LIBS"
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
907
AC_SUBST(LIBDL_LIBS)
25 by Brian Aker
Clean up of configure.in
908
909
AC_CHECK_FUNCS(strtok_r)
1 by brian
clean slate
910
201.2.4 by Monty Taylor
Re-enabled optimizations for the normal build, and added back the --with-debug option to turn them off.
911
912
1 by brian
clean slate
913
AC_ARG_WITH([fast-mutexes],
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
914
    [AS_HELP_STRING([--with-fast-mutexes],
915
	    [Compile with fast mutexes  @<:@default=off@:>@])],
916
    [with_fast_mutexes=$withval],
917
    [with_fast_mutexes=no])
1 by brian
clean slate
918
919
if test "$with_fast_mutexes" != "no"
920
then
51.3.26 by Jay Pipes
Final removal of DBUG library and cleanup of Makefiles
921
	AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1], 
922
			[Define to 1 if you want to use fast mutexes])
1 by brian
clean slate
923
fi
924
236.1.56 by Monty Taylor
Made build of thr_mutex.c conditional on --with-fast-mutexes, since that's
925
AM_CONDITIONAL(BUILD_FAST_MUTEX,[test "$with_fast_mutexes" != "no"])
926
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
927
AC_ARG_WITH([comment],
928
    [AS_HELP_STRING([--with-comment],
929
            [Comment about compilation environment. @<:@default=off@:>@])],
1 by brian
clean slate
930
    [with_comment=$withval],
931
    [with_comment=no])
932
if test "$with_comment" != "no"
933
then
934
  COMPILATION_COMMENT=$with_comment
935
else
936
  COMPILATION_COMMENT="Source distribution"
937
fi
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
938
AC_DEFINE_UNQUOTED([COMPILATION_COMMENT],["$COMPILATION_COMMENT"],
939
                   [Comment about compilation environment])
1 by brian
clean slate
940
941
dnl Checks for typedefs, structures, and compiler characteristics.
942
AC_C_CONST
943
AC_C_INLINE
590.2.2 by Monty Taylor
Configure cleanups. Added generic search_for_lib m4 macro.
944
AC_C_VOLATILE
1 by brian
clean slate
945
AC_TYPE_OFF_T
946
AC_HEADER_TIME
947
AC_STRUCT_TM
948
# off_t is not a builtin type
949
AC_CHECK_SIZEOF(off_t, 4)
950
if test "$ac_cv_sizeof_off_t" -eq 0
951
then
91 by Brian Aker
Main binary now named drizzled
952
  AC_MSG_ERROR("Drizzle needs a off_t type.")
1 by brian
clean slate
953
fi
954
955
dnl
956
dnl check if time_t is unsigned
957
dnl
958
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
959
DRIZZLE_CHECK_TIME_T
1 by brian
clean slate
960
961
962
# This always gives a warning. Ignore it unless you are cross compiling
963
AC_C_BIGENDIAN
964
#---START: Used in for client configure
965
# Check base type of last arg to accept
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
966
DRIZZLE_TYPE_ACCEPT
1 by brian
clean slate
967
#---END:
968
# Figure out what type of struct rlimit to use with setrlimit
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
969
DRIZZLE_TYPE_STRUCT_RLIMIT
1 by brian
clean slate
970
# Find where the stack goes
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
971
DRIZZLE_STACK_DIRECTION
1 by brian
clean slate
972
# We want to skip alloca on irix unconditionally. It may work on some version..
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
973
DRIZZLE_FUNC_ALLOCA
1 by brian
clean slate
974
# Do struct timespec have members tv_sec or ts_sec
236.1.24 by Monty Taylor
Renamed MYSQL_TIME to DRIZZLE_TIME.
975
DRIZZLE_TIMESPEC_TS
1 by brian
clean slate
976
# Do we have the tzname variable
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
977
DRIZZLE_TZNAME
1 by brian
clean slate
978
AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
520.4.43 by mordred
A set of Solaris fixes.
979
AC_CHECK_TYPES([uint, ulong])
1 by brian
clean slate
980
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
981
DRIZZLE_PTHREAD_YIELD
1 by brian
clean slate
982
134.2.1 by Antony Curtis
Changes for proper detection of libraries
983
1 by brian
clean slate
984
dnl Checks for header files.
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
985
AC_CHECK_HEADERS(malloc.h)
1 by brian
clean slate
986
987
dnl Checks for library functions.
988
AC_FUNC_ALLOCA
989
AC_PROG_GCC_TRADITIONAL
990
AC_TYPE_SIGNAL
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
991
1 by brian
clean slate
992
AC_CHECK_FUNCS(issetugid)
993
994
# from old readline settting:
995
996
MAKE_SHELL=/bin/sh
997
AC_SUBST(MAKE_SHELL)
998
999
# Already-done: stdlib.h string.h unistd.h termios.h
398.1.9 by Monty Taylor
Cleaned up stuff out of global.h.
1000
AC_CHECK_HEADERS(stdarg.h dirent.h locale.h ndir.h sys/dir.h \
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
1001
 sys/ndir.h sys/select.h \
1002
 sys/mman.h termcap.h termio.h asm/termbits.h grp.h \
1003
 paths.h)
1 by brian
clean slate
1004
1005
# Already-done: strcasecmp
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
1006
AC_CHECK_FUNCS(lstat select)
1 by brian
clean slate
1007
28.1.33 by Monty Taylor
Added -Wall
1008
AC_HEADER_STAT
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
1009
DRIZZLE_SIGNAL_CHECK
1010
DRIZZLE_CHECK_GETPW_FUNCS
1011
DRIZZLE_HAVE_TIOCGWINSZ
1012
DRIZZLE_HAVE_TIOCSTAT
1013
DRIZZLE_TYPE_SIGHANDLER
1 by brian
clean slate
1014
if test "$with_named_curses" = "no"
1015
then
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
1016
  DRIZZLE_CHECK_LIB_TERMCAP
1 by brian
clean slate
1017
else
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
1018
  TERMCAP_LIBS="$with_named_curses"
1 by brian
clean slate
1019
fi
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
1020
AC_SUBST(TERMCAP_LIBS)
1 by brian
clean slate
1021
1022
# End of readline/libedit stuff
1023
#########################################################################
1024
1025
dnl Checks for library functions.
1026
1027
#
1028
# The following code disables intrinsic function support while we test for
1029
# library functions.  This is to avoid configure problems with Intel ecc
1030
# compiler
1031
1032
ORG_CFLAGS="$CFLAGS"
1033
if test "$GCC" != "yes"; then
1034
  AC_SYS_COMPILER_FLAG(-nolib_inline,nolib_inline,CFLAGS,[],[])
1035
fi
1036
1037
#AC_FUNC_MMAP
1038
AC_TYPE_SIGNAL
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
1039
DRIZZLE_TYPE_QSORT
1 by brian
clean slate
1040
AC_FUNC_UTIME_NULL
1041
AC_FUNC_VPRINTF
1042
77.1.24 by Monty Taylor
Removed non-fcntl code and made it a fatal configure error if it's not there.
1043
AC_CHECK_FUNCS(fcntl)
1044
if test "x$ac_cv_func_fcntl" != "xyes"
1045
then
1046
  AC_MSG_ERROR("Drizzle requires fcntl.")
1047
fi
1048
236.1.50 by Monty Taylor
Added automake conditional compilation of distributed system replacement functions.
1049
AC_CONFIG_LIBOBJ_DIR([mystrings])
1050
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
1051
AC_CHECK_FUNCS( \
77.1.24 by Monty Taylor
Removed non-fcntl code and made it a fatal configure error if it's not there.
1052
  cuserid fchmod \
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
1053
  fdatasync fpresetsticky fpsetmask fsync \
575.4.6 by Monty Taylor
Removed my_getwd.
1054
  getpassphrase getpwnam \
1055
  getpwuid getrlimit getrusage index initgroups isnan \
1 by brian
clean slate
1056
  localtime_r gethrtime gmtime_r \
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
1057
  madvise \
1058
  mkstemp mlockall poll pread pthread_attr_create mmap mmap64 \
1 by brian
clean slate
1059
  pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
1060
  pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
1061
  pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
1062
  pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
449 by Monty Taylor
Removed rint check - rint is part of C99.
1063
  realpath rename rwlock_init setupterm \
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
1064
  sigaction \
1065
  sigthreadmask \
1066
  snprintf strpbrk \
1067
  tell tempnam \
1068
  backtrace backtrace_symbols backtrace_symbols_fd)
1 by brian
clean slate
1069
287.3.18 by Monty Taylor
Put -fno-exceptions flag in selectively. Add back HAVE_DECL_MADVISE check so
1070
AC_LANG_PUSH(C++)
1071
# Test whether madvise() is declared in C++ code -- it is not on some
1072
# systems, such as Solaris
373.1.3 by Monty Taylor
Fixed test for HAVE_DECL_MADVISE to actually work.
1073
AC_CHECK_DECLS([madvise], [], [], [AC_INCLUDES_DEFAULT[
1074
#if HAVE_SYS_MMAN_H
287.3.18 by Monty Taylor
Put -fno-exceptions flag in selectively. Add back HAVE_DECL_MADVISE check so
1075
#include <sys/types.h>
1076
#include <sys/mman.h>
373.1.3 by Monty Taylor
Fixed test for HAVE_DECL_MADVISE to actually work.
1077
#endif
1078
]])
287.3.18 by Monty Taylor
Put -fno-exceptions flag in selectively. Add back HAVE_DECL_MADVISE check so
1079
AC_LANG_POP()
1080
1081
236.1.59 by Monty Taylor
Turn thr_rwlock.c into a conditionally built source file.
1082
AM_CONDITIONAL(BUILD_THR_RWLOCK,[test "$ac_cv_func_rwlock_init" -a "$ac_cv_funn_pthread_rwlock_rdlock"])
1083
28.1.33 by Monty Taylor
Added -Wall
1084
1 by brian
clean slate
1085
CFLAGS="$ORG_CFLAGS"
1086
1087
# Sanity check: We chould not have any fseeko symbol unless
1088
# large_file_support=yes
1089
AC_CHECK_FUNC(fseeko,
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
1090
[if test "$large_file_support" = no -a "x$TARGET_LINUX" = "xtrue";
1 by brian
clean slate
1091
then
1092
  AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!")
1093
fi]
1094
)
1095
1096
# Check definition of pthread_getspecific
236.1.39 by Monty Taylor
autoconf warning cleanups.
1097
AC_CACHE_CHECK([args to pthread_getspecific], [mysql_cv_getspecific_args],
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1098
  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1099
#if !defined(_REENTRANT)
1 by brian
clean slate
1100
#define _REENTRANT
1101
#endif
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1102
#ifndef _POSIX_PTHREAD_SEMANTICS 
1 by brian
clean slate
1103
#define _POSIX_PTHREAD_SEMANTICS 
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1104
#endif
28.1.33 by Monty Taylor
Added -Wall
1105
#include <pthread.h> ]], [[ void *pthread_getspecific(pthread_key_t key);
236.1.39 by Monty Taylor
autoconf warning cleanups.
1106
pthread_getspecific((pthread_key_t) NULL); ]])],
1107
    [mysql_cv_getspecific_args=POSIX],
1108
    [mysql_cv_getspecific_args=other])])
1 by brian
clean slate
1109
  if test "$mysql_cv_getspecific_args" = "other"
1110
  then
1111
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1],
1112
              [For some non posix threads])
1113
  fi
1114
1115
  # Check definition of pthread_mutex_init
236.1.39 by Monty Taylor
autoconf warning cleanups.
1116
  AC_CACHE_CHECK([args to pthread_mutex_init], [mysql_cv_mutex_init_args],
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1117
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1118
#ifndef _REENTRANT
1119
#define _REENTRANT
1120
#endif
1121
#ifndef _POSIX_PTHREAD_SEMANTICS
1 by brian
clean slate
1122
#define _POSIX_PTHREAD_SEMANTICS 
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1123
#endif
28.1.33 by Monty Taylor
Added -Wall
1124
#include <pthread.h> ]], [[ 
1 by brian
clean slate
1125
  pthread_mutexattr_t attr;
1126
  pthread_mutex_t mp;
236.1.39 by Monty Taylor
autoconf warning cleanups.
1127
  pthread_mutex_init(&mp,&attr); ]])],
1128
      [mysql_cv_mutex_init_args=POSIX],
1129
      [mysql_cv_mutex_init_args=other])])
1 by brian
clean slate
1130
  if test "$mysql_cv_mutex_init_args" = "other"
1131
  then
1132
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1],
1133
              [For some non posix threads])
1134
  fi
1135
#---END:
1136
1137
#---START: Used in for client configure
1138
# Check definition of readdir_r
236.1.39 by Monty Taylor
autoconf warning cleanups.
1139
AC_CACHE_CHECK([args to readdir_r], [mysql_cv_readdir_r],
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1140
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1141
#ifndef _REENTRANT
1142
#define _REENTRANT
1143
#endif
1144
#ifndef _POSIX_PTHREAD_SEMANTICS 
1 by brian
clean slate
1145
#define _POSIX_PTHREAD_SEMANTICS 
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1146
#endif
1 by brian
clean slate
1147
#include <pthread.h>
28.1.33 by Monty Taylor
Added -Wall
1148
#include <dirent.h>]], [[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
236.1.39 by Monty Taylor
autoconf warning cleanups.
1149
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])],
1150
    [mysql_cv_readdir_r=POSIX],
1151
    [mysql_cv_readdir_r=other])])
1 by brian
clean slate
1152
if test "$mysql_cv_readdir_r" = "POSIX"
1153
then
1154
  AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r])
1155
fi
1156
1157
# Check definition of posix sigwait()
236.1.39 by Monty Taylor
autoconf warning cleanups.
1158
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
1159
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1160
#ifndef _REENTRANT
236.1.39 by Monty Taylor
autoconf warning cleanups.
1161
#define _REENTRANT
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1162
#endif
1163
#ifndef _POSIX_PTHREAD_SEMANTICS
1 by brian
clean slate
1164
#define _POSIX_PTHREAD_SEMANTICS 
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1165
#endif
1 by brian
clean slate
1166
#include <pthread.h>
236.1.39 by Monty Taylor
autoconf warning cleanups.
1167
#include <signal.h>
1168
      ]], [[
1169
#ifndef _AIX
1 by brian
clean slate
1170
sigset_t set;
1171
int sig;
1172
sigwait(&set,&sig);
236.1.39 by Monty Taylor
autoconf warning cleanups.
1173
#endif
1174
      ]])],
1175
    [mysql_cv_sigwait=POSIX],
1176
    [mysql_cv_sigwait=other])])
1 by brian
clean slate
1177
if test "$mysql_cv_sigwait" = "POSIX"
1178
then
1179
  AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait])
1180
fi
1181
1182
if test "$mysql_cv_sigwait" != "POSIX"
1183
then
1184
unset mysql_cv_sigwait
1185
# Check definition of posix sigwait()
236.1.39 by Monty Taylor
autoconf warning cleanups.
1186
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
1187
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1188
#ifndef _REENTRANT
236.1.39 by Monty Taylor
autoconf warning cleanups.
1189
#define _REENTRANT
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1190
#endif
1191
#ifndef _POSIX_PTHREAD_SEMANTICS
1 by brian
clean slate
1192
#define _POSIX_PTHREAD_SEMANTICS 
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1193
#endif
1 by brian
clean slate
1194
#include <pthread.h>
236.1.39 by Monty Taylor
autoconf warning cleanups.
1195
#include <signal.h>
1196
      ]], [[
1197
sigset_t set;
1 by brian
clean slate
1198
int sig;
236.1.39 by Monty Taylor
autoconf warning cleanups.
1199
sigwait(&set);
1200
      ]])],
1201
    [mysql_cv_sigwait=NONPOSIX],
1202
    [mysql_cv_sigwait=other])])
1 by brian
clean slate
1203
if test "$mysql_cv_sigwait" = "NONPOSIX"
1204
then
1205
  AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument])
1206
fi
1207
fi
1208
#---END:
1209
1210
# Check if pthread_attr_setscope() exists
236.1.39 by Monty Taylor
autoconf warning cleanups.
1211
AC_CACHE_CHECK([for pthread_attr_setscope], [mysql_cv_pthread_attr_setscope],
1212
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1213
#ifndef _REENTRANT
236.1.39 by Monty Taylor
autoconf warning cleanups.
1214
#define _REENTRANT
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1215
#endif
1216
#ifndef _POSIX_PTHREAD_SEMANTICS
1 by brian
clean slate
1217
#define _POSIX_PTHREAD_SEMANTICS 
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1218
#endif
236.1.39 by Monty Taylor
autoconf warning cleanups.
1219
#include <pthread.h>
1220
      ]], [[
1221
pthread_attr_t thr_attr;
1222
pthread_attr_setscope(&thr_attr,0);
1223
      ]])],
1224
    [mysql_cv_pthread_attr_setscope=yes],
1225
    [mysql_cv_pthread_attr_setscope=no])])
1 by brian
clean slate
1226
if test "$mysql_cv_pthread_attr_setscope" = "yes"
1227
then
1228
  AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope])
1229
fi
1230
28.1.33 by Monty Taylor
Added -Wall
1231
AC_LANG_PUSH([C++])
1 by brian
clean slate
1232
AC_CHECK_HEADERS(cxxabi.h)
1233
AC_CACHE_CHECK([checking for abi::__cxa_demangle], mysql_cv_cxa_demangle,
28.1.33 by Monty Taylor
Added -Wall
1234
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cxxabi.h>]], [[
1 by brian
clean slate
1235
  char *foo= 0; int bar= 0;
1236
  foo= abi::__cxa_demangle(foo, foo, 0, &bar);
28.1.33 by Monty Taylor
Added -Wall
1237
]])],[mysql_cv_cxa_demangle=yes],[mysql_cv_cxa_demangle=no])])
1238
AC_LANG_POP([])
1 by brian
clean slate
1239
1240
if test "x$mysql_cv_cxa_demangle" = xyes; then
1241
  AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1,
1242
            [Define to 1 if you have the `abi::__cxa_demangle' function.])
1243
fi
1244
1245
#--------------------------------------------------------------------
1246
# Check for requested features
1247
#--------------------------------------------------------------------
1248
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
1249
DRIZZLE_CHECK_MAX_INDEXES
1250
DRIZZLE_CHECK_VIO
1 by brian
clean slate
1251
1252
#--------------------------------------------------------------------
1253
# Declare our plugin modules
1254
# Has to be done late, as the plugin may need to check for existence of
1255
# functions tested above
1256
#--------------------------------------------------------------------
1257
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
1258
DRIZZLE_CONFIGURE_PLUGINS([none])
1 by brian
clean slate
1259
1260
AC_SUBST(mysql_plugin_dirs)
1261
AC_SUBST(mysql_plugin_libs)
1262
AC_SUBST(mysql_plugin_defs)
1263
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
1264
189 by Brian Aker
Refactor of configure.ac. Added profile. One note... I believe this should
1265
AC_ARG_ENABLE([profiling],
1266
    [AS_HELP_STRING([--enable-profiling],
1267
       [Toggle profiling @<:@default=off@:>@])],
1268
    [ac_profiling="$enableval"],
1269
    [ac_profiling="no"])
1270
1271
AC_ARG_ENABLE([coverage],
1272
    [AS_HELP_STRING([--enable-coverage],
1273
       [Toggle coverage @<:@default=off@:>@])],
1274
    [ac_coverage="$enableval"],
1275
    [ac_coverage="no"])
1276
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1277
AC_ARG_ENABLE([pedantic-warnings],
1278
    [AS_HELP_STRING([--disable-pedantic-warnings],
1279
       [Toggle pedanticness @<:@default=on@:>@])],
1280
    [ac_warn_pedantic="$enableval"],
1281
    [ac_warn_pedantic="yes"])
1282
1283
AC_ARG_ENABLE([fail],
77.1.112 by Monty Taylor
Fixed comment on --enable-fail -> --disable-fail.
1284
    [AS_HELP_STRING([--disable-fail],
1285
       [Turn warnings into failures @<:@default=on@:>@])],
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1286
    [ac_warn_fail="$enableval"],
77.1.108 by Monty Taylor
Turn on -Werror again by default.
1287
    [ac_warn_fail="yes"])
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1288
53.2.6 by Monty Taylor
Turned unreachable code warnings into a configure option.
1289
AC_ARG_ENABLE([unreachable],
1290
    [AS_HELP_STRING([--enable-unreachable],
1291
       [Enable warnings about unreachable code @<:@default=off@:>@])],
1292
    [ac_warn_unreachable="$enableval"],
1293
    [ac_warn_unreachable="no"])
1294
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1295
AC_ARG_ENABLE([longlong-warnings],
1296
    [AS_HELP_STRING([--enable-longlong-warnings],
1297
       [Enable warnings about longlong in C++ @<:@default=off@:>@])],
1298
    [ac_warn_longlong="$enableval"],
421 by Monty
Made including stdint.h work.
1299
    [ac_warn_longlong="no"])
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1300
1301
AC_ARG_ENABLE([strict-aliasing],
1302
    [AS_HELP_STRING([--enable-strict-aliasing],
1303
       [Enable warnings about stict-aliasing @<:@default=off@:>@])],
1304
    [ac_warn_strict_aliasing="$enableval"],
1305
    [ac_warn_strict_aliasing="no"])
1306
509.2.1 by Monty Taylor
Added some more warning options to configure.
1307
AC_ARG_ENABLE([cast-warnings],
1308
    [AS_HELP_STRING([--enable-cast-warnings],
1309
       [Enable warnings about use of old C-style casts @<:@default=off@:>@])],
1310
    [ac_warn_cast="$enableval"],
1311
    [ac_warn_cast="no"])
1312
1313
AC_ARG_ENABLE([effective-style],
1314
    [AS_HELP_STRING([--enable-effective-style],
1315
       [Enable warnings violating Effective C++ Style Guidelines @<:@default=off@:>@])],
1316
    [ac_warn_effc="$enableval"],
1317
    [ac_warn_effc="no"])
1318
509.2.2 by Monty Taylor
Added one more set of possible warnings.
1319
AC_ARG_ENABLE([go-crazy],
1320
    [AS_HELP_STRING([--enable-go-crazy],
1321
       [Enables extra little warnings that might be too much @<:@default=off@:>@])],
1322
    [ac_warn_go_crazy="$enableval"],
1323
    [ac_warn_go_crazy="no"])
1324
53.2.2 by Monty Taylor
Updated everything that needs updating to compile with -std=gnu99 -pedantic
1325
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1326
if test "$GCC" = "yes"
1327
then
53.2.2 by Monty Taylor
Updated everything that needs updating to compile with -std=gnu99 -pedantic
1328
558 by Monty Taylor
Added autoconf test to turn off -Wredundant-decls if it doesn't work right.
1329
1330
  if test "$ac_warn_fail" = "yes"
1331
  then
1332
    W_FAIL="-Werror"
1333
  fi
584.2.5 by Stewart Smith
store a protobuf tabledefinition along with FRM
1334
  BASE_WARNINGS="-W -Wall -Wextra ${W_FAIL}"
558 by Monty Taylor
Added autoconf test to turn off -Wredundant-decls if it doesn't work right.
1335
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1336
  if test "$ac_warn_longlong" = "yes"
1337
  then
1338
    W_LONGLONG="-Wlong-long"
1339
  else
1340
    W_LONGLONG="-Wno-long-long"
1341
  fi
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1342
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1343
  if test "$ac_warn_strict_aliasing" = "yes"
1344
  then
1345
    W_STRICT_ALIASING="-Wstrict-aliasing"
1346
  else
509.2.3 by Monty Taylor
Re-worked strict-aliasing again.
1347
    W_STRICT_ALIASING="-Wno-strict-aliasing"
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1348
  fi
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1349
189 by Brian Aker
Refactor of configure.ac. Added profile. One note... I believe this should
1350
  if test "$ac_profiling" = "yes"
1351
  then
1352
    GPROF_PROFILING="-pg"
1353
  else
1354
    GPROF_PROFILING=" "
1355
  fi
1356
1357
  if test "$ac_coverage" = "yes"
1358
  then
1359
    GPROF_COVERAGE="-fprofile-arcs -ftest-coverage"
1360
  else
1361
    GPROF_COVERAGE=" "
1362
  fi
1363
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1364
  if test "$ac_warn_pedantic" = "yes"
1365
  then
520.4.36 by Monty Taylor
Added autoconf check for usability of __attribute__((visibility("hidden"))).
1366
    save_CXXFLAGS="${CXXFLAGS}"
1367
    CXXFLAGS="${CXXFLAGS} ${W_FAIL} -Wredundant-decls"
1368
    AC_CACHE_CHECK([whether it is safe to use -Wredundant-decls],
1369
      [ac_cv_safe_to_use_Wredundant_decls_],
1370
      [AC_LANG_PUSH(C++)
1371
       AC_COMPILE_IFELSE(
1372
         [AC_LANG_PROGRAM([
558 by Monty Taylor
Added autoconf test to turn off -Wredundant-decls if it doesn't work right.
1373
template <typename E> struct C { void foo(); };
1374
template <typename E> void C<E>::foo() { }
1375
template <> void C<int>::foo();
520.4.36 by Monty Taylor
Added autoconf check for usability of __attribute__((visibility("hidden"))).
1376
            AC_INCLUDES_DEFAULT])],
1377
          [ac_cv_safe_to_use_Wredundant_decls_=yes],
1378
          [ac_cv_safe_to_use_Wredundant_decls_=no])
1379
        AC_LANG_POP()])
559.1.1 by Kristian Nielsen
Fix a few problems with the -Wredundant-decls configure check.
1380
    if test $ac_cv_safe_to_use_Wredundant_decls_ = yes
558 by Monty Taylor
Added autoconf test to turn off -Wredundant-decls if it doesn't work right.
1381
    then
559.1.1 by Kristian Nielsen
Fix a few problems with the -Wredundant-decls configure check.
1382
      GXX_W_REDUNDANT_DECLS="-Wredundant-decls"
558 by Monty Taylor
Added autoconf test to turn off -Wredundant-decls if it doesn't work right.
1383
    else
559.1.1 by Kristian Nielsen
Fix a few problems with the -Wredundant-decls configure check.
1384
      GXX_W_REDUNDANT_DECLS="-Wno-redundant-decls"
558 by Monty Taylor
Added autoconf test to turn off -Wredundant-decls if it doesn't work right.
1385
    fi
520.4.36 by Monty Taylor
Added autoconf check for usability of __attribute__((visibility("hidden"))).
1386
    
559.1.1 by Kristian Nielsen
Fix a few problems with the -Wredundant-decls configure check.
1387
    GCC_PEDANTIC="-pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls ${W_STRICT_ALIASING}"
1388
    GXX_PEDANTIC="-pedantic -Wundef ${GXX_W_REDUNDANT_DECLS} ${W_LONGLONG} ${W_STRICT_ALIASING}"
520.4.36 by Monty Taylor
Added autoconf check for usability of __attribute__((visibility("hidden"))).
1389
1390
    AC_CACHE_CHECK([whether __attribute__ visibility "hidden" is supported],
1391
      [ac_cv_can_use_hidden_],
1392
      [AC_LANG_PUSH(C++)
1393
       AC_COMPILE_IFELSE(
1394
         [AC_LANG_PROGRAM([
1395
          AC_INCLUDES_DEFAULT
1396
__attribute__((visibility ("hidden")))
1397
void testme() {  };],[
1398
     testme();])],  
1399
         [ac_cv_can_use_hidden_=yes],
1400
         [ac_cv_can_use_hidden_=no])
1401
       AC_LANG_POP()])
1402
    if test "$ac_cv_can_use_hidden_" = "yes"
1403
    then
1404
      AC_DEFINE(HAVE_ATTR_HIDDEN, 1,
1405
                [Define to 1 if you have support for __attribute__((visibility("hidden")))])
1406
    fi
1407
559 by Monty Taylor
Fixed syntax errors.
1408
    CXXFLAGS="${save_CXXFLAGS}"
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1409
  fi
1410
53.2.6 by Monty Taylor
Turned unreachable code warnings into a configure option.
1411
  if test "$ac_warn_unreachable" = "yes"
1412
  then
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1413
    W_UNREACHABLE="-Wunreachable-code"
53.2.6 by Monty Taylor
Turned unreachable code warnings into a configure option.
1414
  fi
509.2.1 by Monty Taylor
Added some more warning options to configure.
1415
  if test "$ac_warn_cast" = "yes"
1416
  then
1417
    W_CAST="-Wold-style-cast"
1418
  fi
1419
1420
  if test "$ac_warn_effc" = "yes"
1421
  then
1422
    W_EFFC="-Weffc++"
1423
  fi
1424
509.2.2 by Monty Taylor
Added one more set of possible warnings.
1425
  if test "$ac_warn_gocrazy" = "yes"
1426
  then
1427
    W_CRAZY="-Wshadow -Wconversion -Winvalid-pch"
1428
  fi
1429
520.4.44 by mordred
A whole bunch of solaris/sun studio compile fixes.
1430
  CC_WARNINGS="${C99_SUPPORT_HACK} ${BASE_WARNINGS} ${GCC_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_CRAZY}"
1431
  CXX_WARNINGS="${BASE_WARNINGS} ${GXX_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_CAST} ${W_EFFC} ${W_CRAZY}"
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1432
520.4.44 by mordred
A whole bunch of solaris/sun studio compile fixes.
1433
  NO_EXCEPTIONS="-fno-exceptions"
1434
  W_EXCEPTIONS="-fexceptions"
1435
  NO_UNUSED_MACROS="-Wno-unused-macros"
1436
  NO_REDUNDANT_DECLS="-Wno-redundant-decls"
1437
  # Disable exceptions as they seams to create problems with gcc and threads.
1438
  # drizzled doesn't use run-time-type-checking, so we disable it.
1439
  AM_CXXFLAGS="${AM_CXXFLAGS} -fno-rtti"
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
1440
  CPPFLAGS="${CPPFLAGS} -fpch-deps"
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1441
fi
520.4.37 by Monty Taylor
Added some Sun compile flags.
1442
if test "$SUNCC" = "yes"
1443
then
520.4.44 by mordred
A whole bunch of solaris/sun studio compile fixes.
1444
  CC_WARNINGS="-v -xc99=all -errtags=yes"
1445
  CXX_WARNINGS="+w +w2 -xport64 -errtags=yes -erroff=attrskipunsup -compat=5"
1446
  NO_EXCEPTIONS="-features=no%except"
1447
  W_EXCEPTIONS="-features=except"
520.4.37 by Monty Taylor
Added some Sun compile flags.
1448
fi
520.4.44 by mordred
A whole bunch of solaris/sun studio compile fixes.
1449
AM_CXXFLAGS="${CXX_WARNINGS} ${NO_EXCEPTIONS}  ${AM_CXXFLAGS}"
1450
AM_CFLAGS="${CC_WARNINGS} ${AM_CFLAGS}"
1451
1452
AC_SUBST(NO_EXCEPTIONS)
1453
AC_SUBST(W_EXCEPTIONS)
1454
AC_SUBST(NO_UNUSED_MACROS)
1455
AC_SUBST(NO_REDUNDANT_DECLS)
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1456
656.1.30 by Monty Taylor
Reverted gnulib changes.
1457
AC_SUBST([GLOBAL_CPPFLAGS],['-I$(top_srcdir) -I$(top_builddir)'])
202.1.23 by Monty Taylor
Moved the includes we use everywhere to to GLOBAL_CPPFLAGS and added AM_CPPFLAGS to an AC_SUBST, so that we could take out the redundant declaration from most fof the Makefiles.
1458
AC_SUBST([AM_CPPFLAGS],['${GLOBAL_CPPFLAGS}'])
287.3.26 by Monty Taylor
Put warnings into AM_C*FLAGS so they can be overridden per lib.
1459
AC_SUBST([AM_CFLAGS])
1460
AC_SUBST([AM_CXXFLAGS])
202.1.23 by Monty Taylor
Moved the includes we use everywhere to to GLOBAL_CPPFLAGS and added AM_CPPFLAGS to an AC_SUBST, so that we could take out the redundant declaration from most fof the Makefiles.
1461
1 by brian
clean slate
1462
# Some usefull subst
1463
AC_SUBST(CC)
1464
AC_SUBST(GXX)
1465
1466
# Set configuration options for make_binary_distribution
1467
case $SYSTEM_TYPE in
1468
  *netware*)
1469
    MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --no-strip"
1470
    ;;
1471
  *)
1472
    : # no change for other platforms yet
1473
    ;;
1474
esac
1475
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
1476
492.1.7 by Monty Taylor
Moved test() to its own file.
1477
dnl GCC Precompiled Header Support
584.4.3 by Monty Taylor
Disabled pre-compiled headers for now.
1478
dnl re-enable later
632.1.25 by Monty Taylor
Removed AM_CONDITIONAL from SEARCH_FOR_LIB. Aligned naming of AM_CONDITIONALS.
1479
dnl AM_CONDITIONAL([BUILD_GCC_PCH],[test "$GCC" = "yes"])
1480
AM_CONDITIONAL([BUILD_GCC_PCH],[test "no" = "yes"])
492.1.7 by Monty Taylor
Moved test() to its own file.
1481
287.3.1 by Monty Taylor
Removed mysys/tests.
1482
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
264.1.15 by Monty Taylor
Removed a bunch of files from mystrings that aren't build or used at all.
1483
 mystrings/Makefile storage/Makefile dnl
575.2.2 by Monty Taylor
Moved vio stuff into libdrizzle.
1484
 po/Makefile.in dnl
77.1.38 by Monty Taylor
Renamed more stuff to drizzle.
1485
 libdrizzle/Makefile client/Makefile dnl
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
1486
 drizzled/Makefile dnl
1487
 drizzled/field/Makefile dnl
584.4.6 by Monty Taylor
Moved stuff into item/
1488
 drizzled/item/Makefile dnl
316 by Brian Aker
First pass of new sql_db.cc work
1489
 drizzled/serialize/Makefile dnl
489.1.8 by Monty Taylor
Split out Item_int_func and Item_func from Item_func. (don't think too hard about the second one)
1490
 drizzled/functions/Makefile dnl
574.3.2 by Lee
initial changes to break out item_strfunc into functions/str
1491
 drizzled/functions/str/Makefile dnl
574.3.12 by Lee
initial work for moving functions from item_timefunc to functions/time directory
1492
 drizzled/functions/time/Makefile dnl
492.1.7 by Monty Taylor
Moved test() to its own file.
1493
 drizzled/util/Makefile dnl
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
1494
 drizzled/sql_builtin.cc dnl
28.1.31 by Monty Taylor
Deleted tons of pointless garbage from scripts.
1495
 support-files/Makefile dnl
77.1.47 by Monty Taylor
Moved test to tests...
1496
 tests/Makefile tests/install_test_db dnl
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
1497
 plugin/Makefile dnl
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
1498
 drizzled/drizzled_safe support-files/libdrizzle.pc dnl
77.1.38 by Monty Taylor
Renamed more stuff to drizzle.
1499
 support-files/drizzle.server support-files/drizzle-log-rotate)
1 by brian
clean slate
1500
1501
AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
1502
1503
# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
287.3.28 by Monty Taylor
Expanded the move to AM_CFLAGS and AM_CXXFLAGS. Now we should be more correct.
1504
AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS' AM_CFLAGS='$AM_CFLAGS' AM_CXXFLAGS='$AM_CXXFLAGS'")
1 by brian
clean slate
1505
1506
AC_OUTPUT
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
1507
1508
echo "---"
1509
echo "Configuration summary for $PACKAGE_NAME version $VERSION"
1510
echo ""
1511
echo "   * Installation prefix:       $prefix"
1512
echo "   * System type:               $SYSTEM_TYPE"
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
1513
echo "   * Host CPU:                  $host_cpu"
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
1514
echo "   * C Compiler:                $CC_VERSION"
632.1.21 by Monty Taylor
Cleaned up compiler version checking.
1515
echo "   * C++ Compiler:              $CXX_VERSION"
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
1516
echo "   * Build auth_pam:            $ac_cv_header_security_pam_appl_h"
1517
echo "   * Assertions enabled:        $ac_cv_assert"
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
1518
echo "   * Debug enabled:             $with_debug"
1519
echo "   * Profiling enabled:         $ac_profiling"
1520
echo "   * Coverage enabled:          $ac_coverage"
1521
echo "   * Warnings as failure:       $ac_warn_fail"
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
1522
echo "   * C++ cstdint location:      $ac_cv_cxx_cstdint"
1523
echo "   * C++ hash_map location:     $ac_cv_cxx_hash_map"
1524
echo "   * C++ hash namespace:        $ac_cv_cxx_hash_namespace"
1525
echo "   * C++ cmath location:        $ac_cv_cxx_cmath"
1526
echo "   * C++ cmath namespace:       $ac_cv_cxx_cmath_namespace"
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
1527
echo ""
1528
echo "---"