[gnutls-dev] pkg-config support for opencdk

Andreas Metzler ametzler at downhill.at.eu.org
Sun Aug 6 20:03:14 CEST 2006


Hej,
attached a simple patch for adding pkg-config support to opencdk.
cu andreas

PS: 
I don't think there should be any copyright problems as my own
contribution is trivial copy'n'paste from gnutls:

1. Take gnutls.pc.in and copy it as src/opencdk.pc.in. Make two
one-line changes to it.
2. Add src/opencdk.pc to AC_CONFIG_FILES
3. Copy 4 lines from gnutls/lib/Makefile.am to src/Makefile.am and
s/gnutls/opencdk/
-------------- next part --------------
--- opencdk8-0.5.9.orig/src/opencdk.pc.in
+++ opencdk8-0.5.9/src/opencdk.pc.in
@@ -0,0 +1,23 @@
+# Process this file with autoconf to produce a pkg-config metadata file.
+# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation
+# Author: Simon Josefsson
+# 
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+# 
+# This file is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: OpenCDK
+Description: Open Crypto Development Kit
+Version: @VERSION@
+Libs: -L${libdir} -lopencdk
+Libs.private: @LIBOPENCDK_LIBS@ @LIBZ@
+Cflags: -I${includedir}
--- opencdk8-0.5.9.orig/src/Makefile.am
+++ opencdk8-0.5.9/src/Makefile.am
@@ -23,6 +23,12 @@
 lib_LTLIBRARIES = libopencdk.la
 bin_SCRIPTS = opencdk-config
 
+# Pkg-config script.
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = opencdk.pc
+
+DISTCLEANFILES = $(pkgconfig_DATA)
+
 EXTRA_DIST = opencdk-config.in opencdk.m4
 
 AM_CPPFLAGS = $(LIBGCRYPT_CFLAGS)
--- opencdk8-0.5.9.orig/configure.ac
+++ opencdk8-0.5.9/configure.ac
@@ -91,5 +91,5 @@
 AC_SUBST(LIBOPENCDK_CFLAGS)
 
 AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile tests/Makefile
-                 src/opencdk.h src/opencdk-config])
+                 src/opencdk.h src/opencdk-config src/opencdk.pc])
 AC_OUTPUT


More information about the Gnutls-devel mailing list