diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | libmagic.pc.in | 10 |
4 files changed, 20 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2020-02-12 17:30 Christos Zoulas <christos@zoulas.com> + + * PR/136: Fix static build by adding a libmagic.pc (Fabrice Fontaine) + 2019-12-24 14:16 Christos Zoulas <christos@zoulas.com> * add guid support diff --git a/Makefile.am b/Makefile.am index 8bd927d9..2ab67ed7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,3 +3,8 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = MAINT SUBDIRS = src magic tests doc python + +# This variable must have 'exec' in its name, in order to be installed +# by 'install-exec' target (instead of default 'install-data') +pkgconfigexecdir = $(libdir)/pkgconfig +pkgconfigexec_DATA = libmagic.pc diff --git a/configure.ac b/configure.ac index ac37fccd..b2e2e5b8 100644 --- a/configure.ac +++ b/configure.ac @@ -217,5 +217,5 @@ if test "$ac_cv_header_lzma_h$ac_cv_lib_lzma_lzma_stream_decoder" = "yesyes"; t AC_DEFINE([XZLIBSUPPORT], 1, [Enable xzlib compression support]) fi -AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile libmagic.pc]) AC_OUTPUT diff --git a/libmagic.pc.in b/libmagic.pc.in new file mode 100644 index 00000000..3ad1290b --- /dev/null +++ b/libmagic.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libmagic +Description: Magic number recognition library +Version: @VERSION@ +Libs: -L${libdir} -lmagic +Libs.private: @LIBS@ |