handle both -llib and lib in the second argument
also yes -> "" as a library, to ease callers that send in results from this macro (this might be a little bit unclean) git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10584 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -13,11 +13,12 @@ AC_CACHE_VAL(ac_cv_funclib_$1,
|
|||||||
if eval "test \"\$ac_cv_func_$1\" != yes" ; then
|
if eval "test \"\$ac_cv_func_$1\" != yes" ; then
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
for ac_lib in $2; do
|
for ac_lib in $2; do
|
||||||
if test -n "$ac_lib"; then
|
case "$ac_lib" in
|
||||||
ac_lib="-l$ac_lib"
|
"") ;;
|
||||||
else
|
yes) ac_lib="" ;;
|
||||||
ac_lib=""
|
-l*) ;;
|
||||||
fi
|
*) ac_lib="-l$ac_lib" ;;
|
||||||
|
esac
|
||||||
LIBS="$6 $ac_lib $5 $ac_save_LIBS"
|
LIBS="$6 $ac_lib $5 $ac_save_LIBS"
|
||||||
AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break)
|
AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break)
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user