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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
dnl Process this file with autoconf to produce a configure script.
#CXXFLAGS='-O2 -std=c++0x'
#if test -z $CXXFLAGS; then
#fi
dnl Boilerplate
AC_INIT(ccbuild, 2.0.6)
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(src/ccbuild.cc)
AM_INIT_AUTOMAKE
AC_LANG([C++]) #Thanks Jesse.
AX_CXX_COMPILE_STDCXX_11() #Bobcat requires this
AC_PROG_CXX
AC_PROG_CXXCPP
#TODO Use the result of STDCXX_0X to check wether this is needed
CXXFLAGS="$CXXFLAGS -std=c++11"
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT8_T
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_HEADER_STDC
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_STAT
AC_CHECK_FUNCS([getcwd memset mkdir])
AM_PROG_LEX
if ! test "y$LEX" = "yflex"; then
if ! test "y$LEX" = "ylex"; then
AC_MSG_FAILURE([*** flex or lex required])
fi
fi
PKG_CHECK_MODULES(DEPS, gnutls >= 1.4.4)
#AC_SUBST(DEPS_CFLAGS)
#AC_SUBST(DEPS_LIBS + " -lgnutls-openssl")
#Use ccbuild to generate a list of headers we use. This depends on ccbuild >= 2.0.0
globalHeaders="esyscmd(ccbuild -C src --verbose deps ccbuild.cc|tail -n1|sed -r -e 's/(boost[^ ]+|gnutls[^ ]+)//g' | egrep -v bobcat)"
AC_CHECK_HEADERS($globalHeaders,,AC_MSG_ERROR([Required header file missing.]))
dnl Check for openssl
#PKG_CHECK_MODULES(DEPS, openssl >= 0.9.0)
#AC_SUBST(DEPS_CFLAGS)
#AC_SUBST(DEPS_LIBS)
#AX_BOOST_BASE([1.37])
#Calls AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
AC_OUTPUT(Makefile)
|