Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-45723: Normalise configure user communication (GH-30024) #30024

Merged
merged 1 commit into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 42 additions & 32 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -6169,8 +6169,7 @@ if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
$as_echo "$ANDROID_API_LEVEL" >&6; }
if test -z "$ANDROID_API_LEVEL"; then
echo 'Fatal: you must define __ANDROID_API__'
exit 1
as_fn_error $? "Fatal: you must define __ANDROID_API__" "$LINENO" 5
fi

cat >>confdefs.h <<_ACEOF
Expand All @@ -6193,11 +6192,14 @@ fi
rm -f conftest.c conftest.out

# Check for unsupported systems
case $ac_sys_system/$ac_sys_release in
atheos*|Linux*/1*)
echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
echo See README for details.
exit 1;;
case $ac_sys_system/$ac_sys_release in #(
atheos*|Linux*/1*) :

as_fn_error $? "This system \($ac_sys_system/$ac_sys_release\) is no longer supported. See README for details." "$LINENO" 5

;; #(
*) :
;;
esac

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
Expand Down Expand Up @@ -13159,16 +13161,19 @@ fi
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"
echo "using lib$ipv6lib"
{ $as_echo "$as_me:${as_lineno-$LINENO}: using lib$ipv6lib" >&5
$as_echo "$as_me: using lib$ipv6lib" >&6;}
else
if test $ipv6trylibc = "yes"; then
echo "using libc"
else
echo 'Fatal: no $ipv6lib library found. cannot continue.'
echo "You need to fetch lib$ipv6lib.a from appropriate"
echo 'ipv6 kit and compile beforehand.'
exit 1
fi
if test "x$ipv6trylibc" = xyes; then :

{ $as_echo "$as_me:${as_lineno-$LINENO}: using libc" >&5
$as_echo "$as_me: using libc" >&6;}

else

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

Expand Down Expand Up @@ -16522,12 +16527,11 @@ fi

if test "$ac_cv_func_getaddrinfo" = no -o "$ac_cv_buggy_getaddrinfo" = yes
then
if test $ipv6 = yes
then
echo 'Fatal: You must get working getaddrinfo() function.'
echo ' or you can specify "--disable-ipv6"'.
exit 1
fi
if test "x$ipv6" = xyes; then :

as_fn_error $? "You must get working getaddrinfo() function or pass the \"--disable-ipv6\" option to configure." "$LINENO" 5

fi
else

$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Expand Down Expand Up @@ -25071,28 +25075,34 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi


echo "creating Modules/Setup.local" >&6
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating Modules/Setup.local" >&5
$as_echo "$as_me: creating Modules/Setup.local" >&6;}
if test ! -f Modules/Setup.local
then
echo "# Edit this file for local setup changes" >Modules/Setup.local
fi

echo "creating Makefile" >&6
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating Makefile" >&5
$as_echo "$as_me: creating Makefile" >&6;}
$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
-s Modules \
Modules/Setup.local $srcdir/Modules/Setup.bootstrap $srcdir/Modules/Setup
mv config.c Modules

if test -z "$PKG_CONFIG"; then
echo "" >&6
echo "pkg-config is missing. Some dependencies may not be detected correctly." >&6
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config is missing. Some dependencies may not be detected correctly." >&5
$as_echo "$as_me: WARNING: pkg-config is missing. Some dependencies may not be detected correctly." >&2;}
fi

if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
echo "" >&6
echo "" >&6
echo "If you want a release build with all stable optimizations active (PGO, etc)," >&6
echo "please run ./configure --enable-optimizations" >&6
echo "" >&6
echo "" >&6
{ $as_echo "$as_me:${as_lineno-$LINENO}:

If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations
" >&5
$as_echo "$as_me:

If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations
" >&6;}
fi
66 changes: 33 additions & 33 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1037,8 +1037,7 @@ if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
_arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
AC_MSG_RESULT([$ANDROID_API_LEVEL])
if test -z "$ANDROID_API_LEVEL"; then
echo 'Fatal: you must define __ANDROID_API__'
exit 1
AC_MSG_ERROR([Fatal: you must define __ANDROID_API__])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh, I forgot to remove the "Fatal: " prefix. I'll add it to a future autoconf PR.

fi
AC_DEFINE_UNQUOTED(ANDROID_API_LEVEL, $ANDROID_API_LEVEL, [The Android API level.])

Expand All @@ -1054,12 +1053,14 @@ fi
rm -f conftest.c conftest.out

# Check for unsupported systems
case $ac_sys_system/$ac_sys_release in
atheos*|Linux*/1*)
echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
echo See README for details.
exit 1;;
esac
AS_CASE([$ac_sys_system/$ac_sys_release],
[atheos*|Linux*/1*], [
AC_MSG_ERROR([m4_normalize([
This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
See README for details.
])])
]
)

AC_MSG_CHECKING([for --with-suffix])
AC_ARG_WITH([suffix],
Expand Down Expand Up @@ -3795,16 +3796,17 @@ fi
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"
echo "using lib$ipv6lib"
AC_MSG_NOTICE([using lib$ipv6lib])
else
if test $ipv6trylibc = "yes"; then
echo "using libc"
else
echo 'Fatal: no $ipv6lib library found. cannot continue.'
echo "You need to fetch lib$ipv6lib.a from appropriate"
echo 'ipv6 kit and compile beforehand.'
exit 1
fi
AS_VAR_IF([ipv6trylibc], [yes], [
AC_MSG_NOTICE([using 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

Expand Down Expand Up @@ -4510,12 +4512,12 @@ dnl if ac_cv_func_getaddrinfo

if test "$ac_cv_func_getaddrinfo" = no -o "$ac_cv_buggy_getaddrinfo" = yes
then
if test $ipv6 = yes
then
echo 'Fatal: You must get working getaddrinfo() function.'
echo ' or you can specify "--disable-ipv6"'.
exit 1
fi
AS_VAR_IF([ipv6], [yes], [
AC_MSG_ERROR([m4_normalize([
You must get working getaddrinfo() function
or pass the "--disable-ipv6" option to configure.
])])
])
else
AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if you have the getaddrinfo function.])
fi
Expand Down Expand Up @@ -6494,28 +6496,26 @@ AC_CONFIG_FILES([Modules/Setup.stdlib])
AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
AC_OUTPUT

echo "creating Modules/Setup.local" >&AS_MESSAGE_FD
AC_MSG_NOTICE([creating Modules/Setup.local])
if test ! -f Modules/Setup.local
then
echo "# Edit this file for local setup changes" >Modules/Setup.local
fi

echo "creating Makefile" >&AS_MESSAGE_FD
AC_MSG_NOTICE([creating Makefile])
$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
-s Modules \
Modules/Setup.local $srcdir/Modules/Setup.bootstrap $srcdir/Modules/Setup
mv config.c Modules

if test -z "$PKG_CONFIG"; then
echo "" >&AS_MESSAGE_FD
echo "pkg-config is missing. Some dependencies may not be detected correctly." >&AS_MESSAGE_FD
AC_MSG_WARN([pkg-config is missing. Some dependencies may not be detected correctly.])
fi

if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
echo "" >&AS_MESSAGE_FD
echo "" >&AS_MESSAGE_FD
echo "If you want a release build with all stable optimizations active (PGO, etc)," >&AS_MESSAGE_FD
echo "please run ./configure --enable-optimizations" >&AS_MESSAGE_FD
echo "" >&AS_MESSAGE_FD
echo "" >&AS_MESSAGE_FD
AC_MSG_NOTICE([

If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations
])
fi