~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Brian Aker
  • Date: 2008-07-04 17:39:41 UTC
  • mfrom: (53.2.3 codestyle2)
  • Revision ID: brian@tangent.org-20080704173941-z0s9jhsl26i3ax1w
Merge from incomming patch from Monty covering warnings

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl -*- bash -*-
 
1
dnl -*- ksh -*-
2
2
dnl Process this file with autoconf to produce a configure script.
3
3
 
4
 
AC_PREREQ(2.59)dnl              Minimum Autoconf version required.
 
4
AC_PREREQ(2.61)dnl              Minimum Autoconf version required.
5
5
 
6
 
AC_INIT(drizzle, [7.0.0], [http://bugs.launchpad.net/drizzle])
7
 
AC_CONFIG_SRCDIR([drizzled/drizzled.cc])
 
6
AC_INIT
 
7
AC_CONFIG_SRCDIR([sql/mysqld.cc])
8
8
AC_CONFIG_AUX_DIR(config)
9
 
AC_CONFIG_HEADERS([config.h])
10
 
 
11
 
# Setting CFLAGS here prevents AC_CANONICAL_TARGET from injecting them
12
 
SAVE_CFLAGS=${CFLAGS}
13
 
SAVE_CXXFLAGS=${CXXFLAGS}
14
 
CFLAGS=
15
 
CXXFLAGS=
16
 
 
 
9
AC_CONFIG_HEADERS([include/config.h:config.h.in])
17
10
AC_CANONICAL_TARGET
18
 
 
19
 
CFLAGS=${SAVE_CFLAGS}
20
 
CXXFLAGS=${SAVE_CXXFLAGS}
21
 
 
22
 
AM_INIT_AUTOMAKE(nostdinc -Wall -Werror)
23
 
if test "x${enable_dependency_tracking}" = "x"
24
 
then
25
 
  enable_dependency_tracking=yes
26
 
fi
27
 
 
28
 
 
 
11
AM_INIT_AUTOMAKE(mysql, 7.0.0, no-define)
 
12
 
 
13
PROTOCOL_VERSION=10
 
14
DOT_FRM_VERSION=6
29
15
# See the libtool docs for information on how to do shared lib versions.
30
 
SHARED_LIB_MAJOR_VERSION=1
 
16
SHARED_LIB_MAJOR_VERSION=16
31
17
SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0
32
 
AC_SUBST(SHARED_LIB_MAJOR_VERSION)
33
 
AC_SUBST(SHARED_LIB_VERSION)
34
 
 
35
 
 
36
 
dnl Checks for programs.
37
 
AC_PROG_CC
38
 
 
39
 
ACX_USE_SYSTEM_EXTENSIONS
40
 
AC_PROG_CXX
41
 
AC_CXX_HEADER_STDCXX_98
42
 
if test "$ac_cv_cxx_stdcxx_98" = "no"
43
 
then
44
 
  AC_MSG_ERROR([C++ Compiler required to compile Drizzle])
45
 
fi
46
 
AC_PROG_CPP
47
 
AM_PROG_CC_C_O
48
 
 
49
 
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
50
 
ifdef([AC_PROG_CC_C99],[
51
 
    AC_PROG_CC_C99([$1],[$2],[$3])
52
 
],[
53
 
if "x$GCC" = "xyes"
54
 
then
55
 
  C99_SUPPORT_HACK="-std=gnu99"
56
 
fi
57
 
if "x$SUNCC" = "xyes"
58
 
then
59
 
  C99_SUPPORT_HACK="-xc99"
60
 
fi
61
 
])
62
18
 
63
19
 
64
20
 
67
23
# We take some made up examples
68
24
#
69
25
#  VERSION                  5.1.40sp1-alpha     5.0.34a
70
 
#  DRIZZLE_NO_DASH_VERSION    5.1.40sp1           5.0.34a
71
 
#  DRIZZLE_NUMERIC_VERSION    5.1.40              5.0.34
72
 
#  DRIZZLE_BASE_VERSION       5.1                 5.0
73
 
#  DRIZZLE_VERSION_ID         50140               50034
 
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
74
30
#
75
 
DRIZZLE_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
76
 
DRIZZLE_NUMERIC_VERSION=`echo $DRIZZLE_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
77
 
DRIZZLE_BASE_VERSION=`echo $DRIZZLE_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
78
 
DRIZZLE_VERSION_ID=`echo $DRIZZLE_NUMERIC_VERSION | \
 
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 | \
79
35
    awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'`
80
 
AC_DEFINE_UNQUOTED(DRIZZLE_BASE_VERSION,["$DRIZZLE_BASE_VERSION"],
81
 
                   [Major and minor version])
82
 
AC_DEFINE_UNQUOTED([DRIZZLE_VERSION_ID],[$DRIZZLE_VERSION_ID],
83
 
                   [Version ID that can be easily used for numeric comparison])
84
36
 
85
37
# The port should be constant for a LONG time
86
 
DRIZZLE_TCP_PORT_DEFAULT=4427
87
 
 
88
 
sinclude(m4/dtrace.m4)
89
 
 
90
 
sinclude(m4/character_sets.m4)
 
38
MYSQL_TCP_PORT_DEFAULT=3306
 
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)
 
51
 
 
52
# Remember to add a directory sql/share/LANGUAGE
 
53
AVAILABLE_LANGUAGES="\
 
54
czech danish dutch english estonian french german greek hungarian \
 
55
italian japanese korean norwegian norwegian-ny polish portuguese \
 
56
romanian russian serbian slovak spanish swedish ukrainian"
 
57
 
 
58
#####
 
59
#####
 
60
 
 
61
AC_SUBST(MYSQL_NO_DASH_VERSION)
 
62
AC_SUBST(MYSQL_BASE_VERSION)
 
63
AC_SUBST(MYSQL_VERSION_ID)
 
64
AC_SUBST(MYSQL_PREVIOUS_BASE_VERSION)
 
65
AC_SUBST(PROTOCOL_VERSION)
 
66
AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION],
 
67
                   [mysql client protocol version])
 
68
AC_SUBST(DOT_FRM_VERSION)
 
69
AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION],
 
70
                   [Version of .frm files])
 
71
AC_SUBST(SHARED_LIB_MAJOR_VERSION)
 
72
AC_SUBST(SHARED_LIB_VERSION)
91
73
AC_SUBST(AVAILABLE_LANGUAGES)
92
74
 
93
 
sinclude(m4/gettext.m4)
94
 
AM_GNU_GETTEXT([external])
95
 
AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
96
 
 
97
 
# Set this for plugins to use
98
 
ac_build_drizzle="yes"
99
 
 
100
75
 
101
76
# Canonicalize the configuration name.
102
77
 
124
99
  i?86) BASE_MACHINE_TYPE=i386 ;;
125
100
esac
126
101
 
 
102
# Save some variables and the command line options for mysqlbug
 
103
SAVE_CC="$CC"
 
104
SAVE_CXX="$CXX"
 
105
SAVE_ASFLAGS="$ASFLAGS"
 
106
SAVE_CFLAGS="$CFLAGS"
 
107
SAVE_CXXFLAGS="$CXXFLAGS"
 
108
SAVE_LDFLAGS="$LDFLAGS"
 
109
SAVE_CXXLDFLAGS="$CXXLDFLAGS"
 
110
CONF_COMMAND="$0 $ac_configure_args"
 
111
AC_SUBST(CONF_COMMAND)
 
112
AC_SUBST(SAVE_CC)
 
113
AC_SUBST(SAVE_CXX)
 
114
AC_SUBST(SAVE_ASFLAGS)
 
115
AC_SUBST(SAVE_CFLAGS)
 
116
AC_SUBST(SAVE_CXXFLAGS)
 
117
AC_SUBST(SAVE_LDFLAGS)
 
118
AC_SUBST(SAVE_CXXLDFLAGS)
 
119
AC_SUBST(CXXLDFLAGS)
 
120
 
127
121
AM_SANITY_CHECK
128
122
# This is needed is SUBDIRS is set
129
123
AC_PROG_MAKE_SET
130
124
 
131
 
 
132
 
case "$target_os" in
133
 
  *linux*)
134
 
  TARGET_LINUX="true"
135
 
  AC_SUBST(TARGET_LINUX)
136
 
  AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
137
 
    ;;
138
 
  *apple-darwin*)
139
 
    TARGET_OSX="true"
140
 
    AC_SUBST(TARGET_OSX)
141
 
    AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX])
142
 
    ;;
143
 
  *solaris*)
144
 
    TARGET_SOLARIS="true"
145
 
    AC_SUBST(TARGET_SOLARIS)
146
 
    AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
147
 
    ;;
148
 
  *)
149
 
    ;;
150
 
esac
151
 
 
152
 
dnl AC_CANONICAL_HOST thinks it's a good idea to just set CFLAGS to 
153
 
dnl -g -O2 if you're running gcc. We would like to use something else, thanks.
154
 
if test "x${CFLAGS}" = "x-g -O2"
155
 
then
156
 
  CFLAGS=
157
 
fi
158
 
if test "x${CXXFLAGS}" = "x-g -O2"
159
 
then
160
 
  CXXFLAGS=
161
 
fi
162
 
 
163
 
DRIZZLE_CHECK_C_VERSION
164
 
DRIZZLE_CHECK_CXX_VERSION
165
 
 
166
 
AC_SYS_LARGEFILE
167
 
 
 
125
##############################################################################
 
126
# The below section needs to be done before AC_PROG_CC
 
127
##############################################################################
 
128
 
 
129
if test "x${CFLAGS-}" = x ; then
 
130
  cflags_is_set=no
 
131
else
 
132
  cflags_is_set=yes
 
133
fi
 
134
 
 
135
if test "x${CPPFLAGS-}" = x ; then
 
136
  cppflags_is_set=no
 
137
else
 
138
  cppflags_is_set=yes
 
139
fi
 
140
 
 
141
if test "x${LDFLAGS-}" = x ; then
 
142
  ldflags_is_set=no
 
143
else
 
144
  ldflags_is_set=yes
 
145
fi
 
146
 
 
147
################ End of section to be done before AC_PROG_CC #################
 
148
 
 
149
# The following hack should ensure that configure doesn't add optimizing
 
150
# or debugging flags to CFLAGS or CXXFLAGS
 
151
# C_EXTRA_FLAGS are flags that are automaticly added to both
 
152
# CFLAGS and CXXFLAGS
 
153
CFLAGS="$CFLAGS $C_EXTRA_FLAGS "
 
154
CXXFLAGS="$CXXFLAGS $C_EXTRA_FLAGS "
 
155
 
 
156
dnl Checks for programs.
168
157
AC_PROG_AWK
 
158
AC_PROG_CC
 
159
AC_PROG_CXX
 
160
AC_PROG_CPP
 
161
AM_PROG_CC_C_O
 
162
 
 
163
# Print version of CC and CXX compiler (if they support --version)
 
164
case $SYSTEM_TYPE in
 
165
  *netware*)
 
166
CC_VERSION=`$CC -version | grep -i version`
 
167
    ;;
 
168
  *)
 
169
CC_VERSION=`$CC --version | sed 1q`
 
170
    ;;
 
171
esac
 
172
if test $? -eq "0"
 
173
then
 
174
  AC_MSG_CHECKING("C Compiler version")
 
175
  AC_MSG_RESULT("$CC $CC_VERSION")
 
176
else
 
177
CC_VERSION=""
 
178
fi
 
179
AC_SUBST(CC_VERSION)
 
180
MYSQL_CHECK_CXX_VERSION
169
181
 
170
182
if test "$ac_cv_c_compiler_gnu" = "yes"
171
183
then
175
187
  AC_PATH_PROG(AS, as, as)
176
188
fi
177
189
 
178
 
dnl TODO: This needs to go away and be replaced with _ISOC99_SOURCE
179
 
if test "$ac_cv_c_compiler_gnu" = "yes" -o "$target_os" = "linux-gnu"
180
 
then
181
 
  AC_DEFINE([_GNU_SOURCE],[1],[Fix problem with S_ISLNK() on Linux])
182
 
fi
183
 
 
184
 
dnl  Solaris 9 include file <sys/feature_tests.h> refers to X/Open document
185
 
 
186
 
dnl  System Interfaces and Headers, Issue 5
187
 
 
188
 
dnl  saying we should define _XOPEN_SOURCE=500 to get POSIX.1c prototypes,
189
 
dnl  but apparently other systems (namely FreeBSD) don't agree.
190
 
 
191
 
dnl  On a newer Solaris 10, the above file recognizes also _XOPEN_SOURCE=600.
192
 
dnl  Furthermore, it tests that if a program requires older standard
193
 
dnl  (_XOPEN_SOURCE<600 or _POSIX_C_SOURCE<200112L) it cannot be
194
 
dnl  run on a new compiler (that defines _STDC_C99) and issues an #error.
195
 
dnl  It's also an #error if a program requires new standard (_XOPEN_SOURCE=600
196
 
dnl  or _POSIX_C_SOURCE=200112L) and a compiler does not define _STDC_C99.
197
 
 
198
 
dnl  To add more to this mess, Sun Studio C compiler defines _STDC_C99 while
199
 
dnl  C++ compiler does not!
200
 
 
201
 
dnl TODO: Can _ISOC99_SOURCE be defined on all platforms and remove the 
202
 
dnl       Need for all of this? 
203
 
if test "$GCC" = "yes"
204
 
then
205
 
  case "$target_os" in
206
 
    *solaris*)
207
 
    CFLAGS="${CFLAGS} -D_XOPEN_SOURCE=600"
208
 
    CXXFLAGS="${CXXFLAGS} -D__C99FEATURES__"
209
 
    ;;
210
 
  esac
211
 
fi
212
 
 
 
190
# Still need ranlib for readline; local static use only so no libtool.
 
191
AC_PROG_RANLIB
213
192
# We use libtool
 
193
#AC_LIBTOOL_WIN32_DLL
214
194
AC_PROG_LIBTOOL
215
195
 
216
196
# Ensure that we have --preserve-dup-deps defines, otherwise we get link
223
203
AC_PROG_INSTALL
224
204
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
225
205
 
226
 
# Look for "(group|user)add". 
227
 
# TODO: If the programs do not exist, inform the DBA that the user
228
 
#       was not created at the end of the install routine.
229
 
AC_CHECK_PROGS(GROUPADD, groupadd addgroup)
230
 
AC_CHECK_PROGS(USERADD, useradd adduser)
231
 
 
232
 
dnl Needed for ltmain
233
 
AC_PROG_RANLIB
234
 
 
235
 
dnl Not critical since the generated file is distributed
236
 
AC_CHECK_PROGS(YACC, ['bison -y'])
237
 
if test -z "$YACC" && test -d ".bzr"
238
 
then
239
 
  AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
240
 
fi
 
206
# Not critical since the generated file is distributed
 
207
AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL'])
241
208
 
242
209
AC_PATH_PROG(uname_prog, uname, no)
243
210
 
254
221
])
255
222
AC_MSG_RESULT($mysql_cv_sys_os)
256
223
 
 
224
# This should be rewritten to use $target_os
 
225
case "$target_os" in
 
226
  *solaris*)
 
227
    TARGET_SOLARIS="true"
 
228
    AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
 
229
    AC_SUBST(TARGET_SOLARIS)
 
230
  ;;
 
231
esac
257
232
 
258
233
# The following is required for portable results of floating point calculations
259
234
# on PowerPC. The same must also be done for IA-64, but this options is missing
263
238
then
264
239
  case "$host_cpu" in
265
240
    *ppc* | *powerpc*)
266
 
      AM_CFLAGS="$CFLAGS -mno-fused-madd"
267
 
      AM_CXXFLAGS="$CXXFLAGS -mno-fused-madd"
 
241
      CFLAGS="$CFLAGS -mno-fused-madd"
 
242
      CXXFLAGS="$CXXFLAGS -mno-fused-madd"
268
243
    ;;
269
244
  esac
270
245
fi
271
 
# Build optimized or debug version ?
272
 
# First check for gcc and g++
273
 
SYMBOLS_FLAGS="-g"
274
 
DEBUG_OPTIMIZE_CC=""
275
 
OPTIMIZE_CFLAGS="-O"
276
 
DEBUG_OPTIMIZE_CXX=""
277
 
OPTIMIZE_CXXFLAGS="-O"
278
 
if test "$GCC" = "yes"
279
 
then
280
 
  SYMBOLS_FLAGS="-ggdb3"
281
 
  DEBUG_OPTIMIZE_CC="-O0"
282
 
  OPTIMIZE_CFLAGS="-O3"
283
 
  DEBUG_OPTIMIZE_CXX="-O0"
284
 
  OPTIMIZE_CXXFLAGS="-O3"
285
 
fi
286
 
if test "$SUNCC" = "yes"
287
 
then
288
 
  dnl I'm cheating here and sticking C99 support in SYMBOLS_FLAGS
289
 
  SYMBOLS_FLAGS=""
290
 
  DEBUG_OPTIMIZE_CC=""
291
 
  if test "$target_cpu" = "sparc"
292
 
  then
293
 
    MEMALIGN_FLAGS="-xmemalign=8s"
294
 
  fi
295
 
  OPTIMIZE_CFLAGS="-xO4 -xlibmil -xdepend -Xa -mt -xstrconst -D_FORTEC_ ${MEMALIGN_FLAGS}"
296
 
  DEBUG_OPTIMIZE_CXX=""
297
 
  #Put back in once isnan is figured out
298
 
  OPTIMIZE_CXXFLAGS="-xO4 -xlibmil -mt -D_FORTEC_ -xlang=c99 -compat=5 -library=stlport4 ${MEMALIGN_FLAGS}"
299
 
fi
300
 
 
301
 
dnl TODO: Remove this define once we are using 2.61 across the board.
302
 
# AX_HEADER_ASSERT
303
 
# ----------------
304
 
# Check whether to enable assertions.
305
 
AC_DEFUN([AX_HEADER_ASSERT],
306
 
[
307
 
  AC_MSG_CHECKING([whether to enable assertions])
308
 
  AC_ARG_ENABLE([assert],
309
 
    [AS_HELP_STRING([--disable-assert],
310
 
       [Turn off assertions])],
311
 
    [ac_cv_assert="no"],
312
 
    [ac_cv_assert="yes"])
313
 
  AC_MSG_RESULT([$ac_cv_assert])
314
 
])
315
 
 
316
 
AX_HEADER_ASSERT
317
 
 
318
 
CFLAGS="${SYMBOLS_FLAGS} ${CFLAGS}"
319
 
CXXFLAGS="${SYMBOLS_FLAGS} ${CXXFLAGS}"
320
 
 
321
 
AC_ARG_WITH([debug],
322
 
    [AS_HELP_STRING([--with-debug],
323
 
       [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
324
 
    [with_debug=$withval],
325
 
    [with_debug=no])
326
 
if test "$with_debug" = "yes"
327
 
then
328
 
  # Medium debug.
329
 
  CFLAGS="$DEBUG_OPTIMIZE_CC -DDEBUG $CFLAGS ${SAVE_CFLAGS}"
330
 
  CXXFLAGS="$DEBUG_OPTIMIZE_CXX -DDEBUG $CXXFLAGS ${SAVE_CXXFLAGS}"
331
 
else
332
 
  # Optimized version. No debug
333
 
  CFLAGS="${OPTIMIZE_CFLAGS} ${CFLAGS} ${SAVE_CFLAGS}"
334
 
  CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS ${SAVE_CXXFLAGS}"
335
 
fi
336
246
 
337
247
AC_SUBST(CC)
338
248
AC_SUBST(CFLAGS)
345
255
 
346
256
export CC CXX CFLAGS LD LDFLAGS AR ARFLAGS
347
257
 
348
 
AC_CXX_STL_HASH
349
 
AC_CXX_CSTDINT
350
 
AC_CXX_CINTTYPES
351
 
AC_CXX_CMATH
352
 
 
353
 
DRIZZLE_PROG_AR
354
 
 
355
 
# libdrizzle versioning when linked with GNU ld.
356
 
if test "x$EGREP" != "x"
 
258
if test "$GCC" = "yes"
357
259
then
358
 
  if test "$lt_cv_prog_gnu_ld" = "yes" -a $LD --version 2>/dev/null|${EGREP} -q GNU
359
 
  then
360
 
    LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libdrizzle/libdrizzle.ver"
361
 
  fi
 
260
  # mysqld requires -fno-implicit-templates.
 
261
  # Disable exceptions as they seams to create problems with gcc and threads.
 
262
  # mysqld doesn't use run-time-type-checking, so we disable it.
 
263
  # We should use -Wno-invalid-offsetof flag to disable some warnings from gcc
 
264
  # regarding offset() usage in C++ which are done in a safe manner in the
 
265
  # server
 
266
  CXXFLAGS="$CXXFLAGS ${GCC_WARNINGS} -fno-implicit-templates -fno-exceptions -fno-rtti"
 
267
  CFLAGS="$CFLAGS ${GCC_WARNINGS} "
 
268
  AC_DEFINE([HAVE_EXPLICIT_TEMPLATE_INSTANTIATION],
 
269
    [1], [Defined by configure. Use explicit template instantiation.])
 
270
fi
 
271
 
 
272
MYSQL_PROG_AR
 
273
 
 
274
# libmysqlclient versioning when linked with GNU ld.
 
275
if $LD --version 2>/dev/null|grep -q GNU; then
 
276
  LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/libmysql/libmysql.ver"
 
277
  AC_CONFIG_FILES(libmysql/libmysql.ver)
362
278
fi
363
279
AC_SUBST(LD_VERSION_SCRIPT)
364
280
 
365
 
#--------------------------------------------------------------------
366
 
# Check for Google Proto Buffers
367
 
#--------------------------------------------------------------------
368
 
 
369
 
AC_LANG_PUSH([C++])
370
 
SEARCH_FOR_LIB(protobuf, printf, google/protobuf/message.h,
371
 
               AC_MSG_ERROR([protobuf is required for Drizzle]))
372
 
 
373
 
AC_PATH_PROG([PROTOC],[protoc],[no],[$PROTOBUF_PATH])
374
 
if test "x$PROTOC" = "xno"
375
 
then
376
 
  AC_MSG_ERROR([Couldn't find protoc. Try installing Google Protocol Buffer.])
377
 
fi
378
 
 
379
 
AC_LANG_POP()
380
 
 
381
 
#--------------------------------------------------------------------
382
 
# Check for libuuid
383
 
#--------------------------------------------------------------------
384
 
 
385
 
dnl Do this by hand instead of with SEARCH_FOR_LIB, because uuid is weird.
386
 
AC_CHECK_HEADERS(uuid/uuid.h)
387
 
if test "x$ac_cv_header_uuid_uuid_h" = "xno"
388
 
then
389
 
  AC_MSG_ERROR([Couldn't find uuid/uuid.h. Try installing libuuid development packages])
390
 
fi
391
 
AC_CHECK_LIB(uuid, uuid_generate)
392
 
 
393
 
#--------------------------------------------------------------------
394
 
# Check for libevent
395
 
#--------------------------------------------------------------------
396
 
 
397
 
SEARCH_FOR_LIB(event, event_loop, event.h, 
398
 
               AC_MSG_ERROR([libevent is required for Drizzle]))
399
 
 
400
 
 
401
 
AC_CACHE_CHECK([for bufferevent in libevent], ac_cv_libevent_works, [
402
 
  save_CPPFLAGS="$CPPFLAGS"
403
 
  save_LIBS="$LIBS"
404
 
  CPPFLAGS="$EVENT_CFLAGS"
405
 
  LIBS="$EVENT_LIBS"
406
 
  AC_TRY_LINK([
407
 
#include <sys/types.h>
408
 
#include <sys/time.h>
409
 
#include <stdlib.h>
410
 
#include <event.h>],[
411
 
        struct bufferevent bev;
412
 
        bufferevent_settimeout(&bev, 1, 1);
413
 
  ], ac_cv_libevent_works=yes, [
414
 
        AC_MSG_ERROR([you need to install a more recent version of libevent,
415
 
        check http://www.monkey.org/~provos/libevent/])
416
 
  ])
417
 
 
418
 
  CPPFLAGS="$save_CPPFLAGS"
419
 
  LIBS="$save_LIBS"
420
 
])
421
 
 
422
 
 
423
 
#--------------------------------------------------------------------
424
 
# Check for libpthread
425
 
#--------------------------------------------------------------------
426
 
 
427
 
AC_CHECK_HEADERS(pthread.h)
428
 
if test "x$ac_cv_header_pthread_h" != "xyes"
429
 
then
430
 
  AC_MSG_ERROR([Couldn't find pthread.h.])
431
 
fi
432
 
AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR(could not find libpthread)])
433
 
 
434
 
#--------------------------------------------------------------------
435
 
# Check for tcmalloc/mtmalloc
436
 
#--------------------------------------------------------------------
437
 
 
438
 
AC_ARG_ENABLE([tcmalloc],
439
 
    [AS_HELP_STRING([--enable-tcmalloc],
440
 
       [Enable linking with tcmalloc @<:@default=off@:>@])],
441
 
    [ac_enable_tcmalloc="$enableval"],
442
 
    [ac_enable_tcmalloc="no"])
443
 
 
444
 
if test "x$ac_enable_tcmalloc" != "xno"
445
 
then
446
 
  AC_CHECK_LIB(tcmalloc,malloc,[],[])
447
 
fi
448
 
 
449
 
if test "x$ac_cv_lib_tcmalloc_malloc" != "xyes"
450
 
then
451
 
  AC_CHECK_LIB(mtmalloc,malloc,[],[])
452
 
fi
453
 
 
454
 
#--------------------------------------------------------------------
455
 
# Check for libz
456
 
#--------------------------------------------------------------------
457
 
 
458
 
SEARCH_FOR_LIB(z, crc32, zlib.h, 
459
 
               AC_MSG_ERROR([libz is required for Drizzle]))
460
 
 
461
 
#--------------------------------------------------------------------
462
 
# Check for libncurses
463
 
#--------------------------------------------------------------------
464
 
 
465
 
 
466
 
SEARCH_FOR_LIB(ncurses, tgetent, ncurses/ncurses.h, [
467
 
        SEARCH_FOR_LIB(tinfo, tgetent, ncurses/ncurses.h,
468
 
                AC_MSG_ERROR([Couldn't find ncurses])
469
 
        )
470
 
        ]
471
 
)
472
 
 
473
 
#--------------------------------------------------------------------
474
 
# Check for libreadline or compatible (libedit on Mac OS X)
475
 
#--------------------------------------------------------------------
476
 
 
477
 
 
478
 
SEARCH_FOR_LIB(readline, rl_initialize, readline/readline.h,
479
 
               AC_MSG_ERROR([libreadline is required for Drizzle]),
480
 
               [$NCURSES_LIBS]) 
481
 
 
482
 
save_CPPFLAGS="$CPPFLAGS"
483
 
CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
484
 
AC_CHECK_HEADERS(readline/history.h)
485
 
AC_CHECK_TYPES([HIST_ENTRY], [], [], [AC_INCLUDES_DEFAULT[
486
 
#ifdef HAVE_READLINE_HISTORY_H
487
 
#include <readline/history.h>
488
 
#endif
489
 
#include <readline/readline.h>
490
 
]])
491
 
AC_CHECK_DECLS([completion_matches], [], [], [AC_INCLUDES_DEFAULT[
492
 
#ifdef HAVE_READLINE_HISTORY_H
493
 
#include <readline/history.h>
494
 
#endif
495
 
#include <readline/readline.h>
496
 
]])
497
 
 
498
 
DRIZZLE_CHECK_NEW_RL_INTERFACE
499
 
CPPFLAGS="$save_CPPFLAGS"
500
 
 
501
 
 
502
 
#--------------------------------------------------------------------
503
 
# Check for libpcre
504
 
#--------------------------------------------------------------------
505
 
 
506
 
AC_PATH_PROG(PKG_CONFIG, pkg-config, AC_MSG_ERROR([pkg-config wasn't found.]))
507
 
PKG_CHECK_MODULES(PCRE, [libpcre >= 3], [found_pcre="yes"],[found_pcre="no"])
508
 
 
509
 
if test "$found_pcre" = "no"
510
 
then
511
 
  SEARCH_FOR_LIB(pcre, pcre_compile, pcre.h, 
512
 
                 AC_MSG_ERROR([libpcre is required for Drizzle]))
513
 
fi
514
 
AC_SUBST(PCRE_LIBS)
515
 
AC_SUBST(PCRE_CFLAGS)
 
281
 
 
282
# Avoid bug in fcntl on some versions of linux
 
283
AC_MSG_CHECKING([if we should use 'skip-external-locking' as default for $target_os])
 
284
# Any variation of Linux
 
285
if expr "$target_os" : "[[Ll]]inux.*" > /dev/null
 
286
then
 
287
  MYSQLD_DEFAULT_SWITCHES="--skip-external-locking"
 
288
  TARGET_LINUX="true"
 
289
  AC_MSG_RESULT([yes])
 
290
  AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
 
291
else
 
292
  MYSQLD_DEFAULT_SWITCHES=""
 
293
  TARGET_LINUX="false"
 
294
  AC_MSG_RESULT([no])
 
295
fi
 
296
AC_SUBST(MYSQLD_DEFAULT_SWITCHES)
 
297
AC_SUBST(TARGET_LINUX)
516
298
 
517
299
dnl Find paths to some shell programs
518
300
AC_PATH_PROG(LN, ln, ln)
596
378
  FIND_PROC="$PS \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
597
379
else
598
380
  case $SYSTEM_TYPE in
599
 
    *freebsd*|*dragonfly*|*cygwin*)
 
381
    *freebsd*|*dragonfly*)
600
382
      FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
601
383
      ;;
602
384
    *darwin*)
604
386
      ;;
605
387
    *)
606
388
      AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
607
 
      ;;
608
389
  esac
609
390
fi
610
391
AC_SUBST(FIND_PROC)
638
419
 
639
420
if test "$am_cv_prog_cc_stdc" = "no"
640
421
then
641
 
  AC_MSG_ERROR([Drizzle requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
642
 
fi
643
 
 
 
422
  AC_MSG_ERROR([MySQL requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
 
423
fi
 
424
 
 
425
static_nss=""
 
426
STATIC_NSS_FLAGS=""
 
427
OTHER_LIBC_LIB=""
 
428
 
 
429
#
 
430
# Check if we are using Linux and a glibc compiled with static nss
 
431
# (this is true on the MySQL build machines to avoid NSS problems)
 
432
#
 
433
 
 
434
if test "$TARGET_LINUX" = "true" -a "$static_nss" = ""
 
435
then
 
436
  tmp=`nm /usr/lib*/libc.a  | grep _nss_files_getaliasent_r`
 
437
  if test -n "$tmp"
 
438
  then
 
439
     STATIC_NSS_FLAGS="-lc -lnss_files -lnss_dns -lresolv"
 
440
     STATIC_NSS_FLAGS="$STATIC_NSS_FLAGS $STATIC_NSS_FLAGS"
 
441
     static_nss=1
 
442
  fi
 
443
fi
644
444
 
645
445
AC_ARG_WITH([server-suffix],
646
446
    [AS_HELP_STRING([--with-server-suffix],
647
447
      [Append value to the version string.])],
648
 
    [ DRIZZLE_SERVER_SUFFIX=`echo "$withval" | sed -e  's/^\(...................................\)..*$/\1/'` ],
649
 
    [ DRIZZLE_SERVER_SUFFIX= ]
 
448
    [ MYSQL_SERVER_SUFFIX=`echo "$withval" | sed -e  's/^\(...................................\)..*$/\1/'` ],
 
449
    [ MYSQL_SERVER_SUFFIX= ]
650
450
    )
651
 
AC_DEFINE_UNQUOTED([DRIZZLE_SERVER_SUFFIX],[$DRIZZLE_SERVER_SUFFIX],
652
 
                   [Append value to the version string])
 
451
AC_SUBST(MYSQL_SERVER_SUFFIX)
653
452
 
654
453
# Force use of a curses libs
655
454
AC_ARG_WITH([named-curses-libs],
660
459
    [ with_named_curses=no ]
661
460
    )
662
461
 
 
462
# compile with strings functions in assembler
 
463
AC_ARG_ENABLE([assembler],
 
464
    [AS_HELP_STRING([--enable-assembler],
 
465
            [Use assembler versions of some string functions if available.])],
 
466
    [ ENABLE_ASSEMBLER=$enableval ],
 
467
    [ ENABLE_ASSEMBLER=no ]
 
468
    )
 
469
 
 
470
AC_MSG_CHECKING(if we should use assembler functions)
 
471
# For now we only support assembler on i386 and sparc systems
 
472
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;))
 
473
AM_CONDITIONAL(ASSEMBLER_sparc32, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc")
 
474
AM_CONDITIONAL(ASSEMBLER_sparc64, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparcv9")
 
475
AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc32_TRUE" = "")
 
476
 
 
477
if test "$ASSEMBLER_TRUE" = ""
 
478
then
 
479
  AC_MSG_RESULT([yes])
 
480
else
 
481
  AC_MSG_RESULT([no])
 
482
fi
 
483
 
 
484
# Add query profiler
 
485
AC_MSG_CHECKING(if SHOW PROFILE should be enabled.)
 
486
AC_ARG_ENABLE([profiling],
 
487
    [AS_HELP_STRING([--enable-profiling], 
 
488
            [Build a version with query profiling code])],
 
489
    [ ENABLED_PROFILING=$enableval ],
 
490
    [ ENABLED_PROFILING=no ])
 
491
 
 
492
if test "$ENABLED_PROFILING" = "yes"
 
493
then
 
494
  AC_DEFINE([ENABLED_PROFILING], [1],
 
495
            [If SHOW PROFILE should be enabled])
 
496
  AC_MSG_RESULT([yes]) 
 
497
else
 
498
  AC_MSG_RESULT([no])
 
499
fi
 
500
 
663
501
AC_ARG_WITH([tcp-port],
664
502
    [AS_HELP_STRING([--with-tcp-port=port-number],
665
 
            [Which port to use for Drizzle services @<:@default=4427@:>@])],
666
 
    [ DRIZZLE_TCP_PORT=$withval ],
667
 
    [ DRIZZLE_TCP_PORT=$DRIZZLE_TCP_PORT_DEFAULT
 
503
            [Which port to use for MySQL services @<:@default=3306@:>@])],
 
504
    [ MYSQL_TCP_PORT=$withval ],
 
505
    [ MYSQL_TCP_PORT=$MYSQL_TCP_PORT_DEFAULT
668
506
      # if we actually defaulted (as opposed to the pathological case of
669
 
      # --with-tcp-port=<DRIZZLE_TCP_PORT_DEFAULT> which might in theory
 
507
      # --with-tcp-port=<MYSQL_TCP_PORT_DEFAULT> which might in theory
670
508
      # happen if whole batch of servers was built from a script), set
671
509
      # the default to zero to indicate that; we don't lose information
672
510
      # that way, because 0 obviously indicates that we can get the
673
 
      # default value from DRIZZLE_TCP_PORT. this seems really evil, but
674
 
      # testing for DRIZZLE_TCP_PORT==DRIZZLE_TCP_PORT_DEFAULT would make a
675
 
      # a port of DRIZZLE_TCP_PORT_DEFAULT magic even if the builder did not
 
511
      # default value from MYSQL_TCP_PORT. this seems really evil, but
 
512
      # testing for MYSQL_TCP_PORT==MYSQL_TCP_PORT_DEFAULT would make a
 
513
      # a port of MYSQL_TCP_PORT_DEFAULT magic even if the builder did not
676
514
      # intend it to mean "use the default, in fact, look up a good default
677
 
      # from /etc/services if you can", but really, really meant 4427 when
678
 
      # they passed in 4427. When they pass in a specific value, let them
 
515
      # from /etc/services if you can", but really, really meant 3306 when
 
516
      # they passed in 3306. When they pass in a specific value, let them
679
517
      # have it; don't second guess user and think we know better, this will
680
518
      # just make people cross.  this makes the the logic work like this
681
519
      # (which is complicated enough):
683
521
      # - if a port was set during build, use that as a default.
684
522
      #
685
523
      # - otherwise, try to look up a port in /etc/services; if that fails,
686
 
      #   use DRIZZLE_TCP_PORT_DEFAULT (at the time of this writing 4427)
 
524
      #   use MYSQL_TCP_PORT_DEFAULT (at the time of this writing 3306)
687
525
      #
688
 
      # - allow the DRIZZLE_TCP_PORT environment variable to override that.
 
526
      # - allow the MYSQL_TCP_PORT environment variable to override that.
689
527
      #
690
528
      # - allow command-line parameters to override all of the above.
691
529
      #
692
 
      # the top-most DRIZZLE_TCP_PORT_DEFAULT is read from win/configure.js,
 
530
      # the top-most MYSQL_TCP_PORT_DEFAULT is read from win/configure.js,
693
531
      # so don't mess with that.
694
 
      DRIZZLE_TCP_PORT_DEFAULT=0 ]
 
532
      MYSQL_TCP_PORT_DEFAULT=0 ]
695
533
    )
696
 
AC_SUBST(DRIZZLE_TCP_PORT)
 
534
AC_SUBST(MYSQL_TCP_PORT)
697
535
# We might want to document the assigned port in the manual.
698
 
AC_SUBST(DRIZZLE_TCP_PORT_DEFAULT)
699
 
AC_DEFINE_UNQUOTED([DRIZZLE_PORT],[$DRIZZLE_TCP_PORT],
700
 
                   [Drizzle port to use])
701
 
AC_DEFINE_UNQUOTED([DRIZZLE_PORT_DEFAULT],[$DRIZZLE_TCP_PORT_DEFAULT],
702
 
                   [If we defaulted to DRIZZLE_PORT, then this will be zero])
 
536
AC_SUBST(MYSQL_TCP_PORT_DEFAULT)
703
537
 
704
538
# Use this to set the place used for unix socket used to local communication.
705
 
AC_ARG_WITH([drizzled-user],
706
 
    [AS_HELP_STRING([--with-drizzled-user=username],
707
 
            [What user the drizzled daemon shall be run as.
708
 
                @<:@default=drizzle@:>@])],
709
 
    [ DRIZZLED_USER=$withval ],
710
 
    [ DRIZZLED_USER=drizzle ]
 
539
AC_ARG_WITH([mysqld-user],
 
540
    [AS_HELP_STRING([--with-mysqld-user=username],
 
541
            [What user the mysqld daemon shall be run as.
 
542
                @<:@default=mysql@:>@])],
 
543
    [ MYSQLD_USER=$withval ],
 
544
    [ MYSQLD_USER=mysql ]
711
545
    )
712
 
AC_SUBST(DRIZZLED_USER)
 
546
AC_SUBST(MYSQLD_USER)
713
547
 
714
548
# If we should allow LOAD DATA LOCAL
715
549
AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default)
727
561
  AC_MSG_RESULT([no])
728
562
fi
729
563
 
 
564
MYSQL_SYS_LARGEFILE
 
565
 
730
566
# Types that must be checked AFTER large file support is checked
731
567
AC_TYPE_SIZE_T
732
568
 
738
574
AC_HEADER_STDC
739
575
AC_HEADER_SYS_WAIT
740
576
AC_HEADER_STDBOOL
741
 
AC_CHECK_HEADERS(fcntl.h float.h fpu_control.h ieeefp.h)
742
 
AC_CHECK_HEADERS(limits.h pwd.h select.h linux/config.h)
743
 
AC_CHECK_HEADERS(sys/fpu.h utime.h sys/utime.h )
744
 
AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h)
745
 
AC_CHECK_HEADERS([curses.h term.h],[],[],
746
 
[[#ifdef HAVE_CURSES_H
747
 
# include <curses.h>
748
 
#endif
749
 
]])
750
 
AC_CHECK_HEADERS(termio.h termios.h sched.h alloca.h)
751
 
AC_CHECK_HEADERS(sys/prctl.h ieeefp.h)
752
 
AC_CHECK_HEADERS(execinfo.h)
 
577
AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h fpu_control.h ieeefp.h \
 
578
 limits.h memory.h pwd.h select.h \
 
579
 stdlib.h stddef.h stdint.h sys/fpu.h \
 
580
 strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
 
581
 sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
 
582
 unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
 
583
 sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h \
 
584
 sys/prctl.h sys/resource.h sys/param.h port.h ieeefp.h \
 
585
 execinfo.h)
 
586
 
 
587
AC_CHECK_HEADERS([xfs/xfs.h])
 
588
#--------------------------------------------------------------------
 
589
# Check for libevent
 
590
#--------------------------------------------------------------------
 
591
 
 
592
AC_CHECK_LIB(event, event_loop, [], [AC_MSG_ERROR(could not find libevent)])
 
593
 
 
594
#--------------------------------------------------------------------
 
595
# Check for libpthread
 
596
#--------------------------------------------------------------------
 
597
 
 
598
AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR(could not find libpthread)])
753
599
 
754
600
#--------------------------------------------------------------------
755
601
# Check for system libraries. Adds the library to $LIBS
757
603
#--------------------------------------------------------------------
758
604
 
759
605
AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
 
606
AC_CHECK_FUNCS(log2)
760
607
 
761
 
AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)])
762
 
AC_CHECK_FUNC(yp_get_default_domain, [],
763
 
  [AC_CHECK_LIB(nsl, yp_get_default_domain)])
764
 
AC_CHECK_FUNC(p2open, [], [AC_CHECK_LIB(gen, p2open)])
 
608
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
 
609
AC_CHECK_FUNC(yp_get_default_domain, ,
 
610
  AC_CHECK_LIB(nsl, yp_get_default_domain))
 
611
AC_CHECK_FUNC(p2open, , AC_CHECK_LIB(gen, p2open))
765
612
# This may get things to compile even if bind-8 is installed
766
 
AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)])
 
613
AC_CHECK_FUNC(bind, , AC_CHECK_LIB(bind, bind))
767
614
# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
768
615
AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
769
616
 
771
618
AC_CHECK_LIB(rt, aio_read)
772
619
 
773
620
# For the sched_yield() function on Solaris
774
 
AC_CHECK_FUNC(sched_yield, [],
775
 
  [AC_CHECK_LIB(posix4, [sched_yield],
776
 
    [AC_DEFINE(HAVE_SCHED_YIELD) LIBS="$LIBS -lposix4"])])
 
621
AC_CHECK_FUNC(sched_yield, , AC_CHECK_LIB(posix4, sched_yield,
 
622
[AC_DEFINE(HAVE_SCHED_YIELD) LIBS="$LIBS -lposix4"]))
777
623
 
778
624
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
779
625
then
780
 
  AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)])
 
626
  AC_CHECK_FUNC(gtty, , AC_CHECK_LIB(compat, gtty))
781
627
fi
782
628
 
 
629
AC_CHECK_TYPES([int8, uint8, int16, uint16, int32, uint32, int64, uint64,
 
630
                uchar, uint, ulong],[],[], [
 
631
#include <sys/types.h>
 
632
])
783
633
AC_CHECK_TYPES([fp_except], [], [], [
784
634
#include <sys/types.h>
785
635
#include <ieeefp.h>
786
636
])
787
637
 
 
638
 
788
639
my_save_LIBS="$LIBS"
789
640
LIBS=""
790
641
AC_CHECK_LIB(dl,dlopen)
791
 
AC_CHECK_FUNCS(dlopen)
792
 
if test "$ac_cv_func_dlopen" != "yes"
793
 
then
794
 
  AC_MSG_ERROR([Drizzle requires dlopen])
795
 
fi
796
 
LIBDL_LIBS="$LIBS"
797
 
LIBS="$my_save_LIBS"
798
 
AC_SUBST(LIBDL_LIBS)
 
642
LIBDL=$LIBS
 
643
LIBS="$my_save_LIBS"
 
644
AC_SUBST(LIBDL)
 
645
 
 
646
my_save_LIBS="$LIBS"
 
647
LIBS="$LIBS $LIBDL"
 
648
AC_CHECK_FUNCS(dlopen dlerror)
 
649
LIBS="$my_save_LIBS"
799
650
 
800
651
AC_CHECK_FUNCS(strtok_r)
801
652
 
802
653
 
 
654
# System characteristics
 
655
case $SYSTEM_TYPE in
 
656
  *)
 
657
AC_SYS_RESTARTABLE_SYSCALLS
 
658
    ;;
 
659
esac
 
660
 
 
661
# Build optimized or debug version ?
 
662
# First check for gcc and g++
 
663
if test "$ac_cv_c_compiler_gnu" = "yes"
 
664
then
 
665
  DEBUG_CFLAGS="-g"
 
666
  DEBUG_OPTIMIZE_CC="-O"
 
667
  OPTIMIZE_CFLAGS="$MAX_C_OPTIMIZE"
 
668
else
 
669
  DEBUG_CFLAGS="-g"
 
670
  DEBUG_OPTIMIZE_CC=""
 
671
  OPTIMIZE_CFLAGS="-O"
 
672
fi
 
673
if test "$ac_cv_prog_cxx_g" = "yes"
 
674
then
 
675
  DEBUG_CXXFLAGS="-g"
 
676
  DEBUG_OPTIMIZE_CXX="-O"
 
677
  OPTIMIZE_CXXFLAGS="$MAX_CXX_OPTIMIZE"
 
678
else
 
679
  DEBUG_CXXFLAGS="-g"
 
680
  DEBUG_OPTIMIZE_CXX=""
 
681
  OPTIMIZE_CXXFLAGS="-O"
 
682
fi
 
683
 
 
684
# If the user specified CFLAGS, we won't add any optimizations
 
685
if test -n "$SAVE_CFLAGS"
 
686
then
 
687
  OPTIMIZE_CFLAGS=""
 
688
  DEBUG_OPTIMIZE_CC=""
 
689
fi
 
690
# Ditto for CXXFLAGS
 
691
if test -n "$SAVE_CXXFLAGS"
 
692
then
 
693
  OPTIMIZE_CXXFLAGS=""
 
694
  DEBUG_OPTIMIZE_CXX=""
 
695
fi
 
696
 
 
697
AC_ARG_WITH([debug],
 
698
    [AS_HELP_STRING([--with-debug],
 
699
            [Add debug code (yes|no|full) @<:@default=no@:>@ 
 
700
            Full adds memory checked, very slow.])],
 
701
    [with_debug=$withval],
 
702
    [with_debug=no])
 
703
if test "$with_debug" = "yes"
 
704
then
 
705
  # Medium debug.
 
706
  AC_DEFINE([DBUG_ON], [1], [Use libdbug])
 
707
  CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC $CFLAGS"
 
708
  CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX $CXXFLAGS"
 
709
elif test "$with_debug" = "full"
 
710
then
 
711
  # Full debug. Very slow in some cases
 
712
  AC_DEFINE([DBUG_ON], [1], [Use libdbug])
 
713
  CFLAGS="$DEBUG_CFLAGS $CFLAGS"
 
714
  CXXFLAGS="$DEBUG_CXXFLAGS $CXXFLAGS"
 
715
else
 
716
  # Optimized version. No debug
 
717
  AC_DEFINE([DBUG_OFF], [1], [Dont use libdbug])
 
718
  CFLAGS="$OPTIMIZE_CFLAGS $CFLAGS"
 
719
  CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
 
720
fi
 
721
 
 
722
# If we should allow error injection tests
 
723
AC_ARG_WITH([error-inject],
 
724
    [AS_HELP_STRING([--with-error-inject],
 
725
            [Enable error injection in MySQL Server @<:@default=off@:>@])],
 
726
    [ with_error_inject=$withval ],
 
727
    [ with_error_inject=no ])
 
728
 
 
729
if test $with_debug != "no"
 
730
then
 
731
  if test "$with_error_inject" = "yes"
 
732
  then
 
733
    AC_DEFINE([ERROR_INJECT_SUPPORT], [1],
 
734
              [Enable error injection in MySQL Server])
 
735
  fi
 
736
fi
803
737
 
804
738
AC_ARG_WITH([fast-mutexes],
805
739
    [AS_HELP_STRING([--with-fast-mutexes],
809
743
 
810
744
if test "$with_fast_mutexes" != "no"
811
745
then
812
 
        AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1], 
813
 
                        [Define to 1 if you want to use fast mutexes])
 
746
  if test "$with_debug" != "no"
 
747
  then
 
748
    AC_MSG_WARN(['--with-fast-mutexes' ignored when '--with-debug' is given])
 
749
  else
 
750
    AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1], 
 
751
              [Define to 1 if you want to use fast mutexes])
 
752
  fi
814
753
fi
815
754
 
816
 
AM_CONDITIONAL(BUILD_FAST_MUTEX,[test "$with_fast_mutexes" != "no"])
817
 
 
818
755
AC_ARG_WITH([comment],
819
756
    [AS_HELP_STRING([--with-comment],
820
757
            [Comment about compilation environment. @<:@default=off@:>@])],
826
763
else
827
764
  COMPILATION_COMMENT="Source distribution"
828
765
fi
829
 
AC_DEFINE_UNQUOTED([COMPILATION_COMMENT],["$COMPILATION_COMMENT"],
830
 
                   [Comment about compilation environment])
 
766
AC_SUBST(COMPILATION_COMMENT)
 
767
 
 
768
AC_MSG_CHECKING("need of special linking flags")
 
769
if test "$TARGET_LINUX" = "true" -a "$ac_cv_c_compiler_gnu" = "yes" -a "$all_is_static" != "yes"
 
770
then
 
771
  LDFLAGS="$LDFLAGS -rdynamic"
 
772
  AC_MSG_RESULT("-rdynamic")
 
773
else
 
774
  case "$SYSTEM_TYPE$with_mysqld_ldflags " in
 
775
  *freebsd*"-all-static "*|*dragonfly*"-all-static "*)
 
776
    AC_MSG_RESULT("none")
 
777
    ;;
 
778
  *freebsd*|*dragonfly*)
 
779
    MYSQLD_EXTRA_LDFLAGS="$MYSQLD_EXTRA_LDFLAGS -export-dynamic"
 
780
    AC_MSG_RESULT("-export-dynamic")
 
781
    ;;
 
782
  *)
 
783
    AC_MSG_RESULT("none")
 
784
    ;;
 
785
  esac
 
786
fi
831
787
 
832
788
dnl Checks for typedefs, structures, and compiler characteristics.
833
789
AC_C_CONST
834
790
AC_C_INLINE
835
 
AC_C_VOLATILE
836
791
AC_TYPE_OFF_T
837
792
AC_HEADER_TIME
838
793
AC_STRUCT_TM
 
794
MYSQL_NEEDS_MYSYS_NEW
 
795
# AC_CHECK_SIZEOF return 0 when it does not find the size of a
 
796
# type. We want a error instead.
 
797
AC_CHECK_SIZEOF(char, 1)
 
798
if test "$ac_cv_sizeof_char" -eq 0
 
799
then
 
800
  AC_MSG_ERROR([No size for char type.
 
801
A likely cause for this could be that there isn't any
 
802
static libraries installed. You can verify this by checking if you have libm.a
 
803
in /lib, /usr/lib or some other standard place.  If this is the problem,
 
804
install the static libraries and try again.  If this isn't the problem,
 
805
examine config.log for possible errors.  If you want to report this, use
 
806
'scripts/mysqlbug' and include at least the last 20 rows from config.log!])
 
807
fi
 
808
AC_CHECK_SIZEOF(char*, 4)
 
809
AC_CHECK_SIZEOF(short, 2)
 
810
AC_CHECK_SIZEOF(int, 4)
 
811
if test "$ac_cv_sizeof_int" -eq 0
 
812
then
 
813
  AC_MSG_ERROR("No size for int type.")
 
814
fi
 
815
AC_CHECK_SIZEOF(long, 4)
 
816
if test "$ac_cv_sizeof_long" -eq 0
 
817
then
 
818
  AC_MSG_ERROR("No size for long type.")
 
819
fi
 
820
AC_CHECK_SIZEOF(long long, 8)
 
821
if test "$ac_cv_sizeof_long_long" -eq 0
 
822
then
 
823
  AC_MSG_ERROR("MySQL needs a long long type.")
 
824
fi
839
825
# off_t is not a builtin type
840
826
AC_CHECK_SIZEOF(off_t, 4)
841
827
if test "$ac_cv_sizeof_off_t" -eq 0
842
828
then
843
 
  AC_MSG_ERROR("Drizzle needs a off_t type.")
 
829
  AC_MSG_ERROR("MySQL needs a off_t type.")
844
830
fi
845
831
 
846
832
dnl
847
833
dnl check if time_t is unsigned
848
834
dnl
849
835
 
850
 
DRIZZLE_CHECK_TIME_T
851
 
 
 
836
MYSQL_CHECK_TIME_T
 
837
 
 
838
 
 
839
# do we need #pragma interface/#pragma implementation ?
 
840
# yes if it's gcc 2.x, and not icc pretending to be gcc, and not cygwin
 
841
AC_MSG_CHECKING(the need for @%:@pragma interface/implementation)
 
842
# instead of trying to match SYSTEM_TYPE and CC_VERSION (that doesn't
 
843
# follow any standard), we'll use well-defined preprocessor macros:
 
844
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
 
845
#if !defined(__CYGWIN__) && !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ < 3)
 
846
#error USE_PRAGMA_IMPLEMENTATION
 
847
#endif
 
848
]])],[AC_MSG_RESULT(no) ],[AC_MSG_RESULT(yes) ; CXXFLAGS="$CXXFLAGS -DUSE_PRAGMA_IMPLEMENTATION"])
852
849
 
853
850
# This always gives a warning. Ignore it unless you are cross compiling
854
851
AC_C_BIGENDIAN
855
852
#---START: Used in for client configure
856
853
# Check base type of last arg to accept
857
 
DRIZZLE_TYPE_ACCEPT
 
854
MYSQL_TYPE_ACCEPT
858
855
#---END:
859
856
# Figure out what type of struct rlimit to use with setrlimit
860
 
DRIZZLE_TYPE_STRUCT_RLIMIT
 
857
MYSQL_TYPE_STRUCT_RLIMIT
861
858
# Find where the stack goes
862
 
DRIZZLE_STACK_DIRECTION
 
859
MYSQL_STACK_DIRECTION
863
860
# We want to skip alloca on irix unconditionally. It may work on some version..
864
 
DRIZZLE_FUNC_ALLOCA
 
861
MYSQL_FUNC_ALLOCA
865
862
# Do struct timespec have members tv_sec or ts_sec
866
 
DRIZZLE_TIMESPEC_TS
 
863
MYSQL_TIMESPEC_TS
867
864
# Do we have the tzname variable
868
 
DRIZZLE_TZNAME
 
865
MYSQL_TZNAME
 
866
# Do the c++ compiler have a bool type
 
867
MYSQL_CXX_BOOL
869
868
AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
870
 
AC_CHECK_TYPES([uint, ulong])
871
 
 
872
 
DRIZZLE_PTHREAD_YIELD
873
 
 
 
869
AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
 
870
AC_CHECK_TYPES([u_int32_t])
 
871
 
 
872
MYSQL_PTHREAD_YIELD
 
873
 
 
874
######################################################################
 
875
# For readline/libedit (We simply move the mimimum amount of stuff from
 
876
# the readline/libedit configure.in here)
874
877
 
875
878
dnl Checks for header files.
876
 
AC_CHECK_HEADERS(malloc.h)
 
879
AC_CHECK_HEADERS(malloc.h sys/cdefs.h)
877
880
 
878
881
dnl Checks for library functions.
879
882
AC_FUNC_ALLOCA
880
883
AC_PROG_GCC_TRADITIONAL
881
884
AC_TYPE_SIGNAL
882
 
 
 
885
AC_CHECK_FUNCS(re_comp regcomp strdup)
 
886
 
 
887
dnl Sun compilers have their own vis.h that is about something
 
888
dnl totally different. So, not to change the libedit source, we
 
889
dnl do some additional checks before we define HAVE_VIS_H.
 
890
AC_CHECK_HEADER(vis.h,
 
891
  [AC_CHECK_FUNC(strvis,
 
892
    [AC_DEFINE([HAVE_VIS_H], [1],[Found vis.h and the strvis() function])])])
 
893
 
 
894
AC_CHECK_FUNCS(strlcat strlcpy)
883
895
AC_CHECK_FUNCS(issetugid)
 
896
AC_CHECK_FUNCS(fgetln)
 
897
AC_CHECK_FUNCS(getline flockfile)
884
898
 
885
899
# from old readline settting:
886
900
 
888
902
AC_SUBST(MAKE_SHELL)
889
903
 
890
904
# Already-done: stdlib.h string.h unistd.h termios.h
891
 
AC_CHECK_HEADERS(stdarg.h dirent.h locale.h ndir.h sys/dir.h \
892
 
 sys/ndir.h sys/select.h \
893
 
 sys/mman.h termcap.h termio.h asm/termbits.h grp.h \
894
 
 paths.h)
 
905
AC_CHECK_HEADERS(varargs.h stdarg.h dirent.h locale.h ndir.h sys/dir.h \
 
906
 sys/file.h sys/ndir.h sys/ptem.h sys/pte.h sys/select.h sys/stream.h \
 
907
 sys/mman.h curses.h termcap.h termio.h termbits.h asm/termbits.h grp.h \
 
908
paths.h semaphore.h)
895
909
 
896
910
# Already-done: strcasecmp
897
 
AC_CHECK_FUNCS(lstat select)
 
911
AC_CHECK_FUNCS(lstat putenv select setenv setlocale strcoll tcgetattr)
898
912
 
899
913
AC_HEADER_STAT
900
 
DRIZZLE_SIGNAL_CHECK
901
 
DRIZZLE_CHECK_GETPW_FUNCS
902
 
DRIZZLE_HAVE_TIOCGWINSZ
903
 
DRIZZLE_HAVE_TIOCSTAT
904
 
DRIZZLE_TYPE_SIGHANDLER
 
914
MYSQL_SIGNAL_CHECK
 
915
MYSQL_CHECK_GETPW_FUNCS
 
916
MYSQL_HAVE_TIOCGWINSZ
 
917
MYSQL_HAVE_FIONREAD
 
918
MYSQL_HAVE_TIOCSTAT
 
919
MYSQL_STRUCT_DIRENT_D_INO
 
920
MYSQL_STRUCT_DIRENT_D_NAMLEN
 
921
MYSQL_TYPE_SIGHANDLER
 
922
MYSQL_CHECK_MULTIBYTE
905
923
if test "$with_named_curses" = "no"
906
924
then
907
 
  DRIZZLE_CHECK_LIB_TERMCAP
 
925
  MYSQL_CHECK_LIB_TERMCAP
908
926
else
909
 
  TERMCAP_LIBS="$with_named_curses"
 
927
  TERMCAP_LIB="$with_named_curses"
910
928
fi
911
 
AC_SUBST(TERMCAP_LIBS)
 
929
AC_SUBST(TERMCAP_LIB)
 
930
 
 
931
# Check if the termcap function 'tgoto' is already declared in
 
932
# system header files or if it need to be declared locally
 
933
AC_CHECK_DECLS(tgoto,,,[
 
934
#ifdef HAVE_CURSES_H
 
935
# include <curses.h>
 
936
#elif HAVE_NCURSES_H
 
937
# include <ncurses.h>
 
938
#endif
 
939
#ifdef HAVE_TERM_H
 
940
# include <term.h>
 
941
#endif
 
942
])
 
943
 
 
944
LIBEDIT_LOBJECTS=""
 
945
AC_CHECK_FUNC(strunvis, ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS unvis.o"])
 
946
AC_CHECK_FUNC(strvis,   ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS vis.o"])
 
947
AC_CHECK_FUNC(strlcpy,  ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS strlcpy.o"])
 
948
AC_CHECK_FUNC(strlcat,  ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS strlcat.o"])
 
949
AC_CHECK_FUNC(fgetln,   ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS fgetln.o"])
 
950
AC_SUBST(LIBEDIT_LOBJECTS)
 
951
enable_readline="yes"
912
952
 
913
953
# End of readline/libedit stuff
914
954
#########################################################################
927
967
 
928
968
#AC_FUNC_MMAP
929
969
AC_TYPE_SIGNAL
930
 
DRIZZLE_TYPE_QSORT
 
970
MYSQL_TYPE_QSORT
931
971
AC_FUNC_UTIME_NULL
932
972
AC_FUNC_VPRINTF
933
973
 
934
 
AC_CHECK_FUNCS(fcntl)
935
 
if test "x$ac_cv_func_fcntl" != "xyes"
936
 
then
937
 
  AC_MSG_ERROR("Drizzle requires fcntl.")
938
 
fi
939
 
 
940
 
AC_CONFIG_LIBOBJ_DIR([mystrings])
941
 
 
942
 
AC_CHECK_FUNCS( \
943
 
  cuserid fchmod \
944
 
  fdatasync fpresetsticky fpsetmask fsync \
945
 
  getpassphrase getpwnam \
946
 
  getpwuid getrlimit getrusage index initgroups isnan \
 
974
AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
 
975
  chsize cuserid fchmod fcntl \
 
976
  fconvert fdatasync finite fpresetsticky fpsetmask fsync ftruncate \
 
977
  getcwd getpass getpassphrase getpwnam \
 
978
  getpwuid getrlimit getrusage getwd index initgroups isnan \
947
979
  localtime_r gethrtime gmtime_r \
948
 
  madvise \
949
 
  mkstemp mlockall poll pread pthread_attr_create mmap mmap64 \
 
980
  locking longjmp lrand48 madvise mallinfo memcpy memmove \
 
981
  mkstemp mlockall perror poll pread pthread_attr_create mmap mmap64 getpagesize \
950
982
  pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
951
983
  pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
952
984
  pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
953
985
  pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
954
 
  realpath rename rwlock_init setupterm \
955
 
  sigaction \
956
 
  sigthreadmask \
957
 
  snprintf strpbrk \
958
 
  tell tempnam \
959
 
  backtrace backtrace_symbols backtrace_symbols_fd)
960
 
 
961
 
AC_LANG_PUSH(C++)
962
 
# Test whether madvise() is declared in C++ code -- it is not on some
963
 
# systems, such as Solaris
964
 
AC_CHECK_DECLS([madvise], [], [], [AC_INCLUDES_DEFAULT[
965
 
#if HAVE_SYS_MMAN_H
966
 
#include <sys/types.h>
967
 
#include <sys/mman.h>
968
 
#endif
969
 
]])
970
 
AC_LANG_POP()
971
 
 
972
 
 
973
 
AM_CONDITIONAL(BUILD_THR_RWLOCK,[test "$ac_cv_func_rwlock_init" -a "$ac_cv_funn_pthread_rwlock_rdlock"])
 
986
  realpath rename rint rwlock_init setupterm \
 
987
  shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \
 
988
  sighold sigset sigthreadmask port_create sleep \
 
989
  snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
 
990
  strtol strtoll strtoul strtoull tell tempnam vidattr \
 
991
  posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd)
 
992
 
 
993
# Check that isinf() is available in math.h and can be used in both C and C++
 
994
# code
 
995
AC_MSG_CHECKING(for isinf in math.h)
 
996
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[
 
997
    float f = 0.0; 
 
998
    int r = isinf(f); 
 
999
    return r;
 
1000
  ]])],[
 
1001
    AC_MSG_RESULT(yes)
 
1002
    AC_MSG_CHECKING(whether isinf() can be used in C++ code)
 
1003
    AC_LANG_PUSH([C++])
 
1004
    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[
 
1005
      float f = 0.0;
 
1006
      int r = isinf(f);
 
1007
      return r;
 
1008
    ]])],[
 
1009
      AC_MSG_RESULT(yes)
 
1010
      AC_DEFINE(HAVE_ISINF, [1], [isinf() macro or function])
 
1011
    ],[
 
1012
      AC_MSG_RESULT(no)
 
1013
    ])
 
1014
    AC_LANG_POP([])
 
1015
  ],[
 
1016
  AC_MSG_RESULT(no)])
974
1017
 
975
1018
 
976
1019
CFLAGS="$ORG_CFLAGS"
978
1021
# Sanity check: We chould not have any fseeko symbol unless
979
1022
# large_file_support=yes
980
1023
AC_CHECK_FUNC(fseeko,
981
 
[if test "$large_file_support" = no -a "x$TARGET_LINUX" = "xtrue";
 
1024
[if test "$large_file_support" = no -a "$TARGET_LINUX" = "true";
982
1025
then
983
1026
  AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!")
984
1027
fi]
985
1028
)
986
1029
 
987
1030
# Check definition of pthread_getspecific
988
 
AC_CACHE_CHECK([args to pthread_getspecific], [mysql_cv_getspecific_args],
989
 
  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
990
 
#if !defined(_REENTRANT)
 
1031
AC_CACHE_CHECK("args to pthread_getspecific", mysql_cv_getspecific_args,
 
1032
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if !defined(_REENTRANT)
991
1033
#define _REENTRANT
992
1034
#endif
993
 
#ifndef _POSIX_PTHREAD_SEMANTICS 
994
1035
#define _POSIX_PTHREAD_SEMANTICS 
995
 
#endif
996
1036
#include <pthread.h> ]], [[ void *pthread_getspecific(pthread_key_t key);
997
 
pthread_getspecific((pthread_key_t) NULL); ]])],
998
 
    [mysql_cv_getspecific_args=POSIX],
999
 
    [mysql_cv_getspecific_args=other])])
 
1037
pthread_getspecific((pthread_key_t) NULL); ]])],[mysql_cv_getspecific_args=POSIX],[mysql_cv_getspecific_args=other]))
1000
1038
  if test "$mysql_cv_getspecific_args" = "other"
1001
1039
  then
1002
1040
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1],
1004
1042
  fi
1005
1043
 
1006
1044
  # Check definition of pthread_mutex_init
1007
 
  AC_CACHE_CHECK([args to pthread_mutex_init], [mysql_cv_mutex_init_args],
1008
 
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1009
 
#ifndef _REENTRANT
1010
 
#define _REENTRANT
1011
 
#endif
1012
 
#ifndef _POSIX_PTHREAD_SEMANTICS
 
1045
  AC_CACHE_CHECK("args to pthread_mutex_init", mysql_cv_mutex_init_args,
 
1046
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1013
1047
#define _POSIX_PTHREAD_SEMANTICS 
1014
 
#endif
1015
1048
#include <pthread.h> ]], [[ 
1016
1049
  pthread_mutexattr_t attr;
1017
1050
  pthread_mutex_t mp;
1018
 
  pthread_mutex_init(&mp,&attr); ]])],
1019
 
      [mysql_cv_mutex_init_args=POSIX],
1020
 
      [mysql_cv_mutex_init_args=other])])
 
1051
  pthread_mutex_init(&mp,&attr); ]])],[mysql_cv_mutex_init_args=POSIX],[mysql_cv_mutex_init_args=other]))
1021
1052
  if test "$mysql_cv_mutex_init_args" = "other"
1022
1053
  then
1023
1054
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1],
1027
1058
 
1028
1059
#---START: Used in for client configure
1029
1060
# Check definition of readdir_r
1030
 
AC_CACHE_CHECK([args to readdir_r], [mysql_cv_readdir_r],
1031
 
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1032
 
#ifndef _REENTRANT
1033
 
#define _REENTRANT
1034
 
#endif
1035
 
#ifndef _POSIX_PTHREAD_SEMANTICS 
 
1061
AC_CACHE_CHECK("args to readdir_r", mysql_cv_readdir_r,
 
1062
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1036
1063
#define _POSIX_PTHREAD_SEMANTICS 
1037
 
#endif
1038
1064
#include <pthread.h>
1039
1065
#include <dirent.h>]], [[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
1040
 
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])],
1041
 
    [mysql_cv_readdir_r=POSIX],
1042
 
    [mysql_cv_readdir_r=other])])
 
1066
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])],[mysql_cv_readdir_r=POSIX],[mysql_cv_readdir_r=other]))
1043
1067
if test "$mysql_cv_readdir_r" = "POSIX"
1044
1068
then
1045
1069
  AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r])
1046
1070
fi
1047
1071
 
1048
1072
# Check definition of posix sigwait()
1049
 
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
1050
 
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1051
 
#ifndef _REENTRANT
1052
 
#define _REENTRANT
1053
 
#endif
1054
 
#ifndef _POSIX_PTHREAD_SEMANTICS
 
1073
AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait,
 
1074
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1055
1075
#define _POSIX_PTHREAD_SEMANTICS 
1056
 
#endif
1057
1076
#include <pthread.h>
1058
 
#include <signal.h>
1059
 
      ]], [[
1060
 
#ifndef _AIX
 
1077
#include <signal.h>]], [[#ifndef _AIX
1061
1078
sigset_t set;
1062
1079
int sig;
1063
1080
sigwait(&set,&sig);
1064
 
#endif
1065
 
      ]])],
1066
 
    [mysql_cv_sigwait=POSIX],
1067
 
    [mysql_cv_sigwait=other])])
 
1081
#endif]])],[mysql_cv_sigwait=POSIX],[mysql_cv_sigwait=other]))
1068
1082
if test "$mysql_cv_sigwait" = "POSIX"
1069
1083
then
1070
1084
  AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait])
1074
1088
then
1075
1089
unset mysql_cv_sigwait
1076
1090
# Check definition of posix sigwait()
1077
 
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
1078
 
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1079
 
#ifndef _REENTRANT
1080
 
#define _REENTRANT
1081
 
#endif
1082
 
#ifndef _POSIX_PTHREAD_SEMANTICS
 
1091
AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait,
 
1092
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1083
1093
#define _POSIX_PTHREAD_SEMANTICS 
1084
 
#endif
1085
1094
#include <pthread.h>
1086
 
#include <signal.h>
1087
 
      ]], [[
1088
 
sigset_t set;
 
1095
#include <signal.h>]], [[sigset_t set;
1089
1096
int sig;
1090
 
sigwait(&set);
1091
 
      ]])],
1092
 
    [mysql_cv_sigwait=NONPOSIX],
1093
 
    [mysql_cv_sigwait=other])])
 
1097
sigwait(&set);]])],[mysql_cv_sigwait=NONPOSIX],[mysql_cv_sigwait=other]))
1094
1098
if test "$mysql_cv_sigwait" = "NONPOSIX"
1095
1099
then
1096
1100
  AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument])
1099
1103
#---END:
1100
1104
 
1101
1105
# Check if pthread_attr_setscope() exists
1102
 
AC_CACHE_CHECK([for pthread_attr_setscope], [mysql_cv_pthread_attr_setscope],
1103
 
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1104
 
#ifndef _REENTRANT
1105
 
#define _REENTRANT
1106
 
#endif
1107
 
#ifndef _POSIX_PTHREAD_SEMANTICS
 
1106
AC_CACHE_CHECK("for pthread_attr_setscope", mysql_cv_pthread_attr_setscope,
 
1107
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
1108
1108
#define _POSIX_PTHREAD_SEMANTICS 
1109
 
#endif
1110
 
#include <pthread.h>
1111
 
      ]], [[
1112
 
pthread_attr_t thr_attr;
1113
 
pthread_attr_setscope(&thr_attr,0);
1114
 
      ]])],
1115
 
    [mysql_cv_pthread_attr_setscope=yes],
1116
 
    [mysql_cv_pthread_attr_setscope=no])])
 
1109
#include <pthread.h>]], [[pthread_attr_t thr_attr;
 
1110
pthread_attr_setscope(&thr_attr,0);]])],[mysql_cv_pthread_attr_setscope=yes],[mysql_cv_pthread_attr_setscope=no]))
1117
1111
if test "$mysql_cv_pthread_attr_setscope" = "yes"
1118
1112
then
1119
1113
  AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope])
1120
1114
fi
1121
1115
 
 
1116
# Check for bad includes
 
1117
AC_MSG_CHECKING("can netinet files be included")
 
1118
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
 
1119
#include <sys/socket.h>
 
1120
#include <netinet/in_systm.h>
 
1121
#include <netinet/in.h>
 
1122
#include <netinet/ip.h>
 
1123
#include <netinet/tcp.h>]], [[ printf("1\n"); ]])],[netinet_inc=yes],[netinet_inc=no])
 
1124
if test "$netinet_inc" = "no"
 
1125
then
 
1126
  AC_DEFINE([HAVE_BROKEN_NETINET_INCLUDES], [1], [Can netinet be included])
 
1127
fi
 
1128
AC_MSG_RESULT("$netinet_inc")
 
1129
 
1122
1130
AC_LANG_PUSH([C++])
1123
1131
AC_CHECK_HEADERS(cxxabi.h)
1124
1132
AC_CACHE_CHECK([checking for abi::__cxa_demangle], mysql_cv_cxa_demangle,
1137
1145
# Check for requested features
1138
1146
#--------------------------------------------------------------------
1139
1147
 
1140
 
DRIZZLE_CHECK_MAX_INDEXES
1141
 
DRIZZLE_CHECK_VIO
 
1148
MYSQL_CHECK_BIG_TABLES
 
1149
MYSQL_CHECK_MAX_INDEXES
 
1150
MYSQL_CHECK_VIO
1142
1151
 
1143
1152
#--------------------------------------------------------------------
1144
1153
# Declare our plugin modules
1146
1155
# functions tested above
1147
1156
#--------------------------------------------------------------------
1148
1157
 
1149
 
DRIZZLE_CONFIGURE_PLUGINS([none])
 
1158
MYSQL_CONFIGURE_PLUGINS([none])
 
1159
 
 
1160
AC_SUBST(CLIENT_LIBS)
 
1161
AC_SUBST(STATIC_NSS_FLAGS)
 
1162
 
 
1163
# IMPORTANT - do not modify LIBS past this line - this hack is the only way
 
1164
# I know to add the static NSS magic if we have static NSS libraries with
 
1165
# glibc - Sasha
 
1166
 
 
1167
LDFLAGS="$LDFLAGS $OTHER_LIBC_LIB"
 
1168
LIBS="$LIBS $STATIC_NSS_FLAGS"
1150
1169
 
1151
1170
AC_SUBST(mysql_plugin_dirs)
1152
1171
AC_SUBST(mysql_plugin_libs)
1153
1172
AC_SUBST(mysql_plugin_defs)
1154
1173
 
1155
 
 
1156
 
AC_ARG_ENABLE([profiling],
1157
 
    [AS_HELP_STRING([--enable-profiling],
1158
 
       [Toggle profiling @<:@default=off@:>@])],
1159
 
    [ac_profiling="$enableval"],
1160
 
    [ac_profiling="no"])
1161
 
 
1162
 
AC_ARG_ENABLE([coverage],
1163
 
    [AS_HELP_STRING([--enable-coverage],
1164
 
       [Toggle coverage @<:@default=off@:>@])],
1165
 
    [ac_coverage="$enableval"],
1166
 
    [ac_coverage="no"])
1167
 
 
1168
1174
AC_ARG_ENABLE([pedantic-warnings],
1169
1175
    [AS_HELP_STRING([--disable-pedantic-warnings],
1170
1176
       [Toggle pedanticness @<:@default=on@:>@])],
1172
1178
    [ac_warn_pedantic="yes"])
1173
1179
 
1174
1180
AC_ARG_ENABLE([fail],
1175
 
    [AS_HELP_STRING([--disable-fail],
1176
 
       [Turn warnings into failures @<:@default=on@:>@])],
 
1181
    [AS_HELP_STRING([--enable-fail],
 
1182
       [Turn warnings into failures @<:@default=off@:>@])],
1177
1183
    [ac_warn_fail="$enableval"],
1178
 
    [ac_warn_fail="yes"])
1179
 
 
1180
 
AC_ARG_ENABLE([unreachable],
1181
 
    [AS_HELP_STRING([--enable-unreachable],
1182
 
       [Enable warnings about unreachable code @<:@default=off@:>@])],
1183
 
    [ac_warn_unreachable="$enableval"],
1184
 
    [ac_warn_unreachable="no"])
1185
 
 
1186
 
AC_ARG_ENABLE([longlong-warnings],
1187
 
    [AS_HELP_STRING([--enable-longlong-warnings],
1188
 
       [Enable warnings about longlong in C++ @<:@default=off@:>@])],
1189
 
    [ac_warn_longlong="$enableval"],
1190
 
    [ac_warn_longlong="no"])
1191
 
 
1192
 
AC_ARG_ENABLE([strict-aliasing],
1193
 
    [AS_HELP_STRING([--enable-strict-aliasing],
1194
 
       [Enable warnings about stict-aliasing @<:@default=off@:>@])],
1195
 
    [ac_warn_strict_aliasing="$enableval"],
1196
 
    [ac_warn_strict_aliasing="no"])
1197
 
 
1198
 
AC_ARG_ENABLE([cast-warnings],
1199
 
    [AS_HELP_STRING([--enable-cast-warnings],
1200
 
       [Enable warnings about use of old C-style casts @<:@default=off@:>@])],
1201
 
    [ac_warn_cast="$enableval"],
1202
 
    [ac_warn_cast="no"])
1203
 
 
1204
 
AC_ARG_ENABLE([effective-style],
1205
 
    [AS_HELP_STRING([--enable-effective-style],
1206
 
       [Enable warnings violating Effective C++ Style Guidelines @<:@default=off@:>@])],
1207
 
    [ac_warn_effc="$enableval"],
1208
 
    [ac_warn_effc="no"])
1209
 
 
1210
 
AC_ARG_ENABLE([go-crazy],
1211
 
    [AS_HELP_STRING([--enable-go-crazy],
1212
 
       [Enables extra little warnings that might be too much @<:@default=off@:>@])],
1213
 
    [ac_warn_go_crazy="$enableval"],
1214
 
    [ac_warn_go_crazy="no"])
1215
 
 
1216
 
AC_ARG_ENABLE([datarace],
1217
 
    [AS_HELP_STRING([--enable-datarace],
1218
 
       [Enables Sun Studio data race detection @<:@default=off@:>@])],
1219
 
    [ac_datarace="$enableval"],
1220
 
    [ac_datarace="no"])
 
1184
    [ac_warn_fail="no"])
1221
1185
 
1222
1186
 
1223
1187
if test "$GCC" = "yes"
1224
1188
then
1225
1189
 
 
1190
  GCC_WARNINGS="-W -Wall"
 
1191
  GXX_WARNINGS="${GCC_WARNINGS}"
 
1192
 
 
1193
 
 
1194
  if test "$ac_warn_pedantic" = "yes"
 
1195
  then
 
1196
    GCC_WARNINGS="${GCC_WARNINGS}  -std=gnu99 -pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code"
 
1197
    GXX_WARNINGS="${GXX_WARNINGS}  -std=gnu++98 -pedantic -Wundef -Wredundant-decls -Wunreachable-code"
 
1198
  fi
 
1199
 
1226
1200
  if test "$ac_warn_fail" = "yes"
1227
1201
  then
1228
 
    W_FAIL="-Werror"
1229
 
  fi
1230
 
  BASE_WARNINGS="-Wall -Wextra ${W_FAIL}"
1231
 
 
1232
 
  if test "$ac_warn_longlong" = "yes"
1233
 
  then
1234
 
    W_LONGLONG="-Wlong-long"
1235
 
  else
1236
 
    W_LONGLONG="-Wno-long-long"
1237
 
  fi
1238
 
 
1239
 
  if test "$ac_warn_strict_aliasing" = "yes"
1240
 
  then
1241
 
    W_STRICT_ALIASING="-Wstrict-aliasing"
1242
 
  else
1243
 
    W_STRICT_ALIASING="-Wno-strict-aliasing"
1244
 
  fi
1245
 
 
1246
 
  if test "$ac_profiling" = "yes"
1247
 
  then
1248
 
    GPROF_PROFILING="-pg"
1249
 
  else
1250
 
    GPROF_PROFILING=" "
1251
 
  fi
1252
 
 
1253
 
  if test "$ac_coverage" = "yes"
1254
 
  then
1255
 
    GPROF_COVERAGE="-fprofile-arcs -ftest-coverage"
1256
 
  else
1257
 
    GPROF_COVERAGE=" "
1258
 
  fi
1259
 
 
1260
 
  if test "$ac_warn_pedantic" = "yes"
1261
 
  then
1262
 
    save_CXXFLAGS="${CXXFLAGS}"
1263
 
    CXXFLAGS="${CXXFLAGS} ${W_FAIL} -Wredundant-decls"
1264
 
    AC_CACHE_CHECK([whether it is safe to use -Wredundant-decls],
1265
 
      [ac_cv_safe_to_use_Wredundant_decls_],
1266
 
      [AC_LANG_PUSH(C++)
1267
 
       AC_COMPILE_IFELSE(
1268
 
         [AC_LANG_PROGRAM([
1269
 
template <typename E> struct C { void foo(); };
1270
 
template <typename E> void C<E>::foo() { }
1271
 
template <> void C<int>::foo();
1272
 
            AC_INCLUDES_DEFAULT])],
1273
 
          [ac_cv_safe_to_use_Wredundant_decls_=yes],
1274
 
          [ac_cv_safe_to_use_Wredundant_decls_=no])
1275
 
        AC_LANG_POP()])
1276
 
    if test $ac_cv_safe_to_use_Wredundant_decls_ = yes
1277
 
    then
1278
 
      GXX_W_REDUNDANT_DECLS="-Wredundant-decls"
1279
 
    else
1280
 
      GXX_W_REDUNDANT_DECLS="-Wno-redundant-decls"
1281
 
    fi
1282
 
    
1283
 
    GCC_PEDANTIC="-pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls ${W_STRICT_ALIASING}"
1284
 
    GXX_PEDANTIC="-pedantic -Wundef ${GXX_W_REDUNDANT_DECLS} ${W_LONGLONG} ${W_STRICT_ALIASING}"
1285
 
 
1286
 
    AC_CACHE_CHECK([whether __attribute__ visibility "hidden" is supported],
1287
 
      [ac_cv_can_use_hidden_],
1288
 
      [AC_LANG_PUSH(C++)
1289
 
       AC_COMPILE_IFELSE(
1290
 
         [AC_LANG_PROGRAM([
1291
 
          AC_INCLUDES_DEFAULT
1292
 
__attribute__((visibility ("hidden")))
1293
 
void testme() {  };],[
1294
 
     testme();])],  
1295
 
         [ac_cv_can_use_hidden_=yes],
1296
 
         [ac_cv_can_use_hidden_=no])
1297
 
       AC_LANG_POP()])
1298
 
    if test "$ac_cv_can_use_hidden_" = "yes"
1299
 
    then
1300
 
      AC_DEFINE(HAVE_ATTR_HIDDEN, 1,
1301
 
                [Define to 1 if you have support for __attribute__((visibility("hidden")))])
1302
 
    fi
1303
 
 
1304
 
    CXXFLAGS="${save_CXXFLAGS}"
1305
 
  fi
1306
 
 
1307
 
  if test "$ac_warn_unreachable" = "yes"
1308
 
  then
1309
 
    W_UNREACHABLE="-Wunreachable-code"
1310
 
  fi
1311
 
  if test "$ac_warn_cast" = "yes"
1312
 
  then
1313
 
    W_CAST="-Wold-style-cast"
1314
 
  fi
1315
 
 
1316
 
  if test "$ac_warn_effc" = "yes"
1317
 
  then
1318
 
    W_EFFC="-Weffc++"
1319
 
  fi
1320
 
 
1321
 
  if test "$ac_warn_gocrazy" = "yes"
1322
 
  then
1323
 
    W_CRAZY="-Wshadow -Wconversion -Winvalid-pch"
1324
 
  fi
1325
 
 
1326
 
  CC_WARNINGS="${C99_SUPPORT_HACK} ${BASE_WARNINGS} ${GCC_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_CRAZY}"
1327
 
  CXX_WARNINGS="${BASE_WARNINGS} ${GXX_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_CAST} ${W_EFFC} ${W_CRAZY}"
1328
 
 
1329
 
  NO_EXCEPTIONS="-fno-exceptions"
1330
 
  W_EXCEPTIONS="-fexceptions"
1331
 
  NO_UNUSED_MACROS="-Wno-unused-macros"
1332
 
  NO_REDUNDANT_DECLS="-Wno-redundant-decls"
1333
 
  # Disable exceptions as they seams to create problems with gcc and threads.
1334
 
  # drizzled doesn't use run-time-type-checking, so we disable it.
1335
 
  AM_CXXFLAGS="${AM_CXXFLAGS} -fno-rtti"
1336
 
  CPPFLAGS="${CPPFLAGS} -fpch-deps"
1337
 
fi
1338
 
if test "$SUNCC" = "yes"
1339
 
then
1340
 
  if test "$ac_datarace" = "yes"
1341
 
  then
1342
 
    CFLAGS="${CFLAGS} -xinstrument=datarace"
1343
 
    CXXFLAGS="${CXXFLAGS} -xinstrument=datarace"
1344
 
  fi
1345
 
  CC_WARNINGS="-v -xc99=all -errtags=yes"
1346
 
  CXX_WARNINGS="+w +w2 -xport64 -errtags=yes -erroff=attrskipunsup -compat=5"
1347
 
  NO_EXCEPTIONS="-features=no%except"
1348
 
  W_EXCEPTIONS="-features=except"
1349
 
fi
1350
 
AM_CXXFLAGS="${CXX_WARNINGS} ${NO_EXCEPTIONS}  ${AM_CXXFLAGS}"
1351
 
AM_CFLAGS="${CC_WARNINGS} ${AM_CFLAGS}"
1352
 
 
1353
 
AC_SUBST(NO_EXCEPTIONS)
1354
 
AC_SUBST(W_EXCEPTIONS)
1355
 
AC_SUBST(NO_UNUSED_MACROS)
1356
 
AC_SUBST(NO_REDUNDANT_DECLS)
1357
 
 
1358
 
AC_SUBST([GLOBAL_CPPFLAGS],['-I$(top_srcdir) -I$(top_builddir)'])
1359
 
AC_SUBST([AM_CPPFLAGS],['${GLOBAL_CPPFLAGS}'])
1360
 
AC_SUBST([AM_CFLAGS])
1361
 
AC_SUBST([AM_CXXFLAGS])
 
1202
    GCC_WARNINGS="${GCC_WARNINGS} -Werror"
 
1203
    GXX_WARNINGS="${GXX_WARNINGS} -Werror"
 
1204
  fi
 
1205
 
 
1206
    CXXFLAGS="$CXXFLAGS ${GXX_WARNINGS}"
 
1207
    CFLAGS="$CFLAGS ${GCC_WARNINGS} "
 
1208
fi
1362
1209
 
1363
1210
# Some usefull subst
1364
1211
AC_SUBST(CC)
1375
1222
esac
1376
1223
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
1377
1224
 
1378
 
AC_SUBST(pkgplugindir,"\$(pkglibdir)/plugin")
1379
 
 
1380
 
dnl GCC Precompiled Header Support
1381
 
dnl re-enable later
1382
 
dnl AM_CONDITIONAL([BUILD_GCC_PCH],[test "$GCC" = "yes"])
1383
 
AM_CONDITIONAL([BUILD_GCC_PCH],[test "no" = "yes"])
1384
 
 
1385
 
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
1386
 
 mystrings/Makefile storage/Makefile dnl
1387
 
 po/Makefile.in dnl
1388
 
 libdrizzle/Makefile client/Makefile dnl
1389
 
 drizzled/Makefile dnl
1390
 
 drizzled/serialize/Makefile dnl
1391
 
 drizzled/sql_builtin.cc dnl
 
1225
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile mysys/tests/Makefile dnl
 
1226
 strings/Makefile strings/tests/Makefile regex/Makefile storage/Makefile dnl
 
1227
 vio/Makefile dnl
 
1228
 libmysql/Makefile client/Makefile dnl
 
1229
 sql/Makefile sql/share/Makefile dnl
 
1230
 sql/sql_builtin.cc sql-common/Makefile dnl
 
1231
 dbug/Makefile scripts/Makefile include/Makefile dnl
1392
1232
 support-files/Makefile dnl
1393
 
 tests/Makefile tests/install_test_db dnl
1394
 
 plugin/Makefile dnl
1395
 
 drizzled/drizzled_safe support-files/libdrizzle.pc dnl
1396
 
 support-files/drizzle.server support-files/drizzle-log-rotate)
 
1233
 mysql-test/Makefile dnl
 
1234
 include/mysql_version.h plugin/Makefile)
1397
1235
 
1398
1236
AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
1399
1237
 
1400
1238
# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
1401
 
AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS' AM_CFLAGS='$AM_CFLAGS' AM_CXXFLAGS='$AM_CXXFLAGS'")
 
1239
AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS'")
1402
1240
 
1403
1241
AC_OUTPUT
1404
 
 
1405
 
echo "---"
1406
 
echo "Configuration summary for $PACKAGE_NAME version $VERSION"
1407
 
echo ""
1408
 
echo "   * Installation prefix:       $prefix"
1409
 
echo "   * System type:               $SYSTEM_TYPE"
1410
 
echo "   * Host CPU:                  $host_cpu"
1411
 
echo "   * C Compiler:                $CC_VERSION"
1412
 
echo "   * C++ Compiler:              $CXX_VERSION"
1413
 
echo "   * Build auth_pam:            $ac_cv_header_security_pam_appl_h"
1414
 
echo "   * Assertions enabled:        $ac_cv_assert"
1415
 
echo "   * Debug enabled:             $with_debug"
1416
 
echo "   * Profiling enabled:         $ac_profiling"
1417
 
echo "   * Coverage enabled:          $ac_coverage"
1418
 
echo "   * Warnings as failure:       $ac_warn_fail"
1419
 
echo "   * C++ cstdint location:      $ac_cv_cxx_cstdint"
1420
 
echo "   * C++ hash_map location:     $ac_cv_cxx_hash_map"
1421
 
echo "   * C++ hash namespace:        $ac_cv_cxx_hash_namespace"
1422
 
echo "   * C++ cmath location:        $ac_cv_cxx_cmath"
1423
 
echo "   * C++ cmath namespace:       $ac_cv_cxx_cmath_namespace"
1424
 
echo ""
1425
 
echo "---"