AC_PROG_CC_C99([],
[AC_MSG_ERROR([No compiler found that supports C99])]
)
+
+AX_COMPILER_VENDOR
+
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_EGREP
AC_SUBST(BUILD_WITH_LIBDBI_LIBS)
# }}}
+# --with-libdpdk {{{
+AC_ARG_VAR([LIBDPDK_CPPFLAGS], [Preprocessor flags for libdpdk])
+AC_ARG_VAR([LIBDPDK_LDFLAGS], [Linker flags for libdpdk])
+
+AC_ARG_WITH([libdpdk], [AS_HELP_STRING([--without-libdpdk], [Disable libdpdk.])])
+
+if test "x$with_libdpdk" != "xno"; then
+ if test "x$LIBDPDK_CPPFLAGS" = "x"; then
+ LIBDPDK_CPPFLAGS="-I/usr/include/dpdk"
+ fi
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$LIBDPDK_CPPFLAGS $CPPFLAGS"
+ AC_CHECK_HEADERS([rte_config.h],
+ [
+ with_libdpdk="yes"
+ AC_PREPROC_IFELSE(
+ [
+ AC_LANG_SOURCE(
+ [[
+ #include <rte_version.h>
+ #if RTE_VERSION < RTE_VERSION_NUM(16,7,0,0)
+ #error "required DPDK >= 16.07"
+ #endif
+ ]]
+ )
+ ],
+ [dpdk_keepalive="yes"],
+ [dpdk_keepalive="no (DPDK version < 16.07)"]
+ )
+ ],
+ [with_libdpdk="no (rte_config.h not found)"]
+ )
+ CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+
+if test "x$with_libdpdk" = "xyes"; then
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LIBDPDK_LDFLAGS $LDFLAGS"
+ AC_CHECK_LIB([dpdk], [rte_eal_init],
+ [with_libdpdk="yes"],
+ [with_libdpdk="no (symbol 'rte_eal_init' not found)"]
+ )
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+
+# }}}
+
# --with-libesmtp {{{
AC_ARG_WITH([libesmtp],
[AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
AC_SUBST([BUILD_WITH_LIBIPTC_LDFLAGS])
# }}}
-# --with-libdpdk {{{
-AC_ARG_VAR([LIBDPDK_CPPFLAGS], [Preprocessor flags for libdpdk])
-AC_ARG_VAR([LIBDPDK_LDFLAGS], [Linker flags for libdpdk])
-
-AC_ARG_WITH([libdpdk], [AS_HELP_STRING([--without-libdpdk], [Disable libdpdk.])])
-
-if test "x$with_libdpdk" != "xno"; then
- if test "x$LIBDPDK_CPPFLAGS" = "x"; then
- LIBDPDK_CPPFLAGS="-I/usr/include/dpdk"
- fi
- SAVE_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$LIBDPDK_CPPFLAGS $CPPFLAGS"
- AC_CHECK_HEADERS([rte_config.h],
- [
- with_libdpdk="yes"
- AC_COMPILE_IFELSE(
- [
- AC_LANG_PROGRAM(
- [[
- #include <rte_version.h>
- #if RTE_VERSION < RTE_VERSION_NUM(16,7,0,0)
- #error "required DPDK >= 16.07"
- #endif
- ]],
- [[
- return 0;
- ]]
- )
- ],
- [dpdk_keepalive="yes"],
- [dpdk_keepalive="no (DPDK version < 16.07)"]
- )
- ],
- [with_libdpdk="no (rte_config.h not found)"]
- )
- CPPFLAGS="$SAVE_CPPFLAGS"
-fi
-
-if test "x$with_libdpdk" = "xyes"; then
- SAVE_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LIBDPDK_LDFLAGS $LDFLAGS"
- AC_CHECK_LIB([dpdk], [rte_eal_init],
- [with_libdpdk="yes"],
- [with_libdpdk="no (symbol 'rte_eal_init' not found)"]
- )
- LDFLAGS="$SAVE_LDFLAGS"
-fi
-
-# }}}
-
# --with-java {{{
with_java_home="$JAVA_HOME"
if test "x$with_java_home" = "x"; then
if test "x$with_libpqos" = "xyes"; then
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
- AC_RUN_IFELSE(
+ AC_PREPROC_IFELSE(
[
- AC_LANG_PROGRAM(
+ AC_LANG_SOURCE(
[[
#include <pqos.h>
- ]],
- [[
- return !(PQOS_VERSION >= 106)
+ #if PQOS_VERSION < 106
+ #error "required PQOS version >= 1.06"
+ #endif
]]
)
],
AC_MSG_RESULT([Configuration:])
AC_MSG_RESULT([ Build:])
AC_MSG_RESULT([ Platform . . . . . . $ac_system])
+AC_MSG_RESULT([ Compiler vendor . . . $ax_cv_c_compiler_vendor])
AC_MSG_RESULT([ CC . . . . . . . . . $CC])
AC_MSG_RESULT([ CFLAGS . . . . . . . $AM_CFLAGS $CFLAGS])
AC_MSG_RESULT([ CXXFLAGS . . . . . . $AM_CXXFLAGS $CXXFLAGS])