michael@0: m4_include(m4/acx_pthread.m4) michael@0: michael@0: # At this point, the Xcode project assumes the version string will be three michael@0: # integers separated by periods and surrounded by square brackets (e.g. michael@0: # "[1.0.1]"). It also asumes that there won't be any closing parenthesis michael@0: # between "AC_INIT(" and the closing ")" including comments and strings. michael@0: AC_INIT([Google C++ Testing Framework], michael@0: [1.6.0], michael@0: [googletestframework@googlegroups.com], michael@0: [gtest]) michael@0: michael@0: # Provide various options to initialize the Autoconf and configure processes. michael@0: AC_PREREQ([2.59]) michael@0: AC_CONFIG_SRCDIR([./LICENSE]) michael@0: AC_CONFIG_MACRO_DIR([m4]) michael@0: AC_CONFIG_AUX_DIR([build-aux]) michael@0: AC_CONFIG_HEADERS([build-aux/config.h]) michael@0: AC_CONFIG_FILES([Makefile]) michael@0: AC_CONFIG_FILES([scripts/gtest-config], [chmod +x scripts/gtest-config]) michael@0: michael@0: # Initialize Automake with various options. We require at least v1.9, prevent michael@0: # pedantic complaints about package files, and enable various distribution michael@0: # targets. michael@0: AM_INIT_AUTOMAKE([1.9 dist-bzip2 dist-zip foreign subdir-objects]) michael@0: michael@0: # Check for programs used in building Google Test. michael@0: AC_PROG_CC michael@0: AC_PROG_CXX michael@0: AC_LANG([C++]) michael@0: AC_PROG_LIBTOOL michael@0: michael@0: # TODO(chandlerc@google.com): Currently we aren't running the Python tests michael@0: # against the interpreter detected by AM_PATH_PYTHON, and so we condition michael@0: # HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's michael@0: # version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env" michael@0: # hashbang. michael@0: PYTHON= # We *do not* allow the user to specify a python interpreter michael@0: AC_PATH_PROG([PYTHON],[python],[:]) michael@0: AS_IF([test "$PYTHON" != ":"], michael@0: [AM_PYTHON_CHECK_VERSION([$PYTHON],[2.3],[:],[PYTHON=":"])]) michael@0: AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != ":"]) michael@0: michael@0: # Configure pthreads. michael@0: AC_ARG_WITH([pthreads], michael@0: [AS_HELP_STRING([--with-pthreads], michael@0: [use pthreads (default is yes)])], michael@0: [with_pthreads=$withval], michael@0: [with_pthreads=check]) michael@0: michael@0: have_pthreads=no michael@0: AS_IF([test "x$with_pthreads" != "xno"], michael@0: [ACX_PTHREAD( michael@0: [], michael@0: [AS_IF([test "x$with_pthreads" != "xcheck"], michael@0: [AC_MSG_FAILURE( michael@0: [--with-pthreads was specified, but unable to be used])])]) michael@0: have_pthreads="$acx_pthread_ok"]) michael@0: AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" == "xyes"]) michael@0: AC_SUBST(PTHREAD_CFLAGS) michael@0: AC_SUBST(PTHREAD_LIBS) michael@0: michael@0: # TODO(chandlerc@google.com) Check for the necessary system headers. michael@0: michael@0: # TODO(chandlerc@google.com) Check the types, structures, and other compiler michael@0: # and architecture characteristics. michael@0: michael@0: # Output the generated files. No further autoconf macros may be used. michael@0: AC_OUTPUT