1## Process this file with autoconf to produce configure.
2## In general, the safest way to proceed is to run ./autogen.sh
3
4# make sure we're interpreted by some minimal autoconf
5AC_PREREQ(2.57)
6
7AC_INIT(polo, 0.1, opensource@google.com)
8
9SO_VERSION=0:0:0
10
11AC_ARG_WITH([gtest],
12  [AS_HELP_STRING([--with-gtest], [location of Google Test source])],
13  [GTEST_DIR=$withval])
14AC_SUBST([GTEST_DIR])
15
16AC_ARG_WITH([gmock],
17  [AS_HELP_STRING([--with-gmock], [location of Google Mock source])],
18  [GMOCK_DIR=$withval])
19AC_SUBST([GMOCK_DIR])
20
21# The argument here is just something that should be in the current directory
22# (for sanity checking)
23AC_CONFIG_SRCDIR(README)
24AC_CONFIG_MACRO_DIR([m4])
25AM_INIT_AUTOMAKE
26AM_CONFIG_HEADER(src/config.h)
27
28AC_LANG(C++)
29
30# Checks for programs.
31AC_PROG_CC
32AC_PROG_CPP
33AC_PROG_CXX
34AM_CONDITIONAL(GCC, test "$GCC" = yes)   # let the Makefile know if we're gcc
35
36# Check for required packages.
37PKG_CHECK_MODULES(PROTOBUF, protobuf)
38PKG_CHECK_MODULES(GLOG, libglog)
39PKG_CHECK_MODULES(SSL, libssl)
40PKG_CHECK_MODULES(CRYPTO, libcrypto)
41
42AC_PATH_PROG(PROTOC, protoc,
43             [AC_MSG_ERROR([protoc was not found in your path])])
44
45AC_PROG_LIBTOOL
46AC_SUBST(LIBTOOL_DEPS)
47AC_SUBST(SO_VERSION)
48
49# Check whether some low-level functions/files are available
50AC_HEADER_STDC
51
52# Write generated configuration file
53AC_CONFIG_FILES([Makefile polo.pc])
54AC_OUTPUT
55