From 8b40c0bf17ca3e007721085a3bb627a2abd52777 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Mon, 16 Mar 2009 13:26:34 -0400 Subject: [PATCH] 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 --- configure.ac | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) 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])) -- 2.39.5