~stewart/drizzle/embedded-innodb-create-select-transaction-arrgh

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl -*- ksh -*-
 
2
dnl Process this file with autoconf to produce a configure script.
 
3
 
 
4
AC_PREREQ(2.52)dnl              Minimum Autoconf version required.
 
5
 
 
6
AC_INIT(sql/mysqld.cc)
 
7
AC_CANONICAL_SYSTEM
 
8
# The Docs Makefile.am parses this line!
 
9
# remember to also update version.c in ndb
 
10
# When changing major version number please also check switch statement
 
11
# in mysqlbinlog::check_master_version().
 
12
AM_INIT_AUTOMAKE(mysql, 6.0.6-alpha)
 
13
AM_CONFIG_HEADER([include/config.h:config.h.in])
 
14
 
 
15
PROTOCOL_VERSION=10
 
16
DOT_FRM_VERSION=6
 
17
# See the libtool docs for information on how to do shared lib versions.
 
18
SHARED_LIB_MAJOR_VERSION=16
 
19
SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0
 
20
 
 
21
 
 
22
 
 
23
# Set all version vars based on $VERSION. How do we do this more elegant ?
 
24
# Remember that regexps needs to quote [ and ] since this is run through m4
 
25
# We take some made up examples
 
26
#
 
27
#  VERSION                  5.1.40sp1-alpha     5.0.34a
 
28
#  MYSQL_NO_DASH_VERSION    5.1.40sp1           5.0.34a
 
29
#  MYSQL_NUMERIC_VERSION    5.1.40              5.0.34
 
30
#  MYSQL_BASE_VERSION       5.1                 5.0
 
31
#  MYSQL_VERSION_ID         50140               50034
 
32
#
 
33
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
 
34
MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
 
35
MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
 
36
MYSQL_VERSION_ID=`echo $MYSQL_NUMERIC_VERSION | \
 
37
    awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'`
 
38
 
 
39
# Add previous major version for debian package upgrade path
 
40
MYSQL_PREVIOUS_BASE_VERSION=5.1
 
41
 
 
42
# The port should be constant for a LONG time
 
43
MYSQL_TCP_PORT_DEFAULT=3306
 
44
MYSQL_UNIX_ADDR_DEFAULT="/tmp/mysql.sock"
 
45
 
 
46
dnl Include m4 
 
47
sinclude(config/ac-macros/alloca.m4)
 
48
sinclude(config/ac-macros/check_cpu.m4)
 
49
sinclude(config/ac-macros/character_sets.m4)
 
50
sinclude(config/ac-macros/compiler_flag.m4)
 
51
sinclude(config/ac-macros/dtrace.m4)
 
52
sinclude(config/ac-macros/plugins.m4)
 
53
sinclude(config/ac-macros/large_file.m4)
 
54
sinclude(config/ac-macros/misc.m4)
 
55
sinclude(config/ac-macros/readline.m4)
 
56
sinclude(config/ac-macros/ssl.m4)
 
57
 
 
58
# Remember to add a directory sql/share/LANGUAGE
 
59
AVAILABLE_LANGUAGES="\
 
60
czech danish dutch english estonian french german greek hungarian \
 
61
italian japanese korean norwegian norwegian-ny polish portuguese \
 
62
romanian russian serbian slovak spanish swedish ukrainian"
 
63
 
 
64
#####
 
65
#####
 
66
 
 
67
AC_SUBST(MYSQL_NO_DASH_VERSION)
 
68
AC_SUBST(MYSQL_BASE_VERSION)
 
69
AC_SUBST(MYSQL_VERSION_ID)
 
70
AC_SUBST(MYSQL_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)
 
80
 
 
81
 
 
82
# Canonicalize the configuration name.
 
83
 
 
84
# Check whether --with-system-type or --without-system-type was given.
 
85
AC_ARG_WITH(system-type,
 
86
    [  --with-system-type      Set the system type, like "sun-solaris10"],
 
87
    [SYSTEM_TYPE="$withval"],
 
88
    [SYSTEM_TYPE="$host_vendor-$host_os"])
 
89
AC_ARG_WITH(machine-type,
 
90
    [  --with-machine-type     Set the machine type, like "powerpc"],
 
91
    [MACHINE_TYPE="$withval"],
 
92
    [MACHINE_TYPE="$host_cpu"])
 
93
AC_SUBST(SYSTEM_TYPE)
 
94
AC_DEFINE_UNQUOTED([SYSTEM_TYPE], ["$SYSTEM_TYPE"],
 
95
                   [Name of system, eg sun-solaris])
 
96
AC_SUBST(MACHINE_TYPE)
 
97
AC_DEFINE_UNQUOTED([MACHINE_TYPE], ["$MACHINE_TYPE"],
 
98
                   [Machine type name, eg sparc])
 
99
 
 
100
# Detect intel x86 like processor
 
101
BASE_MACHINE_TYPE=$MACHINE_TYPE
 
102
case $MACHINE_TYPE in
 
103
  i?86) BASE_MACHINE_TYPE=i386 ;;
 
104
esac
 
105
 
 
106
# Save some variables and the command line options for mysqlbug
 
107
SAVE_CC="$CC"
 
108
SAVE_CXX="$CXX"
 
109
SAVE_ASFLAGS="$ASFLAGS"
 
110
SAVE_CFLAGS="$CFLAGS"
 
111
SAVE_CXXFLAGS="$CXXFLAGS"
 
112
SAVE_LDFLAGS="$LDFLAGS"
 
113
SAVE_CXXLDFLAGS="$CXXLDFLAGS"
 
114
CONF_COMMAND="$0 $ac_configure_args"
 
115
AC_SUBST(CONF_COMMAND)
 
116
AC_SUBST(SAVE_CC)
 
117
AC_SUBST(SAVE_CXX)
 
118
AC_SUBST(SAVE_ASFLAGS)
 
119
AC_SUBST(SAVE_CFLAGS)
 
120
AC_SUBST(SAVE_CXXFLAGS)
 
121
AC_SUBST(SAVE_LDFLAGS)
 
122
AC_SUBST(SAVE_CXXLDFLAGS)
 
123
AC_SUBST(CXXLDFLAGS)
 
124
 
 
125
#AC_ARG_PROGRAM                 # Automaticly invoked by AM_INIT_AUTOMAKE
 
126
 
 
127
AM_SANITY_CHECK
 
128
# This is needed is SUBDIRS is set
 
129
AC_PROG_MAKE_SET
 
130
 
 
131
##############################################################################
 
132
# The below section needs to be done before AC_PROG_CC
 
133
##############################################################################
 
134
 
 
135
if test "x${CFLAGS-}" = x ; then
 
136
  cflags_is_set=no
 
137
else
 
138
  cflags_is_set=yes
 
139
fi
 
140
 
 
141
if test "x${CPPFLAGS-}" = x ; then
 
142
  cppflags_is_set=no
 
143
else
 
144
  cppflags_is_set=yes
 
145
fi
 
146
 
 
147
if test "x${LDFLAGS-}" = x ; then
 
148
  ldflags_is_set=no
 
149
else
 
150
  ldflags_is_set=yes
 
151
fi
 
152
 
 
153
################ End of section to be done before AC_PROG_CC #################
 
154
 
 
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 "
 
161
 
 
162
dnl Checks for programs.
 
163
AC_PROG_AWK
 
164
AC_PROG_CC
 
165
AC_PROG_CXX
 
166
AC_PROG_CPP
 
167
AM_PROG_CC_C_O
 
168
 
 
169
# Print version of CC and CXX compiler (if they support --version)
 
170
case $SYSTEM_TYPE in
 
171
  *netware*)
 
172
CC_VERSION=`$CC -version | grep -i version`
 
173
    ;;
 
174
  *)
 
175
CC_VERSION=`$CC --version | sed 1q`
 
176
    ;;
 
177
esac
 
178
if test $? -eq "0"
 
179
then
 
180
  AC_MSG_CHECKING("C Compiler version")
 
181
  AC_MSG_RESULT("$CC $CC_VERSION")
 
182
else
 
183
CC_VERSION=""
 
184
fi
 
185
AC_SUBST(CC_VERSION)
 
186
MYSQL_CHECK_CXX_VERSION
 
187
 
 
188
if test "$ac_cv_prog_gcc" = "yes"
 
189
then
 
190
  AS="$CC -c"
 
191
  AC_SUBST(AS)
 
192
else
 
193
  AC_PATH_PROG(AS, as, as)
 
194
fi
 
195
 
 
196
# Still need ranlib for readline; local static use only so no libtool.
 
197
AC_PROG_RANLIB
 
198
# We use libtool
 
199
#AC_LIBTOOL_WIN32_DLL
 
200
AC_PROG_LIBTOOL
 
201
 
 
202
# Ensure that we have --preserve-dup-deps defines, otherwise we get link
 
203
# problems of 'mysql' with CXX=g++
 
204
LIBTOOL="$LIBTOOL --preserve-dup-deps"
 
205
AC_SUBST(LIBTOOL)dnl
 
206
 
 
207
AC_SUBST(NM)dnl
 
208
 
 
209
# NM= "$NM -X64"
 
210
#archive_expsym_cmds= `echo "$archive_expsym_cmds" | sed -e '/"$(CC)"//'`
 
211
#archive_expsym_cmds= "$CC -q64 $archive_expsym_cmds"
 
212
#  CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-ansi//; s/-pedantic//; s/-Wcheck//'`
 
213
 
 
214
#AC_LIBTOOL_DLOPEN AC_LIBTOOL_WIN32_DLL AC_DISABLE_FAST_INSTALL AC_DISABLE_SHARED AC_DISABLE_STATIC
 
215
 
 
216
# AC_PROG_INSTALL
 
217
AC_PROG_INSTALL
 
218
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 
219
 
 
220
# Not critical since the generated file is distributed
 
221
AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL'])
 
222
 
 
223
#check the return type of sprintf
 
224
AC_MSG_CHECKING("return type of sprintf")
 
225
AC_TRY_RUN([
 
226
  int main()
 
227
    {
 
228
      char* s = "hello";
 
229
      char buf[6];
 
230
      if((int)sprintf(buf, s) == strlen(s))
 
231
        return 0;
 
232
      
 
233
      return -1;
 
234
     }
 
235
   ],
 
236
   [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf])
 
237
   AC_MSG_RESULT("int")],
 
238
   [AC_TRY_RUN([
 
239
 int main()
 
240
   {
 
241
     char* s = "hello";
 
242
     char buf[6];
 
243
     if((char*)sprintf(buf,s) == buf + strlen(s))
 
244
       return 0;
 
245
     return -1;
 
246
   }           ],
 
247
               [AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf])
 
248
                AC_MSG_RESULT("ptr")],
 
249
               [AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf])
 
250
                AC_MSG_RESULT("garbage")]
 
251
   )],
 
252
   # Cross compile, assume POSIX
 
253
   [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf])
 
254
    AC_MSG_RESULT("int (we assume)")]
 
255
)
 
256
 
 
257
AC_PATH_PROG(uname_prog, uname, no)
 
258
 
 
259
# We should go through this and put all the explictly system dependent
 
260
# stuff in one place
 
261
AC_MSG_CHECKING(operating system)
 
262
AC_CACHE_VAL(mysql_cv_sys_os,
 
263
[
 
264
if test "$uname_prog" != "no"; then
 
265
  mysql_cv_sys_os="`uname`"
 
266
else
 
267
  mysql_cv_sys_os="Not Solaris"
 
268
fi
 
269
])
 
270
AC_MSG_RESULT($mysql_cv_sys_os)
 
271
 
 
272
# This should be rewritten to use $target_os
 
273
case "$target_os" in
 
274
  *solaris*)
 
275
    TARGET_SOLARIS="true"
 
276
    AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
 
277
    AC_SUBST(TARGET_SOLARIS)
 
278
  ;;
 
279
esac
 
280
 
 
281
# The following is required for portable results of floating point calculations
 
282
# on PowerPC. The same must also be done for IA-64, but this options is missing
 
283
# in the IA-64 gcc backend.
 
284
 
 
285
if test "$GCC" = "yes"
 
286
then
 
287
  case "$host_cpu" in
 
288
    *ppc* | *powerpc*)
 
289
      CFLAGS="$CFLAGS -mno-fused-madd"
 
290
      CXXFLAGS="$CXXFLAGS -mno-fused-madd"
 
291
    ;;
 
292
  esac
 
293
fi
 
294
 
 
295
AC_SUBST(CC)
 
296
AC_SUBST(CFLAGS)
 
297
AC_SUBST(CXX)
 
298
AC_SUBST(CXXFLAGS)
 
299
AC_SUBST(ASFLAGS)
 
300
AC_SUBST(LD)
 
301
AC_SUBST(INSTALL_SCRIPT)
 
302
 
 
303
export CC CXX CFLAGS LD LDFLAGS AR ARFLAGS
 
304
 
 
305
if test "$GCC" = "yes"
 
306
then
 
307
  # mysqld requires -fno-implicit-templates.
 
308
  # Disable exceptions as they seams to create problems with gcc and threads.
 
309
  # mysqld doesn't use run-time-type-checking, so we disable it.
 
310
  # We should use -Wno-invalid-offsetof flag to disable some warnings from gcc
 
311
  # regarding offset() usage in C++ which are done in a safe manner in the
 
312
  # server
 
313
  CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"
 
314
  AC_DEFINE([HAVE_EXPLICIT_TEMPLATE_INSTANTIATION],
 
315
    [1], [Defined by configure. Use explicit template instantiation.])
 
316
fi
 
317
 
 
318
MYSQL_PROG_AR
 
319
 
 
320
# libmysqlclient versioning when linked with GNU ld.
 
321
if $LD --version 2>/dev/null|grep -q GNU; then
 
322
  LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/libmysql/libmysql.ver"
 
323
  AC_CONFIG_FILES(libmysql/libmysql.ver)
 
324
fi
 
325
AC_SUBST(LD_VERSION_SCRIPT)
 
326
 
 
327
 
 
328
# Avoid bug in fcntl on some versions of linux
 
329
AC_MSG_CHECKING([if we should use 'skip-external-locking' as default for $target_os])
 
330
# Any variation of Linux
 
331
if expr "$target_os" : "[[Ll]]inux.*" > /dev/null
 
332
then
 
333
  MYSQLD_DEFAULT_SWITCHES="--skip-external-locking"
 
334
  TARGET_LINUX="true"
 
335
  AC_MSG_RESULT([yes])
 
336
  AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
 
337
else
 
338
  MYSQLD_DEFAULT_SWITCHES=""
 
339
  TARGET_LINUX="false"
 
340
  AC_MSG_RESULT([no])
 
341
fi
 
342
AC_SUBST(MYSQLD_DEFAULT_SWITCHES)
 
343
AC_SUBST(TARGET_LINUX)
 
344
 
 
345
dnl Find paths to some shell programs
 
346
AC_PATH_PROG(LN, ln, ln)
 
347
# This must be able to take a -f flag like normal unix ln.
 
348
AC_PATH_PROG(LN_CP_F, ln, ln)
 
349
 
 
350
AC_PATH_PROG(MV, mv, mv)
 
351
AC_PATH_PROG(RM, rm, rm)
 
352
AC_PATH_PROG(CP, cp, cp)
 
353
AC_PATH_PROG(SED, sed, sed)
 
354
AC_PATH_PROG(CMP, cmp, cmp)
 
355
AC_PATH_PROG(CHMOD, chmod, chmod)
 
356
AC_PATH_PROG(HOSTNAME, hostname, hostname)
 
357
# Check for a GNU tar named 'gtar', or 'gnutar' (MacOS X) and
 
358
# fall back to 'tar' otherwise and hope that it's a GNU tar as well
 
359
AC_CHECK_PROGS(TAR, gnutar gtar tar)
 
360
 
 
361
dnl We use a path for perl so the script startup works
 
362
dnl We make sure to use perl, not perl5, in hopes that the RPMs will
 
363
dnl not depend on the perl5 binary being installed (probably a bug in RPM)
 
364
AC_PATH_PROG(PERL, perl, no)
 
365
if test "$PERL" != "no" && $PERL -e 'require 5' > /dev/null 2>&1
 
366
then
 
367
  PERL5=$PERL
 
368
else
 
369
  AC_PATH_PROG(PERL5, perl5, no)
 
370
  if test "$PERL5" != no
 
371
  then
 
372
    PERL=$PERL5
 
373
    ac_cv_path_PERL=$ac_cv_path_PERL5
 
374
  fi
 
375
fi
 
376
 
 
377
AC_SUBST(HOSTNAME)
 
378
AC_SUBST(PERL)
 
379
AC_SUBST(PERL5)
 
380
 
 
381
# icheck, used for ABI check
 
382
AC_PATH_PROG(ICHECK, icheck, no)
 
383
# "icheck" is also the name of a file system check program on Tru64.
 
384
# Verify the program found is really the interface checker.
 
385
if test "x$ICHECK" != "xno"
 
386
then
 
387
  AC_MSG_CHECKING(if $ICHECK works as expected)
 
388
  echo "int foo;" > conftest.h
 
389
  $ICHECK --canonify -o conftest.ic conftest.h 2>/dev/null
 
390
  if test -f "conftest.ic"
 
391
  then
 
392
    AC_MSG_RESULT(yes)
 
393
  else
 
394
    AC_MSG_RESULT(no)
 
395
    ICHECK=no
 
396
  fi
 
397
  rm -f conftest.ic conftest.h
 
398
fi
 
399
AC_SUBST(ICHECK)
 
400
 
 
401
# Lock for PS
 
402
AC_PATH_PROG(PS, ps, ps)
 
403
AC_MSG_CHECKING("how to check if pid exists")
 
404
PS=$ac_cv_path_PS
 
405
# Linux style
 
406
if $PS p $$ 2> /dev/null | grep `echo $0 | sed s/\-//` > /dev/null
 
407
then
 
408
  FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
 
409
# Solaris
 
410
elif $PS -fp $$ 2> /dev/null | grep $0 > /dev/null
 
411
then
 
412
  FIND_PROC="$PS -p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
 
413
# BSD style
 
414
elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
 
415
then
 
416
  FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
 
417
# SysV style
 
418
elif $PS -ef 2> /dev/null | grep $0 > /dev/null
 
419
then
 
420
  FIND_PROC="$PS -ef | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
 
421
# Do anybody use this?
 
422
elif $PS $$ 2> /dev/null | grep $0 > /dev/null
 
423
then
 
424
  FIND_PROC="$PS \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
 
425
else
 
426
  case $SYSTEM_TYPE in
 
427
    *freebsd*|*dragonfly*)
 
428
      FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
 
429
      ;;
 
430
    *darwin*)
 
431
      FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
 
432
      ;;
 
433
    *)
 
434
      AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
 
435
  esac
 
436
fi
 
437
AC_SUBST(FIND_PROC)
 
438
AC_MSG_RESULT("$FIND_PROC")
 
439
 
 
440
# Check if a pid is valid
 
441
AC_PATH_PROG(KILL, kill, kill)
 
442
AC_MSG_CHECKING("for kill switches")
 
443
if $ac_cv_path_KILL -0 $$
 
444
then
 
445
  CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
 
446
elif kill -s 0 $$
 
447
then
 
448
  CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
 
449
else
 
450
  AC_MSG_WARN([kill -0 to check for pid seems to fail])
 
451
    CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
 
452
fi
 
453
AC_SUBST(CHECK_PID)
 
454
AC_MSG_RESULT("$CHECK_PID")
 
455
 
 
456
# We need an ANSI C compiler
 
457
AM_PROG_CC_STDC
 
458
 
 
459
# We need an assembler, too
 
460
AM_PROG_AS
 
461
CCASFLAGS="$CCASFLAGS $ASFLAGS"
 
462
 
 
463
# Check if we need noexec stack for assembler
 
464
AC_CHECK_NOEXECSTACK
 
465
 
 
466
if test "$am_cv_prog_cc_stdc" = "no"
 
467
then
 
468
  AC_MSG_ERROR([MySQL requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
 
469
fi
 
470
 
 
471
NOINST_LDFLAGS="-static"
 
472
 
 
473
static_nss=""
 
474
STATIC_NSS_FLAGS=""
 
475
OTHER_LIBC_LIB=""
 
476
AC_ARG_WITH(other-libc,
 
477
 [  --with-other-libc=DIR   Link against libc and other standard libraries 
 
478
                          installed in the specified non-standard location 
 
479
                          overriding default. Originally added to be able to
 
480
                          link against glibc 2.2 without making the user 
 
481
                          upgrade the standard libc installation.],
 
482
 [
 
483
   other_libc_include="$withval/include"
 
484
   other_libc_lib="$withval/lib"
 
485
   with_other_libc="yes"
 
486
   enable_shared="no"
 
487
   all_is_static="yes"
 
488
   CFLAGS="$CFLAGS -I$other_libc_include"
 
489
   # There seems to be a feature in gcc that treats system and libc headers
 
490
   # silently when they violatate ANSI C++ standard, but it is strict otherwise
 
491
   # since gcc cannot now recognize that our headers are libc, we work around
 
492
   # by telling it to be permissive. Note that this option only works with
 
493
   # new versions of gcc (2.95.x and above)
 
494
   CXXFLAGS="$CXXFLAGS -fpermissive -I$other_libc_include"
 
495
   if test -f "$other_libc_lib/libnss_files.a"
 
496
   then
 
497
     # libc has been compiled with --enable-static-nss
 
498
     # we need special flags, but we will have to add those later
 
499
     STATIC_NSS_FLAGS="-lc -lnss_files -lnss_dns -lresolv"
 
500
     STATIC_NSS_FLAGS="$STATIC_NSS_FLAGS $STATIC_NSS_FLAGS"
 
501
     OTHER_LIBC_LIB="-static -L$other_libc_lib"
 
502
     static_nss=1
 
503
   else
 
504
     # this is a dirty hack. We if we detect static nss glibc in the special
 
505
     # location, we do not re-direct the linker to get libraries from there
 
506
     # during check. The reason is that if we did, we would have to find a
 
507
     # way to append the special static nss flags to LIBS every time we do
 
508
     # any check - this is definitely feasible, but not worthwhile the risk
 
509
     # of breaking other things. So for our purposes it would be sufficient
 
510
     # to assume that whoever is using static NSS knows what he is doing and
 
511
     # has sensible libraries in the regular location
 
512
     LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
 
513
   fi
 
514
   
 
515
   # When linking against custom libc installed separately, we want to force
 
516
   # all binary builds to be static, including the build done by configure
 
517
   # itself to test for system features.
 
518
   with_mysqld_ldflags="-all-static"
 
519
   with_client_ldflags="-all-static"
 
520
   NOINST_LDFLAGS="-all-static"
 
521
 ],
 
522
 [
 
523
  other_libc_include=
 
524
  other_libc_lib=
 
525
  with_other_libc="no"
 
526
 ]
 
527
)
 
528
AC_SUBST(NOINST_LDFLAGS)
 
529
 
 
530
#
 
531
# Check if we are using Linux and a glibc compiled with static nss
 
532
# (this is true on the MySQL build machines to avoid NSS problems)
 
533
#
 
534
 
 
535
if test "$TARGET_LINUX" = "true" -a "$static_nss" = ""
 
536
then
 
537
  tmp=`nm /usr/lib*/libc.a  | grep _nss_files_getaliasent_r`
 
538
  if test -n "$tmp"
 
539
  then
 
540
     STATIC_NSS_FLAGS="-lc -lnss_files -lnss_dns -lresolv"
 
541
     STATIC_NSS_FLAGS="$STATIC_NSS_FLAGS $STATIC_NSS_FLAGS"
 
542
     static_nss=1
 
543
  fi
 
544
fi
 
545
 
 
546
AC_ARG_WITH(server-suffix,
 
547
    [  --with-server-suffix    Append value to the version string.],
 
548
    [ MYSQL_SERVER_SUFFIX=`echo "$withval" | sed -e  's/^\(...................................\)..*$/\1/'` ],
 
549
    [ MYSQL_SERVER_SUFFIX= ]
 
550
    )
 
551
AC_SUBST(MYSQL_SERVER_SUFFIX)
 
552
 
 
553
# Set flags if we want to force to use pthreads
 
554
AC_ARG_WITH(pthread,
 
555
    [  --with-pthread          Force use of pthread library.],
 
556
    [ with_pthread=$withval ],
 
557
    [ with_pthread=no ]
 
558
    )
 
559
 
 
560
# Force use of thread libs LIBS
 
561
AC_ARG_WITH(named-thread-libs,
 
562
    [  --with-named-thread-libs=ARG
 
563
                          Use specified thread libraries instead of 
 
564
                          those automatically found by configure.],
 
565
    [ with_named_thread=$withval ],
 
566
    [ with_named_thread=no ]
 
567
    )
 
568
 
 
569
# Force use of a curses libs
 
570
AC_ARG_WITH(named-curses-libs,
 
571
    [  --with-named-curses-libs=ARG
 
572
                          Use specified curses libraries instead of 
 
573
                          those automatically found by configure.],
 
574
    [ with_named_curses=$withval ],
 
575
    [ with_named_curses=no ]
 
576
    )
 
577
 
 
578
# Make thread safe client
 
579
AC_ARG_ENABLE(thread-safe-client,
 
580
    [  --disable-thread-safe-client   
 
581
                          Compile the client without threads.],
 
582
    [ THREAD_SAFE_CLIENT=$enableval ],
 
583
    [ THREAD_SAFE_CLIENT=yes ]
 
584
    )
 
585
 
 
586
# compile with strings functions in assembler
 
587
AC_ARG_ENABLE(assembler,
 
588
    [  --enable-assembler      Use assembler versions of some string 
 
589
                          functions if available.],
 
590
    [ ENABLE_ASSEMBLER=$enableval ],
 
591
    [ ENABLE_ASSEMBLER=no ]
 
592
    )
 
593
 
 
594
AC_MSG_CHECKING(if we should use assembler functions)
 
595
# For now we only support assembler on i386 and sparc systems
 
596
AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386" && $AS strings/strings-x86.s -o checkassembler >/dev/null 2>&1 && test -f checkassembler && (rm -f checkassembler; exit 0;))
 
597
AM_CONDITIONAL(ASSEMBLER_sparc32, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc")
 
598
AM_CONDITIONAL(ASSEMBLER_sparc64, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparcv9")
 
599
AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc32_TRUE" = "")
 
600
 
 
601
if test "$ASSEMBLER_TRUE" = ""
 
602
then
 
603
  AC_MSG_RESULT([yes])
 
604
else
 
605
  AC_MSG_RESULT([no])
 
606
fi
 
607
 
 
608
# Add query profiler
 
609
AC_MSG_CHECKING(if SHOW PROFILE should be enabled.)
 
610
AC_ARG_ENABLE(profiling,
 
611
    AS_HELP_STRING([--enable-profiling], [Build a version with query profiling code (req. community-features)]),
 
612
    [ ENABLED_PROFILING=$enableval ],
 
613
    [ ENABLED_PROFILING=no ])
 
614
 
 
615
if test "$ENABLED_PROFILING" = "yes"
 
616
then
 
617
  AC_DEFINE([ENABLED_PROFILING], [1],
 
618
            [If SHOW PROFILE should be enabled])
 
619
  AC_MSG_RESULT([yes]) 
 
620
else
 
621
  AC_MSG_RESULT([no])
 
622
fi
 
623
 
 
624
AC_ARG_WITH(tcp-port,
 
625
    [  --with-tcp-port=port-number
 
626
                          Which port to use for MySQL services (default 3306)],
 
627
    [ MYSQL_TCP_PORT=$withval ],
 
628
    [ MYSQL_TCP_PORT=$MYSQL_TCP_PORT_DEFAULT
 
629
      # if we actually defaulted (as opposed to the pathological case of
 
630
      # --with-tcp-port=<MYSQL_TCP_PORT_DEFAULT> which might in theory
 
631
      # happen if whole batch of servers was built from a script), set
 
632
      # the default to zero to indicate that; we don't lose information
 
633
      # that way, because 0 obviously indicates that we can get the
 
634
      # default value from MYSQL_TCP_PORT. this seems really evil, but
 
635
      # testing for MYSQL_TCP_PORT==MYSQL_TCP_PORT_DEFAULT would make a
 
636
      # a port of MYSQL_TCP_PORT_DEFAULT magic even if the builder did not
 
637
      # intend it to mean "use the default, in fact, look up a good default
 
638
      # from /etc/services if you can", but really, really meant 3306 when
 
639
      # they passed in 3306. When they pass in a specific value, let them
 
640
      # have it; don't second guess user and think we know better, this will
 
641
      # just make people cross.  this makes the the logic work like this
 
642
      # (which is complicated enough):
 
643
      #
 
644
      # - if a port was set during build, use that as a default.
 
645
      #
 
646
      # - otherwise, try to look up a port in /etc/services; if that fails,
 
647
      #   use MYSQL_TCP_PORT_DEFAULT (at the time of this writing 3306)
 
648
      #
 
649
      # - allow the MYSQL_TCP_PORT environment variable to override that.
 
650
      #
 
651
      # - allow command-line parameters to override all of the above.
 
652
      #
 
653
      # the top-most MYSQL_TCP_PORT_DEFAULT is read from win/configure.js,
 
654
      # so don't mess with that.
 
655
      MYSQL_TCP_PORT_DEFAULT=0 ]
 
656
    )
 
657
AC_SUBST(MYSQL_TCP_PORT)
 
658
# We might want to document the assigned port in the manual.
 
659
AC_SUBST(MYSQL_TCP_PORT_DEFAULT)
 
660
 
 
661
# Use this to set the place used for unix socket used to local communication.
 
662
AC_ARG_WITH(mysqld-user,
 
663
    [  --with-mysqld-user=username   
 
664
                          What user the mysqld daemon shall be run as.],
 
665
    [ MYSQLD_USER=$withval ],
 
666
    [ MYSQLD_USER=mysql ]
 
667
    )
 
668
AC_SUBST(MYSQLD_USER)
 
669
 
 
670
# If we should allow LOAD DATA LOCAL
 
671
AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default)
 
672
AC_ARG_ENABLE(local-infile,
 
673
    [  --enable-local-infile   Enable LOAD DATA LOCAL INFILE (default: disabled)],
 
674
    [ ENABLED_LOCAL_INFILE=$enableval ],
 
675
    [ ENABLED_LOCAL_INFILE=no ]
 
676
    )
 
677
if test "$ENABLED_LOCAL_INFILE" = "yes"
 
678
then
 
679
  AC_MSG_RESULT([yes])
 
680
  AC_DEFINE([ENABLED_LOCAL_INFILE], [1],
 
681
            [If LOAD DATA LOCAL INFILE should be enabled by default])
 
682
else
 
683
  AC_MSG_RESULT([no])
 
684
fi
 
685
 
 
686
# If we should allow init-file, skip-grant-table and bootstrap options
 
687
AC_MSG_CHECKING(If we should should enable init-file, skip-grant-table options and bootstrap)
 
688
AC_ARG_ENABLE(grant-options,
 
689
    [  --disable-grant-options Disables the use of --init-file, --skip-grant-tables and --bootstrap options],
 
690
    [ mysql_grant_options_enabled=$enableval ],
 
691
    [ mysql_grant_options_enabled=yes ]
 
692
    )
 
693
if test "$mysql_grant_options_enabled" = "yes"
 
694
then
 
695
  AC_MSG_RESULT([yes])
 
696
else
 
697
  AC_DEFINE([DISABLE_GRANT_OPTIONS], [1],
 
698
            [Disables the use of --init-file, --skip-grant-tables and --bootstrap options])
 
699
  AC_MSG_RESULT([no])
 
700
fi
 
701
 
 
702
MYSQL_SYS_LARGEFILE
 
703
 
 
704
# Types that must be checked AFTER large file support is checked
 
705
AC_TYPE_SIZE_T
 
706
 
 
707
#--------------------------------------------------------------------
 
708
# Check for system header files
 
709
#--------------------------------------------------------------------
 
710
 
 
711
AC_HEADER_DIRENT
 
712
AC_HEADER_STDC
 
713
AC_HEADER_SYS_WAIT
 
714
AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h fpu_control.h ieeefp.h \
 
715
 limits.h memory.h pwd.h select.h \
 
716
 stdlib.h stddef.h sys/fpu.h \
 
717
 strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
 
718
 sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
 
719
 unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
 
720
 sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h \
 
721
 sys/prctl.h sys/resource.h sys/param.h port.h ieeefp.h \
 
722
 execinfo.h)
 
723
 
 
724
AC_CHECK_HEADERS([xfs/xfs.h])
 
725
 
 
726
#--------------------------------------------------------------------
 
727
# Check for system libraries. Adds the library to $LIBS
 
728
# and defines HAVE_LIBM etc
 
729
#--------------------------------------------------------------------
 
730
 
 
731
AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
 
732
AC_CHECK_FUNCS(log2)
 
733
 
 
734
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
 
735
AC_CHECK_FUNC(yp_get_default_domain, ,
 
736
  AC_CHECK_LIB(nsl, yp_get_default_domain))
 
737
AC_CHECK_FUNC(p2open, , AC_CHECK_LIB(gen, p2open))
 
738
# This may get things to compile even if bind-8 is installed
 
739
AC_CHECK_FUNC(bind, , AC_CHECK_LIB(bind, bind))
 
740
# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
 
741
AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
 
742
 
 
743
# Check rt for aio_read
 
744
AC_CHECK_LIB(rt, aio_read)
 
745
 
 
746
# For the sched_yield() function on Solaris
 
747
AC_CHECK_FUNC(sched_yield, , AC_CHECK_LIB(posix4, sched_yield,
 
748
[AC_DEFINE(HAVE_SCHED_YIELD) LIBS="$LIBS -lposix4"]))
 
749
 
 
750
# For large pages support
 
751
if test "$TARGET_LINUX" = "true"
 
752
then
 
753
  # For SHM_HUGETLB on Linux
 
754
  AC_CHECK_DECLS(SHM_HUGETLB, 
 
755
      AC_DEFINE([HAVE_LARGE_PAGES], [1], 
 
756
                [Define if you have large pages support])
 
757
      AC_DEFINE([HUGETLB_USE_PROC_MEMINFO], [1],
 
758
                [Define if /proc/meminfo shows the huge page size (Linux only)])
 
759
      , ,
 
760
      [
 
761
#include <sys/shm.h>
 
762
      ]
 
763
  )
 
764
fi
 
765
 
 
766
#--------------------------------------------------------------------
 
767
# Check for TCP wrapper support
 
768
#--------------------------------------------------------------------
 
769
 
 
770
if test "$TARGET_LINUX" = "true"; then
 
771
  AC_ARG_WITH(pstack,
 
772
    [  --with-pstack           Use the pstack backtrace library],
 
773
    [ USE_PSTACK=$withval ],
 
774
    [ USE_PSTACK=no ])
 
775
  pstack_libs=
 
776
  pstack_dir=
 
777
  if test "$USE_PSTACK" = yes -a "$TARGET_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386"
 
778
  then
 
779
    have_libiberty= have_libbfd=
 
780
    my_save_LIBS="$LIBS"
 
781
dnl I have no idea if this is a good test - can not find docs for libiberty  
 
782
    AC_CHECK_LIB([iberty], [fdmatch],
 
783
      [have_libiberty=yes
 
784
       AC_CHECK_LIB([bfd], [bfd_openr], [have_libbfd=yes], , [-liberty])])
 
785
    LIBS="$my_save_LIBS"
 
786
 
 
787
    if test x"$have_libiberty" = xyes -a x"$have_libbfd" = xyes
 
788
    then
 
789
      pstack_dir="pstack"
 
790
      pstack_libs="../pstack/libpstack.a -lbfd -liberty"
 
791
      # We must link staticly when using pstack
 
792
      with_mysqld_ldflags="-all-static"
 
793
      AC_SUBST([pstack_dir])
 
794
      AC_SUBST([pstack_libs])
 
795
      AC_DEFINE([USE_PSTACK], [1], [the pstack backtrace library])
 
796
dnl This check isn't needed, but might be nice to give some feedback....
 
797
dnl    AC_CHECK_HEADER(libiberty.h,
 
798
dnl      have_libiberty_h=yes,
 
799
dnl      have_libiberty_h=no)
 
800
    else
 
801
      USE_PSTACK="no"
 
802
    fi
 
803
  else
 
804
    USE_PSTACK="no"
 
805
  fi
 
806
fi
 
807
AC_MSG_CHECKING([if we should use pstack])
 
808
AC_MSG_RESULT([$USE_PSTACK])
 
809
 
 
810
# Check for gtty if termio.h doesn't exists
 
811
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
 
812
then
 
813
  AC_CHECK_FUNC(gtty, , AC_CHECK_LIB(compat, gtty))
 
814
fi
 
815
 
 
816
# We make a special variable for non-threaded version of LIBS to avoid
 
817
# including thread libs into non-threaded version of MySQL client library.
 
818
# Later in this script LIBS will be augmented with a threads library.
 
819
NON_THREADED_LIBS="$LIBS"
 
820
 
 
821
AC_CHECK_TYPES([int8, uint8, int16, uint16, int32, uint32, int64, uint64,
 
822
                uchar, uint, ulong],[],[], [
 
823
#include <sys/types.h>
 
824
])
 
825
AC_CHECK_TYPES([fp_except], [], [], [
 
826
#include <sys/types.h>
 
827
#include <ieeefp.h>
 
828
])
 
829
 
 
830
#
 
831
# Some system specific hacks
 
832
#
 
833
 
 
834
MAX_C_OPTIMIZE="-O3"
 
835
MAX_CXX_OPTIMIZE="-O3"
 
836
 
 
837
case $SYSTEM_TYPE in
 
838
  *solaris*)
 
839
    CFLAGS="$CFLAGS -DHAVE_RWLOCK_T"
 
840
    CXXFLAGS="$CXXFLAGS -DHAVE_RWLOCK_T"
 
841
    ;;
 
842
  *darwin*)
 
843
    if test "$ac_cv_prog_gcc" = "yes"
 
844
    then
 
845
      FLAGS="-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL"
 
846
      CFLAGS="$CFLAGS $FLAGS"
 
847
      CXXFLAGS="$CXXFLAGS $FLAGS"
 
848
      MAX_C_OPTIMIZE="-O"
 
849
    fi
 
850
    ;;
 
851
  *freebsd*|*dragonfly*)
 
852
    AC_MSG_WARN([Adding fix for interrupted reads])
 
853
    OSVERSION=`sysctl -a | grep osreldate | awk '{ print $2 }'`
 
854
    if test "$OSVERSION" -gt "480100" && \
 
855
       test "$OSVERSION" -lt "500000" || \
 
856
       test "$OSVERSION" -gt "500109"
 
857
    then
 
858
       CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000"
 
859
    else
 
860
       CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH"
 
861
       CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000 -DHAVE_BROKEN_REALPATH"
 
862
    fi
 
863
    ;;
 
864
  *netbsd*)
 
865
    AC_MSG_WARN([Adding flag -Dunix])
 
866
    CFLAGS="$CFLAGS -Dunix"
 
867
    CXXFLAGS="$CXXFLAGS -Dunix"
 
868
    OVERRIDE_MT_LD_ADD="\$(top_srcdir)/mit-pthreads/obj/libpthread.a"
 
869
    ;;
 
870
esac
 
871
 
 
872
 
 
873
#---START: Used in for client configure
 
874
# Check if we threads are in libc or if we should use
 
875
# -lpthread, -lpthreads or mit-pthreads
 
876
# We have to check libc last because else it fails on Solaris 2.6
 
877
 
 
878
with_posix_threads="no"
 
879
# Search thread lib on Linux
 
880
if test "$with_named_thread" = "no"
 
881
then
 
882
    AC_MSG_CHECKING("Linux threads")
 
883
    if test "$TARGET_LINUX" = "true"
 
884
    then
 
885
        AC_MSG_RESULT("starting")
 
886
        # use getconf to check glibc contents
 
887
        AC_MSG_CHECKING("getconf GNU_LIBPTHREAD_VERSION")
 
888
        case `getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` in
 
889
        NPTL* )
 
890
                AC_MSG_RESULT("NPTL")
 
891
                AC_DEFINE([HAVE_NPTL], [1], [NPTL threads implementation])
 
892
                with_named_thread="-lpthread"
 
893
                ;;
 
894
        LINUXTHREADS* )
 
895
                AC_MSG_RESULT("Linuxthreads")
 
896
                AC_DEFINE([HAVE_LINUXTHREADS], [1], 
 
897
                      [Whether we are using Xavier Leroy's LinuxThreads])
 
898
                with_named_thread="-lpthread"
 
899
                ;;
 
900
        * )
 
901
                AC_MSG_RESULT("unknown")
 
902
                ;;
 
903
        esac
 
904
        if test "$with_named_thread" = "no"
 
905
        then
 
906
          # old method, check headers
 
907
          # Look for LinuxThreads.
 
908
          AC_MSG_CHECKING("LinuxThreads in header file comment")
 
909
          res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
 
910
          if test "$res" -gt 0
 
911
          then
 
912
            AC_MSG_RESULT("Found")
 
913
            AC_DEFINE([HAVE_LINUXTHREADS], [1],
 
914
                  [Whether we are using Xavier Leroy's LinuxThreads])
 
915
            # Linux 2.0 sanity check
 
916
            AC_TRY_COMPILE([#include <sched.h>], [int a = sched_get_priority_min(1);], ,
 
917
                  AC_MSG_ERROR([Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual]))
 
918
            # RedHat 5.0 does not work with dynamic linking of this. -static also
 
919
            # gives a speed increase in linux so it does not hurt on other systems.
 
920
            with_named_thread="-lpthread"
 
921
          else
 
922
            AC_MSG_RESULT("Not found")
 
923
            # If this is a linux machine we should barf
 
924
            AC_MSG_ERROR([This is a Linux system without a working getconf, 
 
925
and Linuxthreads was not found. Please install it (or a new glibc) and try again.  
 
926
See the Installation chapter in the Reference Manual for more information.])
 
927
          fi
 
928
        else
 
929
            AC_MSG_RESULT("no need to check headers")
 
930
        fi
 
931
        
 
932
        AC_MSG_CHECKING("for pthread_create in -lpthread")
 
933
        ac_save_LIBS="$LIBS"
 
934
        LIBS="$LIBS -lpthread"
 
935
        AC_TRY_LINK( [#include <pthread.h>],
 
936
              [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
 
937
              AC_MSG_RESULT("yes"),
 
938
              [ AC_MSG_RESULT("no")
 
939
                AC_MSG_ERROR([
 
940
This is a Linux system claiming to support threads, either Linuxthreads or NPTL, but linking a test program failed.  
 
941
Please install one of these (or a new glibc) and try again.  
 
942
See the Installation chapter in the Reference Manual for more information.]) ]
 
943
              )
 
944
        LIBS="$ac_save_LIBS"
 
945
    else
 
946
        AC_MSG_RESULT("no")
 
947
    fi  # "$TARGET_LINUX" 
 
948
fi  # "$with_named_thread" = "no" -a "$with_mit_threads" = "no"
 
949
 
 
950
# Use library named -lpthread
 
951
if test "$with_named_thread" = "no" -a "$with_pthread" = "yes"
 
952
then
 
953
    with_named_thread="-lpthread"
 
954
fi
 
955
 
 
956
#---END:
 
957
 
 
958
# Hack for Solaris >= 2.5
 
959
# We want both the new and the old interface
 
960
 
 
961
if test "$with_named_thread" = "no"
 
962
then
 
963
  AC_MSG_CHECKING("Solaris threads")
 
964
  if test -f /usr/lib/libpthread.so -a -f /usr/lib/libthread.so
 
965
  then
 
966
    with_named_thread="-lpthread -lthread"
 
967
    AC_MSG_RESULT("yes")
 
968
  else
 
969
    AC_MSG_RESULT("no")
 
970
  fi
 
971
fi
 
972
 
 
973
# Should we use named pthread library ?
 
974
AC_MSG_CHECKING("named thread libs:")
 
975
if test "$with_named_thread" != "no"
 
976
then
 
977
  LIBS="$with_named_thread $LIBS $with_named_thread"
 
978
  CLIENT_THREAD_LIBS="$with_named_thread"
 
979
  with_posix_threads="yes"
 
980
  AC_MSG_RESULT("$with_named_thread")
 
981
else
 
982
  AC_MSG_RESULT("no")
 
983
  # pthread_create is in standard libraries (As in BSDI 3.0)
 
984
  AC_MSG_CHECKING("for pthread_create in -libc");
 
985
  AC_TRY_LINK(
 
986
  [#include <pthread.h>],
 
987
  [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
 
988
  with_posix_threads=yes, with_posix_threads=no)
 
989
  AC_MSG_RESULT("$with_posix_threads")
 
990
  if test "$with_posix_threads" = "no"
 
991
  then
 
992
    AC_MSG_CHECKING("for pthread_create in -lpthread")
 
993
    ac_save_LIBS="$LIBS"
 
994
    LIBS="$LIBS -lpthread"
 
995
    CLIENT_THREAD_LIBS="-lpthread"
 
996
    AC_TRY_LINK(
 
997
    [#include <pthread.h>],
 
998
    [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
 
999
    with_posix_threads=yes, with_posix_threads=no)
 
1000
    AC_MSG_RESULT("$with_posix_threads")
 
1001
    if test "$with_posix_threads" = "no"
 
1002
    then
 
1003
      LIBS=" $ac_save_LIBS -lpthreads"
 
1004
      CLIENT_THREAD_LIBS="-lpthreads"
 
1005
      AC_MSG_CHECKING("for pthread_create in -lpthreads")
 
1006
      AC_TRY_LINK(
 
1007
      [#include <pthread.h>],
 
1008
      [ pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
 
1009
      with_posix_threads=yes, with_posix_threads=no)
 
1010
      AC_MSG_RESULT("$with_posix_threads")
 
1011
      if test "$with_posix_threads" = "no"
 
1012
      then
 
1013
        # This is for FreeBSD
 
1014
        LIBS="$ac_save_LIBS -pthread"
 
1015
        CLIENT_THREAD_LIBS="-pthread"
 
1016
        AC_MSG_CHECKING("for pthread_create in -pthread")
 
1017
        AC_TRY_LINK(
 
1018
        [#include <pthread.h>],
 
1019
        [ pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
 
1020
        with_posix_threads=yes, with_posix_threads=no)
 
1021
        AC_MSG_RESULT("$with_posix_threads")
 
1022
      fi
 
1023
    fi
 
1024
  fi
 
1025
fi
 
1026
 
 
1027
#---START: Used in for client configure
 
1028
# Must be checked after, because strtok_r may be in -lpthread
 
1029
# On AIX strtok_r is in libc_r
 
1030
 
 
1031
my_save_LIBS="$LIBS"
 
1032
AC_CHECK_LIB(pthread,strtok_r)
 
1033
LIBS="$my_save_LIBS"
 
1034
if test "$ac_cv_lib_pthread_strtok_r" = "no"
 
1035
then
 
1036
  AC_CHECK_LIB(c_r,strtok_r)
 
1037
  case "$with_osf32_threads---$target_os" in
 
1038
    # Don't keep -lc_r in LIBS; -pthread handles it magically
 
1039
    yes---* | *---freebsd* | *---hpux*) LIBS="$my_save_LIBS" ;;
 
1040
 
 
1041
  esac
 
1042
  AC_CHECK_FUNCS(strtok_r pthread_init)
 
1043
else
 
1044
  AC_CHECK_FUNCS(strtok_r)
 
1045
fi
 
1046
#---END:
 
1047
 
 
1048
# dlopen, dlerror
 
1049
case "$with_mysqld_ldflags " in
 
1050
 
 
1051
  *"-all-static "*)
 
1052
    # No need to check for dlopen when mysqld is linked with
 
1053
    # -all-static as it won't be able to load any functions.
 
1054
    # NOTE! It would be better if it was possible to test if dlopen
 
1055
    # can be used, but a good way to test it couldn't be found
 
1056
 
 
1057
    ;;
 
1058
 
 
1059
  *)
 
1060
    # Check for dlopen, needed for user definable functions
 
1061
    # This must be checked after threads on AIX
 
1062
    # We only need this for mysqld, not for the clients.
 
1063
 
 
1064
    my_save_LIBS="$LIBS"
 
1065
    LIBS=""
 
1066
    AC_CHECK_LIB(dl,dlopen)
 
1067
    LIBDL=$LIBS
 
1068
    LIBS="$my_save_LIBS"
 
1069
    AC_SUBST(LIBDL)
 
1070
 
 
1071
    my_save_LIBS="$LIBS"
 
1072
    LIBS="$LIBS $LIBDL"
 
1073
    AC_CHECK_FUNCS(dlopen dlerror)
 
1074
    LIBS="$my_save_LIBS"
 
1075
 
 
1076
    ;;
 
1077
esac
 
1078
 
 
1079
 
 
1080
# System characteristics
 
1081
case $SYSTEM_TYPE in
 
1082
  *)
 
1083
AC_SYS_RESTARTABLE_SYSCALLS
 
1084
    ;;
 
1085
esac
 
1086
 
 
1087
# Build optimized or debug version ?
 
1088
# First check for gcc and g++
 
1089
if test "$ac_cv_prog_gcc" = "yes"
 
1090
then
 
1091
  DEBUG_CFLAGS="-g"
 
1092
  DEBUG_OPTIMIZE_CC="-O"
 
1093
  OPTIMIZE_CFLAGS="$MAX_C_OPTIMIZE"
 
1094
else
 
1095
  DEBUG_CFLAGS="-g"
 
1096
  DEBUG_OPTIMIZE_CC=""
 
1097
  OPTIMIZE_CFLAGS="-O"
 
1098
fi
 
1099
if test "$ac_cv_prog_cxx_g" = "yes"
 
1100
then
 
1101
  DEBUG_CXXFLAGS="-g"
 
1102
  DEBUG_OPTIMIZE_CXX="-O"
 
1103
  OPTIMIZE_CXXFLAGS="$MAX_CXX_OPTIMIZE"
 
1104
else
 
1105
  DEBUG_CXXFLAGS="-g"
 
1106
  DEBUG_OPTIMIZE_CXX=""
 
1107
  OPTIMIZE_CXXFLAGS="-O"
 
1108
fi
 
1109
 
 
1110
# If the user specified CFLAGS, we won't add any optimizations
 
1111
if test -n "$SAVE_CFLAGS"
 
1112
then
 
1113
  OPTIMIZE_CFLAGS=""
 
1114
  DEBUG_OPTIMIZE_CC=""
 
1115
fi
 
1116
# Ditto for CXXFLAGS
 
1117
if test -n "$SAVE_CXXFLAGS"
 
1118
then
 
1119
  OPTIMIZE_CXXFLAGS=""
 
1120
  DEBUG_OPTIMIZE_CXX=""
 
1121
fi
 
1122
 
 
1123
AC_ARG_WITH(debug,
 
1124
    [  --with-debug            Add debug code
 
1125
  --with-debug=full       Add debug code (adds memory checker, very slow)],
 
1126
    [with_debug=$withval],
 
1127
    [with_debug=no])
 
1128
if test "$with_debug" = "yes"
 
1129
then
 
1130
  # Medium debug.
 
1131
  AC_DEFINE([DBUG_ON], [1], [Use libdbug])
 
1132
  CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DSAFE_MUTEX $CFLAGS"
 
1133
  CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DSAFE_MUTEX $CXXFLAGS"
 
1134
elif test "$with_debug" = "full"
 
1135
then
 
1136
  # Full debug. Very slow in some cases
 
1137
  AC_DEFINE([DBUG_ON], [1], [Use libdbug])
 
1138
  CFLAGS="$DEBUG_CFLAGS -DSAFE_MUTEX $CFLAGS"
 
1139
  CXXFLAGS="$DEBUG_CXXFLAGS -DSAFE_MUTEX $CXXFLAGS"
 
1140
else
 
1141
  # Optimized version. No debug
 
1142
  AC_DEFINE([DBUG_OFF], [1], [Don't use libdbug])
 
1143
  CFLAGS="$OPTIMIZE_CFLAGS $CFLAGS"
 
1144
  CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
 
1145
fi
 
1146
 
 
1147
# If we should allow error injection tests
 
1148
AC_ARG_WITH(error-inject,
 
1149
    AC_HELP_STRING([--with-error-inject],[Enable error injection in MySQL Server]),
 
1150
    [ with_error_inject=$withval ],
 
1151
    [ with_error_inject=no ])
 
1152
 
 
1153
if test $with_debug != "no"
 
1154
then
 
1155
  if test "$with_error_inject" = "yes"
 
1156
  then
 
1157
    AC_DEFINE([ERROR_INJECT_SUPPORT], [1],
 
1158
              [Enable error injection in MySQL Server])
 
1159
  fi
 
1160
fi
 
1161
 
 
1162
AC_ARG_WITH([fast-mutexes],
 
1163
            AC_HELP_STRING([--with-fast-mutexes], 
 
1164
            [Compile with fast mutexes (default is disabled)]),
 
1165
            [with_fast_mutexes=$withval], [with_fast_mutexes=no])
 
1166
 
 
1167
if test "$with_fast_mutexes" != "no"
 
1168
then
 
1169
  if test "$with_debug" != "no"
 
1170
  then
 
1171
    AC_MSG_WARN(['--with-fast-mutexes' ignored when '--with-debug' is given])
 
1172
  else
 
1173
    AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1], 
 
1174
              [Define to 1 if you want to use fast mutexes])
 
1175
  fi
 
1176
fi
 
1177
 
 
1178
AC_ARG_WITH([atomic-ops],
 
1179
            AC_HELP_STRING([--with-atomic-ops=rwlocks|smp|up],
 
1180
            [Implement atomic operations using pthread rwlocks or atomic CPU
 
1181
             instructions for multi-processor (default) or uniprocessor
 
1182
             configuration]), , [with_atomic_ops=smp])
 
1183
case "$with_atomic_ops" in
 
1184
  "up") AC_DEFINE([MY_ATOMIC_MODE_DUMMY], [1],
 
1185
                  [Assume single-CPU mode, no concurrency]) ;;
 
1186
  "rwlocks") AC_DEFINE([MY_ATOMIC_MODE_RWLOCKS], [1],
 
1187
                  [Use pthread rwlocks for atomic ops]) ;;
 
1188
  "smp") ;;
 
1189
   *) AC_MSG_ERROR(["$with_atomic_ops" is not a valid value for --with-atomic-ops]) ;;
 
1190
esac
 
1191
 
 
1192
AC_CACHE_CHECK([whether the compiler provides atomic builtins],
 
1193
               [mysql_cv_gcc_atomic_builtins], [AC_TRY_RUN([
 
1194
  int main()
 
1195
  {
 
1196
    int foo= -10; int bar= 10;
 
1197
    if (!__sync_fetch_and_add(&foo, bar) || foo)
 
1198
      return -1;
 
1199
    bar= __sync_lock_test_and_set(&foo, bar);
 
1200
    if (bar || foo != 10)
 
1201
      return -1;
 
1202
    bar= __sync_val_compare_and_swap(&bar, foo, 15);
 
1203
    if (bar)
 
1204
      return -1;
 
1205
    return 0;
 
1206
  }
 
1207
], [mysql_cv_gcc_atomic_builtins=yes],
 
1208
   [mysql_cv_gcc_atomic_builtins=no],
 
1209
   [mysql_cv_gcc_atomic_builtins=no])])
 
1210
 
 
1211
if test "x$mysql_cv_gcc_atomic_builtins" = xyes; then
 
1212
  AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1,
 
1213
            [Define to 1 if compiler provides atomic builtins.])
 
1214
fi
 
1215
 
 
1216
# Force static compilation to avoid linking problems/get more speed
 
1217
AC_ARG_WITH(mysqld-ldflags,
 
1218
    [  --with-mysqld-ldflags   Extra linking arguments for mysqld],
 
1219
    [MYSQLD_EXTRA_LDFLAGS=$withval],
 
1220
    [MYSQLD_EXTRA_LDFLAGS=])
 
1221
AC_SUBST(MYSQLD_EXTRA_LDFLAGS)
 
1222
 
 
1223
AC_ARG_WITH(client-ldflags,
 
1224
    [  --with-client-ldflags   Extra linking arguments for clients],
 
1225
    [CLIENT_EXTRA_LDFLAGS=$withval],
 
1226
    [CLIENT_EXTRA_LDFLAGS=])
 
1227
AC_SUBST(CLIENT_EXTRA_LDFLAGS)
 
1228
 
 
1229
AC_ARG_WITH(mysqld-libs,
 
1230
    [  --with-mysqld-libs   Extra libraries to link with for mysqld],
 
1231
    [MYSQLD_EXTRA_LIBS=$withval],
 
1232
    [MYSQLD_EXTRA_LIBS=])
 
1233
AC_SUBST(MYSQLD_EXTRA_LIBS)
 
1234
 
 
1235
AC_ARG_WITH(lib-ccflags,
 
1236
    [  --with-lib-ccflags      Extra CC options for libraries],
 
1237
    [LIB_EXTRA_CCFLAGS=$withval],
 
1238
    [LIB_EXTRA_CCFLAGS=])
 
1239
AC_SUBST(LIB_EXTRA_CCFLAGS)
 
1240
 
 
1241
# Avoid stupid bug on some OS 
 
1242
AC_ARG_WITH(low-memory,
 
1243
    [  --with-low-memory       Try to use less memory to compile to avoid 
 
1244
                          memory limitations.],
 
1245
    [with_lowmem=$withval],
 
1246
    [with_lowmem=no])
 
1247
if test "$with_lowmem" = "yes"
 
1248
then
 
1249
  if test "$ac_cv_prog_gcc" = "yes" 
 
1250
  then 
 
1251
    LM_CFLAGS="-fno-inline"
 
1252
  else
 
1253
    LM_CFLAGS="-O0"
 
1254
  fi
 
1255
else
 
1256
  LM_CFLAGS=""
 
1257
fi
 
1258
AC_SUBST(LM_CFLAGS)
 
1259
 
 
1260
AC_ARG_WITH(comment,
 
1261
    [  --with-comment          Comment about compilation environment.],
 
1262
    [with_comment=$withval],
 
1263
    [with_comment=no])
 
1264
if test "$with_comment" != "no"
 
1265
then
 
1266
  COMPILATION_COMMENT=$with_comment
 
1267
else
 
1268
  COMPILATION_COMMENT="Source distribution"
 
1269
fi
 
1270
AC_SUBST(COMPILATION_COMMENT)
 
1271
 
 
1272
AC_MSG_CHECKING("need of special linking flags")
 
1273
if test "$TARGET_LINUX" = "true" -a "$ac_cv_prog_gcc" = "yes" -a "$all_is_static" != "yes"
 
1274
then
 
1275
  LDFLAGS="$LDFLAGS -rdynamic"
 
1276
  AC_MSG_RESULT("-rdynamic")
 
1277
else
 
1278
  case "$SYSTEM_TYPE$with_mysqld_ldflags " in
 
1279
  *freebsd*"-all-static "*|*dragonfly*"-all-static "*)
 
1280
    AC_MSG_RESULT("none")
 
1281
    ;;
 
1282
  *freebsd*|*dragonfly*)
 
1283
    MYSQLD_EXTRA_LDFLAGS="$MYSQLD_EXTRA_LDFLAGS -export-dynamic"
 
1284
    AC_MSG_RESULT("-export-dynamic")
 
1285
    ;;
 
1286
  *)
 
1287
    AC_MSG_RESULT("none")
 
1288
    ;;
 
1289
  esac
 
1290
fi
 
1291
 
 
1292
dnl Checks for typedefs, structures, and compiler characteristics.
 
1293
AC_C_CONST
 
1294
AC_C_INLINE
 
1295
AC_TYPE_OFF_T
 
1296
AC_STRUCT_ST_RDEV
 
1297
AC_HEADER_TIME
 
1298
AC_STRUCT_TM
 
1299
MYSQL_NEEDS_MYSYS_NEW
 
1300
# AC_CHECK_SIZEOF return 0 when it does not find the size of a
 
1301
# type. We want a error instead.
 
1302
AC_CHECK_SIZEOF(char, 1)
 
1303
if test "$ac_cv_sizeof_char" -eq 0
 
1304
then
 
1305
  AC_MSG_ERROR([No size for char type.
 
1306
A likely cause for this could be that there isn't any
 
1307
static libraries installed. You can verify this by checking if you have libm.a
 
1308
in /lib, /usr/lib or some other standard place.  If this is the problem,
 
1309
install the static libraries and try again.  If this isn't the problem,
 
1310
examine config.log for possible errors.  If you want to report this, use
 
1311
'scripts/mysqlbug' and include at least the last 20 rows from config.log!])
 
1312
fi
 
1313
AC_CHECK_SIZEOF(char*, 4)
 
1314
AC_CHECK_SIZEOF(short, 2)
 
1315
AC_CHECK_SIZEOF(int, 4)
 
1316
if test "$ac_cv_sizeof_int" -eq 0
 
1317
then
 
1318
  AC_MSG_ERROR("No size for int type.")
 
1319
fi
 
1320
AC_CHECK_SIZEOF(long, 4)
 
1321
if test "$ac_cv_sizeof_long" -eq 0
 
1322
then
 
1323
  AC_MSG_ERROR("No size for long type.")
 
1324
fi
 
1325
AC_CHECK_SIZEOF(long long, 8)
 
1326
if test "$ac_cv_sizeof_long_long" -eq 0
 
1327
then
 
1328
  AC_MSG_ERROR("MySQL needs a long long type.")
 
1329
fi
 
1330
# off_t is not a builtin type
 
1331
AC_CHECK_SIZEOF(off_t, 4)
 
1332
if test "$ac_cv_sizeof_off_t" -eq 0
 
1333
then
 
1334
  AC_MSG_ERROR("MySQL needs a off_t type.")
 
1335
fi
 
1336
 
 
1337
dnl
 
1338
dnl check if time_t is unsigned
 
1339
dnl
 
1340
 
 
1341
MYSQL_CHECK_TIME_T
 
1342
 
 
1343
 
 
1344
# do we need #pragma interface/#pragma implementation ?
 
1345
# yes if it's gcc 2.x, and not icc pretending to be gcc, and not cygwin
 
1346
AC_MSG_CHECKING(the need for @%:@pragma interface/implementation)
 
1347
# instead of trying to match SYSTEM_TYPE and CC_VERSION (that doesn't
 
1348
# follow any standard), we'll use well-defined preprocessor macros:
 
1349
AC_TRY_CPP([
 
1350
#if !defined(__CYGWIN__) && !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ < 3)
 
1351
#error USE_PRAGMA_IMPLEMENTATION
 
1352
#endif
 
1353
],AC_MSG_RESULT(no) ,AC_MSG_RESULT(yes) ; CXXFLAGS="$CXXFLAGS -DUSE_PRAGMA_IMPLEMENTATION")
 
1354
 
 
1355
# This always gives a warning. Ignore it unless you are cross compiling
 
1356
AC_C_BIGENDIAN
 
1357
#---START: Used in for client configure
 
1358
# Check base type of last arg to accept
 
1359
MYSQL_TYPE_ACCEPT
 
1360
#---END:
 
1361
# Figure out what type of struct rlimit to use with setrlimit
 
1362
MYSQL_TYPE_STRUCT_RLIMIT
 
1363
# Find where the stack goes
 
1364
MYSQL_STACK_DIRECTION
 
1365
# We want to skip alloca on irix unconditionally. It may work on some version..
 
1366
MYSQL_FUNC_ALLOCA
 
1367
# Do struct timespec have members tv_sec or ts_sec
 
1368
MYSQL_TIMESPEC_TS
 
1369
# Do we have the tzname variable
 
1370
MYSQL_TZNAME
 
1371
# Do the c++ compiler have a bool type
 
1372
MYSQL_CXX_BOOL
 
1373
AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
 
1374
AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
 
1375
AC_CHECK_TYPES([u_int32_t])
 
1376
 
 
1377
MYSQL_PTHREAD_YIELD
 
1378
 
 
1379
######################################################################
 
1380
# For readline/libedit (We simply move the mimimum amount of stuff from
 
1381
# the readline/libedit configure.in here)
 
1382
 
 
1383
dnl Checks for header files.
 
1384
AC_CHECK_HEADERS(malloc.h sys/cdefs.h)
 
1385
 
 
1386
dnl Checks for library functions.
 
1387
AC_FUNC_ALLOCA
 
1388
AC_PROG_GCC_TRADITIONAL
 
1389
AC_TYPE_SIGNAL
 
1390
AC_CHECK_FUNCS(re_comp regcomp strdup)
 
1391
 
 
1392
dnl Sun compilers have their own vis.h that is about something
 
1393
dnl totally different. So, not to change the libedit source, we
 
1394
dnl do some additional checks before we define HAVE_VIS_H.
 
1395
AC_CHECK_HEADER(vis.h,
 
1396
  [AC_CHECK_FUNC(strvis,
 
1397
    [AC_DEFINE([HAVE_VIS_H], [1],[Found vis.h and the strvis() function])])])
 
1398
 
 
1399
AC_CHECK_FUNCS(strlcat strlcpy)
 
1400
AC_CHECK_FUNCS(issetugid)
 
1401
AC_CHECK_FUNCS(fgetln)
 
1402
AC_CHECK_FUNCS(getline flockfile)
 
1403
 
 
1404
# from old readline settting:
 
1405
 
 
1406
MAKE_SHELL=/bin/sh
 
1407
AC_SUBST(MAKE_SHELL)
 
1408
 
 
1409
# Already-done: stdlib.h string.h unistd.h termios.h
 
1410
AC_CHECK_HEADERS(varargs.h stdarg.h dirent.h locale.h ndir.h sys/dir.h \
 
1411
 sys/file.h sys/ndir.h sys/ptem.h sys/pte.h sys/select.h sys/stream.h \
 
1412
 sys/mman.h curses.h termcap.h termio.h termbits.h asm/termbits.h grp.h \
 
1413
paths.h semaphore.h)
 
1414
 
 
1415
# Already-done: strcasecmp
 
1416
AC_CHECK_FUNCS(lstat putenv select setenv setlocale strcoll tcgetattr)
 
1417
 
 
1418
AC_STAT_MACROS_BROKEN
 
1419
MYSQL_SIGNAL_CHECK
 
1420
MYSQL_CHECK_GETPW_FUNCS
 
1421
MYSQL_HAVE_TIOCGWINSZ
 
1422
MYSQL_HAVE_FIONREAD
 
1423
MYSQL_HAVE_TIOCSTAT
 
1424
MYSQL_STRUCT_DIRENT_D_INO
 
1425
MYSQL_STRUCT_DIRENT_D_NAMLEN
 
1426
MYSQL_TYPE_SIGHANDLER
 
1427
MYSQL_CHECK_MULTIBYTE
 
1428
if test "$with_named_curses" = "no"
 
1429
then
 
1430
  MYSQL_CHECK_LIB_TERMCAP
 
1431
else
 
1432
  TERMCAP_LIB="$with_named_curses"
 
1433
fi
 
1434
AC_SUBST(TERMCAP_LIB)
 
1435
 
 
1436
# Check if the termcap function 'tgoto' is already declared in
 
1437
# system header files or if it need to be declared locally
 
1438
AC_CHECK_DECLS(tgoto,,,[
 
1439
#ifdef HAVE_CURSES_H
 
1440
# include <curses.h>
 
1441
#elif HAVE_NCURSES_H
 
1442
# include <ncurses.h>
 
1443
#endif
 
1444
#ifdef HAVE_TERM_H
 
1445
# include <term.h>
 
1446
#endif
 
1447
])
 
1448
 
 
1449
LIBEDIT_LOBJECTS=""
 
1450
AC_CHECK_FUNC(strunvis, ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS unvis.o"])
 
1451
AC_CHECK_FUNC(strvis,   ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS vis.o"])
 
1452
AC_CHECK_FUNC(strlcpy,  ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS strlcpy.o"])
 
1453
AC_CHECK_FUNC(strlcat,  ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS strlcat.o"])
 
1454
AC_CHECK_FUNC(fgetln,   ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS fgetln.o"])
 
1455
AC_SUBST(LIBEDIT_LOBJECTS)
 
1456
enable_readline="yes"
 
1457
 
 
1458
# End of readline/libedit stuff
 
1459
#########################################################################
 
1460
 
 
1461
dnl Checks for library functions.
 
1462
 
 
1463
#
 
1464
# The following code disables intrinsic function support while we test for
 
1465
# library functions.  This is to avoid configure problems with Intel ecc
 
1466
# compiler
 
1467
 
 
1468
ORG_CFLAGS="$CFLAGS"
 
1469
if test "$GCC" != "yes"; then
 
1470
  AC_SYS_COMPILER_FLAG(-nolib_inline,nolib_inline,CFLAGS,[],[])
 
1471
fi
 
1472
 
 
1473
#AC_FUNC_MMAP
 
1474
AC_TYPE_SIGNAL
 
1475
MYSQL_TYPE_QSORT
 
1476
AC_FUNC_UTIME_NULL
 
1477
AC_FUNC_VPRINTF
 
1478
 
 
1479
AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
 
1480
  chsize cuserid fchmod fcntl \
 
1481
  fconvert fdatasync finite fpresetsticky fpsetmask fsync ftruncate \
 
1482
  getcwd getpass getpassphrase getpwnam \
 
1483
  getpwuid getrlimit getrusage getwd index initgroups isnan \
 
1484
  localtime_r gethrtime gmtime_r \
 
1485
  locking longjmp lrand48 madvise mallinfo memcpy memmove \
 
1486
  mkstemp mlockall perror poll pread pthread_attr_create mmap mmap64 getpagesize \
 
1487
  pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
 
1488
  pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
 
1489
  pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
 
1490
  pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
 
1491
  realpath rename rint rwlock_init setupterm \
 
1492
  shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \
 
1493
  sighold sigset sigthreadmask port_create sleep \
 
1494
  snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
 
1495
  strtol strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \
 
1496
  posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd)
 
1497
 
 
1498
# Check that isinf() is available in math.h and can be used in both C and C++ 
 
1499
# code
 
1500
AC_MSG_CHECKING(for isinf in <math.h>)
 
1501
AC_TRY_LINK([#include <math.h>], [float f = 0.0; int r = isinf(f); return r],
 
1502
  AC_MSG_RESULT(yes)
 
1503
  AC_MSG_CHECKING(whether isinf() can be used in C++ code)
 
1504
  AC_LANG_SAVE
 
1505
  AC_LANG_CPLUSPLUS
 
1506
  AC_TRY_LINK([#include <math.h>], [float f = 0.0; int r = isinf(f); return r],
 
1507
    AC_MSG_RESULT(yes)
 
1508
    AC_DEFINE(HAVE_ISINF, [1], [isinf() macro or function]),
 
1509
    AC_MSG_RESULT(no))
 
1510
  AC_LANG_RESTORE,
 
1511
  AC_MSG_RESULT(no))
 
1512
 
 
1513
CFLAGS="$ORG_CFLAGS"
 
1514
 
 
1515
# Sanity check: We chould not have any fseeko symbol unless
 
1516
# large_file_support=yes
 
1517
AC_CHECK_FUNC(fseeko,
 
1518
[if test "$large_file_support" = no -a "$TARGET_LINUX" = "true";
 
1519
then
 
1520
  AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!")
 
1521
fi]
 
1522
)
 
1523
 
 
1524
# Check definition of gethostbyaddr_r (glibc2 defines this with 8 arguments)
 
1525
ac_save_CXXFLAGS="$CXXFLAGS"
 
1526
AC_CACHE_CHECK([style of gethost* routines], mysql_cv_gethost_style,
 
1527
AC_LANG_SAVE
 
1528
AC_LANG_CPLUSPLUS
 
1529
 
 
1530
# Test whether madvise() is declared in C++ code -- it is not on some
 
1531
# systems, such as Solaris
 
1532
AC_CHECK_DECLS(madvise, [], [], [#if HAVE_SYS_MMAN_H
 
1533
#include <sys/types.h>
 
1534
#include <sys/mman.h>
 
1535
#endif])
 
1536
 
 
1537
# Do not treat warnings as errors if we are linking against other libc
 
1538
# this is to work around gcc not being permissive on non-system includes
 
1539
# with respect to ANSI C++
 
1540
# We also remove the -fbranch-probabilities option as this will give warnings
 
1541
# about not profiled code, which confuses configure
 
1542
# We also must remove -W and -Wcheck which on icc produces warnings that
 
1543
# we don't want to catch with -Werror
 
1544
 
 
1545
if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
 
1546
then
 
1547
  CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-ansi//; s/-pedantic//; s/-Wcheck//'`
 
1548
fi
 
1549
 
 
1550
AC_TRY_COMPILE(
 
1551
[#undef inline
 
1552
#if !defined(_REENTRANT)
 
1553
#define _REENTRANT
 
1554
#endif
 
1555
#include <pthread.h>
 
1556
#include <sys/types.h>
 
1557
#include <sys/socket.h>
 
1558
#include <netinet/in.h>
 
1559
#include <arpa/inet.h>
 
1560
#include <netdb.h>],
 
1561
[int skr;
 
1562
 struct hostent *foo = gethostbyaddr_r((const char *) 0,
 
1563
  0, 0, (struct hostent *) 0, (char *) NULL,  0, &skr); return (foo == 0);],
 
1564
mysql_cv_gethost_style=solaris, mysql_cv_gethost_style=other))
 
1565
AC_LANG_RESTORE
 
1566
CXXFLAGS="$ac_save_CXXFLAGS"
 
1567
if test "$mysql_cv_gethost_style" = "solaris"
 
1568
then
 
1569
  AC_DEFINE([HAVE_SOLARIS_STYLE_GETHOST], [1],
 
1570
            [Solaris define gethostbyaddr_r with 7 arguments. glibc2 defines this with 8 arguments])
 
1571
fi
 
1572
 
 
1573
#---START: Used in for client configure
 
1574
 
 
1575
# Check definition of gethostbyname_r (glibc2.0.100 is different from Solaris)
 
1576
ac_save_CXXFLAGS="$CXXFLAGS"
 
1577
AC_CACHE_CHECK([style of gethostbyname_r routines], mysql_cv_gethostbyname_style,
 
1578
AC_LANG_SAVE
 
1579
AC_LANG_CPLUSPLUS
 
1580
if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
 
1581
then
 
1582
  CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-ansi//; s/-pedantic//; s/-Wcheck//'`
 
1583
fi
 
1584
AC_TRY_COMPILE(
 
1585
[#undef inline
 
1586
#if !defined(_REENTRANT)
 
1587
#define _REENTRANT
 
1588
#endif
 
1589
#include <pthread.h>
 
1590
#include <sys/types.h>
 
1591
#include <sys/socket.h>
 
1592
#include <netinet/in.h>
 
1593
#include <arpa/inet.h>
 
1594
#include <netdb.h>],
 
1595
[int skr;
 
1596
 
 
1597
 skr = gethostbyname_r((const char *) 0,
 
1598
  (struct hostent*) 0, (char*) 0, 0, (struct hostent **) 0, &skr);],
 
1599
mysql_cv_gethostbyname_style=glibc2, mysql_cv_gethostbyname_style=other))
 
1600
AC_LANG_RESTORE
 
1601
CXXFLAGS="$ac_save_CXXFLAGS"
 
1602
if test "$mysql_cv_gethostbyname_style" = "glibc2"
 
1603
then
 
1604
  AC_DEFINE([HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE], [1],
 
1605
            [Solaris define gethostbyname_r with 5 arguments. glibc2 defines this with 6 arguments])
 
1606
fi
 
1607
 
 
1608
# Check 3rd argument of getthostbyname_r
 
1609
ac_save_CXXFLAGS="$CXXFLAGS"
 
1610
AC_CACHE_CHECK([3 argument to gethostbyname_r routines], mysql_cv_gethostbyname_arg,
 
1611
AC_LANG_SAVE
 
1612
AC_LANG_CPLUSPLUS
 
1613
if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
 
1614
then
 
1615
  CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-ansi//; s/-pedantic//; s/-Wcheck//'`
 
1616
fi
 
1617
AC_TRY_COMPILE(
 
1618
[#undef inline
 
1619
#if !defined(_REENTRANT)
 
1620
#define _REENTRANT
 
1621
#endif
 
1622
#include <pthread.h>
 
1623
#include <sys/types.h>
 
1624
#include <sys/socket.h>
 
1625
#include <netinet/in.h>
 
1626
#include <arpa/inet.h>
 
1627
#include <netdb.h>],
 
1628
[int skr;
 
1629
 
 
1630
 skr = gethostbyname_r((const char *) 0, (struct hostent*) 0, (struct hostent_data*) 0);],
 
1631
mysql_cv_gethostbyname_arg=hostent_data, mysql_cv_gethostbyname_arg=char))
 
1632
AC_LANG_RESTORE
 
1633
CXXFLAGS="$ac_save_CXXFLAGS"
 
1634
if test "$mysql_cv_gethostbyname_arg" = "hostent_data"
 
1635
then
 
1636
  AC_DEFINE([HAVE_GETHOSTBYNAME_R_RETURN_INT], [1],
 
1637
            [In OSF 4.0f the 3'd argument to gethostbyname_r is hostent_data *])
 
1638
fi
 
1639
 
 
1640
 
 
1641
# Check definition of pthread_getspecific
 
1642
AC_CACHE_CHECK("args to pthread_getspecific", mysql_cv_getspecific_args,
 
1643
AC_TRY_COMPILE(
 
1644
[#if !defined(_REENTRANT)
 
1645
#define _REENTRANT
 
1646
#endif
 
1647
#define _POSIX_PTHREAD_SEMANTICS 
 
1648
#include <pthread.h> ],
 
1649
[ void *pthread_getspecific(pthread_key_t key);
 
1650
pthread_getspecific((pthread_key_t) NULL); ],
 
1651
mysql_cv_getspecific_args=POSIX, mysql_cv_getspecific_args=other))
 
1652
  if test "$mysql_cv_getspecific_args" = "other"
 
1653
  then
 
1654
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1],
 
1655
              [For some non posix threads])
 
1656
  fi
 
1657
 
 
1658
  # Check definition of pthread_mutex_init
 
1659
  AC_CACHE_CHECK("args to pthread_mutex_init", mysql_cv_mutex_init_args,
 
1660
  AC_TRY_COMPILE(
 
1661
[#define _REENTRANT
 
1662
#define _POSIX_PTHREAD_SEMANTICS 
 
1663
#include <pthread.h> ],
 
1664
 
1665
  pthread_mutexattr_t attr;
 
1666
  pthread_mutex_t mp;
 
1667
  pthread_mutex_init(&mp,&attr); ],
 
1668
mysql_cv_mutex_init_args=POSIX, mysql_cv_mutex_init_args=other))
 
1669
  if test "$mysql_cv_mutex_init_args" = "other"
 
1670
  then
 
1671
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1],
 
1672
              [For some non posix threads])
 
1673
  fi
 
1674
#---END:
 
1675
 
 
1676
#---START: Used in for client configure
 
1677
# Check definition of readdir_r
 
1678
AC_CACHE_CHECK("args to readdir_r", mysql_cv_readdir_r,
 
1679
AC_TRY_LINK(
 
1680
[#define _REENTRANT
 
1681
#define _POSIX_PTHREAD_SEMANTICS 
 
1682
#include <pthread.h>
 
1683
#include <dirent.h>],
 
1684
[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
 
1685
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ],
 
1686
mysql_cv_readdir_r=POSIX, mysql_cv_readdir_r=other))
 
1687
if test "$mysql_cv_readdir_r" = "POSIX"
 
1688
then
 
1689
  AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r])
 
1690
fi
 
1691
 
 
1692
# Check definition of posix sigwait()
 
1693
AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait,
 
1694
AC_TRY_LINK(
 
1695
[#define _REENTRANT
 
1696
#define _POSIX_PTHREAD_SEMANTICS 
 
1697
#include <pthread.h>
 
1698
#include <signal.h>],
 
1699
[#ifndef _AIX
 
1700
sigset_t set;
 
1701
int sig;
 
1702
sigwait(&set,&sig);
 
1703
#endif],
 
1704
mysql_cv_sigwait=POSIX, mysql_cv_sigwait=other))
 
1705
if test "$mysql_cv_sigwait" = "POSIX"
 
1706
then
 
1707
  AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait])
 
1708
fi
 
1709
 
 
1710
if test "$mysql_cv_sigwait" != "POSIX"
 
1711
then
 
1712
unset mysql_cv_sigwait
 
1713
# Check definition of posix sigwait()
 
1714
AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait,
 
1715
AC_TRY_LINK(
 
1716
[#define _REENTRANT
 
1717
#define _POSIX_PTHREAD_SEMANTICS 
 
1718
#include <pthread.h>
 
1719
#include <signal.h>],
 
1720
[sigset_t set;
 
1721
int sig;
 
1722
sigwait(&set);],
 
1723
mysql_cv_sigwait=NONPOSIX, mysql_cv_sigwait=other))
 
1724
if test "$mysql_cv_sigwait" = "NONPOSIX"
 
1725
then
 
1726
  AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument])
 
1727
fi
 
1728
fi
 
1729
#---END:
 
1730
 
 
1731
# Check if pthread_attr_setscope() exists
 
1732
AC_CACHE_CHECK("for pthread_attr_setscope", mysql_cv_pthread_attr_setscope,
 
1733
AC_TRY_LINK(
 
1734
[#define _REENTRANT
 
1735
#define _POSIX_PTHREAD_SEMANTICS 
 
1736
#include <pthread.h>],
 
1737
[pthread_attr_t thr_attr;
 
1738
pthread_attr_setscope(&thr_attr,0);],
 
1739
mysql_cv_pthread_attr_setscope=yes, mysql_cv_pthread_attr_setscope=no))
 
1740
if test "$mysql_cv_pthread_attr_setscope" = "yes"
 
1741
then
 
1742
  AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope])
 
1743
fi
 
1744
 
 
1745
# Check for bad includes
 
1746
AC_MSG_CHECKING("can netinet files be included")
 
1747
AC_TRY_COMPILE(
 
1748
[#include <sys/types.h>
 
1749
#include <sys/socket.h>
 
1750
#include <netinet/in_systm.h>
 
1751
#include <netinet/in.h>
 
1752
#include <netinet/ip.h>
 
1753
#include <netinet/tcp.h>],
 
1754
[ printf("1\n"); ],
 
1755
netinet_inc=yes, netinet_inc=no)
 
1756
if test "$netinet_inc" = "no"
 
1757
then
 
1758
  AC_DEFINE([HAVE_BROKEN_NETINET_INCLUDES], [1], [Can netinet be included])
 
1759
fi
 
1760
AC_MSG_RESULT("$netinet_inc")
 
1761
 
 
1762
AC_LANG_SAVE
 
1763
AC_LANG_CPLUSPLUS
 
1764
AC_CHECK_HEADERS(cxxabi.h)
 
1765
AC_CACHE_CHECK([checking for abi::__cxa_demangle], mysql_cv_cxa_demangle,
 
1766
[AC_TRY_LINK([#include <cxxabi.h>], [
 
1767
  char *foo= 0; int bar= 0;
 
1768
  foo= abi::__cxa_demangle(foo, foo, 0, &bar);
 
1769
], [mysql_cv_cxa_demangle=yes], [mysql_cv_cxa_demangle=no])])
 
1770
AC_LANG_RESTORE
 
1771
 
 
1772
if test "x$mysql_cv_cxa_demangle" = xyes; then
 
1773
  AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1,
 
1774
            [Define to 1 if you have the `abi::__cxa_demangle' function.])
 
1775
fi
 
1776
 
 
1777
#--------------------------------------------------------------------
 
1778
# Check for requested features
 
1779
#--------------------------------------------------------------------
 
1780
 
 
1781
MYSQL_CHECK_BIG_TABLES
 
1782
MYSQL_CHECK_MAX_INDEXES
 
1783
MYSQL_CHECK_VIO
 
1784
 
 
1785
#--------------------------------------------------------------------
 
1786
# Declare our plugin modules
 
1787
# Has to be done late, as the plugin may need to check for existence of
 
1788
# functions tested above
 
1789
#--------------------------------------------------------------------
 
1790
 
 
1791
MYSQL_CONFIGURE_PLUGINS([none])
 
1792
 
 
1793
# Only build client code?
 
1794
AC_ARG_WITH(server,
 
1795
    [  --without-server        Only build the client.],
 
1796
    [with_server=$withval],
 
1797
    [with_server=yes]
 
1798
)
 
1799
 
 
1800
#MYSQL_CHECK_CPU
 
1801
 
 
1802
# If we have threads generate some library functions and test programs
 
1803
sql_server_dirs=
 
1804
sql_server=
 
1805
server_scripts=
 
1806
 
 
1807
dnl This probably should be cleaned up more - for now the threaded
 
1808
dnl client is just using plain-old libs.
 
1809
sql_client_dirs="strings regex mysys libmysql"
 
1810
 
 
1811
AM_CONDITIONAL(THREAD_SAFE_CLIENT, test "$THREAD_SAFE_CLIENT" != "no")
 
1812
 
 
1813
if test "$THREAD_SAFE_CLIENT" != "no"
 
1814
then
 
1815
  sql_client_dirs="$sql_client_dirs libmysql_r"
 
1816
  AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should the client be thread safe])
 
1817
fi
 
1818
sql_client_dirs="$sql_client_dirs client"
 
1819
 
 
1820
CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS"
 
1821
 
 
1822
AC_SUBST(CLIENT_LIBS)
 
1823
AC_SUBST(CLIENT_THREAD_LIBS)
 
1824
AC_SUBST(NON_THREADED_LIBS)
 
1825
AC_SUBST(STATIC_NSS_FLAGS)
 
1826
AC_SUBST(sql_client_dirs)
 
1827
 
 
1828
if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no"
 
1829
then
 
1830
  AC_DEFINE([THREAD], [1],
 
1831
            [Define if you want to have threaded code. This may be undef on client code])
 
1832
  # Avoid _PROGRAMS names
 
1833
  THREAD_LOBJECTS="thr_alarm.o thr_lock.o thr_mutex.o thr_rwlock.o my_pthread.o my_thr_init.o mf_keycache.o"
 
1834
  AC_SUBST(THREAD_LOBJECTS)
 
1835
  server_scripts="mysqld_safe mysql_install_db"
 
1836
  sql_server_dirs="strings mysys dbug extra regex"
 
1837
 
 
1838
  sql_server="vio sql"
 
1839
fi
 
1840
 
 
1841
# IMPORTANT - do not modify LIBS past this line - this hack is the only way
 
1842
# I know to add the static NSS magic if we have static NSS libraries with
 
1843
# glibc - Sasha
 
1844
 
 
1845
LDFLAGS="$LDFLAGS $OTHER_LIBC_LIB"
 
1846
LIBS="$LIBS $STATIC_NSS_FLAGS"
 
1847
 
 
1848
AC_SUBST(sql_server_dirs)
 
1849
AC_SUBST(sql_server)
 
1850
AC_SUBST(server_scripts)
 
1851
 
 
1852
AC_SUBST(mysql_plugin_dirs)
 
1853
AC_SUBST(mysql_plugin_libs)
 
1854
AC_SUBST(mysql_plugin_defs)
 
1855
 
 
1856
 
 
1857
# Now that sql_client_dirs and sql_server_dirs are stable, determine the union.
 
1858
# Start with the (longer) server list, add each client item not yet present.
 
1859
sql_union_dirs=" $sql_server_dirs "
 
1860
for DIR in $sql_client_dirs
 
1861
do
 
1862
  if echo " $sql_union_dirs " | grep " $DIR " >/dev/null
 
1863
  then
 
1864
    :  # already present, skip
 
1865
  else
 
1866
    sql_union_dirs="$sql_union_dirs $DIR "
 
1867
  fi
 
1868
done
 
1869
AC_SUBST(sql_union_dirs)
 
1870
 
 
1871
# Some usefull subst
 
1872
AC_SUBST(CC)
 
1873
AC_SUBST(GXX)
 
1874
 
 
1875
# Set configuration options for make_binary_distribution
 
1876
case $SYSTEM_TYPE in
 
1877
  *netware*)
 
1878
    MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --no-strip"
 
1879
    ;;
 
1880
  *)
 
1881
    : # no change for other platforms yet
 
1882
    ;;
 
1883
esac
 
1884
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
 
1885
 
 
1886
# Output results
 
1887
if test -d "$srcdir/pstack" ; then
 
1888
  AC_CONFIG_FILES(pstack/Makefile pstack/aout/Makefile)
 
1889
fi
 
1890
 
 
1891
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
 
1892
 unittest/Makefile unittest/mytap/Makefile unittest/mytap/t/Makefile dnl
 
1893
 unittest/mysys/Makefile unittest/examples/Makefile dnl
 
1894
 strings/Makefile regex/Makefile storage/Makefile dnl
 
1895
 BUILD/Makefile vio/Makefile dnl
 
1896
 libmysql/Makefile libmysql_r/Makefile client/Makefile dnl
 
1897
 sql/Makefile sql/share/Makefile dnl
 
1898
 sql/sql_builtin.cc sql-common/Makefile dnl
 
1899
 dbug/Makefile scripts/Makefile include/Makefile dnl
 
1900
 tests/Makefile support-files/Makefile dnl
 
1901
 support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile dnl
 
1902
 mysql-test/Makefile dnl
 
1903
 include/mysql_version.h plugin/Makefile)
 
1904
 
 
1905
AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
 
1906
 
 
1907
# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
 
1908
AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS'")
 
1909
 
 
1910
AC_OUTPUT