tracers: Only link against libgstprintf.la if the debugging system is enabled
[platform/upstream/gstreamer.git] / configure.ac
index 71309c9..0ffc9f1 100644 (file)
@@ -4,7 +4,7 @@ dnl initialize autoconf
 dnl when going to/from release please set the nano (fourth number) right !
 dnl releases only do Wall, git and prerelease does Werror too
 dnl
-AC_INIT([GStreamer],[1.5.1.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gstreamer])
+AC_INIT([GStreamer],[1.7.0.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gstreamer])
 AG_GST_INIT
 
 dnl initialize automake (we require GNU make)
@@ -62,7 +62,7 @@ dnl      1.2.5 => 205
 dnl      1.10.9 (who knows) => 1009
 dnl
 dnl sets GST_LT_LDFLAGS
-AS_LIBTOOL(GST, 501, 0, 501)
+AS_LIBTOOL(GST, 700, 0, 700)
 
 dnl *** autotools stuff ****
 
@@ -325,6 +325,44 @@ AC_PATH_PROG([SETCAP], [setcap], [no], [$PATH:/usr/bin:/bin:/usr/sbin:/sbin])
 if test "x$HAVE_PTP" = "xyes"; then
 AC_DEFINE(HAVE_PTP, 1, [PTP support available])
 
+AC_MSG_CHECKING([for SIOCGIFCONF, SIOCGIFFLAGS and SIOCGIFHWADDR])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+    [[
+        #include <sys/ioctl.h>
+        #include <net/if.h>
+    ]],
+    [[
+        struct ifreq ifr;
+        struct ifconf ifc;
+        ioctl(0, SIOCGIFCONF, &ifc);
+        ioctl(0, SIOCGIFFLAGS, &ifr);
+        ioctl(0, SIOCGIFHWADDR, &ifr);
+        int dummy = ifr.ifr_hwaddr.sa_data[0];
+    ]])], [
+        AC_MSG_RESULT(yes)
+        AC_DEFINE(HAVE_SIOCGIFCONF_SIOCGIFFLAGS_SIOCGIFHWADDR, 1, [SIOCGIFCONF, SIOCGIFFLAGS and SIOCGIFHWADDR is available])
+    ], [
+        AC_MSG_RESULT(no)
+])
+
+AC_MSG_CHECKING([for getifaddrs() and AF_LINK])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+    [[
+        #include <ifaddrs.h>
+        #include <net/if.h>
+        #include <net/if_dl.h>
+    ]],
+    [[
+        struct ifaddrs *ifaddr;
+        getifaddrs(&ifaddr);
+        int dummy = (ifaddr->ifa_flags & IFF_LOOPBACK) && ifaddr->ifa_addr->sa_family != AF_LINK;
+    ]])], [
+        AC_MSG_RESULT(yes)
+        AC_DEFINE(HAVE_GETIFADDRS_AF_LINK, 1, [getifaddrs() and AF_LINK is available])
+    ], [
+        AC_MSG_RESULT(no)
+    ])
+
 AC_MSG_CHECKING([how to install gst-ptp-helper])
 if test "x$with_ptp_helper_permissions" = "xauto"; then
     if test "x$gst_ptp_have_cap" = "xyes" -a "x$SETCAP" != "xno"; then
@@ -566,6 +604,9 @@ AC_CHECK_FUNCS([strcasestr])
 AC_CHECK_FUNCS([gmtime_r])
 AC_CHECK_FUNCS([localtime_r])
 AC_CHECK_FUNCS([sigaction])
+AC_CHECK_FUNCS([getrusage])
+AM_CONDITIONAL(HAVE_GETRUSAGE, test "x$ac_cv_func_getrusage" = "xyes")
+AC_CHECK_HEADERS([sys/resource.h])
 
 dnl check for fseeko()
 AC_FUNC_FSEEKO
@@ -582,6 +623,14 @@ AC_CHECK_FUNCS([poll])
 AC_CHECK_FUNCS([ppoll])
 AC_CHECK_FUNCS([pselect])
 
+dnl check for socketpair()
+AC_CHECK_FUNC(socketpair, [], [
+  AC_CHECK_LIB(socket, socketpair, [
+    SOCKET_LIBS="-lsocket"
+    AC_SUBST(SOCKET_LIBS)
+  ])
+])
+
 dnl ****************************************
 dnl *** GLib POLL* compatibility defines ***
 dnl ****************************************
@@ -722,13 +771,23 @@ fi
 dnl *** checks for dependency libraries ***
 
 dnl GLib
-GLIB_REQ=2.32.0
+GLIB_REQ=2.40.0
 AG_GST_GLIB_CHECK([$GLIB_REQ])
 
 dnl Check for documentation xrefs
 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
 AC_SUBST(GLIB_PREFIX)
 
+dnl GTK is optional and only used in examples
+HAVE_GTK=no
+GTK_REQ=3.10
+if test "x$BUILD_EXAMPLES" = "xyes"; then
+  PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQ, HAVE_GTK=yes, HAVE_GTK=no)
+  AC_SUBST(GTK_LIBS)
+  AC_SUBST(GTK_CFLAGS)
+fi
+AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
+
 dnl building of unit test libraries
 AC_ARG_ENABLE(check,
   AS_HELP_STRING([--disable-check],[disable building unit test libraries]),
@@ -934,6 +993,7 @@ libs/gst/helpers/Makefile
 libs/gst/net/Makefile
 plugins/Makefile
 plugins/elements/Makefile
+plugins/tracers/Makefile
 po/Makefile.in
 tests/Makefile
 tests/benchmarks/Makefile