[PATCH v2] Support building when fts and obstack aren't part of libc.

Érico Nogueira ericonr@disroot.org
Tue Nov 3 02:41:13 GMT 2020


On Mon Nov 2, 2020 at 10:13 PM -03, Mark Wielaard wrote:
> Hi Érico,
>
> On Sun, Nov 01, 2020 at 09:48:50PM -0300, Érico Nogueira via
> Elfutils-devel wrote:
> > From: Érico Rolim <erico.erc@gmail.com>
> > 
> > - Make configure.ac test for fts and obstack availability;
> > - Add fts and obstack ldflags to all files that need them;
> > - Add missing argp ldflags to programs in debuginfod/.
>
> This looks good.
>
> > Signed-off-by: Érico Rolim <erico.erc@gmail.com>
> > ---
> >  ChangeLog              |  4 ++++
> >  configure.ac           | 20 ++++++++++++++++++++
> >  debuginfod/Makefile.am |  6 +++---
> >  libdw/Makefile.am      |  2 +-
> >  src/Makefile.am        |  6 +++---
> >  5 files changed, 31 insertions(+), 7 deletions(-)
> > 
> > diff --git a/ChangeLog b/ChangeLog
> > index 128da6c6..565d021c 100644
> > --- a/ChangeLog
> > +++ b/ChangeLog
> > @@ -1,3 +1,7 @@
> > +2020-11-01  Érico N. Rolim  <erico.erc@gmail.com>
> > +
> > +	* configure.ac: Check for fts and obstack from outside libc.
> > +
> >  2020-10-28  Mark Wielaard  <mark@klomp.org>
> >  
> >  	* configure.ac: Set version to 0.182.
> > diff --git a/configure.ac b/configure.ac
> > index 515ac704..c1a6954d 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -542,6 +542,26 @@ else
> >  fi
> >  AC_SUBST([argp_LDADD])
> >  
> > +saved_LIBS="$LIBS"
> > +AC_SEARCH_LIBS([fts_close], [fts])
> > +LIBS="$saved_LIBS"
> > +case "$ac_cv_search_fts_close" in
> > +        no) AC_MSG_FAILURE([failed to find fts_close]) ;;
> > +        -l*) fts_LIBS="$ac_cv_search_fts_close" ;;
> > +        *) fts_LIBS= ;;
> > +esac
> > +AC_SUBST([fts_LIBS])
> > +
> > +saved_LIBS="$LIBS"
> > +AC_SEARCH_LIBS([_obstack_free], [obstack])
> > +LIBS="$saved_LIBS"
> > +case "$ac_cv_search__obstack_free" in
> > +        no) AC_MSG_FAILURE([failed to find obstack_free]) ;;
> > +        -l*) obstack_LIBS="$ac_cv_search__obstack_free" ;;
> > +        *) obstack_LIBS= ;;
> > +esac
> > +AC_SUBST([obstack_LIBS])
> > +
> >  dnl The directories with content.
>
> OK, normally this says none required which is handled by the *) case.
> Shouldn't we do argp in the same way? This looks simpler than what we
> have now.

I can send a patch to change it.

>
> I added the missing ChangeLog entries and pushed.

Thank you!

>
> Thanks,
>
> Mark

Érico


More information about the Elfutils-devel mailing list