diff options
author | Jim Meyering <jim@meyering.net> | 2000-05-05 16:10:03 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-05-05 16:10:03 +0000 |
commit | 7d4bd8f67151bbd6c0ed5a7659fb0bef7a64e1ae (patch) | |
tree | 7467fa05fd4feb8cfd9e958fd6262f1caf81c472 /m4 | |
parent | 46b48d2e0ea8fd455dcc6f8a4710373da96dd7df (diff) | |
download | coreutils-7d4bd8f67151bbd6c0ed5a7659fb0bef7a64e1ae.tar.xz |
Update from autoconf.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/search-libs.m4 | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/m4/search-libs.m4 b/m4/search-libs.m4 index ea3be9def..773da59d7 100644 --- a/m4/search-libs.m4 +++ b/m4/search-libs.m4 @@ -1,4 +1,4 @@ -#serial 3 +#serial 4 dnl A replacement for autoconf's macro by the same name. This version dnl uses `ac_lib' rather than `i' for the loop variable, but more importantly @@ -8,36 +8,36 @@ dnl the `none required' case. dnl I hope it's only temporary while we wait for that version to be fixed. undefine([AC_SEARCH_LIBS]) -dnl AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]]) -dnl Search for a library defining FUNC, if it's not already available. - +# AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], +# [OTHER-LIBRARIES]) +# -------------------------------------------------------- +# Search for a library defining FUNC, if it's not already available. AC_DEFUN(AC_SEARCH_LIBS, [ AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1], [ - ac_func_search_save_LIBS="$LIBS" - ac_cv_search_$1="no" - AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"]) - if test "$ac_cv_search_$1" = "no"; then + ac_func_search_save_LIBS=$LIBS + ac_cv_search_$1=no + AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1='none required']) + if test "$ac_cv_search_$1" = no; then for ac_lib in $2; do LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS" - AC_TRY_LINK_FUNC([$1], - [ac_cv_search_$1="-l$ac_lib" - break]) + AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="-l$ac_lib"; break]) done fi - LIBS="$ac_func_search_save_LIBS" + LIBS=$ac_func_search_save_LIBS ]) - if test "$ac_cv_search_$1" = "no"; then : + if test "$ac_cv_search_$1" = no; then : $4 else - if test "$ac_cv_search_$1" = "none required"; then : + if test "$ac_cv_search_$1" = 'none required'; then : $4 else LIBS="$ac_cv_search_$1 $LIBS" $3 + # m4_default([$3], [LIBS="$ac_cv_search_$1 $LIBS"]) fi fi ]) |