1 ;;; Help produce Guile wrappers for GnuTLS types.
3 ;;; GnuTLS --- Guile bindings for GnuTLS.
4 ;;; Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc.
6 ;;; GnuTLS is free software; you can redistribute it and/or
7 ;;; modify it under the terms of the GNU Lesser General Public
8 ;;; License as published by the Free Software Foundation; either
9 ;;; version 2.1 of the License, or (at your option) any later version.
11 ;;; GnuTLS is distributed in the hope that it will be useful,
12 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ;;; Lesser General Public License for more details.
16 ;;; You should have received a copy of the GNU Lesser General Public
17 ;;; License along with GnuTLS; if not, write to the Free Software
18 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 ;;; Written by Ludovic Courtès <ludo@gnu.org>.
23 (use-modules (gnutls build enums))
31 (let ((port (current-output-port))
32 (enums %gnutls-enums))
33 (format port "/* Automatically generated, do not edit. */~%~%")
34 (format port "#ifndef GUILE_GNUTLS_ENUMS_H~%")
35 (format port "#define GUILE_GNUTLS_ENUMS_H~%")
37 (format port "#ifdef HAVE_CONFIG_H~%")
38 (format port "# include <config.h>~%")
39 (format port "#endif~%~%")
40 (format port "#include <gnutls/gnutls.h>~%")
41 (format port "#include <gnutls/x509.h>~%")
42 (format port "#include <gnutls/openpgp.h>~%")
44 (for-each (lambda (enum)
45 (output-enum-declarations enum port)
46 (output-enum->c-converter enum port)
47 (output-c->enum-converter enum port))
49 (format port "#endif~%")))
51 (apply main (cdr (command-line)))
58 ;;; arch-tag: 07d834ca-e823-4663-9143-6d22704fbb5b