From cc64dbf2b2e0925f55d06bcd4b9516e64125dcf0 Mon Sep 17 00:00:00 2001 From: jay Date: Thu, 24 May 2007 07:26:42 +0000 Subject: [PATCH] Link the find binary against -lm for modf(). --- ChangeLog | 7 +++++++ NEWS | 3 +++ configure.in | 4 ++++ find/Makefile.am | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a8b1a46..d0d6456 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-05-24 James Youngman + + + * configure.in (FINDLIBS): Update FINDLIBS to link against -lm for + modf. This fixed a link error on HP-UX. + * find/Makefile.am (LDADD): Use @FINDLIBS@ + 2007-05-21 James Youngman * build-aux/Makefile.am (EXTRA_DIST): Added man-lint.sh. diff --git a/NEWS b/NEWS index 9b750d3..392e7bb 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,9 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout) ** Bug Fixes +Findutils should now build on systems which have the modf() function +in the maths library, -lm. This includes some versions of HP-UX. + #19923: Fixed an array overrun in groups[] array of 'locate' when run by or as root. This bug appears not to be exploitable. If locate is not installed setuid, the bug is not exploitable. For setuid diff --git a/configure.in b/configure.in index 0450785..88f0c07 100644 --- a/configure.in +++ b/configure.in @@ -108,6 +108,10 @@ dnl C library, try -lsun. AC_CHECK_FUNC(getpwnam, [], [AC_CHECK_LIB(sun, getpwnam)]) +AC_CHECK_LIB([m],[modf],[FINDLIBS="-lm $FINDLIBS"] + AC_DEFINE_UNQUOTED(HAVE_LIBM,1,[modf is in -lm])) +AC_SUBST([FINDLIBS]) + dnl Checks for header files. AC_HEADER_STDC dnl Assume unistd.h is present - coreutils does too. diff --git a/find/Makefile.am b/find/Makefile.am index 01a1dc4..23d8323 100644 --- a/find/Makefile.am +++ b/find/Makefile.am @@ -26,7 +26,7 @@ endif EXTRA_DIST = defs.h $(man_MANS) INCLUDES = -I../gnulib/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCALEDIR=\"$(localedir)\" -LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ @LIB_CLOCK_GETTIME@ +LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ @LIB_CLOCK_GETTIME@ @FINDLIBS@ man_MANS = find.1 SUBDIRS = testsuite -- 2.11.4.GIT