File: aclocal.m4

package info (click to toggle)
asp 1.7
  • links: PTS
  • area: main
  • in suites: potato
  • size: 264 kB
  • ctags: 89
  • sloc: ansic: 1,058; sh: 189; makefile: 166
file content (24 lines) | stat: -rw-r--r-- 665 bytes parent folder | download | duplicates (7)
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 ASP_FLUSHLEFT removes spaces form the beginning of every line
dnl of $1
AC_DEFUN(ASP_FLUSHLEFT,
	[changequote(`, ')dnl
patsubst(`$1', `^[	 ]+')
	changequote([, ])])dnl

dnl ASP_HECK_DECL see if a function/variable is declared
dnl $1 name of c symbol to check
dnl $2 C program text to include necessary files for testing
dnl if $1 is declared defines HAVE_NAME_DECL
AC_DEFUN(ASP_CHECK_DECL,
	[AC_CACHE_CHECK(for $1 declaration,
		asp_cv_decl_$1,
		[AC_TRY_COMPILE(ASP_FLUSHLEFT([$2]),
			[char *p = (char *)$1],
			asp_cv_decl_$1=yes,
			asp_cv_decl_$1=no
		)]
	)
	if test $asp_cv_decl_$1 = yes; then
		AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_DECL])
	fi]
)