- Fix broken libatomic test

Index: configure
--- configure.orig
+++ configure
@@ -6159,7 +6159,6 @@ case $target_os in
         enable section_data_rel_ro
         striptype=""
         SHFLAGS='-shared'
-        SLIB_INSTALL_NAME='$(SLIBNAME).$(LIBMAJOR).$(LIBMINOR)'
         SLIB_INSTALL_LINKS=
         oss_indev_extralibs="-lossaudio"
         oss_outdev_extralibs="-lossaudio"
@@ -6534,7 +6533,7 @@ set_default libdir
 set_default $PATHS_LIST
 set_default nm
 
-disabled optimizations || enabled ossfuzz || echo "$CFLAGS" | grep -q -- '-fsanitize=' || check_allcflags -fomit-frame-pointer
+enabled x86_64 && check_allcflags -fomit-frame-pointer
 
 enable_weak_pic() {
     disabled pic && return
@@ -6830,11 +6829,19 @@ elif enabled x86; then
     # As 'i' is stored on the stack, this program will crash
     # if the base pointer is used to access it because the
     # base pointer is cleared in the inline assembly code.
-    check_exec_crash <<EOF && enable ebp_available
+    # Since https://github.com/llvm/llvm-project/commit/0d471b3f64d3116bd57c79d872f7384fff80daa5,
+    # Clang can save/restore EBP around clobber-only asm, so the old
+    # crash probe can be a false positive.
+    check_exec_crash <<EOF && test_cc <<EOF_EBP_REGS && enable ebp_available
 volatile int i=0;
 __asm__ volatile ("xorl %%ebp, %%ebp" ::: "%ebp");
 return i;
 EOF
+void foo(void *a, void *b, void *c, void *d, int e, void *f)
+{
+    __asm__ volatile ("" :: "r"(a), "r"(b), "r"(c), "r"(d), "g"(e), "r"(f) : "%eax", "%edx");
+}
+EOF_EBP_REGS
 
     # check whether EBX is available on x86
     check_inline_asm ebx_available '""::"b"(0)' &&
@@ -7090,7 +7097,7 @@ check_headers asm/types.h
 #
 # some configurations also require linking to libatomic, so try
 # both with -latomic and without
-for LATOMIC in "-latomic" ""; do
+for LATOMIC in "" "-latomic"; do
     check_builtin stdatomic stdatomic.h                                \
         "atomic_int foo, bar = -1; atomic_store(&foo, 0); foo += bar"  \
         $LATOMIC && eval stdatomic_extralibs="\$LATOMIC" && break
@@ -7551,7 +7558,7 @@ enabled opengl            && { check_lib opengl GL/glx
 enabled openssl           && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h DTLS_get_data_mtu &&
                                  { enabled gplv3 || ! enabled gpl || enabled nonfree || die "ERROR: OpenSSL >=3.0.0 requires --enable-version3"; }; } ||
                                { enabled gpl && ! enabled nonfree && die "ERROR: OpenSSL <3.0.0 is incompatible with the gpl"; } ||
-                               check_pkg_config openssl "openssl >= 1.1.1" openssl/ssl.h DTLS_get_data_mtu ||
+                               check_pkg_config openssl "openssl >= 1.1.0" openssl/ssl.h OPENSSL_init_ssl ||
                                check_lib openssl openssl/ssl.h DTLS_get_data_mtu -lssl -lcrypto ||
                                check_lib openssl openssl/ssl.h DTLS_get_data_mtu -lssl -lcrypto -lws2_32 -lgdi32 ||
                                die "ERROR: openssl (>= 1.1.1) not found"; }
