From 65944782c3a1c347f5d57cc6649f04e8a89c58bd Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sat, 12 Jul 2014 03:34:08 -0500 Subject: [PATCH] add platform libraries to libcompat's LIBADD list ok beck@ --- .gitignore | 2 ++ Makefile.am | 3 +++ configure.ac.tpl | 19 +++++++++++++++++-- crypto/Makefile.am.tpl | 1 + libcrypto.pc.in | 15 +++++++++++++++ libssl.pc.in | 16 ++++++++++++++++ openssl.pc.in | 11 +++++++++++ update.sh | 3 +-- 8 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 libcrypto.pc.in create mode 100644 libssl.pc.in create mode 100644 openssl.pc.in diff --git a/.gitignore b/.gitignore index e99ad46..e413341 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,8 @@ Makefile.in *.lo *.la +*.pc + # tests test-driver *.log diff --git a/Makefile.am b/Makefile.am index bec672c..fbb9315 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,2 +1,5 @@ SUBDIRS = crypto ssl include apps tests man ACLOCAL_AMFLAGS = -I m4 + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libcrypto.pc libssl.pc openssl.pc diff --git a/configure.ac.tpl b/configure.ac.tpl index c565485..ab06402 100644 --- a/configure.ac.tpl +++ b/configure.ac.tpl @@ -97,5 +97,20 @@ AC_CHECK_HEADER(sys/sysctl.h, AC_DEFINE(HAVE_SYS_SYSCTL_H)) LT_INIT -AC_OUTPUT(Makefile include/Makefile include/openssl/Makefile ssl/Makefile - crypto/Makefile tests/Makefile apps/Makefile man/Makefile) +AC_CONFIG_FILES([ + Makefile + include/Makefile + include/openssl/Makefile + ssl/Makefile + crypto/Makefile + tests/Makefile + apps/Makefile + man/Makefile + libcrypto.pc + libssl.pc + openssl.pc +]) + +AC_OUTPUT + +DISTCLEANFILES += *.pc diff --git a/crypto/Makefile.am.tpl b/crypto/Makefile.am.tpl index 4830da4..20c3495 100644 --- a/crypto/Makefile.am.tpl +++ b/crypto/Makefile.am.tpl @@ -19,6 +19,7 @@ libcompatnoopt_la_SOURCES = compat/explicit_bzero.c # other compatibility functions libcompat_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) libcompat_la_SOURCES = +libcompat_la_LIBADD = $(PLATFORM_LDADD) if NO_STRLCAT libcompat_la_SOURCES += compat/strlcat.c diff --git a/libcrypto.pc.in b/libcrypto.pc.in new file mode 100644 index 0000000..4e886b9 --- /dev/null +++ b/libcrypto.pc.in @@ -0,0 +1,15 @@ +#libcrypto pkg-config source file + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: LibreSSL-libssl +Description: Secure Sockets Layer and cryptography libraries +Version: @VERSION@ +Requires: +Conflicts: +Libs: -L${libdir} -lcrypto +Libs.private: @LIBS@ +Cflags: -I${includedir} diff --git a/libssl.pc.in b/libssl.pc.in new file mode 100644 index 0000000..43b8bb7 --- /dev/null +++ b/libssl.pc.in @@ -0,0 +1,16 @@ +#libssl pkg-config source file + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: LibreSSL-libssl +Description: Secure Sockets Layer and cryptography libraries +Version: @VERSION@ +Requires: +Requires.private: libcrypto +Conflicts: +Libs: -L${libdir} -lssl +Libs.private: @LIBS@ -lcrypto +Cflags: -I${includedir} diff --git a/openssl.pc.in b/openssl.pc.in new file mode 100644 index 0000000..b4acfa5 --- /dev/null +++ b/openssl.pc.in @@ -0,0 +1,11 @@ +#openssl pkg-config source file + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: LibreSSL +Description: Secure Sockets Layer and cryptography libraries and tools +Version: @VERSION@ +Requires: libssl libcrypto diff --git a/update.sh b/update.sh index f2ae0f7..ba367ae 100755 --- a/update.sh +++ b/update.sh @@ -306,8 +306,7 @@ test_excludes=(biotest aeadtest evptest pq_test ssltest arc4randomforktest) fi echo "check_PROGRAMS += $TEST" >> Makefile.am echo "${TEST}_SOURCES = $i" >> Makefile.am - echo "${TEST}_LDADD = \$(PLATFORM_LDADD)" >> Makefile.am - echo "${TEST}_LDADD += \$(top_builddir)/ssl/libssl.la" >> Makefile.am + echo "${TEST}_LDADD = \$(top_builddir)/ssl/libssl.la" >> Makefile.am echo "${TEST}_LDADD += \$(top_builddir)/crypto/libcrypto.la" >> Makefile.am done )