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
4
20
AC_PREREQ(2.59)dnl Minimum Autoconf version required.
6
AC_INIT(drizzle, [7.0.0], [http://bugs.launchpad.net/drizzle])
21
AC_INIT([drizzle],[RELEASE_VERSION],[http://bugs.launchpad.net/drizzle])
7
22
AC_CONFIG_SRCDIR([drizzled/drizzled.cc])
8
23
AC_CONFIG_AUX_DIR(config)
9
24
AC_CONFIG_HEADERS([config.h])
11
AM_INIT_AUTOMAKE(-Wall -Werror)
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
# DRIZZLE_NO_DASH_VERSION 5.1.40sp1 5.0.34a
27
# DRIZZLE_NUMERIC_VERSION 5.1.40 5.0.34
28
# DRIZZLE_BASE_VERSION 5.1 5.0
29
# DRIZZLE_VERSION_ID 50140 50034
31
DRIZZLE_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
32
DRIZZLE_NUMERIC_VERSION=`echo $DRIZZLE_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
33
DRIZZLE_BASE_VERSION=`echo $DRIZZLE_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
34
DRIZZLE_VERSION_ID=`echo $DRIZZLE_NUMERIC_VERSION | \
35
awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'`
37
# The port should be constant for a LONG time
25
AC_CONFIG_MACRO_DIR([m4])
27
PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, use-gnulib, require-cxx, force-gcc42)
29
# Version with no dots
30
AC_DEFINE([DRIZZLE_VERSION_ID],RELEASE_ID,
31
[Version ID that can be easily used for numeric comparison])
33
AC_DEFINE([_BACKWARD_BACKWARD_WARNING_H],[1],[Hack to disable deprecation warning in gcc])
35
# The port that was assigned by IANA.
38
36
DRIZZLE_TCP_PORT_DEFAULT=4427
41
sinclude(m4/alloca.m4)
42
sinclude(m4/check_cpu.m4)
43
sinclude(m4/character_sets.m4)
44
sinclude(m4/compiler_flag.m4)
45
sinclude(m4/dtrace.m4)
46
sinclude(m4/plugins.m4)
47
sinclude(m4/large_file.m4)
49
sinclude(m4/readline.m4)
52
sinclude(m4/lib-link.m4)
53
sinclude(m4/lib-prefix.m4)
54
sinclude(m4/gettext.m4)
55
sinclude(m4/progtest.m4)
59
sinclude(m4/lib-ld.m4)
60
sinclude(m4/ac_cxx_header_stdcxx_98.m4)
62
AM_GNU_GETTEXT([external])
63
AM_GNU_GETTEXT_VERSION(0.17)
38
# Set this for plugins to use
39
ac_build_drizzle="yes"
42
AC_PATH_PROG(GPERF, gperf)
43
AS_IF([test "x$GPERF" = "x"],
44
AC_MSG_ERROR("Drizzle requires gperf to build."))
46
AC_PATH_PROG(LCOV, lcov)
47
AC_PATH_PROG(GENHTML, genhtml)
49
AM_CONDITIONAL(HAVE_LCOV,[test "x$LCOV" != "x"])
51
AC_CHECK_PROGS(YACC, ['bison -y'])
52
AS_IF([test "x$YACC" = "x" -a "$building_from_bzr" = "yes"],[
53
AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
57
AM_GNU_GETTEXT(external, need-formatstring-macros)
58
if test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"
60
AM_PATH_PROG_WITH_TEST(GMSGMERGE, gmsgmerge,
61
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
62
MSGMERGE="${GMSGMERGE}"
65
64
AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
67
AC_SUBST(DRIZZLE_NO_DASH_VERSION)
68
AC_SUBST(DRIZZLE_BASE_VERSION)
69
AC_SUBST(DRIZZLE_VERSION_ID)
70
AC_SUBST(DRIZZLE_PREVIOUS_BASE_VERSION)
71
AC_SUBST(PROTOCOL_VERSION)
72
AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION],
73
[mysql client protocol version])
74
AC_SUBST(DOT_FRM_VERSION)
75
AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION],
76
[Version of .frm files])
77
AC_SUBST(SHARED_LIB_MAJOR_VERSION)
78
AC_SUBST(SHARED_LIB_VERSION)
79
AC_SUBST(AVAILABLE_LANGUAGES)
82
# Canonicalize the configuration name.
84
# Check whether --with-system-type or --without-system-type was given.
85
AC_ARG_WITH([system-type],
86
[AS_HELP_STRING([--with-system-type],
87
[Set the system type, like "sun-solaris10"])],
88
[SYSTEM_TYPE="$withval"],
89
[SYSTEM_TYPE="$host_vendor-$host_os"])
90
AC_ARG_WITH([machine-type],
91
[AS_HELP_STRING([--with-machine-type],
92
[Set the machine type, like "powerpc"])],
93
[MACHINE_TYPE="$withval"],
94
[MACHINE_TYPE="$host_cpu"])
96
AC_DEFINE_UNQUOTED([SYSTEM_TYPE], ["$SYSTEM_TYPE"],
97
[Name of system, eg sun-solaris])
98
AC_SUBST(MACHINE_TYPE)
99
AC_DEFINE_UNQUOTED([MACHINE_TYPE], ["$MACHINE_TYPE"],
100
[Machine type name, eg sparc])
102
# Detect intel x86 like processor
103
BASE_MACHINE_TYPE=$MACHINE_TYPE
104
case $MACHINE_TYPE in
105
i?86) BASE_MACHINE_TYPE=i386 ;;
108
# Save some variables and the command line options for mysqlbug
111
SAVE_ASFLAGS="$ASFLAGS"
112
SAVE_CFLAGS="$CFLAGS"
113
SAVE_CXXFLAGS="$CXXFLAGS"
114
SAVE_LDFLAGS="$LDFLAGS"
115
SAVE_CXXLDFLAGS="$CXXLDFLAGS"
116
CONF_COMMAND="$0 $ac_configure_args"
117
AC_SUBST(CONF_COMMAND)
120
AC_SUBST(SAVE_ASFLAGS)
121
AC_SUBST(SAVE_CFLAGS)
122
AC_SUBST(SAVE_CXXFLAGS)
123
AC_SUBST(SAVE_LDFLAGS)
124
AC_SUBST(SAVE_CXXLDFLAGS)
128
# This is needed is SUBDIRS is set
131
##############################################################################
132
# The below section needs to be done before AC_PROG_CC
133
##############################################################################
135
if test "x${CFLAGS-}" = x ; then
141
if test "x${CPPFLAGS-}" = x ; then
147
if test "x${LDFLAGS-}" = x ; then
153
################ End of section to be done before AC_PROG_CC #################
155
# The following hack should ensure that configure doesn't add optimizing
156
# or debugging flags to CFLAGS or CXXFLAGS
157
# C_EXTRA_FLAGS are flags that are automaticly added to both
158
# CFLAGS and CXXFLAGS
159
CFLAGS="$CFLAGS $C_EXTRA_FLAGS "
160
CXXFLAGS="$CXXFLAGS $C_EXTRA_FLAGS "
162
dnl Checks for programs.
164
ifdef([AC_PROG_CC_C99],[
165
AC_PROG_CC_C99([],[AC_MSG_ERROR([C99 support required for compiling Drizzle])])
167
],[C99_SUPPORT_HACK="-std=gnu99"])
169
AC_CXX_HEADER_STDCXX_98
170
if test "$ac_cv_cxx_stdcxx_98" = "no"
172
AC_MSG_ERROR([C++ Compiler required to compile Drizzle])
177
# Print version of CC and CXX compiler (if they support --version)
180
AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX])
183
CC_VERSION=`$CC --version | sed 1q`
188
AC_MSG_CHECKING("C Compiler version")
189
AC_MSG_RESULT("$CC $CC_VERSION")
194
DRIZZLE_CHECK_CXX_VERSION
198
if test "$ac_cv_c_compiler_gnu" = "yes"
203
AC_PATH_PROG(AS, as, as)
207
#AC_LIBTOOL_WIN32_DLL
210
# Ensure that we have --preserve-dup-deps defines, otherwise we get link
211
# problems of 'mysql' with CXX=g++
212
LIBTOOL="$LIBTOOL --preserve-dup-deps"
218
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
220
# Not critical since the generated file is distributed
221
AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL'])
222
if test -z "$YACC" && test -d ".bzr"
224
AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
227
AC_PATH_PROG(uname_prog, uname, no)
229
# We should go through this and put all the explictly system dependent
231
AC_MSG_CHECKING(operating system)
232
AC_CACHE_VAL(mysql_cv_sys_os,
234
if test "$uname_prog" != "no"; then
235
mysql_cv_sys_os="`uname`"
237
mysql_cv_sys_os="Not Solaris"
240
AC_MSG_RESULT($mysql_cv_sys_os)
242
# This should be rewritten to use $target_os
245
TARGET_SOLARIS="true"
246
AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
247
AC_SUBST(TARGET_SOLARIS)
251
# The following is required for portable results of floating point calculations
252
# on PowerPC. The same must also be done for IA-64, but this options is missing
253
# in the IA-64 gcc backend.
255
if test "$GCC" = "yes"
259
AM_CFLAGS="$CFLAGS -mno-fused-madd"
260
AM_CXXFLAGS="$CXXFLAGS -mno-fused-madd"
271
AC_SUBST(INSTALL_SCRIPT)
274
export CC CXX CFLAGS LD LDFLAGS AR ARFLAGS
276
if test "$GCC" = "yes"
278
# Disable exceptions as they seams to create problems with gcc and threads.
279
# drizzled doesn't use run-time-type-checking, so we disable it.
280
AM_CXXFLAGS="${AM_CXXFLAGS} -fno-exceptions -fno-rtti"
285
# libdrizzle versioning when linked with GNU ld.
286
if $LD --version 2>/dev/null|grep -q GNU; then
287
LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libdrizzle/libdrizzle.ver"
289
AC_SUBST(LD_VERSION_SCRIPT)
291
#--------------------------------------------------------------------
292
# Check for Google Proto Buffers
293
#--------------------------------------------------------------------
296
AC_CHECK_HEADERS([google/protobuf/message.h])
297
if test "x$ac_cv_header_google_protobuf_message_h" != "xyes"
299
AC_MSG_ERROR([Couldn't find message.h. Try installing Google Protocol Buffer development packages])
302
save_CFLAGS="$CFLAGS"
307
AC_CACHE_CHECK([for Message in libprotobuf], ac_libprotobuf_works, [
309
#include <google/protobuf/descriptor.pb.h>
311
google::protobuf::FileDescriptorProto testFdp;
312
], ac_libprotobuf_works=yes, [
313
AC_ERROR([could not find Google's libprotobuf])
318
PROTOBUF_LIBS="${LIBS}"
319
AC_SUBST(PROTOBUF_LIBS)
320
CFLAGS="$save_CFLAGS"
324
#--------------------------------------------------------------------
326
#--------------------------------------------------------------------
328
AC_MSG_CHECKING(for libevent)
329
AC_ARG_WITH(libevent,
330
[AS_HELP_STRING([--with-libevent],
331
[Use libevent build directory])],
332
[ with_libevent=$withval ],
333
[ with_libevent=yes ])
335
if test "$with_libevent" = "yes"
337
AC_CHECK_HEADERS(event.h)
338
if test "x$ac_cv_header_event_h" != "xyes"
340
AC_MSG_ERROR([Couldn't find event.h. Try installing libevent development packages])
344
AC_CHECK_LIB(event, event_loop, [], [AC_MSG_ERROR(could not find libevent)])
345
LIBEVENT_LIBS="${LIBS}"
346
LIBS="${my_save_LIBS}"
349
AC_MSG_RESULT($withval)
350
if test -f $withval/event.h -a -f $withval/libevent.a; then
352
if cd $withval; then withval=`pwd`; cd $owd; fi
353
LIBEVENT_CFLAGS="-I$withval"
354
LIBEVENT_LIBS="-L$withval -levent"
355
elif test -f $withval/include/event.h -a -f $withval/lib/libevent.a; then
357
if cd $withval; then withval=`pwd`; cd $owd; fi
358
LIBEVENT_CFLAGS="-I$withval/include"
359
LIBEVENT_LIBS="-L$withval/lib -levent"
361
AC_MSG_ERROR([event.h or libevent.a not found in $withval])
365
AC_SUBST(LIBEVENT_CFLAGS)
366
AC_SUBST(LIBEVENT_LIBS)
368
AC_CACHE_CHECK([for bufferevent in libevent], ac_libevent_works, [
369
save_CFLAGS="$CFLAGS"
371
CFLAGS="$LIBEVENT_CFLAGS"
372
LIBS="$LIBEVENT_LIBS"
374
#include <sys/types.h>
375
#include <sys/time.h>
377
#include <event.h>],[
378
struct bufferevent bev;
379
bufferevent_settimeout(&bev, 1, 1);
380
], ac_libevent_works=yes, [
381
AC_ERROR([you need to install a more recent version of libevent,
382
check http://www.monkey.org/~provos/libevent/])
385
CFLAGS="$save_CFLAGS"
390
#--------------------------------------------------------------------
391
# Check for libpthread
392
#--------------------------------------------------------------------
394
AC_CHECK_HEADERS(pthread.h)
395
if test "x$ac_cv_header_pthread_h" != "xyes"
397
AC_MSG_ERROR([Couldn't find pthread.h.])
399
AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR(could not find libpthread)])
401
#--------------------------------------------------------------------
403
#--------------------------------------------------------------------
405
AC_ARG_ENABLE([tcmalloc],
406
[AS_HELP_STRING([--enable-tcmalloc],
407
[Enable linking with tcmalloc @<:@default=off@:>@])],
408
[ac_enable_tcmalloc="$enableval"],
409
[ac_enable_tcmalloc="no"])
411
if test "x$ac_enable_tcmalloc" = "xyes"
413
AC_CHECK_LIB(tcmalloc,malloc,[],[])
71
PANDORA_REQUIRE_PTHREAD
73
PANDORA_REQUIRE_LIBPROTOBUF
74
PANDORA_PROTOBUF_REQUIRE_VERSION([2.0.3])
75
PANDORA_REQUIRE_PROTOC
77
#--------------------------------------------------------------------
79
#--------------------------------------------------------------------
81
dnl Do this by hand. Need to check for uuid/uuid.h, but uuid may or may
82
dnl not be a lib is weird.
84
AC_CHECK_HEADERS(uuid/uuid.h)
85
if test "x$ac_cv_header_uuid_uuid_h" = "xno"
87
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.])
89
AC_LIB_HAVE_LINKFLAGS(uuid,,
91
#include <uuid/uuid.h>
101
#--------------------------------------------------------------------
102
# Check for tcmalloc/mtmalloc
103
#--------------------------------------------------------------------
105
PANDORA_HAVE_BETTER_MALLOC
106
LIBS="${LIBS} ${BETTER_MALLOC_LIBS}"
108
#--------------------------------------------------------------------
109
# Check for libdrizzle
110
#--------------------------------------------------------------------
113
PANDORA_REQUIRE_LIBDRIZZLE
416
117
#--------------------------------------------------------------------
418
119
#--------------------------------------------------------------------
422
AC_CHECK_HEADERS(zlib.h)
423
if test "x$ac_cv_header_zlib_h" != "xyes"
425
AC_MSG_ERROR([Couldn't find zlib.h. Try installing zlib development packages])
427
AC_CHECK_LIB(z, crc32, [], [AC_MSG_ERROR(could not find libz)])
121
AC_LIB_HAVE_LINKFLAGS(z,,
126
AS_IF([test x$ac_cv_libz = xno],
127
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.]))
433
129
#--------------------------------------------------------------------
434
130
# Check for libreadline or compatible (libedit on Mac OS X)
435
131
#--------------------------------------------------------------------
437
AC_CHECK_HEADERS(readline/history.h readline/readline.h)
438
if test "x$ac_cv_header_readline_readline_h" != "xyes"
440
AC_MSG_ERROR([Couldn't find readline/readline.h. Try installing readline development packages.])
442
AC_CHECK_TYPES([HIST_ENTRY], [], [], [AC_INCLUDES_DEFAULT[
443
#ifdef HAVE_READLINE_HISTORY_H
444
#include <readline/history.h>
446
#include <readline/readline.h>
448
AC_CHECK_DECLS([completion_matches], [], [], [AC_INCLUDES_DEFAULT[
449
#ifdef HAVE_READLINE_HISTORY_H
450
#include <readline/history.h>
452
#include <readline/readline.h>
136
AS_IF([test "x$vl_cv_lib_readline" = "xno"],
137
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.]))
138
READLINE_LIBS="${LIBS}"
140
AC_SUBST(READLINE_LIBS)
455
142
DRIZZLE_CHECK_NEW_RL_INTERFACE
459
AC_CHECK_LIB(readline, rl_initialize, [],
460
[AC_CHECK_LIB(ncurses, tgetent, [], [AC_MSG_ERROR(Couldn't find ncurses)])
461
AC_SEARCH_LIBS(rl_initialize, readline, [],
462
[AC_MSG_ERROR(Couldn't find libreadline.)])])
463
READLINE_LIBS="$LIBS"
465
AC_SUBST(READLINE_LIBS)
468
144
#--------------------------------------------------------------------
469
145
# Check for libpcre
470
146
#--------------------------------------------------------------------
473
AC_PATH_PROG(PKG_CONFIG, pkg-config, AC_MSG_ERROR([pkg-config wasn't found.]))
474
PKG_CHECK_MODULES(PCRE, [libpcrecpp >= 3], [found_pcre="yes"],[found_pcre="no"])
476
if test "$found_pcre" = "no"
478
dnl Only check the header here, because autoconf can't handle
479
dnl checking for C++ methods without C linkages
480
AC_CHECK_HEADERS(pcrecpp.h)
481
if test "x$ac_cv_header_pcrecpp_h" != "xyes"
483
AC_MSG_ERROR([Couldn't find pcrecpp.h. Try installing the development package associated with libpcre on your system.])
485
# Found headers, now see if we can link
486
AC_MSG_CHECKING(for libpcrecpp)
487
save_LDFLAGS="$LDFLAGS"
488
LDFLAGS="-lpcrecpp -lpcre"
492
[pcrecpp::RE_Options opt;],
494
[AC_MSG_ERROR([Couldn't link libpcrecpp])])
497
LDFLAGS="$save_LDFLAGS"
503
AC_SUBST(PCRE_CFLAGS)
505
dnl Find paths to some shell programs
506
AC_PATH_PROG(LN, ln, ln)
507
# This must be able to take a -f flag like normal unix ln.
508
AC_PATH_PROG(LN_CP_F, ln, ln)
510
AC_PATH_PROG(MV, mv, mv)
511
AC_PATH_PROG(RM, rm, rm)
512
AC_PATH_PROG(CP, cp, cp)
513
AC_PATH_PROG(SED, sed, sed)
514
AC_PATH_PROG(CMP, cmp, cmp)
515
AC_PATH_PROG(CHMOD, chmod, chmod)
516
AC_PATH_PROG(HOSTNAME, hostname, hostname)
517
# Check for a GNU tar named 'gtar', or 'gnutar' (MacOS X) and
518
# fall back to 'tar' otherwise and hope that it's a GNU tar as well
519
AC_CHECK_PROGS(TAR, gnutar gtar tar)
521
dnl We use a path for perl so the script startup works
522
dnl We make sure to use perl, not perl5, in hopes that the RPMs will
523
dnl not depend on the perl5 binary being installed (probably a bug in RPM)
148
AC_LIB_HAVE_LINKFLAGS(pcre,,
154
AS_IF([test "x$ac_cv_libpcre" = "xno"],
161
AC_LIB_HAVE_LINKFLAGS(pcre,,
162
[#include <pcre/pcre.h>],
167
AS_IF([test "x$ac_cv_libpcre" = "xno"],
169
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.])
171
AC_DEFINE(PCRE_HEADER,[<pcre/pcre.h>],[Location of pcre header])
174
AC_DEFINE(PCRE_HEADER,[<pcre.h>],[Location of pcre header])
524
178
AC_PATH_PROG(PERL, perl, no)
525
if test "$PERL" != "no" && $PERL -e 'require 5' > /dev/null 2>&1
529
AC_PATH_PROG(PERL5, perl5, no)
530
if test "$PERL5" != no
533
ac_cv_path_PERL=$ac_cv_path_PERL5
541
# icheck, used for ABI check
542
AC_PATH_PROG(ICHECK, icheck, no)
543
# "icheck" is also the name of a file system check program on Tru64.
544
# Verify the program found is really the interface checker.
545
if test "x$ICHECK" != "xno"
547
AC_MSG_CHECKING(if $ICHECK works as expected)
548
echo "int foo;" > conftest.h
549
$ICHECK --canonify -o conftest.ic conftest.h 2>/dev/null
550
if test -f "conftest.ic"
557
rm -f conftest.ic conftest.h
562
AC_PATH_PROG(PS, ps, ps)
563
AC_MSG_CHECKING("how to check if pid exists")
566
if $PS p $$ 2> /dev/null | grep `echo $0 | sed s/\-//` > /dev/null
568
FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
570
elif $PS -fp $$ 2> /dev/null | grep $0 > /dev/null
572
FIND_PROC="$PS -p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
574
elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
576
FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
578
elif $PS -ef 2> /dev/null | grep $0 > /dev/null
580
FIND_PROC="$PS -ef | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
581
# Do anybody use this?
582
elif $PS $$ 2> /dev/null | grep $0 > /dev/null
584
FIND_PROC="$PS \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
587
*freebsd*|*dragonfly*)
588
FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
591
FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
594
AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
599
AC_MSG_RESULT("$FIND_PROC")
601
# Check if a pid is valid
602
AC_PATH_PROG(KILL, kill, kill)
603
AC_MSG_CHECKING("for kill switches")
604
if $ac_cv_path_KILL -0 $$
606
CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
609
CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
611
AC_MSG_WARN([kill -0 to check for pid seems to fail])
612
CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
615
AC_MSG_RESULT("$CHECK_PID")
617
# We need an ANSI C compiler
620
# We need an assembler, too
622
CCASFLAGS="$CCASFLAGS $ASFLAGS"
624
# Check if we need noexec stack for assembler
627
if test "$am_cv_prog_cc_stdc" = "no"
629
AC_MSG_ERROR([Drizzle requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
633
181
AC_ARG_WITH([server-suffix],
1283
666
# Check for requested features
1284
667
#--------------------------------------------------------------------
1286
DRIZZLE_CHECK_BIG_TABLES
1287
669
DRIZZLE_CHECK_MAX_INDEXES
1290
#--------------------------------------------------------------------
1291
# Declare our plugin modules
1292
# Has to be done late, as the plugin may need to check for existence of
1293
# functions tested above
1294
#--------------------------------------------------------------------
1296
DRIZZLE_CONFIGURE_PLUGINS([none])
1298
AC_SUBST(mysql_plugin_dirs)
1299
AC_SUBST(mysql_plugin_libs)
1300
AC_SUBST(mysql_plugin_defs)
1302
AC_ARG_ENABLE([profiling],
1303
[AS_HELP_STRING([--enable-profiling],
1304
[Toggle profiling @<:@default=off@:>@])],
1305
[ac_profiling="$enableval"],
1306
[ac_profiling="no"])
1308
AC_ARG_ENABLE([coverage],
1309
[AS_HELP_STRING([--enable-coverage],
1310
[Toggle coverage @<:@default=off@:>@])],
1311
[ac_coverage="$enableval"],
1314
AC_ARG_ENABLE([pedantic-warnings],
1315
[AS_HELP_STRING([--disable-pedantic-warnings],
1316
[Toggle pedanticness @<:@default=on@:>@])],
1317
[ac_warn_pedantic="$enableval"],
1318
[ac_warn_pedantic="yes"])
1320
AC_ARG_ENABLE([fail],
1321
[AS_HELP_STRING([--disable-fail],
1322
[Turn warnings into failures @<:@default=on@:>@])],
1323
[ac_warn_fail="$enableval"],
1324
[ac_warn_fail="yes"])
1326
AC_ARG_ENABLE([unreachable],
1327
[AS_HELP_STRING([--enable-unreachable],
1328
[Enable warnings about unreachable code @<:@default=off@:>@])],
1329
[ac_warn_unreachable="$enableval"],
1330
[ac_warn_unreachable="no"])
1332
AC_ARG_ENABLE([longlong-warnings],
1333
[AS_HELP_STRING([--enable-longlong-warnings],
1334
[Enable warnings about longlong in C++ @<:@default=off@:>@])],
1335
[ac_warn_longlong="$enableval"],
1336
[ac_warn_longlong="no"])
1338
AC_ARG_ENABLE([strict-aliasing],
1339
[AS_HELP_STRING([--enable-strict-aliasing],
1340
[Enable warnings about stict-aliasing @<:@default=off@:>@])],
1341
[ac_warn_strict_aliasing="$enableval"],
1342
[ac_warn_strict_aliasing="no"])
1345
if test "$GCC" = "yes"
1348
if test "$ac_warn_longlong" = "yes"
1350
W_LONGLONG="-Wlong-long"
1352
W_LONGLONG="-Wno-long-long"
1355
if test "$ac_warn_strict_aliasing" = "yes"
1357
W_STRICT_ALIASING="-Wstrict-aliasing"
1359
W_STRICT_ALIASING="-Wno-strict-aliasing"
1362
if test "$ac_profiling" = "yes"
1364
GPROF_PROFILING="-pg"
1369
if test "$ac_coverage" = "yes"
1371
GPROF_COVERAGE="-fprofile-arcs -ftest-coverage"
1376
if test "$ac_warn_pedantic" = "yes"
1378
GCC_PEDANTIC="-pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls ${W_STRICT_ALIASING}"
1379
GXX_PEDANTIC="-pedantic -Wundef -Wredundant-decls ${W_LONGLONG} ${W_STRICT_ALIASING}"
1382
if test "$ac_warn_unreachable" = "yes"
1384
W_UNREACHABLE="-Wunreachable-code"
1387
if test "$ac_warn_fail" = "yes"
1392
BASE_WARNINGS="-W -Wall -Wextra"
1393
GCC_WARNINGS="${C99_SUPPORT_HACK} ${BASE_WARNINGS} ${GCC_PEDANTIC} ${W_UNREACHABLE} ${W_FAIL} ${GPROF_PROFILING} ${GPROF_COVERAGE}"
1394
GXX_WARNINGS="${BASE_WARNINGS} ${GXX_PEDANTIC} ${W_UNREACHABLE} ${W_FAIL} ${GPROF_PROFILING} ${GPROF_COVERAGE}"
1396
AM_CXXFLAGS="${GXX_WARNINGS} ${AM_CXXFLAGS}"
1397
AM_CFLAGS="${GCC_WARNINGS} ${AM_CFLAGS}"
1400
AC_SUBST([GLOBAL_CPPFLAGS],['-I$(top_srcdir) -I$(top_builddir)'])
1401
AC_SUBST([AM_CPPFLAGS],['${GLOBAL_CPPFLAGS}'])
1402
AC_SUBST([AM_CFLAGS])
1403
AC_SUBST([AM_CXXFLAGS])
1405
# Some usefull subst
1409
# Set configuration options for make_binary_distribution
1410
case $SYSTEM_TYPE in
1412
MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --no-strip"
1415
: # no change for other platforms yet
1418
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
1420
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
1421
mystrings/Makefile storage/Makefile dnl
1422
vio/Makefile po/Makefile.in dnl
1423
libdrizzle/Makefile client/Makefile dnl
671
dnl Has to be done late, as the plugin may need to check for existence of
672
dnl functions tested above
673
PANDORA_PLUGINS([drizzled/plugin/config.h])
675
dnl GCC Precompiled Header Support
677
dnl AM_CONDITIONAL([BUILD_GCC_PCH],[test "$GCC" = "yes"])
678
AM_CONDITIONAL([BUILD_GCC_PCH],[test "no" = "yes"])
680
AC_CONFIG_FILES(Makefile dnl
683
drizzled/message/Makefile dnl
1424
684
drizzled/Makefile dnl
1425
drizzled/field/Makefile dnl
1426
drizzled/serialize/Makefile dnl
1427
drizzled/sql_builtin.cc dnl
1428
685
support-files/Makefile dnl
1429
686
tests/Makefile tests/install_test_db dnl
1430
drizzled/version.h plugin/Makefile dnl
1431
drizzled/drizzled_safe support-files/libdrizzle.pc dnl
1432
support-files/drizzle.server support-files/drizzle-log-rotate)
1434
AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
1436
# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
1437
AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS' AM_CFLAGS='$AM_CFLAGS' AM_CXXFLAGS='$AM_CXXFLAGS'")
687
support-files/drizzle.server support-files/drizzle-log-rotate
688
support-files/smf/Makefile dnl
689
support-files/smf/install.sh dnl
690
support-files/smf/drizzle.xml dnl
691
support-files/smf/drizzle)
693
scheduling_plugins_available="
698
for sched_plugin in $scheduling_plugins_available
700
varname="\${with_plugin_${sched_plugin}}"
701
result=`eval "echo $varname"`
702
if test "x$result" = "xyes"
704
scheduling_plugins="$sched_plugin $scheduling_plugins"
711
echo "Configuration summary for $PACKAGE_NAME version $VERSION RELEASE_COMMENT"
713
echo " * Installation prefix: $prefix"
714
echo " * System type: $host_vendor-$host_os"
715
echo " * Host CPU: $host_cpu"
716
echo " * C Compiler: $CC_VERSION"
717
echo " * C++ Compiler: $CXX_VERSION"
718
echo " * Build auth_pam: $ac_cv_libpam"
719
echo " * Assertions enabled: $ac_cv_assert"
720
echo " * Debug enabled: $with_debug"
721
echo " * Profiling enabled: $ac_profiling"
722
echo " * Coverage enabled: $ac_coverage"
723
echo " * Warnings as failure: $ac_cv_warnings_as_errors"
724
echo " * C++ cstdint location: $ac_cv_cxx_cstdint"
725
echo " * C++ hash_map location: $ac_cv_cxx_hash_map"
726
echo " * C++ hash namespace: $ac_cv_cxx_hash_namespace"
727
echo " * C++ shared_ptr namespace: $ac_cv_shared_ptr_namespace"
731
dnl libtoolize scans configure.ac and needs to see some text
732
m4_define([LIBTOOLIZE_AC_INIT], [])