- configure: add initial RISC-V support
- Fix broken libatomic test

Index: configure
--- configure.orig
+++ configure
@@ -1992,6 +1992,7 @@ ARCH_LIST="
     parisc
     ppc
     ppc64
+    riscv
     s390
     sh4
     sparc
@@ -2601,7 +2602,7 @@ for ext in $(filter_out mmx $ARCH_EXT_LIST_X86_SIMD); 
 done
 
 aligned_stack_if_any="aarch64 ppc x86"
-fast_64bit_if_any="aarch64 alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64"
+fast_64bit_if_any="aarch64 alpha ia64 mips64 parisc64 ppc64 riscv64 sparc64 x86_64"
 fast_clz_if_any="aarch64 alpha avr32 mips ppc x86"
 fast_unaligned_if_any="aarch64 ppc x86"
 simd_align_16_if_any="altivec neon sse"
@@ -4915,6 +4916,9 @@ case "$arch" in
     "Power Macintosh"|ppc*|powerpc*)
         arch="ppc"
     ;;
+    riscv*)
+        arch="riscv"
+    ;;
     s390|s390x)
         arch="s390"
     ;;
@@ -5306,6 +5310,10 @@ case "$arch" in
         check_64bit ppc ppc64
         enabled shared && enable_weak pic
     ;;
+    riscv)
+        check_64bit riscv32 riscv64
+        enabled shared && enable_weak pic
+    ;;
     s390)
         check_64bit s390 s390x
         enabled shared && enable_weak pic
@@ -5379,7 +5387,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"
@@ -5736,7 +5743,7 @@ set_default libdir
 set_default $PATHS_LIST
 set_default nm
 
-disabled optimizations || enabled ossfuzz || check_cflags -fomit-frame-pointer
+enabled x86_32 && check_cflags -fomit-frame-pointer
 
 enable_weak_pic() {
     disabled pic && return
@@ -6191,7 +6198,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 = ATOMIC_VAR_INIT(-1); atomic_store(&foo, 0); foo += bar"  \
         $LATOMIC && eval stdatomic_extralibs="\$LATOMIC" && break
