Initial release
[adaptation/ap_samsung/gst-plugins-s5pc2xx.git] / configure.ac
1 dnl Copyright (c) 2006 Software Laboratory, SAMSUNG Electronics, Inc.
2 dnl All rights reserved.
3 dnl
4 dnl This software is the confidential and proprietary information of
5 dnl SAMSUNG Electronics, Inc. ("Confidential Information").
6 dnl You shall not disclose such Confidential Information and shall use it
7 dnl only in accordance with the terms of the license agreement you entered into
8 dnl with SAMSUNG Electronics.
9 dnl
10 dnl Orignal by Jeechul jeon <heechul.jeon@samsung.com>
11
12 AC_INIT(gst-plugins-s5pc210, 1.0)
13  
14 dnl versions of gstreamer and plugins-base
15 GST_MAJORMINOR=0.10
16 GST_REQUIRED=0.10.0
17 GSTPB_REQUIRED=0.10.0
18 AC_SUBST(GST_MAJORMINOR)
19
20 dnl fill in your package name and version here
21 dnl the fourth (nano) number should be 0 for a release, 1 for CVS,
22 dnl and 2... for a prerelease
23
24 dnl when going to/from release please set the nano correctly !
25 dnl releases only do Wall, cvs and prerelease does Werror too
26 AS_VERSION(gst-plugin, GST_PLUGIN_VERSION, 0, 10, 0, 1,
27     GST_PLUGIN_CVS="no", GST_PLUGIN_CVS="yes")
28
29 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
30 AM_MAINTAINER_MODE
31
32 #AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
33 AM_INIT_AUTOMAKE
34
35 #AC_CONFIG_MACRO_DIR([m4])
36
37 dnl make aclocal work in maintainer mode
38 dnl AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
39
40 dnl Add parameters for aclocal
41 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
42
43 AM_CONFIG_HEADER(config.h)
44
45 dnl check for tools
46 AC_PROG_CC
47 AC_PROG_CXX
48 AC_PROG_LIBTOOL
49
50 AC_ARG_ENABLE(aquila, AC_HELP_STRING([--enable-aquila], [using enable-aquila]),
51         [
52                 case "${enableval}" in
53                         yes) IS_AQUILA=yes ;;
54                         no) IS_AQUILA=no ;;
55                         *)  AC_MSG_ERROR(bad value ${enableval} for --enable-aquila) ;;
56                 esac
57         ],
58         [IS_AQUILA=yes])
59 AM_CONDITIONAL([IS_AQUILA], [test "x$IS_AQUILA" = "xyes"])
60
61 AC_ARG_ENABLE(sdk, AC_HELP_STRING([--enable-sdk], [sdk build]),
62         [
63                 case "${enableval}" in
64                         yes) IS_SDK=yes ;;
65                         no)  IS_SDK=no ;;
66                         *)   AC_MSG_ERROR(bad value ${enableval} for --enable-sdk) ;;
67                 esac
68         ]
69         [IS_SDK=no])
70 AM_CONDITIONAL([IS_SDK], [test "x$IS_SDK" = "xyes"])
71
72 dnl decide on error flags
73 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
74                                                                                 
75 if test "x$GST_WALL" = "xyes"; then
76    GST_ERROR="$GST_ERROR -Wall"
77                                                                                 
78 #   if test "x$GST_PLUGIN_CVS" = "xyes"; then
79 #     AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
80 #   fi
81 fi
82
83 dnl Check for pkgconfig first
84 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
85
86 dnl Give error and exit if we don't have pkgconfig
87 if test "x$HAVE_PKGCONFIG" = "xno"; then
88   AC_MSG_ERROR(you need to have pkgconfig installed !)
89 fi
90
91 dnl Now we're ready to ask for gstreamer libs and cflags
92 dnl And we can also ask for the right version of gstreamer
93 PKG_CHECK_MODULES(GST, \
94   gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
95   HAVE_GST=yes,HAVE_GST=no)
96
97 dnl Give error and exit if we don't have gstreamer
98 if test "x$HAVE_GST" = "xno"; then
99   AC_MSG_ERROR(you need gstreamer development packages installed !)
100 fi
101
102 dnl append GST_ERROR cflags to GST_CFLAGS
103 GST_CFLAGS="$GST_CFLAGS $GST_ERROR"
104
105 dnl make GST_CFLAGS and GST_LIBS available
106 PKG_CHECK_MODULES(GST, gstreamer-0.10 >= 0.10)
107 AC_SUBST(GST_CFLAGS)
108 AC_SUBST(GST_LIBS)
109
110 dnl make GST_MAJORMINOR available in Makefile.am
111 AC_SUBST(GST_MAJORMINOR)
112
113 dnl If we need them, we can also use the base class libraries
114 PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQUIRED,
115                   HAVE_GST_BASE=yes, HAVE_GST_BASE=no)
116
117 dnl Give a warning if we don't have gstreamer libs
118 dnl you can turn this into an error if you need them
119 if test "x$HAVE_GST_BASE" = "xno"; then
120   AC_MSG_NOTICE(no GStreamer base class libraries found (gstreamer-base-$GST_MAJORMINOR))
121 fi
122
123 dnl make _CFLAGS and _LIBS available
124 AC_SUBST(GST_BASE_CFLAGS)
125 AC_SUBST(GST_BASE_LIBS)
126
127 dnl If we need them, we can also use the gstreamer-plugins-base libraries
128 PKG_CHECK_MODULES(GSTPB_BASE,
129                   gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPB_REQUIRED,
130                   HAVE_GSTPB_BASE=yes, HAVE_GSTPB_BASE=no)
131
132 dnl Give a warning if we don't have gstreamer libs
133 dnl you can turn this into an error if you need them
134 if test "x$HAVE_GSTPB_BASE" = "xno"; then
135   AC_MSG_NOTICE(no GStreamer Plugins Base libraries found (gstreamer-plugins-base-$GST_MAJORMINOR))
136 fi
137
138 dnl make _CFLAGS and _LIBS available
139 AC_SUBST(GSTPB_BASE_CFLAGS)
140 AC_SUBST(GSTPB_BASE_LIBS)
141
142 dnl If we need them, we can also use the gstreamer-controller libraries
143 PKG_CHECK_MODULES(GSTCTRL,
144                   gstreamer-controller-$GST_MAJORMINOR >= $GSTPB_REQUIRED,
145                   HAVE_GSTCTRL=yes, HAVE_GSTCTRL=no)
146
147 dnl Give a warning if we don't have gstreamer-controller
148 dnl you can turn this into an error if you need them
149 if test "x$HAVE_GSTCTRL" = "xno"; then
150   AC_MSG_NOTICE(no GStreamer Controller libraries found (gstreamer-controller-$GST_MAJORMINOR))
151 fi
152
153 dnl make _CFLAGS and _LIBS available
154 AC_SUBST(GSTCTRL_CFLAGS)
155 AC_SUBST(GSTCTRL_LIBS)
156
157 dnl set the plugindir where plugins should be installed
158 if test "x${prefix}" = "x$HOME"; then
159   plugindir="$HOME/.gstreamer-$GST_MAJORMINOR/plugins"
160 else
161   plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
162 fi
163 AC_SUBST(plugindir)
164
165 dnl set proper LDFLAGS for plugins
166 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
167 AC_SUBST(GST_PLUGIN_LDFLAGS)
168
169 PKG_CHECK_MODULES(GST_AUDIO, gstreamer-audio-$GST_MAJORMINOR >= $GST_REQUIRED )
170
171
172 dnl make _CFLAGS and _LIBS available
173 AC_SUBST(GST_AUDIO_CFLAGS)
174 AC_SUBST(GST_AUDIO_LIBS)
175
176 PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-$GST_MAJORMINOR >= $GST_REQUIRED)
177
178 dnl make _CFLAGS and _LIBS available
179 AC_SUBST(GST_VIDEO_CFLAGS)
180 AC_SUBST(GST_VIDEO_LIBS)
181
182 dnl gstreamer interface for camerasrc plugin
183 PKG_CHECK_MODULES(GST_INTERFACES, gstreamer-interfaces-$GST_MAJORMINOR >= $GST_REQUIRED)
184 AC_SUBST(GST_INTERFACES_CFLAGS)
185 AC_SUBST(GST_INTERFACES_LIBS)
186
187 dnl use time analysis module
188 PKG_CHECK_MODULES(MMTA, mm-ta)
189 AC_SUBST(MMTA_CFLAGS)
190 AC_SUBST(MMTA_LIBS)
191
192 AC_OUTPUT(
193 Makefile
194 common/Makefile
195 common/m4/Makefile
196 camerasrc/Makefile
197 camerasrc/src/Makefile
198 )
199