projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rework and simplify the "lcov" support for the testsuite.
[openvswitch]
/
m4
/
openvswitch.m4
diff --git
a/m4/openvswitch.m4
b/m4/openvswitch.m4
index b7267438c97127448cea3506ff7505003fea5fd1..7b827e70d9175547fe70e5ce7b93ccb5da1950e4 100644
(file)
--- a/
m4/openvswitch.m4
+++ b/
m4/openvswitch.m4
@@
-1,6
+1,6
@@
# -*- autoconf -*-
# -*- 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.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@
-22,22
+22,15
@@
AC_DEFUN([OVS_CHECK_COVERAGE],
[AC_HELP_STRING([--enable-coverage],
[Enable gcov coverage tool.])],
[case "${enableval}" in
[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],
(*) 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"
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],
dnl Checks for --enable-ndebug and defines NDEBUG if it is specified.
AC_DEFUN([OVS_CHECK_NDEBUG],
@@
-81,28
+74,25
@@
AC_DEFUN([OVS_CHECK_OPENSSL],
[ssl=false])
if test "$ssl" = true; then
[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:
-
- $SSL_PKG_ERRORS
+ 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:
- OpenFlow connections over SSL will not be supported.])])
+$SSL_PKG_ERRORS
+OpenFlow connections over SSL will not be supported.])])
+ else
+ HAVE_OPENSSL=no
fi
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.])
fi])
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.])
fi])
-dnl Checks for libraries needed by lib/fault.c.
-AC_DEFUN([OVS_CHECK_FAULT_LIBS],
- [AC_CHECK_LIB([dl], [dladdr], [FAULT_LIBS=-ldl])
- AC_SUBST([FAULT_LIBS])])
-
dnl Checks for libraries needed by lib/socket-util.c.
AC_DEFUN([OVS_CHECK_SOCKET_LIBS],
[AC_CHECK_LIB([socket], [connect])
dnl Checks for libraries needed by lib/socket-util.c.
AC_DEFUN([OVS_CHECK_SOCKET_LIBS],
[AC_CHECK_LIB([socket], [connect])
@@
-236,8
+226,7
@@
AC_DEFUN([OVS_CHECK_PCRE],
dnl Checks for Python 2.x, x >= 4.
AC_DEFUN([OVS_CHECK_PYTHON],
dnl Checks for Python 2.x, x >= 4.
AC_DEFUN([OVS_CHECK_PYTHON],
- [AC_ARG_VAR([PYTHON], [path to Python 2.x])
- AC_CACHE_CHECK(
+ [AC_CACHE_CHECK(
[for Python 2.x for x >= 4],
[ovs_cv_python],
[if test -n "$PYTHON"; then
[for Python 2.x for x >= 4],
[ovs_cv_python],
[if test -n "$PYTHON"; then
@@
-260,4
+249,12
@@
else:
done
done
fi])
done
done
fi])
- PYTHON=$ovs_cv_python])
+ AC_SUBST([HAVE_PYTHON])
+ AM_MISSING_PROG([PYTHON], [python])
+ if test $ovs_cv_python != no; then
+ PYTHON=$ovs_cv_python
+ HAVE_PYTHON=yes
+ else
+ HAVE_PYTHON=no
+ fi
+ AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])