20
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])
22
m4_include(m4/bzr_version.m4)
24
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"
48
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'
25
AC_CONFIG_AUX_DIR(config)
26
AC_CONFIG_HEADERS([config.h])
27
AC_CONFIG_MACRO_DIR([m4])
29
# Setting CFLAGS here prevents AC_CANONICAL_TARGET from injecting them
31
SAVE_CXXFLAGS=${CXXFLAGS}
38
CXXFLAGS=${SAVE_CXXFLAGS}
40
AM_INIT_AUTOMAKE(nostdinc subdir-objects -Wall -Werror)
42
if test "x${enable_dependency_tracking}" = "x"
44
enable_dependency_tracking=yes
50
dnl Checks for programs.
53
gl_USE_SYSTEM_EXTENSIONS
54
if test "$GCC" = "yes"
56
# If you're on a Mac, and you didn't ask for a specific compiler
57
# You're gonna get 4.2.
58
if test "$host_vendor" = "apple" -a "x${ac_cv_env_CC_set}" = "x"
60
CPP="/usr/bin/gcc-4.2 -E"
64
AC_CACHE_CHECK([if GCC is recent enough], [drizzle_cv_gcc_recent],
65
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
66
#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 1))
67
# error GCC is Too Old!
70
[drizzle_cv_gcc_recent=yes],
71
[drizzle_cv_gcc_recent=no])])
72
if test "$drizzle_cv_gcc_recent" = "no" -a "$host_vendor" = "apple"
74
AC_MSG_ERROR([Your version of GCC is too old. Drizzle requires at least version 4.2 on OSX. You may need to install a version of XCode >= 3.1.2])
76
if test "$drizzle_cv_gcc_recent" = "no"
78
AC_MSG_ERROR([Your version of GCC is too old. Drizzle requires at least version 4.1])
81
AC_CXX_HEADER_STDCXX_98
82
if test "$ac_cv_cxx_stdcxx_98" = "no"
84
AC_MSG_ERROR([No working C++ Compiler has been found. Drizzle requires a C++ compiler that can handle C++98])
89
if test "$am_cv_prog_cc_stdc" = "no"
91
AC_MSG_ERROR([Drizzle requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
98
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
100
AC_PROG_GCC_TRADITIONAL
103
# Set all version vars based on $VERSION. How do we do this more elegant ?
104
# Remember that regexps needs to quote [ and ] since this is run through m4
105
# We take some made up examples
107
# VERSION 5.1.40sp1-alpha 5.0.34a
108
# DRIZZLE_NO_DASH_VERSION 5.1.40sp1 5.0.34a
109
# DRIZZLE_NUMERIC_VERSION 5.1.40 5.0.34
110
# DRIZZLE_BASE_VERSION 5.1 5.0
111
# DRIZZLE_VERSION_ID 50140 50034
113
DRIZZLE_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
114
DRIZZLE_NUMERIC_VERSION=`echo $DRIZZLE_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
115
DRIZZLE_BASE_VERSION=`echo $DRIZZLE_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
116
DRIZZLE_VERSION_ID=`echo $DRIZZLE_NUMERIC_VERSION | \
117
awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'`
118
AC_DEFINE_UNQUOTED(DRIZZLE_BASE_VERSION,["$DRIZZLE_BASE_VERSION"],
119
[Major and minor version])
120
AC_DEFINE_UNQUOTED([DRIZZLE_VERSION_ID],[$DRIZZLE_VERSION_ID],
121
[Version ID that can be easily used for numeric comparison])
123
AC_DEFINE([_BACKWARD_BACKWARD_WARNING_H],[1],[Hack to disable deprecation warning in gcc])
125
# The port should be constant for a LONG time
126
DRIZZLE_TCP_PORT_DEFAULT=4427
128
m4_include(m4/dtrace.m4)
130
m4_include(m4/character_sets.m4)
131
AC_SUBST(AVAILABLE_LANGUAGES)
134
# Set this for plugins to use
135
ac_build_drizzle="yes"
138
# Canonicalize the configuration name.
140
# Check whether --with-system-type or --without-system-type was given.
141
AC_ARG_WITH([system-type],
142
[AS_HELP_STRING([--with-system-type],
143
[Set the system type, like "sun-solaris10"])],
144
[SYSTEM_TYPE="$withval"],
145
[SYSTEM_TYPE="$host_vendor-$host_os"])
146
AC_ARG_WITH([machine-type],
147
[AS_HELP_STRING([--with-machine-type],
148
[Set the machine type, like "sparc"])],
149
[MACHINE_TYPE="$withval"],
150
[MACHINE_TYPE="$host_cpu"])
151
AC_SUBST(SYSTEM_TYPE)
152
AC_DEFINE_UNQUOTED([SYSTEM_TYPE], ["$SYSTEM_TYPE"],
153
[Name of system, eg sun-solaris])
154
AC_SUBST(MACHINE_TYPE)
155
AC_DEFINE_UNQUOTED([MACHINE_TYPE], ["$MACHINE_TYPE"],
156
[Machine type name, eg sparc])
158
# Detect intel x86 like processor
159
BASE_MACHINE_TYPE=$MACHINE_TYPE
160
case $MACHINE_TYPE in
161
i?86) BASE_MACHINE_TYPE=i386 ;;
168
AC_SUBST(TARGET_LINUX)
169
AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
174
AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX])
177
TARGET_SOLARIS="true"
178
AC_SUBST(TARGET_SOLARIS)
179
AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
185
DRIZZLE_CHECK_C_VERSION
186
DRIZZLE_CHECK_CXX_VERSION
56
193
AC_PATH_PROG(GPERF, gperf)
57
194
AS_IF([test "x$GPERF" = "x"],
58
195
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
197
AC_PATH_PROG(LCOV, lcov)
198
AC_PATH_PROG(GENHTML, genhtml)
200
AM_CONDITIONAL(HAVE_LCOV,[test "x$LCOV" != "x"])
206
dnl Not critical since the generated file is distributed
207
AC_CHECK_PROGS(YACC, ['bison -y'])
208
if test -z "$YACC" && test -d "$srcdir/.bzr"
210
AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
213
AC_CHECK_PROGS(ISAINFO, [isainfo], [no])
214
AS_IF([test "x$ISAINFO" != "xno"],
215
[isainfo_b=`isainfo -b`],
218
# Build optimized or debug version ?
219
# First check for gcc and g++
220
if test "$GCC" = "yes"
222
if test "$isainfo_b" = "64"
226
AC_DEFINE([_GNU_SOURCE],[1],[Fix problem with S_ISLNK() on Linux])
228
dnl The following is required for portable results of floating point
229
dnl calculations on PowerPC. The same must also be done for IA-64, but
230
dnl this options is missing in the IA-64 gcc backend.
233
CFLAGS="-mno-fused-madd ${CFLAGS}"
234
CXXFLAGS="-mno-fused-madd ${CXXFLAGS}"
238
CFLAGS="-ggdb3 ${IS_64} -std=gnu99 ${CFLAGS}"
239
CXXFLAGS="-ggdb3 ${IS_64} ${CXXFLAGS}"
240
AC_CXX_CHECK_STANDARD
246
OPTIMIZE_CFLAGS="-O3"
247
OPTIMIZE_CXXFLAGS="-O3"
249
if test "$SUNCC" = "yes"
251
if test "$isainfo_b" = "64"
255
dnl we put CPPFLAGS and LDFLAGS first here, because if the user has specified
256
dnl command line CPPFLAGS or LDFLAGS, their -I or -L should come _first_
257
if test "$target_cpu" = "sparc"
259
MEMALIGN_FLAGS="-xmemalign=8s"
262
if test "x$use_additional" != "xyes"
264
AS_IF([test "$isainfo_b" != "none"],[
265
LDFLAGS="${LDFLAGS} -L/usr/local/lib/${isainfo_b} -L/usr/local/lib -L/opt/csw/lib/${isainfo_b} -L/opt/csw/lib"
267
LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/opt/csw/lib"
269
CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/opt/csw/include"
271
AS_IF([test "$isainfo_b" != "none"],
272
[LDFLAGS="${LDFLAGS} -L/usr/lib/${isainfo_b}"])
274
CXXFLAGS="-xlang=c99 -g -mt -compat=5 -library=stlport4 -template=no%extdef ${IS_64} ${MEMALIGN_FLAGS} ${CXXFLAGS}"
275
CFLAGS="-g -mt -xc99=all ${IS_64} ${MEMALIGN_FLAGS} ${CFLAGS}"
277
DEBUG_CXXFLAGS="-xO0"
279
dnl TODO: -xO4 causes a Sun Studio failure in innodb... let's check back
281
OPTIMIZE_FLAGS="-xO3 -xlibmil -xdepend"
282
OPTIMIZE_CFLAGS="${OPTIMIZE_FLAGS} -Xa -xstrconst"
283
OPTIMIZE_CXXFLAGS="${OPTIMIZE_FLAGS}"
287
m4_include(m4/gettext.m4)
288
AM_GNU_GETTEXT(external, need-formatstring-macros)
289
if test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"
291
AM_PATH_PROG_WITH_TEST(GMSGMERGE, gmsgmerge,
292
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
293
MSGMERGE="${GMSGMERGE}"
295
AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
301
dnl TODO: Remove this define once we are using 2.61 across the board.
304
# Check whether to enable assertions.
305
AC_DEFUN([AX_HEADER_ASSERT],
307
AC_MSG_CHECKING([whether to enable assertions])
308
AC_ARG_ENABLE([assert],
309
[AS_HELP_STRING([--disable-assert],
310
[Turn off assertions])],
312
[ac_cv_assert="yes"])
313
AC_MSG_RESULT([$ac_cv_assert])
319
[AS_HELP_STRING([--with-debug],
320
[Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
321
[with_debug=$withval],
323
if test "$with_debug" = "yes"
325
# Debuging. No optimization.
326
CFLAGS="${DEBUG_CFLAGS} ${CFLAGS}"
327
CXXFLAGS="${DEBUG_CXXFLAGS} ${CXXFLAGS}"
329
# Optimized version. No debug
330
CFLAGS="${OPTIMIZE_CFLAGS} ${CFLAGS}"
331
CXXFLAGS="${OPTIMIZE_CXXFLAGS} ${CXXFLAGS}"
344
#--------------------------------------------------------------------
345
# Check for Google Proto Buffers
346
#--------------------------------------------------------------------
349
AC_LIB_HAVE_LINKFLAGS(protobuf,pthread,
350
[#include <google/protobuf/descriptor.h>
352
[google::protobuf::FileDescriptor* file;],system)
353
AS_IF([test x$ac_cv_libprotobuf = xno],
354
AC_MSG_ERROR([protobuf is required for Drizzle. On Debian this can be found in libprotobuf-dev. On RedHat this can be found in protobuf-devel.]))
356
AC_CACHE_CHECK([if protobuf is recent enough], [drizzle_cv_protobuf_recent],
357
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
358
#include <google/protobuf/descriptor.h>
359
#if GOOGLE_PROTOBUF_VERSION < 2000002
360
# error Your version of Protobuf is too old
363
[drizzle_cv_protobuf_recent=yes],
364
[drizzle_cv_protobuf_recent=no])])
365
if test "$drizzle_cv_protobuf_recent" = "no"
367
AC_MSG_ERROR([Your version of Google Protocol Buffers is too old. Drizzle requires at least version 2.0.2])
370
AC_PATH_PROG([PROTOC],[protoc],[no],[$LIBPROTOBUF_PREFIX/bin:$PATH])
371
if test "x$PROTOC" = "xno"
373
AC_MSG_ERROR([Couldn't find the protoc compiler. On Debian this can be found in protobuf-compiler. On RedHat this can be found in protobuf-compiler.])
378
#--------------------------------------------------------------------
380
#--------------------------------------------------------------------
382
dnl Do this by hand. Need to check for uuid/uuid.h, but uuid may or may
383
dnl not be a lib is weird.
385
AC_CHECK_HEADERS(uuid/uuid.h)
386
if test "x$ac_cv_header_uuid_uuid_h" = "xno"
388
AC_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On Redhat this can be found in e2fsprogs-devel.])
390
AC_LIB_HAVE_LINKFLAGS(uuid,,
392
#include <uuid/uuid.h>
401
#--------------------------------------------------------------------
402
# Check for libpthread
403
#--------------------------------------------------------------------
405
ACX_PTHREAD(,AC_MSG_ERROR(could not find libpthread))
406
LIBS="$PTHREAD_LIBS $LIBS"
407
CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
410
#--------------------------------------------------------------------
411
# Check for tcmalloc/mtmalloc
412
#--------------------------------------------------------------------
414
AC_ARG_ENABLE([tcmalloc],
415
[AS_HELP_STRING([--disable-tcmalloc],
416
[Enable linking with tcmalloc @<:@default=on@:>@])],
417
[ac_enable_tcmalloc="$enableval"],
418
[ac_enable_tcmalloc="yes"])
420
if test "x$ac_enable_tcmalloc" != "xno"
422
AC_CHECK_LIB(tcmalloc,malloc,[],[])
425
if test "x$ac_cv_lib_tcmalloc_malloc" != "xyes"
427
AC_CHECK_LIB(mtmalloc,malloc,[],[])
431
#--------------------------------------------------------------------
432
# Check for libdrizzle
433
#--------------------------------------------------------------------
435
AC_LIB_HAVE_LINKFLAGS(drizzle,,
436
[#include <libdrizzle/drizzle.h>],
438
const char *version= drizzle_version()
440
AS_IF([test x$ac_cv_libdrizzle = xno],
441
AC_MSG_ERROR([libdrizzle is required for Drizzle]))
444
#--------------------------------------------------------------------
446
#--------------------------------------------------------------------
448
AC_LIB_HAVE_LINKFLAGS(z,,
453
AS_IF([test x$ac_cv_libz = xno],
454
AC_MSG_ERROR([libz is required for Drizzle. On Debian this can be found in zlib1g-dev. On RedHat this can be found in zlib-devel.]))
456
#--------------------------------------------------------------------
458
#--------------------------------------------------------------------
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)])
461
AC_LIB_HAVE_LINKFLAGS(tbb,,
462
[#include <tbb/atomic.h>
466
tbb::atomic<uint64_t> x;
467
tbb::atomic<uint8_t> y;
475
#--------------------------------------------------------------------
476
# Check for libreadline or compatible (libedit on Mac OS X)
477
#--------------------------------------------------------------------
482
AS_IF([test "x$vl_cv_lib_readline" = "xno"],
483
AC_MSG_ERROR([libreadline is required for Drizzle. On Debian this can be found in libreadline5-dev. On RedHat this can be found in readline-devel.]))
484
READLINE_LIBS="${LIBS}"
486
AC_SUBST(READLINE_LIBS)
488
DRIZZLE_CHECK_NEW_RL_INTERFACE
490
#--------------------------------------------------------------------
492
#--------------------------------------------------------------------
494
AC_LIB_HAVE_LINKFLAGS(pcre,,
500
AS_IF([test "x$ac_cv_libpcre" = "xno"],
507
AC_LIB_HAVE_LINKFLAGS(pcre,,
508
[#include <pcre/pcre.h>],
513
AS_IF([test "x$ac_cv_libpcre" = "xno"],
515
AC_MSG_ERROR([libpcre is required for Drizzle. On Debian this can be found in libpcre3-dev. On RedHat this can be found in pcre-devel.])
517
AC_DEFINE(PCRE_HEADER,[<pcre/pcre.h>],[Location of pcre header])
520
AC_DEFINE(PCRE_HEADER,[<pcre.h>],[Location of pcre header])
524
dnl Find paths to some shell programs
525
AC_PATH_PROG(LN, ln, ln)
526
# This must be able to take a -f flag like normal unix ln.
527
AC_PATH_PROG(LN_CP_F, ln, ln)
529
AC_PATH_PROG(MV, mv, mv)
530
AC_PATH_PROG(RM, rm, rm)
531
AC_PATH_PROG(CP, cp, cp)
532
AC_PATH_PROG(SED, sed, sed)
533
AC_PATH_PROG(CMP, cmp, cmp)
534
AC_PATH_PROG(CHMOD, chmod, chmod)
535
AC_PATH_PROG(HOSTNAME, hostname, hostname)
536
# Check for a GNU tar named 'gtar', or 'gnutar' (MacOS X) and
537
# fall back to 'tar' otherwise and hope that it's a GNU tar as well
538
AC_CHECK_PROGS(TAR, gnutar gtar tar)
540
dnl We use a path for perl so the script startup works
541
dnl We make sure to use perl, not perl5, in hopes that the RPMs will
542
dnl not depend on the perl5 binary being installed (probably a bug in RPM)
543
AC_PATH_PROG(PERL, perl, no)
544
if test "$PERL" != "no" && $PERL -e 'require 5' > /dev/null 2>&1
548
AC_PATH_PROG(PERL5, perl5, no)
549
if test "$PERL5" != no
552
ac_cv_path_PERL=$ac_cv_path_PERL5
560
# icheck, used for ABI check
561
AC_PATH_PROG(ICHECK, icheck, no)
562
# "icheck" is also the name of a file system check program on Tru64.
563
# Verify the program found is really the interface checker.
564
if test "x$ICHECK" != "xno"
566
AC_MSG_CHECKING(if $ICHECK works as expected)
567
echo "int foo;" > conftest.h
568
$ICHECK --canonify -o conftest.ic conftest.h 2>/dev/null
569
if test -f "conftest.ic"
576
rm -f conftest.ic conftest.h
581
AC_PATH_PROG(PS, ps, ps)
582
AC_MSG_CHECKING("how to check if pid exists")
585
if $PS p $$ 2> /dev/null | grep `echo $0 | sed s/\-//` > /dev/null
587
FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
589
elif $PS -fp $$ 2> /dev/null | grep $0 > /dev/null
591
FIND_PROC="$PS -p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
593
elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
595
FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
597
elif $PS -ef 2> /dev/null | grep $0 > /dev/null
599
FIND_PROC="$PS -ef | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
600
# Do anybody use this?
601
elif $PS $$ 2> /dev/null | grep $0 > /dev/null
603
FIND_PROC="$PS \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
606
*freebsd*|*dragonfly*|*cygwin*)
607
FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
610
FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
613
AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
618
AC_MSG_RESULT("$FIND_PROC")
620
# Check if a pid is valid
621
AC_PATH_PROG(KILL, kill, kill)
622
AC_MSG_CHECKING("for kill switches")
623
if $ac_cv_path_KILL -0 $$
625
CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
628
CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
630
AC_MSG_WARN([kill -0 to check for pid seems to fail])
631
CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
634
AC_MSG_RESULT("$CHECK_PID")
637
# Check if we need noexec stack for assembler
92
640
AC_ARG_WITH([server-suffix],
93
641
[AS_HELP_STRING([--with-server-suffix],
94
642
[Append value to the version string.])],
95
[ DRIZZLE_SERVER_SUFFIX="$withval" ]
96
[ DRIZZLE_SERVER_SUFFIX= ])
643
[ DRIZZLE_SERVER_SUFFIX=`echo "$withval" | sed -e 's/^\(...................................\)..*$/\1/'` ],
644
[ DRIZZLE_SERVER_SUFFIX= ]
98
646
AC_DEFINE_UNQUOTED([DRIZZLE_SERVER_SUFFIX],[$DRIZZLE_SERVER_SUFFIX],
99
647
[Append value to the version string])
649
# Force use of a curses libs
650
AC_ARG_WITH([named-curses-libs],
651
[AS_HELP_STRING([--with-named-curses-libs=ARG],
652
[Use specified curses libraries instead of those
653
automatically found by configure.])],
654
[ with_named_curses=$withval ],
655
[ with_named_curses=no ]
658
AC_ARG_WITH([tcp-port],
659
[AS_HELP_STRING([--with-tcp-port=port-number],
660
[Which port to use for Drizzle services @<:@default=4427@:>@])],
661
[ DRIZZLE_TCP_PORT=$withval ],
662
[ DRIZZLE_TCP_PORT=$DRIZZLE_TCP_PORT_DEFAULT
663
# if we actually defaulted (as opposed to the pathological case of
664
# --with-tcp-port=<DRIZZLE_TCP_PORT_DEFAULT> which might in theory
665
# happen if whole batch of servers was built from a script), set
666
# the default to zero to indicate that; we don't lose information
667
# that way, because 0 obviously indicates that we can get the
668
# default value from DRIZZLE_TCP_PORT. this seems really evil, but
669
# testing for DRIZZLE_TCP_PORT==DRIZZLE_TCP_PORT_DEFAULT would make a
670
# a port of DRIZZLE_TCP_PORT_DEFAULT magic even if the builder did not
671
# intend it to mean "use the default, in fact, look up a good default
672
# from /etc/services if you can", but really, really meant 4427 when
673
# they passed in 4427. When they pass in a specific value, let them
674
# have it; don't second guess user and think we know better, this will
675
# just make people cross. this makes the the logic work like this
676
# (which is complicated enough):
678
# - if a port was set during build, use that as a default.
680
# - otherwise, try to look up a port in /etc/services; if that fails,
681
# use DRIZZLE_TCP_PORT_DEFAULT (at the time of this writing 4427)
683
# - allow the DRIZZLE_TCP_PORT environment variable to override that.
685
# - allow command-line parameters to override all of the above.
687
# the top-most DRIZZLE_TCP_PORT_DEFAULT is read from win/configure.js,
688
# so don't mess with that.
689
DRIZZLE_TCP_PORT_DEFAULT=0 ]
691
AC_SUBST(DRIZZLE_TCP_PORT)
692
# We might want to document the assigned port in the manual.
693
AC_SUBST(DRIZZLE_TCP_PORT_DEFAULT)
694
AC_DEFINE_UNQUOTED([DRIZZLE_PORT],[$DRIZZLE_TCP_PORT],
695
[Drizzle port to use])
696
AC_DEFINE_UNQUOTED([DRIZZLE_PORT_DEFAULT],[$DRIZZLE_TCP_PORT_DEFAULT],
697
[If we defaulted to DRIZZLE_PORT, then this will be zero])
699
# Use this to set the place used for unix socket used to local communication.
102
700
AC_ARG_WITH([drizzled-user],
103
701
[AS_HELP_STRING([--with-drizzled-user=username],
104
702
[What user the drizzled daemon shall be run as.
105
703
@<:@default=drizzle@:>@])],
106
[ DRIZZLED_USER="$withval" ],
107
[ DRIZZLED_USER=drizzle ])
704
[ DRIZZLED_USER=$withval ],
705
[ DRIZZLED_USER=drizzle ]
108
707
AC_SUBST(DRIZZLED_USER)
709
# If we should allow LOAD DATA LOCAL
710
AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default)
711
AC_ARG_ENABLE(local-infile,
712
[ --enable-local-infile Enable LOAD DATA LOCAL INFILE (default: disabled)],
713
[ ENABLED_LOCAL_INFILE=$enableval ],
714
[ ENABLED_LOCAL_INFILE=no ]
716
if test "$ENABLED_LOCAL_INFILE" = "yes"
719
AC_DEFINE([ENABLED_LOCAL_INFILE], [1],
720
[If LOAD DATA LOCAL INFILE should be enabled by default])
725
# Types that must be checked AFTER large file support is checked
728
#--------------------------------------------------------------------
729
# Check for system header files
730
#--------------------------------------------------------------------
736
AC_CHECK_HEADERS(fcntl.h float.h fpu_control.h ieeefp.h)
737
AC_CHECK_HEADERS(limits.h pwd.h select.h linux/config.h)
738
AC_CHECK_HEADERS(sys/fpu.h utime.h sys/utime.h )
739
AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h)
740
AC_CHECK_HEADERS([curses.h term.h],[],[],
741
[[#ifdef HAVE_CURSES_H
745
AC_CHECK_HEADERS(termio.h termios.h sched.h alloca.h)
746
AC_CHECK_HEADERS(sys/prctl.h ieeefp.h)
747
AC_CHECK_HEADERS(execinfo.h)
749
#--------------------------------------------------------------------
750
# Check for system libraries. Adds the library to $LIBS
751
# and defines HAVE_LIBM etc
752
#--------------------------------------------------------------------
754
AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
756
AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)])
757
AC_CHECK_FUNC(yp_get_default_domain, [],
758
[AC_CHECK_LIB(nsl, yp_get_default_domain)])
759
AC_CHECK_FUNC(p2open, [], [AC_CHECK_LIB(gen, p2open)])
760
# This may get things to compile even if bind-8 is installed
761
AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)])
762
# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
763
AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
765
# Check rt for aio_read
766
AC_CHECK_LIB(rt, aio_read)
768
# For the sched_yield() function on Solaris
769
AC_CHECK_FUNC(sched_yield, [],
770
[AC_CHECK_LIB(posix4, [sched_yield],
771
[AC_DEFINE(HAVE_SCHED_YIELD, 1, [Have sched_yield function]) LIBS="$LIBS -lposix4"])])
773
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
775
AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)])
778
AC_CHECK_TYPES([fp_except], [], [], [
779
#include <sys/types.h>
785
AC_CHECK_LIB(dl,dlopen)
786
AC_CHECK_FUNCS(dlopen)
787
if test "$ac_cv_func_dlopen" != "yes"
789
AC_MSG_ERROR([Drizzle requires dlopen])
796
AC_ARG_WITH([atomic-ops],
797
[AS_HELP_STRING([--with-atomic-ops=rwlocks|smp|up],
798
[Implement atomic operations using pthread rwlocks or atomic CPU
799
instructions for multi-processor or uniprocessor
800
configuration. By default gcc built-in sync functions are used,
801
if available and 'smp' configuration otherwise.])],
802
[with_atomic_ops="$withval"],
803
[with_atomic_ops=smp])
805
case "$with_atomic_ops" in
806
"up") AC_DEFINE([MY_ATOMIC_MODE_DUMMY], [1],
807
[Assume single-CPU mode, no concurrency]) ;;
808
"rwlocks") AC_DEFINE([MY_ATOMIC_MODE_RWLOCKS], [1],
809
[Use pthread rwlocks for atomic ops]) ;;
812
[whether the compiler provides atomic builtins],
813
[ac_cv_gcc_atomic_builtins],
815
[AC_LANG_PROGRAM([],[[
816
int foo= -10; int bar= 10;
817
if (!__sync_fetch_and_add(&foo, bar) || foo)
819
bar= __sync_lock_test_and_set(&foo, bar);
820
if (bar || foo != 10)
822
bar= __sync_val_compare_and_swap(&bar, foo, 15);
827
[ac_cv_gcc_atomic_builtins=yes],
828
[ac_cv_gcc_atomic_builtins=no])])
830
if test "x$ac_cv_gcc_atomic_builtins" = "xyes"; then
831
AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1,
832
[Define to 1 if compiler provides atomic builtins.])
835
*) AC_MSG_ERROR(["$with_atomic_ops" is not a valid value for --with-atomic-ops]) ;;
111
839
AC_ARG_WITH([comment],
112
840
[AS_HELP_STRING([--with-comment],
113
841
[Comment about compilation environment. @<:@default=off@:>@])],
114
842
[with_comment=$withval],
115
843
[with_comment=no])
116
AS_IF([test "$with_comment" != "no"],[
844
if test "$with_comment" != "no"
117
846
COMPILATION_COMMENT=$with_comment
119
COMPILATION_COMMENT="Source distribution (${PANDORA_RELEASE_COMMENT})"
848
COMPILATION_COMMENT="Source distribution"
121
850
AC_DEFINE_UNQUOTED([COMPILATION_COMMENT],["$COMPILATION_COMMENT"],
122
851
[Comment about compilation environment])
853
dnl Checks for typedefs, structures, and compiler characteristics.
860
# off_t is not a builtin type
861
AC_CHECK_SIZEOF(off_t, 4)
862
if test "$ac_cv_sizeof_off_t" -eq 0
864
AC_MSG_ERROR("Drizzle needs a off_t type.")
866
AC_CHECK_SIZEOF(size_t)
867
AC_DEFINE_UNQUOTED([SIZEOF_SIZE_T],[$ac_cv_sizeof_size_t],[Size of size_t as computed by sizeof()])
868
AC_CHECK_SIZEOF(long long)
869
AC_DEFINE_UNQUOTED(SIZEOF_LONG_LONG,[$ac_cv_sizeof_long_long],[Size of long long as computed by sizeof()])
872
dnl check if time_t is unsigned
878
# This always gives a warning. Ignore it unless you are cross compiling
881
# Find where the stack goes
882
DRIZZLE_STACK_DIRECTION
883
# We want to skip alloca on irix unconditionally. It may work on some version..
886
AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
887
AC_CHECK_TYPES([uint, ulong])
889
DRIZZLE_PTHREAD_YIELD
892
dnl Checks for header files.
893
AC_CHECK_HEADERS(malloc.h)
895
dnl Checks for library functions.
897
AC_PROG_GCC_TRADITIONAL
900
AC_CHECK_FUNCS(issetugid)
902
# from old readline settting:
907
# Already-done: stdlib.h string.h unistd.h termios.h
908
AC_CHECK_HEADERS(stdarg.h dirent.h locale.h ndir.h sys/dir.h \
909
sys/ndir.h sys/select.h \
910
sys/mman.h termcap.h termio.h asm/termbits.h grp.h \
913
# Already-done: strcasecmp
914
AC_CHECK_FUNCS(lstat select)
918
DRIZZLE_CHECK_GETPW_FUNCS
919
DRIZZLE_HAVE_TIOCGWINSZ
920
DRIZZLE_HAVE_TIOCSTAT
125
922
#########################################################################
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])
924
dnl Checks for library functions.
929
AC_CHECK_FUNCS(fcntl)
930
if test "x$ac_cv_func_fcntl" != "xyes"
932
AC_MSG_ERROR("Drizzle requires fcntl.")
935
AC_CONFIG_LIBOBJ_DIR([gnulib])
939
fdatasync fpresetsticky fpsetmask fsync \
940
getpassphrase getpwnam \
941
getpwuid getrlimit getrusage index initgroups isnan \
942
localtime_r gethrtime gmtime_r \
944
mkstemp mlockall poll pread pthread_attr_create mmap mmap64 \
945
pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
946
pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
947
pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
948
pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
949
realpath rename rwlock_init setupterm \
954
backtrace backtrace_symbols backtrace_symbols_fd)
957
# Test whether madvise() is declared in C++ code -- it is not on some
958
# systems, such as Solaris
959
AC_CHECK_DECLS([madvise], [], [], [AC_INCLUDES_DEFAULT[
961
#include <sys/types.h>
962
#include <sys/mman.h>
968
AM_CONDITIONAL(BUILD_THR_RWLOCK,[test "$ac_cv_func_rwlock_init" -a "$ac_cv_funn_pthread_rwlock_rdlock"])
971
# Sanity check: We chould not have any fseeko symbol unless
972
# large_file_support=yes
973
AC_CHECK_FUNC(fseeko,
974
[if test "$large_file_support" = no -a "x$TARGET_LINUX" = "xtrue";
976
AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!")
980
# Check definition of pthread_getspecific
981
AC_CACHE_CHECK([args to pthread_getspecific], [mysql_cv_getspecific_args],
982
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
983
#if !defined(_REENTRANT)
986
#ifndef _POSIX_PTHREAD_SEMANTICS
987
#define _POSIX_PTHREAD_SEMANTICS
991
void *pthread_getspecific(pthread_key_t key);
992
pthread_getspecific((pthread_key_t) NULL);
994
[mysql_cv_getspecific_args=POSIX],
995
[mysql_cv_getspecific_args=other])])
996
if test "$mysql_cv_getspecific_args" = "other"
998
AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1],
999
[For some non posix threads])
1002
# Check definition of pthread_mutex_init
1003
AC_CACHE_CHECK([args to pthread_mutex_init], [mysql_cv_mutex_init_args],
1004
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1008
#ifndef _POSIX_PTHREAD_SEMANTICS
1009
#define _POSIX_PTHREAD_SEMANTICS
1011
#include <pthread.h> ]], [[
1012
pthread_mutexattr_t attr;
1014
pthread_mutex_init(&mp,&attr); ]])],
1015
[mysql_cv_mutex_init_args=POSIX],
1016
[mysql_cv_mutex_init_args=other])])
1017
if test "$mysql_cv_mutex_init_args" = "other"
1019
AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1],
1020
[For some non posix threads])
1024
#---START: Used in for client configure
1025
# Check definition of readdir_r
1026
AC_CACHE_CHECK([args to readdir_r], [mysql_cv_readdir_r],
1027
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1031
#ifndef _POSIX_PTHREAD_SEMANTICS
1032
#define _POSIX_PTHREAD_SEMANTICS
1034
#include <pthread.h>
1035
#include <dirent.h>]], [[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
1036
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])],
1037
[mysql_cv_readdir_r=POSIX],
1038
[mysql_cv_readdir_r=other])])
1039
if test "$mysql_cv_readdir_r" = "POSIX"
1041
AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r])
1044
# Check definition of posix sigwait()
1045
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
1046
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1050
#ifndef _POSIX_PTHREAD_SEMANTICS
1051
#define _POSIX_PTHREAD_SEMANTICS
1053
#include <pthread.h>
1062
[mysql_cv_sigwait=POSIX],
1063
[mysql_cv_sigwait=other])])
1064
if test "$mysql_cv_sigwait" = "POSIX"
1066
AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait])
1069
if test "$mysql_cv_sigwait" != "POSIX"
1071
unset mysql_cv_sigwait
1072
# Check definition of posix sigwait()
1073
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
1074
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1078
#ifndef _POSIX_PTHREAD_SEMANTICS
1079
#define _POSIX_PTHREAD_SEMANTICS
1081
#include <pthread.h>
1088
[mysql_cv_sigwait=NONPOSIX],
1089
[mysql_cv_sigwait=other])])
1090
if test "$mysql_cv_sigwait" = "NONPOSIX"
1092
AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument])
1097
# Check if pthread_attr_setscope() exists
1098
AC_CACHE_CHECK([for pthread_attr_setscope], [mysql_cv_pthread_attr_setscope],
1099
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1103
#ifndef _POSIX_PTHREAD_SEMANTICS
1104
#define _POSIX_PTHREAD_SEMANTICS
1106
#include <pthread.h>
1108
pthread_attr_t thr_attr;
1109
pthread_attr_setscope(&thr_attr,0);
1111
[mysql_cv_pthread_attr_setscope=yes],
1112
[mysql_cv_pthread_attr_setscope=no])])
1113
if test "$mysql_cv_pthread_attr_setscope" = "yes"
1115
AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope])
1119
AC_CHECK_HEADERS(cxxabi.h)
1120
AC_CACHE_CHECK([checking for abi::__cxa_demangle], mysql_cv_cxa_demangle,
1121
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cxxabi.h>]], [[
1122
char *foo= 0; int bar= 0;
1123
foo= abi::__cxa_demangle(foo, foo, 0, &bar);
1124
]])],[mysql_cv_cxa_demangle=yes],[mysql_cv_cxa_demangle=no])])
1127
if test "x$mysql_cv_cxa_demangle" = xyes; then
1128
AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1,
1129
[Define to 1 if you have the `abi::__cxa_demangle' function.])
1132
#--------------------------------------------------------------------
1133
# Check for requested features
1134
#--------------------------------------------------------------------
1136
DRIZZLE_CHECK_MAX_INDEXES
1138
#--------------------------------------------------------------------
1139
# Declare our plugin modules
1140
# Has to be done late, as the plugin may need to check for existence of
1141
# functions tested above
1142
#--------------------------------------------------------------------
1144
m4_include(config/plugin.ac)
1145
dnl Add code here to read set plugin lists and set drizzled_default_plugin_list
1146
AC_DEFINE_UNQUOTED([DRIZZLED_PLUGIN_LIST],[$drizzled_default_plugin_list],
1147
[List of plugins that should be loaded on startup if no
1148
value is given for --plugin-load])
1150
drizzled_builtin_list=`echo $drizzled_builtin_list | sed 's/, *$//'`
1151
AC_DEFINE_UNQUOTED([DRIZZLED_BUILTIN_LIST],[$drizzled_builtin_list],
1152
[List of plugins to be loaded in sql_builtin.cc])
1153
AC_SUBST(drizzled_plugin_libs)
1155
AC_SUBST(mysql_plugin_dirs)
1156
AC_SUBST(mysql_plugin_libs)
1157
drizzled_plugin_defs=`echo $drizzled_plugin_defs | sed 's/, *$//'`
1158
AC_SUBST(drizzled_plugin_defs)
1159
AC_SUBST(DRIZZLED_PLUGIN_DEP_LIBS)
1162
AC_ARG_ENABLE([profiling],
1163
[AS_HELP_STRING([--enable-profiling],
1164
[Toggle profiling @<:@default=off@:>@])],
1165
[ac_profiling="$enableval"],
1166
[ac_profiling="no"])
1168
AC_ARG_ENABLE([coverage],
1169
[AS_HELP_STRING([--enable-coverage],
1170
[Toggle coverage @<:@default=off@:>@])],
1171
[ac_coverage="$enableval"],
1174
AC_ARG_ENABLE([pedantic-warnings],
1175
[AS_HELP_STRING([--disable-pedantic-warnings],
1176
[Toggle pedanticness @<:@default=on@:>@])],
1177
[ac_warn_pedantic="$enableval"],
1178
[ac_warn_pedantic="yes"])
1180
AC_ARG_ENABLE([fail],
1181
[AS_HELP_STRING([--disable-fail],
1182
[Turn warnings into failures @<:@default=on@:>@])],
1183
[ac_warn_fail="$enableval"],
1184
[ac_warn_fail="yes"])
1186
AC_ARG_ENABLE([unreachable],
1187
[AS_HELP_STRING([--enable-unreachable],
1188
[Enable warnings about unreachable code @<:@default=off@:>@])],
1189
[ac_warn_unreachable="$enableval"],
1190
[ac_warn_unreachable="no"])
1192
AC_ARG_ENABLE([longlong-warnings],
1193
[AS_HELP_STRING([--enable-longlong-warnings],
1194
[Enable warnings about longlong in C++ @<:@default=off@:>@])],
1195
[ac_warn_longlong="$enableval"],
1196
[ac_warn_longlong="no"])
1198
AC_ARG_ENABLE([strict-aliasing],
1199
[AS_HELP_STRING([--enable-strict-aliasing],
1200
[Enable warnings about stict-aliasing @<:@default=off@:>@])],
1201
[ac_warn_strict_aliasing="$enableval"],
1202
[ac_warn_strict_aliasing="no"])
1204
AC_ARG_ENABLE([cast-warnings],
1205
[AS_HELP_STRING([--enable-cast-warnings],
1206
[Enable warnings about use of old C-style casts @<:@default=off@:>@])],
1207
[ac_warn_cast="$enableval"],
1208
[ac_warn_cast="no"])
1210
AC_ARG_ENABLE([effective-style],
1211
[AS_HELP_STRING([--enable-effective-style],
1212
[Enable warnings violating Effective C++ Style Guidelines @<:@default=off@:>@])],
1213
[ac_warn_effc="$enableval"],
1214
[ac_warn_effc="no"])
1216
AC_ARG_ENABLE([shadow],
1217
[AS_HELP_STRING([--disable-shadow],
1218
[Disables warnings about scope shadowing @<:@default=on@:>@])],
1219
[ac_warn_shadow="$enableval"],
1220
[ac_warn_shadow="yes"])
1222
AC_ARG_ENABLE([conversion],
1223
[AS_HELP_STRING([--enable-conversion],
1224
[Enables conversion warnings @<:@default=off@:>@])],
1225
[ac_warn_conversion="$enableval"],
1226
[ac_warn_conversion="no"])
1228
AC_ARG_ENABLE([datarace],
1229
[AS_HELP_STRING([--enable-datarace],
1230
[Enables Sun Studio data race detection @<:@default=off@:>@])],
1231
[ac_datarace="$enableval"],
1234
AC_ARG_ENABLE([exceptions],
1235
[AS_HELP_STRING([--disable-exceptions],
1236
[Disables use of Exceptions in the build @<:@default=on@:>@])],
1237
[ac_exceptions="$enableval"],
1238
[ac_exceptions="yes"])
1240
AC_ARG_ENABLE([cast-align-warnings],
1241
[AS_HELP_STRING([--enable-cast-align-warnings],
1242
[Toggle cast alignment warnings @<:@default=off@:>@])],
1243
[ac_warn_cast_align="$enableval"],
1244
[ac_warn_cast_align="no"])
1246
if test "$GCC" = "yes"
1248
if test "$ac_warn_cast_align" = "yes"
1250
W_CAST_ALIGN="-Wcast-align"
1252
W_CAST_ALIGN="-Wno-cast-align"
1255
if test "$ac_warn_fail" = "yes"
1259
BASE_WARNINGS="-Wall -Wextra ${W_FAIL} ${W_CAST_ALIGN}"
1261
if test "$ac_warn_longlong" = "yes"
1263
W_LONGLONG="-Wlong-long"
1265
W_LONGLONG="-Wno-long-long"
1268
if test "$ac_warn_strict_aliasing" = "yes"
1270
W_STRICT_ALIASING="-Wstrict-aliasing"
1272
W_STRICT_ALIASING="-Wno-strict-aliasing"
1275
if test "$ac_warn_shadow" = "yes"
1278
NO_SHADOW="-Wno-shadow"
1280
W_SHADOW="-Wno-shadow"
1284
if test "$ac_profiling" = "yes"
1286
GPROF_PROFILING="-pg"
1289
AC_CHECK_LIB(c_p, read)
1296
if test "$ac_coverage" = "yes"
1298
GPROF_COVERAGE="-fprofile-arcs -ftest-coverage"
1303
if test "$ac_warn_pedantic" = "yes"
1305
AC_CACHE_CHECK([whether it is safe to use -Wredundant-decls],
1306
[ac_cv_safe_to_use_Wredundant_decls_],
1308
save_CXXFLAGS="${CXXFLAGS}"
1309
CXXFLAGS="${CXXFLAGS} ${W_FAIL} -Wredundant-decls"
1312
template <typename E> struct C { void foo(); };
1313
template <typename E> void C<E>::foo() { }
1314
template <> void C<int>::foo();
1315
AC_INCLUDES_DEFAULT])],
1316
[ac_cv_safe_to_use_Wredundant_decls_=yes],
1317
[ac_cv_safe_to_use_Wredundant_decls_=no])
1318
CXXFLAGS="${save_CXXFLAGS}"
1320
if test $ac_cv_safe_to_use_Wredundant_decls_ = yes
1322
GXX_W_REDUNDANT_DECLS="-Wredundant-decls"
1324
GXX_W_REDUNDANT_DECLS="-Wno-redundant-decls"
1327
GCC_PEDANTIC="-pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls ${W_STRICT_ALIASING}"
1328
GXX_PEDANTIC="-pedantic -Wundef -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy ${GXX_W_REDUNDANT_DECLS} ${W_LONGLONG} ${W_STRICT_ALIASING}"
1331
if test "$ac_warn_unreachable" = "yes"
1333
W_UNREACHABLE="-Wunreachable-code"
1336
if test "$ac_warn_cast" = "yes"
1338
W_CAST="-Wold-style-cast"
1341
if test "$ac_warn_effc" = "yes"
1346
if test "$ac_warn_conversion" = "yes"
1348
W_CONVERSION="-Wconversion"
1351
CC_WARNINGS="${BASE_WARNINGS} ${GCC_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_SHADOW} ${W_CONVERSION}"
1352
CXX_WARNINGS="${BASE_WARNINGS} ${GXX_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_CAST} ${W_SHADOW} ${W_EFFC} ${W_CONVERSION}"
1354
if test "$ac_exceptions" = "no"
1356
NO_EXCEPTIONS="-fno-exceptions"
1357
W_EXCEPTIONS="-fexceptions"
1359
NO_REDUNDANT_DECLS="-Wno-redundant-decls"
1360
PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow"
1362
if test "$SUNCC" = "yes"
1364
if test "$ac_datarace" = "yes"
1366
CFLAGS="-xinstrument=datarace ${CFLAGS}"
1367
CXXFLAGS="-xinstrument=datarace ${CXXFLAGS}"
1370
if test "$ac_warn_fail" = "yes"
1372
W_FAIL="-errwarn=%all"
1375
CC_WARNINGS="-v -errtags=yes -erroff=E_ATTRIBUTE_NOT_VAR ${W_FAIL}"
1376
CXX_WARNINGS="+w +w2 -xport64 -errtags=yes -erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint ${W_FAIL}"
1377
PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn"
1378
NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED"
1379
if test "$ac_exceptions" = "no"
1381
NO_EXCEPTIONS="-features=no%except"
1382
W_EXCEPTIONS="-features=except"
1385
AC_SUBST(NO_EXCEPTIONS)
1386
AC_SUBST(W_EXCEPTIONS)
1389
AC_SUBST(NO_REDUNDANT_DECLS)
1390
AC_SUBST(PROTOSKIP_WARNINGS)
1391
AC_SUBST(NO_UNREACHED)
1393
if test "x${gl_LIBOBJS}" != "x"
1395
if test "$GCC" = "yes"
1397
CPPFLAGS="-isystem \$(top_srcdir)/gnulib -isystem \$(top_builddir)/gnulib ${CPPFLAGS}"
1399
CPPFLAGS="-I\$(top_srcdir)/gnulib -I\$(top_builddir)/gnulib ${CPPFLAGS}"
1403
CPPFLAGS="-I\$(top_srcdir) -I\$(top_builddir) ${CPPFLAGS}"
1404
CFLAGS="${CC_WARNINGS} ${CFLAGS}"
1405
CXXFLAGS="${CXX_WARNINGS} ${W_EXCEPTIONS} ${CXXFLAGS}"
1407
dnl Must be done once we turn on warnings and such
1409
[whether __attribute__ visibility "hidden" is supported],
1410
[ac_cv_can_use_hidden_],[
1415
__attribute__((visibility ("hidden")))
1419
[ac_cv_can_use_hidden_=yes],
1420
[ac_cv_can_use_hidden_=no])
1422
if test "$ac_cv_can_use_hidden_" = "yes"
1424
AC_DEFINE(HAVE_ATTR_HIDDEN, 1,
1425
[Define to 1 if you have support for __attribute__((visibility("hidden")))])
1428
AM_CPPFLAGS="${CPPFLAGS}"
1429
AM_CFLAGS="${CFLAGS}"
1430
AM_CXXFLAGS="${CXXFLAGS}"
1432
AC_SUBST([AM_CPPFLAGS])
1433
AC_SUBST([AM_CFLAGS])
1434
AC_SUBST([AM_CXXFLAGS])
1436
dnl We've collected the flags in AM_*FLAGS now, so blank these.
1441
AC_SUBST(pkgplugindir,"\$(pkglibdir)/plugin")
132
1443
dnl GCC Precompiled Header Support
133
1444
dnl re-enable later
134
1445
dnl AM_CONDITIONAL([BUILD_GCC_PCH],[test "$GCC" = "yes"])
135
1446
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
1448
AC_CONFIG_FILES(Makefile dnl
145
drizzled/plugin/version.h dnl
146
support-files/libdrizzle.pc dnl
1451
drizzled/message/Makefile dnl
1452
drizzled/Makefile dnl
1453
support-files/Makefile dnl
1454
tests/Makefile tests/install_test_db dnl
1455
drizzled/drizzled_safe dnl
147
1456
support-files/drizzle.server support-files/drizzle-log-rotate
1457
support-files/smf/Makefile dnl
148
1458
support-files/smf/install.sh dnl
149
support-files/drizzle.spec dnl
150
1459
support-files/smf/drizzle.xml dnl
151
1460
support-files/smf/drizzle)