diff mbox series

[ovs-dev,2/3] m4: Replace obsolete AC_ERROR with AC_MSG_ERROR.

Message ID 20230816222627.3873712-3-i.maximets@ovn.org
State Accepted
Headers show
Series m4: Fix autoconf 2.70+ warnings. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Ilya Maximets Aug. 16, 2023, 10:26 p.m. UTC
AC_ERROR is triggering a warning on systems with autoconf 2.70+:

  $ ./boot.sh
  ...
  configure.ac:174: warning: The macro `AC_ERROR' is obsolete.
  configure.ac:174: You should run autoupdate.
  ...

Replace with AC_MSG_ERROR that is supported in all versions of
autoconf that we care about (2.63+).

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---
 acinclude.m4 | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/acinclude.m4 b/acinclude.m4
index 4198120bc..ad3ee9fdf 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -412,7 +412,7 @@  AC_DEFUN([OVN_CHECK_OVS], [
   fi
   OVSDIR=$(cd "$(eval echo "$with_ovs_source")"; pwd)
   if test ! -f "$OVSDIR/vswitchd/bridge.c"; then
-    AC_ERROR([$OVSDIR is not an OVS source directory])
+    AC_MSG_ERROR([$OVSDIR is not an OVS source directory])
   fi
 
   AC_MSG_RESULT([$OVSDIR])
@@ -426,13 +426,16 @@  AC_DEFUN([OVN_CHECK_OVS], [
       *) OVSBUILDDIR=`pwd`/$OVSBUILDDIR ;;
     esac
     if test ! -f "$OVSBUILDDIR/config.h"; then
-      AC_ERROR([$OVSBUILDDIR is not a configured OVS build directory])
+      AC_MSG_ERROR([$OVSBUILDDIR is not a configured OVS build directory])
     fi
   elif test -f "$OVSDIR/config.h"; then
     # If separate build dir is not specified, use src dir.
     OVSBUILDDIR=$OVSDIR
   else
-    AC_ERROR([OVS source dir $OVSDIR is not configured as a build directory (either run configure there or use --with-ovs-build to point to the build directory)])
+    AC_MSG_ERROR(m4_normalize([
+        OVS source dir $OVSDIR is not configured as a build directory
+        (either run configure there or use --with-ovs-build to point
+        to the build directory)]))
   fi
   AC_MSG_RESULT([$OVSBUILDDIR])
   AC_SUBST(OVSBUILDDIR)