~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

Removing global errbuff and cleaning up two remaining instances that referenced it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl -*- ksh -*-
 
1
dnl -*- bash -*-
2
2
dnl Process this file with autoconf to produce a configure script.
3
3
 
4
4
AC_PREREQ(2.59)dnl              Minimum Autoconf version required.
5
5
 
6
 
AC_INIT(drizzle, [7.0.0], [http://bugs.launchpad.net/drizzle])
 
6
m4_include(m4/bzr_version.m4)
 
7
 
7
8
AC_CONFIG_SRCDIR([drizzled/drizzled.cc])
8
9
AC_CONFIG_AUX_DIR(config)
9
10
AC_CONFIG_HEADERS([config.h])
 
11
AC_CONFIG_MACRO_DIR([m4])
10
12
 
11
 
# Save some variables and the command line options for mysqlbug
12
 
SAVE_CC="$CC"
13
 
SAVE_CXX="$CXX"
14
 
SAVE_ASFLAGS="$ASFLAGS"
15
 
SAVE_CFLAGS="$CFLAGS"
16
 
SAVE_CXXFLAGS="$CXXFLAGS"
17
 
SAVE_LDFLAGS="$LDFLAGS"
18
 
SAVE_CXXLDFLAGS="$CXXLDFLAGS"
19
 
CONF_COMMAND="$0 $ac_configure_args"
20
 
AC_SUBST(CONF_COMMAND)
21
 
AC_SUBST(SAVE_CC)
22
 
AC_SUBST(SAVE_CXX)
23
 
AC_SUBST(SAVE_ASFLAGS)
24
 
AC_SUBST(SAVE_CFLAGS)
25
 
AC_SUBST(SAVE_CXXFLAGS)
26
 
AC_SUBST(SAVE_LDFLAGS)
27
 
AC_SUBST(SAVE_CXXLDFLAGS)
28
 
AC_SUBST(CXXLDFLAGS)
 
13
# Setting CFLAGS here prevents AC_CANONICAL_TARGET from injecting them
 
14
SAVE_CFLAGS=${CFLAGS}
 
15
SAVE_CXXFLAGS=${CXXFLAGS}
 
16
CFLAGS=
 
17
CXXFLAGS=
29
18
 
30
19
AC_CANONICAL_TARGET
31
 
AM_INIT_AUTOMAKE(-Wall -Werror)
32
 
 
33
 
PROTOCOL_VERSION=10
34
 
DOT_FRM_VERSION=6
35
 
# See the libtool docs for information on how to do shared lib versions.
36
 
SHARED_LIB_MAJOR_VERSION=1
37
 
SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0
38
 
 
39
 
 
40
 
dnl AC_CANONICAL_HOST thinks it's a good idea to just set CFLAGS to 
41
 
dnl -g -O2 if you're running gcc. We would like to use something else, thanks.
42
 
if test "x${CFLAGS}" = "x-g -O2"
43
 
then
44
 
  CFLAGS=
45
 
fi
46
 
if test "x${CXXFLAGS}" = "x-g -O2"
47
 
then
48
 
  CXXFLAGS=
49
 
fi
 
20
 
 
21
CFLAGS=${SAVE_CFLAGS}
 
22
CXXFLAGS=${SAVE_CXXFLAGS}
 
23
 
 
24
AM_INIT_AUTOMAKE(nostdinc subdir-objects -Wall -Werror)
 
25
 
 
26
if test "x${enable_dependency_tracking}" = "x"
 
27
then
 
28
  enable_dependency_tracking=yes
 
29
fi
 
30
 
 
31
gl_EARLY
 
32
 
 
33
 
 
34
dnl Checks for programs.
 
35
AC_PROG_CXX
 
36
 
 
37
gl_USE_SYSTEM_EXTENSIONS
 
38
if test "$GCC" = "yes"
 
39
then
 
40
  # If you're on a Mac, and you didn't ask for a specific compiler
 
41
  # You're gonna get 4.2.
 
42
  if test "$host_vendor" = "apple" -a "x${ac_cv_env_CC_set}" = "x"
 
43
  then
 
44
    CPP="/usr/bin/gcc-4.2 -E"
 
45
    CC=/usr/bin/gcc-4.2
 
46
    CXX=/usr/bin/g++-4.2
 
47
  fi
 
48
  AC_CACHE_CHECK([if GCC is recent enough], [drizzle_cv_gcc_recent],
 
49
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 
50
#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 1))
 
51
# error GCC is Too Old!
 
52
#endif
 
53
      ]])],
 
54
      [drizzle_cv_gcc_recent=yes],
 
55
      [drizzle_cv_gcc_recent=no])])
 
56
  if test "$drizzle_cv_gcc_recent" = "no" -a "$host_vendor" = "apple"
 
57
  then
 
58
    AC_MSG_ERROR([Your version of GCC is too old. Drizzle requires at least version 4.2 on OSX. You may need to install a version of XCode >= 3.1.2])
 
59
  fi
 
60
  if test "$drizzle_cv_gcc_recent" = "no"
 
61
  then
 
62
    AC_MSG_ERROR([Your version of GCC is too old. Drizzle requires at least version 4.1])
 
63
  fi
 
64
fi
 
65
AC_CXX_HEADER_STDCXX_98
 
66
if test "$ac_cv_cxx_stdcxx_98" = "no"
 
67
then
 
68
  AC_MSG_ERROR([No working C++ Compiler has been found. Drizzle requires a C++ compiler that can handle C++98])
 
69
fi
 
70
AC_PROG_CPP
 
71
AM_PROG_CC_C_O
 
72
 
 
73
if test "$am_cv_prog_cc_stdc" = "no"
 
74
then
 
75
  AC_MSG_ERROR([Drizzle requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
 
76
fi
 
77
 
 
78
 
 
79
 
 
80
gl_INIT
 
81
 
 
82
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
 
83
 
 
84
AC_PROG_GCC_TRADITIONAL
50
85
 
51
86
 
52
87
# Set all version vars based on $VERSION. How do we do this more elegant ?
64
99
DRIZZLE_BASE_VERSION=`echo $DRIZZLE_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
65
100
DRIZZLE_VERSION_ID=`echo $DRIZZLE_NUMERIC_VERSION | \
66
101
    awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'`
 
102
AC_DEFINE_UNQUOTED(DRIZZLE_BASE_VERSION,["$DRIZZLE_BASE_VERSION"],
 
103
                   [Major and minor version])
 
104
AC_DEFINE_UNQUOTED([DRIZZLE_VERSION_ID],[$DRIZZLE_VERSION_ID],
 
105
                   [Version ID that can be easily used for numeric comparison])
 
106
 
 
107
AC_DEFINE([_BACKWARD_BACKWARD_WARNING_H],[1],[Hack to disable deprecation warning in gcc])
67
108
 
68
109
# The port should be constant for a LONG time
69
110
DRIZZLE_TCP_PORT_DEFAULT=4427
70
111
 
71
 
sinclude(m4/dtrace.m4)
72
 
sinclude(m4/character_sets.m4)
73
 
 
74
 
AM_GNU_GETTEXT([external])
75
 
AM_GNU_GETTEXT_VERSION(0.17)
76
 
 
77
 
AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
78
 
 
79
 
AC_SUBST(DRIZZLE_NO_DASH_VERSION)
80
 
AC_SUBST(DRIZZLE_BASE_VERSION)
81
 
AC_SUBST(DRIZZLE_VERSION_ID)
82
 
AC_SUBST(DRIZZLE_PREVIOUS_BASE_VERSION)
83
 
AC_SUBST(PROTOCOL_VERSION)
84
 
AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION],
85
 
                   [mysql client protocol version])
86
 
AC_SUBST(DOT_FRM_VERSION)
87
 
AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION],
88
 
                   [Version of .frm files])
89
 
AC_SUBST(SHARED_LIB_MAJOR_VERSION)
90
 
AC_SUBST(SHARED_LIB_VERSION)
 
112
m4_include(m4/dtrace.m4)
 
113
 
 
114
m4_include(m4/character_sets.m4)
91
115
AC_SUBST(AVAILABLE_LANGUAGES)
92
116
 
93
 
# General Constants
94
 
AC_DEFINE([IO_SIZE], [4096], [Io buffer size; Must be a power of 2 and 
95
 
  a multiple of 512. May be
96
 
  smaller what the disk page size. This influences the speed of the
97
 
  isam btree library. eg to big to slow.])
98
 
AC_DEFINE([SC_MAXWIDTH],[256], [Max width of screen (for error messages)])
99
 
AC_DEFINE([FN_LEN],[256 ], [Max file name len ])
100
 
AC_DEFINE([FN_HEADLEN],[253], [Max length of filepart of file name ])
101
 
AC_DEFINE([FN_EXTLEN],[20], [Max length of extension (part of FN_LEN) ])
102
 
AC_DEFINE([FN_REFLEN],[512], [Max length of full path-name ])
103
 
AC_DEFINE([FN_EXTCHAR],['.'], [File extension character])
104
 
AC_DEFINE([FN_HOMELIB],['~'], [~/ is used as abbrev for home dir ])
105
 
AC_DEFINE([FN_CURLIB],['.'], [./ is used as abbrev for current dir ])
106
 
AC_DEFINE([FN_PARENTDIR],[".."], [Parent directory; Must be a string ])
107
 
 
108
 
AC_DEFINE([MASTER],[1],[Compile without unireg])
109
 
 
110
 
AH_VERBATIM([QUOTE_ARG],[
111
 
/* Quote argument (before cpp) */
112
 
#ifndef QUOTE_ARG
113
 
# define QUOTE_ARG(x) #x
114
 
#endif
115
 
/* Quote argument, (after cpp) */
116
 
#ifndef STRINGIFY_ARG
117
 
# define STRINGIFY_ARG(x) QUOTE_ARG(x)
118
 
#endif
119
 
])
120
 
 
121
 
AH_VERBATIM([builtin_expect],[
122
 
/*
123
 
 * The macros below are borrowed from include/linux/compiler.h in the
124
 
 * Linux kernel. Use them to indicate the likelyhood of the truthfulness
125
 
 * of a condition. This serves two purposes - newer versions of gcc will be
126
 
 * able to optimize for branch predication, which could yield siginficant
127
 
 * performance gains in frequently executed sections of the code, and the
128
 
 * other reason to use them is for documentation
129
 
 */
130
 
#if !defined(__GNUC__)
131
 
#define __builtin_expect(x, expected_value) (x)
132
 
#endif
133
 
 
134
 
#define likely(x)  __builtin_expect((x),1)
135
 
#define unlikely(x)  __builtin_expect((x),0)
136
 
])
137
 
 
138
 
dnl  InnoDB depends on some Drizzle's internals which other plugins should not
139
 
dnl  need.  This is because of InnoDB's foreign key support, "safe" binlog
140
 
dnl  truncation, and other similar legacy features.
141
 
 
142
 
dnl  We define accessors for these internals unconditionally, but do not
143
 
dnl  expose them in mysql/plugin.h.  They are declared in ha_innodb.h for
144
 
dnl  InnoDB's use.
145
 
 
146
 
AC_DEFINE([INNODB_COMPATIBILITY_HOOKS],[1],[TODO: Remove the need for this])
147
 
dnl TODO: Make a test for when this needs to be set.
148
 
AC_DEFINE([_REENTRANT],[1],[Some thread libraries require this])
149
 
 
150
 
AH_VERBATIM([posix_pthread],[
151
 
/* We want posix threads */
152
 
#ifndef _POSIX_PTHREAD_SEMANTICS
153
 
#define _POSIX_PTHREAD_SEMANTICS
154
 
#endif
155
 
])
 
117
 
 
118
# Set this for plugins to use
 
119
ac_build_drizzle="yes"
156
120
 
157
121
 
158
122
# Canonicalize the configuration name.
165
129
    [SYSTEM_TYPE="$host_vendor-$host_os"])
166
130
AC_ARG_WITH([machine-type],
167
131
    [AS_HELP_STRING([--with-machine-type],
168
 
       [Set the machine type, like "powerpc"])],
 
132
       [Set the machine type, like "sparc"])],
169
133
    [MACHINE_TYPE="$withval"],
170
134
    [MACHINE_TYPE="$host_cpu"])
171
135
AC_SUBST(SYSTEM_TYPE)
181
145
  i?86) BASE_MACHINE_TYPE=i386 ;;
182
146
esac
183
147
 
184
 
AM_SANITY_CHECK
185
 
# This is needed is SUBDIRS is set
186
 
AC_PROG_MAKE_SET
187
 
 
188
 
##############################################################################
189
 
# The below section needs to be done before AC_PROG_CC
190
 
##############################################################################
191
 
 
192
 
if test "x${CFLAGS-}" = x ; then
193
 
  cflags_is_set=no
194
 
else
195
 
  cflags_is_set=yes
196
 
fi
197
 
 
198
 
if test "x${CPPFLAGS-}" = x ; then
199
 
  cppflags_is_set=no
200
 
else
201
 
  cppflags_is_set=yes
202
 
fi
203
 
 
204
 
if test "x${LDFLAGS-}" = x ; then
205
 
  ldflags_is_set=no
206
 
else
207
 
  ldflags_is_set=yes
208
 
fi
209
 
 
210
 
################ End of section to be done before AC_PROG_CC #################
211
 
 
212
 
dnl Checks for programs.
213
 
AC_PROG_CC
214
 
ifdef([AC_PROG_CC_C99],[
215
 
  dnl TODO: Need to fix this to use c99 instead of gnu99
216
 
  AC_PROG_CC_C99([],[AC_MSG_ERROR([C99 support required for compiling Drizzle])])
217
 
  C99_SUPPORT_HACK=""
218
 
],[C99_SUPPORT_HACK="-std=gnu99"])
219
 
AC_PROG_CXX
220
 
AC_CXX_HEADER_STDCXX_98
221
 
if test "$ac_cv_cxx_stdcxx_98" = "no"
222
 
then
223
 
  AC_MSG_ERROR([C++ Compiler required to compile Drizzle])
224
 
fi
225
 
AC_PROG_CPP
226
 
AM_PROG_CC_C_O
227
 
 
228
 
# Print version of CC and CXX compiler (if they support --version)
229
 
case $SYSTEM_TYPE in
 
148
 
 
149
case "$target_os" in
 
150
  *linux*)
 
151
  TARGET_LINUX="true"
 
152
  AC_SUBST(TARGET_LINUX)
 
153
  AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
 
154
    ;;
230
155
  *apple-darwin*)
 
156
    TARGET_OSX="true"
 
157
    AC_SUBST(TARGET_OSX)
231
158
    AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX])
232
159
    ;;
 
160
  *solaris*)
 
161
    TARGET_SOLARIS="true"
 
162
    AC_SUBST(TARGET_SOLARIS)
 
163
    AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
 
164
    ;;
233
165
  *)
234
 
CC_VERSION=`$CC --version | sed 1q`
235
166
    ;;
236
167
esac
237
 
if test $? -eq "0"
238
 
then
239
 
  AC_MSG_CHECKING("C Compiler version")
240
 
  AC_MSG_RESULT("$CC $CC_VERSION")
241
 
else
242
 
CC_VERSION=""
243
 
fi
244
 
AC_SUBST(CC_VERSION)
245
 
 
246
 
dnl AC_CANONICAL_HOST thinks it's a good idea to just set CFLAGS to 
247
 
dnl -g -O2 if you're running gcc. We would like to use something else, thanks.
248
 
if test "x${CFLAGS}" = "x-g -O2"
249
 
then
250
 
  CFLAGS=
251
 
fi
252
 
if test "x${CXXFLAGS}" = "x-g -O2"
253
 
then
254
 
  CXXFLAGS=
255
 
fi
256
 
 
 
168
 
 
169
DRIZZLE_CHECK_C_VERSION
257
170
DRIZZLE_CHECK_CXX_VERSION
258
171
 
 
172
AC_SYS_LARGEFILE
 
173
 
259
174
AC_PROG_AWK
260
175
 
261
 
if test "$ac_cv_c_compiler_gnu" = "yes"
262
 
then
263
 
  AS="$CC -c"
264
 
  AC_SUBST(AS)
265
 
else
266
 
  AC_PATH_PROG(AS, as, as)
267
 
fi
268
 
 
269
 
dnl TODO: This needs to go away and be replaced with _ISOC99_SOURCE
270
 
if test "$ac_cv_compiler_gnu" = "yes" -o "$target_os" = "linux-gnu"
271
 
then
272
 
  AC_DEFINE([_GNU_SOURCE],[1],[Fix problem with S_ISLNK() on Linux])
273
 
fi
274
 
 
275
 
dnl  Solaris 9 include file <sys/feature_tests.h> refers to X/Open document
276
 
 
277
 
dnl  System Interfaces and Headers, Issue 5
278
 
 
279
 
dnl  saying we should define _XOPEN_SOURCE=500 to get POSIX.1c prototypes,
280
 
dnl  but apparently other systems (namely FreeBSD) don't agree.
281
 
 
282
 
dnl  On a newer Solaris 10, the above file recognizes also _XOPEN_SOURCE=600.
283
 
dnl  Furthermore, it tests that if a program requires older standard
284
 
dnl  (_XOPEN_SOURCE<600 or _POSIX_C_SOURCE<200112L) it cannot be
285
 
dnl  run on a new compiler (that defines _STDC_C99) and issues an #error.
286
 
dnl  It's also an #error if a program requires new standard (_XOPEN_SOURCE=600
287
 
dnl  or _POSIX_C_SOURCE=200112L) and a compiler does not define _STDC_C99.
288
 
 
289
 
dnl  To add more to this mess, Sun Studio C compiler defines _STDC_C99 while
290
 
dnl  C++ compiler does not!
291
 
 
292
 
dnl TODO: Can _ISOC99_SOURCE be defined on all platforms and remove the 
293
 
dnl       Need for all of this? 
294
 
if test "${build_vendor}" = "sun"
295
 
then
296
 
  dnl Do we need both of these? 
297
 
  dnl This is for C++
298
 
  AC_DEFINE([__C99FEATURES__],[1],[C99 Features])
299
 
  dnl This is for C
300
 
  AC_DEFINE([_XOPEN_SOURCE],[600],[X/Open Level])
301
 
fi
302
 
 
303
 
# We use libtool
304
 
#AC_LIBTOOL_WIN32_DLL
305
 
AC_PROG_LIBTOOL
306
 
 
307
 
# Ensure that we have --preserve-dup-deps defines, otherwise we get link
308
 
# problems of 'mysql' with CXX=g++
309
 
LIBTOOL="$LIBTOOL --preserve-dup-deps"
310
 
AC_SUBST(LIBTOOL)dnl
 
176
 
 
177
AC_PATH_PROG(GPERF, gperf)
 
178
AS_IF([test "x$GPERF" = "x"],
 
179
      AC_MSG_ERROR("Drizzle requires gperf to build."))
 
180
 
 
181
AC_PATH_PROG(LCOV, lcov)
 
182
AC_PATH_PROG(GENHTML, genhtml)
 
183
 
 
184
AM_CONDITIONAL(HAVE_LCOV,[test "x$LCOV" != "x"])
311
185
 
312
186
AC_SUBST(NM)dnl
313
187
 
314
188
AC_PROG_INSTALL
315
 
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
316
 
 
317
 
# Not critical since the generated file is distributed
318
 
AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL'])
 
189
 
 
190
# Look for "(group|user)add". 
 
191
# TODO: If the programs do not exist, inform the DBA that the user
 
192
#       was not created at the end of the install routine.
 
193
AC_CHECK_PROGS(GROUPADD, groupadd addgroup)
 
194
AC_CHECK_PROGS(USERADD, useradd adduser)
 
195
 
 
196
dnl Not critical since the generated file is distributed
 
197
AC_CHECK_PROGS(YACC, ['bison -y'])
319
198
if test -z "$YACC" && test -d ".bzr"
320
199
then
321
200
  AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
322
201
fi
323
202
 
324
 
AC_PATH_PROG(uname_prog, uname, no)
325
 
 
326
 
# We should go through this and put all the explictly system dependent
327
 
# stuff in one place
328
 
AC_MSG_CHECKING(operating system)
329
 
AC_CACHE_VAL(mysql_cv_sys_os,
330
 
[
331
 
if test "$uname_prog" != "no"; then
332
 
  mysql_cv_sys_os="`uname`"
333
 
else
334
 
  mysql_cv_sys_os="Not Solaris"
335
 
fi
336
 
])
337
 
AC_MSG_RESULT($mysql_cv_sys_os)
338
 
 
339
 
# This should be rewritten to use $target_os
340
 
case "$target_os" in
341
 
  *solaris*)
342
 
    TARGET_SOLARIS="true"
343
 
    AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
344
 
    AC_SUBST(TARGET_SOLARIS)
345
 
  ;;
346
 
esac
347
 
 
348
 
# The following is required for portable results of floating point calculations
349
 
# on PowerPC. The same must also be done for IA-64, but this options is missing
350
 
# in the IA-64 gcc backend.
351
 
 
 
203
  isainfo_b=`isainfo -b`
 
204
 
 
205
# Build optimized or debug version ?
 
206
# First check for gcc and g++
352
207
if test "$GCC" = "yes"
353
208
then
 
209
  if test "$isainfo_b" = "64"
 
210
  then
 
211
    IS_64="-m64"
 
212
  fi
 
213
  AC_DEFINE([_GNU_SOURCE],[1],[Fix problem with S_ISLNK() on Linux])
 
214
 
 
215
  dnl The following is required for portable results of floating point 
 
216
  dnl calculations on PowerPC. The same must also be done for IA-64, but 
 
217
  dnl this options is missing in the IA-64 gcc backend.
354
218
  case "$host_cpu" in
355
219
    *ppc* | *powerpc*)
356
 
      AM_CFLAGS="$CFLAGS -mno-fused-madd"
357
 
      AM_CXXFLAGS="$CXXFLAGS -mno-fused-madd"
 
220
      CFLAGS="-mno-fused-madd ${CFLAGS}"
 
221
      CXXFLAGS="-mno-fused-madd ${CXXFLAGS}"
358
222
    ;;
359
223
  esac
360
 
fi
361
 
 
362
 
AC_SUBST(CC)
363
 
AC_SUBST(CFLAGS)
364
 
AC_SUBST(CXX)
365
 
AC_SUBST(CXXFLAGS)
366
 
AC_SUBST(ASFLAGS)
367
 
AC_SUBST(LD)
368
 
AC_SUBST(INSTALL_SCRIPT)
369
 
 
370
 
 
371
 
export CC CXX CFLAGS LD LDFLAGS AR ARFLAGS
372
 
 
373
 
if test "$GCC" = "yes"
374
 
then
375
 
  # Disable exceptions as they seams to create problems with gcc and threads.
376
 
  # drizzled doesn't use run-time-type-checking, so we disable it.
377
 
  AM_CXXFLAGS="${AM_CXXFLAGS} -fno-exceptions"
378
 
fi
 
224
 
 
225
  CFLAGS="-ggdb3 ${IS_64} -std=gnu99 ${CFLAGS}"
 
226
  CXXFLAGS="-ggdb3  ${IS_64} ${CXXFLAGS}"
 
227
  AC_CXX_CHECK_STANDARD
 
228
  
 
229
 
 
230
  DEBUG_CFLAGS="-O0"
 
231
  DEBUG_CXXFLAGS="-O0"
 
232
 
 
233
  OPTIMIZE_CFLAGS="-O3"
 
234
  OPTIMIZE_CXXFLAGS="-O3"
 
235
fi
 
236
if test "$SUNCC" = "yes"
 
237
then
 
238
  if test "$isainfo_b" = "64"
 
239
  then
 
240
    IS_64="-m64"
 
241
  fi
 
242
  dnl we put CPPFLAGS and LDFLAGS first here, because if the user has specified
 
243
  dnl command line CPPFLAGS or LDFLAGS, their -I or -L should come _first_
 
244
  if test "$target_cpu" = "sparc"
 
245
  then
 
246
    MEMALIGN_FLAGS="-xmemalign=8s"
 
247
  fi
 
248
 
 
249
  if test "x$use_additional" != "xyes"
 
250
  then
 
251
    LDFLAGS="${LDFLAGS} -L/usr/local/lib/${isainfo_b} -L/usr/local/lib -L/opt/csw/lib/${isainfo_b} -L/opt/csw/lib"
 
252
    CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/opt/csw/include"
 
253
  fi
 
254
  LDFLAGS="${LDFLAGS} -L/usr/lib/${isainfo_b}"
 
255
 
 
256
  CXXFLAGS="-xlang=c99 -g -mt -compat=5 -library=stlport4 -template=no%extdef ${IS_64} ${MEMALIGN_FLAGS} ${CXXFLAGS}"
 
257
  CFLAGS="-g -mt -xc99=all ${IS_64} ${MEMALIGN_FLAGS} ${CFLAGS}"
 
258
  DEBUG_CFLAGS="-xO0"
 
259
  DEBUG_CXXFLAGS="-xO0" 
 
260
 
 
261
  dnl TODO: -xO4 causes a Sun Studio failure in innodb... let's check back
 
262
  dnl       in on this one.
 
263
  OPTIMIZE_FLAGS="-xO3 -xlibmil -xdepend"
 
264
  OPTIMIZE_CFLAGS="${OPTIMIZE_FLAGS} -Xa -xstrconst"
 
265
  OPTIMIZE_CXXFLAGS="${OPTIMIZE_FLAGS}"
 
266
 
 
267
fi
 
268
 
 
269
m4_include(m4/gettext.m4)
 
270
AM_GNU_GETTEXT(external, need-formatstring-macros)
 
271
if test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"
 
272
then
 
273
  AM_PATH_PROG_WITH_TEST(GMSGMERGE, gmsgmerge,
 
274
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
 
275
  MSGMERGE="${GMSGMERGE}"
 
276
fi
 
277
AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
 
278
 
 
279
 
 
280
# We use libtool
 
281
AC_PROG_LIBTOOL
 
282
 
 
283
dnl TODO: Remove this define once we are using 2.61 across the board.
 
284
# AX_HEADER_ASSERT
 
285
# ----------------
 
286
# Check whether to enable assertions.
 
287
AC_DEFUN([AX_HEADER_ASSERT],
 
288
[
 
289
  AC_MSG_CHECKING([whether to enable assertions])
 
290
  AC_ARG_ENABLE([assert],
 
291
    [AS_HELP_STRING([--disable-assert],
 
292
       [Turn off assertions])],
 
293
    [ac_cv_assert="no"],
 
294
    [ac_cv_assert="yes"])
 
295
  AC_MSG_RESULT([$ac_cv_assert])
 
296
])
 
297
 
 
298
AX_HEADER_ASSERT
 
299
 
 
300
AC_ARG_WITH([debug],
 
301
    [AS_HELP_STRING([--with-debug],
 
302
       [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
 
303
    [with_debug=$withval],
 
304
    [with_debug=no])
 
305
if test "$with_debug" = "yes"
 
306
then
 
307
  # Debuging. No optimization.
 
308
  CFLAGS="${DEBUG_CFLAGS} ${CFLAGS}"
 
309
  CXXFLAGS="${DEBUG_CXXFLAGS} ${CXXFLAGS}"
 
310
else
 
311
  # Optimized version. No debug
 
312
  CFLAGS="${OPTIMIZE_CFLAGS} ${CFLAGS}"
 
313
  CXXFLAGS="${OPTIMIZE_CXXFLAGS} ${CXXFLAGS}"
 
314
fi
 
315
 
 
316
 
 
317
AC_CXX_STL_HASH
 
318
AC_CXX_CSTDINT
 
319
AC_CXX_CINTTYPES
 
320
AC_CXX_SHARED_PTR
379
321
 
380
322
DRIZZLE_PROG_AR
381
323
 
382
 
# libdrizzle versioning when linked with GNU ld.
383
 
if $LD --version 2>/dev/null|grep -q GNU; then
384
 
  LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libdrizzle/libdrizzle.ver"
385
 
fi
386
 
AC_SUBST(LD_VERSION_SCRIPT)
 
324
AC_LIB_PREFIX
387
325
 
388
326
#--------------------------------------------------------------------
389
327
# Check for Google Proto Buffers
390
328
#--------------------------------------------------------------------
391
329
 
392
330
AC_LANG_PUSH([C++])
393
 
AC_CHECK_HEADERS([google/protobuf/message.h])
394
 
if test "x$ac_cv_header_google_protobuf_message_h" != "xyes"
395
 
then
396
 
  AC_MSG_ERROR([Couldn't find message.h. Try installing Google Protocol Buffer development packages])
397
 
fi
398
 
 
399
 
save_CFLAGS="$CFLAGS"
400
 
save_LIBS="$LIBS"
401
 
CFLAGS=""
402
 
LIBS="-lprotobuf"
403
 
 
404
 
AC_CACHE_CHECK([for Message in libprotobuf], ac_libprotobuf_works, [
405
 
  AC_TRY_LINK([
406
 
#include <google/protobuf/descriptor.pb.h>
407
 
  ],[
408
 
    google::protobuf::FileDescriptorProto testFdp;
409
 
  ], ac_libprotobuf_works=yes, [
410
 
        AC_ERROR([could not find Google's libprotobuf])
411
 
  ])
412
 
 
413
 
])
414
 
 
415
 
PROTOBUF_LIBS="${LIBS}"
416
 
AC_SUBST(PROTOBUF_LIBS)
417
 
CFLAGS="$save_CFLAGS"
418
 
LIBS="$save_LIBS"
 
331
AC_LIB_HAVE_LINKFLAGS(protobuf,,
 
332
[#include <google/protobuf/descriptor.h>
 
333
],
 
334
[google::protobuf::FileDescriptor* file;],system)
 
335
AS_IF([test x$ac_cv_libprotobuf = xno],
 
336
      AC_MSG_ERROR([protobuf is required for Drizzle. On Debian this can be found in libprotobuf-dev. On RedHat this can be found in protobuf-devel.]))
 
337
 
 
338
AC_CACHE_CHECK([if protobuf is recent enough], [drizzle_cv_protobuf_recent],
 
339
  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 
340
#include <google/protobuf/descriptor.h>
 
341
#if GOOGLE_PROTOBUF_VERSION < 2000002
 
342
# error Your version of Protobuf is too old
 
343
#endif
 
344
    ]])],
 
345
    [drizzle_cv_protobuf_recent=yes],
 
346
    [drizzle_cv_protobuf_recent=no])])
 
347
if test "$drizzle_cv_protobuf_recent" = "no"
 
348
then
 
349
  AC_MSG_ERROR([Your version of Google Protocol Buffers is too old. Drizzle requires at least version 2.0.2])
 
350
fi
 
351
 
 
352
AC_PATH_PROG([PROTOC],[protoc],[no],[$LIBPROTOBUF_PREFIX/bin:$PATH])
 
353
if test "x$PROTOC" = "xno"
 
354
then
 
355
  AC_MSG_ERROR([Couldn't find the protoc compiler. On Debian this can be found in protobuf-compiler. On RedHat this can be found in protobuf-compiler.])
 
356
fi
 
357
 
419
358
AC_LANG_POP()
420
359
 
421
360
#--------------------------------------------------------------------
422
 
# Check for libevent
 
361
# Check for libuuid
423
362
#--------------------------------------------------------------------
424
363
 
425
 
AC_MSG_CHECKING(for libevent)
426
 
AC_ARG_WITH(libevent,
427
 
  [AS_HELP_STRING([--with-libevent],
428
 
       [Use libevent build directory])],
429
 
  [ with_libevent=$withval ],
430
 
  [ with_libevent=yes ])
 
364
dnl Do this by hand. Need to check for uuid/uuid.h, but uuid may or may
 
365
dnl not be a lib is weird.
431
366
 
432
 
if test "$with_libevent" = "yes"
 
367
AC_CHECK_HEADERS(uuid/uuid.h)
 
368
if test "x$ac_cv_header_uuid_uuid_h" = "xno"
433
369
then
434
 
    AC_CHECK_HEADERS(event.h)
435
 
    if test "x$ac_cv_header_event_h" != "xyes"
436
 
    then
437
 
      AC_MSG_ERROR([Couldn't find event.h. Try installing libevent development packages])
438
 
    fi
439
 
    my_save_LIBS="$LIBS"
440
 
    LIBS=""
441
 
    AC_CHECK_LIB(event, event_loop, [], [AC_MSG_ERROR(could not find libevent)])
442
 
    LIBEVENT_LIBS="${LIBS}"
443
 
    LIBS="${my_save_LIBS}"
444
 
    LIBEVENT_CFLAGS=""
445
 
else
446
 
    AC_MSG_RESULT($withval)
447
 
    if test -f $withval/event.h -a -f $withval/libevent.a; then
448
 
       owd=`pwd`
449
 
       if cd $withval; then withval=`pwd`; cd $owd; fi
450
 
       LIBEVENT_CFLAGS="-I$withval"
451
 
       LIBEVENT_LIBS="-L$withval -levent"
452
 
    elif test -f $withval/include/event.h -a -f $withval/lib/libevent.a; then
453
 
       owd=`pwd`
454
 
       if cd $withval; then withval=`pwd`; cd $owd; fi
455
 
       LIBEVENT_CFLAGS="-I$withval/include"
456
 
       LIBEVENT_LIBS="-L$withval/lib -levent"
457
 
    else
458
 
       AC_MSG_ERROR([event.h or libevent.a not found in $withval])
459
 
    fi
 
370
  AC_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On Redhat this can be found in e2fsprogs-devel.])
460
371
fi
461
 
 
462
 
AC_SUBST(LIBEVENT_CFLAGS)
463
 
AC_SUBST(LIBEVENT_LIBS)
464
 
 
465
 
AC_CACHE_CHECK([for bufferevent in libevent], ac_libevent_works, [
466
 
  save_CFLAGS="$CFLAGS"
467
 
  save_LIBS="$LIBS"
468
 
  CFLAGS="$LIBEVENT_CFLAGS"
469
 
  LIBS="$LIBEVENT_LIBS"
470
 
  AC_TRY_LINK([
471
 
#include <sys/types.h>
472
 
#include <sys/time.h>
473
 
#include <stdlib.h>
474
 
#include <event.h>],[
475
 
        struct bufferevent bev;
476
 
        bufferevent_settimeout(&bev, 1, 1);
477
 
  ], ac_libevent_works=yes, [
478
 
        AC_ERROR([you need to install a more recent version of libevent,
479
 
        check http://www.monkey.org/~provos/libevent/])
480
 
  ])
481
 
 
482
 
  CFLAGS="$save_CFLAGS"
483
 
  LIBS="$save_LIBS"
 
372
AC_LIB_HAVE_LINKFLAGS(uuid,,
 
373
[
 
374
#include <uuid/uuid.h>
 
375
],
 
376
[
 
377
  uuid_t uout;
 
378
  uuid_generate(uout);
484
379
])
485
380
 
486
381
 
 
382
 
487
383
#--------------------------------------------------------------------
488
384
# Check for libpthread
489
385
#--------------------------------------------------------------------
490
386
 
491
 
AC_CHECK_HEADERS(pthread.h)
492
 
if test "x$ac_cv_header_pthread_h" != "xyes"
493
 
then
494
 
  AC_MSG_ERROR([Couldn't find pthread.h.])
495
 
fi
496
 
AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR(could not find libpthread)])
 
387
ACX_PTHREAD(,AC_MSG_ERROR(could not find libpthread))
 
388
LIBS="$PTHREAD_LIBS $LIBS"
 
389
CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
 
390
CC="$PTHREAD_CC"
497
391
 
498
392
#--------------------------------------------------------------------
499
 
# Check for tcmalloc
 
393
# Check for tcmalloc/mtmalloc
500
394
#--------------------------------------------------------------------
501
395
 
502
396
AC_ARG_ENABLE([tcmalloc],
503
 
    [AS_HELP_STRING([--enable-tcmalloc],
504
 
       [Enable linking with tcmalloc @<:@default=off@:>@])],
 
397
    [AS_HELP_STRING([--disable-tcmalloc],
 
398
       [Enable linking with tcmalloc @<:@default=on@:>@])],
505
399
    [ac_enable_tcmalloc="$enableval"],
506
 
    [ac_enable_tcmalloc="no"])
 
400
    [ac_enable_tcmalloc="yes"])
507
401
 
508
 
if test "x$ac_enable_tcmalloc" = "xyes"
 
402
if test "x$ac_enable_tcmalloc" != "xno"
509
403
then
510
404
  AC_CHECK_LIB(tcmalloc,malloc,[],[])
511
405
fi
512
406
 
 
407
if test "x$ac_cv_lib_tcmalloc_malloc" != "xyes"
 
408
then
 
409
  AC_CHECK_LIB(mtmalloc,malloc,[],[])
 
410
fi
 
411
 
 
412
 
 
413
#--------------------------------------------------------------------
 
414
# Check for libdrizzle
 
415
#--------------------------------------------------------------------
 
416
 
 
417
AC_LIB_HAVE_LINKFLAGS(drizzle,,
 
418
[#include <libdrizzle/drizzle.h>],
 
419
[
 
420
  const char *version= drizzle_version()
 
421
])
 
422
AS_IF([test x$ac_cv_libdrizzle = xno],
 
423
      AC_MSG_ERROR([libdrizzle is required for Drizzle]))
 
424
 
 
425
 
513
426
#--------------------------------------------------------------------
514
427
# Check for libz
515
428
#--------------------------------------------------------------------
516
429
 
517
 
my_save_LIBS="$LIBS"
518
 
LIBS=""
519
 
AC_CHECK_HEADERS(zlib.h)
520
 
if test "x$ac_cv_header_zlib_h" != "xyes"
521
 
then
522
 
  AC_MSG_ERROR([Couldn't find zlib.h. Try installing zlib development packages])
523
 
fi
524
 
AC_CHECK_LIB(z, crc32, [], [AC_MSG_ERROR(could not find libz)])
525
 
ZLIB_LIBS="$LIBS"
526
 
LIBS="$my_save_LIBS"
527
 
AC_SUBST(ZLIB_LIBS)
528
 
 
 
430
AC_LIB_HAVE_LINKFLAGS(z,,
 
431
[#include <zlib.h>],
 
432
[
 
433
  crc32(0, Z_NULL, 0);
 
434
])
 
435
AS_IF([test x$ac_cv_libz = xno],
 
436
      AC_MSG_ERROR([libz is required for Drizzle. On Debian this can be found in zlib1g-dev. On RedHat this can be found in zlib-devel.]))
 
437
 
 
438
#--------------------------------------------------------------------
 
439
# Check for TBB
 
440
#--------------------------------------------------------------------
 
441
 
 
442
AC_LANG_PUSH(C++)
 
443
AC_LIB_HAVE_LINKFLAGS(tbb,,
 
444
[#include <tbb/atomic.h>
 
445
 #include <stdint.h>
 
446
],
 
447
[
 
448
  tbb::atomic<uint64_t> x;
 
449
  tbb::atomic<uint8_t> y;
 
450
  x=0;
 
451
  y=0;
 
452
  x++;
 
453
  y++;
 
454
])
 
455
AC_LANG_POP()
529
456
 
530
457
#--------------------------------------------------------------------
531
458
# Check for libreadline or compatible (libedit on Mac OS X)
532
459
#--------------------------------------------------------------------
533
460
 
534
 
AC_CHECK_HEADERS(readline/history.h readline/readline.h)
535
 
if test "x$ac_cv_header_readline_readline_h" != "xyes"
536
 
then
537
 
  AC_MSG_ERROR([Couldn't find readline/readline.h. Try installing readline development packages.])
538
 
fi
539
 
AC_CHECK_TYPES([HIST_ENTRY], [], [], [AC_INCLUDES_DEFAULT[
540
 
#ifdef HAVE_READLINE_HISTORY_H
541
 
#include <readline/history.h>
542
 
#endif
543
 
#include <readline/readline.h>
544
 
]])
545
 
AC_CHECK_DECLS([completion_matches], [], [], [AC_INCLUDES_DEFAULT[
546
 
#ifdef HAVE_READLINE_HISTORY_H
547
 
#include <readline/history.h>
548
 
#endif
549
 
#include <readline/readline.h>
550
 
]])
 
461
save_LIBS="${LIBS}"
 
462
LIBS=""
 
463
VL_LIB_READLINE
 
464
AS_IF([test "x$vl_cv_lib_readline" = "xno"],
 
465
      AC_MSG_ERROR([libreadline is required for Drizzle. On Debian this can be found in libreadline5-dev. On RedHat this can be found in readline-devel.]))
 
466
READLINE_LIBS="${LIBS}"
 
467
LIBS="${save_LIBS}"
 
468
AC_SUBST(READLINE_LIBS)
551
469
 
552
470
DRIZZLE_CHECK_NEW_RL_INTERFACE
553
471
 
554
 
my_save_LIBS="$LIBS"
555
 
LIBS=""
556
 
AC_CHECK_LIB(readline, rl_initialize, [],
557
 
  [AC_CHECK_LIB(ncurses, tgetent, [], [AC_MSG_ERROR(Couldn't find ncurses)]) 
558
 
   AC_SEARCH_LIBS(rl_initialize, readline, [],
559
 
    [AC_MSG_ERROR(Couldn't find libreadline.)])])
560
 
READLINE_LIBS="$LIBS"
561
 
LIBS="$my_save_LIBS"
562
 
AC_SUBST(READLINE_LIBS)
563
 
 
564
 
 
565
472
#--------------------------------------------------------------------
566
473
# Check for libpcre
567
474
#--------------------------------------------------------------------
568
475
 
569
 
AC_LANG_PUSH([C++])
570
 
AC_PATH_PROG(PKG_CONFIG, pkg-config, AC_MSG_ERROR([pkg-config wasn't found.]))
571
 
PKG_CHECK_MODULES(PCRE, [libpcrecpp >= 3], [found_pcre="yes"],[found_pcre="no"])
572
 
 
573
 
if test "$found_pcre" = "no"
574
 
then
575
 
  dnl Only check the header here, because autoconf can't handle
576
 
  dnl checking for C++ methods without C linkages
577
 
  AC_CHECK_HEADERS(pcrecpp.h)
578
 
  if test "x$ac_cv_header_pcrecpp_h" != "xyes" 
579
 
  then
580
 
    AC_MSG_ERROR([Couldn't find pcrecpp.h. Try installing the development package associated with libpcre on your system.])
581
 
  else
582
 
    # Found headers, now see if we can link
583
 
    AC_MSG_CHECKING(for libpcrecpp)
584
 
    save_LDFLAGS="$LDFLAGS"
585
 
    LDFLAGS="-lpcrecpp -lpcre"
586
 
    AC_TRY_LINK([
587
 
#include <pcrecpp.h>
588
 
    ],
589
 
    [pcrecpp::RE_Options opt;],
590
 
    [found_pcre="yes"],
591
 
    [AC_MSG_ERROR([Couldn't link libpcrecpp])])
592
 
 
593
 
    PCRE_LIBS="$LDFLAGS"
594
 
    LDFLAGS="$save_LDFLAGS"
595
 
    AC_MSG_RESULT([yes])
596
 
  fi
597
 
fi
598
 
AC_LANG_POP([])
599
 
AC_SUBST(PCRE_LIBS)
600
 
AC_SUBST(PCRE_CFLAGS)
 
476
AC_LIB_HAVE_LINKFLAGS(pcre,, [#include <pcre.h>], [pcre *re= NULL])
 
477
AS_IF([test "x$ac_cv_libpcre" = "xno"],[
 
478
  unset ac_cv_libpcre
 
479
  AC_LIB_HAVE_LINKFLAGS(pcre,, [#include <pcre/pcre.h>], [pcre *re= NULL])
 
480
  AS_IF([test "x$ac_cv_libpcre" = "xno"],
 
481
        [AC_MSG_ERROR([libpcre is required for Drizzle. On Debian this can be found in libpcre3-dev. On RedHat this can be found in pcre-devel.])]
 
482
        [AC_DEFINE(PCRE_HEADER,[<pcre/pcre.h>],[Location of pcre header])])
 
483
],[
 
484
  AC_DEFINE(PCRE_HEADER,[<pcre.h>],[Location of pcre header])
 
485
])
 
486
 
601
487
 
602
488
dnl Find paths to some shell programs
603
489
AC_PATH_PROG(LN, ln, ln)
711
597
AC_SUBST(CHECK_PID)
712
598
AC_MSG_RESULT("$CHECK_PID")
713
599
 
714
 
# We need an ANSI C compiler
715
 
AM_PROG_CC_STDC
716
 
 
717
 
# We need an assembler, too
718
 
AM_PROG_AS
719
 
CCASFLAGS="$CCASFLAGS $ASFLAGS"
720
600
 
721
601
# Check if we need noexec stack for assembler
722
602
AC_CHECK_NOEXECSTACK
723
603
 
724
 
if test "$am_cv_prog_cc_stdc" = "no"
725
 
then
726
 
  AC_MSG_ERROR([Drizzle requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
727
 
fi
728
 
 
729
 
 
730
604
AC_ARG_WITH([server-suffix],
731
605
    [AS_HELP_STRING([--with-server-suffix],
732
606
      [Append value to the version string.])],
733
607
    [ DRIZZLE_SERVER_SUFFIX=`echo "$withval" | sed -e  's/^\(...................................\)..*$/\1/'` ],
734
608
    [ DRIZZLE_SERVER_SUFFIX= ]
735
609
    )
736
 
AC_SUBST(DRIZZLE_SERVER_SUFFIX)
 
610
AC_DEFINE_UNQUOTED([DRIZZLE_SERVER_SUFFIX],[$DRIZZLE_SERVER_SUFFIX],
 
611
                   [Append value to the version string])
737
612
 
738
613
# Force use of a curses libs
739
614
AC_ARG_WITH([named-curses-libs],
780
655
AC_SUBST(DRIZZLE_TCP_PORT)
781
656
# We might want to document the assigned port in the manual.
782
657
AC_SUBST(DRIZZLE_TCP_PORT_DEFAULT)
 
658
AC_DEFINE_UNQUOTED([DRIZZLE_PORT],[$DRIZZLE_TCP_PORT],
 
659
                   [Drizzle port to use])
 
660
AC_DEFINE_UNQUOTED([DRIZZLE_PORT_DEFAULT],[$DRIZZLE_TCP_PORT_DEFAULT],
 
661
                   [If we defaulted to DRIZZLE_PORT, then this will be zero])
783
662
 
784
663
# Use this to set the place used for unix socket used to local communication.
785
 
AC_ARG_WITH([mysqld-user],
786
 
    [AS_HELP_STRING([--with-mysqld-user=username],
787
 
            [What user the mysqld daemon shall be run as.
788
 
                @<:@default=mysql@:>@])],
789
 
    [ MYSQLD_USER=$withval ],
790
 
    [ MYSQLD_USER=mysql ]
 
664
AC_ARG_WITH([drizzled-user],
 
665
    [AS_HELP_STRING([--with-drizzled-user=username],
 
666
            [What user the drizzled daemon shall be run as.
 
667
                @<:@default=drizzle@:>@])],
 
668
    [ DRIZZLED_USER=$withval ],
 
669
    [ DRIZZLED_USER=drizzle ]
791
670
    )
792
 
AC_SUBST(MYSQLD_USER)
 
671
AC_SUBST(DRIZZLED_USER)
793
672
 
794
673
# If we should allow LOAD DATA LOCAL
795
674
AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default)
807
686
  AC_MSG_RESULT([no])
808
687
fi
809
688
 
810
 
DRIZZLE_SYS_LARGEFILE
811
 
 
812
689
# Types that must be checked AFTER large file support is checked
813
690
AC_TYPE_SIZE_T
814
691
 
823
700
AC_CHECK_HEADERS(fcntl.h float.h fpu_control.h ieeefp.h)
824
701
AC_CHECK_HEADERS(limits.h pwd.h select.h linux/config.h)
825
702
AC_CHECK_HEADERS(sys/fpu.h utime.h sys/utime.h )
826
 
AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h)
827
 
AC_CHECK_HEADERS(sys/timeb.h sys/vadvise.h sys/wait.h term.h)
 
703
AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h)
 
704
AC_CHECK_HEADERS([curses.h term.h],[],[],
 
705
[[#ifdef HAVE_CURSES_H
 
706
# include <curses.h>
 
707
#endif
 
708
]])
828
709
AC_CHECK_HEADERS(termio.h termios.h sched.h alloca.h)
829
 
AC_CHECK_HEADERS(sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h)
830
 
AC_CHECK_HEADERS(sys/prctl.h sys/resource.h sys/param.h port.h ieeefp.h)
 
710
AC_CHECK_HEADERS(sys/prctl.h ieeefp.h)
831
711
AC_CHECK_HEADERS(execinfo.h)
832
712
 
833
 
AC_CHECK_HEADERS([xfs/xfs.h])
834
 
 
835
713
#--------------------------------------------------------------------
836
714
# Check for system libraries. Adds the library to $LIBS
837
715
# and defines HAVE_LIBM etc
838
716
#--------------------------------------------------------------------
839
717
 
840
718
AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
841
 
AC_CHECK_FUNCS(log2)
842
719
 
843
720
AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)])
844
721
AC_CHECK_FUNC(yp_get_default_domain, [],
862
739
  AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)])
863
740
fi
864
741
 
865
 
AC_CHECK_TYPES([int8, uint8, int16, uint16, int32, uint32, int64, uint64,
866
 
                uchar, uint, ulong],[],[], [
867
 
#include <sys/types.h>
868
 
])
869
742
AC_CHECK_TYPES([fp_except], [], [], [
870
743
#include <sys/types.h>
871
744
#include <ieeefp.h>
874
747
my_save_LIBS="$LIBS"
875
748
LIBS=""
876
749
AC_CHECK_LIB(dl,dlopen)
877
 
AC_CHECK_FUNCS(dlopen dlerror)
 
750
AC_CHECK_FUNCS(dlopen)
878
751
if test "$ac_cv_func_dlopen" != "yes"
879
752
then
880
753
  AC_MSG_ERROR([Drizzle requires dlopen])
883
756
LIBS="$my_save_LIBS"
884
757
AC_SUBST(LIBDL_LIBS)
885
758
 
886
 
AC_CHECK_FUNCS(strtok_r)
887
 
 
888
 
 
889
 
 
890
 
AC_ARG_WITH([fast-mutexes],
891
 
    [AS_HELP_STRING([--with-fast-mutexes],
892
 
            [Compile with fast mutexes  @<:@default=off@:>@])],
893
 
    [with_fast_mutexes=$withval],
894
 
    [with_fast_mutexes=no])
895
 
 
896
 
if test "$with_fast_mutexes" != "no"
897
 
then
898
 
        AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1], 
899
 
                        [Define to 1 if you want to use fast mutexes])
900
 
fi
901
 
 
902
 
AM_CONDITIONAL(BUILD_FAST_MUTEX,[test "$with_fast_mutexes" != "no"])
 
759
 
 
760
AC_ARG_WITH([atomic-ops],
 
761
    [AS_HELP_STRING([--with-atomic-ops=rwlocks|smp|up],
 
762
       [Implement atomic operations using pthread rwlocks or atomic CPU
 
763
        instructions for multi-processor or uniprocessor
 
764
        configuration. By default gcc built-in sync functions are used,
 
765
        if available and 'smp' configuration otherwise.])],
 
766
    [with_atomic_ops="$withval"],
 
767
    [with_atomic_ops=smp])
 
768
 
 
769
case "$with_atomic_ops" in
 
770
  "up") AC_DEFINE([MY_ATOMIC_MODE_DUMMY], [1],
 
771
                  [Assume single-CPU mode, no concurrency]) ;;
 
772
  "rwlocks") AC_DEFINE([MY_ATOMIC_MODE_RWLOCKS], [1],
 
773
                  [Use pthread rwlocks for atomic ops]) ;;
 
774
  "smp") 
 
775
    AC_CACHE_CHECK(
 
776
      [whether the compiler provides atomic builtins],
 
777
      [ac_cv_gcc_atomic_builtins],
 
778
      [AC_RUN_IFELSE(
 
779
        [AC_LANG_PROGRAM([],[[
 
780
          int foo= -10; int bar= 10;
 
781
          if (!__sync_fetch_and_add(&foo, bar) || foo)
 
782
            return -1;
 
783
          bar= __sync_lock_test_and_set(&foo, bar);
 
784
          if (bar || foo != 10)
 
785
            return -1;
 
786
          bar= __sync_val_compare_and_swap(&bar, foo, 15);
 
787
          if (bar)
 
788
            return -1;
 
789
          return 0;
 
790
        ]])],
 
791
       [ac_cv_gcc_atomic_builtins=yes],
 
792
       [ac_cv_gcc_atomic_builtins=no])])
 
793
 
 
794
    if test "x$ac_cv_gcc_atomic_builtins" = "xyes"; then
 
795
      AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1,
 
796
                [Define to 1 if compiler provides atomic builtins.])
 
797
    fi
 
798
   ;;
 
799
   *) AC_MSG_ERROR(["$with_atomic_ops" is not a valid value for --with-atomic-ops]) ;;
 
800
esac
 
801
 
903
802
 
904
803
AC_ARG_WITH([comment],
905
804
    [AS_HELP_STRING([--with-comment],
912
811
else
913
812
  COMPILATION_COMMENT="Source distribution"
914
813
fi
915
 
AC_SUBST(COMPILATION_COMMENT)
916
 
 
917
 
if expr "$target_os" : "[[Ll]]inux.*" > /dev/null
918
 
then
919
 
  TARGET_LINUX="true"
920
 
  AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
921
 
else
922
 
  TARGET_LINUX="false"
923
 
fi
 
814
AC_DEFINE_UNQUOTED([COMPILATION_COMMENT],["$COMPILATION_COMMENT"],
 
815
                   [Comment about compilation environment])
924
816
 
925
817
dnl Checks for typedefs, structures, and compiler characteristics.
926
818
AC_C_CONST
927
819
AC_C_INLINE
 
820
AC_C_VOLATILE
928
821
AC_TYPE_OFF_T
929
822
AC_HEADER_TIME
930
823
AC_STRUCT_TM
931
 
# AC_CHECK_SIZEOF return 0 when it does not find the size of a
932
 
# type. We want a error instead.
933
 
AC_CHECK_SIZEOF(char, 1)
934
 
if test "$ac_cv_sizeof_char" -eq 0
935
 
then
936
 
  AC_MSG_ERROR([No size for char type.])
937
 
fi
938
 
AC_CHECK_SIZEOF(char*, 4)
939
 
AC_CHECK_SIZEOF(short, 2)
940
 
AC_CHECK_SIZEOF(int, 4)
941
 
if test "$ac_cv_sizeof_int" -eq 0
942
 
then
943
 
  AC_MSG_ERROR("No size for int type.")
944
 
fi
945
 
AC_CHECK_SIZEOF(long, 4)
946
 
if test "$ac_cv_sizeof_long" -eq 0
947
 
then
948
 
  AC_MSG_ERROR("No size for long type.")
949
 
fi
950
 
AC_CHECK_SIZEOF(long long, 8)
951
 
if test "$ac_cv_sizeof_long_long" -eq 0
952
 
then
953
 
  AC_MSG_ERROR("Drizzle needs a long long type.")
954
 
fi
955
824
# off_t is not a builtin type
956
825
AC_CHECK_SIZEOF(off_t, 4)
957
826
if test "$ac_cv_sizeof_off_t" -eq 0
958
827
then
959
828
  AC_MSG_ERROR("Drizzle needs a off_t type.")
960
829
fi
 
830
AC_CHECK_SIZEOF(size_t)
 
831
AC_DEFINE_UNQUOTED([SIZEOF_SIZE_T],[$ac_cv_sizeof_size_t],[Size of size_t as computed by sizeof()])
 
832
AC_CHECK_SIZEOF(long long)
 
833
AC_DEFINE_UNQUOTED(SIZEOF_LONG_LONG,[$ac_cv_sizeof_long_long],[Size of long long as computed by sizeof()])
961
834
 
962
835
dnl
963
836
dnl check if time_t is unsigned
966
839
DRIZZLE_CHECK_TIME_T
967
840
 
968
841
 
969
 
# do we need #pragma interface/#pragma implementation ?
970
 
# yes if it's gcc 2.x, and not icc pretending to be gcc, and not cygwin
971
 
AC_MSG_CHECKING(the need for @%:@pragma interface/implementation)
972
 
# instead of trying to match SYSTEM_TYPE and CC_VERSION (that doesn't
973
 
# follow any standard), we'll use well-defined preprocessor macros:
974
 
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
975
 
#if !defined(__CYGWIN__) && !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ < 3)
976
 
#error USE_PRAGMA_IMPLEMENTATION
977
 
#endif
978
 
]])],[
979
 
  AC_MSG_RESULT(no)
980
 
],[
981
 
  AC_MSG_RESULT(yes)
982
 
  AC_DEFINE(USE_PRAGMA_IMPLEMENTATION,[1],[pragma implementation is a good idea])
983
 
  AC_DEFINE(USE_PRAGMA_INTERFACE,[1],[pragma interface is a good idea])
984
 
])
985
 
 
986
842
# This always gives a warning. Ignore it unless you are cross compiling
987
843
AC_C_BIGENDIAN
988
 
#---START: Used in for client configure
989
 
# Check base type of last arg to accept
990
 
DRIZZLE_TYPE_ACCEPT
991
 
#---END:
992
 
# Figure out what type of struct rlimit to use with setrlimit
993
 
DRIZZLE_TYPE_STRUCT_RLIMIT
 
844
 
994
845
# Find where the stack goes
995
846
DRIZZLE_STACK_DIRECTION
996
847
# We want to skip alloca on irix unconditionally. It may work on some version..
997
848
DRIZZLE_FUNC_ALLOCA
998
 
# Do struct timespec have members tv_sec or ts_sec
999
 
DRIZZLE_TIMESPEC_TS
1000
 
# Do we have the tzname variable
1001
 
DRIZZLE_TZNAME
1002
 
# Do the c++ compiler have a bool type
1003
 
DRIZZLE_CXX_BOOL
 
849
 
1004
850
AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
1005
 
AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
1006
 
AC_CHECK_TYPES([u_int32_t])
 
851
AC_CHECK_TYPES([uint, ulong])
1007
852
 
1008
853
DRIZZLE_PTHREAD_YIELD
1009
854
 
1010
855
 
1011
856
dnl Checks for header files.
1012
 
AC_CHECK_HEADERS(malloc.h sys/cdefs.h)
 
857
AC_CHECK_HEADERS(malloc.h)
1013
858
 
1014
859
dnl Checks for library functions.
1015
860
AC_FUNC_ALLOCA
1016
861
AC_PROG_GCC_TRADITIONAL
1017
862
AC_TYPE_SIGNAL
1018
 
AC_CHECK_FUNCS(re_comp regcomp strdup)
1019
 
 
1020
 
dnl Sun compilers have their own vis.h that is about something
1021
 
dnl totally different. So, not to change the libedit source, we
1022
 
dnl do some additional checks before we define HAVE_VIS_H.
1023
 
AC_CHECK_HEADER(vis.h,
1024
 
  [AC_CHECK_FUNC(strvis,
1025
 
    [AC_DEFINE([HAVE_VIS_H], [1],[Found vis.h and the strvis() function])])])
1026
 
 
1027
 
AC_CHECK_FUNCS(strlcat strlcpy)
 
863
 
1028
864
AC_CHECK_FUNCS(issetugid)
1029
 
AC_CHECK_FUNCS(getline flockfile)
1030
865
 
1031
866
# from old readline settting:
1032
867
 
1035
870
 
1036
871
# Already-done: stdlib.h string.h unistd.h termios.h
1037
872
AC_CHECK_HEADERS(stdarg.h dirent.h locale.h ndir.h sys/dir.h \
1038
 
 sys/file.h sys/ndir.h sys/ptem.h sys/pte.h sys/select.h sys/stream.h \
1039
 
 sys/mman.h curses.h termcap.h termio.h termbits.h asm/termbits.h grp.h \
1040
 
paths.h semaphore.h)
 
873
 sys/ndir.h sys/select.h \
 
874
 sys/mman.h termcap.h termio.h asm/termbits.h grp.h \
 
875
 paths.h)
1041
876
 
1042
877
# Already-done: strcasecmp
1043
 
AC_CHECK_FUNCS(lstat putenv select setenv setlocale strcoll tcgetattr)
 
878
AC_CHECK_FUNCS(lstat select)
1044
879
 
1045
880
AC_HEADER_STAT
1046
881
DRIZZLE_SIGNAL_CHECK
1047
882
DRIZZLE_CHECK_GETPW_FUNCS
1048
883
DRIZZLE_HAVE_TIOCGWINSZ
1049
 
DRIZZLE_HAVE_FIONREAD
1050
884
DRIZZLE_HAVE_TIOCSTAT
1051
 
DRIZZLE_STRUCT_DIRENT_D_INO
1052
 
DRIZZLE_STRUCT_DIRENT_D_NAMLEN
1053
 
DRIZZLE_TYPE_SIGHANDLER
1054
 
DRIZZLE_CHECK_MULTIBYTE
1055
 
if test "$with_named_curses" = "no"
1056
 
then
1057
 
  DRIZZLE_CHECK_LIB_TERMCAP
1058
 
else
1059
 
  TERMCAP_LIBS="$with_named_curses"
1060
 
fi
1061
 
AC_SUBST(TERMCAP_LIBS)
1062
 
 
1063
 
# Check if the termcap function 'tgoto' is already declared in
1064
 
# system header files or if it need to be declared locally
1065
 
AC_CHECK_DECLS(tgoto,,,[
1066
 
#ifdef HAVE_CURSES_H
1067
 
# include <curses.h>
1068
 
#elif HAVE_NCURSES_H
1069
 
# include <ncurses.h>
1070
 
#endif
1071
 
#ifdef HAVE_TERM_H
1072
 
# include <term.h>
1073
 
#endif
1074
 
])
1075
 
 
1076
 
# End of readline/libedit stuff
 
885
 
1077
886
#########################################################################
1078
887
 
1079
888
dnl Checks for library functions.
1080
889
 
1081
 
#
1082
 
# The following code disables intrinsic function support while we test for
1083
 
# library functions.  This is to avoid configure problems with Intel ecc
1084
 
# compiler
1085
 
 
1086
 
ORG_CFLAGS="$CFLAGS"
1087
 
if test "$GCC" != "yes"; then
1088
 
  AC_SYS_COMPILER_FLAG(-nolib_inline,nolib_inline,CFLAGS,[],[])
1089
 
fi
1090
 
 
1091
 
#AC_FUNC_MMAP
1092
 
AC_TYPE_SIGNAL
1093
 
DRIZZLE_TYPE_QSORT
1094
890
AC_FUNC_UTIME_NULL
1095
891
AC_FUNC_VPRINTF
1096
892
 
1100
896
  AC_MSG_ERROR("Drizzle requires fcntl.")
1101
897
fi
1102
898
 
1103
 
AC_CONFIG_LIBOBJ_DIR([mystrings])
 
899
AC_CONFIG_LIBOBJ_DIR([gnulib])
1104
900
 
1105
 
AC_CHECK_FUNCS(bsearch \
 
901
AC_CHECK_FUNCS( \
1106
902
  cuserid fchmod \
1107
 
  fdatasync finite fpresetsticky fpsetmask fsync ftruncate \
1108
 
  getcwd getpassphrase getpwnam \
1109
 
  getpwuid getrlimit getrusage getwd index initgroups isnan \
 
903
  fdatasync fpresetsticky fpsetmask fsync \
 
904
  getpassphrase getpwnam \
 
905
  getpwuid getrlimit getrusage index initgroups isnan \
1110
906
  localtime_r gethrtime gmtime_r \
1111
 
  locking longjmp lrand48 madvise mallinfo \
1112
 
  memmove \
1113
 
  mkstemp mlockall perror poll pread pthread_attr_create mmap mmap64 \
 
907
  madvise \
 
908
  mkstemp mlockall poll pread pthread_attr_create mmap mmap64 \
1114
909
  pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
1115
910
  pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
1116
911
  pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
1117
912
  pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
1118
913
  realpath rename rwlock_init setupterm \
1119
 
  shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \
1120
 
  sighold sigset sigthreadmask port_create sleep \
1121
 
  snprintf socket strcasecmp strerror strsignal strpbrk \
1122
 
  tell tempnam vidattr \
1123
 
  posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd)
 
914
  sigaction \
 
915
  sigthreadmask \
 
916
  snprintf strpbrk \
 
917
  tell tempnam \
 
918
  backtrace backtrace_symbols backtrace_symbols_fd)
1124
919
 
1125
920
AC_LANG_PUSH(C++)
1126
921
# Test whether madvise() is declared in C++ code -- it is not on some
1136
931
 
1137
932
AM_CONDITIONAL(BUILD_THR_RWLOCK,[test "$ac_cv_func_rwlock_init" -a "$ac_cv_funn_pthread_rwlock_rdlock"])
1138
933
 
1139
 
# Check that isinf() is available in math.h and can be used in both C and C++
1140
 
# code
1141
 
AC_MSG_CHECKING(for isinf in math.h)
1142
 
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[
1143
 
    float f = 0.0; 
1144
 
    int r = isinf(f); 
1145
 
    return r;
1146
 
  ]])],[
1147
 
    AC_MSG_RESULT(yes)
1148
 
    AC_MSG_CHECKING(whether isinf() can be used in C++ code)
1149
 
    AC_LANG_PUSH([C++])
1150
 
    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[
1151
 
      float f = 0.0;
1152
 
      int r = isinf(f);
1153
 
      return r;
1154
 
    ]])],[
1155
 
      AC_MSG_RESULT(yes)
1156
 
      AC_DEFINE(HAVE_ISINF, [1], [isinf() macro or function])
1157
 
    ],[
1158
 
      AC_MSG_RESULT(no)
1159
 
    ])
1160
 
    AC_LANG_POP([])
1161
 
  ],[
1162
 
  AC_MSG_RESULT(no)])
1163
 
 
1164
 
 
1165
 
CFLAGS="$ORG_CFLAGS"
1166
934
 
1167
935
# Sanity check: We chould not have any fseeko symbol unless
1168
936
# large_file_support=yes
1169
937
AC_CHECK_FUNC(fseeko,
1170
 
[if test "$large_file_support" = no -a "$TARGET_LINUX" = "true";
 
938
[if test "$large_file_support" = no -a "x$TARGET_LINUX" = "xtrue";
1171
939
then
1172
940
  AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!")
1173
941
fi]
1175
943
 
1176
944
# Check definition of pthread_getspecific
1177
945
AC_CACHE_CHECK([args to pthread_getspecific], [mysql_cv_getspecific_args],
1178
 
  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if !defined(_REENTRANT)
 
946
  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 
947
#if !defined(_REENTRANT)
1179
948
#define _REENTRANT
1180
949
#endif
 
950
#ifndef _POSIX_PTHREAD_SEMANTICS 
1181
951
#define _POSIX_PTHREAD_SEMANTICS 
1182
 
#include <pthread.h> ]], [[ void *pthread_getspecific(pthread_key_t key);
1183
 
pthread_getspecific((pthread_key_t) NULL); ]])],
 
952
#endif
 
953
#include <pthread.h>
 
954
   ]], [[
 
955
void *pthread_getspecific(pthread_key_t key);
 
956
pthread_getspecific((pthread_key_t) NULL);
 
957
   ]])],
1184
958
    [mysql_cv_getspecific_args=POSIX],
1185
959
    [mysql_cv_getspecific_args=other])])
1186
960
  if test "$mysql_cv_getspecific_args" = "other"
1191
965
 
1192
966
  # Check definition of pthread_mutex_init
1193
967
  AC_CACHE_CHECK([args to pthread_mutex_init], [mysql_cv_mutex_init_args],
1194
 
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
 
968
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 
969
#ifndef _REENTRANT
 
970
#define _REENTRANT
 
971
#endif
 
972
#ifndef _POSIX_PTHREAD_SEMANTICS
1195
973
#define _POSIX_PTHREAD_SEMANTICS 
 
974
#endif
1196
975
#include <pthread.h> ]], [[ 
1197
976
  pthread_mutexattr_t attr;
1198
977
  pthread_mutex_t mp;
1209
988
#---START: Used in for client configure
1210
989
# Check definition of readdir_r
1211
990
AC_CACHE_CHECK([args to readdir_r], [mysql_cv_readdir_r],
1212
 
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _REENTRANT
 
991
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 
992
#ifndef _REENTRANT
 
993
#define _REENTRANT
 
994
#endif
 
995
#ifndef _POSIX_PTHREAD_SEMANTICS 
1213
996
#define _POSIX_PTHREAD_SEMANTICS 
 
997
#endif
1214
998
#include <pthread.h>
1215
999
#include <dirent.h>]], [[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
1216
1000
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])],
1224
1008
# Check definition of posix sigwait()
1225
1009
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
1226
1010
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 
1011
#ifndef _REENTRANT
1227
1012
#define _REENTRANT
 
1013
#endif
 
1014
#ifndef _POSIX_PTHREAD_SEMANTICS
1228
1015
#define _POSIX_PTHREAD_SEMANTICS 
 
1016
#endif
1229
1017
#include <pthread.h>
1230
1018
#include <signal.h>
1231
1019
      ]], [[
1248
1036
# Check definition of posix sigwait()
1249
1037
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
1250
1038
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 
1039
#ifndef _REENTRANT
1251
1040
#define _REENTRANT
 
1041
#endif
 
1042
#ifndef _POSIX_PTHREAD_SEMANTICS
1252
1043
#define _POSIX_PTHREAD_SEMANTICS 
 
1044
#endif
1253
1045
#include <pthread.h>
1254
1046
#include <signal.h>
1255
1047
      ]], [[
1269
1061
# Check if pthread_attr_setscope() exists
1270
1062
AC_CACHE_CHECK([for pthread_attr_setscope], [mysql_cv_pthread_attr_setscope],
1271
1063
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 
1064
#ifndef _REENTRANT
1272
1065
#define _REENTRANT
 
1066
#endif
 
1067
#ifndef _POSIX_PTHREAD_SEMANTICS
1273
1068
#define _POSIX_PTHREAD_SEMANTICS 
 
1069
#endif
1274
1070
#include <pthread.h>
1275
1071
      ]], [[
1276
1072
pthread_attr_t thr_attr;
1283
1079
  AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope])
1284
1080
fi
1285
1081
 
1286
 
# Check for bad includes
1287
 
AC_MSG_CHECKING("can netinet files be included")
1288
 
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
1289
 
#include <sys/socket.h>
1290
 
#include <netinet/in_systm.h>
1291
 
#include <netinet/in.h>
1292
 
#include <netinet/ip.h>
1293
 
#include <netinet/tcp.h>]], [[ printf("1\n"); ]])],[netinet_inc=yes],[netinet_inc=no])
1294
 
if test "$netinet_inc" = "no"
1295
 
then
1296
 
  AC_DEFINE([HAVE_BROKEN_NETINET_INCLUDES], [1], [Can netinet be included])
1297
 
fi
1298
 
AC_MSG_RESULT("$netinet_inc")
1299
 
 
1300
1082
AC_LANG_PUSH([C++])
1301
1083
AC_CHECK_HEADERS(cxxabi.h)
1302
1084
AC_CACHE_CHECK([checking for abi::__cxa_demangle], mysql_cv_cxa_demangle,
1315
1097
# Check for requested features
1316
1098
#--------------------------------------------------------------------
1317
1099
 
1318
 
DRIZZLE_CHECK_BIG_TABLES
1319
1100
DRIZZLE_CHECK_MAX_INDEXES
1320
 
DRIZZLE_CHECK_VIO
1321
1101
 
1322
1102
#--------------------------------------------------------------------
1323
1103
# Declare our plugin modules
1329
1109
 
1330
1110
AC_SUBST(mysql_plugin_dirs)
1331
1111
AC_SUBST(mysql_plugin_libs)
1332
 
AC_SUBST(mysql_plugin_defs)
1333
 
 
1334
 
# Build optimized or debug version ?
1335
 
# First check for gcc and g++
1336
 
if test "$ac_cv_c_compiler_gnu" = "yes"
1337
 
then
1338
 
  SYMBOLS_CFLAGS="-ggdb3"
1339
 
  DEBUG_OPTIMIZE_CC="-O0"
1340
 
  OPTIMIZE_CFLAGS="-O3"
1341
 
else
1342
 
  SYMBOLS_CFLAGS="-g"
1343
 
  DEBUG_OPTIMIZE_CC=""
1344
 
  OPTIMIZE_CFLAGS="-O"
1345
 
fi
1346
 
if test "$ac_cv_prog_cxx_g" = "yes"
1347
 
then
1348
 
  SYMBOLS_CXXFLAGS="-ggdb3"
1349
 
  DEBUG_OPTIMIZE_CXX="-O0"
1350
 
  OPTIMIZE_CXXFLAGS="-O3"
1351
 
else
1352
 
  SYMBOLS_CXXFLAGS="-g"
1353
 
  DEBUG_OPTIMIZE_CXX=""
1354
 
  OPTIMIZE_CXXFLAGS="-O"
1355
 
fi
1356
 
 
1357
 
dnl TODO: Remove this define once we are using 2.61 across the board.
1358
 
# AC_HEADER_ASSERT
1359
 
# ----------------
1360
 
# Check whether to enable assertions.
1361
 
ifdef([AC_HEADER_ASSERT], [], [AC_DEFUN([AC_HEADER_ASSERT],
1362
 
[
1363
 
  AC_MSG_CHECKING([whether to enable assertions])
1364
 
  AC_ARG_ENABLE([assert],
1365
 
    [  --disable-assert        turn off assertions],
1366
 
    [AC_MSG_RESULT([no])
1367
 
     AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])],
1368
 
    [AC_MSG_RESULT(yes)])
1369
 
])])
1370
 
 
1371
 
AC_HEADER_ASSERT
1372
 
 
1373
 
CFLAGS="${SYMBOLS_CFLAGS} ${CFLAGS}"
1374
 
CXXFLAGS="${SYMBOLS_CXXFLAGS} ${CXXFLAGS}  -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
1375
 
 
1376
 
AC_ARG_WITH([debug],
1377
 
    [AS_HELP_STRING([--with-debug],
1378
 
       [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
1379
 
    [with_debug=$withval],
1380
 
    [with_debug=no])
1381
 
if test "$with_debug" = "yes"
1382
 
then
1383
 
  # Medium debug.
1384
 
  CFLAGS="$DEBUG_OPTIMIZE_CC $CFLAGS ${SAVE_CFLAGS}"
1385
 
  CXXFLAGS="$DEBUG_OPTIMIZE_CXX $CXXFLAGS ${SAVE_CXXFLAGS}"
1386
 
else
1387
 
  # Optimized version. No debug
1388
 
  CFLAGS="${OPTIMIZE_CFLAGS} ${CFLAGS} ${SAVE_CFLAGS}"
1389
 
  CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS ${SAVE_CXXFLAGS}"
1390
 
fi
 
1112
drizzled_plugin_defs=`echo $drizzled_plugin_defs | sed 's/, *$//'`
 
1113
AC_SUBST(drizzled_plugin_defs)
 
1114
AC_SUBST(DRIZZLED_PLUGIN_DEP_LIBS)
 
1115
 
1391
1116
 
1392
1117
AC_ARG_ENABLE([profiling],
1393
1118
    [AS_HELP_STRING([--enable-profiling],
1431
1156
    [ac_warn_strict_aliasing="$enableval"],
1432
1157
    [ac_warn_strict_aliasing="no"])
1433
1158
 
 
1159
AC_ARG_ENABLE([cast-warnings],
 
1160
    [AS_HELP_STRING([--enable-cast-warnings],
 
1161
       [Enable warnings about use of old C-style casts @<:@default=off@:>@])],
 
1162
    [ac_warn_cast="$enableval"],
 
1163
    [ac_warn_cast="no"])
 
1164
 
 
1165
AC_ARG_ENABLE([effective-style],
 
1166
    [AS_HELP_STRING([--enable-effective-style],
 
1167
       [Enable warnings violating Effective C++ Style Guidelines @<:@default=off@:>@])],
 
1168
    [ac_warn_effc="$enableval"],
 
1169
    [ac_warn_effc="no"])
 
1170
 
 
1171
AC_ARG_ENABLE([shadow],
 
1172
    [AS_HELP_STRING([--disable-shadow],
 
1173
       [Disables warnings about scope shadowing @<:@default=on@:>@])],
 
1174
    [ac_warn_shadow="$enableval"],
 
1175
    [ac_warn_shadow="yes"])
 
1176
 
 
1177
AC_ARG_ENABLE([conversion],
 
1178
    [AS_HELP_STRING([--enable-conversion],
 
1179
       [Enables conversion warnings @<:@default=off@:>@])],
 
1180
    [ac_warn_conversion="$enableval"],
 
1181
    [ac_warn_conversion="no"])
 
1182
 
 
1183
AC_ARG_ENABLE([datarace],
 
1184
    [AS_HELP_STRING([--enable-datarace],
 
1185
       [Enables Sun Studio data race detection @<:@default=off@:>@])],
 
1186
    [ac_datarace="$enableval"],
 
1187
    [ac_datarace="no"])
 
1188
 
 
1189
AC_ARG_ENABLE([exceptions],
 
1190
    [AS_HELP_STRING([--disable-exceptions],
 
1191
        [Disables use of Exceptions in the build @<:@default=on@:>@])],
 
1192
    [ac_exceptions="$enableval"],
 
1193
    [ac_exceptions="yes"])
 
1194
 
 
1195
AC_ARG_ENABLE([cast-align-warnings],
 
1196
    [AS_HELP_STRING([--enable-cast-align-warnings],
 
1197
       [Toggle cast alignment warnings @<:@default=off@:>@])],
 
1198
    [ac_warn_cast_align="$enableval"],
 
1199
    [ac_warn_cast_align="no"])
1434
1200
 
1435
1201
if test "$GCC" = "yes"
1436
1202
then
 
1203
  if test "$ac_warn_cast_align" = "yes"
 
1204
  then
 
1205
    W_CAST_ALIGN="-Wcast-align"
 
1206
  else
 
1207
    W_CAST_ALIGN="-Wno-cast-align"
 
1208
  fi
 
1209
 
 
1210
  if test "$ac_warn_fail" = "yes"
 
1211
  then
 
1212
    W_FAIL="-Werror"
 
1213
  fi
 
1214
  BASE_WARNINGS="-Wall -Wextra ${W_FAIL} ${W_CAST_ALIGN}"
1437
1215
 
1438
1216
  if test "$ac_warn_longlong" = "yes"
1439
1217
  then
1449
1227
    W_STRICT_ALIASING="-Wno-strict-aliasing"
1450
1228
  fi
1451
1229
 
 
1230
  if test "$ac_warn_shadow" = "yes"
 
1231
  then
 
1232
    W_SHADOW="-Wshadow"
 
1233
    NO_SHADOW="-Wno-shadow"
 
1234
  else
 
1235
    W_SHADOW="-Wno-shadow"
 
1236
    NO_SHADOW=""
 
1237
  fi
 
1238
 
1452
1239
  if test "$ac_profiling" = "yes"
1453
1240
  then
1454
1241
    GPROF_PROFILING="-pg"
 
1242
    save_LIBS="${LIBS}"
 
1243
    LIBS=""
 
1244
    AC_CHECK_LIB(c_p, read)
 
1245
    LIBC_P="${LIBS}"
 
1246
    LIBS="${save_LIBS}"
1455
1247
  else
1456
1248
    GPROF_PROFILING=" "
1457
1249
  fi
1465
1257
 
1466
1258
  if test "$ac_warn_pedantic" = "yes"
1467
1259
  then
 
1260
    AC_CACHE_CHECK([whether it is safe to use -Wredundant-decls],
 
1261
      [ac_cv_safe_to_use_Wredundant_decls_],
 
1262
      [AC_LANG_PUSH(C++)
 
1263
       save_CXXFLAGS="${CXXFLAGS}"
 
1264
       CXXFLAGS="${CXXFLAGS} ${W_FAIL} -Wredundant-decls"
 
1265
       AC_COMPILE_IFELSE(
 
1266
         [AC_LANG_PROGRAM([
 
1267
template <typename E> struct C { void foo(); };
 
1268
template <typename E> void C<E>::foo() { }
 
1269
template <> void C<int>::foo();
 
1270
            AC_INCLUDES_DEFAULT])],
 
1271
          [ac_cv_safe_to_use_Wredundant_decls_=yes],
 
1272
          [ac_cv_safe_to_use_Wredundant_decls_=no])
 
1273
        CXXFLAGS="${save_CXXFLAGS}"
 
1274
        AC_LANG_POP()])
 
1275
    if test $ac_cv_safe_to_use_Wredundant_decls_ = yes
 
1276
    then
 
1277
      GXX_W_REDUNDANT_DECLS="-Wredundant-decls"
 
1278
    else
 
1279
      GXX_W_REDUNDANT_DECLS="-Wno-redundant-decls"
 
1280
    fi
 
1281
    
1468
1282
    GCC_PEDANTIC="-pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls ${W_STRICT_ALIASING}"
1469
 
    GXX_PEDANTIC="-pedantic -Wundef -Wredundant-decls ${W_LONGLONG} ${W_STRICT_ALIASING}"
 
1283
    GXX_PEDANTIC="-pedantic -Wundef -Woverloaded-virtual  -Wnon-virtual-dtor -Wctor-dtor-privacy ${GXX_W_REDUNDANT_DECLS} ${W_LONGLONG} ${W_STRICT_ALIASING}"
1470
1284
  fi
1471
1285
 
1472
1286
  if test "$ac_warn_unreachable" = "yes"
1474
1288
    W_UNREACHABLE="-Wunreachable-code"
1475
1289
  fi
1476
1290
 
 
1291
  if test "$ac_warn_cast" = "yes"
 
1292
  then
 
1293
    W_CAST="-Wold-style-cast"
 
1294
  fi
 
1295
 
 
1296
  if test "$ac_warn_effc" = "yes"
 
1297
  then
 
1298
    W_EFFC="-Weffc++"
 
1299
  fi
 
1300
 
 
1301
  if test "$ac_warn_conversion" = "yes"
 
1302
  then
 
1303
    W_CONVERSION="-Wconversion"
 
1304
  fi
 
1305
 
 
1306
  CC_WARNINGS="${BASE_WARNINGS} ${GCC_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_SHADOW} ${W_CONVERSION}"
 
1307
  CXX_WARNINGS="${BASE_WARNINGS} ${GXX_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_CAST} ${W_SHADOW} ${W_EFFC} ${W_CONVERSION}"
 
1308
 
 
1309
  if test "$ac_exceptions" = "no"
 
1310
  then
 
1311
    NO_EXCEPTIONS="-fno-exceptions"
 
1312
    W_EXCEPTIONS="-fexceptions"
 
1313
  fi
 
1314
  NO_REDUNDANT_DECLS="-Wno-redundant-decls"
 
1315
  PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow"
 
1316
fi
 
1317
if test "$SUNCC" = "yes"
 
1318
then
 
1319
  if test "$ac_datarace" = "yes"
 
1320
  then
 
1321
    CFLAGS="-xinstrument=datarace ${CFLAGS}"
 
1322
    CXXFLAGS="-xinstrument=datarace ${CXXFLAGS}"
 
1323
  fi
 
1324
 
1477
1325
  if test "$ac_warn_fail" = "yes"
1478
1326
  then
1479
 
    W_FAIL="-Werror"
1480
 
  fi
1481
 
 
1482
 
  BASE_WARNINGS="-W -Wall -Wextra"
1483
 
  GCC_WARNINGS="${C99_SUPPORT_HACK} ${BASE_WARNINGS} ${GCC_PEDANTIC} ${W_UNREACHABLE} ${W_FAIL} ${GPROF_PROFILING} ${GPROF_COVERAGE}"
1484
 
  GXX_WARNINGS="${BASE_WARNINGS} ${GXX_PEDANTIC} ${W_UNREACHABLE} ${W_FAIL} ${GPROF_PROFILING} ${GPROF_COVERAGE}"
1485
 
 
1486
 
  AM_CXXFLAGS="${GXX_WARNINGS} ${AM_CXXFLAGS}"
1487
 
  AM_CFLAGS="${GCC_WARNINGS} ${AM_CFLAGS}"
1488
 
fi
1489
 
 
1490
 
AC_SUBST([GLOBAL_CPPFLAGS],['-I$(top_srcdir) -I$(top_builddir)'])
1491
 
AC_SUBST([AM_CPPFLAGS],['${GLOBAL_CPPFLAGS}'])
 
1327
    W_FAIL="-errwarn=%all"
 
1328
  fi
 
1329
 
 
1330
  CC_WARNINGS="-v -errtags=yes -erroff=E_ATTRIBUTE_NOT_VAR ${W_FAIL}"
 
1331
  CXX_WARNINGS="+w +w2 -xport64 -errtags=yes -erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint ${W_FAIL}" 
 
1332
  PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn"
 
1333
  NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED"
 
1334
  if test "$ac_exceptions" = "no"
 
1335
  then
 
1336
    NO_EXCEPTIONS="-features=no%except"
 
1337
    W_EXCEPTIONS="-features=except"
 
1338
  fi
 
1339
fi
 
1340
AC_SUBST(NO_EXCEPTIONS)
 
1341
AC_SUBST(W_EXCEPTIONS)
 
1342
AC_SUBST(NO_SHADOW)
 
1343
AC_SUBST(W_SHADOW)
 
1344
AC_SUBST(NO_REDUNDANT_DECLS)
 
1345
AC_SUBST(PROTOSKIP_WARNINGS)
 
1346
AC_SUBST(NO_UNREACHED)
 
1347
 
 
1348
if test "x${gl_LIBOBJS}" != "x"
 
1349
then
 
1350
  if test "$GCC" = "yes"
 
1351
  then
 
1352
    CPPFLAGS="-isystem \$(top_srcdir)/gnulib -isystem \$(top_builddir)/gnulib ${CPPFLAGS}"
 
1353
  else
 
1354
    CPPFLAGS="-I\$(top_srcdir)/gnulib -I\$(top_builddir)/gnulib ${CPPFLAGS}"
 
1355
  fi
 
1356
fi
 
1357
 
 
1358
CPPFLAGS="-I\$(top_srcdir) -I\$(top_builddir) ${CPPFLAGS}"
 
1359
CFLAGS="${CC_WARNINGS} ${CFLAGS}"
 
1360
CXXFLAGS="${CXX_WARNINGS} ${W_EXCEPTIONS} ${CXXFLAGS}"
 
1361
 
 
1362
dnl Must be done once we turn on warnings and such
 
1363
AC_CACHE_CHECK(
 
1364
  [whether __attribute__ visibility "hidden" is supported],
 
1365
  [ac_cv_can_use_hidden_],[
 
1366
    AC_LANG_PUSH(C++)
 
1367
    AC_LINK_IFELSE([
 
1368
      AC_LANG_PROGRAM(
 
1369
        [[
 
1370
__attribute__((visibility ("hidden")))
 
1371
void testme() {  };
 
1372
        ]],[[testme()]]
 
1373
      )],  
 
1374
      [ac_cv_can_use_hidden_=yes],
 
1375
      [ac_cv_can_use_hidden_=no])
 
1376
    AC_LANG_POP()])
 
1377
if test "$ac_cv_can_use_hidden_" = "yes"
 
1378
then
 
1379
  AC_DEFINE(HAVE_ATTR_HIDDEN, 1,
 
1380
  [Define to 1 if you have support for __attribute__((visibility("hidden")))])
 
1381
fi
 
1382
 
 
1383
AM_CPPFLAGS="${CPPFLAGS}"
 
1384
AM_CFLAGS="${CFLAGS}"
 
1385
AM_CXXFLAGS="${CXXFLAGS}"
 
1386
 
 
1387
AC_SUBST([AM_CPPFLAGS])
1492
1388
AC_SUBST([AM_CFLAGS])
1493
1389
AC_SUBST([AM_CXXFLAGS])
1494
1390
 
1495
 
# Some usefull subst
1496
 
AC_SUBST(CC)
1497
 
AC_SUBST(GXX)
1498
 
 
1499
 
# Set configuration options for make_binary_distribution
1500
 
case $SYSTEM_TYPE in
1501
 
  *netware*)
1502
 
    MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --no-strip"
1503
 
    ;;
1504
 
  *)
1505
 
    : # no change for other platforms yet
1506
 
    ;;
1507
 
esac
1508
 
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
1509
 
 
1510
 
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
1511
 
 mystrings/Makefile storage/Makefile dnl
1512
 
 vio/Makefile po/Makefile.in dnl
1513
 
 libdrizzle/Makefile client/Makefile dnl
 
1391
dnl We've collected the flags in AM_*FLAGS now, so blank these.
 
1392
CFLAGS=""
 
1393
CXXFLAGS=""
 
1394
CPPFLAGS=""
 
1395
 
 
1396
AC_SUBST(pkgplugindir,"\$(pkglibdir)/plugin")
 
1397
 
 
1398
dnl GCC Precompiled Header Support
 
1399
dnl re-enable later
 
1400
dnl AM_CONDITIONAL([BUILD_GCC_PCH],[test "$GCC" = "yes"])
 
1401
AM_CONDITIONAL([BUILD_GCC_PCH],[test "no" = "yes"])
 
1402
 
 
1403
AC_CONFIG_FILES(Makefile dnl
 
1404
 gnulib/Makefile dnl
 
1405
 storage/Makefile dnl
 
1406
 po/Makefile.in dnl
1514
1407
 drizzled/Makefile dnl
1515
 
 drizzled/field/Makefile dnl
1516
 
 drizzled/serialize/Makefile dnl
 
1408
 drizzled/message/Makefile dnl
1517
1409
 drizzled/sql_builtin.cc dnl
1518
1410
 support-files/Makefile dnl
1519
1411
 tests/Makefile tests/install_test_db dnl
1520
 
 drizzled/version.h plugin/Makefile dnl
1521
 
 drizzled/drizzled_safe support-files/libdrizzle.pc dnl
 
1412
 plugin/Makefile dnl
 
1413
 drizzled/drizzled_safe dnl
1522
1414
 support-files/drizzle.server support-files/drizzle-log-rotate)
1523
1415
 
1524
 
AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
 
1416
scheduling_plugins_available="
 
1417
  pool_of_threads 
 
1418
  single_thread
 
1419
"
 
1420
 
 
1421
for sched_plugin in $scheduling_plugins_available
 
1422
do
 
1423
  varname="\${with_plugin_${sched_plugin}}"
 
1424
  result=`eval "echo $varname"`
 
1425
  if test "x$result" = "xyes"
 
1426
  then
 
1427
    scheduling_plugins="$sched_plugin $scheduling_plugins"
 
1428
  fi
 
1429
done
 
1430
 
 
1431
AC_CONFIG_COMMANDS([timestamp-h], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
 
1432
 
 
1433
AC_CONFIG_COMMANDS_PRE([
 
1434
if test "x$EGREP" != "x" -a -d po
 
1435
then
 
1436
  echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.in
 
1437
  # The grep -v 'drizzle-' is to exclude any distcheck leftovers
 
1438
  for f in `find . | grep -v 'drizzle-' | ${EGREP} '\.(cc|c|h|yy)$' | cut -c3- | sort`
 
1439
  do
 
1440
    if grep gettext.h "$f" | grep include >/dev/null 2>&1
 
1441
    then
 
1442
      echo "$f" >> po/POTFILES.in.in
 
1443
    fi
 
1444
  done
 
1445
  if ! diff po/POTFILES.in.in po/POTFILES.in >/dev/null 2>&1
 
1446
  then
 
1447
    mv po/POTFILES.in.in po/POTFILES.in
 
1448
  else
 
1449
    rm po/POTFILES.in.in
 
1450
  fi
 
1451
else
 
1452
  touch po/POTFILES.in
 
1453
fi
 
1454
])
1525
1455
 
1526
1456
# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
1527
1457
AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS' AM_CFLAGS='$AM_CFLAGS' AM_CXXFLAGS='$AM_CXXFLAGS'")
1528
1458
 
1529
1459
AC_OUTPUT
 
1460
 
 
1461
echo "---"
 
1462
echo "Configuration summary for $PACKAGE_NAME version $VERSION"
 
1463
echo ""
 
1464
echo "   * Installation prefix:       $prefix"
 
1465
echo "   * System type:               $SYSTEM_TYPE"
 
1466
echo "   * Host CPU:                  $host_cpu"
 
1467
echo "   * C Compiler:                $CC_VERSION"
 
1468
echo "   * C++ Compiler:              $CXX_VERSION"
 
1469
echo "   * Build auth_pam:            $ac_cv_header_security_pam_appl_h"
 
1470
echo "   * Assertions enabled:        $ac_cv_assert"
 
1471
echo "   * Debug enabled:             $with_debug"
 
1472
echo "   * Profiling enabled:         $ac_profiling"
 
1473
echo "   * Coverage enabled:          $ac_coverage"
 
1474
echo "   * Warnings as failure:       $ac_warn_fail"
 
1475
echo "   * Scheduling Plugins:        $scheduling_plugins"
 
1476
echo "   * C++ cstdint location:      $ac_cv_cxx_cstdint"
 
1477
echo "   * C++ hash_map location:     $ac_cv_cxx_hash_map"
 
1478
echo "   * C++ hash namespace:        $ac_cv_cxx_hash_namespace"
 
1479
echo "   * C++ shared_ptr namespace:  $ac_cv_shared_ptr_namespace"
 
1480
echo ""
 
1481
echo "---"
 
1482
 
 
1483
dnl libtoolize scans configure.ac  and needs to see some text
 
1484
m4_define([LIBTOOLIZE_AC_INIT], [])