X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=m4%2Fopenvswitch.m4;h=6dda3508c22abcc6c2aeb7b48e590372aed09923;hb=f981c8b0da9c8efec309064367e36338518eba15;hp=d3e9f9f0ed53cfc0ca78ff814bfc26df9d5d697e;hpb=4c1eabc12300be3190d2fb66edc07d9c607f539e;p=openvswitch diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 index d3e9f9f0..6dda3508 100644 --- a/m4/openvswitch.m4 +++ b/m4/openvswitch.m4 @@ -60,30 +60,34 @@ AC_DEFUN([OVS_CHECK_NETLINK], [Define to 1 if Netlink protocol is available.]) fi]) -dnl Checks for OpenSSL, if --enable-ssl is passed in. +dnl Checks for OpenSSL. AC_DEFUN([OVS_CHECK_OPENSSL], [AC_ARG_ENABLE( [ssl], - [AC_HELP_STRING([--enable-ssl], - [Enable ssl support (requires libssl)])], + [AC_HELP_STRING([--disable-ssl], [Disable OpenSSL support])], [case "${enableval}" in (yes) ssl=true ;; (no) ssl=false ;; (*) AC_MSG_ERROR([bad value ${enableval} for --enable-ssl]) ;; esac], - [ssl=false]) + [ssl=check]) - if test "$ssl" = true; then + if test "$ssl" != false; then dnl Make sure that pkg-config is installed. m4_pattern_forbid([PKG_CHECK_MODULES]) - PKG_CHECK_MODULES([SSL], [libssl], + PKG_CHECK_MODULES([SSL], [openssl], [HAVE_OPENSSL=yes], [HAVE_OPENSSL=no - AC_MSG_WARN([Cannot find libssl: + if test "$ssl" = check; then + AC_MSG_WARN([Cannot find openssl: $SSL_PKG_ERRORS -OpenFlow connections over SSL will not be supported.])]) +OpenFlow connections over SSL will not be supported. +(You may use --disable-ssl to suppress this warning.)]) + else + AC_MSG_ERROR([Cannot find openssl (use --disable-ssl to configure without SSL support)]) + fi]) else HAVE_OPENSSL=no fi @@ -194,7 +198,7 @@ AC_DEFUN([OVS_CHECK_DOT], [for dot], [ovs_cv_dot], [dnl "dot" writes -V output to stderr: - if (dot -V) 2>&1 | grep '^dot - [gG]raphviz version' >/dev/null 2>&1; then + if (dot -V) 2>&1 | grep '^dot - [[gG]]raphviz version' >/dev/null 2>&1; then ovs_cv_dot=yes else ovs_cv_dot=no @@ -344,4 +348,6 @@ AC_DEFUN([OVS_CHECK_LINKER_SECTIONS], into sections with user-defined names and the linker automatically defines __start_SECNAME and __stop_SECNAME symbols that designate the start and end of the section.]) - fi]) + fi + AM_CONDITIONAL( + [USE_LINKER_SECTIONS], [test $ovs_cv_use_linker_sections = yes])])