7
7
AC_CONFIG_SRCDIR([drizzled/drizzled.cc])
8
8
AC_CONFIG_AUX_DIR(config)
9
AC_CONFIG_HEADERS([drizzled/config.h:config.h.in])
9
AC_CONFIG_HEADERS([config.h])
10
10
AC_CANONICAL_TARGET
11
11
AM_INIT_AUTOMAKE(drizzle, 7.0.0, no-define)
49
49
sinclude(config/ac-macros/readline.m4)
50
50
sinclude(config/ac-macros/ssl.m4)
51
51
sinclude(config/ac-macros/pkg.m4)
52
sinclude(config/ac-macros/ac_cxx_header_stdcxx_98.m4)
53
54
# Remember to add a directory drizzled/share/LANGUAGE
54
55
AVAILABLE_LANGUAGES="\
294
296
# Check for libevent
295
297
#--------------------------------------------------------------------
297
AC_CHECK_HEADERS(event.h)
298
if test "x$ac_cv_header_event_h" != "xyes"
299
AC_MSG_CHECKING(for libevent)
300
AC_ARG_WITH(libevent,
301
[AS_HELP_STRING([--with-libevent],
302
[Use libevent build directory])],
303
[ with_libevent=$withval ],
304
[ with_libevent=yes ])
306
if test "$withval" = "yes"
300
AC_MSG_ERROR([Couldn't find event.h. Try installing libevent development packages])
308
AC_CHECK_HEADERS(event.h)
309
if test "x$ac_cv_header_event_h" != "xyes"
311
AC_MSG_ERROR([Couldn't find event.h. Try installing libevent development packages])
315
AC_CHECK_LIB(event, event_loop, [], [AC_MSG_ERROR(could not find libevent)])
316
LIBEVENT_LIBS="${LIBS}"
317
LIBS="${my_save_LIBS}"
320
AC_MSG_RESULT($withval)
321
if test -f $withval/event.h -a -f $withval/libevent.a; then
323
if cd $withval; then withval=`pwd`; cd $owd; fi
324
LIBEVENT_CFLAGS="-I$withval"
325
LIBEVENT_LIBS="-L$withval -levent"
326
elif test -f $withval/include/event.h -a -f $withval/lib/libevent.a; then
328
if cd $withval; then withval=`pwd`; cd $owd; fi
329
LIBEVENT_CFLAGS="-I$withval/include"
330
LIBEVENT_LIBS="-L$withval/lib -levent"
332
AC_ERROR(event.h or libevent.a not found in $withval)
304
AC_CHECK_LIB(event, event_loop, [], [AC_MSG_ERROR(could not find libevent)])
305
LIBEVENT_LIBS="${LIBS}"
306
LIBS="${my_save_LIBS}"
336
AC_SUBST(LIBEVENT_CFLAGS)
307
337
AC_SUBST(LIBEVENT_LIBS)
339
AC_CACHE_CHECK([for bufferevent in libevent], ac_libevent_works, [
340
save_CFLAGS="$CFLAGS"
342
CFLAGS="$LIBEVENT_CFLAGS"
343
LIBS="$LIBEVENT_LIBS"
345
#include <sys/types.h>
346
#include <sys/time.h>
348
#include <event.h>],[
349
struct bufferevent bev;
350
bufferevent_settimeout(&bev, 1, 1);
351
], ac_libevent_works=yes, [
352
AC_ERROR([you need to install a more recent version of libevent,
353
check http://www.monkey.org/~provos/libevent/])
356
CFLAGS="$save_CFLAGS"
309
361
#--------------------------------------------------------------------
310
362
# Check for libpthread
311
363
#--------------------------------------------------------------------
324
376
AC_ARG_ENABLE([tcmalloc],
325
377
[AS_HELP_STRING([--enable-tcmalloc],
326
378
[Enable linking with tcmalloc @<:@default=off@:>@])],
327
[ac_warn_strict_aliasing="$enableval"],
328
[ac_warn_strict_aliasing="no"])
379
[ac_enable_tcmalloc="$enableval"],
380
[ac_enable_tcmalloc="no"])
330
if test "x$ac_warn_strict_aliasing" = "xyes"
382
if test "x$ac_enable_tcmalloc" = "xyes"
332
384
AC_CHECK_LIB(tcmalloc,malloc,[],[])
353
405
# Check for libreadline or compatible (libedit on Mac OS X)
354
406
#--------------------------------------------------------------------
356
AC_CHECK_HEADERS([readline/readline.h])
408
AC_CHECK_HEADERS(readline/history.h readline/readline.h)
357
409
if test "x$ac_cv_header_readline_readline_h" != "xyes"
359
411
AC_MSG_ERROR([Couldn't find readline/readline.h. Try installing readline development packages.])
413
AC_CHECK_TYPES([HIST_ENTRY], [], [], [AC_INCLUDES_DEFAULT[
414
#ifdef HAVE_READLINE_HISTORY_H
415
#include <readline/history.h>
417
#include <readline/readline.h>
419
AC_CHECK_DECLS([completion_matches], [], [], [AC_INCLUDES_DEFAULT[
420
#ifdef HAVE_READLINE_HISTORY_H
421
#include <readline/history.h>
423
#include <readline/readline.h>
362
426
MYSQL_CHECK_NEW_RL_INTERFACE
371
435
LIBS="$my_save_LIBS"
372
436
AC_SUBST(READLINE_LIBS)
375
438
#--------------------------------------------------------------------
376
439
# Check for libpcre
377
440
#--------------------------------------------------------------------
379
442
AC_LANG_PUSH([C++])
380
443
AC_PATH_PROG(PKG_CONFIG, pkg-config, AC_MSG_ERROR([pkg-config wasn't found.]))
381
PKG_CHECK_MODULES(PCRE, [libpcrecpp >= 3], [found_pcre="yes"],[
444
PKG_CHECK_MODULES(PCRE, [libpcrecpp >= 3], [found_pcre="yes"],[found_pcre="no"])
446
if test "$found_pcre" = "no"
382
448
dnl Only check the header here, because autoconf can't handle
383
449
dnl checking for C++ methods without C linkages
384
450
AC_CHECK_HEADERS(pcrecpp.h)
385
451
if test "x$ac_cv_header_pcrecpp_h" != "xyes"
390
# We can't search for these well, but we sure do need them!
391
PCRE_LIBS="-lpcrecpp -lpcre"
394
if test "x$found_pcre" != "xyes"
396
453
AC_MSG_ERROR([Couldn't find pcrecpp.h. Try installing the development package associated with libpcre on your system.])
455
# Found headers, now see if we can link
456
AC_MSG_CHECKING(for libpcrecpp)
457
save_LDFLAGS="$LDFLAGS"
458
LDFLAGS="-lpcrecpp -lpcre"
462
[pcrecpp::RE_Options opt;],
464
[AC_MSG_ERROR([Couldn't link libpcrecpp])])
467
LDFLAGS="$save_LDFLAGS"
399
472
AC_SUBST(PCRE_LIBS)
891
964
MYSQL_PTHREAD_YIELD
893
######################################################################
894
# For readline/libedit (We simply move the mimimum amount of stuff from
895
# the readline/libedit configure.in here)
897
967
dnl Checks for header files.
898
968
AC_CHECK_HEADERS(malloc.h sys/cdefs.h)
1275
1345
CFLAGS="$CFLAGS ${GCC_WARNINGS} "
1278
AC_SUBST([GLOBAL_CPPFLAGS],['-I$(top_srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include'])
1348
AC_SUBST([GLOBAL_CPPFLAGS],['-I$(top_srcdir) -I$(top_builddir)'])
1279
1349
AC_SUBST([AM_CPPFLAGS],['${GLOBAL_CPPFLAGS}'])
1281
1351
# Some usefull subst
1301
1371
drizzled/field/Makefile dnl
1302
1372
drizzled/share/Makefile dnl
1303
1373
drizzled/sql_builtin.cc dnl
1304
include/Makefile dnl
1305
1374
support-files/Makefile dnl
1306
1375
tests/Makefile tests/install_test_db dnl
1307
1376
drizzled/version.h plugin/Makefile dnl