~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

Extracted the LOAD command into its own class and implementation files.
Removed the corresponding case label from the switch statement.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, use-gnulib, require-cxx, force-gcc42)
28
28
 
29
29
# Version with no dots
30
 
AC_DEFINE([DRIZZLE_VERSION_ID],RELEASE_ID,
 
30
AC_DEFINE([DRIZZLE_VERSION_ID],[RELEASE_ID],
31
31
          [Version ID that can be easily used for numeric comparison])
32
32
 
33
33
AC_DEFINE([_BACKWARD_BACKWARD_WARNING_H],[1],[Hack to disable deprecation warning in gcc])
39
39
ac_build_drizzle="yes"
40
40
 
41
41
 
 
42
# Canonicalize the configuration name.
 
43
 
 
44
AC_DEFINE_UNQUOTED([HOST_VENDOR], ["$host_vendor"],[Vendor of Build System])
 
45
AC_DEFINE_UNQUOTED([HOST_OS], ["$host_os"], [OS of Build System])
 
46
AC_DEFINE_UNQUOTED([HOST_CPU], ["$host_cpu"], [CPU of Build System])
 
47
 
 
48
AC_DEFINE_UNQUOTED([TARGET_VENDOR], ["$target_vendor"],[Vendor of Target System])
 
49
AC_DEFINE_UNQUOTED([TARGET_OS], ["$target_os"], [OS of Target System])
 
50
AC_DEFINE_UNQUOTED([TARGET_CPU], ["$target_cpu"], [CPU of Target System])
 
51
 
 
52
 
 
53
case "$target_os" in
 
54
  *linux*)
 
55
  TARGET_LINUX="true"
 
56
  AC_SUBST(TARGET_LINUX)
 
57
  AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
 
58
    ;;
 
59
  *darwin*)
 
60
    TARGET_OSX="true"
 
61
    AC_SUBST(TARGET_OSX)
 
62
    AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX])
 
63
    ;;
 
64
  *solaris*)
 
65
    TARGET_SOLARIS="true"
 
66
    AC_SUBST(TARGET_SOLARIS)
 
67
    AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
 
68
    ;;
 
69
  *)
 
70
    ;;
 
71
esac
 
72
 
42
73
AC_PATH_PROG(GPERF, gperf)
43
74
AS_IF([test "x$GPERF" = "x"],
44
75
      AC_MSG_ERROR("Drizzle requires gperf to build."))
69
100
AC_CXX_CSTDINT
70
101
AC_CXX_CINTTYPES
71
102
 
72
 
PANDORA_REQUIRE_PTHREAD
73
 
 
74
 
PANDORA_REQUIRE_LIBPROTOBUF
75
 
PANDORA_PROTOBUF_RECENT
76
 
PANDORA_REQUIRE_PROTOC
 
103
#--------------------------------------------------------------------
 
104
# Check for libpthread
 
105
#--------------------------------------------------------------------
 
106
 
 
107
ACX_PTHREAD(,AC_MSG_ERROR(could not find libpthread))
 
108
LIBS="${PTHREAD_LIBS} ${LIBS}"
 
109
AM_CFLAGS="${PTHREAD_CFLAGS} ${AM_CFLAGS}"
 
110
CC="$PTHREAD_CC"
 
111
 
 
112
#--------------------------------------------------------------------
 
113
# Check for Google Proto Buffers
 
114
#--------------------------------------------------------------------
 
115
 
 
116
AC_LANG_PUSH([C++])
 
117
AC_LIB_HAVE_LINKFLAGS(protobuf,pthread,
 
118
[#include <google/protobuf/descriptor.h>
 
119
],
 
120
[google::protobuf::FileDescriptor* file;],system)
 
121
AS_IF([test x$ac_cv_libprotobuf = xno],
 
122
      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.]))
 
123
 
 
124
AC_CACHE_CHECK([if protobuf is recent enough], [drizzle_cv_protobuf_recent],
 
125
  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 
126
#include <google/protobuf/descriptor.h>
 
127
#if GOOGLE_PROTOBUF_VERSION < 2000002
 
128
# error Your version of Protobuf is too old
 
129
#endif
 
130
    ]])],
 
131
    [drizzle_cv_protobuf_recent=yes],
 
132
    [drizzle_cv_protobuf_recent=no])])
 
133
if test "$drizzle_cv_protobuf_recent" = "no"
 
134
then
 
135
  AC_MSG_ERROR([Your version of Google Protocol Buffers is too old. Drizzle requires at least version 2.0.2])
 
136
fi
 
137
 
 
138
AC_PATH_PROG([PROTOC],[protoc],[no],[$LIBPROTOBUF_PREFIX/bin:$PATH])
 
139
if test "x$PROTOC" = "xno"
 
140
then
 
141
  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.])
 
142
fi
 
143
 
 
144
AC_LANG_POP()
77
145
 
78
146
#--------------------------------------------------------------------
79
147
# Check for libuuid
128
196
      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.]))
129
197
 
130
198
#--------------------------------------------------------------------
 
199
# Check for TBB
 
200
#--------------------------------------------------------------------
 
201
 
 
202
AC_LANG_PUSH(C++)
 
203
AC_LIB_HAVE_LINKFLAGS(tbb,,
 
204
[#include <tbb/atomic.h>
 
205
 #include <stdint.h>
 
206
],
 
207
[
 
208
  tbb::atomic<uint64_t> x;
 
209
  tbb::atomic<uint8_t> y;
 
210
  x=0;
 
211
  y=0;
 
212
  x++;
 
213
  y++;
 
214
])
 
215
AC_LANG_POP()
 
216
 
 
217
#--------------------------------------------------------------------
131
218
# Check for libreadline or compatible (libedit on Mac OS X)
132
219
#--------------------------------------------------------------------
133
220
 
459
546
  fdatasync fpresetsticky fpsetmask fsync \
460
547
  getpassphrase getpwnam \
461
548
  getpwuid getrlimit getrusage index initgroups isnan \
462
 
  localtime_r log log2 gethrtime gmtime_r \
 
549
  localtime_r gethrtime gmtime_r \
463
550
  madvise \
464
551
  mkstemp mlockall poll pread pthread_attr_create mmap mmap64 \
465
552
  pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
670
757
drizzled_builtin_list=`echo $drizzled_builtin_list | sed 's/, *$//'`
671
758
AC_DEFINE_UNQUOTED([DRIZZLED_BUILTIN_LIST],[$drizzled_builtin_list],
672
759
                   [List of plugins to be loaded in sql_builtin.cc])
673
 
AC_SUBST(drizzled_plugin_test_list)
674
760
AC_SUBST(drizzled_plugin_libs)
675
761
 
676
762
AC_SUBST(mysql_plugin_dirs)