~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/pandora_have_protobuf.m4

  • Committer: Brian Aker
  • Date: 2009-08-17 22:19:53 UTC
  • mto: This revision was merged to the branch mainline in revision 1118.
  • Revision ID: brian@gaz-20090817221953-6qzdxpi8l9nd342y
More dead option removal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
dnl   
4
4
dnl pandora-build: A pedantic build system
5
5
dnl Copyright (C) 2009 Sun Microsystems, Inc.
6
 
dnl This file is free software; Sun Microsystems
 
6
dnl This file is free software; the Free Software Foundation
7
7
dnl gives unlimited permission to copy and/or distribute it,
8
8
dnl with or without modifications, as long as this notice is preserved.
9
9
dnl
37
37
      AC_MSG_ERROR([libprotobuf is required for ${PACKAGE}. On Debian this can be found in libprotobuf-dev. On RedHat this can be found in protobuf-devel.]))
38
38
])
39
39
 
40
 
AC_DEFUN([PANDORA_PROTOBUF_REQUIRE_VERSION],[
 
40
AC_DEFUN([PANDORA_PROTOBUF_RECENT],[
41
41
  AC_REQUIRE([_PANDORA_SEARCH_LIBPROTOBUF])
42
 
  p_recent_ver=$1
43
 
  p_recent_ver_major=`echo $p_recent_ver | cut -f1 -d.`
44
 
  p_recent_ver_minor=`echo $p_recent_ver | cut -f2 -d.`
45
 
  p_recent_ver_patch=`echo $p_recent_ver | cut -f3 -d.`
46
 
  p_recent_ver_hex=`printf "%d%03d%03d" $p_recent_ver_major $p_recent_ver_minor $p_recent_ver_patch` 
47
42
  AC_LANG_PUSH([C++])
48
 
  AC_CACHE_CHECK([for protobuf >= $p_recent_ver],
49
 
    [drizzle_cv_protobuf_recent],
 
43
  AC_CACHE_CHECK([if protobuf is recent enough], [drizzle_cv_protobuf_recent],
50
44
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
51
45
#include <google/protobuf/descriptor.h>
52
 
#if GOOGLE_PROTOBUF_VERSION < $p_recent_ver_hex
 
46
#if GOOGLE_PROTOBUF_VERSION < 2000002
53
47
# error Your version of Protobuf is too old
54
48
#endif
55
49
      ]])],
56
 
    [drizzle_cv_protobuf_recent=yes],
57
 
    [drizzle_cv_protobuf_recent=no])])
 
50
      [drizzle_cv_protobuf_recent=yes],
 
51
      [drizzle_cv_protobuf_recent=no])])
58
52
  AS_IF([test "$drizzle_cv_protobuf_recent" = "no"],[
59
 
    AC_MSG_ERROR([Your version of Google Protocol Buffers is too old. ${PACKAGE} requires at least version $p_recent_ver])
 
53
    AC_MSG_ERROR([Your version of Google Protocol Buffers is too old. ${PACKAGE} requires at least version 2.0.2])
60
54
  ])
61
55
  AC_LANG_POP()
62
56
])