~oif-team/grail/saucy

« back to all changes in this revision

Viewing changes to m4/gtest.m4

  • Committer: Daniel d'Andrada
  • Date: 2012-12-06 18:29:01 UTC
  • mfrom: (250 trunk)
  • mto: This revision was merged to the branch mainline in revision 251.
  • Revision ID: daniel.dandrada@canonical.com-20121206182901-ocunhausxxqr1q34
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# serial 1
 
1
# serial 2
2
2
 
3
3
# Copyright (C) 2012 Canonical, Ltd.
4
4
#
40
40
 
41
41
  GTEST_CPPFLAGS="$GTEST_CPPFLAGS -I$GTEST_SOURCE"
42
42
 
43
 
  AC_CHECK_FILES([$GTEST_SOURCE/src/gtest-all.cc]
44
 
                 [$GTEST_SOURCE/src/gtest_main.cc],
45
 
                 [have_gtest=yes],
46
 
                 [have_gtest=no])
 
43
  AC_LANG_PUSH(C++)
 
44
  gtest_save_CPPFLAGS=$CPPFLAGS
 
45
  CPPFLAGS="$CPPFLAGS $GTEST_CPPFLAGS"
 
46
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "src/gtest-all.cc"]])],
 
47
                    [have_gtest=yes],
 
48
                    [have_gtest=no])
 
49
  AS_IF([test "x$have_gtest" = xyes],
 
50
        [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include "src/gtest_main.cc"]])],
 
51
                           [],
 
52
                           [have_gtest=no])])
 
53
  CPPFLAGS=$gtest_save_CPPFLAGS
 
54
  AC_LANG_POP(C++)
47
55
 
48
56
  AS_IF([test "x$have_gtest" = xyes],
49
57
        [GTEST_LIBS=-lpthread