tee: Check for the removed pad flag also in the slow pushing path
[platform/upstream/gstreamer.git] / docs / random / autotools
1 These are some notes on our autotools setup, and some things to remember.
2
3 plugin Makefile.am:
4 - plugindir gets defined for you, don't set it in Makefile.am 
5 - plugin_LTLIBRARIES should contain the name of every plugin,
6   starting with libgst and ending in .la
7
8 - put compile/link variables in the following order: CFLAGS, LIBADD, LDFLAGS
9 - order _CFLAGS and _LIBADD with the highest in the stack first;
10   e.g. $(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) $(MUSICBRAINZ_LIBS)
11   this makes sure that the one you're most likely to be hacking on
12   (GStreamer) has its -L flags pointing to your hacking directory,
13   and comes first on the link line.  If it were to come later and you
14   had the library installed in the same place as the dependency, it
15   would take that version instead
16 - DO NOT put any libraries in _LDFLAGS.  Typically, _LDFLAGS should only
17   have $(GST_PLUGIN_LDFLAGS)
18 - when using gst-plugins-base libraries, use $(GST_PLUGINS_BASE_LIBS) then
19   add -lgst(library)-$(GST_API_VERSION).  Example:
20
21 libgstsdlvideosink_la_LIBADD =  $(GST_PLUGINS_BASE_LIBS) \
22                                 -lgstvideo-$(GST_API_VERSION) \
23                                 -lgstaudio-$(GST_API_VERSION) \
24                                 -lgstinterfaces-$(GST_API_VERSION) \
25                                 $(SDL_LIBS)
26
27
28 - don't forget to use noinst_HEADERS if you have private headers
29
30 plugin configure.ac snippet:
31   - ORDER THEM ALPHABETICALLY PLEASE
32   - wrap your check in a block like this:
33
34 translit(dnm, m, l) AM_CONDITIONAL(USE_DEP, true)
35   GST_CHECK_FEATURE(DEP, [(dependency description)], (plug-in-name), [
36     (here go the checks)
37 ])
38   - plug-in name is the name of the *plug-in*, not the element; ie, the
39     first column when running gst-inspect
40
41   - For the checks, in the simplest case, use something like:
42     GST_PKG_CHECK_MODULES(FOO, foo-0.3 >= 0.3.2)
43     This will:
44     - do the check
45     - show a decent message if it can't find it, without failing
46     - set HAVE_FOO to yes or no
47     - set FOO_CFLAGS and FOO_LIBS
48   - if you want to make sure configure fails when this dependency is missing,
49     use:
50     GST_PKG_CHECK_MODULES(FOO, libfoo-0.3 >= 0.3.2, yes)
51
52   - if your library does not come with a .pc file, you have to roll your own
53     check
54
55 pkg.m4: (last checked: version 0.20)
56   - was changed at some point to hide the error message from you, and error
57     out by default if no ACTION-IF-NOT-FOUND is given.
58   - caller is responsible for doing AC_MSG_RESULT if ACTION-IF-NOT-FOUND
59     is given
60   - for automake-1.6, AC_SUBST((PKG)_CFLAGS) and AC_SUBST((PKG)_LIBS) is not
61     done automatically.  Starting from 1.7, it is.  We require 1.7 now.