~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Monty Taylor
  • Date: 2009-07-26 20:11:34 UTC
  • mto: (1093.7.1 captain)
  • mto: This revision was merged to the branch mainline in revision 1101.
  • Revision ID: mordred@inaugust.com-20090726201134-e2x88ifdpau68t41
pandora-buildĀ v0.25

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
 
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."))
100
69
AC_CXX_CSTDINT
101
70
AC_CXX_CINTTYPES
102
71
 
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
 
AM_CXXFLAGS="${PTHREAD_CFLAGS} ${AM_CXXFLAGS}"
111
 
CC="$PTHREAD_CC"
112
 
 
113
 
#--------------------------------------------------------------------
114
 
# Check for Google Proto Buffers
115
 
#--------------------------------------------------------------------
116
 
 
117
 
AC_LANG_PUSH([C++])
118
 
save_CXXFLAGS="${CXXFLAGS}"
119
 
CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}"
120
 
AC_LIB_HAVE_LINKFLAGS(protobuf,,
121
 
[#include <google/protobuf/descriptor.h>
122
 
],
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.]))
126
 
 
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
132
 
#endif
133
 
    ]])],
134
 
    [drizzle_cv_protobuf_recent=yes],
135
 
    [drizzle_cv_protobuf_recent=no])])
136
 
if test "$drizzle_cv_protobuf_recent" = "no"
137
 
then
138
 
  AC_MSG_ERROR([Your version of Google Protocol Buffers is too old. Drizzle requires at least version 2.0.2])
139
 
fi
140
 
CXXFLAGS="${save_CXXFLAGS}"
141
 
 
142
 
AC_PATH_PROG([PROTOC],[protoc],[no],[$LIBPROTOBUF_PREFIX/bin:$PATH])
143
 
if test "x$PROTOC" = "xno"
144
 
then
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.])
146
 
fi
147
 
 
148
 
AC_LANG_POP()
 
72
PANDORA_REQUIRE_PTHREAD
 
73
 
 
74
PANDORA_REQUIRE_LIBPROTOBUF
 
75
PANDORA_PROTOBUF_RECENT
 
76
PANDORA_REQUIRE_PROTOC
149
77
 
150
78
#--------------------------------------------------------------------
151
79
# Check for libuuid