2
2
dnl Process this file with autoconf to produce a configure script.
4
dnl Copyright (C) 2009 Sun Microsystems
6
dnl This program is free software; you can redistribute it and/or modify
7
dnl it under the terms of the GNU General Public License as published by
8
dnl the Free Software Foundation; version 2 of the License.
10
dnl This program is distributed in the hope that it will be useful,
11
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
dnl GNU General Public License for more details.
15
dnl You should have received a copy of the GNU General Public License
16
dnl along with this program; if not, write to the Free Software
17
dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
AC_PREREQ(2.59)dnl Minimum Autoconf version required.
21
dnl Version from the AC_INIT call below is overridden later
22
dnl So don't update it here
23
AC_INIT([drizzle7],[7],[http://bugs.launchpad.net/drizzle])
24
AC_CONFIG_SRCDIR([drizzled/drizzled.cc])
25
AC_CONFIG_AUX_DIR([config])
27
PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, require-cxx, force-gcc42, version-from-vc, skip-visibility)
29
LIBDRIZZLE_LIBRARY_VERSION=1:0:0
33
# current:revision:age
35
# | | +- increment if interfaces have been added
36
# | | set to zero if interfaces have been
37
# | | removed or changed
38
# | +- increment if source code has changed
39
# | set to zero if current is incremented
40
# +- increment if interfaces have been added, removed or
42
AC_SUBST(LIBDRIZZLE_LIBRARY_VERSION)
44
# libdrizzle versioning when linked with GNU ld.
45
AS_IF([test "$lt_cv_prog_gnu_ld" = "yes"],[
46
LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/config/drizzle.ver"
4
AC_PREREQ(2.61)dnl Minimum Autoconf version required.
7
AC_CONFIG_SRCDIR([sql/drizzled.cc])
8
AC_CONFIG_AUX_DIR(config)
9
AC_CONFIG_HEADERS([include/config.h:config.h.in])
11
AM_INIT_AUTOMAKE(drizzle, 7.0.0, no-define)
15
# See the libtool docs for information on how to do shared lib versions.
16
SHARED_LIB_MAJOR_VERSION=16
17
SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0
21
# Set all version vars based on $VERSION. How do we do this more elegant ?
22
# Remember that regexps needs to quote [ and ] since this is run through m4
23
# We take some made up examples
25
# VERSION 5.1.40sp1-alpha 5.0.34a
26
# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a
27
# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34
28
# MYSQL_BASE_VERSION 5.1 5.0
29
# MYSQL_VERSION_ID 50140 50034
31
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
32
MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
33
MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
34
MYSQL_VERSION_ID=`echo $MYSQL_NUMERIC_VERSION | \
35
awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'`
37
# The port should be constant for a LONG time
38
MYSQL_TCP_PORT_DEFAULT=3306
41
sinclude(config/ac-macros/alloca.m4)
42
sinclude(config/ac-macros/check_cpu.m4)
43
sinclude(config/ac-macros/character_sets.m4)
44
sinclude(config/ac-macros/compiler_flag.m4)
45
sinclude(config/ac-macros/dtrace.m4)
46
sinclude(config/ac-macros/plugins.m4)
47
sinclude(config/ac-macros/large_file.m4)
48
sinclude(config/ac-macros/misc.m4)
49
sinclude(config/ac-macros/readline.m4)
50
sinclude(config/ac-macros/ssl.m4)
52
# Remember to add a directory sql/share/LANGUAGE
53
AVAILABLE_LANGUAGES="\
54
czech danish dutch english estonian french german greek hungarian \
55
italian japanese korean norwegian norwegian-ny polish portuguese \
56
romanian russian serbian slovak spanish swedish ukrainian"
61
AC_SUBST(MYSQL_NO_DASH_VERSION)
62
AC_SUBST(MYSQL_BASE_VERSION)
63
AC_SUBST(MYSQL_VERSION_ID)
64
AC_SUBST(MYSQL_PREVIOUS_BASE_VERSION)
65
AC_SUBST(PROTOCOL_VERSION)
66
AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION],
67
[mysql client protocol version])
68
AC_SUBST(DOT_FRM_VERSION)
69
AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION],
70
[Version of .frm files])
71
AC_SUBST(SHARED_LIB_MAJOR_VERSION)
72
AC_SUBST(SHARED_LIB_VERSION)
73
AC_SUBST(AVAILABLE_LANGUAGES)
76
# Canonicalize the configuration name.
78
# Check whether --with-system-type or --without-system-type was given.
79
AC_ARG_WITH([system-type],
80
[AS_HELP_STRING([--with-system-type],
81
[Set the system type, like "sun-solaris10"])],
82
[SYSTEM_TYPE="$withval"],
83
[SYSTEM_TYPE="$host_vendor-$host_os"])
84
AC_ARG_WITH([machine-type],
85
[AS_HELP_STRING([--with-machine-type],
86
[Set the machine type, like "powerpc"])],
87
[MACHINE_TYPE="$withval"],
88
[MACHINE_TYPE="$host_cpu"])
90
AC_DEFINE_UNQUOTED([SYSTEM_TYPE], ["$SYSTEM_TYPE"],
91
[Name of system, eg sun-solaris])
92
AC_SUBST(MACHINE_TYPE)
93
AC_DEFINE_UNQUOTED([MACHINE_TYPE], ["$MACHINE_TYPE"],
94
[Machine type name, eg sparc])
96
# Detect intel x86 like processor
97
BASE_MACHINE_TYPE=$MACHINE_TYPE
99
i?86) BASE_MACHINE_TYPE=i386 ;;
102
# Save some variables and the command line options for mysqlbug
105
SAVE_ASFLAGS="$ASFLAGS"
106
SAVE_CFLAGS="$CFLAGS"
107
SAVE_CXXFLAGS="$CXXFLAGS"
108
SAVE_LDFLAGS="$LDFLAGS"
109
SAVE_CXXLDFLAGS="$CXXLDFLAGS"
110
CONF_COMMAND="$0 $ac_configure_args"
111
AC_SUBST(CONF_COMMAND)
114
AC_SUBST(SAVE_ASFLAGS)
115
AC_SUBST(SAVE_CFLAGS)
116
AC_SUBST(SAVE_CXXFLAGS)
117
AC_SUBST(SAVE_LDFLAGS)
118
AC_SUBST(SAVE_CXXLDFLAGS)
122
# This is needed is SUBDIRS is set
125
##############################################################################
126
# The below section needs to be done before AC_PROG_CC
127
##############################################################################
129
if test "x${CFLAGS-}" = x ; then
135
if test "x${CPPFLAGS-}" = x ; then
141
if test "x${LDFLAGS-}" = x ; then
147
################ End of section to be done before AC_PROG_CC #################
149
# The following hack should ensure that configure doesn't add optimizing
150
# or debugging flags to CFLAGS or CXXFLAGS
151
# C_EXTRA_FLAGS are flags that are automaticly added to both
152
# CFLAGS and CXXFLAGS
153
CFLAGS="$CFLAGS $C_EXTRA_FLAGS "
154
CXXFLAGS="$CXXFLAGS $C_EXTRA_FLAGS "
156
dnl Checks for programs.
163
# Print version of CC and CXX compiler (if they support --version)
166
CC_VERSION=`$CC -version | grep -i version`
169
CC_VERSION=`$CC --version | sed 1q`
174
AC_MSG_CHECKING("C Compiler version")
175
AC_MSG_RESULT("$CC $CC_VERSION")
180
MYSQL_CHECK_CXX_VERSION
182
if test "$ac_cv_c_compiler_gnu" = "yes"
187
AC_PATH_PROG(AS, as, as)
190
# Still need ranlib for readline; local static use only so no libtool.
193
#AC_LIBTOOL_WIN32_DLL
196
# Ensure that we have --preserve-dup-deps defines, otherwise we get link
197
# problems of 'mysql' with CXX=g++
198
LIBTOOL="$LIBTOOL --preserve-dup-deps"
204
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
206
# Not critical since the generated file is distributed
207
AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL'])
209
AC_PATH_PROG(uname_prog, uname, no)
211
# We should go through this and put all the explictly system dependent
213
AC_MSG_CHECKING(operating system)
214
AC_CACHE_VAL(mysql_cv_sys_os,
216
if test "$uname_prog" != "no"; then
217
mysql_cv_sys_os="`uname`"
219
mysql_cv_sys_os="Not Solaris"
222
AC_MSG_RESULT($mysql_cv_sys_os)
224
# This should be rewritten to use $target_os
227
TARGET_SOLARIS="true"
228
AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
229
AC_SUBST(TARGET_SOLARIS)
233
# The following is required for portable results of floating point calculations
234
# on PowerPC. The same must also be done for IA-64, but this options is missing
235
# in the IA-64 gcc backend.
237
if test "$GCC" = "yes"
241
CFLAGS="$CFLAGS -mno-fused-madd"
242
CXXFLAGS="$CXXFLAGS -mno-fused-madd"
253
AC_SUBST(INSTALL_SCRIPT)
256
export CC CXX CFLAGS LD LDFLAGS AR ARFLAGS
258
if test "$GCC" = "yes"
260
# mysqld requires -fno-implicit-templates.
261
# Disable exceptions as they seams to create problems with gcc and threads.
262
# mysqld doesn't use run-time-type-checking, so we disable it.
263
# We should use -Wno-invalid-offsetof flag to disable some warnings from gcc
264
# regarding offset() usage in C++ which are done in a safe manner in the
266
CXXFLAGS="$CXXFLAGS ${GCC_WARNINGS} -fno-implicit-templates -fno-exceptions -fno-rtti"
267
CFLAGS="$CFLAGS ${GCC_WARNINGS} "
268
AC_DEFINE([HAVE_EXPLICIT_TEMPLATE_INSTANTIATION],
269
[1], [Defined by configure. Use explicit template instantiation.])
274
# libmysqlclient versioning when linked with GNU ld.
275
if $LD --version 2>/dev/null|grep -q GNU; then
276
LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/libmysql/libmysql.ver"
277
AC_CONFIG_FILES(libmysql/libmysql.ver)
48
279
AC_SUBST(LD_VERSION_SCRIPT)
50
dnl Set the default datadir location to /usr/local/var/drizzle. If a
51
dnl localstatedir is explicitly given, just use that.
52
AS_IF([test "x${localstatedir}" = 'x${prefix}/var'],[
53
localstatedir='${prefix}/var/drizzle'
56
AC_PATH_PROG(GPERF, gperf)
57
AS_IF([test "x$GPERF" = "x"],
58
AC_MSG_ERROR("Drizzle requires gperf to build."))
60
# libexecinfo provides backtrace_symbols on FreeBSD
61
AC_SEARCH_LIBS(backtrace_symbols, [execinfo])
65
PANDORA_REQUIRE_LIBPROTOBUF
66
PANDORA_PROTOBUF_REQUIRE_VERSION([2.1.0])
67
PANDORA_REQUIRE_PROTOC
70
PANDORA_REQUIRE_PTHREAD
71
PANDORA_REQUIRE_LIBUUID
73
PANDORA_REQUIRE_LIBPCRE
74
PANDORA_REQUIRE_LIBREADLINE
78
DRIZZLE_STACK_DIRECTION
80
PANDORA_USE_BETTER_MALLOC
83
AC_DEFINE([BUILDING_DRIZZLED],[1],
84
[Define indicating we are building and not consuming drizzle.])
87
PANDORA_HAVE_LIBSQLITE3
89
AC_CHECK_FUNC(inet_ntoa, [], [AC_CHECK_LIB(nsl, inet_ntoa)])
282
# Avoid bug in fcntl on some versions of linux
283
AC_MSG_CHECKING([if we should use 'skip-external-locking' as default for $target_os])
284
# Any variation of Linux
285
if expr "$target_os" : "[[Ll]]inux.*" > /dev/null
287
MYSQLD_DEFAULT_SWITCHES="--skip-external-locking"
290
AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
292
MYSQLD_DEFAULT_SWITCHES=""
296
AC_SUBST(MYSQLD_DEFAULT_SWITCHES)
297
AC_SUBST(TARGET_LINUX)
299
dnl Find paths to some shell programs
300
AC_PATH_PROG(LN, ln, ln)
301
# This must be able to take a -f flag like normal unix ln.
302
AC_PATH_PROG(LN_CP_F, ln, ln)
304
AC_PATH_PROG(MV, mv, mv)
305
AC_PATH_PROG(RM, rm, rm)
306
AC_PATH_PROG(CP, cp, cp)
307
AC_PATH_PROG(SED, sed, sed)
308
AC_PATH_PROG(CMP, cmp, cmp)
309
AC_PATH_PROG(CHMOD, chmod, chmod)
310
AC_PATH_PROG(HOSTNAME, hostname, hostname)
311
# Check for a GNU tar named 'gtar', or 'gnutar' (MacOS X) and
312
# fall back to 'tar' otherwise and hope that it's a GNU tar as well
313
AC_CHECK_PROGS(TAR, gnutar gtar tar)
315
dnl We use a path for perl so the script startup works
316
dnl We make sure to use perl, not perl5, in hopes that the RPMs will
317
dnl not depend on the perl5 binary being installed (probably a bug in RPM)
318
AC_PATH_PROG(PERL, perl, no)
319
if test "$PERL" != "no" && $PERL -e 'require 5' > /dev/null 2>&1
323
AC_PATH_PROG(PERL5, perl5, no)
324
if test "$PERL5" != no
327
ac_cv_path_PERL=$ac_cv_path_PERL5
335
# icheck, used for ABI check
336
AC_PATH_PROG(ICHECK, icheck, no)
337
# "icheck" is also the name of a file system check program on Tru64.
338
# Verify the program found is really the interface checker.
339
if test "x$ICHECK" != "xno"
341
AC_MSG_CHECKING(if $ICHECK works as expected)
342
echo "int foo;" > conftest.h
343
$ICHECK --canonify -o conftest.ic conftest.h 2>/dev/null
344
if test -f "conftest.ic"
351
rm -f conftest.ic conftest.h
356
AC_PATH_PROG(PS, ps, ps)
357
AC_MSG_CHECKING("how to check if pid exists")
360
if $PS p $$ 2> /dev/null | grep `echo $0 | sed s/\-//` > /dev/null
362
FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
364
elif $PS -fp $$ 2> /dev/null | grep $0 > /dev/null
366
FIND_PROC="$PS -p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
368
elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
370
FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
372
elif $PS -ef 2> /dev/null | grep $0 > /dev/null
374
FIND_PROC="$PS -ef | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
375
# Do anybody use this?
376
elif $PS $$ 2> /dev/null | grep $0 > /dev/null
378
FIND_PROC="$PS \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
381
*freebsd*|*dragonfly*)
382
FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
385
FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
388
AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
392
AC_MSG_RESULT("$FIND_PROC")
394
# Check if a pid is valid
395
AC_PATH_PROG(KILL, kill, kill)
396
AC_MSG_CHECKING("for kill switches")
397
if $ac_cv_path_KILL -0 $$
399
CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
402
CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
404
AC_MSG_WARN([kill -0 to check for pid seems to fail])
405
CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
408
AC_MSG_RESULT("$CHECK_PID")
410
# We need an ANSI C compiler
413
# We need an assembler, too
415
CCASFLAGS="$CCASFLAGS $ASFLAGS"
417
# Check if we need noexec stack for assembler
420
if test "$am_cv_prog_cc_stdc" = "no"
422
AC_MSG_ERROR([Drizzle requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
92
426
AC_ARG_WITH([server-suffix],
93
427
[AS_HELP_STRING([--with-server-suffix],
94
428
[Append value to the version string.])],
95
[ DRIZZLE_SERVER_SUFFIX="$withval" ]
96
[ DRIZZLE_SERVER_SUFFIX= ])
98
AC_DEFINE_UNQUOTED([DRIZZLE_SERVER_SUFFIX],[$DRIZZLE_SERVER_SUFFIX],
99
[Append value to the version string])
102
AC_ARG_WITH([drizzled-user],
103
[AS_HELP_STRING([--with-drizzled-user=username],
104
[What user the drizzled daemon shall be run as.
105
@<:@default=drizzle@:>@])],
106
[ DRIZZLED_USER="$withval" ],
107
[ DRIZZLED_USER=drizzle ])
108
AC_SUBST(DRIZZLED_USER)
429
[ MYSQL_SERVER_SUFFIX=`echo "$withval" | sed -e 's/^\(...................................\)..*$/\1/'` ],
430
[ MYSQL_SERVER_SUFFIX= ]
432
AC_SUBST(MYSQL_SERVER_SUFFIX)
434
# Force use of a curses libs
435
AC_ARG_WITH([named-curses-libs],
436
[AS_HELP_STRING([--with-named-curses-libs=ARG],
437
[Use specified curses libraries instead of those
438
automatically found by configure.])],
439
[ with_named_curses=$withval ],
440
[ with_named_curses=no ]
443
# compile with strings functions in assembler
444
AC_ARG_ENABLE([assembler],
445
[AS_HELP_STRING([--enable-assembler],
446
[Use assembler versions of some string functions if available.])],
447
[ ENABLE_ASSEMBLER=$enableval ],
448
[ ENABLE_ASSEMBLER=no ]
451
AC_MSG_CHECKING(if we should use assembler functions)
452
# For now we only support assembler on i386 and sparc systems
453
AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386" && $AS strings/strings-x86.s -o checkassembler >/dev/null 2>&1 && test -f checkassembler && (rm -f checkassembler; exit 0;))
454
AM_CONDITIONAL(ASSEMBLER_sparc32, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc")
455
AM_CONDITIONAL(ASSEMBLER_sparc64, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparcv9")
456
AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc32_TRUE" = "")
458
if test "$ASSEMBLER_TRUE" = ""
466
AC_MSG_CHECKING(if SHOW PROFILE should be enabled.)
467
AC_ARG_ENABLE([profiling],
468
[AS_HELP_STRING([--enable-profiling],
469
[Build a version with query profiling code])],
470
[ ENABLED_PROFILING=$enableval ],
471
[ ENABLED_PROFILING=no ])
473
if test "$ENABLED_PROFILING" = "yes"
475
AC_DEFINE([ENABLED_PROFILING], [1],
476
[If SHOW PROFILE should be enabled])
482
AC_ARG_WITH([tcp-port],
483
[AS_HELP_STRING([--with-tcp-port=port-number],
484
[Which port to use for Drizzle services @<:@default=3306@:>@])],
485
[ MYSQL_TCP_PORT=$withval ],
486
[ MYSQL_TCP_PORT=$MYSQL_TCP_PORT_DEFAULT
487
# if we actually defaulted (as opposed to the pathological case of
488
# --with-tcp-port=<MYSQL_TCP_PORT_DEFAULT> which might in theory
489
# happen if whole batch of servers was built from a script), set
490
# the default to zero to indicate that; we don't lose information
491
# that way, because 0 obviously indicates that we can get the
492
# default value from MYSQL_TCP_PORT. this seems really evil, but
493
# testing for MYSQL_TCP_PORT==MYSQL_TCP_PORT_DEFAULT would make a
494
# a port of MYSQL_TCP_PORT_DEFAULT magic even if the builder did not
495
# intend it to mean "use the default, in fact, look up a good default
496
# from /etc/services if you can", but really, really meant 3306 when
497
# they passed in 3306. When they pass in a specific value, let them
498
# have it; don't second guess user and think we know better, this will
499
# just make people cross. this makes the the logic work like this
500
# (which is complicated enough):
502
# - if a port was set during build, use that as a default.
504
# - otherwise, try to look up a port in /etc/services; if that fails,
505
# use MYSQL_TCP_PORT_DEFAULT (at the time of this writing 3306)
507
# - allow the MYSQL_TCP_PORT environment variable to override that.
509
# - allow command-line parameters to override all of the above.
511
# the top-most MYSQL_TCP_PORT_DEFAULT is read from win/configure.js,
512
# so don't mess with that.
513
MYSQL_TCP_PORT_DEFAULT=0 ]
515
AC_SUBST(MYSQL_TCP_PORT)
516
# We might want to document the assigned port in the manual.
517
AC_SUBST(MYSQL_TCP_PORT_DEFAULT)
519
# Use this to set the place used for unix socket used to local communication.
520
AC_ARG_WITH([mysqld-user],
521
[AS_HELP_STRING([--with-mysqld-user=username],
522
[What user the mysqld daemon shall be run as.
523
@<:@default=mysql@:>@])],
524
[ MYSQLD_USER=$withval ],
525
[ MYSQLD_USER=mysql ]
527
AC_SUBST(MYSQLD_USER)
529
# If we should allow LOAD DATA LOCAL
530
AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default)
531
AC_ARG_ENABLE(local-infile,
532
[ --enable-local-infile Enable LOAD DATA LOCAL INFILE (default: disabled)],
533
[ ENABLED_LOCAL_INFILE=$enableval ],
534
[ ENABLED_LOCAL_INFILE=no ]
536
if test "$ENABLED_LOCAL_INFILE" = "yes"
539
AC_DEFINE([ENABLED_LOCAL_INFILE], [1],
540
[If LOAD DATA LOCAL INFILE should be enabled by default])
547
# Types that must be checked AFTER large file support is checked
550
#--------------------------------------------------------------------
551
# Check for system header files
552
#--------------------------------------------------------------------
558
AC_CHECK_HEADERS(fcntl.h float.h fpu_control.h ieeefp.h)
559
AC_CHECK_HEADERS(limits.h pwd.h select.h linux/config.h)
560
AC_CHECK_HEADERS(sys/fpu.h utime.h sys/utime.h )
561
AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h)
562
AC_CHECK_HEADERS(sys/timeb.h ys/un.h sys/vadvise.h sys/wait.h term.h)
563
AC_CHECK_HEADERS(termio.h termios.h sched.h crypt.h alloca.h)
564
AC_CHECK_HEADERS(sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h)
565
AC_CHECK_HEADERS(sys/prctl.h sys/resource.h sys/param.h port.h ieeefp.h)
566
AC_CHECK_HEADERS(execinfo.h)
568
AC_CHECK_HEADERS([xfs/xfs.h])
569
#--------------------------------------------------------------------
571
#--------------------------------------------------------------------
573
AC_CHECK_LIB(event, event_loop, [], [AC_MSG_ERROR(could not find libevent)])
575
#--------------------------------------------------------------------
576
# Check for libpthread
577
#--------------------------------------------------------------------
579
AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR(could not find libpthread)])
581
#--------------------------------------------------------------------
583
#--------------------------------------------------------------------
585
AC_PATH_PROG(PKG_CONFIG, pkg-config, AC_MSG_ERROR([pkg-config wasn't found.]))
586
PKG_CHECK_MODULES(PCRE, [libpcrecpp >= 3], [
587
AC_DEFINE([HAVE_PCRE], [1], [Perl Compatible Regex Lib for mysqltest])
589
AC_CHECK_LIB(pcrecpp, [DoMatch], AC_MSG_ERROR([PCRE not found]))
590
AC_MSG_WARN([PCRE not found - mysqltest will not be built])
593
AC_SUBST(PCRE_CFLAGS)
595
#--------------------------------------------------------------------
596
# Check for system libraries. Adds the library to $LIBS
597
# and defines HAVE_LIBM etc
598
#--------------------------------------------------------------------
600
AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
603
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
604
AC_CHECK_FUNC(yp_get_default_domain, ,
605
AC_CHECK_LIB(nsl, yp_get_default_domain))
606
AC_CHECK_FUNC(p2open, , AC_CHECK_LIB(gen, p2open))
607
# This may get things to compile even if bind-8 is installed
608
AC_CHECK_FUNC(bind, , AC_CHECK_LIB(bind, bind))
609
# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
610
AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
612
# Check rt for aio_read
613
AC_CHECK_LIB(rt, aio_read)
615
# For the sched_yield() function on Solaris
616
AC_CHECK_FUNC(sched_yield, , AC_CHECK_LIB(posix4, sched_yield,
617
[AC_DEFINE(HAVE_SCHED_YIELD) LIBS="$LIBS -lposix4"]))
619
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
621
AC_CHECK_FUNC(gtty, , AC_CHECK_LIB(compat, gtty))
624
AC_CHECK_TYPES([int8, uint8, int16, uint16, int32, uint32, int64, uint64,
625
uchar, uint, ulong],[],[], [
626
#include <sys/types.h>
628
AC_CHECK_TYPES([fp_except], [], [], [
629
#include <sys/types.h>
636
AC_CHECK_LIB(dl,dlopen)
643
AC_CHECK_FUNCS(dlopen dlerror)
646
AC_CHECK_FUNCS(strtok_r)
648
# Build optimized or debug version ?
649
# First check for gcc and g++
650
if test "$ac_cv_c_compiler_gnu" = "yes"
653
DEBUG_OPTIMIZE_CC="-O"
654
OPTIMIZE_CFLAGS="$MAX_C_OPTIMIZE"
660
if test "$ac_cv_prog_cxx_g" = "yes"
663
DEBUG_OPTIMIZE_CXX="-O"
664
OPTIMIZE_CXXFLAGS="$MAX_CXX_OPTIMIZE"
667
DEBUG_OPTIMIZE_CXX=""
668
OPTIMIZE_CXXFLAGS="-O"
671
# If the user specified CFLAGS, we won't add any optimizations
672
if test -n "$SAVE_CFLAGS"
678
if test -n "$SAVE_CXXFLAGS"
681
DEBUG_OPTIMIZE_CXX=""
685
[AS_HELP_STRING([--with-debug],
686
[Add debug code (yes|no|full) @<:@default=no@:>@
687
Full adds memory checked, very slow.])],
688
[with_debug=$withval],
690
AM_CONDITIONAL(BUILD_DBUG, test "$with_debug" != "no")
691
if test "$with_debug" = "yes"
694
AC_DEFINE([DBUG_ON], [1], [Use libdbug])
695
CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC $CFLAGS"
696
CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX $CXXFLAGS"
698
elif test "$with_debug" = "full"
700
# Full debug. Very slow in some cases
701
AC_DEFINE([DBUG_ON], [1], [Use libdbug])
702
CFLAGS="$DEBUG_CFLAGS $CFLAGS"
703
CXXFLAGS="$DEBUG_CXXFLAGS $CXXFLAGS"
705
# Optimized version. No debug
706
AC_DEFINE([DBUG_OFF], [1], [Dont use libdbug])
707
CFLAGS="$OPTIMIZE_CFLAGS $CFLAGS"
708
CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
711
# If we should allow error injection tests
712
AC_ARG_WITH([error-inject],
713
[AS_HELP_STRING([--with-error-inject],
714
[Enable error injection in Drizzle Server @<:@default=off@:>@])],
715
[ with_error_inject=$withval ],
716
[ with_error_inject=no ])
718
if test $with_debug != "no"
720
if test "$with_error_inject" = "yes"
722
AC_DEFINE([ERROR_INJECT_SUPPORT], [1],
723
[Enable error injection in Drizzle Server])
727
AC_ARG_WITH([fast-mutexes],
728
[AS_HELP_STRING([--with-fast-mutexes],
729
[Compile with fast mutexes @<:@default=off@:>@])],
730
[with_fast_mutexes=$withval],
731
[with_fast_mutexes=no])
733
if test "$with_fast_mutexes" != "no"
735
if test "$with_debug" != "no"
737
AC_MSG_WARN(['--with-fast-mutexes' ignored when '--with-debug' is given])
739
AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1],
740
[Define to 1 if you want to use fast mutexes])
111
744
AC_ARG_WITH([comment],
112
745
[AS_HELP_STRING([--with-comment],
113
746
[Comment about compilation environment. @<:@default=off@:>@])],
114
747
[with_comment=$withval],
115
748
[with_comment=no])
116
AS_IF([test "$with_comment" != "no"],[
749
if test "$with_comment" != "no"
117
751
COMPILATION_COMMENT=$with_comment
119
COMPILATION_COMMENT="Source distribution (${PANDORA_RELEASE_COMMENT})"
753
COMPILATION_COMMENT="Source distribution"
755
AC_SUBST(COMPILATION_COMMENT)
757
AC_MSG_CHECKING("need of special linking flags")
758
if test "$TARGET_LINUX" = "true" -a "$ac_cv_c_compiler_gnu" = "yes" -a "$all_is_static" != "yes"
760
LDFLAGS="$LDFLAGS -rdynamic"
761
AC_MSG_RESULT("-rdynamic")
763
case "$SYSTEM_TYPE$with_mysqld_ldflags " in
764
*freebsd*"-all-static "*|*dragonfly*"-all-static "*)
765
AC_MSG_RESULT("none")
767
*freebsd*|*dragonfly*)
768
MYSQLD_EXTRA_LDFLAGS="$MYSQLD_EXTRA_LDFLAGS -export-dynamic"
769
AC_MSG_RESULT("-export-dynamic")
772
AC_MSG_RESULT("none")
777
dnl Checks for typedefs, structures, and compiler characteristics.
783
MYSQL_NEEDS_MYSYS_NEW
784
# AC_CHECK_SIZEOF return 0 when it does not find the size of a
785
# type. We want a error instead.
786
AC_CHECK_SIZEOF(char, 1)
787
if test "$ac_cv_sizeof_char" -eq 0
789
AC_MSG_ERROR([No size for char type.])
791
AC_CHECK_SIZEOF(char*, 4)
792
AC_CHECK_SIZEOF(short, 2)
793
AC_CHECK_SIZEOF(int, 4)
794
if test "$ac_cv_sizeof_int" -eq 0
796
AC_MSG_ERROR("No size for int type.")
798
AC_CHECK_SIZEOF(long, 4)
799
if test "$ac_cv_sizeof_long" -eq 0
801
AC_MSG_ERROR("No size for long type.")
803
AC_CHECK_SIZEOF(long long, 8)
804
if test "$ac_cv_sizeof_long_long" -eq 0
806
AC_MSG_ERROR("Drizzle needs a long long type.")
808
# off_t is not a builtin type
809
AC_CHECK_SIZEOF(off_t, 4)
810
if test "$ac_cv_sizeof_off_t" -eq 0
812
AC_MSG_ERROR("Drizzle needs a off_t type.")
816
dnl check if time_t is unsigned
822
# do we need #pragma interface/#pragma implementation ?
823
# yes if it's gcc 2.x, and not icc pretending to be gcc, and not cygwin
824
AC_MSG_CHECKING(the need for @%:@pragma interface/implementation)
825
# instead of trying to match SYSTEM_TYPE and CC_VERSION (that doesn't
826
# follow any standard), we'll use well-defined preprocessor macros:
827
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
828
#if !defined(__CYGWIN__) && !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ < 3)
829
#error USE_PRAGMA_IMPLEMENTATION
831
]])],[AC_MSG_RESULT(no) ],[AC_MSG_RESULT(yes) ; CXXFLAGS="$CXXFLAGS -DUSE_PRAGMA_IMPLEMENTATION"])
833
# This always gives a warning. Ignore it unless you are cross compiling
835
#---START: Used in for client configure
836
# Check base type of last arg to accept
839
# Figure out what type of struct rlimit to use with setrlimit
840
MYSQL_TYPE_STRUCT_RLIMIT
841
# Find where the stack goes
842
MYSQL_STACK_DIRECTION
843
# We want to skip alloca on irix unconditionally. It may work on some version..
845
# Do struct timespec have members tv_sec or ts_sec
847
# Do we have the tzname variable
849
# Do the c++ compiler have a bool type
851
AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
852
AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
853
AC_CHECK_TYPES([u_int32_t])
857
######################################################################
858
# For readline/libedit (We simply move the mimimum amount of stuff from
859
# the readline/libedit configure.in here)
861
dnl Checks for header files.
862
AC_CHECK_HEADERS(malloc.h sys/cdefs.h)
864
dnl Checks for library functions.
866
AC_PROG_GCC_TRADITIONAL
868
AC_CHECK_FUNCS(re_comp regcomp strdup)
870
dnl Sun compilers have their own vis.h that is about something
871
dnl totally different. So, not to change the libedit source, we
872
dnl do some additional checks before we define HAVE_VIS_H.
873
AC_CHECK_HEADER(vis.h,
874
[AC_CHECK_FUNC(strvis,
875
[AC_DEFINE([HAVE_VIS_H], [1],[Found vis.h and the strvis() function])])])
877
AC_CHECK_FUNCS(strlcat strlcpy)
878
AC_CHECK_FUNCS(issetugid)
879
AC_CHECK_FUNCS(getline flockfile)
881
# from old readline settting:
886
# Already-done: stdlib.h string.h unistd.h termios.h
887
AC_CHECK_HEADERS(varargs.h stdarg.h dirent.h locale.h ndir.h sys/dir.h \
888
sys/file.h sys/ndir.h sys/ptem.h sys/pte.h sys/select.h sys/stream.h \
889
sys/mman.h curses.h termcap.h termio.h termbits.h asm/termbits.h grp.h \
892
# Already-done: strcasecmp
893
AC_CHECK_FUNCS(lstat putenv select setenv setlocale strcoll tcgetattr)
897
MYSQL_CHECK_GETPW_FUNCS
898
MYSQL_HAVE_TIOCGWINSZ
901
MYSQL_STRUCT_DIRENT_D_INO
902
MYSQL_STRUCT_DIRENT_D_NAMLEN
903
MYSQL_TYPE_SIGHANDLER
904
MYSQL_CHECK_MULTIBYTE
905
if test "$with_named_curses" = "no"
907
MYSQL_CHECK_LIB_TERMCAP
909
TERMCAP_LIB="$with_named_curses"
911
AC_SUBST(TERMCAP_LIB)
913
# Check if the termcap function 'tgoto' is already declared in
914
# system header files or if it need to be declared locally
915
AC_CHECK_DECLS(tgoto,,,[
919
# include <ncurses.h>
121
AC_DEFINE_UNQUOTED([COMPILATION_COMMENT],["$COMPILATION_COMMENT"],
122
[Comment about compilation environment])
926
# End of readline/libedit stuff
125
927
#########################################################################
128
dnl Has to be done late, as the plugin may need to check for existence of
129
dnl functions tested above
130
PANDORA_PLUGINS([drizzled/module/load_list.h])
132
dnl GCC Precompiled Header Support
134
dnl AM_CONDITIONAL([BUILD_GCC_PCH],[test "$GCC" = "yes"])
135
AM_CONDITIONAL([BUILD_GCC_PCH],[test "no" = "yes"])
137
AS_IF([test "$lt_cv_prog_gnu_ld" = "yes"],[
138
LDFLAGS="${LDFLAGS} ${LD_VERSION_SCRIPT}"
143
AC_CONFIG_FILES(Makefile dnl
145
drizzled/plugin/version.h dnl
146
support-files/libdrizzle.pc dnl
147
support-files/drizzle.server support-files/drizzle-log-rotate
148
support-files/smf/install.sh dnl
149
support-files/drizzle.spec dnl
150
support-files/smf/drizzle.xml dnl
151
support-files/smf/drizzle)
153
scheduling_plugins_available="
158
for sched_plugin in $scheduling_plugins_available
160
varname="\${with_plugin_${sched_plugin}}"
161
result=`eval "echo $varname"`
162
if test "x$result" = "xyes"
164
scheduling_plugins="$sched_plugin $scheduling_plugins"
929
dnl Checks for library functions.
932
# The following code disables intrinsic function support while we test for
933
# library functions. This is to avoid configure problems with Intel ecc
937
if test "$GCC" != "yes"; then
938
AC_SYS_COMPILER_FLAG(-nolib_inline,nolib_inline,CFLAGS,[],[])
947
AC_CHECK_FUNCS(fcntl)
948
if test "x$ac_cv_func_fcntl" != "xyes"
950
AC_MSG_ERROR("Drizzle requires fcntl.")
953
AC_CHECK_FUNCS(bcmp bfill bmove bsearch bzero \
955
fdatasync finite fpresetsticky fpsetmask fsync ftruncate \
956
getcwd getpass getpassphrase getpwnam \
957
getpwuid getrlimit getrusage getwd index initgroups isnan \
958
localtime_r gethrtime gmtime_r \
959
locking longjmp lrand48 madvise mallinfo memcpy memmove \
960
mkstemp mlockall perror poll pread pthread_attr_create mmap mmap64 getpagesize \
961
pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
962
pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
963
pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
964
pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
965
realpath rename rint rwlock_init setupterm \
966
shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \
967
sighold sigset sigthreadmask port_create sleep \
968
snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
969
strtol strtoll strtoul strtoull tell tempnam vidattr \
970
posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd)
972
# Check that isinf() is available in math.h and can be used in both C and C++
974
AC_MSG_CHECKING(for isinf in math.h)
975
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[
981
AC_MSG_CHECKING(whether isinf() can be used in C++ code)
983
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[
989
AC_DEFINE(HAVE_ISINF, [1], [isinf() macro or function])
1000
# Sanity check: We chould not have any fseeko symbol unless
1001
# large_file_support=yes
1002
AC_CHECK_FUNC(fseeko,
1003
[if test "$large_file_support" = no -a "$TARGET_LINUX" = "true";
1005
AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!")
1009
# Check definition of pthread_getspecific
1010
AC_CACHE_CHECK("args to pthread_getspecific", mysql_cv_getspecific_args,
1011
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if !defined(_REENTRANT)
1014
#define _POSIX_PTHREAD_SEMANTICS
1015
#include <pthread.h> ]], [[ void *pthread_getspecific(pthread_key_t key);
1016
pthread_getspecific((pthread_key_t) NULL); ]])],[mysql_cv_getspecific_args=POSIX],[mysql_cv_getspecific_args=other]))
1017
if test "$mysql_cv_getspecific_args" = "other"
1019
AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1],
1020
[For some non posix threads])
1023
# Check definition of pthread_mutex_init
1024
AC_CACHE_CHECK("args to pthread_mutex_init", mysql_cv_mutex_init_args,
1025
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1026
#define _POSIX_PTHREAD_SEMANTICS
1027
#include <pthread.h> ]], [[
1028
pthread_mutexattr_t attr;
1030
pthread_mutex_init(&mp,&attr); ]])],[mysql_cv_mutex_init_args=POSIX],[mysql_cv_mutex_init_args=other]))
1031
if test "$mysql_cv_mutex_init_args" = "other"
1033
AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1],
1034
[For some non posix threads])
1038
#---START: Used in for client configure
1039
# Check definition of readdir_r
1040
AC_CACHE_CHECK("args to readdir_r", mysql_cv_readdir_r,
1041
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1042
#define _POSIX_PTHREAD_SEMANTICS
1043
#include <pthread.h>
1044
#include <dirent.h>]], [[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
1045
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])],[mysql_cv_readdir_r=POSIX],[mysql_cv_readdir_r=other]))
1046
if test "$mysql_cv_readdir_r" = "POSIX"
1048
AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r])
1051
# Check definition of posix sigwait()
1052
AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait,
1053
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1054
#define _POSIX_PTHREAD_SEMANTICS
1055
#include <pthread.h>
1056
#include <signal.h>]], [[#ifndef _AIX
1060
#endif]])],[mysql_cv_sigwait=POSIX],[mysql_cv_sigwait=other]))
1061
if test "$mysql_cv_sigwait" = "POSIX"
1063
AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait])
1066
if test "$mysql_cv_sigwait" != "POSIX"
1068
unset mysql_cv_sigwait
1069
# Check definition of posix sigwait()
1070
AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait,
1071
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1072
#define _POSIX_PTHREAD_SEMANTICS
1073
#include <pthread.h>
1074
#include <signal.h>]], [[sigset_t set;
1076
sigwait(&set);]])],[mysql_cv_sigwait=NONPOSIX],[mysql_cv_sigwait=other]))
1077
if test "$mysql_cv_sigwait" = "NONPOSIX"
1079
AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument])
1084
# Check if pthread_attr_setscope() exists
1085
AC_CACHE_CHECK("for pthread_attr_setscope", mysql_cv_pthread_attr_setscope,
1086
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1087
#define _POSIX_PTHREAD_SEMANTICS
1088
#include <pthread.h>]], [[pthread_attr_t thr_attr;
1089
pthread_attr_setscope(&thr_attr,0);]])],[mysql_cv_pthread_attr_setscope=yes],[mysql_cv_pthread_attr_setscope=no]))
1090
if test "$mysql_cv_pthread_attr_setscope" = "yes"
1092
AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope])
1095
# Check for bad includes
1096
AC_MSG_CHECKING("can netinet files be included")
1097
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
1098
#include <sys/socket.h>
1099
#include <netinet/in_systm.h>
1100
#include <netinet/in.h>
1101
#include <netinet/ip.h>
1102
#include <netinet/tcp.h>]], [[ printf("1\n"); ]])],[netinet_inc=yes],[netinet_inc=no])
1103
if test "$netinet_inc" = "no"
1105
AC_DEFINE([HAVE_BROKEN_NETINET_INCLUDES], [1], [Can netinet be included])
1107
AC_MSG_RESULT("$netinet_inc")
1110
AC_CHECK_HEADERS(cxxabi.h)
1111
AC_CACHE_CHECK([checking for abi::__cxa_demangle], mysql_cv_cxa_demangle,
1112
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cxxabi.h>]], [[
1113
char *foo= 0; int bar= 0;
1114
foo= abi::__cxa_demangle(foo, foo, 0, &bar);
1115
]])],[mysql_cv_cxa_demangle=yes],[mysql_cv_cxa_demangle=no])])
1118
if test "x$mysql_cv_cxa_demangle" = xyes; then
1119
AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1,
1120
[Define to 1 if you have the `abi::__cxa_demangle' function.])
1123
#--------------------------------------------------------------------
1124
# Check for requested features
1125
#--------------------------------------------------------------------
1127
MYSQL_CHECK_BIG_TABLES
1128
MYSQL_CHECK_MAX_INDEXES
1131
#--------------------------------------------------------------------
1132
# Declare our plugin modules
1133
# Has to be done late, as the plugin may need to check for existence of
1134
# functions tested above
1135
#--------------------------------------------------------------------
1137
MYSQL_CONFIGURE_PLUGINS([none])
1139
AC_SUBST(CLIENT_LIBS)
1141
AC_SUBST(mysql_plugin_dirs)
1142
AC_SUBST(mysql_plugin_libs)
1143
AC_SUBST(mysql_plugin_defs)
1145
AC_ARG_ENABLE([pedantic-warnings],
1146
[AS_HELP_STRING([--disable-pedantic-warnings],
1147
[Toggle pedanticness @<:@default=on@:>@])],
1148
[ac_warn_pedantic="$enableval"],
1149
[ac_warn_pedantic="yes"])
1151
AC_ARG_ENABLE([fail],
1152
[AS_HELP_STRING([--enable-fail],
1153
[Turn warnings into failures @<:@default=off@:>@])],
1154
[ac_warn_fail="$enableval"],
1155
[ac_warn_fail="no"])
1157
AC_ARG_ENABLE([unreachable],
1158
[AS_HELP_STRING([--enable-unreachable],
1159
[Enable warnings about unreachable code @<:@default=off@:>@])],
1160
[ac_warn_unreachable="$enableval"],
1161
[ac_warn_unreachable="no"])
1164
if test "$GCC" = "yes"
1167
GCC_WARNINGS="-W -Wall"
1168
GXX_WARNINGS="${GCC_WARNINGS}"
1171
if test "$ac_warn_pedantic" = "yes"
1173
GCC_WARNINGS="${GCC_WARNINGS} -std=gnu99 -pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls "
1174
GXX_WARNINGS="${GXX_WARNINGS} -std=gnu++98 -pedantic -Wundef -Wredundant-decls -Wno-long-long "
1177
if test "$ac_warn_unreachable" = "yes"
1179
GCC_WARNINGS="${GCC_WARNINGS} -Wunreachable-code"
1180
GXX_WARNINGS="${GXX_WARNINGS} -Wunreachable-code"
1183
if test "$ac_warn_fail" = "yes"
1185
GCC_WARNINGS="${GCC_WARNINGS} -Werror"
1186
GXX_WARNINGS="${GXX_WARNINGS} -Werror"
1189
CXXFLAGS="$CXXFLAGS ${GXX_WARNINGS}"
1190
CFLAGS="$CFLAGS ${GCC_WARNINGS} "
1193
# Some usefull subst
1197
# Set configuration options for make_binary_distribution
1198
case $SYSTEM_TYPE in
1200
MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --no-strip"
1203
: # no change for other platforms yet
1206
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
1208
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile mysys/tests/Makefile dnl
1209
strings/Makefile strings/tests/Makefile storage/Makefile dnl
1211
libmysql/Makefile client/Makefile dnl
1212
sql/Makefile sql/share/Makefile dnl
1213
sql/sql_builtin.cc sql-common/Makefile dnl
1214
dbug/Makefile include/Makefile dnl
1215
support-files/Makefile dnl
1216
mysql-test/Makefile mysql-test/install_test_db dnl
1217
include/mysql_version.h plugin/Makefile dnl
1218
sql/drizzled_safe support-files/libmysqlclient.pc dnl
1219
support-files/mysql.server support-files/mysql-log-rotate)
1221
AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
1223
# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
1224
AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS'")
171
echo "Configuration summary for $PACKAGE_NAME version $VERSION $PANDORA_RELEASE_COMMENT"
173
echo " * Installation prefix: $prefix"
174
echo " * System type: $host_vendor-$host_os"
175
echo " * pandora-build version: PANDORA_CANONICAL_VERSION"
176
echo " * Host CPU: $host_cpu"
177
echo " * C Compiler: $CC_VERSION"
178
echo " * C++ Compiler: $CXX_VERSION"
179
echo " * Assertions enabled: $ac_cv_assert"
180
echo " * Debug enabled: $with_debug"
181
echo " * Profiling enabled: $ac_profiling"
182
echo " * Coverage enabled: $ac_coverage"
183
echo " * Warnings as failure: $ac_cv_warnings_as_errors"
191
echo "* NOTE: You are on FreeBSD. BSD make will not work."
193
echo "* use 'gmake' To build Drizzle"
195
echo "* And ensure that /usr/local/lib/gcc44 is in your LD_LIBRARY_PATH"
202
dnl libtoolize scans configure.ac and needs to see some text
203
m4_define([LIBTOOLIZE_AC_INIT], [])