cleanup template
[gst-scaletempo-demo-rj.git] / configure.ac
blobaf13a8940890c699f47d91620c4079548253e58f
1 AC_INIT
3 dnl Fill in your package name and version here
4 PACKAGE=gst-scaletempo-demo
5 VERSION=git
7 dnl these AC_DEFINE_UNQUOTED's are necessary for make dist to work
8 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
9 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
10 AC_SUBST(PACKAGE)
11 AC_SUBST(VERSION)
13 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
15 AM_CONFIG_HEADER(config.h)
17 AC_PROG_CC
18 AC_PROG_LIBTOOL
20 dnl Check for pkgconfig first
21 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
23 dnl Give error and exit if we don't have pkgconfig
24 if test "x$HAVE_PKGCONFIG" = "xno"; then
25   AC_MSG_ERROR(you need to have pkgconfig installed !)
28 dnl Now we're ready to ask for gstreamer libs and cflags
29 dnl And we can also ask for the right version of gstreamer
31 GST_MAJORMINOR=0.10
33 GSTCORE_REQUIRED=0.10.0
34 GSTBASE_REQUIRED=0.10.0
36 dnl =======================================================================
37 dnl We are checking for a lot of things from the GStreamer core that
38 dnl an app might possibly be interested in here. Your app might not need
39 dnl all of these, but it can't hurt to check for them either (and they
40 dnl should all be installed on development systems anyway)
41 dnl =======================================================================
43 PKG_CHECK_MODULES(GST, [
44     gstreamer-$GST_MAJORMINOR              >= $GSTCORE_REQUIRED
45     gstreamer-base-$GST_MAJORMINOR         >= $GSTCORE_REQUIRED
46     gstreamer-controller-$GST_MAJORMINOR   >= $GSTCORE_REQUIRED
47   ], [
48     HAVE_GST=yes
49   ], [
50     HAVE_GST=no
51   ])
52                                                                                 
53 dnl =======================================================================
54 dnl Give error and exit if couldn't find gstreamer development files
55 dnl =======================================================================
56 if test "x$HAVE_GST" = "xno";
57 then
58   AC_MSG_ERROR([
59     Can't find the following GStreamer development packages:
61       gstreamer-$GST_MAJORMINOR              >= $GSTCORE_REQUIRED
62       gstreamer-base-$GST_MAJORMINOR         >= $GSTCORE_REQUIRED
63       gstreamer-controller-$GST_MAJORMINOR   >= $GSTCORE_REQUIRED
65     Please make sure you have the necessary GStreamer-$GST_MAJORMINOR
66     development headers installed.
68     On debian/Ubuntu systems you will probably need to install the
69     the 'libgstreamer$GST_MAJORMINOR-dev' package.
71     On RPM-based systems you will probably need to install the
72     'gstreamer-devel-$GST_MAJORMINOR' package.
73   ])
76 dnl =======================================================================
77 dnl Make GST_CFLAGS and GST_LIBS available for use in Makefile.am files
78 dnl =======================================================================
80 AC_SUBST(GST_CFLAGS)
81 AC_SUBST(GST_LIBS)
87 dnl =======================================================================
88 dnl OPTIONAL:
89 dnl Also check for extra stuff that is in gst-plugins-base, like additional
90 dnl tags for example. You might not need this.
91 dnl =======================================================================
93 PKG_CHECK_MODULES(GST_PLUGINS_BASE, [
94     gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTBASE_REQUIRED
95   ], [
96     HAVE_GST_PLUGINS_BASE=yes
97   ], [
98     HAVE_GST_PLUGINS_BASE=no
99   ])
100                                                                                 
101 dnl =======================================================================
102 dnl Give a warning only if we don't find the gstreamer plugins base stuff
103 dnl =======================================================================
105 if test "x$HAVE_GST_PLUGINS_BASE" = "xno"
106 then
107   AC_MSG_NOTICE([
108     Can't find the following GStreamer development packages:
110       gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTBASE_REQUIRED
112     Please make sure you have the necessary GStreamer-$GST_MAJORMINOR
113     development headers installed.
115     On debian/Ubuntu systems you will probably need to install the
116     the 'libgstreamer-plugins-base$GST_MAJORMINOR-dev' package.
118     On RPM-based systems you will probably need to install the
119     'gstreamer-plugins-base-devel-$GST_MAJORMINOR' package.
120   ])
121   sleep 3
124 dnl =======================================================================
125 dnl Make GST_CFLAGS and GST_LIBS available for use in Makefile.am files
126 dnl =======================================================================
128 AC_SUBST(GST_PLUGINS_BASE_CFLAGS)
129 AC_SUBST(GST_PLUGINS_BASE_LIBS)
132 dnl =======================================================================
133 dnl Finally, create Makefiles in all directories
134 dnl =======================================================================
136 AC_OUTPUT([
137 Makefile
138 src/Makefile