From d1a2ec4920a67b27e24c0f7a573c4da8e5e9993e Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 9 Jul 2017 21:31:30 +0200
Subject: libmad, fix missing pkg-config file


diff --git a/Makefile.am b/Makefile.am
index ad5c596..bf617e3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@
 
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS =		
+SUBDIRS =
 DIST_SUBDIRS =		msvc++
 
 lib_LTLIBRARIES =	libmad.la
@@ -30,7 +30,7 @@ include_HEADERS =	mad.h
 EXTRA_PROGRAMS =	minimad
 
 minimad_SOURCES =	minimad.c
-minimad_INCLUDES =	
+minimad_INCLUDES =
 minimad_LDADD =		libmad.la
 
 EXTRA_DIST =		mad.h.sed  \
@@ -59,6 +59,9 @@ INCLUDES =		$(FPM) $(ASO)
 BUILT_SOURCES =		mad.h
 CLEANFILES =		mad.h
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = mad.pc
+
 ## From the libtool documentation on library versioning:
 ##
 ## CURRENT
diff --git a/configure.ac b/configure.ac
index 9b79399..bbb8502 100644
--- a/configure.ac
+++ b/configure.ac
@@ -429,5 +429,5 @@ dnl LTLIBOBJS=`echo "$LIBOBJS" | sed -e 's/\.o/.lo/g'`
 dnl AC_SUBST(LTLIBOBJS)
 
 AC_CONFIG_FILES([Makefile msvc++/Makefile  \
-	libmad.list])
+	libmad.list mad.pc])
 AC_OUTPUT
diff --git a/mad.pc.in b/mad.pc.in
new file mode 100644
index 0000000..6b906ba
--- /dev/null
+++ b/mad.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: mad
+Description: MPEG Audio Decoder library
+Requires:
+Version: @VERSION@
+Libs: -L${libdir} -lmad
+Cflags: -I${includedir}
-- 
2.7.0

