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