diff --git a/Makefile.am b/Makefile.am index 749da22423..f15b5e0d94 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,25 +19,27 @@ else SUBDIRS_EXAMPLES = endif +all-local: gst-element-check-@GST_MAJORMINOR@.m4 + +gst-element-check-@GST_MAJORMINOR@.m4: gst-element-check.m4 + cp $(srcdir)/gst-element-check.m4 gst-element-check-@GST_MAJORMINOR@.m4 + +aclocaldir = $(datadir)/aclocal +aclocal_DATA = gst-element-check-@GST_MAJORMINOR@.m4 + SUBDIRS = include gst libs tools \ - $(SUBDIRS_TESTS) $(SUBDIRS_EXAMPLES) $(SUBDIRS_DOCS) + $(SUBDIRS_TESTS) $(SUBDIRS_EXAMPLES) $(SUBDIRS_DOCS) \ + pkgconfig # These are all the possible subdirs -DIST_SUBDIRS = include libs gst tools tests testsuite examples docs +DIST_SUBDIRS = include libs gst \ + tools \ + tests testsuite \ + examples \ + docs \ + pkgconfig -all-local: gstreamer-@GST_MAJORMINOR@.pc gstreamer-@GST_MAJORMINOR@-uninstalled.pc - -gstreamer-@GST_MAJORMINOR@.pc: gstreamer.pc gstreamer.pc.in - cp gstreamer.pc gstreamer-@GST_MAJORMINOR@.pc -gstreamer-@GST_MAJORMINOR@-uninstalled.pc: gstreamer-uninstalled.pc gstreamer-uninstalled.pc.in - cp gstreamer-uninstalled.pc gstreamer-@GST_MAJORMINOR@-uninstalled.pc - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = gstreamer-@GST_MAJORMINOR@.pc - -EXTRA_DIST = gstreamer.spec.in \ - gstreamer.pc.in \ - gstreamer-uninstalled.pc.in \ +EXTRA_DIST = gstreamer.spec.in gst-element-check.m4 \ configure.ac autogen.sh depcomp \ REQUIREMENTS ABOUT-NLS RELEASE DOCBUILDING DEVEL \ idiottest.mak common diff --git a/configure.ac b/configure.ac index 09f74433a7..785f9200b4 100644 --- a/configure.ac +++ b/configure.ac @@ -554,9 +554,12 @@ docs/pwg/Makefile docs/plugins/Makefile docs/plugins/gstreamer-plugins.types docs/xsl/Makefile +pkgconfig/Makefile stamp.h -gstreamer.pc -gstreamer-uninstalled.pc +pkgconfig/gstreamer.pc +pkgconfig/gstreamer-uninstalled.pc +pkgconfig/gstreamer-control.pc +pkgconfig/gstreamer-control-uninstalled.pc gstreamer.spec, echo "$infomessages", infomessages="$infomessages" ) diff --git a/gst-element-check.m4 b/gst-element-check.m4 new file mode 100644 index 0000000000..f900dace75 --- /dev/null +++ b/gst-element-check.m4 @@ -0,0 +1,20 @@ +dnl Perform a check for a GStreamer element using gst-inspect +dnl Thomas Vander Stichele +dnl Last modification: 23/10/2002 + +dnl AM_GST_ELEMENT_CHECK(ELEMENT-NAME, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) + +AC_DEFUN(AM_GST_ELEMENT_CHECK, +[ + AC_CHECK_PROG(GST_INSPECT, gst-inspect, gst-inspect, []) + if test "x$GST_INSPECT" != "x"; then + AC_MSG_CHECKING(GStreamer element $1) + if [ $GST_INSPECT $1 > /dev/null 2> /dev/null ]; then + AC_MSG_RESULT(found.) + $2 + else + AC_MSG_RESULT(not found.) + $3 + fi + fi +]) diff --git a/gst-element-check.m4.in b/gst-element-check.m4.in new file mode 100644 index 0000000000..f900dace75 --- /dev/null +++ b/gst-element-check.m4.in @@ -0,0 +1,20 @@ +dnl Perform a check for a GStreamer element using gst-inspect +dnl Thomas Vander Stichele +dnl Last modification: 23/10/2002 + +dnl AM_GST_ELEMENT_CHECK(ELEMENT-NAME, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) + +AC_DEFUN(AM_GST_ELEMENT_CHECK, +[ + AC_CHECK_PROG(GST_INSPECT, gst-inspect, gst-inspect, []) + if test "x$GST_INSPECT" != "x"; then + AC_MSG_CHECKING(GStreamer element $1) + if [ $GST_INSPECT $1 > /dev/null 2> /dev/null ]; then + AC_MSG_RESULT(found.) + $2 + else + AC_MSG_RESULT(not found.) + $3 + fi + fi +]) diff --git a/gstreamer-uninstalled.pc.in b/gstreamer-uninstalled.pc.in deleted file mode 100644 index 484b937f5d..0000000000 --- a/gstreamer-uninstalled.pc.in +++ /dev/null @@ -1,14 +0,0 @@ -# the standard variables don't make sense for an uninstalled copy -prefix= -exec_prefix= -libdir=${pcfiledir} -includedir=${pcfiledir} -toolsdir=${pcfiledir}/tools -gstcontrol_libs=-lgstcontrol-@GST_MAJORMINOR@ - -Name: GStreamer Uninstalled -Description: Streaming-media framework, Not Installed -Version: @VERSION@ -Requires: @GST_PKG_DEPS@@LIBXML_PKG@ -Libs: ${libdir}/gst/libgstreamer-@GST_MAJORMINOR@.la -L${libdir}/libs/gst/control/ -Cflags: -I${includedir} -I${includedir}/libs -I${pc_top_builddir}/${pcfiledir}/@srcdir@ -I${pc_top_builddir}/${pcfiledir}/@srcdir@/libs @GST_PKG_CFLAGS@ diff --git a/gstreamer.spec.in b/gstreamer.spec.in index 635c0a35b5..27424afa5e 100644 --- a/gstreamer.spec.in +++ b/gstreamer.spec.in @@ -203,6 +203,7 @@ ln -sf %{_datadir}/gtk-doc/html/gstreamer-libs %{_datadir}/devhelp/books # %{_libdir}/libgstreamer.a %{_libdir}/libgstreamer-%{majorminor}.so %{_libdir}/libgstcontrol-%{majorminor}.so +%{_datadir}/aclocal/gst-element-check-%{majorminor}.m4 %{_libdir}/pkgconfig/gstreamer-%{majorminor}.pc ## we specify the API docs as regular files since %docs doesn't fail when # files aren't found anymore for RPM >= 4 diff --git a/pkgconfig/Makefile.am b/pkgconfig/Makefile.am new file mode 100644 index 0000000000..a294dc11cf --- /dev/null +++ b/pkgconfig/Makefile.am @@ -0,0 +1,27 @@ +### all of the standard pc files we need to generate +pcfiles = \ + gstreamer-@GST_MAJORMINOR@.pc \ + gstreamer-control-@GST_MAJORMINOR@.pc + +pcfiles_uninstalled = \ + gstreamer-@GST_MAJORMINOR@-uninstalled.pc \ + gstreamer-control-@GST_MAJORMINOR@-uninstalled.pc + +all-local: $(pcfiles) $(pcfiles_uninstalled) + +### how to generate pc files +$(pcfiles): %-@GST_MAJORMINOR@.pc: %.pc + cp $< $@ +$(pcfiles_uninstalled): %-@GST_MAJORMINOR@-uninstalled.pc: %-uninstalled.pc + cp $< $@ + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = $(pcfiles) + +EXTRA_DIST = \ + gstreamer.pc.in \ + gstreamer-uninstalled.pc.in \ + gstreamer-control.pc.in \ + gstreamer-control-uninstalled.pc.in + +CLEANFILES = $(pcfiles) $(pcfiles_uninstalled) diff --git a/pkgconfig/gstreamer-control-uninstalled.pc.in b/pkgconfig/gstreamer-control-uninstalled.pc.in new file mode 100644 index 0000000000..a2f0a4691a --- /dev/null +++ b/pkgconfig/gstreamer-control-uninstalled.pc.in @@ -0,0 +1,14 @@ +# the standard variables don't make sense for an uninstalled copy +prefix= +exec_prefix= +libdir=${pcfiledir}/../libs +includedir=${pcfiledir}/.. +gstcontrol_libs=-lgstcontrol-@GST_MAJORMINOR@ + +Name: GStreamer control library, uninstalled +Description: Dynamic parameters for plug-ins +Requires: gstreamer-@GST_MAJORMINOR@ = @VERSION@ +Version: @VERSION@ + +Libs: ${libdir}/gst/control/libgstcontrol-@GST_MAJORMINOR@.la +Cflags: -I${includedir} -I${includedir}/libs @GST_PKG_CFLAGS@ diff --git a/pkgconfig/gstreamer-control.pc.in b/pkgconfig/gstreamer-control.pc.in new file mode 100644 index 0000000000..563f6c9072 --- /dev/null +++ b/pkgconfig/gstreamer-control.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/gstreamer-@GST_MAJORMINOR@ + +Name: GStreamer control library +Description: Dynamic parameters for plug-ins +Requires: gstreamer-@GST_MAJORMINOR@ +Version: @VERSION@ +Libs: -L${libdir} -lgstcontrol-@GST_MAJORMINOR@ +Cflags: -I${includedir} @GST_PKG_CFLAGS@ diff --git a/pkgconfig/gstreamer-uninstalled.pc.in b/pkgconfig/gstreamer-uninstalled.pc.in new file mode 100644 index 0000000000..6a695b27f5 --- /dev/null +++ b/pkgconfig/gstreamer-uninstalled.pc.in @@ -0,0 +1,14 @@ +# the standard variables don't make sense for an uninstalled copy +prefix= +exec_prefix= +libdir=${pcfiledir}/.. +includedir=${pcfiledir}/.. +toolsdir=${pcfiledir}/../tools +gstcontrol_libs=-lgstcontrol-@GST_MAJORMINOR@ + +Name: GStreamer Uninstalled +Description: Streaming-media framework, Not Installed +Version: @VERSION@ +Requires: @GST_PKG_DEPS@@LIBXML_PKG@ +Libs: ${libdir}/gst/libgstreamer-@GST_MAJORMINOR@.la +Cflags: -I${includedir} -I${includedir}/libs @GST_PKG_CFLAGS@ diff --git a/gstreamer.pc.in b/pkgconfig/gstreamer.pc.in similarity index 100% rename from gstreamer.pc.in rename to pkgconfig/gstreamer.pc.in