autofs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Waldemar Brodkorb <wbx@openadk.org>
Cc: autofs@vger.kernel.org
Subject: Re: [PATCH v2] use pkg-config to search for libtirpc to fix cross-compilation
Date: Thu, 29 Jun 2017 21:15:00 +0800	[thread overview]
Message-ID: <1498742100.2734.6.camel@themaw.net> (raw)
In-Reply-To: <20170629090814.GD26922@waldemar-brodkorb.de>

On Thu, 2017-06-29 at 11:08 +0200, Waldemar Brodkorb wrote:
> Hi,
> Ian Kent wrote,
> 
> > On Wed, 2017-06-28 at 12:29 +0200, Waldemar Brodkorb wrote:
> > > When trying to cross-compile autofs for example with a buildsystem
> > > like buildroot, the compilation fails in case the user wants to use
> > > libtirpc library as RPC implementation. A hard coded include path
> > > in aclocal.m4 is used. Other opensource software like rpcbind or
> > > nfs-utils are suing autotools pkgconfig infrastructure to find
> > > the libtirpc headers and to pass the correct linker flags.
> > > 
> > > Convert configure.in to use PKG_CHECK_MODULES and remove the
> > > hand written autoconf macros from aclocal.m4.
> > > 
> > > To autoreconf the package you need pkg-config or pkgconf installed,
> > > which provides the needed autoconf macros in pkg.m4. For an
> > > non-automake project a full path to pkg.m4 is required.
> > > 
> > > This fixes cross-compilation of autofs and allows to use
> > > alternative C libraries as uClibc-ng without internal RPC
> > > support to be used in cross-compiling environments.
> > > 
> > > Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> > > ---
> > > v1 -> v2:
> > >   - add a better commit decription
> > >   - add back missing TIRPC_WORKAROUND/WITH_LIBTIRPC defines
> > >   - add back AC_CHECK_FUNCS([getrpcbyname getservbyname])
> > > 
> > > For autoheader/autoconf to generate configure/config.h you
> > > need to have pkg-config installed on your development machine.
> > > When the user does not have installed pkg-config later, he
> > > can use autofs without libtirpc as before. 
> > > Configure will fail when the user use --with-libtirpc and
> > > pkg-config is not installed.
> > 
> > Thanks for this, I'll have a look through it.
> > 
> > > +# for pkg-config macros
> > > +m4_include([/usr/share/aclocal/pkg.m4])
> > > +
> 
> Yann (Buildroot developer) found out, that this include
> can be avoided when the aclocal.m4 would be moved.
> It seems autoconf does not search for macros in any
> global directories, if this file is in the current
> directory found.

Yes, I was wondering if there was a way to avoid the full path.

> 
> Add this to configure.in: AC_CONFIG_MACRO_DIR([m4])
> mkdir m4
> git mv aclocal.m4 m4/autofs-macros.m4
> 
> Should I update the patch, according to this?

You could, to save me a bit of time, I won't get to it until tomorrow (my time).

Ian
--
To unsubscribe from this list: send the line "unsubscribe autofs" in

      reply	other threads:[~2017-06-29 13:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 10:29 [PATCH v2] use pkg-config to search for libtirpc to fix cross-compilation Waldemar Brodkorb
2017-06-28 23:54 ` Ian Kent
2017-06-29  9:08   ` Waldemar Brodkorb
2017-06-29 13:15     ` Ian Kent [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1498742100.2734.6.camel@themaw.net \
    --to=raven@themaw.net \
    --cc=autofs@vger.kernel.org \
    --cc=wbx@openadk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).