From 03d1c08902cb008d8ac66be20773ac90c4cc1608 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Thu, 22 Feb 2024 09:25:07 +0100 Subject: [PATCH 1/6] Prevent 'checking for LDLIBRARY' and 'checking for HOSTRUNNER' from overlapping --- configure | 9 ++++----- configure.ac | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/configure b/configure index a08fc1ca12e895..8612fb6ab2bfe5 100755 --- a/configure +++ b/configure @@ -7386,11 +7386,15 @@ else # shared is disabled ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5 +printf "%s\n" "$LDLIBRARY" >&6; } if test "$cross_compiling" = yes; then RUNSHARED= fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HOSTRUNNER" >&5 +printf %s "checking HOSTRUNNER... " >&6; } if test -z "$HOSTRUNNER" then @@ -7574,8 +7578,6 @@ fi esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HOSTRUNNER" >&5 -printf %s "checking HOSTRUNNER... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HOSTRUNNER" >&5 printf "%s\n" "$HOSTRUNNER" >&6; } @@ -7583,9 +7585,6 @@ if test -n "$HOSTRUNNER"; then PYTHON_FOR_BUILD="_PYTHON_HOSTRUNNER='$HOSTRUNNER' $PYTHON_FOR_BUILD" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5 -printf "%s\n" "$LDLIBRARY" >&6; } - # LIBRARY_DEPS, LINK_PYTHON_OBJS and LINK_PYTHON_DEPS variable case $ac_sys_system/$ac_sys_emscripten_target in #( Emscripten/browser*) : diff --git a/configure.ac b/configure.ac index ac26486144515b..5b1f640baab0bd 100644 --- a/configure.ac +++ b/configure.ac @@ -1415,11 +1415,13 @@ else # shared is disabled ;; esac fi +AC_MSG_RESULT([$LDLIBRARY]) if test "$cross_compiling" = yes; then RUNSHARED= fi +AC_MSG_CHECKING([HOSTRUNNER]) AC_ARG_VAR([HOSTRUNNER], [Program to run CPython for the host platform]) if test -z "$HOSTRUNNER" then @@ -1465,7 +1467,6 @@ then ) fi AC_SUBST([HOSTRUNNER]) -AC_MSG_CHECKING([HOSTRUNNER]) AC_MSG_RESULT([$HOSTRUNNER]) if test -n "$HOSTRUNNER"; then @@ -1473,8 +1474,6 @@ if test -n "$HOSTRUNNER"; then PYTHON_FOR_BUILD="_PYTHON_HOSTRUNNER='$HOSTRUNNER' $PYTHON_FOR_BUILD" fi -AC_MSG_RESULT([$LDLIBRARY]) - # LIBRARY_DEPS, LINK_PYTHON_OBJS and LINK_PYTHON_DEPS variable AS_CASE([$ac_sys_system/$ac_sys_emscripten_target], [Emscripten/browser*], [LIBRARY_DEPS='$(PY3LIBRARY) $(WASM_STDLIB) python.html python.worker.js'], From 6ee0936561bc6366601066f7c3bba2bd7b117b26 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Thu, 22 Feb 2024 09:34:21 +0100 Subject: [PATCH 2/6] Improve ipv6 library check --- configure | 10 ++++++---- configure.ac | 5 +++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 8612fb6ab2bfe5..a501170097e572 100755 --- a/configure +++ b/configure @@ -16749,17 +16749,19 @@ rm -rf conftest* printf "%s\n" "$ipv6type" >&6; } fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 library" >&5 +printf %s "checking ipv6 library... " >&6; } if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using lib$ipv6lib" >&5 -printf "%s\n" "$as_me: using lib$ipv6lib" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: lib$ipv6lib" >&5 +printf "%s\n" "lib$ipv6lib" >&6; } else if test "x$ipv6trylibc" = xyes then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using libc" >&5 -printf "%s\n" "$as_me: using libc" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libc" >&5 +printf "%s\n" "libc" >&6; } else $as_nop diff --git a/configure.ac b/configure.ac index 5b1f640baab0bd..8ba02b7df3fcf1 100644 --- a/configure.ac +++ b/configure.ac @@ -4522,13 +4522,14 @@ yes AC_MSG_RESULT([$ipv6type]) fi +AC_MSG_CHECKING([ipv6 library]) if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" - AC_MSG_NOTICE([using lib$ipv6lib]) + AC_MSG_RESULT([lib$ipv6lib]) else AS_VAR_IF([ipv6trylibc], [yes], [ - AC_MSG_NOTICE([using libc]) + AC_MSG_RESULT([libc]) ], [ AC_MSG_ERROR([m4_normalize([ No $ipv6lib library found; cannot continue. From fb89294dd48554d3244dc9d66eed2d94a2c5e1a0 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Thu, 22 Feb 2024 09:53:14 +0100 Subject: [PATCH 3/6] Only print the ipv6 lib check if ipv6 is enabled --- configure | 31 +++++++++++++++++++++---------- configure.ac | 34 ++++++++++++++++++---------------- 2 files changed, 39 insertions(+), 26 deletions(-) diff --git a/configure b/configure index a501170097e572..32f633b3d5f92d 100755 --- a/configure +++ b/configure @@ -16749,26 +16749,37 @@ rm -rf conftest* printf "%s\n" "$ipv6type" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 library" >&5 +if test "x$ipv6" = xyes +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 library" >&5 printf %s "checking ipv6 library... " >&6; } -if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then - if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then - LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: lib$ipv6lib" >&5 + if test "x$ipv6lib" = xnone +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 +printf "%s\n" "none" >&6; } +else $as_nop + + if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then + LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: lib$ipv6lib" >&5 printf "%s\n" "lib$ipv6lib" >&6; } - else - if test "x$ipv6trylibc" = xyes + else + if test "x$ipv6trylibc" = xyes then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libc" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libc" >&5 printf "%s\n" "libc" >&6; } else $as_nop - as_fn_error $? "No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand." "$LINENO" 5 + as_fn_error $? "No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand." "$LINENO" 5 fi - fi + fi + +fi + fi diff --git a/configure.ac b/configure.ac index 8ba02b7df3fcf1..26f2a124dc85a7 100644 --- a/configure.ac +++ b/configure.ac @@ -4522,23 +4522,25 @@ yes AC_MSG_RESULT([$ipv6type]) fi -AC_MSG_CHECKING([ipv6 library]) -if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then - if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then - LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" - AC_MSG_RESULT([lib$ipv6lib]) - else - AS_VAR_IF([ipv6trylibc], [yes], [ - AC_MSG_RESULT([libc]) - ], [ - AC_MSG_ERROR([m4_normalize([ - No $ipv6lib library found; cannot continue. - You need to fetch lib$ipv6lib.a from appropriate - ipv6 kit and compile beforehand. - ])]) +AS_VAR_IF([ipv6], [yes], [ + AC_MSG_CHECKING([ipv6 library]) + AS_VAR_IF([ipv6lib], [none], [AC_MSG_RESULT([none])], [ + if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then + LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" + AC_MSG_RESULT([lib$ipv6lib]) + else + AS_VAR_IF([ipv6trylibc], [yes], [ + AC_MSG_RESULT([libc]) + ], [ + AC_MSG_ERROR([m4_normalize([ + No $ipv6lib library found; cannot continue. + You need to fetch lib$ipv6lib.a from appropriate + ipv6 kit and compile beforehand. + ])]) + ]) + fi ]) - fi -fi +]) AC_CACHE_CHECK([CAN_RAW_FD_FRAMES], [ac_cv_can_raw_fd_frames], [ From 92f1d3371fc231339eaf985253796a44d2925af0 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Thu, 22 Feb 2024 10:01:42 +0100 Subject: [PATCH 4/6] Error if ipv6 library was not found --- configure | 30 ++++++++++++------------------ configure.ac | 29 ++++++++++++++--------------- 2 files changed, 26 insertions(+), 33 deletions(-) diff --git a/configure b/configure index 32f633b3d5f92d..839ce57a8c689e 100755 --- a/configure +++ b/configure @@ -16752,33 +16752,27 @@ fi if test "x$ipv6" = xyes then : + noipv6found=No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 library" >&5 printf %s "checking ipv6 library... " >&6; } if test "x$ipv6lib" = xnone then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } -else $as_nop - - if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then - LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: lib$ipv6lib" >&5 + as_fn_error $? "$noipv6found" "$LINENO" 5 +fi + if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then + LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: lib$ipv6lib" >&5 printf "%s\n" "lib$ipv6lib" >&6; } - else - if test "x$ipv6trylibc" = xyes + else + if test "x$ipv6trylibc" = xyes then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libc" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libc" >&5 printf "%s\n" "libc" >&6; } - else $as_nop - - as_fn_error $? "No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand." "$LINENO" 5 - -fi - fi - + as_fn_error $? "$noipv6found" "$LINENO" 5 fi + fi + { noipv6found=; unset noipv6found;} fi diff --git a/configure.ac b/configure.ac index 26f2a124dc85a7..e0ac5fd6039564 100644 --- a/configure.ac +++ b/configure.ac @@ -4523,23 +4523,22 @@ yes fi AS_VAR_IF([ipv6], [yes], [ - AC_MSG_CHECKING([ipv6 library]) - AS_VAR_IF([ipv6lib], [none], [AC_MSG_RESULT([none])], [ - if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then - LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" - AC_MSG_RESULT([lib$ipv6lib]) - else - AS_VAR_IF([ipv6trylibc], [yes], [ - AC_MSG_RESULT([libc]) - ], [ - AC_MSG_ERROR([m4_normalize([ + AS_VAR_SET([noipv6found], + [m4_normalize([ No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate - ipv6 kit and compile beforehand. - ])]) - ]) - fi - ]) + ipv6 kit and compile beforehand.])]) + AC_MSG_CHECKING([ipv6 library]) + AS_VAR_IF([ipv6lib], [none], [AC_MSG_ERROR([$noipv6found])]) + if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then + LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" + AC_MSG_RESULT([lib$ipv6lib]) + else + AS_VAR_IF([ipv6trylibc], [yes], + [AC_MSG_RESULT([libc])], + [AC_MSG_ERROR([$noipv6found])]) + fi + AS_UNSET([noipv6found]) ]) From 4b3cd49f1e2d8f365c4e473447331ea093ee50d5 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Thu, 22 Feb 2024 10:10:55 +0100 Subject: [PATCH 5/6] Quote it, because it is nicer --- configure | 2 +- configure.ac | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 098e1a4faad0fa..b96138a539e2f2 100755 --- a/configure +++ b/configure @@ -16756,7 +16756,7 @@ fi if test "x$ipv6" = xyes then : - noipv6found=No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand. + noipv6found="No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand." { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 library" >&5 printf %s "checking ipv6 library... " >&6; } if test "x$ipv6lib" = xnone diff --git a/configure.ac b/configure.ac index 5faf6387571033..c1697018925e8a 100644 --- a/configure.ac +++ b/configure.ac @@ -4523,9 +4523,9 @@ fi AS_VAR_IF([ipv6], [yes], [ AS_VAR_SET([noipv6found], [m4_normalize([ - No $ipv6lib library found; cannot continue. + "No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate - ipv6 kit and compile beforehand.])]) + ipv6 kit and compile beforehand."])]) AC_MSG_CHECKING([ipv6 library]) AS_VAR_IF([ipv6lib], [none], [AC_MSG_ERROR([$noipv6found])]) if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then From abc1a0132608ce4503f5c49b69027f859d285e2b Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Thu, 22 Feb 2024 10:21:23 +0100 Subject: [PATCH 6/6] Revert change in ipv6 lib error handling --- configure | 31 +++++++++++++------------------ configure.ac | 33 ++++++++++++++++----------------- 2 files changed, 29 insertions(+), 35 deletions(-) diff --git a/configure b/configure index b96138a539e2f2..fcf34f050861be 100755 --- a/configure +++ b/configure @@ -16753,31 +16753,26 @@ rm -rf conftest* printf "%s\n" "$ipv6type" >&6; } fi -if test "x$ipv6" = xyes -then : - - noipv6found="No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand." +if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 library" >&5 printf %s "checking ipv6 library... " >&6; } - if test "x$ipv6lib" = xnone -then : - as_fn_error $? "$noipv6found" "$LINENO" 5 -fi - if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then - LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: lib$ipv6lib" >&5 + if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then + LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: lib$ipv6lib" >&5 printf "%s\n" "lib$ipv6lib" >&6; } - else - if test "x$ipv6trylibc" = xyes + else + if test "x$ipv6trylibc" = xyes then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libc" >&5 + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libc" >&5 printf "%s\n" "libc" >&6; } + else $as_nop - as_fn_error $? "$noipv6found" "$LINENO" 5 -fi - fi - { noipv6found=; unset noipv6found;} + as_fn_error $? "No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand." "$LINENO" 5 + +fi + fi fi diff --git a/configure.ac b/configure.ac index c1697018925e8a..f6df9b8bb41cc9 100644 --- a/configure.ac +++ b/configure.ac @@ -4520,24 +4520,23 @@ yes AC_MSG_RESULT([$ipv6type]) fi -AS_VAR_IF([ipv6], [yes], [ - AS_VAR_SET([noipv6found], - [m4_normalize([ - "No $ipv6lib library found; cannot continue. - You need to fetch lib$ipv6lib.a from appropriate - ipv6 kit and compile beforehand."])]) +if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then AC_MSG_CHECKING([ipv6 library]) - AS_VAR_IF([ipv6lib], [none], [AC_MSG_ERROR([$noipv6found])]) - if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then - LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" - AC_MSG_RESULT([lib$ipv6lib]) - else - AS_VAR_IF([ipv6trylibc], [yes], - [AC_MSG_RESULT([libc])], - [AC_MSG_ERROR([$noipv6found])]) - fi - AS_UNSET([noipv6found]) -]) + if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then + LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" + AC_MSG_RESULT([lib$ipv6lib]) + else + AS_VAR_IF([ipv6trylibc], [yes], [ + AC_MSG_RESULT([libc]) + ], [ + AC_MSG_ERROR([m4_normalize([ + No $ipv6lib library found; cannot continue. + You need to fetch lib$ipv6lib.a from appropriate + ipv6 kit and compile beforehand. + ])]) + ]) + fi +fi AC_CACHE_CHECK([CAN_RAW_FD_FRAMES], [ac_cv_can_raw_fd_frames], [