File: gst-dowhile.m4

package info (click to toggle)
gstreamer0.10-editing-services 0.10.1-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 5,004 kB
  • ctags: 2,595
  • sloc: ansic: 12,993; sh: 11,678; perl: 1,620; makefile: 779; python: 340; xml: 83
file content (24 lines) | stat: -rw-r--r-- 853 bytes parent folder | download | duplicates (80)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
dnl
dnl Check for working do while(0) macros. This is used by G_STMT_START
dnl and G_STMT_END in glib/gmacros.h. Without having this defined we
dnl get "ambigious if-else" compiler warnings when compling C++ code.
dnl
dnl Copied from GLib's configure.in
dnl
AC_DEFUN([AG_GST_CHECK_DOWHILE_MACROS],[

dnl *** check for working do while(0) macros ***
AC_CACHE_CHECK([for working do while(0) macros], _cv_g_support_dowhile_macros, [
	AC_TRY_COMPILE([],[
	#define STMT_START do
	#define STMT_END while(0)
	#define STMT_TEST STMT_START { i = 0; } STMT_END
	int main(void) { int i = 1; STMT_TEST; return i; }],
	[_cv_g_support_dowhile_macros=yes],
	[_cv_g_support_dowhile_macros=no],
	[_cv_g_support_dowhile_macros=yes])
])
if test x$_cv_g_support_dowhile_macros = xyes; then
  AC_DEFINE(HAVE_DOWHILE_MACROS, 1, [define for working do while(0) macros])
fi
])