~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
dnl -*- ksh -*-
2
dnl Process this file with autoconf to produce a configure script.
3
77.1.65 by Monty Taylor
We don't really require 2.61, 2.59 is actually fine.
4
AC_PREREQ(2.59)dnl		Minimum Autoconf version required.
1 by brian
clean slate
5
28.1.33 by Monty Taylor
Added -Wall
6
AC_INIT
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
7
AC_CONFIG_SRCDIR([drizzled/drizzled.cc])
39 by Brian Aker
Move build helper files into config
8
AC_CONFIG_AUX_DIR(config)
212.5.40 by Monty Taylor
Moved config.h to drizzled.
9
AC_CONFIG_HEADERS([drizzled/config.h:config.h.in])
28.1.33 by Monty Taylor
Added -Wall
10
AC_CANONICAL_TARGET
91 by Brian Aker
Main binary now named drizzled
11
AM_INIT_AUTOMAKE(drizzle, 7.0.0, no-define)
1 by brian
clean slate
12
13
PROTOCOL_VERSION=10
14
DOT_FRM_VERSION=6
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
18
19
20
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
24
#
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
30
#
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}'`
36
37
# The port should be constant for a LONG time
165.1.1 by Elliot Murphy
new port number from IANA
38
MYSQL_TCP_PORT_DEFAULT=4427
1 by brian
clean slate
39
40
dnl Include m4 
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)
77.1.73 by Monty Taylor
Added sinclude of pkg.m4
51
sinclude(config/ac-macros/pkg.m4)
1 by brian
clean slate
52
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
53
# Remember to add a directory drizzled/share/LANGUAGE
1 by brian
clean slate
54
AVAILABLE_LANGUAGES="\
55
czech danish dutch english estonian french german greek hungarian \
56
italian japanese korean norwegian norwegian-ny polish portuguese \
57
romanian russian serbian slovak spanish swedish ukrainian"
58
59
#####
60
#####
61
62
AC_SUBST(MYSQL_NO_DASH_VERSION)
63
AC_SUBST(MYSQL_BASE_VERSION)
64
AC_SUBST(MYSQL_VERSION_ID)
65
AC_SUBST(MYSQL_PREVIOUS_BASE_VERSION)
66
AC_SUBST(PROTOCOL_VERSION)
67
AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION],
68
                   [mysql client protocol version])
69
AC_SUBST(DOT_FRM_VERSION)
70
AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION],
71
                   [Version of .frm files])
72
AC_SUBST(SHARED_LIB_MAJOR_VERSION)
73
AC_SUBST(SHARED_LIB_VERSION)
74
AC_SUBST(AVAILABLE_LANGUAGES)
75
76
77
# Canonicalize the configuration name.
78
79
# Check whether --with-system-type or --without-system-type was given.
28.1.33 by Monty Taylor
Added -Wall
80
AC_ARG_WITH([system-type],
81
    [AS_HELP_STRING([--with-system-type],
82
       [Set the system type, like "sun-solaris10"])],
1 by brian
clean slate
83
    [SYSTEM_TYPE="$withval"],
84
    [SYSTEM_TYPE="$host_vendor-$host_os"])
28.1.33 by Monty Taylor
Added -Wall
85
AC_ARG_WITH([machine-type],
86
    [AS_HELP_STRING([--with-machine-type],
87
       [Set the machine type, like "powerpc"])],
1 by brian
clean slate
88
    [MACHINE_TYPE="$withval"],
89
    [MACHINE_TYPE="$host_cpu"])
90
AC_SUBST(SYSTEM_TYPE)
91
AC_DEFINE_UNQUOTED([SYSTEM_TYPE], ["$SYSTEM_TYPE"],
92
                   [Name of system, eg sun-solaris])
93
AC_SUBST(MACHINE_TYPE)
94
AC_DEFINE_UNQUOTED([MACHINE_TYPE], ["$MACHINE_TYPE"],
95
                   [Machine type name, eg sparc])
96
97
# Detect intel x86 like processor
98
BASE_MACHINE_TYPE=$MACHINE_TYPE
99
case $MACHINE_TYPE in
100
  i?86) BASE_MACHINE_TYPE=i386 ;;
101
esac
102
103
# Save some variables and the command line options for mysqlbug
104
SAVE_CC="$CC"
105
SAVE_CXX="$CXX"
106
SAVE_ASFLAGS="$ASFLAGS"
107
SAVE_CFLAGS="$CFLAGS"
108
SAVE_CXXFLAGS="$CXXFLAGS"
109
SAVE_LDFLAGS="$LDFLAGS"
110
SAVE_CXXLDFLAGS="$CXXLDFLAGS"
111
CONF_COMMAND="$0 $ac_configure_args"
112
AC_SUBST(CONF_COMMAND)
113
AC_SUBST(SAVE_CC)
114
AC_SUBST(SAVE_CXX)
115
AC_SUBST(SAVE_ASFLAGS)
116
AC_SUBST(SAVE_CFLAGS)
117
AC_SUBST(SAVE_CXXFLAGS)
118
AC_SUBST(SAVE_LDFLAGS)
119
AC_SUBST(SAVE_CXXLDFLAGS)
120
AC_SUBST(CXXLDFLAGS)
121
122
AM_SANITY_CHECK
123
# This is needed is SUBDIRS is set
124
AC_PROG_MAKE_SET
125
126
##############################################################################
127
# The below section needs to be done before AC_PROG_CC
128
##############################################################################
129
130
if test "x${CFLAGS-}" = x ; then
131
  cflags_is_set=no
132
else
133
  cflags_is_set=yes
134
fi
135
136
if test "x${CPPFLAGS-}" = x ; then
137
  cppflags_is_set=no
138
else
139
  cppflags_is_set=yes
140
fi
141
142
if test "x${LDFLAGS-}" = x ; then
143
  ldflags_is_set=no
144
else
145
  ldflags_is_set=yes
146
fi
147
148
################ End of section to be done before AC_PROG_CC #################
149
150
# The following hack should ensure that configure doesn't add optimizing
151
# or debugging flags to CFLAGS or CXXFLAGS
152
# C_EXTRA_FLAGS are flags that are automaticly added to both
153
# CFLAGS and CXXFLAGS
154
CFLAGS="$CFLAGS $C_EXTRA_FLAGS "
155
CXXFLAGS="$CXXFLAGS $C_EXTRA_FLAGS "
156
157
dnl Checks for programs.
158
AC_PROG_CC
236.1.2 by Monty Taylor
Changed the way we work around autoconf2.59
159
ifdef([AC_PROG_CC_C99],[
160
  AC_PROG_CC_C99([],[AC_MSG_ERROR([C99 support required for compiling Drizzle])])
161
  C99_SUPPORT_HACK=""
162
],[C99_SUPPORT_HACK="-std=gnu99"])
1 by brian
clean slate
163
AC_PROG_CXX
230.3.1 by Monty Taylor
Bug 252805: ./configure not detecting missing g++
164
if test "x$ac_ct_CXX" = "x"
165
then
166
  AC_MSG_ERROR([C++ Compiler required to compile Drizzle])
167
fi
1 by brian
clean slate
168
AC_PROG_CPP
169
AM_PROG_CC_C_O
170
171
# Print version of CC and CXX compiler (if they support --version)
172
case $SYSTEM_TYPE in
173
  *netware*)
174
CC_VERSION=`$CC -version | grep -i version`
175
    ;;
176
  *)
177
CC_VERSION=`$CC --version | sed 1q`
178
    ;;
179
esac
180
if test $? -eq "0"
181
then
182
  AC_MSG_CHECKING("C Compiler version")
183
  AC_MSG_RESULT("$CC $CC_VERSION")
184
else
185
CC_VERSION=""
186
fi
187
AC_SUBST(CC_VERSION)
188
MYSQL_CHECK_CXX_VERSION
189
230.3.1 by Monty Taylor
Bug 252805: ./configure not detecting missing g++
190
AC_PROG_AWK
191
28.1.33 by Monty Taylor
Added -Wall
192
if test "$ac_cv_c_compiler_gnu" = "yes"
1 by brian
clean slate
193
then
194
  AS="$CC -c"
195
  AC_SUBST(AS)
196
else
197
  AC_PATH_PROG(AS, as, as)
198
fi
199
200
# We use libtool
201
#AC_LIBTOOL_WIN32_DLL
202
AC_PROG_LIBTOOL
203
204
# Ensure that we have --preserve-dup-deps defines, otherwise we get link
205
# problems of 'mysql' with CXX=g++
206
LIBTOOL="$LIBTOOL --preserve-dup-deps"
207
AC_SUBST(LIBTOOL)dnl
208
209
AC_SUBST(NM)dnl
210
211
AC_PROG_INSTALL
212
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
213
214
# Not critical since the generated file is distributed
215
AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL'])
77.1.70 by Monty Taylor
Added a failure if you don't have bison and you're building from a .bzr branch.
216
if test -z "$YACC" && test -d ".bzr"
217
then
218
  AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
219
fi
1 by brian
clean slate
220
221
AC_PATH_PROG(uname_prog, uname, no)
222
223
# We should go through this and put all the explictly system dependent
224
# stuff in one place
225
AC_MSG_CHECKING(operating system)
226
AC_CACHE_VAL(mysql_cv_sys_os,
227
[
228
if test "$uname_prog" != "no"; then
229
  mysql_cv_sys_os="`uname`"
230
else
231
  mysql_cv_sys_os="Not Solaris"
232
fi
233
])
234
AC_MSG_RESULT($mysql_cv_sys_os)
235
236
# This should be rewritten to use $target_os
237
case "$target_os" in
238
  *solaris*)
239
    TARGET_SOLARIS="true"
240
    AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
241
    AC_SUBST(TARGET_SOLARIS)
242
  ;;
243
esac
244
245
# The following is required for portable results of floating point calculations
246
# on PowerPC. The same must also be done for IA-64, but this options is missing
247
# in the IA-64 gcc backend.
248
249
if test "$GCC" = "yes"
250
then
251
  case "$host_cpu" in
252
    *ppc* | *powerpc*)
253
      CFLAGS="$CFLAGS -mno-fused-madd"
254
      CXXFLAGS="$CXXFLAGS -mno-fused-madd"
255
    ;;
256
  esac
257
fi
258
259
AC_SUBST(CC)
260
AC_SUBST(CFLAGS)
261
AC_SUBST(CXX)
262
AC_SUBST(CXXFLAGS)
263
AC_SUBST(ASFLAGS)
264
AC_SUBST(LD)
265
AC_SUBST(INSTALL_SCRIPT)
266
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
267
1 by brian
clean slate
268
export CC CXX CFLAGS LD LDFLAGS AR ARFLAGS
269
270
if test "$GCC" = "yes"
271
then
272
  # mysqld requires -fno-implicit-templates.
273
  # Disable exceptions as they seams to create problems with gcc and threads.
274
  # mysqld doesn't use run-time-type-checking, so we disable it.
275
  # We should use -Wno-invalid-offsetof flag to disable some warnings from gcc
276
  # regarding offset() usage in C++ which are done in a safe manner in the
277
  # server
77.1.68 by Monty Taylor
Turned on -g and optimization for normal builds. -ggdb3 for gcc builds.
278
  CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"
1 by brian
clean slate
279
  AC_DEFINE([HAVE_EXPLICIT_TEMPLATE_INSTANTIATION],
280
    [1], [Defined by configure. Use explicit template instantiation.])
281
fi
282
283
MYSQL_PROG_AR
284
285
# libmysqlclient versioning when linked with GNU ld.
286
if $LD --version 2>/dev/null|grep -q GNU; then
77.1.38 by Monty Taylor
Renamed more stuff to drizzle.
287
  LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/libdrizzle/libdrizzle.ver"
288
  AC_CONFIG_FILES(libdrizzle/libdrizzle.ver)
1 by brian
clean slate
289
fi
290
AC_SUBST(LD_VERSION_SCRIPT)
291
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
292
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
293
#--------------------------------------------------------------------
294
# Check for libevent
295
#--------------------------------------------------------------------
296
297
AC_CHECK_HEADERS(event.h)
298
if test "x$ac_cv_header_event_h" != "xyes"
299
then
300
  AC_MSG_ERROR([Couldn't find event.h. Try installing libevent development packages])
301
fi
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
302
my_save_LIBS="$LIBS"
303
LIBS=""
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
304
AC_CHECK_LIB(event, event_loop, [], [AC_MSG_ERROR(could not find libevent)])
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
305
LIBEVENT_LIBS="${LIBS}"
306
LIBS="${my_save_LIBS}"
307
AC_SUBST(LIBEVENT_LIBS)
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
308
309
#--------------------------------------------------------------------
310
# Check for libpthread
311
#--------------------------------------------------------------------
312
313
AC_CHECK_HEADERS(pthread.h)
314
if test "x$ac_cv_header_pthread_h" != "xyes"
315
then
316
  AC_MSG_ERROR([Couldn't find pthread.h.])
317
fi
318
AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR(could not find libpthread)])
319
320
#--------------------------------------------------------------------
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
321
# Check for tcmalloc
322
#--------------------------------------------------------------------
323
324
AC_ARG_ENABLE([tcmalloc],
325
    [AS_HELP_STRING([--enable-tcmalloc],
326
       [Enable linking with tcmalloc @<:@default=off@:>@])],
327
    [ac_warn_strict_aliasing="$enableval"],
328
    [ac_warn_strict_aliasing="no"])
329
330
if test "x$ac_warn_strict_aliasing" = "xyes"
331
then
332
  AC_CHECK_LIB(tcmalloc,malloc,[],[])
333
fi
334
335
#--------------------------------------------------------------------
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
336
# Check for libz
337
#--------------------------------------------------------------------
338
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
339
my_save_LIBS="$LIBS"
340
LIBS=""
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
341
AC_CHECK_HEADERS(zlib.h)
342
if test "x$ac_cv_header_zlib_h" != "xyes"
343
then
344
  AC_MSG_ERROR([Couldn't find zlib.h. Try installing zlib development packages])
345
fi
346
AC_CHECK_LIB(z, crc32, [], [AC_MSG_ERROR(could not find libz)])
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
347
ZLIB_LIBS="$LIBS"
348
LIBS="$my_save_LIBS"
349
AC_SUBST(ZLIB_LIBS)
350
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
351
182.1.5 by Jim Winstead
Detect and make the Mac OS X libedit readline interface look like the
352
#--------------------------------------------------------------------
353
# Check for libreadline or compatible (libedit on Mac OS X)
354
#--------------------------------------------------------------------
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
355
356
AC_CHECK_HEADERS([readline/readline.h])
357
if test "x$ac_cv_header_readline_readline_h" != "xyes"
358
then
359
  AC_MSG_ERROR([Couldn't find readline/readline.h. Try installing readline development packages.])
360
fi
207.1.2 by Jim Winstead
Fix test for libreadline to test a function that exists in all usable
361
362
MYSQL_CHECK_NEW_RL_INTERFACE
363
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
364
my_save_LIBS="$LIBS"
365
LIBS=""
207.1.2 by Jim Winstead
Fix test for libreadline to test a function that exists in all usable
366
AC_CHECK_LIB(readline, rl_initialize, [],
224.1.1 by Monty Taylor
Fixed readline build problem on Centos.
367
  [AC_CHECK_LIB(ncurses, tgetent, [], [AC_MSG_ERROR(Couldn't find ncurses)]) 
368
   AC_SEARCH_LIBS(rl_initialize, readline, [],
369
    [AC_MSG_ERROR(Couldn't find libreadline.)])])
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
370
READLINE_LIBS="$LIBS"
371
LIBS="$my_save_LIBS"
372
AC_SUBST(READLINE_LIBS)
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
373
182.1.5 by Jim Winstead
Detect and make the Mac OS X libedit readline interface look like the
374
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
375
#--------------------------------------------------------------------
376
# Check for libpcre
377
#--------------------------------------------------------------------
378
379
AC_LANG_PUSH([C++])
380
AC_PATH_PROG(PKG_CONFIG, pkg-config, AC_MSG_ERROR([pkg-config wasn't found.]))
381
PKG_CHECK_MODULES(PCRE, [libpcrecpp >= 3], [found_pcre="yes"],[
77.1.64 by Monty Taylor
YA fix for libpcrecpp finding...
382
  dnl Only check the header here, because autoconf can't handle
383
  dnl checking for C++ methods without C linkages
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
384
  AC_CHECK_HEADERS(pcrecpp.h)
77.1.102 by Monty Taylor
Fixed a PCRE detection bug.
385
  if test "x$ac_cv_header_pcrecpp_h" != "xyes" 
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
386
  then
387
    found_pcre="no"
77.1.64 by Monty Taylor
YA fix for libpcrecpp finding...
388
  else
389
    found_pcre="yes"
77.1.69 by Monty Taylor
Added the PCRE libs so that we can actually link against them :(
390
    # We can't search for these well, but we sure do need them!
391
    PCRE_LIBS="-lpcrecpp -lpcre"
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
392
  fi
393
  ])
394
if test "x$found_pcre" != "xyes"
395
then
396
    AC_MSG_ERROR([Couldn't find pcrecpp.h. Try installing the development package associated with libpcre on your system.])
397
fi
398
AC_LANG_POP([])
399
AC_SUBST(PCRE_LIBS)
400
AC_SUBST(PCRE_CFLAGS)
401
1 by brian
clean slate
402
dnl Find paths to some shell programs
403
AC_PATH_PROG(LN, ln, ln)
404
# This must be able to take a -f flag like normal unix ln.
405
AC_PATH_PROG(LN_CP_F, ln, ln)
406
407
AC_PATH_PROG(MV, mv, mv)
408
AC_PATH_PROG(RM, rm, rm)
409
AC_PATH_PROG(CP, cp, cp)
410
AC_PATH_PROG(SED, sed, sed)
411
AC_PATH_PROG(CMP, cmp, cmp)
412
AC_PATH_PROG(CHMOD, chmod, chmod)
413
AC_PATH_PROG(HOSTNAME, hostname, hostname)
414
# Check for a GNU tar named 'gtar', or 'gnutar' (MacOS X) and
415
# fall back to 'tar' otherwise and hope that it's a GNU tar as well
416
AC_CHECK_PROGS(TAR, gnutar gtar tar)
417
418
dnl We use a path for perl so the script startup works
419
dnl We make sure to use perl, not perl5, in hopes that the RPMs will
420
dnl not depend on the perl5 binary being installed (probably a bug in RPM)
421
AC_PATH_PROG(PERL, perl, no)
422
if test "$PERL" != "no" && $PERL -e 'require 5' > /dev/null 2>&1
423
then
424
  PERL5=$PERL
425
else
426
  AC_PATH_PROG(PERL5, perl5, no)
427
  if test "$PERL5" != no
428
  then
429
    PERL=$PERL5
430
    ac_cv_path_PERL=$ac_cv_path_PERL5
431
  fi
432
fi
433
434
AC_SUBST(HOSTNAME)
435
AC_SUBST(PERL)
436
AC_SUBST(PERL5)
437
438
# icheck, used for ABI check
439
AC_PATH_PROG(ICHECK, icheck, no)
440
# "icheck" is also the name of a file system check program on Tru64.
441
# Verify the program found is really the interface checker.
442
if test "x$ICHECK" != "xno"
443
then
444
  AC_MSG_CHECKING(if $ICHECK works as expected)
445
  echo "int foo;" > conftest.h
446
  $ICHECK --canonify -o conftest.ic conftest.h 2>/dev/null
447
  if test -f "conftest.ic"
448
  then
449
    AC_MSG_RESULT(yes)
450
  else
451
    AC_MSG_RESULT(no)
452
    ICHECK=no
453
  fi
454
  rm -f conftest.ic conftest.h
455
fi
456
AC_SUBST(ICHECK)
457
458
# Lock for PS
459
AC_PATH_PROG(PS, ps, ps)
460
AC_MSG_CHECKING("how to check if pid exists")
461
PS=$ac_cv_path_PS
462
# Linux style
463
if $PS p $$ 2> /dev/null | grep `echo $0 | sed s/\-//` > /dev/null
464
then
465
  FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
466
# Solaris
467
elif $PS -fp $$ 2> /dev/null | grep $0 > /dev/null
468
then
469
  FIND_PROC="$PS -p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
470
# BSD style
471
elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
472
then
473
  FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
474
# SysV style
475
elif $PS -ef 2> /dev/null | grep $0 > /dev/null
476
then
477
  FIND_PROC="$PS -ef | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
478
# Do anybody use this?
479
elif $PS $$ 2> /dev/null | grep $0 > /dev/null
480
then
481
  FIND_PROC="$PS \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
482
else
483
  case $SYSTEM_TYPE in
484
    *freebsd*|*dragonfly*)
485
      FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
486
      ;;
487
    *darwin*)
488
      FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
489
      ;;
490
    *)
491
      AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
492
  esac
493
fi
494
AC_SUBST(FIND_PROC)
495
AC_MSG_RESULT("$FIND_PROC")
496
497
# Check if a pid is valid
498
AC_PATH_PROG(KILL, kill, kill)
499
AC_MSG_CHECKING("for kill switches")
500
if $ac_cv_path_KILL -0 $$
501
then
502
  CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
503
elif kill -s 0 $$
504
then
505
  CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
506
else
507
  AC_MSG_WARN([kill -0 to check for pid seems to fail])
508
    CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
509
fi
510
AC_SUBST(CHECK_PID)
511
AC_MSG_RESULT("$CHECK_PID")
512
513
# We need an ANSI C compiler
514
AM_PROG_CC_STDC
515
516
# We need an assembler, too
517
AM_PROG_AS
518
CCASFLAGS="$CCASFLAGS $ASFLAGS"
519
520
# Check if we need noexec stack for assembler
521
AC_CHECK_NOEXECSTACK
522
523
if test "$am_cv_prog_cc_stdc" = "no"
524
then
91 by Brian Aker
Main binary now named drizzled
525
  AC_MSG_ERROR([Drizzle requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
1 by brian
clean slate
526
fi
527
528
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
529
AC_ARG_WITH([server-suffix],
530
    [AS_HELP_STRING([--with-server-suffix],
531
      [Append value to the version string.])],
1 by brian
clean slate
532
    [ MYSQL_SERVER_SUFFIX=`echo "$withval" | sed -e  's/^\(...................................\)..*$/\1/'` ],
533
    [ MYSQL_SERVER_SUFFIX= ]
534
    )
535
AC_SUBST(MYSQL_SERVER_SUFFIX)
536
537
# Force use of a curses libs
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
538
AC_ARG_WITH([named-curses-libs],
539
    [AS_HELP_STRING([--with-named-curses-libs=ARG],
540
            [Use specified curses libraries instead of those
541
		automatically found by configure.])],
1 by brian
clean slate
542
    [ with_named_curses=$withval ],
543
    [ with_named_curses=no ]
544
    )
545
546
# compile with strings functions in assembler
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
547
AC_ARG_ENABLE([assembler],
548
    [AS_HELP_STRING([--enable-assembler],
549
	    [Use assembler versions of some string functions if available.])],
1 by brian
clean slate
550
    [ ENABLE_ASSEMBLER=$enableval ],
551
    [ ENABLE_ASSEMBLER=no ]
552
    )
553
554
AC_MSG_CHECKING(if we should use assembler functions)
555
# For now we only support assembler on i386 and sparc systems
212.5.4 by Monty Taylor
Renamed strings to mystrings, for include/lib naming consistency.
556
AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386" && $AS mystrings/strings-x86.s -o checkassembler >/dev/null 2>&1 && test -f checkassembler && (rm -f checkassembler; exit 0;))
1 by brian
clean slate
557
AM_CONDITIONAL(ASSEMBLER_sparc32, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc")
558
AM_CONDITIONAL(ASSEMBLER_sparc64, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparcv9")
559
AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc32_TRUE" = "")
560
561
if test "$ASSEMBLER_TRUE" = ""
562
then
563
  AC_MSG_RESULT([yes])
564
else
565
  AC_MSG_RESULT([no])
566
fi
567
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
568
AC_ARG_WITH([tcp-port],
569
    [AS_HELP_STRING([--with-tcp-port=port-number],
165.1.1 by Elliot Murphy
new port number from IANA
570
            [Which port to use for Drizzle services @<:@default=4427@:>@])],
1 by brian
clean slate
571
    [ MYSQL_TCP_PORT=$withval ],
572
    [ MYSQL_TCP_PORT=$MYSQL_TCP_PORT_DEFAULT
573
      # if we actually defaulted (as opposed to the pathological case of
574
      # --with-tcp-port=<MYSQL_TCP_PORT_DEFAULT> which might in theory
575
      # happen if whole batch of servers was built from a script), set
576
      # the default to zero to indicate that; we don't lose information
577
      # that way, because 0 obviously indicates that we can get the
578
      # default value from MYSQL_TCP_PORT. this seems really evil, but
579
      # testing for MYSQL_TCP_PORT==MYSQL_TCP_PORT_DEFAULT would make a
580
      # a port of MYSQL_TCP_PORT_DEFAULT magic even if the builder did not
581
      # intend it to mean "use the default, in fact, look up a good default
165.1.1 by Elliot Murphy
new port number from IANA
582
      # from /etc/services if you can", but really, really meant 4427 when
583
      # they passed in 4427. When they pass in a specific value, let them
1 by brian
clean slate
584
      # have it; don't second guess user and think we know better, this will
585
      # just make people cross.  this makes the the logic work like this
586
      # (which is complicated enough):
587
      #
588
      # - if a port was set during build, use that as a default.
589
      #
590
      # - otherwise, try to look up a port in /etc/services; if that fails,
165.1.1 by Elliot Murphy
new port number from IANA
591
      #   use MYSQL_TCP_PORT_DEFAULT (at the time of this writing 4427)
1 by brian
clean slate
592
      #
593
      # - allow the MYSQL_TCP_PORT environment variable to override that.
594
      #
595
      # - allow command-line parameters to override all of the above.
596
      #
597
      # the top-most MYSQL_TCP_PORT_DEFAULT is read from win/configure.js,
598
      # so don't mess with that.
599
      MYSQL_TCP_PORT_DEFAULT=0 ]
600
    )
601
AC_SUBST(MYSQL_TCP_PORT)
602
# We might want to document the assigned port in the manual.
603
AC_SUBST(MYSQL_TCP_PORT_DEFAULT)
604
605
# Use this to set the place used for unix socket used to local communication.
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
606
AC_ARG_WITH([mysqld-user],
607
    [AS_HELP_STRING([--with-mysqld-user=username],
608
            [What user the mysqld daemon shall be run as.
609
		@<:@default=mysql@:>@])],
1 by brian
clean slate
610
    [ MYSQLD_USER=$withval ],
611
    [ MYSQLD_USER=mysql ]
612
    )
613
AC_SUBST(MYSQLD_USER)
614
615
# If we should allow LOAD DATA LOCAL
616
AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default)
617
AC_ARG_ENABLE(local-infile,
618
    [  --enable-local-infile   Enable LOAD DATA LOCAL INFILE (default: disabled)],
619
    [ ENABLED_LOCAL_INFILE=$enableval ],
620
    [ ENABLED_LOCAL_INFILE=no ]
621
    )
622
if test "$ENABLED_LOCAL_INFILE" = "yes"
623
then
624
  AC_MSG_RESULT([yes])
625
  AC_DEFINE([ENABLED_LOCAL_INFILE], [1],
626
            [If LOAD DATA LOCAL INFILE should be enabled by default])
627
else
628
  AC_MSG_RESULT([no])
629
fi
630
631
MYSQL_SYS_LARGEFILE
632
633
# Types that must be checked AFTER large file support is checked
634
AC_TYPE_SIZE_T
635
636
#--------------------------------------------------------------------
637
# Check for system header files
638
#--------------------------------------------------------------------
639
640
AC_HEADER_DIRENT
641
AC_HEADER_STDC
642
AC_HEADER_SYS_WAIT
53.2.2 by Monty Taylor
Updated everything that needs updating to compile with -std=gnu99 -pedantic
643
AC_HEADER_STDBOOL
77.1.22 by Monty Taylor
Removed refs to floatingpoint.h (which we only used for fconvert) and fconvert
644
AC_CHECK_HEADERS(fcntl.h float.h fpu_control.h ieeefp.h)
53.2.29 by Monty Taylor
Cleaned up headers a little more.
645
AC_CHECK_HEADERS(limits.h pwd.h select.h linux/config.h)
646
AC_CHECK_HEADERS(sys/fpu.h utime.h sys/utime.h )
647
AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h)
77.1.57 by Monty Taylor
Removed dual-compile needs on client.c. Get the symbols now from libdrizzle.
648
AC_CHECK_HEADERS(sys/timeb.h sys/vadvise.h sys/wait.h term.h)
202.1.4 by Monty Taylor
Removed openssl refs.
649
AC_CHECK_HEADERS(termio.h termios.h sched.h alloca.h)
53.2.29 by Monty Taylor
Cleaned up headers a little more.
650
AC_CHECK_HEADERS(sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h)
651
AC_CHECK_HEADERS(sys/prctl.h sys/resource.h sys/param.h port.h ieeefp.h)
652
AC_CHECK_HEADERS(execinfo.h)
1 by brian
clean slate
653
654
AC_CHECK_HEADERS([xfs/xfs.h])
77.1.62 by Monty Taylor
Added checks for libz and readline devel files.
655
77.1.31 by Monty Taylor
Replaced regex lib with pcre. Reworked mysqltest to use it.
656
#--------------------------------------------------------------------
1 by brian
clean slate
657
# Check for system libraries. Adds the library to $LIBS
658
# and defines HAVE_LIBM etc
659
#--------------------------------------------------------------------
660
661
AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
662
AC_CHECK_FUNCS(log2)
663
664
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
665
AC_CHECK_FUNC(yp_get_default_domain, ,
666
  AC_CHECK_LIB(nsl, yp_get_default_domain))
667
AC_CHECK_FUNC(p2open, , AC_CHECK_LIB(gen, p2open))
668
# This may get things to compile even if bind-8 is installed
669
AC_CHECK_FUNC(bind, , AC_CHECK_LIB(bind, bind))
670
# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
671
AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
672
673
# Check rt for aio_read
674
AC_CHECK_LIB(rt, aio_read)
675
676
# For the sched_yield() function on Solaris
677
AC_CHECK_FUNC(sched_yield, , AC_CHECK_LIB(posix4, sched_yield,
678
[AC_DEFINE(HAVE_SCHED_YIELD) LIBS="$LIBS -lposix4"]))
679
680
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
681
then
682
  AC_CHECK_FUNC(gtty, , AC_CHECK_LIB(compat, gtty))
683
fi
684
685
AC_CHECK_TYPES([int8, uint8, int16, uint16, int32, uint32, int64, uint64,
686
                uchar, uint, ulong],[],[], [
687
#include <sys/types.h>
688
])
689
AC_CHECK_TYPES([fp_except], [], [], [
690
#include <sys/types.h>
691
#include <ieeefp.h>
692
])
693
25 by Brian Aker
Clean up of configure.in
694
my_save_LIBS="$LIBS"
695
LIBS=""
696
AC_CHECK_LIB(dl,dlopen)
177.3.1 by mark
remove ifdef HAVE_DLOPEN, make configure require dlopen()
697
AC_CHECK_FUNCS(dlopen dlerror)
698
if test "$ac_cv_func_dlopen" != "yes"
699
then
700
  AC_MSG_ERROR([Drizzle requires dlopen])
701
fi
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
702
LIBDL_LIBS="$LIBS"
25 by Brian Aker
Clean up of configure.in
703
LIBS="$my_save_LIBS"
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
704
AC_SUBST(LIBDL_LIBS)
25 by Brian Aker
Clean up of configure.in
705
706
AC_CHECK_FUNCS(strtok_r)
1 by brian
clean slate
707
708
# Build optimized or debug version ?
709
# First check for gcc and g++
28.1.33 by Monty Taylor
Added -Wall
710
if test "$ac_cv_c_compiler_gnu" = "yes"
1 by brian
clean slate
711
then
77.1.68 by Monty Taylor
Turned on -g and optimization for normal builds. -ggdb3 for gcc builds.
712
  SYMBOLS_CFLAGS="-ggdb3"
77.1.78 by Monty Taylor
One last bunch of warnings edits.
713
  DEBUG_OPTIMIZE_CC="-O0"
714
  OPTIMIZE_CFLAGS="-O2"
1 by brian
clean slate
715
else
77.1.68 by Monty Taylor
Turned on -g and optimization for normal builds. -ggdb3 for gcc builds.
716
  SYMBOLS_CFLAGS="-g"
1 by brian
clean slate
717
  DEBUG_OPTIMIZE_CC=""
718
  OPTIMIZE_CFLAGS="-O"
719
fi
720
if test "$ac_cv_prog_cxx_g" = "yes"
721
then
77.1.68 by Monty Taylor
Turned on -g and optimization for normal builds. -ggdb3 for gcc builds.
722
  SYMBOLS_CXXFLAGS="-ggdb3"
77.1.78 by Monty Taylor
One last bunch of warnings edits.
723
  DEBUG_OPTIMIZE_CXX="-O0"
724
  OPTIMIZE_CXXFLAGS="-O2"
1 by brian
clean slate
725
else
77.1.68 by Monty Taylor
Turned on -g and optimization for normal builds. -ggdb3 for gcc builds.
726
  SYMBOLS_CXXFLAGS="-g"
1 by brian
clean slate
727
  DEBUG_OPTIMIZE_CXX=""
728
  OPTIMIZE_CXXFLAGS="-O"
729
fi
730
731
# If the user specified CFLAGS, we won't add any optimizations
732
if test -n "$SAVE_CFLAGS"
733
then
734
  OPTIMIZE_CFLAGS=""
735
  DEBUG_OPTIMIZE_CC=""
736
fi
737
# Ditto for CXXFLAGS
738
if test -n "$SAVE_CXXFLAGS"
739
then
740
  OPTIMIZE_CXXFLAGS=""
741
  DEBUG_OPTIMIZE_CXX=""
742
fi
743
224.1.2 by Monty Taylor
Added local define of AC_HEADER_ASSERT.
744
dnl TODO: Remove this define once we are using 2.61 across the board.
745
# AC_HEADER_ASSERT
746
# ----------------
747
# Check whether to enable assertions.
224.1.3 by Monty Taylor
Wrapped the define in an ifdef() so that we can still track upstream on
748
ifdef([AC_HEADER_ASSERT],[],AC_DEFUN([AC_HEADER_ASSERT],
224.1.2 by Monty Taylor
Added local define of AC_HEADER_ASSERT.
749
[
750
  AC_MSG_CHECKING([whether to enable assertions])
751
  AC_ARG_ENABLE([assert],
752
    [  --disable-assert        turn off assertions],
753
    [AC_MSG_RESULT([no])
754
     AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])],
755
    [AC_MSG_RESULT(yes)])
224.1.3 by Monty Taylor
Wrapped the define in an ifdef() so that we can still track upstream on
756
]))
224.1.2 by Monty Taylor
Added local define of AC_HEADER_ASSERT.
757
202.1.12 by Monty Taylor
Added --disable-assert compile option.
758
AC_HEADER_ASSERT
759
77.1.68 by Monty Taylor
Turned on -g and optimization for normal builds. -ggdb3 for gcc builds.
760
CFLAGS="${SYMBOLS_CFLAGS} ${CFLAGS}"
761
CXXFLAGS="${SYMBOLS_CXXFLAGS} ${CXXFLAGS}"
762
201.2.4 by Monty Taylor
Re-enabled optimizations for the normal build, and added back the --with-debug option to turn them off.
763
AC_ARG_WITH([debug],
764
    [AS_HELP_STRING([--with-debug],
765
       [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
766
    [with_debug=$withval],
767
    [with_debug=no])
768
if test "$with_debug" = "yes"
769
then
770
  # Medium debug.
771
  CFLAGS="$DEBUG_OPTIMIZE_CC $CFLAGS"
772
  CXXFLAGS="$DEBUG_OPTIMIZE_CXX $CXXFLAGS"
773
else
774
  # Optimized version. No debug
775
  CFLAGS="$OPTIMIZE_CFLAGS $CFLAGS"
776
  CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
777
fi
778
779
1 by brian
clean slate
780
AC_ARG_WITH([fast-mutexes],
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
781
    [AS_HELP_STRING([--with-fast-mutexes],
782
	    [Compile with fast mutexes  @<:@default=off@:>@])],
783
    [with_fast_mutexes=$withval],
784
    [with_fast_mutexes=no])
1 by brian
clean slate
785
786
if test "$with_fast_mutexes" != "no"
787
then
51.3.26 by Jay Pipes
Final removal of DBUG library and cleanup of Makefiles
788
	AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1], 
789
			[Define to 1 if you want to use fast mutexes])
1 by brian
clean slate
790
fi
791
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
792
AC_ARG_WITH([comment],
793
    [AS_HELP_STRING([--with-comment],
794
            [Comment about compilation environment. @<:@default=off@:>@])],
1 by brian
clean slate
795
    [with_comment=$withval],
796
    [with_comment=no])
797
if test "$with_comment" != "no"
798
then
799
  COMPILATION_COMMENT=$with_comment
800
else
801
  COMPILATION_COMMENT="Source distribution"
802
fi
803
AC_SUBST(COMPILATION_COMMENT)
804
77.1.96 by Monty Taylor
Removed skip-external-locking.
805
if expr "$target_os" : "[[Ll]]inux.*" > /dev/null
806
then
807
  TARGET_LINUX="true"
808
  AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
809
else
810
  TARGET_LINUX="false"
811
fi
812
1 by brian
clean slate
813
dnl Checks for typedefs, structures, and compiler characteristics.
814
AC_C_CONST
815
AC_C_INLINE
816
AC_TYPE_OFF_T
817
AC_HEADER_TIME
818
AC_STRUCT_TM
819
MYSQL_NEEDS_MYSYS_NEW
820
# AC_CHECK_SIZEOF return 0 when it does not find the size of a
821
# type. We want a error instead.
822
AC_CHECK_SIZEOF(char, 1)
823
if test "$ac_cv_sizeof_char" -eq 0
824
then
77.1.28 by Monty Taylor
Removed a crapload of files I hate.
825
  AC_MSG_ERROR([No size for char type.])
1 by brian
clean slate
826
fi
827
AC_CHECK_SIZEOF(char*, 4)
828
AC_CHECK_SIZEOF(short, 2)
829
AC_CHECK_SIZEOF(int, 4)
830
if test "$ac_cv_sizeof_int" -eq 0
831
then
832
  AC_MSG_ERROR("No size for int type.")
833
fi
834
AC_CHECK_SIZEOF(long, 4)
835
if test "$ac_cv_sizeof_long" -eq 0
836
then
837
  AC_MSG_ERROR("No size for long type.")
838
fi
839
AC_CHECK_SIZEOF(long long, 8)
840
if test "$ac_cv_sizeof_long_long" -eq 0
841
then
91 by Brian Aker
Main binary now named drizzled
842
  AC_MSG_ERROR("Drizzle needs a long long type.")
1 by brian
clean slate
843
fi
844
# off_t is not a builtin type
845
AC_CHECK_SIZEOF(off_t, 4)
846
if test "$ac_cv_sizeof_off_t" -eq 0
847
then
91 by Brian Aker
Main binary now named drizzled
848
  AC_MSG_ERROR("Drizzle needs a off_t type.")
1 by brian
clean slate
849
fi
850
851
dnl
852
dnl check if time_t is unsigned
853
dnl
854
855
MYSQL_CHECK_TIME_T
856
857
858
# do we need #pragma interface/#pragma implementation ?
859
# yes if it's gcc 2.x, and not icc pretending to be gcc, and not cygwin
860
AC_MSG_CHECKING(the need for @%:@pragma interface/implementation)
861
# instead of trying to match SYSTEM_TYPE and CC_VERSION (that doesn't
862
# follow any standard), we'll use well-defined preprocessor macros:
28.1.33 by Monty Taylor
Added -Wall
863
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
1 by brian
clean slate
864
#if !defined(__CYGWIN__) && !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ < 3)
865
#error USE_PRAGMA_IMPLEMENTATION
866
#endif
28.1.33 by Monty Taylor
Added -Wall
867
]])],[AC_MSG_RESULT(no) ],[AC_MSG_RESULT(yes) ; CXXFLAGS="$CXXFLAGS -DUSE_PRAGMA_IMPLEMENTATION"])
1 by brian
clean slate
868
869
# This always gives a warning. Ignore it unless you are cross compiling
870
AC_C_BIGENDIAN
871
#---START: Used in for client configure
872
# Check base type of last arg to accept
873
MYSQL_TYPE_ACCEPT
874
#---END:
875
# Figure out what type of struct rlimit to use with setrlimit
876
MYSQL_TYPE_STRUCT_RLIMIT
877
# Find where the stack goes
878
MYSQL_STACK_DIRECTION
879
# We want to skip alloca on irix unconditionally. It may work on some version..
880
MYSQL_FUNC_ALLOCA
881
# Do struct timespec have members tv_sec or ts_sec
882
MYSQL_TIMESPEC_TS
883
# Do we have the tzname variable
884
MYSQL_TZNAME
885
# Do the c++ compiler have a bool type
886
MYSQL_CXX_BOOL
887
AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
888
AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
889
AC_CHECK_TYPES([u_int32_t])
890
891
MYSQL_PTHREAD_YIELD
892
893
######################################################################
894
# For readline/libedit (We simply move the mimimum amount of stuff from
895
# the readline/libedit configure.in here)
896
897
dnl Checks for header files.
898
AC_CHECK_HEADERS(malloc.h sys/cdefs.h)
899
900
dnl Checks for library functions.
901
AC_FUNC_ALLOCA
902
AC_PROG_GCC_TRADITIONAL
903
AC_TYPE_SIGNAL
904
AC_CHECK_FUNCS(re_comp regcomp strdup)
905
906
dnl Sun compilers have their own vis.h that is about something
907
dnl totally different. So, not to change the libedit source, we
908
dnl do some additional checks before we define HAVE_VIS_H.
909
AC_CHECK_HEADER(vis.h,
910
  [AC_CHECK_FUNC(strvis,
911
    [AC_DEFINE([HAVE_VIS_H], [1],[Found vis.h and the strvis() function])])])
912
913
AC_CHECK_FUNCS(strlcat strlcpy)
914
AC_CHECK_FUNCS(issetugid)
915
AC_CHECK_FUNCS(getline flockfile)
916
917
# from old readline settting:
918
919
MAKE_SHELL=/bin/sh
920
AC_SUBST(MAKE_SHELL)
921
922
# Already-done: stdlib.h string.h unistd.h termios.h
923
AC_CHECK_HEADERS(varargs.h stdarg.h dirent.h locale.h ndir.h sys/dir.h \
924
 sys/file.h sys/ndir.h sys/ptem.h sys/pte.h sys/select.h sys/stream.h \
925
 sys/mman.h curses.h termcap.h termio.h termbits.h asm/termbits.h grp.h \
926
paths.h semaphore.h)
927
928
# Already-done: strcasecmp
929
AC_CHECK_FUNCS(lstat putenv select setenv setlocale strcoll tcgetattr)
930
28.1.33 by Monty Taylor
Added -Wall
931
AC_HEADER_STAT
1 by brian
clean slate
932
MYSQL_SIGNAL_CHECK
933
MYSQL_CHECK_GETPW_FUNCS
934
MYSQL_HAVE_TIOCGWINSZ
935
MYSQL_HAVE_FIONREAD
936
MYSQL_HAVE_TIOCSTAT
937
MYSQL_STRUCT_DIRENT_D_INO
938
MYSQL_STRUCT_DIRENT_D_NAMLEN
939
MYSQL_TYPE_SIGHANDLER
940
MYSQL_CHECK_MULTIBYTE
941
if test "$with_named_curses" = "no"
942
then
943
  MYSQL_CHECK_LIB_TERMCAP
944
else
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
945
  TERMCAP_LIBS="$with_named_curses"
1 by brian
clean slate
946
fi
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
947
AC_SUBST(TERMCAP_LIBS)
1 by brian
clean slate
948
949
# Check if the termcap function 'tgoto' is already declared in
950
# system header files or if it need to be declared locally
951
AC_CHECK_DECLS(tgoto,,,[
952
#ifdef HAVE_CURSES_H
953
# include <curses.h>
954
#elif HAVE_NCURSES_H
955
# include <ncurses.h>
956
#endif
957
#ifdef HAVE_TERM_H
958
# include <term.h>
959
#endif
960
])
961
962
# End of readline/libedit stuff
963
#########################################################################
964
965
dnl Checks for library functions.
966
967
#
968
# The following code disables intrinsic function support while we test for
969
# library functions.  This is to avoid configure problems with Intel ecc
970
# compiler
971
972
ORG_CFLAGS="$CFLAGS"
973
if test "$GCC" != "yes"; then
974
  AC_SYS_COMPILER_FLAG(-nolib_inline,nolib_inline,CFLAGS,[],[])
975
fi
976
977
#AC_FUNC_MMAP
978
AC_TYPE_SIGNAL
979
MYSQL_TYPE_QSORT
980
AC_FUNC_UTIME_NULL
981
AC_FUNC_VPRINTF
982
77.1.24 by Monty Taylor
Removed non-fcntl code and made it a fatal configure error if it's not there.
983
AC_CHECK_FUNCS(fcntl)
984
if test "x$ac_cv_func_fcntl" != "xyes"
985
then
986
  AC_MSG_ERROR("Drizzle requires fcntl.")
987
fi
988
212.6.3 by Mats Kindahl
Removing deprecated functions from code and replacing them with C99 equivalents:
989
AC_CHECK_FUNCS(bsearch \
77.1.24 by Monty Taylor
Removed non-fcntl code and made it a fatal configure error if it's not there.
990
  cuserid fchmod \
77.1.22 by Monty Taylor
Removed refs to floatingpoint.h (which we only used for fconvert) and fconvert
991
  fdatasync finite fpresetsticky fpsetmask fsync ftruncate \
1 by brian
clean slate
992
  getcwd getpass getpassphrase getpwnam \
993
  getpwuid getrlimit getrusage getwd index initgroups isnan \
994
  localtime_r gethrtime gmtime_r \
212.6.1 by Mats Kindahl
Replacing all bzero() calls with memset() calls and removing the bzero.c file.
995
  locking longjmp lrand48 madvise mallinfo \
212.6.3 by Mats Kindahl
Removing deprecated functions from code and replacing them with C99 equivalents:
996
  memmove \
1 by brian
clean slate
997
  mkstemp mlockall perror poll pread pthread_attr_create mmap mmap64 getpagesize \
998
  pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
999
  pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
1000
  pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
1001
  pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
1002
  realpath rename rint rwlock_init setupterm \
1003
  shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \
1004
  sighold sigset sigthreadmask port_create sleep \
1005
  snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
6 by Brian Aker
Second pass on pthread cleanup
1006
  strtol strtoll strtoul strtoull tell tempnam vidattr \
1 by brian
clean slate
1007
  posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd)
1008
28.1.33 by Monty Taylor
Added -Wall
1009
# Check that isinf() is available in math.h and can be used in both C and C++
1 by brian
clean slate
1010
# code
28.1.33 by Monty Taylor
Added -Wall
1011
AC_MSG_CHECKING(for isinf in math.h)
1012
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[
1013
    float f = 0.0; 
1014
    int r = isinf(f); 
1015
    return r;
1016
  ]])],[
1 by brian
clean slate
1017
    AC_MSG_RESULT(yes)
28.1.33 by Monty Taylor
Added -Wall
1018
    AC_MSG_CHECKING(whether isinf() can be used in C++ code)
1019
    AC_LANG_PUSH([C++])
1020
    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[
1021
      float f = 0.0;
1022
      int r = isinf(f);
1023
      return r;
1024
    ]])],[
1025
      AC_MSG_RESULT(yes)
1026
      AC_DEFINE(HAVE_ISINF, [1], [isinf() macro or function])
1027
    ],[
1028
      AC_MSG_RESULT(no)
1029
    ])
1030
    AC_LANG_POP([])
1031
  ],[
1032
  AC_MSG_RESULT(no)])
1033
1034
1 by brian
clean slate
1035
CFLAGS="$ORG_CFLAGS"
1036
1037
# Sanity check: We chould not have any fseeko symbol unless
1038
# large_file_support=yes
1039
AC_CHECK_FUNC(fseeko,
1040
[if test "$large_file_support" = no -a "$TARGET_LINUX" = "true";
1041
then
1042
  AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!")
1043
fi]
1044
)
1045
1046
# Check definition of pthread_getspecific
1047
AC_CACHE_CHECK("args to pthread_getspecific", mysql_cv_getspecific_args,
28.1.33 by Monty Taylor
Added -Wall
1048
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if !defined(_REENTRANT)
1 by brian
clean slate
1049
#define _REENTRANT
1050
#endif
1051
#define _POSIX_PTHREAD_SEMANTICS 
28.1.33 by Monty Taylor
Added -Wall
1052
#include <pthread.h> ]], [[ void *pthread_getspecific(pthread_key_t key);
1053
pthread_getspecific((pthread_key_t) NULL); ]])],[mysql_cv_getspecific_args=POSIX],[mysql_cv_getspecific_args=other]))
1 by brian
clean slate
1054
  if test "$mysql_cv_getspecific_args" = "other"
1055
  then
1056
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1],
1057
              [For some non posix threads])
1058
  fi
1059
1060
  # Check definition of pthread_mutex_init
1061
  AC_CACHE_CHECK("args to pthread_mutex_init", mysql_cv_mutex_init_args,
28.1.33 by Monty Taylor
Added -Wall
1062
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1 by brian
clean slate
1063
#define _POSIX_PTHREAD_SEMANTICS 
28.1.33 by Monty Taylor
Added -Wall
1064
#include <pthread.h> ]], [[ 
1 by brian
clean slate
1065
  pthread_mutexattr_t attr;
1066
  pthread_mutex_t mp;
28.1.33 by Monty Taylor
Added -Wall
1067
  pthread_mutex_init(&mp,&attr); ]])],[mysql_cv_mutex_init_args=POSIX],[mysql_cv_mutex_init_args=other]))
1 by brian
clean slate
1068
  if test "$mysql_cv_mutex_init_args" = "other"
1069
  then
1070
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1],
1071
              [For some non posix threads])
1072
  fi
1073
#---END:
1074
1075
#---START: Used in for client configure
1076
# Check definition of readdir_r
1077
AC_CACHE_CHECK("args to readdir_r", mysql_cv_readdir_r,
28.1.33 by Monty Taylor
Added -Wall
1078
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1 by brian
clean slate
1079
#define _POSIX_PTHREAD_SEMANTICS 
1080
#include <pthread.h>
28.1.33 by Monty Taylor
Added -Wall
1081
#include <dirent.h>]], [[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
1082
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])],[mysql_cv_readdir_r=POSIX],[mysql_cv_readdir_r=other]))
1 by brian
clean slate
1083
if test "$mysql_cv_readdir_r" = "POSIX"
1084
then
1085
  AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r])
1086
fi
1087
1088
# Check definition of posix sigwait()
1089
AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait,
28.1.33 by Monty Taylor
Added -Wall
1090
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1 by brian
clean slate
1091
#define _POSIX_PTHREAD_SEMANTICS 
1092
#include <pthread.h>
28.1.33 by Monty Taylor
Added -Wall
1093
#include <signal.h>]], [[#ifndef _AIX
1 by brian
clean slate
1094
sigset_t set;
1095
int sig;
1096
sigwait(&set,&sig);
28.1.33 by Monty Taylor
Added -Wall
1097
#endif]])],[mysql_cv_sigwait=POSIX],[mysql_cv_sigwait=other]))
1 by brian
clean slate
1098
if test "$mysql_cv_sigwait" = "POSIX"
1099
then
1100
  AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait])
1101
fi
1102
1103
if test "$mysql_cv_sigwait" != "POSIX"
1104
then
1105
unset mysql_cv_sigwait
1106
# Check definition of posix sigwait()
1107
AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait,
28.1.33 by Monty Taylor
Added -Wall
1108
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1 by brian
clean slate
1109
#define _POSIX_PTHREAD_SEMANTICS 
1110
#include <pthread.h>
28.1.33 by Monty Taylor
Added -Wall
1111
#include <signal.h>]], [[sigset_t set;
1 by brian
clean slate
1112
int sig;
28.1.33 by Monty Taylor
Added -Wall
1113
sigwait(&set);]])],[mysql_cv_sigwait=NONPOSIX],[mysql_cv_sigwait=other]))
1 by brian
clean slate
1114
if test "$mysql_cv_sigwait" = "NONPOSIX"
1115
then
1116
  AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument])
1117
fi
1118
fi
1119
#---END:
1120
1121
# Check if pthread_attr_setscope() exists
1122
AC_CACHE_CHECK("for pthread_attr_setscope", mysql_cv_pthread_attr_setscope,
28.1.33 by Monty Taylor
Added -Wall
1123
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1 by brian
clean slate
1124
#define _POSIX_PTHREAD_SEMANTICS 
28.1.33 by Monty Taylor
Added -Wall
1125
#include <pthread.h>]], [[pthread_attr_t thr_attr;
1126
pthread_attr_setscope(&thr_attr,0);]])],[mysql_cv_pthread_attr_setscope=yes],[mysql_cv_pthread_attr_setscope=no]))
1 by brian
clean slate
1127
if test "$mysql_cv_pthread_attr_setscope" = "yes"
1128
then
1129
  AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope])
1130
fi
1131
1132
# Check for bad includes
1133
AC_MSG_CHECKING("can netinet files be included")
28.1.33 by Monty Taylor
Added -Wall
1134
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
1 by brian
clean slate
1135
#include <sys/socket.h>
1136
#include <netinet/in_systm.h>
1137
#include <netinet/in.h>
1138
#include <netinet/ip.h>
28.1.33 by Monty Taylor
Added -Wall
1139
#include <netinet/tcp.h>]], [[ printf("1\n"); ]])],[netinet_inc=yes],[netinet_inc=no])
1 by brian
clean slate
1140
if test "$netinet_inc" = "no"
1141
then
1142
  AC_DEFINE([HAVE_BROKEN_NETINET_INCLUDES], [1], [Can netinet be included])
1143
fi
1144
AC_MSG_RESULT("$netinet_inc")
1145
28.1.33 by Monty Taylor
Added -Wall
1146
AC_LANG_PUSH([C++])
1 by brian
clean slate
1147
AC_CHECK_HEADERS(cxxabi.h)
1148
AC_CACHE_CHECK([checking for abi::__cxa_demangle], mysql_cv_cxa_demangle,
28.1.33 by Monty Taylor
Added -Wall
1149
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cxxabi.h>]], [[
1 by brian
clean slate
1150
  char *foo= 0; int bar= 0;
1151
  foo= abi::__cxa_demangle(foo, foo, 0, &bar);
28.1.33 by Monty Taylor
Added -Wall
1152
]])],[mysql_cv_cxa_demangle=yes],[mysql_cv_cxa_demangle=no])])
1153
AC_LANG_POP([])
1 by brian
clean slate
1154
1155
if test "x$mysql_cv_cxa_demangle" = xyes; then
1156
  AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1,
1157
            [Define to 1 if you have the `abi::__cxa_demangle' function.])
1158
fi
1159
1160
#--------------------------------------------------------------------
1161
# Check for requested features
1162
#--------------------------------------------------------------------
1163
1164
MYSQL_CHECK_BIG_TABLES
1165
MYSQL_CHECK_MAX_INDEXES
1166
MYSQL_CHECK_VIO
1167
1168
#--------------------------------------------------------------------
1169
# Declare our plugin modules
1170
# Has to be done late, as the plugin may need to check for existence of
1171
# functions tested above
1172
#--------------------------------------------------------------------
1173
1174
MYSQL_CONFIGURE_PLUGINS([none])
1175
1176
AC_SUBST(mysql_plugin_dirs)
1177
AC_SUBST(mysql_plugin_libs)
1178
AC_SUBST(mysql_plugin_defs)
1179
189 by Brian Aker
Refactor of configure.ac. Added profile. One note... I believe this should
1180
AC_ARG_ENABLE([profiling],
1181
    [AS_HELP_STRING([--enable-profiling],
1182
       [Toggle profiling @<:@default=off@:>@])],
1183
    [ac_profiling="$enableval"],
1184
    [ac_profiling="no"])
1185
1186
AC_ARG_ENABLE([coverage],
1187
    [AS_HELP_STRING([--enable-coverage],
1188
       [Toggle coverage @<:@default=off@:>@])],
1189
    [ac_coverage="$enableval"],
1190
    [ac_coverage="no"])
1191
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1192
AC_ARG_ENABLE([pedantic-warnings],
1193
    [AS_HELP_STRING([--disable-pedantic-warnings],
1194
       [Toggle pedanticness @<:@default=on@:>@])],
1195
    [ac_warn_pedantic="$enableval"],
1196
    [ac_warn_pedantic="yes"])
1197
1198
AC_ARG_ENABLE([fail],
77.1.112 by Monty Taylor
Fixed comment on --enable-fail -> --disable-fail.
1199
    [AS_HELP_STRING([--disable-fail],
1200
       [Turn warnings into failures @<:@default=on@:>@])],
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1201
    [ac_warn_fail="$enableval"],
77.1.108 by Monty Taylor
Turn on -Werror again by default.
1202
    [ac_warn_fail="yes"])
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1203
53.2.6 by Monty Taylor
Turned unreachable code warnings into a configure option.
1204
AC_ARG_ENABLE([unreachable],
1205
    [AS_HELP_STRING([--enable-unreachable],
1206
       [Enable warnings about unreachable code @<:@default=off@:>@])],
1207
    [ac_warn_unreachable="$enableval"],
1208
    [ac_warn_unreachable="no"])
1209
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1210
AC_ARG_ENABLE([longlong-warnings],
1211
    [AS_HELP_STRING([--enable-longlong-warnings],
1212
       [Enable warnings about longlong in C++ @<:@default=off@:>@])],
1213
    [ac_warn_longlong="$enableval"],
1214
    [ac_warn_longlong="no"])
1215
1216
AC_ARG_ENABLE([strict-aliasing],
1217
    [AS_HELP_STRING([--enable-strict-aliasing],
1218
       [Enable warnings about stict-aliasing @<:@default=off@:>@])],
1219
    [ac_warn_strict_aliasing="$enableval"],
1220
    [ac_warn_strict_aliasing="no"])
1221
53.2.2 by Monty Taylor
Updated everything that needs updating to compile with -std=gnu99 -pedantic
1222
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1223
if test "$GCC" = "yes"
1224
then
53.2.2 by Monty Taylor
Updated everything that needs updating to compile with -std=gnu99 -pedantic
1225
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1226
  if test "$ac_warn_longlong" = "yes"
1227
  then
1228
    W_LONGLONG="-Wlong-long"
1229
  else
1230
    W_LONGLONG="-Wno-long-long"
1231
  fi
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1232
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1233
  if test "$ac_warn_strict_aliasing" = "yes"
1234
  then
1235
    W_STRICT_ALIASING="-Wstrict-aliasing"
1236
  else
77.1.110 by Monty Taylor
Fixed a typo.
1237
    W_STRICT_ALIASING="-Wno-strict-aliasing"
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1238
  fi
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1239
189 by Brian Aker
Refactor of configure.ac. Added profile. One note... I believe this should
1240
  if test "$ac_profiling" = "yes"
1241
  then
1242
    GPROF_PROFILING="-pg"
1243
  else
1244
    GPROF_PROFILING=" "
1245
  fi
1246
1247
  if test "$ac_coverage" = "yes"
1248
  then
1249
    GPROF_COVERAGE="-fprofile-arcs -ftest-coverage"
1250
  else
1251
    GPROF_COVERAGE=" "
1252
  fi
1253
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1254
  if test "$ac_warn_pedantic" = "yes"
1255
  then
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1256
    GCC_PEDANTIC="-pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls ${W_STRICT_ALIASING}"
1257
    GXX_PEDANTIC="-pedantic -Wundef -Wredundant-decls ${W_LONGLONG} ${W_STRICT_ALIASING}"
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1258
  fi
1259
53.2.6 by Monty Taylor
Turned unreachable code warnings into a configure option.
1260
  if test "$ac_warn_unreachable" = "yes"
1261
  then
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1262
    W_UNREACHABLE="-Wunreachable-code"
53.2.6 by Monty Taylor
Turned unreachable code warnings into a configure option.
1263
  fi
1264
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1265
  if test "$ac_warn_fail" = "yes"
1266
  then
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1267
    W_FAIL="-Werror"
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1268
  fi
1269
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1270
  BASE_WARNINGS="-W -Wall -Wextra"
236.1.2 by Monty Taylor
Changed the way we work around autoconf2.59
1271
  GCC_WARNINGS="${C99_SUPPORT_HACK} ${BASE_WARNINGS} ${GCC_PEDANTIC} ${W_UNREACHABLE} ${W_FAIL} ${GPROF_PROFILING} ${GPROF_COVERAGE}"
230.3.1 by Monty Taylor
Bug 252805: ./configure not detecting missing g++
1272
  GXX_WARNINGS="${BASE_WARNINGS} ${GXX_PEDANTIC} ${W_UNREACHABLE} ${W_FAIL} ${GPROF_PROFILING} ${GPROF_COVERAGE}"
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1273
1274
  CXXFLAGS="$CXXFLAGS ${GXX_WARNINGS}"
1275
  CFLAGS="$CFLAGS ${GCC_WARNINGS} "
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1276
fi
1277
212.1.6 by Monty Taylor
Added ${top_srcdir} to GLOBAL_INCLUDES.
1278
AC_SUBST([GLOBAL_CPPFLAGS],['-I$(top_srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include'])
202.1.23 by Monty Taylor
Moved the includes we use everywhere to to GLOBAL_CPPFLAGS and added AM_CPPFLAGS to an AC_SUBST, so that we could take out the redundant declaration from most fof the Makefiles.
1279
AC_SUBST([AM_CPPFLAGS],['${GLOBAL_CPPFLAGS}'])
1280
1 by brian
clean slate
1281
# Some usefull subst
1282
AC_SUBST(CC)
1283
AC_SUBST(GXX)
1284
1285
# Set configuration options for make_binary_distribution
1286
case $SYSTEM_TYPE in
1287
  *netware*)
1288
    MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --no-strip"
1289
    ;;
1290
  *)
1291
    : # no change for other platforms yet
1292
    ;;
1293
esac
1294
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
1295
28.1.2 by Monty Taylor
First stab at back porting libtool convenience lib patch from telco-6.2
1296
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile mysys/tests/Makefile dnl
212.5.4 by Monty Taylor
Renamed strings to mystrings, for include/lib naming consistency.
1297
 mystrings/Makefile mystrings/tests/Makefile storage/Makefile dnl
13 by brian
Incomming patch to clean up build.
1298
 vio/Makefile dnl
77.1.38 by Monty Taylor
Renamed more stuff to drizzle.
1299
 libdrizzle/Makefile client/Makefile dnl
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
1300
 drizzled/Makefile dnl
1301
 drizzled/field/Makefile dnl
1302
 drizzled/share/Makefile dnl
1303
 drizzled/sql_builtin.cc dnl
51.3.26 by Jay Pipes
Final removal of DBUG library and cleanup of Makefiles
1304
 include/Makefile dnl
28.1.31 by Monty Taylor
Deleted tons of pointless garbage from scripts.
1305
 support-files/Makefile dnl
77.1.47 by Monty Taylor
Moved test to tests...
1306
 tests/Makefile tests/install_test_db dnl
212.5.36 by Monty Taylor
Moved drizzle_version.
1307
 drizzled/version.h plugin/Makefile dnl
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
1308
 drizzled/drizzled_safe support-files/libdrizzle.pc dnl
77.1.38 by Monty Taylor
Renamed more stuff to drizzle.
1309
 support-files/drizzle.server support-files/drizzle-log-rotate)
1 by brian
clean slate
1310
1311
AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
1312
1313
# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
1314
AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS'")
1315
1316
AC_OUTPUT