~drizzle-trunk/drizzle/development

575.4.7 by Monty Taylor
More header cleanup.
1
dnl -*- bash -*-
1 by brian
clean slate
2
dnl Process this file with autoconf to produce a configure script.
3
77.1.65 by Monty Taylor
We don't really require 2.61, 2.59 is actually fine.
4
AC_PREREQ(2.59)dnl		Minimum Autoconf version required.
1 by brian
clean slate
5
779.2.11 by Monty Taylor
General build cleanup - removed cruft, removed depreated checks.
6
AC_INIT([drizzle],[7.0.0],[http://bugs.launchpad.net/drizzle])
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
7
AC_CONFIG_SRCDIR([drizzled/drizzled.cc])
39 by Brian Aker
Move build helper files into config
8
AC_CONFIG_AUX_DIR(config)
236.1.9 by Monty Taylor
Cleaned up configure.ac line.
9
AC_CONFIG_HEADERS([config.h])
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
10
722.1.3 by Monty Taylor
Cleaned up a few build things.
11
# Setting CFLAGS here prevents AC_CANONICAL_TARGET from injecting them
12
SAVE_CFLAGS=${CFLAGS}
13
SAVE_CXXFLAGS=${CXXFLAGS}
14
CFLAGS=
15
CXXFLAGS=
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
16
28.1.33 by Monty Taylor
Added -Wall
17
AC_CANONICAL_TARGET
722.1.3 by Monty Taylor
Cleaned up a few build things.
18
19
CFLAGS=${SAVE_CFLAGS}
20
CXXFLAGS=${SAVE_CXXFLAGS}
21
779.4.10 by Monty Taylor
Cleaned up a few build things. Thank me... builds should be quicker now. :)
22
AM_INIT_AUTOMAKE(nostdinc subdir-objects -Wall -Werror)
779.3.21 by Monty Taylor
Fixed solaris fixes for linux. Oh, and I also seem to have fixed some more configure stuff.
23
722.1.3 by Monty Taylor
Cleaned up a few build things.
24
if test "x${enable_dependency_tracking}" = "x"
25
then
26
  enable_dependency_tracking=yes
27
fi
28
815.1.1 by Monty Taylor
Add timegm which is missing on Solaris.
29
gl_EARLY
722.1.3 by Monty Taylor
Cleaned up a few build things.
30
1 by brian
clean slate
31
# See the libtool docs for information on how to do shared lib versions.
383.1.47 by Monty Taylor
Couple of tiny changes.
32
SHARED_LIB_MAJOR_VERSION=1
1 by brian
clean slate
33
SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0
722.1.3 by Monty Taylor
Cleaned up a few build things.
34
AC_SUBST(SHARED_LIB_MAJOR_VERSION)
35
AC_SUBST(SHARED_LIB_VERSION)
36
528 by Monty Taylor
Re-arragned a few things in configure.ac.
37
38
dnl Checks for programs.
39
AC_PROG_CC
755.1.6 by Monty Taylor
One more stupid change.
40
AC_PROG_CXX
554 by Monty
Added impl of macro missing from old systems.
41
815.1.1 by Monty Taylor
Add timegm which is missing on Solaris.
42
gl_USE_SYSTEM_EXTENSIONS
528 by Monty Taylor
Re-arragned a few things in configure.ac.
43
AC_CXX_HEADER_STDCXX_98
44
if test "$ac_cv_cxx_stdcxx_98" = "no"
45
then
46
  AC_MSG_ERROR([C++ Compiler required to compile Drizzle])
47
fi
48
AC_PROG_CPP
49
AM_PROG_CC_C_O
755.1.6 by Monty Taylor
One more stupid change.
50
815.1.1 by Monty Taylor
Add timegm which is missing on Solaris.
51
gl_INIT
528 by Monty Taylor
Re-arragned a few things in configure.ac.
52
520.4.37 by Monty Taylor
Added some Sun compile flags.
53
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
722.1.3 by Monty Taylor
Cleaned up a few build things.
54
ifdef([AC_PROG_CC_C99],[
55
    AC_PROG_CC_C99([$1],[$2],[$3])
56
],[
57
if "x$GCC" = "xyes"
58
then
59
  C99_SUPPORT_HACK="-std=gnu99"
60
fi
61
if "x$SUNCC" = "xyes"
62
then
63
  C99_SUPPORT_HACK="-xc99"
64
fi
65
])
779.3.21 by Monty Taylor
Fixed solaris fixes for linux. Oh, and I also seem to have fixed some more configure stuff.
66
AC_PROG_GCC_TRADITIONAL
755.1.6 by Monty Taylor
One more stupid change.
67
1 by brian
clean slate
68
69
# Set all version vars based on $VERSION. How do we do this more elegant ?
70
# Remember that regexps needs to quote [ and ] since this is run through m4
71
# We take some made up examples
72
#
73
#  VERSION                  5.1.40sp1-alpha     5.0.34a
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
74
#  DRIZZLE_NO_DASH_VERSION    5.1.40sp1           5.0.34a
75
#  DRIZZLE_NUMERIC_VERSION    5.1.40              5.0.34
76
#  DRIZZLE_BASE_VERSION       5.1                 5.0
77
#  DRIZZLE_VERSION_ID         50140               50034
1 by brian
clean slate
78
#
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
79
DRIZZLE_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
80
DRIZZLE_NUMERIC_VERSION=`echo $DRIZZLE_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
81
DRIZZLE_BASE_VERSION=`echo $DRIZZLE_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
82
DRIZZLE_VERSION_ID=`echo $DRIZZLE_NUMERIC_VERSION | \
1 by brian
clean slate
83
    awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'`
722.1.3 by Monty Taylor
Cleaned up a few build things.
84
AC_DEFINE_UNQUOTED(DRIZZLE_BASE_VERSION,["$DRIZZLE_BASE_VERSION"],
85
                   [Major and minor version])
86
AC_DEFINE_UNQUOTED([DRIZZLE_VERSION_ID],[$DRIZZLE_VERSION_ID],
87
		   [Version ID that can be easily used for numeric comparison])
1 by brian
clean slate
88
89
# The port should be constant for a LONG time
301 by Brian Aker
Clean up port startup
90
DRIZZLE_TCP_PORT_DEFAULT=4427
1 by brian
clean slate
91
779.2.15 by Monty Taylor
More gettext stuff.
92
# We need to hack in some of the non-standard locations that solaris sticks
93
# stuff in. This makes me very sad.
94
case "$host_os" in
95
  solaris*)
96
    CPPFLAGS="${CPPFLAGS} -I/opt/csw/include -I/opt/local/include"
97
    LDFLAGS="${LDFLAGS} -L/opt/csw/lib -L/opt/csw/lib"
98
    ;;
99
esac
100
722.2.9 by Monty Taylor
I _think_ I've got the plug.in triggering rebuild thing going on right.
101
m4_include(m4/dtrace.m4)
722.1.3 by Monty Taylor
Cleaned up a few build things.
102
722.2.9 by Monty Taylor
I _think_ I've got the plug.in triggering rebuild thing going on right.
103
m4_include(m4/character_sets.m4)
722.1.3 by Monty Taylor
Cleaned up a few build things.
104
AC_SUBST(AVAILABLE_LANGUAGES)
105
722.2.9 by Monty Taylor
I _think_ I've got the plug.in triggering rebuild thing going on right.
106
m4_include(m4/gettext.m4)
779.2.15 by Monty Taylor
More gettext stuff.
107
AM_GNU_GETTEXT(external, need-formatstring-macros)
384 by Monty Taylor
Expanded po subdir trap to catch the case where we're setting programs to :.
108
AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
1 by brian
clean slate
109
722.1.3 by Monty Taylor
Cleaned up a few build things.
110
# Set this for plugins to use
111
ac_build_drizzle="yes"
441 by Monty Taylor
Move unconditional defines to config.h.
112
113
1 by brian
clean slate
114
# Canonicalize the configuration name.
115
116
# Check whether --with-system-type or --without-system-type was given.
28.1.33 by Monty Taylor
Added -Wall
117
AC_ARG_WITH([system-type],
118
    [AS_HELP_STRING([--with-system-type],
119
       [Set the system type, like "sun-solaris10"])],
1 by brian
clean slate
120
    [SYSTEM_TYPE="$withval"],
121
    [SYSTEM_TYPE="$host_vendor-$host_os"])
28.1.33 by Monty Taylor
Added -Wall
122
AC_ARG_WITH([machine-type],
123
    [AS_HELP_STRING([--with-machine-type],
124
       [Set the machine type, like "powerpc"])],
1 by brian
clean slate
125
    [MACHINE_TYPE="$withval"],
126
    [MACHINE_TYPE="$host_cpu"])
127
AC_SUBST(SYSTEM_TYPE)
128
AC_DEFINE_UNQUOTED([SYSTEM_TYPE], ["$SYSTEM_TYPE"],
129
                   [Name of system, eg sun-solaris])
130
AC_SUBST(MACHINE_TYPE)
131
AC_DEFINE_UNQUOTED([MACHINE_TYPE], ["$MACHINE_TYPE"],
132
                   [Machine type name, eg sparc])
133
134
# Detect intel x86 like processor
135
BASE_MACHINE_TYPE=$MACHINE_TYPE
136
case $MACHINE_TYPE in
137
  i?86) BASE_MACHINE_TYPE=i386 ;;
138
esac
139
481.1.9 by Monty Taylor
Added autoconf tests for location of cstdint and cinttypes. Use those in C++ programs now, so that we don't have to define _STDC_LIMIT_MACROS, etc by hand. Stop, in fact, defining those by hand.
140
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
141
case "$target_os" in
142
  *linux*)
143
  TARGET_LINUX="true"
144
  AC_SUBST(TARGET_LINUX)
145
  AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
146
    ;;
271 by Brian Aker
OSX fix
147
  *apple-darwin*)
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
148
    TARGET_OSX="true"
149
    AC_SUBST(TARGET_OSX)
271 by Brian Aker
OSX fix
150
    AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX])
1 by brian
clean slate
151
    ;;
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
152
  *solaris*)
153
    TARGET_SOLARIS="true"
154
    AC_SUBST(TARGET_SOLARIS)
155
    AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
156
    ;;
1 by brian
clean slate
157
  *)
158
    ;;
159
esac
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
160
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
161
DRIZZLE_CHECK_C_VERSION
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
162
DRIZZLE_CHECK_CXX_VERSION
1 by brian
clean slate
163
590.2.23 by Monty Taylor
Fixed a few things for solaris builds.
164
AC_SYS_LARGEFILE
165
230.3.1 by Monty Taylor
Bug 252805: ./configure not detecting missing g++
166
AC_PROG_AWK
167
1 by brian
clean slate
168
779.4.5 by Monty Taylor
Replaced gen_lex_hash with gperf. Yay for no more building tools to build source!!!
169
AC_PATH_PROG(GPERF, gperf, gperf)
170
if test "$ac_cv_prog_gperf" = "no"
171
then
172
  AC_MSG_ERROR("Drizzle requires gperf to build. Please install it.")
173
fi
174
779.1.25 by Monty Taylor
Put in LCOV checks. Put output in subdir.
175
AC_PATH_PROG(LCOV, lcov, lcov)
176
AC_PATH_PROG(GENHTML, genhtml, genhtml)
177
178
AM_CONDITIONAL(HAVE_LCOV,[test "$ac_cv_prog_lcov" != "no"])
179
446 by Monty Taylor
Moved GNU_SOURCE define to configure.
180
dnl TODO: This needs to go away and be replaced with _ISOC99_SOURCE
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
181
if test "$ac_cv_c_compiler_gnu" = "yes" -o "$target_os" = "linux-gnu"
446 by Monty Taylor
Moved GNU_SOURCE define to configure.
182
then
183
  AC_DEFINE([_GNU_SOURCE],[1],[Fix problem with S_ISLNK() on Linux])
184
fi
185
445 by Monty Taylor
Moved sun defines to configure.ac.
186
dnl  Solaris 9 include file <sys/feature_tests.h> refers to X/Open document
187
188
dnl  System Interfaces and Headers, Issue 5
189
190
dnl  saying we should define _XOPEN_SOURCE=500 to get POSIX.1c prototypes,
191
dnl  but apparently other systems (namely FreeBSD) don't agree.
192
193
dnl  On a newer Solaris 10, the above file recognizes also _XOPEN_SOURCE=600.
194
dnl  Furthermore, it tests that if a program requires older standard
195
dnl  (_XOPEN_SOURCE<600 or _POSIX_C_SOURCE<200112L) it cannot be
196
dnl  run on a new compiler (that defines _STDC_C99) and issues an #error.
197
dnl  It's also an #error if a program requires new standard (_XOPEN_SOURCE=600
198
dnl  or _POSIX_C_SOURCE=200112L) and a compiler does not define _STDC_C99.
199
200
dnl  To add more to this mess, Sun Studio C compiler defines _STDC_C99 while
201
dnl  C++ compiler does not!
202
455 by Monty Taylor
Rewored Sun C99 stuff in autoconf. (Trond... will this work?)
203
dnl TODO: Can _ISOC99_SOURCE be defined on all platforms and remove the 
204
dnl       Need for all of this? 
520.9.3 by mordred
zomg. Solaris actually builds all the way!!!
205
if test "$GCC" = "yes"
206
then
207
  case "$target_os" in
208
    *solaris*)
209
    CFLAGS="${CFLAGS} -D_XOPEN_SOURCE=600"
210
    CXXFLAGS="${CXXFLAGS} -D__C99FEATURES__"
211
    ;;
212
  esac
213
fi
445 by Monty Taylor
Moved sun defines to configure.ac.
214
1 by brian
clean slate
215
AC_SUBST(NM)dnl
216
217
AC_PROG_INSTALL
218
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
219
579.1.1 by Toru Maesaka
Added tests for groupaad and useradd
220
# Look for "(group|user)add". 
221
# TODO: If the programs do not exist, inform the DBA that the user
222
#       was not created at the end of the install routine.
223
AC_CHECK_PROGS(GROUPADD, groupadd addgroup)
224
AC_CHECK_PROGS(USERADD, useradd adduser)
225
590.2.2 by Monty Taylor
Configure cleanups. Added generic search_for_lib m4 macro.
226
dnl Not critical since the generated file is distributed
629.1.1 by Monty Taylor
More solaris fixes.
227
AC_CHECK_PROGS(YACC, ['bison -y'])
77.1.70 by Monty Taylor
Added a failure if you don't have bison and you're building from a .bzr branch.
228
if test -z "$YACC" && test -d ".bzr"
229
then
230
  AC_MSG_ERROR(["bison is required for Drizzle to build from a bzr branch"])
231
fi
1 by brian
clean slate
232
779.2.7 by Monty Taylor
Removed search_for_lib. Now totally using AC_LIB_HAVE_LINKFLAGS.
233
1 by brian
clean slate
234
# The following is required for portable results of floating point calculations
235
# on PowerPC. The same must also be done for IA-64, but this options is missing
236
# in the IA-64 gcc backend.
237
238
if test "$GCC" = "yes"
239
then
240
  case "$host_cpu" in
241
    *ppc* | *powerpc*)
287.3.28 by Monty Taylor
Expanded the move to AM_CFLAGS and AM_CXXFLAGS. Now we should be more correct.
242
      AM_CFLAGS="$CFLAGS -mno-fused-madd"
243
      AM_CXXFLAGS="$CXXFLAGS -mno-fused-madd"
1 by brian
clean slate
244
    ;;
245
  esac
246
fi
520.4.40 by mordred
Added an option to specify --with-probuf=<location>
247
# Build optimized or debug version ?
248
# First check for gcc and g++
249
SYMBOLS_FLAGS="-g"
250
DEBUG_OPTIMIZE_CC=""
251
OPTIMIZE_CFLAGS="-O"
252
DEBUG_OPTIMIZE_CXX=""
253
OPTIMIZE_CXXFLAGS="-O"
254
if test "$GCC" = "yes"
255
then
256
  SYMBOLS_FLAGS="-ggdb3"
257
  DEBUG_OPTIMIZE_CC="-O0"
258
  OPTIMIZE_CFLAGS="-O3"
259
  DEBUG_OPTIMIZE_CXX="-O0"
260
  OPTIMIZE_CXXFLAGS="-O3"
261
fi
262
if test "$SUNCC" = "yes"
263
then
264
  DEBUG_OPTIMIZE_CC=""
685.1.20 by Monty Taylor
Fixed memalign for only on sparc.
265
  if test "$target_cpu" = "sparc"
266
  then
267
    MEMALIGN_FLAGS="-xmemalign=8s"
268
  fi
815.1.6 by Monty Taylor
Some tweaks to get timegm working on Solaris.
269
  CXXFLAGS="${CXXFLAGS} -compat=5 -library=stlport4 -template=no%extdef ${MEMALIGN_FLAGS}"
779.1.12 by Monty Taylor
Possible build fixes for Solaris.
270
  CFLAGS="${CFLAGS} -xstrconst ${MEMALIGN_FLAGS}"
271
  SYMBOLS_FLAGS="-g"
272
  OPTIMIZE_FLAGS="-xO4 -xlibmil -xdepend"
273
  OPTIMIZE_CFLAGS="${OPTIMIZE_FLAGS}"
274
  OPTIMIZE_CXXFLAGS="${OPTIMIZE_FLAGS}"
520.4.40 by mordred
Added an option to specify --with-probuf=<location>
275
  DEBUG_OPTIMIZE_CXX=""
276
fi
277
779.3.18 by Monty Taylor
Cleaned up warnings up through innodb.
278
# We use libtool
279
AC_PROG_LIBTOOL
280
520.4.40 by mordred
Added an option to specify --with-probuf=<location>
281
dnl TODO: Remove this define once we are using 2.61 across the board.
282
# AX_HEADER_ASSERT
283
# ----------------
284
# Check whether to enable assertions.
285
AC_DEFUN([AX_HEADER_ASSERT],
286
[
287
  AC_MSG_CHECKING([whether to enable assertions])
288
  AC_ARG_ENABLE([assert],
289
    [AS_HELP_STRING([--disable-assert],
290
       [Turn off assertions])],
291
    [ac_cv_assert="no"],
292
    [ac_cv_assert="yes"])
293
  AC_MSG_RESULT([$ac_cv_assert])
294
])
295
296
AX_HEADER_ASSERT
297
298
CFLAGS="${SYMBOLS_FLAGS} ${CFLAGS}"
299
CXXFLAGS="${SYMBOLS_FLAGS} ${CXXFLAGS}"
300
301
AC_ARG_WITH([debug],
302
    [AS_HELP_STRING([--with-debug],
303
       [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
304
    [with_debug=$withval],
305
    [with_debug=no])
306
if test "$with_debug" = "yes"
307
then
308
  # Medium debug.
309
  CFLAGS="$DEBUG_OPTIMIZE_CC -DDEBUG $CFLAGS ${SAVE_CFLAGS}"
310
  CXXFLAGS="$DEBUG_OPTIMIZE_CXX -DDEBUG $CXXFLAGS ${SAVE_CXXFLAGS}"
311
else
312
  # Optimized version. No debug
313
  CFLAGS="${OPTIMIZE_CFLAGS} ${CFLAGS} ${SAVE_CFLAGS}"
314
  CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS ${SAVE_CXXFLAGS}"
315
fi
1 by brian
clean slate
316
317
AC_SUBST(CC)
318
AC_SUBST(CFLAGS)
319
AC_SUBST(CXX)
320
AC_SUBST(CXXFLAGS)
321
AC_SUBST(ASFLAGS)
322
AC_SUBST(LD)
323
AC_SUBST(INSTALL_SCRIPT)
324
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
325
1 by brian
clean slate
326
export CC CXX CFLAGS LD LDFLAGS AR ARFLAGS
327
520.4.44 by mordred
A whole bunch of solaris/sun studio compile fixes.
328
AC_CXX_STL_HASH
329
AC_CXX_CSTDINT
330
AC_CXX_CINTTYPES
331
AC_CXX_CMATH
1 by brian
clean slate
332
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
333
DRIZZLE_PROG_AR
1 by brian
clean slate
334
261.2.3 by Monty Taylor
Moved libdrizzle.ver.in to libdrizzle.ver.
335
# libdrizzle versioning when linked with GNU ld.
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
336
if test "x$EGREP" != "x"
337
then
338
  if test "$lt_cv_prog_gnu_ld" = "yes" -a $LD --version 2>/dev/null|${EGREP} -q GNU
339
  then
779.3.37 by Monty Taylor
Renmaed libdrizzle in the tree to libdrizzleclient to avoid namespace clashes
340
    LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libdrizzleclient/libdrizzleclient.ver"
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
341
  fi
1 by brian
clean slate
342
fi
343
AC_SUBST(LD_VERSION_SCRIPT)
344
779.2.1 by Monty Taylor
Added new pthread m4 file. Changing lib checks to use AC_LIB_HAVE_LINKFLAGS
345
AC_LIB_PREFIX
346
287.3.30 by Monty Taylor
Added step one of finding libprotobuf.
347
#--------------------------------------------------------------------
348
# Check for Google Proto Buffers
349
#--------------------------------------------------------------------
350
629.2.4 by Monty Taylor
Cleaned up the lib searching - now base some searches off of the prefix.
351
AC_LANG_PUSH([C++])
779.2.1 by Monty Taylor
Added new pthread m4 file. Changing lib checks to use AC_LIB_HAVE_LINKFLAGS
352
AC_LIB_HAVE_LINKFLAGS(protobuf,,
353
[#include <google/protobuf/descriptor.h>
354
#if GOOGLE_PROTOBUF_VERSION < 2000002
355
# error Your version of Protobuf is too old
356
#endif
357
],
358
[google::protobuf::FileDescriptor* file;])
359
AS_IF([test x$ac_cv_libprotobuf = xno],
360
      AC_MSG_ERROR([protobuf is required for Drizzle]))
629.2.4 by Monty Taylor
Cleaned up the lib searching - now base some searches off of the prefix.
361
779.2.1 by Monty Taylor
Added new pthread m4 file. Changing lib checks to use AC_LIB_HAVE_LINKFLAGS
362
AC_PATH_PROG([PROTOC],[protoc],[no],[$LIBPROTOBUF_PREFIX/bin:$PATH])
520.4.47 by Monty Taylor
Added check for protoc to protobuf checks.
363
if test "x$PROTOC" = "xno"
364
then
365
  AC_MSG_ERROR([Couldn't find protoc. Try installing Google Protocol Buffer.])
366
fi
367
287.3.30 by Monty Taylor
Added step one of finding libprotobuf.
368
AC_LANG_POP()
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
369
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
370
#--------------------------------------------------------------------
520.4.27 by Monty Taylor
Fail if we don't find uuid/uuid.h.
371
# Check for libuuid
372
#--------------------------------------------------------------------
373
779.2.1 by Monty Taylor
Added new pthread m4 file. Changing lib checks to use AC_LIB_HAVE_LINKFLAGS
374
dnl Do this by hand. Need to check for uuid/uuid.h, but uuid may or may
375
dnl not be a lib is weird.
376
590.2.13 by Monty Taylor
Reverted libuuid check code.
377
AC_CHECK_HEADERS(uuid/uuid.h)
378
if test "x$ac_cv_header_uuid_uuid_h" = "xno"
379
then
380
  AC_MSG_ERROR([Couldn't find uuid/uuid.h. Try installing libuuid development packages])
381
fi
779.2.3 by Monty Taylor
Added stdlib.h depend for readline.
382
AC_LIB_HAVE_LINKFLAGS(uuid,,
383
[
384
#include <uuid/uuid.h>
385
],
386
[
387
  uuid_t uout;
388
  uuid_generate(uout);
389
])
390
520.4.27 by Monty Taylor
Fail if we don't find uuid/uuid.h.
391
#--------------------------------------------------------------------
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
392
# Check for libevent
393
#--------------------------------------------------------------------
394
779.2.1 by Monty Taylor
Added new pthread m4 file. Changing lib checks to use AC_LIB_HAVE_LINKFLAGS
395
AC_LIB_HAVE_LINKFLAGS(event,,
396
[
134.2.1 by Antony Curtis
Changes for proper detection of libraries
397
#include <sys/types.h>
398
#include <sys/time.h>
399
#include <stdlib.h>
779.2.1 by Monty Taylor
Added new pthread m4 file. Changing lib checks to use AC_LIB_HAVE_LINKFLAGS
400
#include <event.h>
401
],[
402
  struct bufferevent bev;
403
  bufferevent_settimeout(&bev, 1, 1);
404
  event_init();
405
  event_loop(EVLOOP_ONCE);
406
]) 
407
AS_IF([test x$ac_cv_libevent = xno],
408
      AC_MSG_ERROR([A recent libevent is required for Drizzle. Check http://www.monkey.org/~provos/libevent ]))
134.2.1 by Antony Curtis
Changes for proper detection of libraries
409
410
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
411
412
#--------------------------------------------------------------------
413
# Check for libpthread
414
#--------------------------------------------------------------------
415
779.2.1 by Monty Taylor
Added new pthread m4 file. Changing lib checks to use AC_LIB_HAVE_LINKFLAGS
416
ACX_PTHREAD(,AC_MSG_ERROR(could not find libpthread))
417
LIBS="$PTHREAD_LIBS $LIBS"
418
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
419
CC="$PTHREAD_CC"
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
420
421
#--------------------------------------------------------------------
612.2.5 by Monty Taylor
Added test for mtmalloc, if we haven't explicitly asked for tcmalloc.
422
# Check for tcmalloc/mtmalloc
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
423
#--------------------------------------------------------------------
424
425
AC_ARG_ENABLE([tcmalloc],
426
    [AS_HELP_STRING([--enable-tcmalloc],
427
       [Enable linking with tcmalloc @<:@default=off@:>@])],
236.1.14 by Monty Taylor
Merged build changes from Antony.
428
    [ac_enable_tcmalloc="$enableval"],
429
    [ac_enable_tcmalloc="no"])
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
430
612.2.5 by Monty Taylor
Added test for mtmalloc, if we haven't explicitly asked for tcmalloc.
431
if test "x$ac_enable_tcmalloc" != "xno"
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
432
then
433
  AC_CHECK_LIB(tcmalloc,malloc,[],[])
434
fi
435
612.2.5 by Monty Taylor
Added test for mtmalloc, if we haven't explicitly asked for tcmalloc.
436
if test "x$ac_cv_lib_tcmalloc_malloc" != "xyes"
437
then
438
  AC_CHECK_LIB(mtmalloc,malloc,[],[])
439
fi
440
779.2.1 by Monty Taylor
Added new pthread m4 file. Changing lib checks to use AC_LIB_HAVE_LINKFLAGS
441
77.1.111 by Monty Taylor
Added --enable-tcmalloc which will enable searching for and linking with tcmalloc if you have it.
442
#--------------------------------------------------------------------
779.1.15 by Monty Taylor
Added libdrizzle configure support.
443
# Check for libdrizzle
444
#--------------------------------------------------------------------
445
446
AC_LIB_HAVE_LINKFLAGS(drizzle,,
447
[#include <libdrizzle/drizzle.h>],
448
[
449
  const char *version= drizzle_version()
450
])
451
dnl AS_IF([test x$ac_cv_libdrizzle = xno],
452
dnl       AC_MSG_ERROR([libdrizzle is required for Drizzle])
453
454
455
#--------------------------------------------------------------------
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
456
# Check for libz
457
#--------------------------------------------------------------------
458
779.2.1 by Monty Taylor
Added new pthread m4 file. Changing lib checks to use AC_LIB_HAVE_LINKFLAGS
459
AC_LIB_HAVE_LINKFLAGS(z,,
460
[#include <zlib.h>],
461
[
462
  crc32(0, Z_NULL, 0);
463
])
464
AS_IF([test x$ac_cv_libz = xno],
465
      AC_MSG_ERROR([libz is required for Drizzle]))
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
466
612.2.9 by Monty Taylor
Woot. No more extra CFLAGS on the command line!
467
#--------------------------------------------------------------------
182.1.5 by Jim Winstead
Detect and make the Mac OS X libedit readline interface look like the
468
# Check for libreadline or compatible (libedit on Mac OS X)
469
#--------------------------------------------------------------------
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
470
779.2.5 by Monty Taylor
Split out readline.
471
save_LIBS="${LIBS}"
472
LIBS=""
779.2.4 by Monty Taylor
Updated some more build stuff.
473
VL_LIB_READLINE
779.2.5 by Monty Taylor
Split out readline.
474
READLINE_LIBS="${LIBS}"
475
LIBS="${save_LIBS}"
476
AC_SUBST(READLINE_LIBS)
207.1.2 by Jim Winstead
Fix test for libreadline to test a function that exists in all usable
477
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
478
DRIZZLE_CHECK_NEW_RL_INTERFACE
287.3.30 by Monty Taylor
Added step one of finding libprotobuf.
479
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
480
#--------------------------------------------------------------------
481
# Check for libpcre
482
#--------------------------------------------------------------------
483
779.2.9 by Monty Taylor
Put back in pkg-config check- pcre.h is in /usr/include for older versions and
484
AC_PATH_PROG(PKG_CONFIG, pkg-config, AC_MSG_ERROR([pkg-config wasn't found.]))
485
PKG_CHECK_MODULES(PCRE, [libpcre >= 3], [found_pcre="yes"],[found_pcre="no"])
486
487
if test "$found_pcre" = "no"
488
then
489
  save_LIBS="${LIBS}"
490
  AC_LIB_HAVE_LINKFLAGS(pcre,, [#include <pcre.h>], [pcre *re= NULL])
491
  AS_IF([test "x$ac_cv_libpcre" = "xno"],
492
        AC_MSG_ERROR([libpcre is required for Drizzle]))
779.2.10 by Monty Taylor
Fixed a sillyness.
493
  PCRE_LIBS="${LTLIBPCRE}"
779.2.9 by Monty Taylor
Put back in pkg-config check- pcre.h is in /usr/include for older versions and
494
  LIBS="${save_LIBS}"
495
fi
496
AC_SUBST(PCRE_LIBS)
497
AC_SUBST(PCRE_CFLAGS)
498
77.1.63 by Monty Taylor
Fail also if we can't find libevent or pthread.h.
499
1 by brian
clean slate
500
dnl Find paths to some shell programs
501
AC_PATH_PROG(LN, ln, ln)
502
# This must be able to take a -f flag like normal unix ln.
503
AC_PATH_PROG(LN_CP_F, ln, ln)
504
505
AC_PATH_PROG(MV, mv, mv)
506
AC_PATH_PROG(RM, rm, rm)
507
AC_PATH_PROG(CP, cp, cp)
508
AC_PATH_PROG(SED, sed, sed)
509
AC_PATH_PROG(CMP, cmp, cmp)
510
AC_PATH_PROG(CHMOD, chmod, chmod)
511
AC_PATH_PROG(HOSTNAME, hostname, hostname)
512
# Check for a GNU tar named 'gtar', or 'gnutar' (MacOS X) and
513
# fall back to 'tar' otherwise and hope that it's a GNU tar as well
514
AC_CHECK_PROGS(TAR, gnutar gtar tar)
515
516
dnl We use a path for perl so the script startup works
517
dnl We make sure to use perl, not perl5, in hopes that the RPMs will
518
dnl not depend on the perl5 binary being installed (probably a bug in RPM)
519
AC_PATH_PROG(PERL, perl, no)
520
if test "$PERL" != "no" && $PERL -e 'require 5' > /dev/null 2>&1
521
then
522
  PERL5=$PERL
523
else
524
  AC_PATH_PROG(PERL5, perl5, no)
525
  if test "$PERL5" != no
526
  then
527
    PERL=$PERL5
528
    ac_cv_path_PERL=$ac_cv_path_PERL5
529
  fi
530
fi
531
532
AC_SUBST(HOSTNAME)
533
AC_SUBST(PERL)
534
AC_SUBST(PERL5)
535
536
# icheck, used for ABI check
537
AC_PATH_PROG(ICHECK, icheck, no)
538
# "icheck" is also the name of a file system check program on Tru64.
539
# Verify the program found is really the interface checker.
540
if test "x$ICHECK" != "xno"
541
then
542
  AC_MSG_CHECKING(if $ICHECK works as expected)
543
  echo "int foo;" > conftest.h
544
  $ICHECK --canonify -o conftest.ic conftest.h 2>/dev/null
545
  if test -f "conftest.ic"
546
  then
547
    AC_MSG_RESULT(yes)
548
  else
549
    AC_MSG_RESULT(no)
550
    ICHECK=no
551
  fi
552
  rm -f conftest.ic conftest.h
553
fi
554
AC_SUBST(ICHECK)
555
556
# Lock for PS
557
AC_PATH_PROG(PS, ps, ps)
558
AC_MSG_CHECKING("how to check if pid exists")
559
PS=$ac_cv_path_PS
560
# Linux style
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
561
if $PS p $$ 2> /dev/null | grep `echo $0 | sed s/\-//` > /dev/null
1 by brian
clean slate
562
then
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
563
  FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
1 by brian
clean slate
564
# Solaris
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
565
elif $PS -fp $$ 2> /dev/null | grep $0 > /dev/null
1 by brian
clean slate
566
then
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
567
  FIND_PROC="$PS -p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
1 by brian
clean slate
568
# BSD style
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
569
elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
1 by brian
clean slate
570
then
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
571
  FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
1 by brian
clean slate
572
# SysV style
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
573
elif $PS -ef 2> /dev/null | grep $0 > /dev/null
1 by brian
clean slate
574
then
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
575
  FIND_PROC="$PS -ef | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
1 by brian
clean slate
576
# Do anybody use this?
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
577
elif $PS $$ 2> /dev/null | grep $0 > /dev/null
1 by brian
clean slate
578
then
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
579
  FIND_PROC="$PS \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
1 by brian
clean slate
580
else
581
  case $SYSTEM_TYPE in
394 by Monty Taylor
Fix configure problem on cygwin. Thanks awfief.
582
    *freebsd*|*dragonfly*|*cygwin*)
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
583
      FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
1 by brian
clean slate
584
      ;;
585
    *darwin*)
632.1.7 by Monty
Reworked grep change to work with old crappy autoconfs.
586
      FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
1 by brian
clean slate
587
      ;;
588
    *)
589
      AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
236.1.39 by Monty Taylor
autoconf warning cleanups.
590
      ;;
1 by brian
clean slate
591
  esac
592
fi
593
AC_SUBST(FIND_PROC)
594
AC_MSG_RESULT("$FIND_PROC")
595
596
# Check if a pid is valid
597
AC_PATH_PROG(KILL, kill, kill)
598
AC_MSG_CHECKING("for kill switches")
599
if $ac_cv_path_KILL -0 $$
600
then
601
  CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null"
602
elif kill -s 0 $$
603
then
604
  CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null"
605
else
606
  AC_MSG_WARN([kill -0 to check for pid seems to fail])
607
    CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null"
608
fi
609
AC_SUBST(CHECK_PID)
610
AC_MSG_RESULT("$CHECK_PID")
611
612
613
# Check if we need noexec stack for assembler
614
AC_CHECK_NOEXECSTACK
615
616
if test "$am_cv_prog_cc_stdc" = "no"
617
then
91 by Brian Aker
Main binary now named drizzled
618
  AC_MSG_ERROR([Drizzle requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
1 by brian
clean slate
619
fi
620
621
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
622
AC_ARG_WITH([server-suffix],
623
    [AS_HELP_STRING([--with-server-suffix],
624
      [Append value to the version string.])],
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
625
    [ DRIZZLE_SERVER_SUFFIX=`echo "$withval" | sed -e  's/^\(...................................\)..*$/\1/'` ],
626
    [ DRIZZLE_SERVER_SUFFIX= ]
1 by brian
clean slate
627
    )
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
628
AC_DEFINE_UNQUOTED([DRIZZLE_SERVER_SUFFIX],[$DRIZZLE_SERVER_SUFFIX],
629
                   [Append value to the version string])
1 by brian
clean slate
630
631
# Force use of a curses libs
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
632
AC_ARG_WITH([named-curses-libs],
633
    [AS_HELP_STRING([--with-named-curses-libs=ARG],
634
            [Use specified curses libraries instead of those
635
		automatically found by configure.])],
1 by brian
clean slate
636
    [ with_named_curses=$withval ],
637
    [ with_named_curses=no ]
638
    )
639
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
640
AC_ARG_WITH([tcp-port],
641
    [AS_HELP_STRING([--with-tcp-port=port-number],
165.1.1 by Elliot Murphy
new port number from IANA
642
            [Which port to use for Drizzle services @<:@default=4427@:>@])],
301 by Brian Aker
Clean up port startup
643
    [ DRIZZLE_TCP_PORT=$withval ],
644
    [ DRIZZLE_TCP_PORT=$DRIZZLE_TCP_PORT_DEFAULT
1 by brian
clean slate
645
      # if we actually defaulted (as opposed to the pathological case of
301 by Brian Aker
Clean up port startup
646
      # --with-tcp-port=<DRIZZLE_TCP_PORT_DEFAULT> which might in theory
1 by brian
clean slate
647
      # happen if whole batch of servers was built from a script), set
648
      # the default to zero to indicate that; we don't lose information
649
      # that way, because 0 obviously indicates that we can get the
301 by Brian Aker
Clean up port startup
650
      # default value from DRIZZLE_TCP_PORT. this seems really evil, but
651
      # testing for DRIZZLE_TCP_PORT==DRIZZLE_TCP_PORT_DEFAULT would make a
652
      # a port of DRIZZLE_TCP_PORT_DEFAULT magic even if the builder did not
1 by brian
clean slate
653
      # intend it to mean "use the default, in fact, look up a good default
165.1.1 by Elliot Murphy
new port number from IANA
654
      # from /etc/services if you can", but really, really meant 4427 when
655
      # they passed in 4427. When they pass in a specific value, let them
1 by brian
clean slate
656
      # have it; don't second guess user and think we know better, this will
657
      # just make people cross.  this makes the the logic work like this
658
      # (which is complicated enough):
659
      #
660
      # - if a port was set during build, use that as a default.
661
      #
662
      # - otherwise, try to look up a port in /etc/services; if that fails,
301 by Brian Aker
Clean up port startup
663
      #   use DRIZZLE_TCP_PORT_DEFAULT (at the time of this writing 4427)
1 by brian
clean slate
664
      #
301 by Brian Aker
Clean up port startup
665
      # - allow the DRIZZLE_TCP_PORT environment variable to override that.
1 by brian
clean slate
666
      #
667
      # - allow command-line parameters to override all of the above.
668
      #
301 by Brian Aker
Clean up port startup
669
      # the top-most DRIZZLE_TCP_PORT_DEFAULT is read from win/configure.js,
1 by brian
clean slate
670
      # so don't mess with that.
301 by Brian Aker
Clean up port startup
671
      DRIZZLE_TCP_PORT_DEFAULT=0 ]
1 by brian
clean slate
672
    )
301 by Brian Aker
Clean up port startup
673
AC_SUBST(DRIZZLE_TCP_PORT)
1 by brian
clean slate
674
# We might want to document the assigned port in the manual.
301 by Brian Aker
Clean up port startup
675
AC_SUBST(DRIZZLE_TCP_PORT_DEFAULT)
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
676
AC_DEFINE_UNQUOTED([DRIZZLE_PORT],[$DRIZZLE_TCP_PORT],
677
                   [Drizzle port to use])
678
AC_DEFINE_UNQUOTED([DRIZZLE_PORT_DEFAULT],[$DRIZZLE_TCP_PORT_DEFAULT],
679
		   [If we defaulted to DRIZZLE_PORT, then this will be zero])
1 by brian
clean slate
680
681
# Use this to set the place used for unix socket used to local communication.
572.2.1 by ysano
Replace --with-mysqld-user configure option with --with-drizzled-user.
682
AC_ARG_WITH([drizzled-user],
683
    [AS_HELP_STRING([--with-drizzled-user=username],
684
            [What user the drizzled daemon shall be run as.
685
		@<:@default=drizzle@:>@])],
686
    [ DRIZZLED_USER=$withval ],
687
    [ DRIZZLED_USER=drizzle ]
1 by brian
clean slate
688
    )
572.2.1 by ysano
Replace --with-mysqld-user configure option with --with-drizzled-user.
689
AC_SUBST(DRIZZLED_USER)
1 by brian
clean slate
690
691
# If we should allow LOAD DATA LOCAL
692
AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default)
693
AC_ARG_ENABLE(local-infile,
694
    [  --enable-local-infile   Enable LOAD DATA LOCAL INFILE (default: disabled)],
695
    [ ENABLED_LOCAL_INFILE=$enableval ],
696
    [ ENABLED_LOCAL_INFILE=no ]
697
    )
698
if test "$ENABLED_LOCAL_INFILE" = "yes"
699
then
700
  AC_MSG_RESULT([yes])
701
  AC_DEFINE([ENABLED_LOCAL_INFILE], [1],
702
            [If LOAD DATA LOCAL INFILE should be enabled by default])
703
else
704
  AC_MSG_RESULT([no])
705
fi
706
707
# Types that must be checked AFTER large file support is checked
708
AC_TYPE_SIZE_T
709
710
#--------------------------------------------------------------------
711
# Check for system header files
712
#--------------------------------------------------------------------
713
714
AC_HEADER_DIRENT
715
AC_HEADER_STDC
716
AC_HEADER_SYS_WAIT
53.2.2 by Monty Taylor
Updated everything that needs updating to compile with -std=gnu99 -pedantic
717
AC_HEADER_STDBOOL
77.1.22 by Monty Taylor
Removed refs to floatingpoint.h (which we only used for fconvert) and fconvert
718
AC_CHECK_HEADERS(fcntl.h float.h fpu_control.h ieeefp.h)
53.2.29 by Monty Taylor
Cleaned up headers a little more.
719
AC_CHECK_HEADERS(limits.h pwd.h select.h linux/config.h)
720
AC_CHECK_HEADERS(sys/fpu.h utime.h sys/utime.h )
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
721
AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h)
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
722
AC_CHECK_HEADERS([curses.h term.h],[],[],
723
[[#ifdef HAVE_CURSES_H
724
# include <curses.h>
725
#endif
726
]])
202.1.4 by Monty Taylor
Removed openssl refs.
727
AC_CHECK_HEADERS(termio.h termios.h sched.h alloca.h)
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
728
AC_CHECK_HEADERS(sys/prctl.h ieeefp.h)
53.2.29 by Monty Taylor
Cleaned up headers a little more.
729
AC_CHECK_HEADERS(execinfo.h)
1 by brian
clean slate
730
77.1.31 by Monty Taylor
Replaced regex lib with pcre. Reworked mysqltest to use it.
731
#--------------------------------------------------------------------
1 by brian
clean slate
732
# Check for system libraries. Adds the library to $LIBS
733
# and defines HAVE_LIBM etc
734
#--------------------------------------------------------------------
735
736
AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
737
236.1.39 by Monty Taylor
autoconf warning cleanups.
738
AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)])
739
AC_CHECK_FUNC(yp_get_default_domain, [],
740
  [AC_CHECK_LIB(nsl, yp_get_default_domain)])
741
AC_CHECK_FUNC(p2open, [], [AC_CHECK_LIB(gen, p2open)])
1 by brian
clean slate
742
# This may get things to compile even if bind-8 is installed
236.1.39 by Monty Taylor
autoconf warning cleanups.
743
AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)])
1 by brian
clean slate
744
# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
745
AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
746
747
# Check rt for aio_read
748
AC_CHECK_LIB(rt, aio_read)
749
750
# For the sched_yield() function on Solaris
236.1.39 by Monty Taylor
autoconf warning cleanups.
751
AC_CHECK_FUNC(sched_yield, [],
752
  [AC_CHECK_LIB(posix4, [sched_yield],
753
    [AC_DEFINE(HAVE_SCHED_YIELD) LIBS="$LIBS -lposix4"])])
1 by brian
clean slate
754
755
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
756
then
236.1.39 by Monty Taylor
autoconf warning cleanups.
757
  AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)])
1 by brian
clean slate
758
fi
759
760
AC_CHECK_TYPES([fp_except], [], [], [
761
#include <sys/types.h>
762
#include <ieeefp.h>
763
])
764
25 by Brian Aker
Clean up of configure.in
765
my_save_LIBS="$LIBS"
766
LIBS=""
767
AC_CHECK_LIB(dl,dlopen)
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
768
AC_CHECK_FUNCS(dlopen)
177.3.1 by mark
remove ifdef HAVE_DLOPEN, make configure require dlopen()
769
if test "$ac_cv_func_dlopen" != "yes"
770
then
771
  AC_MSG_ERROR([Drizzle requires dlopen])
772
fi
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
773
LIBDL_LIBS="$LIBS"
25 by Brian Aker
Clean up of configure.in
774
LIBS="$my_save_LIBS"
201.2.3 by Monty Taylor
Cleaned up some LIBS bits in the build.
775
AC_SUBST(LIBDL_LIBS)
25 by Brian Aker
Clean up of configure.in
776
777
AC_CHECK_FUNCS(strtok_r)
1 by brian
clean slate
778
201.2.4 by Monty Taylor
Re-enabled optimizations for the normal build, and added back the --with-debug option to turn them off.
779
780
1 by brian
clean slate
781
AC_ARG_WITH([fast-mutexes],
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
782
    [AS_HELP_STRING([--with-fast-mutexes],
783
	    [Compile with fast mutexes  @<:@default=off@:>@])],
784
    [with_fast_mutexes=$withval],
785
    [with_fast_mutexes=no])
1 by brian
clean slate
786
787
if test "$with_fast_mutexes" != "no"
788
then
51.3.26 by Jay Pipes
Final removal of DBUG library and cleanup of Makefiles
789
	AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1], 
790
			[Define to 1 if you want to use fast mutexes])
1 by brian
clean slate
791
fi
792
236.1.56 by Monty Taylor
Made build of thr_mutex.c conditional on --with-fast-mutexes, since that's
793
AM_CONDITIONAL(BUILD_FAST_MUTEX,[test "$with_fast_mutexes" != "no"])
794
28.1.39 by Monty Taylor
Made everything use AS_HELP_STRING (except for charsets, which are dying anyway)
795
AC_ARG_WITH([comment],
796
    [AS_HELP_STRING([--with-comment],
797
            [Comment about compilation environment. @<:@default=off@:>@])],
1 by brian
clean slate
798
    [with_comment=$withval],
799
    [with_comment=no])
800
if test "$with_comment" != "no"
801
then
802
  COMPILATION_COMMENT=$with_comment
803
else
804
  COMPILATION_COMMENT="Source distribution"
805
fi
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
806
AC_DEFINE_UNQUOTED([COMPILATION_COMMENT],["$COMPILATION_COMMENT"],
807
                   [Comment about compilation environment])
1 by brian
clean slate
808
809
dnl Checks for typedefs, structures, and compiler characteristics.
810
AC_C_CONST
811
AC_C_INLINE
590.2.2 by Monty Taylor
Configure cleanups. Added generic search_for_lib m4 macro.
812
AC_C_VOLATILE
1 by brian
clean slate
813
AC_TYPE_OFF_T
814
AC_HEADER_TIME
815
AC_STRUCT_TM
816
# off_t is not a builtin type
817
AC_CHECK_SIZEOF(off_t, 4)
818
if test "$ac_cv_sizeof_off_t" -eq 0
819
then
91 by Brian Aker
Main binary now named drizzled
820
  AC_MSG_ERROR("Drizzle needs a off_t type.")
1 by brian
clean slate
821
fi
822
823
dnl
824
dnl check if time_t is unsigned
825
dnl
826
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
827
DRIZZLE_CHECK_TIME_T
1 by brian
clean slate
828
829
830
# This always gives a warning. Ignore it unless you are cross compiling
831
AC_C_BIGENDIAN
832
#---START: Used in for client configure
833
# Check base type of last arg to accept
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
834
DRIZZLE_TYPE_ACCEPT
1 by brian
clean slate
835
#---END:
836
# Figure out what type of struct rlimit to use with setrlimit
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
837
DRIZZLE_TYPE_STRUCT_RLIMIT
1 by brian
clean slate
838
# Find where the stack goes
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
839
DRIZZLE_STACK_DIRECTION
1 by brian
clean slate
840
# We want to skip alloca on irix unconditionally. It may work on some version..
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
841
DRIZZLE_FUNC_ALLOCA
1 by brian
clean slate
842
# Do struct timespec have members tv_sec or ts_sec
236.1.24 by Monty Taylor
Renamed MYSQL_TIME to DRIZZLE_TIME.
843
DRIZZLE_TIMESPEC_TS
1 by brian
clean slate
844
# Do we have the tzname variable
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
845
DRIZZLE_TZNAME
1 by brian
clean slate
846
AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
520.4.43 by mordred
A set of Solaris fixes.
847
AC_CHECK_TYPES([uint, ulong])
1 by brian
clean slate
848
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
849
DRIZZLE_PTHREAD_YIELD
1 by brian
clean slate
850
134.2.1 by Antony Curtis
Changes for proper detection of libraries
851
1 by brian
clean slate
852
dnl Checks for header files.
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
853
AC_CHECK_HEADERS(malloc.h)
1 by brian
clean slate
854
855
dnl Checks for library functions.
856
AC_FUNC_ALLOCA
857
AC_PROG_GCC_TRADITIONAL
858
AC_TYPE_SIGNAL
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
859
1 by brian
clean slate
860
AC_CHECK_FUNCS(issetugid)
861
862
# from old readline settting:
863
864
MAKE_SHELL=/bin/sh
865
AC_SUBST(MAKE_SHELL)
866
867
# Already-done: stdlib.h string.h unistd.h termios.h
398.1.9 by Monty Taylor
Cleaned up stuff out of global.h.
868
AC_CHECK_HEADERS(stdarg.h dirent.h locale.h ndir.h sys/dir.h \
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
869
 sys/ndir.h sys/select.h \
870
 sys/mman.h termcap.h termio.h asm/termbits.h grp.h \
871
 paths.h)
1 by brian
clean slate
872
873
# Already-done: strcasecmp
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
874
AC_CHECK_FUNCS(lstat select)
1 by brian
clean slate
875
28.1.33 by Monty Taylor
Added -Wall
876
AC_HEADER_STAT
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
877
DRIZZLE_SIGNAL_CHECK
878
DRIZZLE_CHECK_GETPW_FUNCS
879
DRIZZLE_HAVE_TIOCGWINSZ
880
DRIZZLE_HAVE_TIOCSTAT
1 by brian
clean slate
881
882
#########################################################################
883
884
dnl Checks for library functions.
885
886
AC_FUNC_UTIME_NULL
887
AC_FUNC_VPRINTF
888
77.1.24 by Monty Taylor
Removed non-fcntl code and made it a fatal configure error if it's not there.
889
AC_CHECK_FUNCS(fcntl)
890
if test "x$ac_cv_func_fcntl" != "xyes"
891
then
892
  AC_MSG_ERROR("Drizzle requires fcntl.")
893
fi
894
815.1.6 by Monty Taylor
Some tweaks to get timegm working on Solaris.
895
AC_CONFIG_LIBOBJ_DIR([gnulib])
236.1.50 by Monty Taylor
Added automake conditional compilation of distributed system replacement functions.
896
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
897
AC_CHECK_FUNCS( \
77.1.24 by Monty Taylor
Removed non-fcntl code and made it a fatal configure error if it's not there.
898
  cuserid fchmod \
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
899
  fdatasync fpresetsticky fpsetmask fsync \
575.4.6 by Monty Taylor
Removed my_getwd.
900
  getpassphrase getpwnam \
901
  getpwuid getrlimit getrusage index initgroups isnan \
1 by brian
clean slate
902
  localtime_r gethrtime gmtime_r \
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
903
  madvise \
904
  mkstemp mlockall poll pread pthread_attr_create mmap mmap64 \
1 by brian
clean slate
905
  pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
906
  pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
907
  pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
908
  pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
449 by Monty Taylor
Removed rint check - rint is part of C99.
909
  realpath rename rwlock_init setupterm \
572.1.4 by Monty Taylor
Removed a bunch of unusued tests and defines from autoconf.
910
  sigaction \
911
  sigthreadmask \
912
  snprintf strpbrk \
913
  tell tempnam \
914
  backtrace backtrace_symbols backtrace_symbols_fd)
1 by brian
clean slate
915
287.3.18 by Monty Taylor
Put -fno-exceptions flag in selectively. Add back HAVE_DECL_MADVISE check so
916
AC_LANG_PUSH(C++)
917
# Test whether madvise() is declared in C++ code -- it is not on some
918
# systems, such as Solaris
373.1.3 by Monty Taylor
Fixed test for HAVE_DECL_MADVISE to actually work.
919
AC_CHECK_DECLS([madvise], [], [], [AC_INCLUDES_DEFAULT[
920
#if HAVE_SYS_MMAN_H
287.3.18 by Monty Taylor
Put -fno-exceptions flag in selectively. Add back HAVE_DECL_MADVISE check so
921
#include <sys/types.h>
922
#include <sys/mman.h>
373.1.3 by Monty Taylor
Fixed test for HAVE_DECL_MADVISE to actually work.
923
#endif
924
]])
287.3.18 by Monty Taylor
Put -fno-exceptions flag in selectively. Add back HAVE_DECL_MADVISE check so
925
AC_LANG_POP()
926
927
236.1.59 by Monty Taylor
Turn thr_rwlock.c into a conditionally built source file.
928
AM_CONDITIONAL(BUILD_THR_RWLOCK,[test "$ac_cv_func_rwlock_init" -a "$ac_cv_funn_pthread_rwlock_rdlock"])
929
28.1.33 by Monty Taylor
Added -Wall
930
1 by brian
clean slate
931
CFLAGS="$ORG_CFLAGS"
932
933
# Sanity check: We chould not have any fseeko symbol unless
934
# large_file_support=yes
935
AC_CHECK_FUNC(fseeko,
520.4.41 by mordred
Fixed configure.ac to work cleanly on Solaris - and define some good compile flags.
936
[if test "$large_file_support" = no -a "x$TARGET_LINUX" = "xtrue";
1 by brian
clean slate
937
then
938
  AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!")
939
fi]
940
)
941
942
# Check definition of pthread_getspecific
236.1.39 by Monty Taylor
autoconf warning cleanups.
943
AC_CACHE_CHECK([args to pthread_getspecific], [mysql_cv_getspecific_args],
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
944
  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
945
#if !defined(_REENTRANT)
1 by brian
clean slate
946
#define _REENTRANT
947
#endif
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
948
#ifndef _POSIX_PTHREAD_SEMANTICS 
1 by brian
clean slate
949
#define _POSIX_PTHREAD_SEMANTICS 
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
950
#endif
28.1.33 by Monty Taylor
Added -Wall
951
#include <pthread.h> ]], [[ void *pthread_getspecific(pthread_key_t key);
236.1.39 by Monty Taylor
autoconf warning cleanups.
952
pthread_getspecific((pthread_key_t) NULL); ]])],
953
    [mysql_cv_getspecific_args=POSIX],
954
    [mysql_cv_getspecific_args=other])])
1 by brian
clean slate
955
  if test "$mysql_cv_getspecific_args" = "other"
956
  then
957
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1],
958
              [For some non posix threads])
959
  fi
960
961
  # Check definition of pthread_mutex_init
236.1.39 by Monty Taylor
autoconf warning cleanups.
962
  AC_CACHE_CHECK([args to pthread_mutex_init], [mysql_cv_mutex_init_args],
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
963
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
964
#ifndef _REENTRANT
965
#define _REENTRANT
966
#endif
967
#ifndef _POSIX_PTHREAD_SEMANTICS
1 by brian
clean slate
968
#define _POSIX_PTHREAD_SEMANTICS 
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
969
#endif
28.1.33 by Monty Taylor
Added -Wall
970
#include <pthread.h> ]], [[ 
1 by brian
clean slate
971
  pthread_mutexattr_t attr;
972
  pthread_mutex_t mp;
236.1.39 by Monty Taylor
autoconf warning cleanups.
973
  pthread_mutex_init(&mp,&attr); ]])],
974
      [mysql_cv_mutex_init_args=POSIX],
975
      [mysql_cv_mutex_init_args=other])])
1 by brian
clean slate
976
  if test "$mysql_cv_mutex_init_args" = "other"
977
  then
978
    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1],
979
              [For some non posix threads])
980
  fi
981
#---END:
982
983
#---START: Used in for client configure
984
# Check definition of readdir_r
236.1.39 by Monty Taylor
autoconf warning cleanups.
985
AC_CACHE_CHECK([args to readdir_r], [mysql_cv_readdir_r],
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
986
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
987
#ifndef _REENTRANT
988
#define _REENTRANT
989
#endif
990
#ifndef _POSIX_PTHREAD_SEMANTICS 
1 by brian
clean slate
991
#define _POSIX_PTHREAD_SEMANTICS 
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
992
#endif
1 by brian
clean slate
993
#include <pthread.h>
28.1.33 by Monty Taylor
Added -Wall
994
#include <dirent.h>]], [[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
236.1.39 by Monty Taylor
autoconf warning cleanups.
995
readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])],
996
    [mysql_cv_readdir_r=POSIX],
997
    [mysql_cv_readdir_r=other])])
1 by brian
clean slate
998
if test "$mysql_cv_readdir_r" = "POSIX"
999
then
1000
  AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r])
1001
fi
1002
1003
# Check definition of posix sigwait()
236.1.39 by Monty Taylor
autoconf warning cleanups.
1004
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
1005
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1006
#ifndef _REENTRANT
236.1.39 by Monty Taylor
autoconf warning cleanups.
1007
#define _REENTRANT
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1008
#endif
1009
#ifndef _POSIX_PTHREAD_SEMANTICS
1 by brian
clean slate
1010
#define _POSIX_PTHREAD_SEMANTICS 
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1011
#endif
1 by brian
clean slate
1012
#include <pthread.h>
236.1.39 by Monty Taylor
autoconf warning cleanups.
1013
#include <signal.h>
1014
      ]], [[
1015
#ifndef _AIX
1 by brian
clean slate
1016
sigset_t set;
1017
int sig;
1018
sigwait(&set,&sig);
236.1.39 by Monty Taylor
autoconf warning cleanups.
1019
#endif
1020
      ]])],
1021
    [mysql_cv_sigwait=POSIX],
1022
    [mysql_cv_sigwait=other])])
1 by brian
clean slate
1023
if test "$mysql_cv_sigwait" = "POSIX"
1024
then
1025
  AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait])
1026
fi
1027
1028
if test "$mysql_cv_sigwait" != "POSIX"
1029
then
1030
unset mysql_cv_sigwait
1031
# Check definition of posix sigwait()
236.1.39 by Monty Taylor
autoconf warning cleanups.
1032
AC_CACHE_CHECK([style of sigwait], [mysql_cv_sigwait],
1033
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1034
#ifndef _REENTRANT
236.1.39 by Monty Taylor
autoconf warning cleanups.
1035
#define _REENTRANT
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1036
#endif
1037
#ifndef _POSIX_PTHREAD_SEMANTICS
1 by brian
clean slate
1038
#define _POSIX_PTHREAD_SEMANTICS 
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1039
#endif
1 by brian
clean slate
1040
#include <pthread.h>
236.1.39 by Monty Taylor
autoconf warning cleanups.
1041
#include <signal.h>
1042
      ]], [[
1043
sigset_t set;
1 by brian
clean slate
1044
int sig;
236.1.39 by Monty Taylor
autoconf warning cleanups.
1045
sigwait(&set);
1046
      ]])],
1047
    [mysql_cv_sigwait=NONPOSIX],
1048
    [mysql_cv_sigwait=other])])
1 by brian
clean slate
1049
if test "$mysql_cv_sigwait" = "NONPOSIX"
1050
then
1051
  AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument])
1052
fi
1053
fi
1054
#---END:
1055
1056
# Check if pthread_attr_setscope() exists
236.1.39 by Monty Taylor
autoconf warning cleanups.
1057
AC_CACHE_CHECK([for pthread_attr_setscope], [mysql_cv_pthread_attr_setscope],
1058
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1059
#ifndef _REENTRANT
236.1.39 by Monty Taylor
autoconf warning cleanups.
1060
#define _REENTRANT
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1061
#endif
1062
#ifndef _POSIX_PTHREAD_SEMANTICS
1 by brian
clean slate
1063
#define _POSIX_PTHREAD_SEMANTICS 
632.1.11 by Monty Taylor
Fixed Sun Studio warnings in mysys.
1064
#endif
236.1.39 by Monty Taylor
autoconf warning cleanups.
1065
#include <pthread.h>
1066
      ]], [[
1067
pthread_attr_t thr_attr;
1068
pthread_attr_setscope(&thr_attr,0);
1069
      ]])],
1070
    [mysql_cv_pthread_attr_setscope=yes],
1071
    [mysql_cv_pthread_attr_setscope=no])])
1 by brian
clean slate
1072
if test "$mysql_cv_pthread_attr_setscope" = "yes"
1073
then
1074
  AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope])
1075
fi
1076
28.1.33 by Monty Taylor
Added -Wall
1077
AC_LANG_PUSH([C++])
1 by brian
clean slate
1078
AC_CHECK_HEADERS(cxxabi.h)
1079
AC_CACHE_CHECK([checking for abi::__cxa_demangle], mysql_cv_cxa_demangle,
28.1.33 by Monty Taylor
Added -Wall
1080
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cxxabi.h>]], [[
1 by brian
clean slate
1081
  char *foo= 0; int bar= 0;
1082
  foo= abi::__cxa_demangle(foo, foo, 0, &bar);
28.1.33 by Monty Taylor
Added -Wall
1083
]])],[mysql_cv_cxa_demangle=yes],[mysql_cv_cxa_demangle=no])])
1084
AC_LANG_POP([])
1 by brian
clean slate
1085
1086
if test "x$mysql_cv_cxa_demangle" = xyes; then
1087
  AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1,
1088
            [Define to 1 if you have the `abi::__cxa_demangle' function.])
1089
fi
1090
1091
#--------------------------------------------------------------------
1092
# Check for requested features
1093
#--------------------------------------------------------------------
1094
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
1095
DRIZZLE_CHECK_MAX_INDEXES
1 by brian
clean slate
1096
1097
#--------------------------------------------------------------------
1098
# Declare our plugin modules
1099
# Has to be done late, as the plugin may need to check for existence of
1100
# functions tested above
1101
#--------------------------------------------------------------------
1102
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
1103
DRIZZLE_CONFIGURE_PLUGINS([none])
1 by brian
clean slate
1104
1105
AC_SUBST(mysql_plugin_dirs)
1106
AC_SUBST(mysql_plugin_libs)
1107
AC_SUBST(mysql_plugin_defs)
722.2.7 by Monty Taylor
Fixed the stupid build problem
1108
AC_SUBST(DRIZZLED_PLUGIN_DEP_LIBS)
1 by brian
clean slate
1109
435.1.1 by Monty Taylor
Fixed -O3 optimization for gcc.
1110
189 by Brian Aker
Refactor of configure.ac. Added profile. One note... I believe this should
1111
AC_ARG_ENABLE([profiling],
1112
    [AS_HELP_STRING([--enable-profiling],
1113
       [Toggle profiling @<:@default=off@:>@])],
1114
    [ac_profiling="$enableval"],
1115
    [ac_profiling="no"])
1116
1117
AC_ARG_ENABLE([coverage],
1118
    [AS_HELP_STRING([--enable-coverage],
1119
       [Toggle coverage @<:@default=off@:>@])],
1120
    [ac_coverage="$enableval"],
1121
    [ac_coverage="no"])
1122
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1123
AC_ARG_ENABLE([pedantic-warnings],
1124
    [AS_HELP_STRING([--disable-pedantic-warnings],
1125
       [Toggle pedanticness @<:@default=on@:>@])],
1126
    [ac_warn_pedantic="$enableval"],
1127
    [ac_warn_pedantic="yes"])
1128
1129
AC_ARG_ENABLE([fail],
77.1.112 by Monty Taylor
Fixed comment on --enable-fail -> --disable-fail.
1130
    [AS_HELP_STRING([--disable-fail],
1131
       [Turn warnings into failures @<:@default=on@:>@])],
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1132
    [ac_warn_fail="$enableval"],
77.1.108 by Monty Taylor
Turn on -Werror again by default.
1133
    [ac_warn_fail="yes"])
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1134
53.2.6 by Monty Taylor
Turned unreachable code warnings into a configure option.
1135
AC_ARG_ENABLE([unreachable],
1136
    [AS_HELP_STRING([--enable-unreachable],
1137
       [Enable warnings about unreachable code @<:@default=off@:>@])],
1138
    [ac_warn_unreachable="$enableval"],
1139
    [ac_warn_unreachable="no"])
1140
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1141
AC_ARG_ENABLE([longlong-warnings],
1142
    [AS_HELP_STRING([--enable-longlong-warnings],
1143
       [Enable warnings about longlong in C++ @<:@default=off@:>@])],
1144
    [ac_warn_longlong="$enableval"],
421 by Monty
Made including stdint.h work.
1145
    [ac_warn_longlong="no"])
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1146
1147
AC_ARG_ENABLE([strict-aliasing],
1148
    [AS_HELP_STRING([--enable-strict-aliasing],
1149
       [Enable warnings about stict-aliasing @<:@default=off@:>@])],
1150
    [ac_warn_strict_aliasing="$enableval"],
1151
    [ac_warn_strict_aliasing="no"])
1152
509.2.1 by Monty Taylor
Added some more warning options to configure.
1153
AC_ARG_ENABLE([cast-warnings],
1154
    [AS_HELP_STRING([--enable-cast-warnings],
1155
       [Enable warnings about use of old C-style casts @<:@default=off@:>@])],
1156
    [ac_warn_cast="$enableval"],
1157
    [ac_warn_cast="no"])
1158
1159
AC_ARG_ENABLE([effective-style],
1160
    [AS_HELP_STRING([--enable-effective-style],
1161
       [Enable warnings violating Effective C++ Style Guidelines @<:@default=off@:>@])],
1162
    [ac_warn_effc="$enableval"],
1163
    [ac_warn_effc="no"])
1164
779.3.10 by Monty Taylor
Turned on -Wshadow.
1165
AC_ARG_ENABLE([shadow],
1166
    [AS_HELP_STRING([--disable-shadow],
1167
       [Disables warnings about scope shadowing @<:@default=on@:>@])],
1168
    [ac_warn_shadow="$enableval"],
1169
    [ac_warn_shadow="yes"])
1170
509.2.2 by Monty Taylor
Added one more set of possible warnings.
1171
AC_ARG_ENABLE([go-crazy],
1172
    [AS_HELP_STRING([--enable-go-crazy],
1173
       [Enables extra little warnings that might be too much @<:@default=off@:>@])],
1174
    [ac_warn_go_crazy="$enableval"],
1175
    [ac_warn_go_crazy="no"])
1176
713.1.8 by Monty Taylor
Moved a little code...
1177
AC_ARG_ENABLE([datarace],
1178
    [AS_HELP_STRING([--enable-datarace],
1179
       [Enables Sun Studio data race detection @<:@default=off@:>@])],
1180
    [ac_datarace="$enableval"],
1181
    [ac_datarace="no"])
53.2.2 by Monty Taylor
Updated everything that needs updating to compile with -std=gnu99 -pedantic
1182
779.1.16 by Monty Taylor
Turned on exceptions, but made it configurable.
1183
AC_ARG_ENABLE([exceptions],
1184
    [AS_HELP_STRING([--disable-exceptions],
1185
        [Disables use of Exceptions in the build @<:@default=on@:>@])],
1186
    [ac_exceptions="$enableval"],
1187
    [ac_exceptions="yes"])
713.1.7 by Monty Taylor
Added support for thread data tracing to the build for Sun Studio.
1188
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1189
if test "$GCC" = "yes"
1190
then
53.2.2 by Monty Taylor
Updated everything that needs updating to compile with -std=gnu99 -pedantic
1191
558 by Monty Taylor
Added autoconf test to turn off -Wredundant-decls if it doesn't work right.
1192
  if test "$ac_warn_fail" = "yes"
1193
  then
1194
    W_FAIL="-Werror"
1195
  fi
722.1.4 by Monty Taylor
Removed all the setting of DEFS everywhere. Use configmake.h to get the values
1196
  BASE_WARNINGS="-Wall -Wextra ${W_FAIL}"
558 by Monty Taylor
Added autoconf test to turn off -Wredundant-decls if it doesn't work right.
1197
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1198
  if test "$ac_warn_longlong" = "yes"
1199
  then
1200
    W_LONGLONG="-Wlong-long"
1201
  else
1202
    W_LONGLONG="-Wno-long-long"
1203
  fi
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1204
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1205
  if test "$ac_warn_strict_aliasing" = "yes"
1206
  then
1207
    W_STRICT_ALIASING="-Wstrict-aliasing"
1208
  else
509.2.3 by Monty Taylor
Re-worked strict-aliasing again.
1209
    W_STRICT_ALIASING="-Wno-strict-aliasing"
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1210
  fi
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1211
779.3.10 by Monty Taylor
Turned on -Wshadow.
1212
  if test "$ac_warn_shadow" = "yes"
1213
  then
1214
    W_SHADOW="-Wshadow"
1215
    NO_SHADOW="-Wno-shadow"
1216
  else
1217
    W_SHADOW="-Wno-shadow"
1218
    NO_SHADOW=""
1219
  fi
1220
189 by Brian Aker
Refactor of configure.ac. Added profile. One note... I believe this should
1221
  if test "$ac_profiling" = "yes"
1222
  then
1223
    GPROF_PROFILING="-pg"
1224
  else
1225
    GPROF_PROFILING=" "
1226
  fi
1227
1228
  if test "$ac_coverage" = "yes"
1229
  then
1230
    GPROF_COVERAGE="-fprofile-arcs -ftest-coverage"
1231
  else
1232
    GPROF_COVERAGE=" "
1233
  fi
1234
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1235
  if test "$ac_warn_pedantic" = "yes"
1236
  then
520.4.36 by Monty Taylor
Added autoconf check for usability of __attribute__((visibility("hidden"))).
1237
    save_CXXFLAGS="${CXXFLAGS}"
1238
    CXXFLAGS="${CXXFLAGS} ${W_FAIL} -Wredundant-decls"
1239
    AC_CACHE_CHECK([whether it is safe to use -Wredundant-decls],
1240
      [ac_cv_safe_to_use_Wredundant_decls_],
1241
      [AC_LANG_PUSH(C++)
1242
       AC_COMPILE_IFELSE(
1243
         [AC_LANG_PROGRAM([
558 by Monty Taylor
Added autoconf test to turn off -Wredundant-decls if it doesn't work right.
1244
template <typename E> struct C { void foo(); };
1245
template <typename E> void C<E>::foo() { }
1246
template <> void C<int>::foo();
520.4.36 by Monty Taylor
Added autoconf check for usability of __attribute__((visibility("hidden"))).
1247
            AC_INCLUDES_DEFAULT])],
1248
          [ac_cv_safe_to_use_Wredundant_decls_=yes],
1249
          [ac_cv_safe_to_use_Wredundant_decls_=no])
1250
        AC_LANG_POP()])
559.1.1 by Kristian Nielsen
Fix a few problems with the -Wredundant-decls configure check.
1251
    if test $ac_cv_safe_to_use_Wredundant_decls_ = yes
558 by Monty Taylor
Added autoconf test to turn off -Wredundant-decls if it doesn't work right.
1252
    then
559.1.1 by Kristian Nielsen
Fix a few problems with the -Wredundant-decls configure check.
1253
      GXX_W_REDUNDANT_DECLS="-Wredundant-decls"
558 by Monty Taylor
Added autoconf test to turn off -Wredundant-decls if it doesn't work right.
1254
    else
559.1.1 by Kristian Nielsen
Fix a few problems with the -Wredundant-decls configure check.
1255
      GXX_W_REDUNDANT_DECLS="-Wno-redundant-decls"
558 by Monty Taylor
Added autoconf test to turn off -Wredundant-decls if it doesn't work right.
1256
    fi
520.4.36 by Monty Taylor
Added autoconf check for usability of __attribute__((visibility("hidden"))).
1257
    
559.1.1 by Kristian Nielsen
Fix a few problems with the -Wredundant-decls configure check.
1258
    GCC_PEDANTIC="-pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls ${W_STRICT_ALIASING}"
1259
    GXX_PEDANTIC="-pedantic -Wundef ${GXX_W_REDUNDANT_DECLS} ${W_LONGLONG} ${W_STRICT_ALIASING}"
520.4.36 by Monty Taylor
Added autoconf check for usability of __attribute__((visibility("hidden"))).
1260
1261
    AC_CACHE_CHECK([whether __attribute__ visibility "hidden" is supported],
1262
      [ac_cv_can_use_hidden_],
1263
      [AC_LANG_PUSH(C++)
1264
       AC_COMPILE_IFELSE(
1265
         [AC_LANG_PROGRAM([
1266
          AC_INCLUDES_DEFAULT
1267
__attribute__((visibility ("hidden")))
1268
void testme() {  };],[
1269
     testme();])],  
1270
         [ac_cv_can_use_hidden_=yes],
1271
         [ac_cv_can_use_hidden_=no])
1272
       AC_LANG_POP()])
1273
    if test "$ac_cv_can_use_hidden_" = "yes"
1274
    then
1275
      AC_DEFINE(HAVE_ATTR_HIDDEN, 1,
1276
                [Define to 1 if you have support for __attribute__((visibility("hidden")))])
1277
    fi
1278
559 by Monty Taylor
Fixed syntax errors.
1279
    CXXFLAGS="${save_CXXFLAGS}"
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1280
  fi
1281
53.2.6 by Monty Taylor
Turned unreachable code warnings into a configure option.
1282
  if test "$ac_warn_unreachable" = "yes"
1283
  then
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1284
    W_UNREACHABLE="-Wunreachable-code"
53.2.6 by Monty Taylor
Turned unreachable code warnings into a configure option.
1285
  fi
509.2.1 by Monty Taylor
Added some more warning options to configure.
1286
  if test "$ac_warn_cast" = "yes"
1287
  then
1288
    W_CAST="-Wold-style-cast"
1289
  fi
1290
1291
  if test "$ac_warn_effc" = "yes"
1292
  then
1293
    W_EFFC="-Weffc++"
1294
  fi
1295
509.2.2 by Monty Taylor
Added one more set of possible warnings.
1296
  if test "$ac_warn_gocrazy" = "yes"
1297
  then
779.3.10 by Monty Taylor
Turned on -Wshadow.
1298
    W_CRAZY="-Wconversion -Winvalid-pch"
509.2.2 by Monty Taylor
Added one more set of possible warnings.
1299
  fi
1300
779.3.10 by Monty Taylor
Turned on -Wshadow.
1301
  CC_WARNINGS="${C99_SUPPORT_HACK} ${BASE_WARNINGS} ${GCC_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_SHADOW} ${W_CRAZY}"
1302
  CXX_WARNINGS="${BASE_WARNINGS} ${GXX_PEDANTIC} ${W_UNREACHABLE} ${GPROF_PROFILING} ${GPROF_COVERAGE} ${W_CAST} ${W_SHADOW} ${W_EFFC} ${W_CRAZY}"
77.1.109 by Monty Taylor
Made --disable-pedantic-warnings only disable the pedantic warnings, rather than also removing the -std=gnu99 part.
1303
779.1.16 by Monty Taylor
Turned on exceptions, but made it configurable.
1304
  if test "$ac_exceptions" = "no"
1305
  then
1306
    NO_EXCEPTIONS="-fno-exceptions"
1307
    W_EXCEPTIONS="-fexceptions"
1308
  fi
520.4.44 by mordred
A whole bunch of solaris/sun studio compile fixes.
1309
  NO_REDUNDANT_DECLS="-Wno-redundant-decls"
1310
  # Disable exceptions as they seams to create problems with gcc and threads.
1311
  # drizzled doesn't use run-time-type-checking, so we disable it.
1312
  AM_CXXFLAGS="${AM_CXXFLAGS} -fno-rtti"
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
1313
  CPPFLAGS="${CPPFLAGS} -fpch-deps"
779.3.16 by Monty Taylor
Some Sun warning fixes.
1314
  PROTOSKIP_WARNINGS="${NO_SHADOW}"
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1315
fi
520.4.37 by Monty Taylor
Added some Sun compile flags.
1316
if test "$SUNCC" = "yes"
1317
then
713.1.7 by Monty Taylor
Added support for thread data tracing to the build for Sun Studio.
1318
  if test "$ac_datarace" = "yes"
1319
  then
713.1.9 by Monty Taylor
Fixed datarace.
1320
    CFLAGS="${CFLAGS} -xinstrument=datarace"
1321
    CXXFLAGS="${CXXFLAGS} -xinstrument=datarace"
713.1.7 by Monty Taylor
Added support for thread data tracing to the build for Sun Studio.
1322
  fi
779.3.25 by Monty Taylor
More fixes. Turned warnings=errors off for now.
1323
  #CC_WARNINGS="-v -xc99=all -errtags=yes -errwarn=%all -erroff=E_ATTRIBUTE_NOT_VAR"
1324
  #CXX_WARNINGS="+w +w2 -xport64 -errtags=yes -errwarn=%all -erroff=attrskipunsup,doubunder -compat=5"
1325
  CC_WARNINGS="-v -xc99=all -errtags=yes -erroff=E_ATTRIBUTE_NOT_VAR"
1326
  CXX_WARNINGS="+w +w2 -xport64 -errtags=yes -erroff=attrskipunsup,doubunder -compat=5"
779.3.18 by Monty Taylor
Cleaned up warnings up through innodb.
1327
  PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl"
1328
  NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED"
779.1.16 by Monty Taylor
Turned on exceptions, but made it configurable.
1329
  if test "$ac_exceptions" = "no"
1330
  then
1331
    NO_EXCEPTIONS="-features=no%except"
1332
    W_EXCEPTIONS="-features=except"
1333
  fi
520.4.37 by Monty Taylor
Added some Sun compile flags.
1334
fi
520.4.44 by mordred
A whole bunch of solaris/sun studio compile fixes.
1335
AM_CXXFLAGS="${CXX_WARNINGS} ${NO_EXCEPTIONS}  ${AM_CXXFLAGS}"
1336
AM_CFLAGS="${CC_WARNINGS} ${AM_CFLAGS}"
1337
1338
AC_SUBST(NO_EXCEPTIONS)
1339
AC_SUBST(W_EXCEPTIONS)
779.3.10 by Monty Taylor
Turned on -Wshadow.
1340
AC_SUBST(NO_SHADOW)
1341
AC_SUBST(W_SHADOW)
520.4.44 by mordred
A whole bunch of solaris/sun studio compile fixes.
1342
AC_SUBST(NO_REDUNDANT_DECLS)
779.3.16 by Monty Taylor
Some Sun warning fixes.
1343
AC_SUBST(PROTOSKIP_WARNINGS)
779.3.18 by Monty Taylor
Cleaned up warnings up through innodb.
1344
AC_SUBST(NO_UNREACHED)
53.2.1 by Monty Taylor
Added --disable-pedantic-warnings and --enable-fail.
1345
815.1.2 by Monty Taylor
Added -Ignulib to the includes if it's needed.
1346
GLOBAL_CPPFLAGS='-I$(top_srcdir) -I$(top_builddir)'
815.1.4 by Monty Taylor
Added check for getopt.
1347
if test "$ac_cv_func_timegm" = "no" -o "$gl_cv_func_gnu_getopt" = "no"
815.1.2 by Monty Taylor
Added -Ignulib to the includes if it's needed.
1348
then
1349
  GLOBAL_CPPFLAGS="${GLOBAL_CPPFLAGS} -I\$(top_srcdir)/gnulib -I\$(top_builddir)/gnulib"
1350
fi
1351
AC_SUBST([GLOBAL_CPPFLAGS])
202.1.23 by Monty Taylor
Moved the includes we use everywhere to to GLOBAL_CPPFLAGS and added AM_CPPFLAGS to an AC_SUBST, so that we could take out the redundant declaration from most fof the Makefiles.
1352
AC_SUBST([AM_CPPFLAGS],['${GLOBAL_CPPFLAGS}'])
779.3.10 by Monty Taylor
Turned on -Wshadow.
1353
AC_SUBST([GLOBAL_CXXFLAGS],[${AM_CXXFLAGS}])
287.3.26 by Monty Taylor
Put warnings into AM_C*FLAGS so they can be overridden per lib.
1354
AC_SUBST([AM_CFLAGS])
1355
AC_SUBST([AM_CXXFLAGS])
202.1.23 by Monty Taylor
Moved the includes we use everywhere to to GLOBAL_CPPFLAGS and added AM_CPPFLAGS to an AC_SUBST, so that we could take out the redundant declaration from most fof the Makefiles.
1356
779.3.10 by Monty Taylor
Turned on -Wshadow.
1357
1 by brian
clean slate
1358
# Some usefull subst
1359
AC_SUBST(CC)
1360
AC_SUBST(GXX)
1361
1362
# Set configuration options for make_binary_distribution
1363
case $SYSTEM_TYPE in
1364
  *netware*)
1365
    MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --no-strip"
1366
    ;;
1367
  *)
1368
    : # no change for other platforms yet
1369
    ;;
1370
esac
1371
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
1372
722.1.4 by Monty Taylor
Removed all the setting of DEFS everywhere. Use configmake.h to get the values
1373
AC_SUBST(pkgplugindir,"\$(pkglibdir)/plugin")
1374
492.1.7 by Monty Taylor
Moved test() to its own file.
1375
dnl GCC Precompiled Header Support
584.4.3 by Monty Taylor
Disabled pre-compiled headers for now.
1376
dnl re-enable later
632.1.25 by Monty Taylor
Removed AM_CONDITIONAL from SEARCH_FOR_LIB. Aligned naming of AM_CONDITIONALS.
1377
dnl AM_CONDITIONAL([BUILD_GCC_PCH],[test "$GCC" = "yes"])
1378
AM_CONDITIONAL([BUILD_GCC_PCH],[test "no" = "yes"])
492.1.7 by Monty Taylor
Moved test() to its own file.
1379
287.3.1 by Monty Taylor
Removed mysys/tests.
1380
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
815.1.1 by Monty Taylor
Add timegm which is missing on Solaris.
1381
 gnulib/Makefile dnl
264.1.15 by Monty Taylor
Removed a bunch of files from mystrings that aren't build or used at all.
1382
 mystrings/Makefile storage/Makefile dnl
575.2.2 by Monty Taylor
Moved vio stuff into libdrizzle.
1383
 po/Makefile.in dnl
779.3.37 by Monty Taylor
Renmaed libdrizzle in the tree to libdrizzleclient to avoid namespace clashes
1384
 libdrizzleclient/Makefile client/Makefile dnl
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
1385
 drizzled/Makefile dnl
316 by Brian Aker
First pass of new sql_db.cc work
1386
 drizzled/serialize/Makefile dnl
214 by Brian Aker
Rename of fields (fix issue with string and decimal .h clashing).
1387
 drizzled/sql_builtin.cc dnl
28.1.31 by Monty Taylor
Deleted tons of pointless garbage from scripts.
1388
 support-files/Makefile dnl
77.1.47 by Monty Taylor
Moved test to tests...
1389
 tests/Makefile tests/install_test_db dnl
546 by Monty Taylor
Cleaned up version.h. (And by cleaned, I mean removed)
1390
 plugin/Makefile dnl
779.3.37 by Monty Taylor
Renmaed libdrizzle in the tree to libdrizzleclient to avoid namespace clashes
1391
 drizzled/drizzled_safe support-files/libdrizzleclient.pc dnl
77.1.38 by Monty Taylor
Renamed more stuff to drizzle.
1392
 support-files/drizzle.server support-files/drizzle-log-rotate)
1 by brian
clean slate
1393
512.2.2 by C.J. Adams-Collier
added checks to determine which threading plugins have been enabled on
1394
scheduling_plugins_available="
1395
  pool_of_threads 
1396
  single_thread
1397
"
1398
1399
for sched_plugin in $scheduling_plugins_available
1400
do
1401
  varname="\${with_plugin_${sched_plugin}}"
1402
  result=`eval "echo $varname"`
1403
  if test "x$result" = "xyes"
1404
  then
1405
    scheduling_plugins="$sched_plugin $scheduling_plugins"
1406
  fi
1407
done
1408
824.1.1 by Monty Taylor
Added code to automatically build a new list of POTFILES.in, then updated the translations.
1409
AC_CONFIG_COMMANDS([timestamp-h], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
1410
1411
AC_CONFIG_COMMANDS([po/POTFILES.in],[
1412
if test "x$EGREP" != "x"
1413
then
1414
  echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.in
779.3.51 by Monty Taylor
Some cleanup. Don't add things from distcheck leftovers to POTFILES
1415
  # The grep -v 'drizzle-' is to exclude any distcheck leftovers
1416
  for f in `find . | grep -v 'drizzle-' | ${EGREP} '\.(cc|c|h|yy)$' | cut -c3- | sort`
824.1.1 by Monty Taylor
Added code to automatically build a new list of POTFILES.in, then updated the translations.
1417
  do
1418
    if grep gettext.h "$f" | grep include >/dev/null 2>&1
1419
    then
1420
      echo "$f" >> po/POTFILES.in.in
1421
    fi
1422
  done
1423
  if ! diff po/POTFILES.in.in po/POTFILES.in >/dev/null 2>&1
1424
  then
1425
    mv po/POTFILES.in.in po/POTFILES.in
1426
  else
1427
    rm po/POTFILES.in.in
1428
  fi
1429
fi
1430
])
1 by brian
clean slate
1431
1432
# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
287.3.28 by Monty Taylor
Expanded the move to AM_CFLAGS and AM_CXXFLAGS. Now we should be more correct.
1433
AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS' AM_CFLAGS='$AM_CFLAGS' AM_CXXFLAGS='$AM_CXXFLAGS'")
1 by brian
clean slate
1434
1435
AC_OUTPUT
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
1436
1437
echo "---"
1438
echo "Configuration summary for $PACKAGE_NAME version $VERSION"
1439
echo ""
1440
echo "   * Installation prefix:       $prefix"
1441
echo "   * System type:               $SYSTEM_TYPE"
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
1442
echo "   * Host CPU:                  $host_cpu"
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
1443
echo "   * C Compiler:                $CC_VERSION"
632.1.21 by Monty Taylor
Cleaned up compiler version checking.
1444
echo "   * C++ Compiler:              $CXX_VERSION"
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
1445
echo "   * Build auth_pam:            $ac_cv_header_security_pam_appl_h"
1446
echo "   * Assertions enabled:        $ac_cv_assert"
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
1447
echo "   * Debug enabled:             $with_debug"
1448
echo "   * Profiling enabled:         $ac_profiling"
1449
echo "   * Coverage enabled:          $ac_coverage"
1450
echo "   * Warnings as failure:       $ac_warn_fail"
512.2.2 by C.J. Adams-Collier
added checks to determine which threading plugins have been enabled on
1451
echo "   * Scheduling Plugins:        $scheduling_plugins"
492.2.1 by C.J. Adams-Collier
* fixed --disable-assert code (thanks Monty)
1452
echo "   * C++ cstdint location:      $ac_cv_cxx_cstdint"
1453
echo "   * C++ hash_map location:     $ac_cv_cxx_hash_map"
1454
echo "   * C++ hash namespace:        $ac_cv_cxx_hash_namespace"
1455
echo "   * C++ cmath location:        $ac_cv_cxx_cmath"
1456
echo "   * C++ cmath namespace:       $ac_cv_cxx_cmath_namespace"
489.2.1 by C.J. Adams-Collier
2008-10-07T1437 C.J. Adams-Collier <cjac@colliertech.org>
1457
echo ""
1458
echo "---"