Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /JETSCAPE/external_packages/googletest/googlemock/configure.ac is written in an unsupported language. File is not indexed.

0001 m4_include(../googletest/m4/acx_pthread.m4)
0002 
0003 AC_INIT([Google C++ Mocking Framework],
0004         [1.7.0],
0005         [googlemock@googlegroups.com],
0006         [gmock])
0007 
0008 # Provide various options to initialize the Autoconf and configure processes.
0009 AC_PREREQ([2.59])
0010 AC_CONFIG_SRCDIR([./LICENSE])
0011 AC_CONFIG_AUX_DIR([build-aux])
0012 AC_CONFIG_HEADERS([build-aux/config.h])
0013 AC_CONFIG_FILES([Makefile])
0014 AC_CONFIG_FILES([scripts/gmock-config], [chmod +x scripts/gmock-config])
0015 
0016 # Initialize Automake with various options. We require at least v1.9, prevent
0017 # pedantic complaints about package files, and enable various distribution
0018 # targets.
0019 AM_INIT_AUTOMAKE([1.9 dist-bzip2 dist-zip foreign subdir-objects])
0020 
0021 # Check for programs used in building Google Test.
0022 AC_PROG_CC
0023 AC_PROG_CXX
0024 AC_LANG([C++])
0025 AC_PROG_LIBTOOL
0026 
0027 # TODO(chandlerc@google.com): Currently we aren't running the Python tests
0028 # against the interpreter detected by AM_PATH_PYTHON, and so we condition
0029 # HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's
0030 # version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env"
0031 # hashbang.
0032 PYTHON=  # We *do not* allow the user to specify a python interpreter
0033 AC_PATH_PROG([PYTHON],[python],[:])
0034 AS_IF([test "$PYTHON" != ":"],
0035       [AM_PYTHON_CHECK_VERSION([$PYTHON],[2.3],[:],[PYTHON=":"])])
0036 AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != ":"])
0037 
0038 # TODO(chandlerc@google.com) Check for the necessary system headers.
0039 
0040 # Configure pthreads.
0041 AC_ARG_WITH([pthreads],
0042             [AS_HELP_STRING([--with-pthreads],
0043                [use pthreads (default is yes)])],
0044             [with_pthreads=$withval],
0045             [with_pthreads=check])
0046 
0047 have_pthreads=no
0048 AS_IF([test "x$with_pthreads" != "xno"],
0049       [ACX_PTHREAD(
0050         [],
0051         [AS_IF([test "x$with_pthreads" != "xcheck"],
0052                [AC_MSG_FAILURE(
0053                  [--with-pthreads was specified, but unable to be used])])])
0054        have_pthreads="$acx_pthread_ok"])
0055 AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" == "xyes"])
0056 AC_SUBST(PTHREAD_CFLAGS)
0057 AC_SUBST(PTHREAD_LIBS)
0058 
0059 # GoogleMock currently has hard dependencies upon GoogleTest above and beyond
0060 # running its own test suite, so we both provide our own version in
0061 # a subdirectory and provide some logic to use a custom version or a system
0062 # installed version.
0063 AC_ARG_WITH([gtest],
0064             [AS_HELP_STRING([--with-gtest],
0065                             [Specifies how to find the gtest package. If no
0066                             arguments are given, the default behavior, a
0067                             system installed gtest will be used if present,
0068                             and an internal version built otherwise. If a
0069                             path is provided, the gtest built or installed at
0070                             that prefix will be used.])],
0071             [],
0072             [with_gtest=yes])
0073 AC_ARG_ENABLE([external-gtest],
0074               [AS_HELP_STRING([--disable-external-gtest],
0075                               [Disables any detection or use of a system
0076                               installed or user provided gtest. Any option to
0077                               '--with-gtest' is ignored. (Default is enabled.)])
0078               ], [], [enable_external_gtest=yes])
0079 AS_IF([test "x$with_gtest" == "xno"],
0080       [AC_MSG_ERROR([dnl
0081 Support for GoogleTest was explicitly disabled. Currently GoogleMock has a hard
0082 dependency upon GoogleTest to build, please provide a version, or allow
0083 GoogleMock to use any installed version and fall back upon its internal
0084 version.])])
0085 
0086 # Setup various GTEST variables. TODO(chandlerc@google.com): When these are
0087 # used below, they should be used such that any pre-existing values always
0088 # trump values we set them to, so that they can be used to selectively override
0089 # details of the detection process.
0090 AC_ARG_VAR([GTEST_CONFIG],
0091            [The exact path of Google Test's 'gtest-config' script.])
0092 AC_ARG_VAR([GTEST_CPPFLAGS],
0093            [C-like preprocessor flags for Google Test.])
0094 AC_ARG_VAR([GTEST_CXXFLAGS],
0095            [C++ compile flags for Google Test.])
0096 AC_ARG_VAR([GTEST_LDFLAGS],
0097            [Linker path and option flags for Google Test.])
0098 AC_ARG_VAR([GTEST_LIBS],
0099            [Library linking flags for Google Test.])
0100 AC_ARG_VAR([GTEST_VERSION],
0101            [The version of Google Test available.])
0102 HAVE_BUILT_GTEST="no"
0103 
0104 GTEST_MIN_VERSION="1.7.0"
0105 
0106 AS_IF([test "x${enable_external_gtest}" = "xyes"],
0107       [# Begin filling in variables as we are able.
0108       AS_IF([test "x${with_gtest}" != "xyes"],
0109             [AS_IF([test -x "${with_gtest}/scripts/gtest-config"],
0110                    [GTEST_CONFIG="${with_gtest}/scripts/gtest-config"],
0111                    [GTEST_CONFIG="${with_gtest}/bin/gtest-config"])
0112             AS_IF([test -x "${GTEST_CONFIG}"], [],
0113                   [AC_MSG_ERROR([dnl
0114 Unable to locate either a built or installed Google Test at '${with_gtest}'.])
0115                   ])])
0116 
0117       AS_IF([test -x "${GTEST_CONFIG}"], [],
0118             [AC_PATH_PROG([GTEST_CONFIG], [gtest-config])])
0119       AS_IF([test -x "${GTEST_CONFIG}"],
0120             [AC_MSG_CHECKING([for Google Test version >= ${GTEST_MIN_VERSION}])
0121             AS_IF([${GTEST_CONFIG} --min-version=${GTEST_MIN_VERSION}],
0122                   [AC_MSG_RESULT([yes])
0123                   HAVE_BUILT_GTEST="yes"],
0124                   [AC_MSG_RESULT([no])])])])
0125 
0126 AS_IF([test "x${HAVE_BUILT_GTEST}" = "xyes"],
0127       [GTEST_CPPFLAGS=`${GTEST_CONFIG} --cppflags`
0128       GTEST_CXXFLAGS=`${GTEST_CONFIG} --cxxflags`
0129       GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags`
0130       GTEST_LIBS=`${GTEST_CONFIG} --libs`
0131       GTEST_VERSION=`${GTEST_CONFIG} --version`],
0132       [AC_CONFIG_SUBDIRS([../googletest])
0133       # GTEST_CONFIG needs to be executable both in a Makefile environmont and
0134       # in a shell script environment, so resolve an absolute path for it here.
0135       GTEST_CONFIG="`pwd -P`/../googletest/scripts/gtest-config"
0136       GTEST_CPPFLAGS='-I$(top_srcdir)/../googletest/include'
0137       GTEST_CXXFLAGS='-g'
0138       GTEST_LDFLAGS=''
0139       GTEST_LIBS='$(top_builddir)/../googletest/lib/libgtest.la'
0140       GTEST_VERSION="${GTEST_MIN_VERSION}"])
0141 
0142 # TODO(chandlerc@google.com) Check the types, structures, and other compiler
0143 # and architecture characteristics.
0144 
0145 # Output the generated files. No further autoconf macros may be used.
0146 AC_OUTPUT