~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
dnl -*- ksh -*-
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
61
################ End of section to be done before AC_PROG_CC #################
62
63
dnl Checks for programs.
64
AC_PROG_CC
65
ifdef([AC_PROG_CC_C99],[
66
  dnl TODO: Need to fix this to use c99 instead of gnu99
67
  AC_PROG_CC_C99([],[AC_MSG_ERROR([C99 support required for compiling Drizzle])])
68
  C99_SUPPORT_HACK=""
69
],[C99_SUPPORT_HACK="-std=gnu99"])
70
AC_USE_SYSTEM_EXTENSIONS
71
AC_PROG_CXX
72
AC_CXX_HEADER_STDCXX_98
73
if test "$ac_cv_cxx_stdcxx_98" = "no"
74
then
75
  AC_MSG_ERROR([C++ Compiler required to compile Drizzle])
76
fi
77
AC_PROG_CPP
78
AM_PROG_CC_C_O
79
80
AC_CXX_STL_HASH
81
AC_CXX_CSTDINT
82
AC_CXX_CINTTYPES
83
AC_CXX_CMATH
1 by brian
clean slate
84
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
85
dnl AC_CANONICAL_HOST thinks it's a good idea to just set CFLAGS to 
86
dnl -g -O2 if you're running gcc. We would like to use something else, thanks.
87
if test "x${CFLAGS}" = "x-g -O2"
88
then
89
  CFLAGS=
90
fi
91
if test "x${CXXFLAGS}" = "x-g -O2"
92
then
93
  CXXFLAGS=
94
fi
95
1 by brian
clean slate
96
97
# Set all version vars based on $VERSION. How do we do this more elegant ?
98
# Remember that regexps needs to quote [ and ] since this is run through m4
99
# We take some made up examples
100
#
101
#  VERSION                  5.1.40sp1-alpha     5.0.34a
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
102
#  DRIZZLE_NO_DASH_VERSION    5.1.40sp1           5.0.34a
103
#  DRIZZLE_NUMERIC_VERSION    5.1.40              5.0.34
104
#  DRIZZLE_BASE_VERSION       5.1                 5.0
105
#  DRIZZLE_VERSION_ID         50140               50034
1 by brian
clean slate
106
#
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
107
DRIZZLE_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
108
DRIZZLE_NUMERIC_VERSION=`echo $DRIZZLE_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
109
DRIZZLE_BASE_VERSION=`echo $DRIZZLE_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
110
DRIZZLE_VERSION_ID=`echo $DRIZZLE_NUMERIC_VERSION | \
1 by brian
clean slate
111
    awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'`
112
113
# The port should be constant for a LONG time
301 by Brian Aker
Clean up port startup
114
DRIZZLE_TCP_PORT_DEFAULT=4427
1 by brian
clean slate
115
475 by Monty Taylor
Added m4 files for deficient systems. Changed include mechanism to not need
116
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 :)
117
sinclude(m4/character_sets.m4)
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
118
202.3.2 by Monty Taylor
Added gettext calls in to my_getopt.c and drizzle.c
119
AM_GNU_GETTEXT([external])
287.3.25 by Monty Taylor
Make autoreconf happy.
120
AM_GNU_GETTEXT_VERSION(0.17)
121
384 by Monty Taylor
Expanded po subdir trap to catch the case where we're setting programs to :.
122
AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
1 by brian
clean slate
123
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
124
AC_SUBST(DRIZZLE_NO_DASH_VERSION)
125
AC_SUBST(DRIZZLE_BASE_VERSION)
126
AC_SUBST(DRIZZLE_VERSION_ID)
127
AC_SUBST(DRIZZLE_PREVIOUS_BASE_VERSION)
1 by brian
clean slate
128
AC_SUBST(PROTOCOL_VERSION)
129
AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION],
130
                   [mysql client protocol version])
131
AC_SUBST(DOT_FRM_VERSION)
132
AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION],
133
                   [Version of .frm files])
134
AC_SUBST(SHARED_LIB_MAJOR_VERSION)
135
AC_SUBST(SHARED_LIB_VERSION)
136
AC_SUBST(AVAILABLE_LANGUAGES)
137
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...
138
# General Constants
139
AC_DEFINE([IO_SIZE], [4096], [Io buffer size; Must be a power of 2 and 
140
  a multiple of 512. May be
141
  smaller what the disk page size. This influences the speed of the
142
  isam btree library. eg to big to slow.])
143
AC_DEFINE([SC_MAXWIDTH],[256], [Max width of screen (for error messages)])
144
AC_DEFINE([FN_LEN],[256	], [Max file name len ])
145
AC_DEFINE([FN_HEADLEN],[253], [Max length of filepart of file name ])
146
AC_DEFINE([FN_EXTLEN],[20], [Max length of extension (part of FN_LEN) ])
147
AC_DEFINE([FN_REFLEN],[512], [Max length of full path-name ])
148
AC_DEFINE([FN_EXTCHAR],['.'], [File extension character])
149
AC_DEFINE([FN_HOMELIB],['~'], [~/ is used as abbrev for home dir ])
150
AC_DEFINE([FN_CURLIB],['.'], [./ is used as abbrev for current dir ])
151
AC_DEFINE([FN_PARENTDIR],[".."], [Parent directory; Must be a string ])
1 by brian
clean slate
152
448 by Monty Taylor
Moved global defines to configure.ac.
153
AC_DEFINE([MASTER],[1],[Compile without unireg])
154
457 by Monty
Re-worked a few defines to work around old autoconf version.
155
AH_VERBATIM([QUOTE_ARG],[
156
/* Quote argument (before cpp) */
157
#ifndef QUOTE_ARG
158
# define QUOTE_ARG(x) #x
159
#endif
160
/* Quote argument, (after cpp) */
161
#ifndef STRINGIFY_ARG
162
# define STRINGIFY_ARG(x) QUOTE_ARG(x)
163
#endif
164
])
165
166
AH_VERBATIM([builtin_expect],[
167
/*
168
 * The macros below are borrowed from include/linux/compiler.h in the
169
 * Linux kernel. Use them to indicate the likelyhood of the truthfulness
170
 * of a condition. This serves two purposes - newer versions of gcc will be
171
 * able to optimize for branch predication, which could yield siginficant
172
 * performance gains in frequently executed sections of the code, and the
173
 * other reason to use them is for documentation
174
 */
175
#if !defined(__GNUC__)
176
#define __builtin_expect(x, expected_value) (x)
177
#endif
178
179
#define likely(x)  __builtin_expect((x),1)
180
#define unlikely(x)  __builtin_expect((x),0)
181
])
448 by Monty Taylor
Moved global defines to configure.ac.
182
441 by Monty Taylor
Move unconditional defines to config.h.
183
dnl  InnoDB depends on some Drizzle's internals which other plugins should not
184
dnl  need.  This is because of InnoDB's foreign key support, "safe" binlog
185
dnl  truncation, and other similar legacy features.
186
187
dnl  We define accessors for these internals unconditionally, but do not
188
dnl  expose them in mysql/plugin.h.  They are declared in ha_innodb.h for
189
dnl  InnoDB's use.
190
443 by Monty Taylor
Moved POSIX_PTHREAD flag.
191
AC_DEFINE([INNODB_COMPATIBILITY_HOOKS],[1],[TODO: Remove the need for this])
444 by Monty Taylor
Moved REENTRANT.
192
dnl TODO: Make a test for when this needs to be set.
193
AC_DEFINE([_REENTRANT],[1],[Some thread libraries require this])
443 by Monty Taylor
Moved POSIX_PTHREAD flag.
194
195
AH_VERBATIM([posix_pthread],[
196
/* We want posix threads */
197
#ifndef _POSIX_PTHREAD_SEMANTICS
198
#define _POSIX_PTHREAD_SEMANTICS
199
#endif
200
])
441 by Monty Taylor
Move unconditional defines to config.h.
201
202
1 by brian
clean slate
203
# Canonicalize the configuration name.
204
205
# Check whether --with-system-type or --without-system-type was given.
28.1.33 by Monty Taylor
Added -Wall
206
AC_ARG_WITH([system-type],
207
    [AS_HELP_STRING([--with-system-type],
208
       [Set the system type, like "sun-solaris10"])],
1 by brian
clean slate
209
    [SYSTEM_TYPE="$withval"],
210
    [SYSTEM_TYPE="$host_vendor-$host_os"])
28.1.33 by Monty Taylor
Added -Wall
211
AC_ARG_WITH([machine-type],
212
    [AS_HELP_STRING([--with-machine-type],
213
       [Set the machine type, like "powerpc"])],
1 by brian
clean slate
214
    [MACHINE_TYPE="$withval"],
215
    [MACHINE_TYPE="$host_cpu"])
216
AC_SUBST(SYSTEM_TYPE)
217
AC_DEFINE_UNQUOTED([SYSTEM_TYPE], ["$SYSTEM_TYPE"],
218
                   [Name of system, eg sun-solaris])
219
AC_SUBST(MACHINE_TYPE)
220
AC_DEFINE_UNQUOTED([MACHINE_TYPE], ["$MACHINE_TYPE"],
221
                   [Machine type name, eg sparc])
222
223
# Detect intel x86 like processor
224
BASE_MACHINE_TYPE=$MACHINE_TYPE
225
case $MACHINE_TYPE in
226
  i?86) BASE_MACHINE_TYPE=i386 ;;
227
esac
228
229
AM_SANITY_CHECK
230
# This is needed is SUBDIRS is set
231
AC_PROG_MAKE_SET
232
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.
233
1 by brian
clean slate
234
# Print version of CC and CXX compiler (if they support --version)
235
case $SYSTEM_TYPE in
271 by Brian Aker
OSX fix
236
  *apple-darwin*)
237
    AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX])
1 by brian
clean slate
238
    ;;
239
  *)
240
CC_VERSION=`$CC --version | sed 1q`
241
    ;;
242
esac
243
if test $? -eq "0"
244
then
245
  AC_MSG_CHECKING("C Compiler version")
246
  AC_MSG_RESULT("$CC $CC_VERSION")
247
else
248
CC_VERSION=""
249
fi
250
AC_SUBST(CC_VERSION)
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
251
252
dnl AC_CANONICAL_HOST thinks it's a good idea to just set CFLAGS to 
253
dnl -g -O2 if you're running gcc. We would like to use something else, thanks.
254
if test "x${CFLAGS}" = "x-g -O2"
255
then
256
  CFLAGS=
257
fi
258
if test "x${CXXFLAGS}" = "x-g -O2"
259
then
260
  CXXFLAGS=
261
fi
262
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
263
DRIZZLE_CHECK_CXX_VERSION
1 by brian
clean slate
264
230.3.1 by Monty Taylor
Bug 252805: ./configure not detecting missing g++
265
AC_PROG_AWK
266
28.1.33 by Monty Taylor
Added -Wall
267
if test "$ac_cv_c_compiler_gnu" = "yes"
1 by brian
clean slate
268
then
269
  AS="$CC -c"
270
  AC_SUBST(AS)
271
else
272
  AC_PATH_PROG(AS, as, as)
273
fi
274
446 by Monty Taylor
Moved GNU_SOURCE define to configure.
275
dnl TODO: This needs to go away and be replaced with _ISOC99_SOURCE
276
if test "$ac_cv_compiler_gnu" = "yes" -o "$target_os" = "linux-gnu"
277
then
278
  AC_DEFINE([_GNU_SOURCE],[1],[Fix problem with S_ISLNK() on Linux])
279
fi
280
445 by Monty Taylor
Moved sun defines to configure.ac.
281
dnl  Solaris 9 include file <sys/feature_tests.h> refers to X/Open document
282
283
dnl  System Interfaces and Headers, Issue 5
284
285
dnl  saying we should define _XOPEN_SOURCE=500 to get POSIX.1c prototypes,
286
dnl  but apparently other systems (namely FreeBSD) don't agree.
287
288
dnl  On a newer Solaris 10, the above file recognizes also _XOPEN_SOURCE=600.
289
dnl  Furthermore, it tests that if a program requires older standard
290
dnl  (_XOPEN_SOURCE<600 or _POSIX_C_SOURCE<200112L) it cannot be
291
dnl  run on a new compiler (that defines _STDC_C99) and issues an #error.
292
dnl  It's also an #error if a program requires new standard (_XOPEN_SOURCE=600
293
dnl  or _POSIX_C_SOURCE=200112L) and a compiler does not define _STDC_C99.
294
295
dnl  To add more to this mess, Sun Studio C compiler defines _STDC_C99 while
296
dnl  C++ compiler does not!
297
455 by Monty Taylor
Rewored Sun C99 stuff in autoconf. (Trond... will this work?)
298
dnl TODO: Can _ISOC99_SOURCE be defined on all platforms and remove the 
299
dnl       Need for all of this? 
481.1.7 by Monty Taylor
Possible fix for one solaris badness?
300
case "$target_os" in
301
  *solaris*)
455 by Monty Taylor
Rewored Sun C99 stuff in autoconf. (Trond... will this work?)
302
  dnl Do we need both of these? 
489.1.5 by Monty Taylor
Fixed __C99FEATURES__
303
  CXXFLAGS="${CXXFLAGS} -D__C99FEATURES__"
481.1.7 by Monty Taylor
Possible fix for one solaris badness?
304
  CFLAGS="${CFLAGS} -D_XOPEN_SOURCE=600"
305
  ;;
306
esac
307
445 by Monty Taylor
Moved sun defines to configure.ac.
308
1 by brian
clean slate
309
# We use libtool
310
#AC_LIBTOOL_WIN32_DLL
311
AC_PROG_LIBTOOL
312
313
# Ensure that we have --preserve-dup-deps defines, otherwise we get link
314
# problems of 'mysql' with CXX=g++
315
LIBTOOL="$LIBTOOL --preserve-dup-deps"
316
AC_SUBST(LIBTOOL)dnl
317
318
AC_SUBST(NM)dnl
319
320
AC_PROG_INSTALL
321
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
322
323
# Not critical since the generated file is distributed
324
AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL'])
77.1.70 by Monty Taylor
Added a failure if you don't have bison and you're building from a .bzr branch.
325
if test -z "$YACC" && test -d ".bzr"
326
then
327
  AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
328
fi
1 by brian
clean slate
329
330
AC_PATH_PROG(uname_prog, uname, no)
331
332
# We should go through this and put all the explictly system dependent
333
# stuff in one place
334
AC_MSG_CHECKING(operating system)
335
AC_CACHE_VAL(mysql_cv_sys_os,
336
[
337
if test "$uname_prog" != "no"; then
338
  mysql_cv_sys_os="`uname`"
339
else
340
  mysql_cv_sys_os="Not Solaris"
341
fi
342
])
343
AC_MSG_RESULT($mysql_cv_sys_os)
344
345
# This should be rewritten to use $target_os
346
case "$target_os" in
347
  *solaris*)
348
    TARGET_SOLARIS="true"
349
    AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
350
    AC_SUBST(TARGET_SOLARIS)
351
  ;;
352
esac
353
354
# The following is required for portable results of floating point calculations
355
# on PowerPC. The same must also be done for IA-64, but this options is missing
356
# in the IA-64 gcc backend.
357
358
if test "$GCC" = "yes"
359
then
360
  case "$host_cpu" in
361
    *ppc* | *powerpc*)
287.3.28 by Monty Taylor
Expanded the move to AM_CFLAGS and AM_CXXFLAGS. Now we should be more correct.
362
      AM_CFLAGS="$CFLAGS -mno-fused-madd"
363
      AM_CXXFLAGS="$CXXFLAGS -mno-fused-madd"
1 by brian
clean slate
364
    ;;
365
  esac
366
fi
367
368
AC_SUBST(CC)
369
AC_SUBST(CFLAGS)
370
AC_SUBST(CXX)
371
AC_SUBST(CXXFLAGS)
372
AC_SUBST(ASFLAGS)
373
AC_SUBST(LD)
374
AC_SUBST(INSTALL_SCRIPT)
375
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
376
1 by brian
clean slate
377
export CC CXX CFLAGS LD LDFLAGS AR ARFLAGS
378
379
if test "$GCC" = "yes"
380
then
381
  # Disable exceptions as they seams to create problems with gcc and threads.
279.2.7 by Monty Taylor
Replaced DYNAMIC_ARRAY in drizzlecheck with vector<string>
382
  # drizzled doesn't use run-time-type-checking, so we disable it.
139.1.8 by Stewart Smith
UDFs are now normal Item_func objects. Simplifies handling them a lot.
383
  AM_CXXFLAGS="${AM_CXXFLAGS} -fno-exceptions"
1 by brian
clean slate
384
fi
385
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
386
DRIZZLE_PROG_AR
1 by brian
clean slate
387
261.2.3 by Monty Taylor
Moved libdrizzle.ver.in to libdrizzle.ver.
388
# libdrizzle versioning when linked with GNU ld.
1 by brian
clean slate
389
if $LD --version 2>/dev/null|grep -q GNU; then
312.1.14 by Monty Taylor
Fixed bug#257694 - added various files to EXTRA_DIST and noinst_HEADERS to make make distcheck (and with-it out-of-tree builds) work.
390
  LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libdrizzle/libdrizzle.ver"
1 by brian
clean slate
391
fi
392
AC_SUBST(LD_VERSION_SCRIPT)
393
287.3.30 by Monty Taylor
Added step one of finding libprotobuf.
394
#--------------------------------------------------------------------
395
# Check for Google Proto Buffers
396
#--------------------------------------------------------------------
397
398
AC_LANG_PUSH([C++])
399
AC_CHECK_HEADERS([google/protobuf/message.h])
400
if test "x$ac_cv_header_google_protobuf_message_h" != "xyes"
401
then
402
  AC_MSG_ERROR([Couldn't find message.h. Try installing Google Protocol Buffer development packages])
403
fi
404
405
save_CFLAGS="$CFLAGS"
406
save_LIBS="$LIBS"
407
CFLAGS=""
408
LIBS="-lprotobuf"
409
410
AC_CACHE_CHECK([for Message in libprotobuf], ac_libprotobuf_works, [
411
  AC_TRY_LINK([
412
#include <google/protobuf/descriptor.pb.h>
413
  ],[
414
    google::protobuf::FileDescriptorProto testFdp;
415
  ], ac_libprotobuf_works=yes, [
416
        AC_ERROR([could not find Google's libprotobuf])
417
  ])
418
419
])
420
421
PROTOBUF_LIBS="${LIBS}"
422
AC_SUBST(PROTOBUF_LIBS)
423
CFLAGS="$save_CFLAGS"
424
LIBS="$save_LIBS"
425
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.
426
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
427
#--------------------------------------------------------------------
428
# Check for libevent
429
#--------------------------------------------------------------------
430
134.2.1 by Antony Curtis
Changes for proper detection of libraries
431
AC_MSG_CHECKING(for libevent)
432
AC_ARG_WITH(libevent,
236.1.14 by Monty Taylor
Merged build changes from Antony.
433
  [AS_HELP_STRING([--with-libevent],
236.1.15 by Monty Taylor
Fixed the previous merge. (since I suck)
434
       [Use libevent build directory])],
236.1.14 by Monty Taylor
Merged build changes from Antony.
435
  [ with_libevent=$withval ],
436
  [ with_libevent=yes ])
437
236.1.35 by Monty Taylor
Fixed another libevent on OSX searching problem.
438
if test "$with_libevent" = "yes"
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
439
then
236.1.14 by Monty Taylor
Merged build changes from Antony.
440
    AC_CHECK_HEADERS(event.h)
441
    if test "x$ac_cv_header_event_h" != "xyes"
442
    then
443
      AC_MSG_ERROR([Couldn't find event.h. Try installing libevent development packages])
444
    fi
445
    my_save_LIBS="$LIBS"
446
    LIBS=""
447
    AC_CHECK_LIB(event, event_loop, [], [AC_MSG_ERROR(could not find libevent)])
448
    LIBEVENT_LIBS="${LIBS}"
449
    LIBS="${my_save_LIBS}"
450
    LIBEVENT_CFLAGS=""
451
else
452
    AC_MSG_RESULT($withval)
453
    if test -f $withval/event.h -a -f $withval/libevent.a; then
454
       owd=`pwd`
455
       if cd $withval; then withval=`pwd`; cd $owd; fi
456
       LIBEVENT_CFLAGS="-I$withval"
457
       LIBEVENT_LIBS="-L$withval -levent"
458
    elif test -f $withval/include/event.h -a -f $withval/lib/libevent.a; then
459
       owd=`pwd`
460
       if cd $withval; then withval=`pwd`; cd $owd; fi
461
       LIBEVENT_CFLAGS="-I$withval/include"
462
       LIBEVENT_LIBS="-L$withval/lib -levent"
463
    else
236.1.39 by Monty Taylor
autoconf warning cleanups.
464
       AC_MSG_ERROR([event.h or libevent.a not found in $withval])
236.1.14 by Monty Taylor
Merged build changes from Antony.
465
    fi
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
466
fi
236.1.14 by Monty Taylor
Merged build changes from Antony.
467
468
AC_SUBST(LIBEVENT_CFLAGS)
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
469
AC_SUBST(LIBEVENT_LIBS)
134.2.1 by Antony Curtis
Changes for proper detection of libraries
470
471
AC_CACHE_CHECK([for bufferevent in libevent], ac_libevent_works, [
472
  save_CFLAGS="$CFLAGS"
473
  save_LIBS="$LIBS"
236.1.14 by Monty Taylor
Merged build changes from Antony.
474
  CFLAGS="$LIBEVENT_CFLAGS"
475
  LIBS="$LIBEVENT_LIBS"
134.2.1 by Antony Curtis
Changes for proper detection of libraries
476
  AC_TRY_LINK([
477
#include <sys/types.h>
478
#include <sys/time.h>
479
#include <stdlib.h>
480
#include <event.h>],[
481
	struct bufferevent bev;
482
	bufferevent_settimeout(&bev, 1, 1);
483
  ], ac_libevent_works=yes, [
484
        AC_ERROR([you need to install a more recent version of libevent,
485
	check http://www.monkey.org/~provos/libevent/])
486
  ])
487
488
  CFLAGS="$save_CFLAGS"
489
  LIBS="$save_LIBS"
490
])
491
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
492
493
#--------------------------------------------------------------------
494
# Check for libpthread
495
#--------------------------------------------------------------------
496
497
AC_CHECK_HEADERS(pthread.h)
498
if test "x$ac_cv_header_pthread_h" != "xyes"
499
then
500
  AC_MSG_ERROR([Couldn't find pthread.h.])
501
fi
502
AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR(could not find libpthread)])
503
504
#--------------------------------------------------------------------
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
505
# Check for tcmalloc
506
#--------------------------------------------------------------------
507
508
AC_ARG_ENABLE([tcmalloc],
509
    [AS_HELP_STRING([--enable-tcmalloc],
510
       [Enable linking with tcmalloc @<:@default=off@:>@])],
236.1.14 by Monty Taylor
Merged build changes from Antony.
511
    [ac_enable_tcmalloc="$enableval"],
512
    [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.
513
236.1.14 by Monty Taylor
Merged build changes from Antony.
514
if test "x$ac_enable_tcmalloc" = "xyes"
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
515
then
516
  AC_CHECK_LIB(tcmalloc,malloc,[],[])
517
fi
518
519
#--------------------------------------------------------------------
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
520
# Check for libz
521
#--------------------------------------------------------------------
522
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
523
my_save_LIBS="$LIBS"
524
LIBS=""
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
525
AC_CHECK_HEADERS(zlib.h)
526
if test "x$ac_cv_header_zlib_h" != "xyes"
527
then
528
  AC_MSG_ERROR([Couldn't find zlib.h. Try installing zlib development packages])
529
fi
530
AC_CHECK_LIB(z, crc32, [], [AC_MSG_ERROR(could not find libz)])
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
531
ZLIB_LIBS="$LIBS"
532
LIBS="$my_save_LIBS"
533
AC_SUBST(ZLIB_LIBS)
534
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
535
182.1.5 by Jim Winstead
Detect and make the Mac OS X libedit readline interface look like the
536
#--------------------------------------------------------------------
537
# Check for libreadline or compatible (libedit on Mac OS X)
538
#--------------------------------------------------------------------
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
539
236.1.14 by Monty Taylor
Merged build changes from Antony.
540
AC_CHECK_HEADERS(readline/history.h readline/readline.h)
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
541
if test "x$ac_cv_header_readline_readline_h" != "xyes"
542
then
543
  AC_MSG_ERROR([Couldn't find readline/readline.h. Try installing readline development packages.])
544
fi
236.1.14 by Monty Taylor
Merged build changes from Antony.
545
AC_CHECK_TYPES([HIST_ENTRY], [], [], [AC_INCLUDES_DEFAULT[
546
#ifdef HAVE_READLINE_HISTORY_H
547
#include <readline/history.h>
548
#endif
549
#include <readline/readline.h>
550
]])
551
AC_CHECK_DECLS([completion_matches], [], [], [AC_INCLUDES_DEFAULT[
552
#ifdef HAVE_READLINE_HISTORY_H
553
#include <readline/history.h>
554
#endif
555
#include <readline/readline.h>
556
]])
207.1.2 by Jim Winstead
Fix test for libreadline to test a function that exists in all usable
557
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
558
DRIZZLE_CHECK_NEW_RL_INTERFACE
207.1.2 by Jim Winstead
Fix test for libreadline to test a function that exists in all usable
559
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
560
my_save_LIBS="$LIBS"
561
LIBS=""
207.1.2 by Jim Winstead
Fix test for libreadline to test a function that exists in all usable
562
AC_CHECK_LIB(readline, rl_initialize, [],
224.1.1 by Monty Taylor
Fixed readline build problem on Centos.
563
  [AC_CHECK_LIB(ncurses, tgetent, [], [AC_MSG_ERROR(Couldn't find ncurses)]) 
564
   AC_SEARCH_LIBS(rl_initialize, readline, [],
565
    [AC_MSG_ERROR(Couldn't find libreadline.)])])
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
566
READLINE_LIBS="$LIBS"
567
LIBS="$my_save_LIBS"
568
AC_SUBST(READLINE_LIBS)
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
569
287.3.30 by Monty Taylor
Added step one of finding libprotobuf.
570
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
571
#--------------------------------------------------------------------
572
# Check for libpcre
573
#--------------------------------------------------------------------
574
575
AC_LANG_PUSH([C++])
576
AC_PATH_PROG(PKG_CONFIG, pkg-config, AC_MSG_ERROR([pkg-config wasn't found.]))
236.1.18 by Monty Taylor
Put in actual PCRE linking test.
577
PKG_CHECK_MODULES(PCRE, [libpcrecpp >= 3], [found_pcre="yes"],[found_pcre="no"])
578
579
if test "$found_pcre" = "no"
580
then
77.1.64 by Monty Taylor
YA fix for libpcrecpp finding...
581
  dnl Only check the header here, because autoconf can't handle
582
  dnl checking for C++ methods without C linkages
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
583
  AC_CHECK_HEADERS(pcrecpp.h)
77.1.102 by Monty Taylor
Fixed a PCRE detection bug.
584
  if test "x$ac_cv_header_pcrecpp_h" != "xyes" 
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
585
  then
586
    AC_MSG_ERROR([Couldn't find pcrecpp.h. Try installing the development package associated with libpcre on your system.])
236.1.18 by Monty Taylor
Put in actual PCRE linking test.
587
  else
588
    # Found headers, now see if we can link
589
    AC_MSG_CHECKING(for libpcrecpp)
590
    save_LDFLAGS="$LDFLAGS"
591
    LDFLAGS="-lpcrecpp -lpcre"
592
    AC_TRY_LINK([
593
#include <pcrecpp.h>
594
    ],
595
    [pcrecpp::RE_Options opt;],
596
    [found_pcre="yes"],
597
    [AC_MSG_ERROR([Couldn't link libpcrecpp])])
598
599
    PCRE_LIBS="$LDFLAGS"
600
    LDFLAGS="$save_LDFLAGS"
601
    AC_MSG_RESULT([yes])
602
  fi
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
603
fi
604
AC_LANG_POP([])
605
AC_SUBST(PCRE_LIBS)
606
AC_SUBST(PCRE_CFLAGS)
607
1 by brian
clean slate
608
dnl Find paths to some shell programs
609
AC_PATH_PROG(LN, ln, ln)
610
# This must be able to take a -f flag like normal unix ln.
611
AC_PATH_PROG(LN_CP_F, ln, ln)
612
613
AC_PATH_PROG(MV, mv, mv)
614
AC_PATH_PROG(RM, rm, rm)
615
AC_PATH_PROG(CP, cp, cp)
616
AC_PATH_PROG(SED, sed, sed)
617
AC_PATH_PROG(CMP, cmp, cmp)
618
AC_PATH_PROG(CHMOD, chmod, chmod)
619
AC_PATH_PROG(HOSTNAME, hostname, hostname)
620
# Check for a GNU tar named 'gtar', or 'gnutar' (MacOS X) and
621
# fall back to 'tar' otherwise and hope that it's a GNU tar as well
622
AC_CHECK_PROGS(TAR, gnutar gtar tar)
623
624
dnl We use a path for perl so the script startup works
625
dnl We make sure to use perl, not perl5, in hopes that the RPMs will
626
dnl not depend on the perl5 binary being installed (probably a bug in RPM)
627
AC_PATH_PROG(PERL, perl, no)
628
if test "$PERL" != "no" && $PERL -e 'require 5' > /dev/null 2>&1
629
then
630
  PERL5=$PERL
631
else
632
  AC_PATH_PROG(PERL5, perl5, no)
633
  if test "$PERL5" != no
634
  then
635
    PERL=$PERL5
636
    ac_cv_path_PERL=$ac_cv_path_PERL5
637
  fi
638
fi
639
640
AC_SUBST(HOSTNAME)
641
AC_SUBST(PERL)
642
AC_SUBST(PERL5)
643
644
# icheck, used for ABI check
645
AC_PATH_PROG(ICHECK, icheck, no)
646
# "icheck" is also the name of a file system check program on Tru64.
647
# Verify the program found is really the interface checker.
648
if test "x$ICHECK" != "xno"
649
then
650
  AC_MSG_CHECKING(if $ICHECK works as expected)
651
  echo "int foo;" > conftest.h
652
  $ICHECK --canonify -o conftest.ic conftest.h 2>/dev/null
653
  if test -f "conftest.ic"
654
  then
655
    AC_MSG_RESULT(yes)
656
  else
657
    AC_MSG_RESULT(no)
658
    ICHECK=no
659
  fi
660
  rm -f conftest.ic conftest.h
661
fi
662
AC_SUBST(ICHECK)
663
664
# Lock for PS
665
AC_PATH_PROG(PS, ps, ps)
666
AC_MSG_CHECKING("how to check if pid exists")
667
PS=$ac_cv_path_PS
668
# Linux style
669
if $PS p $$ 2> /dev/null | grep `echo $0 | sed s/\-//` > /dev/null
670
then
671
  FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
672
# Solaris
673
elif $PS -fp $$ 2> /dev/null | grep $0 > /dev/null
674
then
675
  FIND_PROC="$PS -p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
676
# BSD style
677
elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
678
then
679
  FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
680
# SysV style
681
elif $PS -ef 2> /dev/null | grep $0 > /dev/null
682
then
683
  FIND_PROC="$PS -ef | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
684
# Do anybody use this?
685
elif $PS $$ 2> /dev/null | grep $0 > /dev/null
686
then
687
  FIND_PROC="$PS \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
688
else
689
  case $SYSTEM_TYPE in
394 by Monty Taylor
Fix configure problem on cygwin. Thanks awfief.
690
    *freebsd*|*dragonfly*|*cygwin*)
1 by brian
clean slate
691
      FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
692
      ;;
693
    *darwin*)
694
      FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
695
      ;;
696
    *)
697
      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.
698
      ;;
1 by brian
clean slate
699
  esac
700
fi
701
AC_SUBST(FIND_PROC)
702
AC_MSG_RESULT("$FIND_PROC")
703
704
# Check if a pid is valid
705
AC_PATH_PROG(KILL, kill, kill)
706
AC_MSG_CHECKING("for kill switches")
707
if $ac_cv_path_KILL -0 $$
708
then
709
  CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
710
elif kill -s 0 $$
711
then
712
  CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
713
else
714
  AC_MSG_WARN([kill -0 to check for pid seems to fail])
715
    CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
716
fi
717
AC_SUBST(CHECK_PID)
718
AC_MSG_RESULT("$CHECK_PID")
719
720
# We need an ANSI C compiler
721
AM_PROG_CC_STDC
722
723
# We need an assembler, too
724
AM_PROG_AS
725
CCASFLAGS="$CCASFLAGS $ASFLAGS"
726
727
# Check if we need noexec stack for assembler
728
AC_CHECK_NOEXECSTACK
729
730
if test "$am_cv_prog_cc_stdc" = "no"
731
then
91 by Brian Aker
Main binary now named drizzled
732
  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
733
fi
734
735
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
736
AC_ARG_WITH([server-suffix],
737
    [AS_HELP_STRING([--with-server-suffix],
738
      [Append value to the version string.])],
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
739
    [ DRIZZLE_SERVER_SUFFIX=`echo "$withval" | sed -e  's/^\(...................................\)..*$/\1/'` ],
740
    [ DRIZZLE_SERVER_SUFFIX= ]
1 by brian
clean slate
741
    )
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
742
AC_SUBST(DRIZZLE_SERVER_SUFFIX)
1 by brian
clean slate
743
744
# 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)
745
AC_ARG_WITH([named-curses-libs],
746
    [AS_HELP_STRING([--with-named-curses-libs=ARG],
747
            [Use specified curses libraries instead of those
748
		automatically found by configure.])],
1 by brian
clean slate
749
    [ with_named_curses=$withval ],
750
    [ with_named_curses=no ]
751
    )
752
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
753
AC_ARG_WITH([tcp-port],
754
    [AS_HELP_STRING([--with-tcp-port=port-number],
165.1.1 by Elliot Murphy
new port number from IANA
755
            [Which port to use for Drizzle services @<:@default=4427@:>@])],
301 by Brian Aker
Clean up port startup
756
    [ DRIZZLE_TCP_PORT=$withval ],
757
    [ DRIZZLE_TCP_PORT=$DRIZZLE_TCP_PORT_DEFAULT
1 by brian
clean slate
758
      # if we actually defaulted (as opposed to the pathological case of
301 by Brian Aker
Clean up port startup
759
      # --with-tcp-port=<DRIZZLE_TCP_PORT_DEFAULT> which might in theory
1 by brian
clean slate
760
      # happen if whole batch of servers was built from a script), set
761
      # the default to zero to indicate that; we don't lose information
762
      # that way, because 0 obviously indicates that we can get the
301 by Brian Aker
Clean up port startup
763
      # default value from DRIZZLE_TCP_PORT. this seems really evil, but
764
      # testing for DRIZZLE_TCP_PORT==DRIZZLE_TCP_PORT_DEFAULT would make a
765
      # a port of DRIZZLE_TCP_PORT_DEFAULT magic even if the builder did not
1 by brian
clean slate
766
      # 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
767
      # from /etc/services if you can", but really, really meant 4427 when
768
      # they passed in 4427. When they pass in a specific value, let them
1 by brian
clean slate
769
      # have it; don't second guess user and think we know better, this will
770
      # just make people cross.  this makes the the logic work like this
771
      # (which is complicated enough):
772
      #
773
      # - if a port was set during build, use that as a default.
774
      #
775
      # - otherwise, try to look up a port in /etc/services; if that fails,
301 by Brian Aker
Clean up port startup
776
      #   use DRIZZLE_TCP_PORT_DEFAULT (at the time of this writing 4427)
1 by brian
clean slate
777
      #
301 by Brian Aker
Clean up port startup
778
      # - allow the DRIZZLE_TCP_PORT environment variable to override that.
1 by brian
clean slate
779
      #
780
      # - allow command-line parameters to override all of the above.
781
      #
301 by Brian Aker
Clean up port startup
782
      # the top-most DRIZZLE_TCP_PORT_DEFAULT is read from win/configure.js,
1 by brian
clean slate
783
      # so don't mess with that.
301 by Brian Aker
Clean up port startup
784
      DRIZZLE_TCP_PORT_DEFAULT=0 ]
1 by brian
clean slate
785
    )
301 by Brian Aker
Clean up port startup
786
AC_SUBST(DRIZZLE_TCP_PORT)
1 by brian
clean slate
787
# We might want to document the assigned port in the manual.
301 by Brian Aker
Clean up port startup
788
AC_SUBST(DRIZZLE_TCP_PORT_DEFAULT)
1 by brian
clean slate
789
790
# Use this to set the place used for unix socket used to local communication.
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
791
AC_ARG_WITH([mysqld-user],
792
    [AS_HELP_STRING([--with-mysqld-user=username],
793
            [What user the mysqld daemon shall be run as.
794
		@<:@default=mysql@:>@])],
1 by brian
clean slate
795
    [ MYSQLD_USER=$withval ],
796
    [ MYSQLD_USER=mysql ]
797
    )
798
AC_SUBST(MYSQLD_USER)
799
800
# If we should allow LOAD DATA LOCAL
801
AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default)
802
AC_ARG_ENABLE(local-infile,
803
    [  --enable-local-infile   Enable LOAD DATA LOCAL INFILE (default: disabled)],
804
    [ ENABLED_LOCAL_INFILE=$enableval ],
805
    [ ENABLED_LOCAL_INFILE=no ]
806
    )
807
if test "$ENABLED_LOCAL_INFILE" = "yes"
808
then
809
  AC_MSG_RESULT([yes])
810
  AC_DEFINE([ENABLED_LOCAL_INFILE], [1],
811
            [If LOAD DATA LOCAL INFILE should be enabled by default])
812
else
813
  AC_MSG_RESULT([no])
814
fi
815
489.1.13 by Monty Taylor
One step closer to simpler off_t support.
816
AC_SYS_LARGEFILE
817
AC_FUNC_FSEEKO
1 by brian
clean slate
818
819
# Types that must be checked AFTER large file support is checked
820
AC_TYPE_SIZE_T
821
822
#--------------------------------------------------------------------
823
# Check for system header files
824
#--------------------------------------------------------------------
825
826
AC_HEADER_DIRENT
827
AC_HEADER_STDC
828
AC_HEADER_SYS_WAIT
53.2.2 by Monty Taylor
Updated everything that needs updating to compile with -std=gnu99 -pedantic
829
AC_HEADER_STDBOOL
77.1.22 by Monty Taylor
Removed refs to floatingpoint.h (which we only used for fconvert) and fconvert
830
AC_CHECK_HEADERS(fcntl.h float.h fpu_control.h ieeefp.h)
53.2.29 by Monty Taylor
Cleaned up headers a little more.
831
AC_CHECK_HEADERS(limits.h pwd.h select.h linux/config.h)
832
AC_CHECK_HEADERS(sys/fpu.h utime.h sys/utime.h )
833
AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h)
77.1.57 by Monty Taylor
Removed dual-compile needs on client.c. Get the symbols now from libdrizzle.
834
AC_CHECK_HEADERS(sys/timeb.h sys/vadvise.h sys/wait.h term.h)
202.1.4 by Monty Taylor
Removed openssl refs.
835
AC_CHECK_HEADERS(termio.h termios.h sched.h alloca.h)
53.2.29 by Monty Taylor
Cleaned up headers a little more.
836
AC_CHECK_HEADERS(sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h)
837
AC_CHECK_HEADERS(sys/prctl.h sys/resource.h sys/param.h port.h ieeefp.h)
838
AC_CHECK_HEADERS(execinfo.h)
1 by brian
clean slate
839
840
AC_CHECK_HEADERS([xfs/xfs.h])
77.1.62 by Monty Taylor
Added checks for libz and readline devel files.
841
77.1.31 by Monty Taylor
Replaced regex lib with pcre. Reworked mysqltest to use it.
842
#--------------------------------------------------------------------
1 by brian
clean slate
843
# Check for system libraries. Adds the library to $LIBS
844
# and defines HAVE_LIBM etc
845
#--------------------------------------------------------------------
846
847
AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
848
236.1.39 by Monty Taylor
autoconf warning cleanups.
849
AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)])
850
AC_CHECK_FUNC(yp_get_default_domain, [],
851
  [AC_CHECK_LIB(nsl, yp_get_default_domain)])
852
AC_CHECK_FUNC(p2open, [], [AC_CHECK_LIB(gen, p2open)])
1 by brian
clean slate
853
# This may get things to compile even if bind-8 is installed
236.1.39 by Monty Taylor
autoconf warning cleanups.
854
AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)])
1 by brian
clean slate
855
# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
856
AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
857
858
# Check rt for aio_read
859
AC_CHECK_LIB(rt, aio_read)
860
861
# For the sched_yield() function on Solaris
236.1.39 by Monty Taylor
autoconf warning cleanups.
862
AC_CHECK_FUNC(sched_yield, [],
863
  [AC_CHECK_LIB(posix4, [sched_yield],
864
    [AC_DEFINE(HAVE_SCHED_YIELD) LIBS="$LIBS -lposix4"])])
1 by brian
clean slate
865
866
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
867
then
236.1.39 by Monty Taylor
autoconf warning cleanups.
868
  AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)])
1 by brian
clean slate
869
fi
870
871
AC_CHECK_TYPES([fp_except], [], [], [
872
#include <sys/types.h>
873
#include <ieeefp.h>
874
])
875
25 by Brian Aker
Clean up of configure.in
876
my_save_LIBS="$LIBS"
877
LIBS=""
878
AC_CHECK_LIB(dl,dlopen)
177.3.1 by mark
remove ifdef HAVE_DLOPEN, make configure require dlopen()
879
AC_CHECK_FUNCS(dlopen dlerror)
880
if test "$ac_cv_func_dlopen" != "yes"
881
then
882
  AC_MSG_ERROR([Drizzle requires dlopen])
883
fi
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
884
LIBDL_LIBS="$LIBS"
25 by Brian Aker
Clean up of configure.in
885
LIBS="$my_save_LIBS"
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
886
AC_SUBST(LIBDL_LIBS)
25 by Brian Aker
Clean up of configure.in
887
888
AC_CHECK_FUNCS(strtok_r)
1 by brian
clean slate
889
201.2.4 by Monty Taylor
Re-enabled optimizations for the normal build, and added back the --with-debug option to turn them off.
890
891
1 by brian
clean slate
892
AC_ARG_WITH([fast-mutexes],
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
893
    [AS_HELP_STRING([--with-fast-mutexes],
894
	    [Compile with fast mutexes  @<:@default=off@:>@])],
895
    [with_fast_mutexes=$withval],
896
    [with_fast_mutexes=no])
1 by brian
clean slate
897
898
if test "$with_fast_mutexes" != "no"
899
then
51.3.26 by Jay Pipes
Final removal of DBUG library and cleanup of Makefiles
900
	AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1], 
901
			[Define to 1 if you want to use fast mutexes])
1 by brian
clean slate
902
fi
903
236.1.56 by Monty Taylor
Made build of thr_mutex.c conditional on --with-fast-mutexes, since that's
904
AM_CONDITIONAL(BUILD_FAST_MUTEX,[test "$with_fast_mutexes" != "no"])
905
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
906
AC_ARG_WITH([comment],
907
    [AS_HELP_STRING([--with-comment],
908
            [Comment about compilation environment. @<:@default=off@:>@])],
1 by brian
clean slate
909
    [with_comment=$withval],
910
    [with_comment=no])
911
if test "$with_comment" != "no"
912
then
913
  COMPILATION_COMMENT=$with_comment
914
else
915
  COMPILATION_COMMENT="Source distribution"
916
fi
917
AC_SUBST(COMPILATION_COMMENT)
918
77.1.96 by Monty Taylor
Removed skip-external-locking.
919
if expr "$target_os" : "[[Ll]]inux.*" > /dev/null
920
then
921
  TARGET_LINUX="true"
922
  AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
923
else
924
  TARGET_LINUX="false"
925
fi
926
1 by brian
clean slate
927
dnl Checks for typedefs, structures, and compiler characteristics.
928
AC_C_CONST
929
AC_C_INLINE
930
AC_TYPE_OFF_T
931
AC_HEADER_TIME
932
AC_STRUCT_TM
933
# off_t is not a builtin type
934
AC_CHECK_SIZEOF(off_t, 4)
935
if test "$ac_cv_sizeof_off_t" -eq 0
936
then
91 by Brian Aker
Main binary now named drizzled
937
  AC_MSG_ERROR("Drizzle needs a off_t type.")
1 by brian
clean slate
938
fi
939
940
dnl
941
dnl check if time_t is unsigned
942
dnl
943
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
944
DRIZZLE_CHECK_TIME_T
1 by brian
clean slate
945
946
947
# This always gives a warning. Ignore it unless you are cross compiling
948
AC_C_BIGENDIAN
949
#---START: Used in for client configure
950
# Check base type of last arg to accept
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
951
DRIZZLE_TYPE_ACCEPT
1 by brian
clean slate
952
#---END:
953
# Figure out what type of struct rlimit to use with setrlimit
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
954
DRIZZLE_TYPE_STRUCT_RLIMIT
1 by brian
clean slate
955
# Find where the stack goes
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
956
DRIZZLE_STACK_DIRECTION
1 by brian
clean slate
957
# 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_
958
DRIZZLE_FUNC_ALLOCA
1 by brian
clean slate
959
# Do struct timespec have members tv_sec or ts_sec
236.1.24 by Monty Taylor
Renamed MYSQL_TIME to DRIZZLE_TIME.
960
DRIZZLE_TIMESPEC_TS
1 by brian
clean slate
961
# Do we have the tzname variable
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
962
DRIZZLE_TZNAME
1 by brian
clean slate
963
# Do the c++ compiler have a bool type
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
964
DRIZZLE_CXX_BOOL
1 by brian
clean slate
965
AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
966
AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
967
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
968
DRIZZLE_PTHREAD_YIELD
1 by brian
clean slate
969
134.2.1 by Antony Curtis
Changes for proper detection of libraries
970
1 by brian
clean slate
971
dnl Checks for header files.
972
AC_CHECK_HEADERS(malloc.h sys/cdefs.h)
973
974
dnl Checks for library functions.
975
AC_FUNC_ALLOCA
976
AC_PROG_GCC_TRADITIONAL
977
AC_TYPE_SIGNAL
978
AC_CHECK_FUNCS(re_comp regcomp strdup)
979
980
dnl Sun compilers have their own vis.h that is about something
981
dnl totally different. So, not to change the libedit source, we
982
dnl do some additional checks before we define HAVE_VIS_H.
983
AC_CHECK_HEADER(vis.h,
984
  [AC_CHECK_FUNC(strvis,
985
    [AC_DEFINE([HAVE_VIS_H], [1],[Found vis.h and the strvis() function])])])
986
987
AC_CHECK_FUNCS(strlcat strlcpy)
988
AC_CHECK_FUNCS(issetugid)
989
AC_CHECK_FUNCS(getline flockfile)
990
991
# from old readline settting:
992
993
MAKE_SHELL=/bin/sh
994
AC_SUBST(MAKE_SHELL)
995
996
# Already-done: stdlib.h string.h unistd.h termios.h
398.1.9 by Monty Taylor
Cleaned up stuff out of global.h.
997
AC_CHECK_HEADERS(stdarg.h dirent.h locale.h ndir.h sys/dir.h \
1 by brian
clean slate
998
 sys/file.h sys/ndir.h sys/ptem.h sys/pte.h sys/select.h sys/stream.h \
999
 sys/mman.h curses.h termcap.h termio.h termbits.h asm/termbits.h grp.h \
1000
paths.h semaphore.h)
1001
1002
# Already-done: strcasecmp
1003
AC_CHECK_FUNCS(lstat putenv select setenv setlocale strcoll tcgetattr)
1004
28.1.33 by Monty Taylor
Added -Wall
1005
AC_HEADER_STAT
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
1006
DRIZZLE_SIGNAL_CHECK
1007
DRIZZLE_CHECK_GETPW_FUNCS
1008
DRIZZLE_HAVE_TIOCGWINSZ
1009
DRIZZLE_HAVE_FIONREAD
1010
DRIZZLE_HAVE_TIOCSTAT
1011
DRIZZLE_STRUCT_DIRENT_D_INO
1012
DRIZZLE_STRUCT_DIRENT_D_NAMLEN
1013
DRIZZLE_TYPE_SIGHANDLER
1014
DRIZZLE_CHECK_MULTIBYTE
1 by brian
clean slate
1015
if test "$with_named_curses" = "no"
1016
then
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
1017
  DRIZZLE_CHECK_LIB_TERMCAP
1 by brian
clean slate
1018
else
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
1019
  TERMCAP_LIBS="$with_named_curses"
1 by brian
clean slate
1020
fi
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
1021
AC_SUBST(TERMCAP_LIBS)
1 by brian
clean slate
1022
1023
# Check if the termcap function 'tgoto' is already declared in
1024
# system header files or if it need to be declared locally
1025
AC_CHECK_DECLS(tgoto,,,[
1026
#ifdef HAVE_CURSES_H
1027
# include <curses.h>
1028
#elif HAVE_NCURSES_H
1029
# include <ncurses.h>
1030
#endif
1031
#ifdef HAVE_TERM_H
1032
# include <term.h>
1033
#endif
1034
])
1035
1036
# End of readline/libedit stuff
1037
#########################################################################
1038
1039
dnl Checks for library functions.
1040
1041
#
1042
# The following code disables intrinsic function support while we test for
1043
# library functions.  This is to avoid configure problems with Intel ecc
1044
# compiler
1045
1046
ORG_CFLAGS="$CFLAGS"
1047
if test "$GCC" != "yes"; then
1048
  AC_SYS_COMPILER_FLAG(-nolib_inline,nolib_inline,CFLAGS,[],[])
1049
fi
1050
1051
#AC_FUNC_MMAP
1052
AC_TYPE_SIGNAL
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
1053
DRIZZLE_TYPE_QSORT
1 by brian
clean slate
1054
AC_FUNC_UTIME_NULL
1055
AC_FUNC_VPRINTF
1056
77.1.24 by Monty Taylor
Removed non-fcntl code and made it a fatal configure error if it's not there.
1057
AC_CHECK_FUNCS(fcntl)
1058
if test "x$ac_cv_func_fcntl" != "xyes"
1059
then
1060
  AC_MSG_ERROR("Drizzle requires fcntl.")
1061
fi
1062
236.1.50 by Monty Taylor
Added automake conditional compilation of distributed system replacement functions.
1063
AC_CONFIG_LIBOBJ_DIR([mystrings])
1064
212.6.3 by Mats Kindahl
Removing deprecated functions from code and replacing them with C99 equivalents:
1065
AC_CHECK_FUNCS(bsearch \
77.1.24 by Monty Taylor
Removed non-fcntl code and made it a fatal configure error if it's not there.
1066
  cuserid fchmod \
77.1.22 by Monty Taylor
Removed refs to floatingpoint.h (which we only used for fconvert) and fconvert
1067
  fdatasync finite fpresetsticky fpsetmask fsync ftruncate \
425 by Monty Taylor
Removed getpass references.
1068
  getcwd getpassphrase getpwnam \
1 by brian
clean slate
1069
  getpwuid getrlimit getrusage getwd index initgroups isnan \
1070
  localtime_r gethrtime gmtime_r \
212.6.1 by Mats Kindahl
Replacing all bzero() calls with memset() calls and removing the bzero.c file.
1071
  locking longjmp lrand48 madvise mallinfo \
212.6.3 by Mats Kindahl
Removing deprecated functions from code and replacing them with C99 equivalents:
1072
  memmove \
236.1.53 by Monty Taylor
Made getpagesize an automake compat LIBOBJ.
1073
  mkstemp mlockall perror poll pread pthread_attr_create mmap mmap64 \
1 by brian
clean slate
1074
  pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
1075
  pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
1076
  pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
1077
  pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
449 by Monty Taylor
Removed rint check - rint is part of C99.
1078
  realpath rename rwlock_init setupterm \
1 by brian
clean slate
1079
  shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \
1080
  sighold sigset sigthreadmask port_create sleep \
266.1.12 by Monty Taylor
Renamed strnmov to stpncpy. Made it conditional.
1081
  snprintf socket strcasecmp strerror strsignal strpbrk \
236.1.54 by Monty Taylor
Removed double check for string functions.
1082
  tell tempnam vidattr \
1 by brian
clean slate
1083
  posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd)
1084
287.3.18 by Monty Taylor
Put -fno-exceptions flag in selectively. Add back HAVE_DECL_MADVISE check so
1085
AC_LANG_PUSH(C++)
1086
# Test whether madvise() is declared in C++ code -- it is not on some
1087
# systems, such as Solaris
373.1.3 by Monty Taylor
Fixed test for HAVE_DECL_MADVISE to actually work.
1088
AC_CHECK_DECLS([madvise], [], [], [AC_INCLUDES_DEFAULT[
1089
#if HAVE_SYS_MMAN_H
287.3.18 by Monty Taylor
Put -fno-exceptions flag in selectively. Add back HAVE_DECL_MADVISE check so
1090
#include <sys/types.h>
1091
#include <sys/mman.h>
373.1.3 by Monty Taylor
Fixed test for HAVE_DECL_MADVISE to actually work.
1092
#endif
1093
]])
287.3.18 by Monty Taylor
Put -fno-exceptions flag in selectively. Add back HAVE_DECL_MADVISE check so
1094
AC_LANG_POP()
1095
1096
236.1.59 by Monty Taylor
Turn thr_rwlock.c into a conditionally built source file.
1097
AM_CONDITIONAL(BUILD_THR_RWLOCK,[test "$ac_cv_func_rwlock_init" -a "$ac_cv_funn_pthread_rwlock_rdlock"])
1098
28.1.33 by Monty Taylor
Added -Wall
1099
# Check that isinf() is available in math.h and can be used in both C and C++
1 by brian
clean slate
1100
# code
28.1.33 by Monty Taylor
Added -Wall
1101
AC_MSG_CHECKING(for isinf in math.h)
1102
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[
1103
    float f = 0.0; 
1104
    int r = isinf(f); 
1105
    return r;
1106
  ]])],[
1 by brian
clean slate
1107
    AC_MSG_RESULT(yes)
28.1.33 by Monty Taylor
Added -Wall
1108
    AC_MSG_CHECKING(whether isinf() can be used in C++ code)
1109
    AC_LANG_PUSH([C++])
1110
    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[
1111
      float f = 0.0;
1112
      int r = isinf(f);
1113
      return r;
1114
    ]])],[
1115
      AC_MSG_RESULT(yes)
1116
      AC_DEFINE(HAVE_ISINF, [1], [isinf() macro or function])
1117
    ],[
1118
      AC_MSG_RESULT(no)
1119
    ])
1120
    AC_LANG_POP([])
1121
  ],[
1122
  AC_MSG_RESULT(no)])
1123
1124
1 by brian
clean slate
1125
CFLAGS="$ORG_CFLAGS"
1126
1127
# Sanity check: We chould not have any fseeko symbol unless
1128
# large_file_support=yes
1129
AC_CHECK_FUNC(fseeko,
1130
[if test "$large_file_support" = no -a "$TARGET_LINUX" = "true";
1131
then
1132
  AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!")
1133
fi]
1134
)
1135
1136
# Check definition of pthread_getspecific
236.1.39 by Monty Taylor
autoconf warning cleanups.
1137
AC_CACHE_CHECK([args to pthread_getspecific], [mysql_cv_getspecific_args],
1138
  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if !defined(_REENTRANT)
1 by brian
clean slate
1139
#define _REENTRANT
1140
#endif
1141
#define _POSIX_PTHREAD_SEMANTICS 
28.1.33 by Monty Taylor
Added -Wall
1142
#include <pthread.h> ]], [[ void *pthread_getspecific(pthread_key_t key);
236.1.39 by Monty Taylor
autoconf warning cleanups.
1143
pthread_getspecific((pthread_key_t) NULL); ]])],
1144
    [mysql_cv_getspecific_args=POSIX],
1145
    [mysql_cv_getspecific_args=other])])
1 by brian
clean slate
1146
  if test "$mysql_cv_getspecific_args" = "other"
1147
  then
1148
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1],
1149
              [For some non posix threads])
1150
  fi
1151
1152
  # Check definition of pthread_mutex_init
236.1.39 by Monty Taylor
autoconf warning cleanups.
1153
  AC_CACHE_CHECK([args to pthread_mutex_init], [mysql_cv_mutex_init_args],
1154
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1 by brian
clean slate
1155
#define _POSIX_PTHREAD_SEMANTICS 
28.1.33 by Monty Taylor
Added -Wall
1156
#include <pthread.h> ]], [[ 
1 by brian
clean slate
1157
  pthread_mutexattr_t attr;
1158
  pthread_mutex_t mp;
236.1.39 by Monty Taylor
autoconf warning cleanups.
1159
  pthread_mutex_init(&mp,&attr); ]])],
1160
      [mysql_cv_mutex_init_args=POSIX],
1161
      [mysql_cv_mutex_init_args=other])])
1 by brian
clean slate
1162
  if test "$mysql_cv_mutex_init_args" = "other"
1163
  then
1164
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1],
1165
              [For some non posix threads])
1166
  fi
1167
#---END:
1168
1169
#---START: Used in for client configure
1170
# Check definition of readdir_r
236.1.39 by Monty Taylor
autoconf warning cleanups.
1171
AC_CACHE_CHECK([args to readdir_r], [mysql_cv_readdir_r],
1172
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1 by brian
clean slate
1173
#define _POSIX_PTHREAD_SEMANTICS 
1174
#include <pthread.h>
28.1.33 by Monty Taylor
Added -Wall
1175
#include <dirent.h>]], [[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
236.1.39 by Monty Taylor
autoconf warning cleanups.
1176
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])],
1177
    [mysql_cv_readdir_r=POSIX],
1178
    [mysql_cv_readdir_r=other])])
1 by brian
clean slate
1179
if test "$mysql_cv_readdir_r" = "POSIX"
1180
then
1181
  AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r])
1182
fi
1183
1184
# Check definition of posix sigwait()
236.1.39 by Monty Taylor
autoconf warning cleanups.
1185
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
1186
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1187
#define _REENTRANT
1 by brian
clean slate
1188
#define _POSIX_PTHREAD_SEMANTICS 
1189
#include <pthread.h>
236.1.39 by Monty Taylor
autoconf warning cleanups.
1190
#include <signal.h>
1191
      ]], [[
1192
#ifndef _AIX
1 by brian
clean slate
1193
sigset_t set;
1194
int sig;
1195
sigwait(&set,&sig);
236.1.39 by Monty Taylor
autoconf warning cleanups.
1196
#endif
1197
      ]])],
1198
    [mysql_cv_sigwait=POSIX],
1199
    [mysql_cv_sigwait=other])])
1 by brian
clean slate
1200
if test "$mysql_cv_sigwait" = "POSIX"
1201
then
1202
  AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait])
1203
fi
1204
1205
if test "$mysql_cv_sigwait" != "POSIX"
1206
then
1207
unset mysql_cv_sigwait
1208
# Check definition of posix sigwait()
236.1.39 by Monty Taylor
autoconf warning cleanups.
1209
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
1210
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1211
#define _REENTRANT
1 by brian
clean slate
1212
#define _POSIX_PTHREAD_SEMANTICS 
1213
#include <pthread.h>
236.1.39 by Monty Taylor
autoconf warning cleanups.
1214
#include <signal.h>
1215
      ]], [[
1216
sigset_t set;
1 by brian
clean slate
1217
int sig;
236.1.39 by Monty Taylor
autoconf warning cleanups.
1218
sigwait(&set);
1219
      ]])],
1220
    [mysql_cv_sigwait=NONPOSIX],
1221
    [mysql_cv_sigwait=other])])
1 by brian
clean slate
1222
if test "$mysql_cv_sigwait" = "NONPOSIX"
1223
then
1224
  AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument])
1225
fi
1226
fi
1227
#---END:
1228
1229
# Check if pthread_attr_setscope() exists
236.1.39 by Monty Taylor
autoconf warning cleanups.
1230
AC_CACHE_CHECK([for pthread_attr_setscope], [mysql_cv_pthread_attr_setscope],
1231
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1232
#define _REENTRANT
1 by brian
clean slate
1233
#define _POSIX_PTHREAD_SEMANTICS 
236.1.39 by Monty Taylor
autoconf warning cleanups.
1234
#include <pthread.h>
1235
      ]], [[
1236
pthread_attr_t thr_attr;
1237
pthread_attr_setscope(&thr_attr,0);
1238
      ]])],
1239
    [mysql_cv_pthread_attr_setscope=yes],
1240
    [mysql_cv_pthread_attr_setscope=no])])
1 by brian
clean slate
1241
if test "$mysql_cv_pthread_attr_setscope" = "yes"
1242
then
1243
  AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope])
1244
fi
1245
1246
# Check for bad includes
1247
AC_MSG_CHECKING("can netinet files be included")
28.1.33 by Monty Taylor
Added -Wall
1248
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
1 by brian
clean slate
1249
#include <sys/socket.h>
1250
#include <netinet/in_systm.h>
1251
#include <netinet/in.h>
1252
#include <netinet/ip.h>
28.1.33 by Monty Taylor
Added -Wall
1253
#include <netinet/tcp.h>]], [[ printf("1\n"); ]])],[netinet_inc=yes],[netinet_inc=no])
1 by brian
clean slate
1254
if test "$netinet_inc" = "no"
1255
then
1256
  AC_DEFINE([HAVE_BROKEN_NETINET_INCLUDES], [1], [Can netinet be included])
1257
fi
1258
AC_MSG_RESULT("$netinet_inc")
1259
28.1.33 by Monty Taylor
Added -Wall
1260
AC_LANG_PUSH([C++])
1 by brian
clean slate
1261
AC_CHECK_HEADERS(cxxabi.h)
1262
AC_CACHE_CHECK([checking for abi::__cxa_demangle], mysql_cv_cxa_demangle,
28.1.33 by Monty Taylor
Added -Wall
1263
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cxxabi.h>]], [[
1 by brian
clean slate
1264
  char *foo= 0; int bar= 0;
1265
  foo= abi::__cxa_demangle(foo, foo, 0, &bar);
28.1.33 by Monty Taylor
Added -Wall
1266
]])],[mysql_cv_cxa_demangle=yes],[mysql_cv_cxa_demangle=no])])
1267
AC_LANG_POP([])
1 by brian
clean slate
1268
1269
if test "x$mysql_cv_cxa_demangle" = xyes; then
1270
  AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1,
1271
            [Define to 1 if you have the `abi::__cxa_demangle' function.])
1272
fi
1273
1274
#--------------------------------------------------------------------
1275
# Check for requested features
1276
#--------------------------------------------------------------------
1277
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
1278
DRIZZLE_CHECK_MAX_INDEXES
1279
DRIZZLE_CHECK_VIO
1 by brian
clean slate
1280
1281
#--------------------------------------------------------------------
1282
# Declare our plugin modules
1283
# Has to be done late, as the plugin may need to check for existence of
1284
# functions tested above
1285
#--------------------------------------------------------------------
1286
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
1287
DRIZZLE_CONFIGURE_PLUGINS([none])
1 by brian
clean slate
1288
1289
AC_SUBST(mysql_plugin_dirs)
1290
AC_SUBST(mysql_plugin_libs)
1291
AC_SUBST(mysql_plugin_defs)
1292
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
1293
# Build optimized or debug version ?
1294
# First check for gcc and g++
1295
if test "$ac_cv_c_compiler_gnu" = "yes"
1296
then
1297
  SYMBOLS_CFLAGS="-ggdb3"
1298
  DEBUG_OPTIMIZE_CC="-O0"
1299
  OPTIMIZE_CFLAGS="-O3"
1300
else
1301
  SYMBOLS_CFLAGS="-g"
1302
  DEBUG_OPTIMIZE_CC=""
1303
  OPTIMIZE_CFLAGS="-O"
1304
fi
1305
if test "$ac_cv_prog_cxx_g" = "yes"
1306
then
1307
  SYMBOLS_CXXFLAGS="-ggdb3"
1308
  DEBUG_OPTIMIZE_CXX="-O0"
1309
  OPTIMIZE_CXXFLAGS="-O3"
1310
else
1311
  SYMBOLS_CXXFLAGS="-g"
1312
  DEBUG_OPTIMIZE_CXX=""
1313
  OPTIMIZE_CXXFLAGS="-O"
1314
fi
1315
1316
dnl TODO: Remove this define once we are using 2.61 across the board.
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
1317
# AX_HEADER_ASSERT
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
1318
# ----------------
1319
# Check whether to enable assertions.
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
1320
AC_DEFUN([AX_HEADER_ASSERT],
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
1321
[
1322
  AC_MSG_CHECKING([whether to enable assertions])
1323
  AC_ARG_ENABLE([assert],
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
1324
    [AS_HELP_STRING([--disable-assert],
1325
       [Turn off assertions])],
1326
    [ac_cv_assert="no"],
1327
    [ac_cv_assert="yes"])
1328
  AC_MSG_RESULT([$ac_cv_assert])
1329
])
1330
1331
AX_HEADER_ASSERT
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
1332
1333
CFLAGS="${SYMBOLS_CFLAGS} ${CFLAGS}"
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.
1334
CXXFLAGS="${SYMBOLS_CXXFLAGS} ${CXXFLAGS}"
1335
#CXXFLAGS="${SYMBOLS_CXXFLAGS} ${CXXFLAGS}  -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
1336
1337
AC_ARG_WITH([debug],
1338
    [AS_HELP_STRING([--with-debug],
496.1.13 by Paul McCullagh
Removed the --with-debug=full option
1339
       [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
1340
    [with_debug=$withval],
1341
    [with_debug=no])
1342
if test "$with_debug" = "yes"
1343
then
1344
  # Medium debug.
496.1.9 by Paul McCullagh
Added a --with-debug=full option to configure (which defines DEBUG on the command line)
1345
  CFLAGS="$DEBUG_OPTIMIZE_CC -DDEBUG $CFLAGS ${SAVE_CFLAGS}"
1346
  CXXFLAGS="$DEBUG_OPTIMIZE_CXX -DDEBUG $CXXFLAGS ${SAVE_CXXFLAGS}"
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
1347
else
1348
  # Optimized version. No debug
1349
  CFLAGS="${OPTIMIZE_CFLAGS} ${CFLAGS} ${SAVE_CFLAGS}"
1350
  CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS ${SAVE_CXXFLAGS}"
1351
fi
1352
189 by Brian Aker
Refactor of configure.ac. Added profile. One note... I believe this should
1353
AC_ARG_ENABLE([profiling],
1354
    [AS_HELP_STRING([--enable-profiling],
1355
       [Toggle profiling @<:@default=off@:>@])],
1356
    [ac_profiling="$enableval"],
1357
    [ac_profiling="no"])
1358
1359
AC_ARG_ENABLE([coverage],
1360
    [AS_HELP_STRING([--enable-coverage],
1361
       [Toggle coverage @<:@default=off@:>@])],
1362
    [ac_coverage="$enableval"],
1363
    [ac_coverage="no"])
1364
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1365
AC_ARG_ENABLE([pedantic-warnings],
1366
    [AS_HELP_STRING([--disable-pedantic-warnings],
1367
       [Toggle pedanticness @<:@default=on@:>@])],
1368
    [ac_warn_pedantic="$enableval"],
1369
    [ac_warn_pedantic="yes"])
1370
1371
AC_ARG_ENABLE([fail],
77.1.112 by Monty Taylor
Fixed comment on --enable-fail -> --disable-fail.
1372
    [AS_HELP_STRING([--disable-fail],
1373
       [Turn warnings into failures @<:@default=on@:>@])],
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1374
    [ac_warn_fail="$enableval"],
77.1.108 by Monty Taylor
Turn on -Werror again by default.
1375
    [ac_warn_fail="yes"])
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1376
53.2.6 by Monty Taylor
Turned unreachable code warnings into a configure option.
1377
AC_ARG_ENABLE([unreachable],
1378
    [AS_HELP_STRING([--enable-unreachable],
1379
       [Enable warnings about unreachable code @<:@default=off@:>@])],
1380
    [ac_warn_unreachable="$enableval"],
1381
    [ac_warn_unreachable="no"])
1382
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1383
AC_ARG_ENABLE([longlong-warnings],
1384
    [AS_HELP_STRING([--enable-longlong-warnings],
1385
       [Enable warnings about longlong in C++ @<:@default=off@:>@])],
1386
    [ac_warn_longlong="$enableval"],
421 by Monty
Made including stdint.h work.
1387
    [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.
1388
1389
AC_ARG_ENABLE([strict-aliasing],
1390
    [AS_HELP_STRING([--enable-strict-aliasing],
1391
       [Enable warnings about stict-aliasing @<:@default=off@:>@])],
1392
    [ac_warn_strict_aliasing="$enableval"],
1393
    [ac_warn_strict_aliasing="no"])
1394
509.2.1 by Monty Taylor
Added some more warning options to configure.
1395
AC_ARG_ENABLE([cast-warnings],
1396
    [AS_HELP_STRING([--enable-cast-warnings],
1397
       [Enable warnings about use of old C-style casts @<:@default=off@:>@])],
1398
    [ac_warn_cast="$enableval"],
1399
    [ac_warn_cast="no"])
1400
1401
AC_ARG_ENABLE([effective-style],
1402
    [AS_HELP_STRING([--enable-effective-style],
1403
       [Enable warnings violating Effective C++ Style Guidelines @<:@default=off@:>@])],
1404
    [ac_warn_effc="$enableval"],
1405
    [ac_warn_effc="no"])
1406
509.2.2 by Monty Taylor
Added one more set of possible warnings.
1407
AC_ARG_ENABLE([go-crazy],
1408
    [AS_HELP_STRING([--enable-go-crazy],
1409
       [Enables extra little warnings that might be too much @<:@default=off@:>@])],
1410
    [ac_warn_go_crazy="$enableval"],
1411
    [ac_warn_go_crazy="no"])
1412
53.2.2 by Monty Taylor
Updated everything that needs updating to compile with -std=gnu99 -pedantic
1413
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1414
if test "$GCC" = "yes"
1415
then
53.2.2 by Monty Taylor
Updated everything that needs updating to compile with -std=gnu99 -pedantic
1416
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1417
  if test "$ac_warn_longlong" = "yes"
1418
  then
1419
    W_LONGLONG="-Wlong-long"
1420
  else
1421
    W_LONGLONG="-Wno-long-long"
1422
  fi
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1423
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1424
  if test "$ac_warn_strict_aliasing" = "yes"
1425
  then
1426
    W_STRICT_ALIASING="-Wstrict-aliasing"
1427
  else
509.2.3 by Monty Taylor
Re-worked strict-aliasing again.
1428
    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.
1429
  fi
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1430
189 by Brian Aker
Refactor of configure.ac. Added profile. One note... I believe this should
1431
  if test "$ac_profiling" = "yes"
1432
  then
1433
    GPROF_PROFILING="-pg"
1434
  else
1435
    GPROF_PROFILING=" "
1436
  fi
1437
1438
  if test "$ac_coverage" = "yes"
1439
  then
1440
    GPROF_COVERAGE="-fprofile-arcs -ftest-coverage"
1441
  else
1442
    GPROF_COVERAGE=" "
1443
  fi
1444
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1445
  if test "$ac_warn_pedantic" = "yes"
1446
  then
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1447
    GCC_PEDANTIC="-pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls ${W_STRICT_ALIASING}"
1448
    GXX_PEDANTIC="-pedantic -Wundef -Wredundant-decls ${W_LONGLONG} ${W_STRICT_ALIASING}"
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1449
  fi
1450
53.2.6 by Monty Taylor
Turned unreachable code warnings into a configure option.
1451
  if test "$ac_warn_unreachable" = "yes"
1452
  then
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1453
    W_UNREACHABLE="-Wunreachable-code"
53.2.6 by Monty Taylor
Turned unreachable code warnings into a configure option.
1454
  fi
1455
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1456
  if test "$ac_warn_fail" = "yes"
1457
  then
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1458
    W_FAIL="-Werror"
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1459
  fi
1460
509.2.1 by Monty Taylor
Added some more warning options to configure.
1461
  if test "$ac_warn_cast" = "yes"
1462
  then
1463
    W_CAST="-Wold-style-cast"
1464
  fi
1465
1466
  if test "$ac_warn_effc" = "yes"
1467
  then
1468
    W_EFFC="-Weffc++"
1469
  fi
1470
509.2.2 by Monty Taylor
Added one more set of possible warnings.
1471
  if test "$ac_warn_gocrazy" = "yes"
1472
  then
1473
    W_CRAZY="-Wshadow -Wconversion -Winvalid-pch"
1474
  fi
1475
511.2.1 by Monty Taylor
Added -Wunused-macros.
1476
  BASE_WARNINGS="-W -Wall -Wextra -Wunused-macros"
509.2.2 by Monty Taylor
Added one more set of possible warnings.
1477
  GCC_WARNINGS="${C99_SUPPORT_HACK} ${BASE_WARNINGS} ${GCC_PEDANTIC} ${W_UNREACHABLE} ${W_FAIL} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_CRAZY}"
1478
  GXX_WARNINGS="${BASE_WARNINGS} ${GXX_PEDANTIC} ${W_UNREACHABLE} ${W_FAIL} ${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.
1479
287.3.28 by Monty Taylor
Expanded the move to AM_CFLAGS and AM_CXXFLAGS. Now we should be more correct.
1480
  AM_CXXFLAGS="${GXX_WARNINGS} ${AM_CXXFLAGS}"
1481
  AM_CFLAGS="${GCC_WARNINGS} ${AM_CFLAGS}"
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1482
fi
1483
212.5.43 by Monty Taylor
Removed global include dir from CPPFLAGS.
1484
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.
1485
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.
1486
AC_SUBST([AM_CFLAGS])
1487
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.
1488
1 by brian
clean slate
1489
# Some usefull subst
1490
AC_SUBST(CC)
1491
AC_SUBST(GXX)
1492
1493
# Set configuration options for make_binary_distribution
1494
case $SYSTEM_TYPE in
1495
  *netware*)
1496
    MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --no-strip"
1497
    ;;
1498
  *)
1499
    : # no change for other platforms yet
1500
    ;;
1501
esac
1502
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
1503
492.1.7 by Monty Taylor
Moved test() to its own file.
1504
dnl GCC Precompiled Header Support
1505
AM_CONDITIONAL([GCC_PCH],[test "x$GCC" = "xyes"])
1506
287.3.1 by Monty Taylor
Removed mysys/tests.
1507
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.
1508
 mystrings/Makefile storage/Makefile dnl
202.3.2 by Monty Taylor
Added gettext calls in to my_getopt.c and drizzle.c
1509
 vio/Makefile po/Makefile.in dnl
77.1.38 by Monty Taylor
Renamed more stuff to drizzle.
1510
 libdrizzle/Makefile client/Makefile dnl
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
1511
 drizzled/Makefile dnl
1512
 drizzled/field/Makefile dnl
316 by Brian Aker
First pass of new sql_db.cc work
1513
 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)
1514
 drizzled/functions/Makefile dnl
492.1.7 by Monty Taylor
Moved test() to its own file.
1515
 drizzled/util/Makefile dnl
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
1516
 drizzled/sql_builtin.cc dnl
28.1.31 by Monty Taylor
Deleted tons of pointless garbage from scripts.
1517
 support-files/Makefile dnl
77.1.47 by Monty Taylor
Moved test to tests...
1518
 tests/Makefile tests/install_test_db dnl
212.5.36 by Monty Taylor
Moved drizzle_version.
1519
 drizzled/version.h plugin/Makefile dnl
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
1520
 drizzled/drizzled_safe support-files/libdrizzle.pc dnl
77.1.38 by Monty Taylor
Renamed more stuff to drizzle.
1521
 support-files/drizzle.server support-files/drizzle-log-rotate)
1 by brian
clean slate
1522
1523
AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
1524
1525
# 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.
1526
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
1527
1528
AC_OUTPUT
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
1529
1530
echo "---"
1531
echo "Configuration summary for $PACKAGE_NAME version $VERSION"
1532
echo ""
1533
echo "   * Installation prefix:       $prefix"
1534
echo "   * System type:               $SYSTEM_TYPE"
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
1535
echo "   * Host CPU:                  $host_cpu"
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
1536
echo "   * C Compiler:                $CC_VERSION"
1537
echo "   * C++ Compiler:              $CXX"
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
1538
echo "   * Build auth_pam:            $ac_cv_header_security_pam_appl_h"
1539
echo "   * Assertions enabled:        $ac_cv_assert"
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
1540
echo "   * Debug enabled:             $with_debug"
1541
echo "   * Profiling enabled:         $ac_profiling"
1542
echo "   * Coverage enabled:          $ac_coverage"
1543
echo "   * Warnings as failure:       $ac_warn_fail"
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
1544
echo "   * C++ cstdint location:      $ac_cv_cxx_cstdint"
1545
echo "   * C++ hash_map location:     $ac_cv_cxx_hash_map"
1546
echo "   * C++ hash namespace:        $ac_cv_cxx_hash_namespace"
1547
echo "   * C++ cmath location:        $ac_cv_cxx_cmath"
1548
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>
1549
echo ""
1550
echo "---"