]> git.feebdaed.xyz Git - 0xmirror/xdp-tools.git/commitdiff
configure: Also capture stderr from emacs output
authorToke Høiland-Jørgensen <toke@redhat.com>
Fri, 7 Mar 2025 10:55:05 +0000 (11:55 +0100)
committerToke Høiland-Jørgensen <toke@redhat.com>
Fri, 7 Mar 2025 10:55:05 +0000 (11:55 +0100)
The emacs major version output can go to stderr, so make sure to capture
that as well when getting the version.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
configure

index 20fc084d767b9b64b9ef4c8a06d8cd853dde2393..6a575284d99be9eda2cb524acf06b510913930b2 100755 (executable)
--- a/configure
+++ b/configure
@@ -96,8 +96,8 @@ check_toolchain()
     if ! command -v $EMACS >/dev/null 2>&1; then
         EMACS=""
     else
-        emacs_major=$($EMACS -Q --batch --eval='(message "%s" emacs-major-version)')
-        if [ "$emacs_major" -ge 26 ]; then
+        emacs_major=$($EMACS -Q --batch --eval='(message "%s" emacs-major-version)' 2>&1)
+        if [ -n "$emacs_major" ] && [ "$emacs_major" -ge 26 ]; then
             echo "using emacs: $EMACS, version $emacs_major"
         else
             echo "not using emacs: $EMACS, as it is too old (wanted version >=26, got $emacs_major)"