2013-11-16 18:00:53 -05:00
|
|
|
AC_PREREQ(2.60)
|
|
|
|
AC_INIT([protobuf-c], [0.16])
|
|
|
|
AC_CONFIG_SRCDIR([protobuf-c/protobuf-c.c])
|
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
|
|
|
AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules subdir-objects])
|
|
|
|
AC_PROG_CC_STDC
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
AM_SILENT_RULES([yes])
|
|
|
|
LT_INIT
|
|
|
|
|
|
|
|
AC_CONFIG_HEADERS(config.h)
|
2013-12-14 14:11:08 -05:00
|
|
|
AC_CONFIG_FILES([Makefile protobuf-c/libprotobuf-c.pc])
|
2013-11-16 18:00:53 -05:00
|
|
|
|
|
|
|
PKG_PROG_PKG_CONFIG
|
|
|
|
if test -n "$PKG_CONFIG"; then
|
|
|
|
# Horrible hack for systems where the pkg-config install directory is simply wrong!
|
|
|
|
if $PKG_CONFIG --variable=pc_path pkg-config 2>/dev/null | grep -q /libdata/; then
|
|
|
|
PKG_INSTALLDIR(['${prefix}/libdata/pkgconfig'])
|
|
|
|
else
|
|
|
|
PKG_INSTALLDIR
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([pkg-config is required!])
|
|
|
|
fi
|
|
|
|
|
2013-11-18 14:16:39 -05:00
|
|
|
PKG_CHECK_MODULES([protobuf], [protobuf])
|
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
AC_PATH_PROG(PROTOC, protoc)
|
2014-01-11 15:04:30 -05:00
|
|
|
if test -z "$PROTOC"; then
|
|
|
|
AC_MSG_ERROR([Please install the protobuf compiler from https://code.google.com/p/protobuf/.])
|
|
|
|
fi
|
2013-11-16 18:00:53 -05:00
|
|
|
|
2013-11-21 17:12:00 -05:00
|
|
|
AC_C_BIGENDIAN
|
2013-11-16 18:00:53 -05:00
|
|
|
|
|
|
|
AC_OUTPUT
|
|
|
|
AC_MSG_RESULT([
|
|
|
|
$PACKAGE $VERSION
|
|
|
|
|
2013-11-18 13:59:17 -05:00
|
|
|
CC: ${CC}
|
|
|
|
CFLAGS: ${CFLAGS}
|
|
|
|
CXX: ${CXX}
|
|
|
|
CXXFLAGS: ${CXXFLAGS}
|
|
|
|
LDFLAGS: ${LDFLAGS}
|
|
|
|
LIBS: ${LIBS}
|
2013-11-16 18:00:53 -05:00
|
|
|
|
|
|
|
prefix: ${prefix}
|
|
|
|
sysconfdir: ${sysconfdir}
|
|
|
|
libdir: ${libdir}
|
|
|
|
includedir: ${includedir}
|
|
|
|
pkgconfigdir: ${pkgconfigdir}
|
|
|
|
|
|
|
|
bigendian: ${ac_cv_c_bigendian}
|
2013-11-18 14:32:31 -05:00
|
|
|
protobuf version: $($PROTOC --version)
|
2013-11-16 18:00:53 -05:00
|
|
|
])
|