File: acinclude.m4

package info (click to toggle)
xmms-cdread 0.14a-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 832 kB
  • ctags: 269
  • sloc: sh: 7,705; ansic: 3,052; makefile: 65
file content (40 lines) | stat: -rw-r--r-- 882 bytes parent folder | download | duplicates (3)
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
40
dnl Some handy functions

dnl Try a list of directories, set the first one found
dnl Usage: AC_CHECK_DIRS(DIRECTORY..., ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)

AC_DEFUN(AC_CHECK_DIRS,
[
for ac_dir in $1
do
AC_MSG_CHECKING([for directory ${ac_dir}])
if test -d ${ac_dir}
then
  AC_MSG_RESULT(yes)
  ifelse([$2], , :, [$2])
  break
else
  AC_MSG_RESULT(no)
fi
done
if test ! -d ${ac_dir}
then
  ifelse([$3], , :, [$3])
fi
])

dnl Check if a symbol is global
dnl Usage: AC_CHECK_GLOBAL_SYMBOL(OBJECT, SYMBOL, ACTION-IF-FOUND,
dnl                                               ACTION-IF-NOT-FOUND)

AC_DEFUN(AC_CHECK_GLOBAL_SYMBOL,
[
AC_MSG_CHECKING([for global symbol $2 in $1])
if objdump -T $1 | grep "\<$2\>" >/dev/null 2>&1 ;then
  AC_MSG_RESULT(yes)
  ifelse([$3], ,AC_DEFINE(translit(HAVE_GLOBAL_$2, [a-z], [A-Z])) , [$3])
else
  AC_MSG_RESULT(no)
  ifelse([$4], , :, [$4])
fi
])