~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/pandora_have_libgtest.m4

  • Committer: Monty Taylor
  • Date: 2010-04-16 00:08:16 UTC
  • mto: (1461.2.2 more-valgrind)
  • mto: This revision was merged to the branch mainline in revision 1477.
  • Revision ID: mordred@inaugust.com-20100416000816-ihkknd84g315lmmu
Latest pandora-build. Moves the lint check to only run distcheck.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Copyright (C) 2010 Monty Taylor
 
2
dnl This file is free software; Monty Taylor
 
3
dnl gives unlimited permission to copy and/or distribute it,
 
4
dnl with or without modifications, as long as this notice is preserved.
 
5
 
 
6
AC_DEFUN([_PANDORA_SEARCH_LIBGTEST],[
 
7
  AC_REQUIRE([AC_LIB_PREFIX])
 
8
 
 
9
  dnl --------------------------------------------------------------------
 
10
  dnl  Check for libgtest
 
11
  dnl --------------------------------------------------------------------
 
12
 
 
13
  AC_ARG_ENABLE([libgtest],
 
14
    [AS_HELP_STRING([--disable-libgtest],
 
15
      [Build with libgtest support @<:@default=on@:>@])],
 
16
    [ac_enable_libgtest="$enableval"],
 
17
    [ac_enable_libgtest="yes"])
 
18
 
 
19
  AS_IF([test "x$ac_enable_libgtest" = "xyes"],[
 
20
    AC_LANG_PUSH(C++)
 
21
    AC_LIB_HAVE_LINKFLAGS(gtest,,[
 
22
      #include <gtest/gtest.h>
 
23
TEST(pandora_test_libgtest, PandoraTest)
 
24
{
 
25
  ASSERT_EQ(1, 1);
 
26
}
 
27
    ],[])
 
28
    AC_LANG_POP()
 
29
  ],[
 
30
    ac_cv_libgtest="no"
 
31
  ])
 
32
 
 
33
  AM_CONDITIONAL(HAVE_LIBGTEST, [test "x${ac_cv_libgtest}" = "xyes"])
 
34
])
 
35
 
 
36
AC_DEFUN([PANDORA_HAVE_LIBGTEST],[
 
37
  AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST])
 
38
])
 
39
 
 
40
AC_DEFUN([PANDORA_REQUIRE_LIBGTEST],[
 
41
  AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST])
 
42
  AS_IF([test "x${ac_cv_libgtest}" = "xno"],
 
43
    AC_MSG_ERROR([libgtest is required for ${PACKAGE}]))
 
44
])