bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LIB_NANOSLEEP = none required


From: Alexandre Duret-Lutz
Subject: LIB_NANOSLEEP = none required
Date: Sat, 08 Nov 2003 12:20:44 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Hi!

While trying to distcheck CVS Coreutils with CVS Autoconf and
CVS Automake I've seen this:

gcc  -g -O2   -o tail  tail.o ../lib/libfetish.a  ../lib/libfetish.a -lm  -lrt 
none required 
gcc: none: No such file or directory
gcc: required: No such file or directory


[config.log]
...
configure:33651: checking for library containing nanosleep
configure:33681: gcc -o conftest -g -O2   conftest.c  >&5
configure:33687: $? = 0
configure:33691: test -z 
                         || test ! -s conftest.err
configure:33694: $? = 0
configure:33697: test -s conftest
configure:33700: $? = 0
configure:33770: result: none required
...

[src/Makefile]
...
LIB_NANOSLEEP = none required
...
nanosec_libs = \
  $(LDADD) $(FESETROUND_LIBM) $(POW_LIB) $(LIB_CLOCK_GETTIME) $(LIB_NANOSLEEP)
...
sleep_LDADD = $(nanosec_libs)
tail_LDADD = $(nanosec_libs)
...


configure protects its LIBS setting with

  test "$ac_cv_search_nanosleep" = "none required" || 
LIBS="$ac_cv_search_nanosleep $LIBS"

maybe jm_FUNC_NANOSLEEP should protect it's LIB_NANOSLEEP
setting similarly.


2003-11-08  Alexandre Duret-Lutz  <address@hidden>

        * nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not fill LIB_NANOSLEEP
        with $ac_cv_search_nanosleep if it's "none required".

Index: m4/nanosleep.m4
===================================================================
RCS file: /cvsroot/coreutils/coreutils/m4/nanosleep.m4,v
retrieving revision 1.15
diff -u -r1.15 nanosleep.m4
--- m4/nanosleep.m4     17 Aug 2003 17:57:38 -0000      1.15
+++ m4/nanosleep.m4     8 Nov 2003 11:17:17 -0000
@@ -11,8 +11,10 @@
 
  # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
- AC_SEARCH_LIBS(nanosleep, [rt posix4], 
[LIB_NANOSLEEP=$ac_cv_search_nanosleep])
- AC_SUBST(LIB_NANOSLEEP)
+ AC_SEARCH_LIBS([nanosleep], [rt posix4],
+                [test "$ac_cv_search_nanosleep" = "none required" ||
+                LIB_NANOSLEEP=$ac_cv_search_nanosleep])
+ AC_SUBST([LIB_NANOSLEEP])
 
  AC_CACHE_CHECK([whether nanosleep works],
   jm_cv_func_nanosleep_works,
-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]