diff mbox series

Fix portability issues in configure script

Message ID 20240409172735.1082-1-taaparthur@disroot.org (mailing list archive)
State New
Headers show
Series Fix portability issues in configure script | expand

Commit Message

Arthur Williams April 9, 2024, 5:27 p.m. UTC
The configure script failed on my setup because of the invalid printf
directive "%" and for use of the unportable "echo -e". These have been
replaced with more portable options.
---
 configure | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Ammar Faizi April 9, 2024, 5:37 p.m. UTC | #1
On Tue, Apr 09, 2024 at 10:27:35AM -0700, Arthur Williams wrote:
> The configure script failed on my setup because of the invalid printf
> directive "%" and for use of the unportable "echo -e". These have been
> replaced with more portable options.
> ---
>  configure | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

The patch is missing your Signed-off-by tag.
diff mbox series

Patch

diff --git a/configure b/configure
index 052920d..f6b590b 100755
--- a/configure
+++ b/configure
@@ -519,9 +519,9 @@  print_config "CXX" "$cxx"
 # generate io_uring_version.h
 # Reset MAKEFLAGS
 MAKEFLAGS=
-MAKE_PRINT_VARS="include Makefile.common\nprint-%: ; @echo \$(\$*)\n"
-VERSION_MAJOR=$(env echo -e "$MAKE_PRINT_VARS" | make -s --no-print-directory -f - print-VERSION_MAJOR)
-VERSION_MINOR=$(env echo -e "$MAKE_PRINT_VARS" | make -s --no-print-directory -f - print-VERSION_MINOR)
+MAKE_PRINT_VARS="include Makefile.common\nprint-%%: ; @echo \$(\$*)\n"
+VERSION_MAJOR=$(printf "$MAKE_PRINT_VARS" | make -s --no-print-directory -f - print-VERSION_MAJOR)
+VERSION_MINOR=$(printf "$MAKE_PRINT_VARS" | make -s --no-print-directory -f - print-VERSION_MINOR)
 io_uring_version_h="src/include/liburing/io_uring_version.h"
 cat > $io_uring_version_h << EOF
 /* SPDX-License-Identifier: MIT */