1
AC_DEFUN([BOINC_CHECK_LIB_WITH],[
2
dnl arguments $1 library name (-l$1)
4
dnl $3 variable to append LDFLAGS to
8
AC_HELP_STRING([--with-lib$1=DIR],[look for the $1 library in DIR]),
9
[_lib_with=$withval],[_lib_with=no])
11
if test "x${_lib_with}" != "xno" ; then
12
if test -d $_lib_with/. ; then
13
_NEW_LDFLAGS="${_NEW_LDFLAGS} -L${_lib_with}"
14
LIBS="${LIBS} ${_NEW_LDFLAGS}"
16
AC_CHECK_LIB([$1],[$2],[_lib_found=yes])
17
if test "x${_lib_found}" = "xyes" ; then
18
if test -f ${_lib_with} ; then
19
_NEW_LDFLAGS="${_NEW_LDFLAGS} ${_lib_with}"
20
elif test -h ${_lib_with} -a ! -d ${_lib_with}/. ; then
21
_NEW_LDFLAGS="${_NEW_LDFLAGS} ${_lib_with}"
23
_NEW_LDFLAGS="${_NEW_LDFLAGS} -l$1"
25
$3="${$3} ${_NEW_LDFLAGS}"