You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.5 KiB

  1. m4_include(m4/acx_pthread.m4)
  2. # At this point, the Xcode project assumes the version string will be three
  3. # integers separated by periods and surrounded by square brackets (e.g.
  4. # "[1.0.1]"). It also asumes that there won't be any closing parenthesis
  5. # between "AC_INIT(" and the closing ")" including comments and strings.
  6. AC_INIT([Google C++ Testing Framework],
  7. [1.7.0],
  8. [googletestframework@googlegroups.com],
  9. [gtest])
  10. # Provide various options to initialize the Autoconf and configure processes.
  11. AC_PREREQ([2.59])
  12. AC_CONFIG_SRCDIR([./LICENSE])
  13. AC_CONFIG_MACRO_DIR([m4])
  14. AC_CONFIG_AUX_DIR([build-aux])
  15. AC_CONFIG_HEADERS([build-aux/config.h])
  16. AC_CONFIG_FILES([Makefile])
  17. AC_CONFIG_FILES([scripts/gtest-config], [chmod +x scripts/gtest-config])
  18. # Initialize Automake with various options. We require at least v1.9, prevent
  19. # pedantic complaints about package files, and enable various distribution
  20. # targets.
  21. AM_INIT_AUTOMAKE([1.9 dist-bzip2 dist-zip foreign subdir-objects])
  22. # Check for programs used in building Google Test.
  23. AC_PROG_CC
  24. AC_PROG_CXX
  25. AC_LANG([C++])
  26. AC_PROG_LIBTOOL
  27. # TODO(chandlerc@google.com): Currently we aren't running the Python tests
  28. # against the interpreter detected by AM_PATH_PYTHON, and so we condition
  29. # HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's
  30. # version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env"
  31. # hashbang.
  32. PYTHON= # We *do not* allow the user to specify a python interpreter
  33. AC_PATH_PROG([PYTHON],[python],[:])
  34. AS_IF([test "$PYTHON" != ":"],
  35. [AM_PYTHON_CHECK_VERSION([$PYTHON],[2.3],[:],[PYTHON=":"])])
  36. AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != ":"])
  37. # Configure pthreads.
  38. AC_ARG_WITH([pthreads],
  39. [AS_HELP_STRING([--with-pthreads],
  40. [use pthreads (default is yes)])],
  41. [with_pthreads=$withval],
  42. [with_pthreads=check])
  43. have_pthreads=no
  44. AS_IF([test "x$with_pthreads" != "xno"],
  45. [ACX_PTHREAD(
  46. [],
  47. [AS_IF([test "x$with_pthreads" != "xcheck"],
  48. [AC_MSG_FAILURE(
  49. [--with-pthreads was specified, but unable to be used])])])
  50. have_pthreads="$acx_pthread_ok"])
  51. AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" = "xyes"])
  52. AC_SUBST(PTHREAD_CFLAGS)
  53. AC_SUBST(PTHREAD_LIBS)
  54. # TODO(chandlerc@google.com) Check for the necessary system headers.
  55. # TODO(chandlerc@google.com) Check the types, structures, and other compiler
  56. # and architecture characteristics.
  57. # Output the generated files. No further autoconf macros may be used.
  58. AC_OUTPUT