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