File: acinclude.m4

package info (click to toggle)
libidl 0.8.14-0.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,144 kB
  • sloc: sh: 10,238; ansic: 3,650; yacc: 1,805; lex: 441; makefile: 57
file content (39 lines) | stat: -rw-r--r-- 895 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
dnl Autoconf extension macros for libIDL
AC_DEFUN([AC_CPP_ACCEPT_IDL],
	[AC_CACHE_CHECK([if C preprocessor likes IDL],
		ac_cv_cpp_accept_idl,
		[AC_TRY_CPP([
			#pragma prefix "foo.org"
			module FOO {
				typedef unsigned long long big;
				interface BAR {
					readonly attribute big number;
				};
			};
		],
		ac_cv_cpp_accept_idl=yes,
		ac_cv_cpp_accept_idl=no)])])

AC_DEFUN([AC_CPP_PIPE_STDIN],
	[AC_CACHE_CHECK([if C preprocessor can read from stdin],
		ac_cv_cpp_pipe_stdin,
		[AC_REQUIRE_CPP
		if echo | $CPP - 2>/dev/null 1>&2 ; then
			ac_cv_cpp_pipe_stdin=yes
		else
			ac_cv_cpp_pipe_stdin=no
		fi])
	if test $ac_cv_cpp_pipe_stdin = yes ; then
		AC_DEFINE(HAVE_CPP_PIPE_STDIN)
	fi])

AC_DEFUN([AC_UPDATE_IF_CHANGED],
	[if test -f "$2"; then
		if cmp -s "$1" "$2" 2>/dev/null; then
			echo "$1 is unchanged"
		else
			echo "$1 has changed"
			rm -f "$1"
			cp "$2" "$1"
		fi
	fi])