From 317a0e8ca57b40ff89e78f46af85503695657d92 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tiziano=20M=C3=BCller?= Date: Wed, 8 Apr 2015 13:29:36 +0200 Subject: [PATCH] Use AC_CONFIG_LIBOBJ_DIR and AC_REPLACE_FUNCS to adhere to autoconf standards --- configure.ac | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 2d638fce..58d08434 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,10 @@ LDFLAGS=${LDFLAGS-""} AC_CANONICAL_HOST +dnl define the directory for replacement function since AC_LIBOBJ does not +dnl officially support subdirs and fails with automake +AC_CONFIG_LIBOBJ_DIR([lib]) + # We must decide this before testing the compiler. # Please allow this to default to yes, so that your users have more @@ -488,8 +492,7 @@ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, dnl AC_MSG_NOTICE([Looking in libraries: $LIBS]) -AC_CHECK_FUNCS(inet_ntop, , [AC_LIBOBJ(lib/inet_ntop)]) -AC_CHECK_FUNCS(inet_pton, , [AC_LIBOBJ(lib/inet_pton)]) +AC_REPLACE_FUNCS([inet_ntop inet_pton]) AC_HAVE_TYPE([struct addrinfo], [#include ]) AC_HAVE_TYPE([struct sockaddr_storage], [#include @@ -521,9 +524,9 @@ if test x"$rsync_cv_HAVE_GETADDR_DEFINES" = x"yes" -a x"$ac_cv_type_struct_addri AC_DEFINE(HAVE_GETADDRINFO, 1, [Define to 1 if you have the "getaddrinfo" function and required types.])], [AC_MSG_RESULT([no]) - AC_LIBOBJ(lib/getaddrinfo)])]) + AC_LIBOBJ(getaddrinfo)])]) else - AC_LIBOBJ(lib/getaddrinfo) + AC_LIBOBJ(getaddrinfo) fi AC_CHECK_MEMBER([struct sockaddr.sa_len], @@ -750,7 +753,7 @@ if test x"$rsync_cv_HAVE_SOCKETPAIR" = x"yes"; then AC_DEFINE(HAVE_SOCKETPAIR, 1, [Define to 1 if you have the "socketpair" function]) fi -AC_CHECK_FUNCS(getpass, , [AC_LIBOBJ(lib/getpass)]) +AC_REPLACE_FUNCS([getpass]) if test x"$with_included_popt" != x"yes"; then AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes]) -- 2.47.2