File: acinclude.m4

package info (click to toggle)
roxterm 1.11.1-1.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,468 kB
  • ctags: 1,057
  • sloc: ansic: 10,482; sh: 9,085; xml: 305; makefile: 166
file content (33 lines) | stat: -rw-r--r-- 705 bytes parent folder | download | duplicates (2)
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
dnl Checks lib $1 for function $2, setting $3 to 1 or 0 accordingly. If it
dnl doesn't find $2 it performs the same for function $4 and variable $5.
AC_DEFUN([TH_CHECK_ALTERNATIVE_FUNCS],
[
    $3=0
    $5=0
    AC_CHECK_LIB($1, $2,
    [
	$3=1
    ],
    [
	AC_CHECK_LIB($1, $4,
	[
	    $5=1
	],
	[
	    AC_MSG_ERROR([Unable to find functions $2 or $4 in lib $1])
	])
    ])
    AC_DEFINE_UNQUOTED([$3], [$$3], [Alternative function in lib $1])
    AC_DEFINE_UNQUOTED([$5], [$$5], [Alternative function in lib $1])
])

# Recursively evaluates a variable until
# it contains no references to other variables
AC_DEFUN([TH_EXPAND_VARS],
[
	while echo $$1 | grep -q '\$'
	do
		$1="`eval echo $$1`"
	done
])