# -*- autoconf -*-
-# Copyright (c) 2008, 2009 Nicira Networks.
+# Copyright (c) 2008, 2009, 2010 Nicira Networks.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
[AC_HELP_STRING([--enable-coverage],
[Enable gcov coverage tool.])],
[case "${enableval}" in
- (lcov) coverage=true lcov=true ;;
- (yes) coverage=true lcov=false ;;
- (no) coverage=false lcov=false ;;
+ (lcov|yes) coverage=true ;;
+ (no) coverage=false ;;
(*) AC_MSG_ERROR([bad value ${enableval} for --enable-coverage]) ;;
esac],
- [coverage=false lcov=false])
+ [coverage=false])
if $coverage; then
CFLAGS="$CFLAGS -O0 --coverage"
LDFLAGS="$LDFLAGS --coverage"
- fi
- if $lcov; then
- if lcov --version >/dev/null 2>&1; then :; else
- AC_MSG_ERROR([--enable-coverage=lcov was specified but lcov is not in \$PATH])
- fi
- fi
- AC_SUBST([LCOV], [$lcov])])
+ fi])
dnl Checks for --enable-ndebug and defines NDEBUG if it is specified.
AC_DEFUN([OVS_CHECK_NDEBUG],
[ssl=false])
if test "$ssl" = true; then
- dnl Make sure that pkg-config is installed.
- m4_pattern_forbid([PKG_CHECK_MODULES])
- PKG_CHECK_MODULES([SSL], [libssl],
- [HAVE_OPENSSL=yes],
- [HAVE_OPENSSL=no
- AC_MSG_WARN([Cannot find libssl:
+ dnl Make sure that pkg-config is installed.
+ m4_pattern_forbid([PKG_CHECK_MODULES])
+ PKG_CHECK_MODULES([SSL], [libssl],
+ [HAVE_OPENSSL=yes],
+ [HAVE_OPENSSL=no
+ AC_MSG_WARN([Cannot find libssl:
- $SSL_PKG_ERRORS
-
- OpenFlow connections over SSL will not be supported.])])
+$SSL_PKG_ERRORS
+OpenFlow connections over SSL will not be supported.])])
+ else
+ HAVE_OPENSSL=no
fi
+ AC_SUBST([HAVE_OPENSSL])
AM_CONDITIONAL([HAVE_OPENSSL], [test "$HAVE_OPENSSL" = yes])
if test "$HAVE_OPENSSL" = yes; then
AC_DEFINE([HAVE_OPENSSL], [1], [Define to 1 if OpenSSL is installed.])
done
done
fi])
+ AC_SUBST([HAVE_PYTHON])
AM_MISSING_PROG([PYTHON], [python])
if test $ovs_cv_python != no; then
PYTHON=$ovs_cv_python
- fi])
+ HAVE_PYTHON=yes
+ else
+ HAVE_PYTHON=no
+ fi
+ AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])