ltmain.in: Recognise options for static linking with Clang

Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78072

* build-aux/ltmain.in: Add --static and -Bstatic options.
* NEWS: Update.
diff --git a/NEWS b/NEWS
index 4b1ecc2..0daedf1 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,8 @@
   - Remove unused variable on OS/2, which could cause issues with static
     library generation if defined.
 
+  - Recognise more static linking options for Clang.
+
 ** Changes in supported systems or compilers:
 
   - Add support for SlimCC compiler.
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 6859397..d58b232 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -4910,7 +4910,7 @@
 	build_old_libs=no
 	break
 	;;
-      -all-static | -static | -static-libtool-libs)
+      -all-static | -static | -static-libtool-libs | --static | -Bstatic)
 	case $arg in
 	-all-static)
 	  if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
@@ -4927,7 +4927,7 @@
 	  fi
 	  prefer_static_libs=built
 	  ;;
-	-static-libtool-libs)
+	-static-libtool-libs | --static | -Bstatic)
 	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
 	    dlopen_self=$dlopen_self_static
 	  fi