From 63f0fd9afc02c6e81fea9eca2f603afaf554c573 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Wed, 29 Aug 2001 00:07:57 +0000 Subject: [PATCH] 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 --- cf/find-func-no-libs2.m4 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cf/find-func-no-libs2.m4 b/cf/find-func-no-libs2.m4 index 2eddca85f..f10bc702b 100644 --- a/cf/find-func-no-libs2.m4 +++ b/cf/find-func-no-libs2.m4 @@ -13,11 +13,12 @@ AC_CACHE_VAL(ac_cv_funclib_$1, if eval "test \"\$ac_cv_func_$1\" != yes" ; then ac_save_LIBS="$LIBS" for ac_lib in $2; do - if test -n "$ac_lib"; then - ac_lib="-l$ac_lib" - else - ac_lib="" - fi + case "$ac_lib" in + "") ;; + yes) ac_lib="" ;; + -l*) ;; + *) ac_lib="-l$ac_lib" ;; + esac 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) done