f43be0
diff --git a/third_party/openpgp.configure b/third_party/openpgp.configure
f43be0
--- a/third_party/openpgp.configure
f43be0
+++ b/third_party/openpgp.configure
f43be0
@@ -198,21 +198,27 @@
f43be0
         )
f43be0
         set_config("MZLA_BZIP2_CFLAGS", bzip2_flags.cflags)
f43be0
         set_config("MZLA_BZIP2_LIBS", bzip2_flags.ldflags)
f43be0
 
f43be0
     # librnp crypto backend selection
f43be0
+    @depends(target_is_linux)
f43be0
+    def librnp_backend_choices(is_linux):
f43be0
+        if is_linux:
f43be0
+            return ("botan", "openssl")
f43be0
+        else:
f43be0
+            return ("botan",)
f43be0
+
f43be0
     option("--with-librnp-backend",
f43be0
-           help="Build librnp with the selected backend: {botan, openssl}",
f43be0
+           help="Build librnp with the selected backend",
f43be0
+           choices=librnp_backend_choices,
f43be0
+           nargs=1,
f43be0
            default="botan")
f43be0
 
f43be0
     @depends("--with-librnp-backend")
f43be0
     def librnp_backend(backend):
f43be0
-        allowed = ("botan", "openssl")
f43be0
-        if backend[0] in allowed:
f43be0
+        if backend:
f43be0
             return backend[0]
f43be0
-        else:
f43be0
-            die(f"Unsupported librnp backend {backend[0]}.")
f43be0
 
f43be0
     set_config("MZLA_LIBRNP_BACKEND", librnp_backend)
f43be0
 
f43be0
     @depends(librnp_backend)
f43be0
     def rnp_botan(backend):
f43be0
@@ -273,10 +279,11 @@
f43be0
         set_config("MZLA_LIBRNP_OPENSSL_LIBS", openssl_flags.ldflags)
f43be0
 
f43be0
 
f43be0
         @depends(c_compiler, openssl_flags)
f43be0
         @imports(_from="textwrap", _import="dedent")
f43be0
+        @imports(_from="__builtin__", _import="chr")
f43be0
         def openssl_version(compiler, openssl_flags):
f43be0
             log.info("Checking for OpenSSL >= 1.1.1")
f43be0
             if openssl_flags is None:
f43be0
                 die("OpenSSL not found. Must be locatable with pkg-config or use --with-openssl.")
f43be0
 
f43be0