17c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet## Process this file with autoconf to produce configure.
27c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet## In general, the safest way to proceed is to run ./autogen.sh
37c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet
47c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet# make sure we're interpreted by some minimal autoconf
57c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_PREREQ(2.57)
67c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet
77c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_INIT(polo, 0.1, opensource@google.com)
87c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet
97c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetSO_VERSION=0:0:0
107c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet
117c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_ARG_WITH([gtest],
127c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet  [AS_HELP_STRING([--with-gtest], [location of Google Test source])],
137c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet  [GTEST_DIR=$withval])
147c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_SUBST([GTEST_DIR])
157c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet
167c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_ARG_WITH([gmock],
177c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet  [AS_HELP_STRING([--with-gmock], [location of Google Mock source])],
187c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet  [GMOCK_DIR=$withval])
197c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_SUBST([GMOCK_DIR])
207c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet
217c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet# The argument here is just something that should be in the current directory
227c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet# (for sanity checking)
237c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_CONFIG_SRCDIR(README)
247c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_CONFIG_MACRO_DIR([m4])
257c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAM_INIT_AUTOMAKE
267c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAM_CONFIG_HEADER(src/config.h)
277c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet
287c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_LANG(C++)
297c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet
307c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet# Checks for programs.
317c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_PROG_CC
327c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_PROG_CPP
337c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_PROG_CXX
347c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAM_CONDITIONAL(GCC, test "$GCC" = yes)   # let the Makefile know if we're gcc
357c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet
367c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet# Check for required packages.
377c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetPKG_CHECK_MODULES(PROTOBUF, protobuf)
387c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetPKG_CHECK_MODULES(GLOG, libglog)
397c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetPKG_CHECK_MODULES(SSL, libssl)
407c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetPKG_CHECK_MODULES(CRYPTO, libcrypto)
417c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet
427c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_PATH_PROG(PROTOC, protoc,
437c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet             [AC_MSG_ERROR([protoc was not found in your path])])
447c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet
457c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_PROG_LIBTOOL
467c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_SUBST(LIBTOOL_DEPS)
477c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_SUBST(SO_VERSION)
487c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet
497c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet# Check whether some low-level functions/files are available
507c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_HEADER_STDC
517c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet
527c9978567a202d6aa98beac5da5e1b3b34792862Jerome Poichet# Write generated configuration file
537c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_CONFIG_FILES([Makefile polo.pc])
547c9978567a202d6aa98beac5da5e1b3b34792862Jerome PoichetAC_OUTPUT
55