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