]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
config: Add libelf and libdw pkg-config files.
authorMark Wielaard <mjw@redhat.com>
Mon, 4 Jan 2016 20:41:52 +0000 (21:41 +0100)
committerMark Wielaard <mjw@redhat.com>
Tue, 5 Jan 2016 15:18:37 +0000 (16:18 +0100)
Signed-off-by: Mark Wielaard <mjw@redhat.com>
ChangeLog
config/ChangeLog
config/Makefile.am
config/elfutils.spec.in
config/libdw.pc.in [new file with mode: 0644]
config/libelf.pc.in [new file with mode: 0644]
configure.ac

index 7b67c2e3e21bcb98ee22350e5d8e4812babf16a3..21862ccd32ee4104412487222017cd2023f814ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-04  Mark Wielaard  <mjw@redhat.com>
+
+       * configure.ac: Add BZ2_LIBS and LIBLZMA substitutions.
+       Add config/libelf.pc and config/libdw.pc config files.
+
 2015-12-31  Mark Wielaard  <mjw@redhat.com>
 
        * Makefile.am (AM_MAKEFLAGS): Set --no-print-directory.
index 428162fe51f534d4bd2779c1921632cd955b4572..baa43030f965a3733b735d7470fdc9509cbe56f6 100644 (file)
@@ -1,3 +1,13 @@
+2016-01-04  Mark Wielaard  <mjw@redhat.com>
+
+       * libelf.pc.in: New file.
+       * libdw.pc.in: Likewise.
+       * Makefile.am (EXTRA_DIST): Add libelf.pc.in and libdw.pc.in.
+       (pkgconfigdir): New variable.
+       (pkgconfigdir_DATA): Likewise.
+       * elfutils.spec.in (files devel): Add libdw.pc.
+       (files libelf-devel): Add libelf.pc.
+
 2015-10-15  Mark Wielaard  <mjw@redhat.com>
 
        * elfutils.spec.in: Update for 0.164.
index 23f7b65535ef614b0fce89fb19b78c730e8e29b4..66012d029ac62e3272cb37de9fe1e10332a5d546 100644 (file)
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
 ## Configure input file for elfutils.
 ##
-## Copyright (C) 2004, 2005, 2008, 2009, 2011, 2015 Red Hat, Inc.
+## Copyright (C) 2004, 2005, 2008, 2009, 2011, 2015, 2016 Red Hat, Inc.
 ## This file is part of elfutils.
 ##
 ## This file is free software; you can redistribute it and/or modify
 ## not, see <http://www.gnu.org/licenses/>.
 ##
 EXTRA_DIST = elfutils.spec.in known-dwarf.awk 10-default-yama-scope.conf
+            libelf.pc.in libdw.pc.in
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libelf.pc libdw.pc
 
 if MAINTAINER_MODE
 $(srcdir)/elfutils.spec.in: $(top_srcdir)/NEWS
index b718f0662bcf95695370573de07075bf55075580..40b08bf1b1f04e4bb2c9d3315f41a47cc472f967 100644 (file)
@@ -197,6 +197,7 @@ rm -rf ${RPM_BUILD_ROOT}
 %{_libdir}/libebl.a
 #%{_libdir}/libasm.so
 %{_libdir}/libdw.so
+%{_libdir}/pkgconfig/libdw.pc
 
 %files devel-static
 %{_libdir}/libdw.a
@@ -215,6 +216,7 @@ rm -rf ${RPM_BUILD_ROOT}
 %{_includedir}/nlist.h
 %{_includedir}/elfutils/version.h
 %{_libdir}/libelf.so
+%{_libdir}/pkgconfig/libelf.pc
 
 %files libelf-devel-static
 %{_libdir}/libelf.a
diff --git a/config/libdw.pc.in b/config/libdw.pc.in
new file mode 100644 (file)
index 0000000..b7dc002
--- /dev/null
@@ -0,0 +1,22 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libdw
+Description: elfutils library for DWARF data and ELF file or process inspection
+Version: @VERSION@
+URL: https://fedorahosted.org/elfutils/
+
+Libs: -L${libdir} -ldw
+Cflags: -I${includedir}
+
+# We need the exact matching elfutils libelf version since internal data
+# structures are used.
+Requires: libelf = @VERSION@
+
+# We support various compressed ELF images, but don't export any of the
+# data structures or functions.  zlib (gz) is always required, bzip2 (bz2)
+# and lzma (xz) are optional.  But bzip2 doesn't have a pkg-config file.
+Requires.private: zlib @LIBLZMA@
+Libs.private: @BZ2_LIB@
diff --git a/config/libelf.pc.in b/config/libelf.pc.in
new file mode 100644 (file)
index 0000000..1fc7e4c
--- /dev/null
@@ -0,0 +1,14 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libelf
+Description: elfutils libelf library to read and write ELF files
+Version: @VERSION@
+URL: https://fedorahosted.org/elfutils/
+
+Libs: -L${libdir} -lelf
+Cflags: -I${includedir}
+
+Requires.private: zlib
index e01075493066092bee5130ac12f70cceae26bb1c..bc50e31a07da2edd52cae09b9d8d57a9344e74f7 100644 (file)
@@ -1,7 +1,7 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl Configure input file for elfutils.                     -*-autoconf-*-
 dnl
-dnl Copyright (C) 1996-2015 Red Hat, Inc.
+dnl Copyright (C) 1996-2016 Red Hat, Inc.
 dnl
 dnl This file is part of elfutils.
 dnl
@@ -22,7 +22,7 @@ AC_INIT([elfutils],[0.164],[https://bugzilla.redhat.com/],[elfutils])
 AC_CONFIG_AUX_DIR([config])
 AC_CONFIG_FILES([config/Makefile])
 
-AC_COPYRIGHT([Copyright (C) 1996-2015 Red Hat, Inc.])
+AC_COPYRIGHT([Copyright (C) 1996-2016 Red Hat, Inc.])
 AC_PREREQ(2.63)                        dnl Minimum Autoconf version required.
 
 dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
@@ -252,7 +252,12 @@ dnl conditional and config.h USE_BZLIB/USE_LZMALIB #define.
 save_LIBS="$LIBS"
 LIBS=
 eu_ZIPLIB(bzlib,BZLIB,bz2,BZ2_bzdopen,bzip2)
+# We need this since bzip2 doesn't have a pkgconfig file.
+BZ2_LIB="$LIBS"
+AC_SUBST([BZ2_LIB])
 eu_ZIPLIB(lzma,LZMA,lzma,lzma_auto_decoder,[LZMA (xz)])
+AS_IF([test "x$with_lzma" = xyes], [LIBLZMA="liblzma"], [LIBLZMA=""])
+AC_SUBST([LIBLZMA])
 zip_LIBS="$LIBS"
 LIBS="$save_LIBS"
 AC_SUBST([zip_LIBS])
@@ -352,6 +357,9 @@ dnl Test suite.
 AM_CONDITIONAL(STANDALONE, false)dnl Used in tests/Makefile.am, which see.
 AC_CONFIG_FILES([tests/Makefile])
 
+dnl pkgconfig files
+AC_CONFIG_FILES([config/libelf.pc config/libdw.pc])
+
 # Get the definitions necessary to create the Makefiles in the po
 # subdirectories.  This is a small subset of the gettext rules.
 AC_SUBST(USE_NLS, yes)