From: Chuck Lever Date: Mon, 16 Mar 2009 17:26:34 +0000 (-0400) Subject: configure: add defensive quoting in some function checks X-Git-Tag: nfs-utils-1-1-6-rc2~8 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=8b40c0bf17ca3e007721085a3bb627a2abd52777 configure: add defensive quoting in some function checks Clean up: Add proper m4 quoting in macros that check for the presence of some functions in configure.ac. Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson --- diff --git a/configure.ac b/configure.ac index 5db4417..97b084b 100644 --- a/configure.ac +++ b/configure.ac @@ -176,23 +176,26 @@ AC_BSD_SIGNALS dnl ************************************************************* dnl * Check for required libraries dnl ************************************************************* -AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname, [LIBNSL="-lnsl"])]) + +AC_CHECK_FUNC([gethostbyname], , + [AC_CHECK_LIB([nsl], [gethostbyname], [LIBNSL="-lnsl"])]) AC_SUBST(LIBNSL) -AC_CHECK_FUNC(connect, , - AC_CHECK_LIB(socket, connect, [LIBSOCKET="-lsocket"], - AC_MSG_ERROR(Function 'socket' not found.), $LIBNSL)) +AC_CHECK_FUNC([connect], , + [AC_CHECK_LIB([socket], [connect], [LIBSOCKET="-lsocket"], + [AC_MSG_ERROR([Function 'socket' not found.])], [$LIBNSL])]) + +AC_CHECK_FUNC([getaddrinfo], , , + [AC_MSG_ERROR([Function 'getaddrinfo' not found.])]) -AC_CHECK_FUNC(getaddrinfo, , , - AC_MSG_ERROR(Function 'getaddrinfo' not found.)) +AC_CHECK_FUNC([getrpcbynumber], , , + [AC_MSG_ERROR([Function 'getrpcbynumber' not found.])]) -AC_CHECK_FUNC(getrpcbynumber, , , - AC_MSG_ERROR(Function 'getrpcbynumber' not found.)) +AC_CHECK_FUNC([getservbyname], , , + [AC_MSG_ERROR([Function 'getservbyname' not found.])]) -AC_CHECK_FUNC(getservbyname, , , - AC_MSG_ERROR(Function 'getservbyname' not found.)) +AC_CHECK_LIB([crypt], [crypt], [LIBCRYPT="-lcrypt"]) -AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"]) if test "$enable_nfsv4" = yes; then AC_CHECK_LIB(event, event_dispatch, [libevent=1], AC_MSG_ERROR([libevent needed for nfsv4 support])) AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, [libnfsidmap=1], AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))