1 dnl XMMS_FUNC_POSIX(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
2 dnl Test for functions in posix libraries, and define POSIX_LIBS
3 AC_DEFUN(XMMS_FUNC_POSIX,
10 AC_CHECK_FUNC($xmms_func,xmms_have_func=yes,[
11 dnl try in libposix4 if not found in current LIBS
12 AC_CHECK_LIB(posix4,$xmms_func,[xmms_have_func=yes xmms_posix4=yes],[
13 dnl try in librt, if not found so far
14 AC_CHECK_LIB(rt,$xmms_func,[xmms_have_func=yes xmms_rt=yes])
17 if test $xmms_have_func = yes; then
19 xmms_tr_func=HAVE_`echo $xmms_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21 AC_DEFINE_UNQUOTED($xmms_tr_func)
22 ifelse([$2], , :, [$2])
24 ifelse([$3], , :, [$3])
28 if test $xmms_posix4 = yes; then
31 if test $xmms_rt = yes; then
32 POSIX_LIBS="$POSIX_LIBS -lrt"