-
Notifications
You must be signed in to change notification settings - Fork 12
/
configure.ac
43 lines (35 loc) · 968 Bytes
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
dnl Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([configure.ac])
AC_CANONICAL_TARGET([])
AC_GNU_SOURCE
dnl For Automake
PACKAGE=protobuf-nginx
VERSION=1.1
dnl Initialize automake stuff
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AC_CONFIG_HEADERS([config.h])
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_LANG([C++])
dnl Look for protobuf headers and libs
AC_ARG_WITH(protobuf,
[ --with-protobuf[=DIR] where to find Google's Protocol Buffers],,
with_protobuf=yes)
if test "$with_protobuf" != no; then
if test -d "$with_protobuf"; then
CPPFLAGS="$CPPFLAGS -I$with_protobuf/include"
LDFLAGS="$LDFLAGS -L$with_protobuf/lib"
else
AC_CHECK_HEADER([google/protobuf/stubs/common.h],,
[AC_MSG_ERROR([protobuf headers are required. Try using the --with-protobuf
option.])])
fi
fi
AC_CONFIG_FILES([Makefile nginx/Makefile protongx/Makefile])
AC_OUTPUT
echo ""
echo "Configure finished!"
echo ""