1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00
freebsd/contrib/ntp/sntp/m4/hms_search_lib.m4
Cy Schubert 2b15cb3d09 MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
Thanks to roberto for providing pointers to wedge this into HEAD.

Approved by:	roberto
2015-03-30 13:30:15 +00:00

31 lines
701 B
Plaintext

dnl Helper function to manage granular libraries
dnl
dnl Usage:
dnl
dnl LIB_MATH=''
dnl AC_SUBST([LIB_MATH])
dnl ...
dnl HMS_SEARCH_LIBS([LIB_MATH], [sqrt], [m], [AIF], [AINF], [OL])
dnl
dnl which expands to something like:
dnl
dnl AC_SEARCH_LIBS([sqrt], [m], [case "$ac_cv_search_sqrt" in
dnl 'none required') ;;
dnl no) ;;
dnl *) LIB_MATH="$ac_cv_search_sqrt $LIB_MATH" ;;
dnl esac
dnl [AIF]],
dnl [AINF],
dnl [OL])
dnl
dnl arguments are: lib-var, function, search-libs, [AIF], [AINF], [other-libs]
AC_DEFUN([HMS_SEARCH_LIBS],
[AC_SEARCH_LIBS([$2], [$3], [case "$ac_cv_search_$2[]" in
'none required') ;;
no) ;;
*) $1[]="$ac_cv_search_$2[] $[]$1" ;;
esac
$4],
$5,
[$6])])