39
39
ac_build_drizzle="yes"
42
# Canonicalize the configuration name.
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])
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])
56
AC_SUBST(TARGET_LINUX)
57
AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
62
AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX])
66
AC_SUBST(TARGET_SOLARIS)
67
AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
73
42
AC_PATH_PROG(GPERF, gperf)
74
43
AS_IF([test "x$GPERF" = "x"],
75
44
AC_MSG_ERROR("Drizzle requires gperf to build."))
103
#--------------------------------------------------------------------
104
# Check for libpthread
105
#--------------------------------------------------------------------
107
ACX_PTHREAD(,AC_MSG_ERROR(could not find libpthread))
108
LIBS="${PTHREAD_LIBS} ${LIBS}"
109
AM_CFLAGS="${PTHREAD_CFLAGS} ${AM_CFLAGS}"
110
AM_CXXFLAGS="${PTHREAD_CFLAGS} ${AM_CXXFLAGS}"
113
#--------------------------------------------------------------------
114
# Check for Google Proto Buffers
115
#--------------------------------------------------------------------
118
save_CXXFLAGS="${CXXFLAGS}"
119
CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}"
120
AC_LIB_HAVE_LINKFLAGS(protobuf,,
121
[#include <google/protobuf/descriptor.h>
123
[google::protobuf::FileDescriptor* file;],system)
124
AS_IF([test x$ac_cv_libprotobuf = xno],
125
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.]))
127
AC_CACHE_CHECK([if protobuf is recent enough], [drizzle_cv_protobuf_recent],
128
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
129
#include <google/protobuf/descriptor.h>
130
#if GOOGLE_PROTOBUF_VERSION < 2000002
131
# error Your version of Protobuf is too old
134
[drizzle_cv_protobuf_recent=yes],
135
[drizzle_cv_protobuf_recent=no])])
136
if test "$drizzle_cv_protobuf_recent" = "no"
138
AC_MSG_ERROR([Your version of Google Protocol Buffers is too old. Drizzle requires at least version 2.0.2])
140
CXXFLAGS="${save_CXXFLAGS}"
142
AC_PATH_PROG([PROTOC],[protoc],[no],[$LIBPROTOBUF_PREFIX/bin:$PATH])
143
if test "x$PROTOC" = "xno"
145
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.])
72
PANDORA_REQUIRE_PTHREAD
74
PANDORA_REQUIRE_LIBPROTOBUF
75
PANDORA_PROTOBUF_RECENT
76
PANDORA_REQUIRE_PROTOC
150
78
#--------------------------------------------------------------------
151
79
# Check for libuuid