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.
6 AC_DEFUN([_PANDORA_SEARCH_LIBGTEST],[
7 AC_REQUIRE([AC_LIB_PREFIX])
9 dnl --------------------------------------------------------------------
10 dnl Check for libgtest
11 dnl --------------------------------------------------------------------
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"])
19 AS_IF([test "x$ac_enable_libgtest" = "xyes"],[
21 AC_LIB_HAVE_LINKFLAGS(gtest,,[
22 #include <gtest/gtest.h>
23 TEST(pandora_test_libgtest, PandoraTest)
33 AM_CONDITIONAL(HAVE_LIBGTEST, [test "x${ac_cv_libgtest}" = "xyes"])
36 AC_DEFUN([PANDORA_HAVE_LIBGTEST],[
37 AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST])
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}]))