fixed profile settings
[dreamrtspserver.git] / configure.ac
1 AC_INIT([dreamrtspserver],[0.1],[fraxinas@opendreambox.org])
2 AM_INIT_AUTOMAKE([foreign])
3
4 AC_CONFIG_SRCDIR([src/dreamrtspserver.c])
5
6 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
7 AC_USE_SYSTEM_EXTENSIONS
8 AC_SYS_LARGEFILE
9
10 dnl find a compiler
11 AC_PROG_CC
12 AC_PROG_CC_STDC
13
14 dnl check if the compiler supports '-c' and '-o' options
15 AM_PROG_CC_C_O
16
17 # Checks for header files.
18 AC_CHECK_HEADERS([stdio.h stdlib.h fcntl.h string.h getopt.h byteswap.h netinet/in.h])
19
20 # Checks for typedefs, structures, and compiler characteristics.
21 AC_TYPE_SIZE_T
22
23 # Check for libsoup
24 PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.42])
25 AC_SUBST(LIBSOUP_CFLAGS)
26 AC_SUBST(LIBSOUP_LIBS)
27
28 # Check for Gstreamer 1.0
29 PKG_CHECK_MODULES(GST, [gstreamer-1.0], [])
30 PKG_CHECK_MODULES(GSTRTSP, [gstreamer-rtsp-1.0], [])
31 PKG_CHECK_MODULES(GSTRTSPSERVER, [gstreamer-rtsp-server-1.0], [])
32 PKG_CHECK_MODULES(GSTAPP, [gstreamer-app-1.0 ], [])
33 PKG_CHECK_MODULES(GIO, [gio-2.0 ], [])
34
35 AC_ARG_WITH(upstream,
36         AS_HELP_STRING([--with-upstream],[enable mediator upstream feature @<:@default=disable@:>@]),
37         [with_upstream="$withval"],[with_upstream="no"])
38 if test "$with_upstream" = "yes"; then
39         AC_DEFINE([HAVE_UPSTREAM],[1],[defined to 1 if upstream is available])
40 fi
41 AM_CONDITIONAL(HAVE_UPSTREAM, test "$with_upstream" = "yes")
42
43 AC_CONFIG_FILES([
44 Makefile
45 src/Makefile
46 ])
47 AC_OUTPUT
48
49 AS_IF([test "$with_upstream" = "yes"],[
50 echo "  Enabled mediator upstream feature"
51 ])