Mercurial > hg > octave-kai > gnulib-hg
annotate m4/lib-ignore.m4 @ 12909:86f1ff71881a
utime: remove obsolete module
This module, like autoconf's AC_FUNC_UTIME_NULL macro, has been
unnecessary for years, and has been marked as obsolete for 10 months.
* modules/utime: Remove file.
* lib/utime.c: Remove file.
* m4/utime.m4: Remove file.
* m4/utimes-null.m4: Remove file.
* doc/posix-functions/utime.texi (utime): Remove reference to
the module. Move the sole "fixed by gnulib" item into the
"problems not fixed by Gnulib" list.
* MODULES.html.sh (func_all_modules): Remove reference to "utime".
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Thu, 04 Mar 2010 15:36:51 +0100 |
parents | c2cbabec01dd |
children | 90e90e0b8a97 |
rev | line source |
---|---|
6527 | 1 # If possible, ignore libraries that are not depended on. |
2 | |
12559
c2cbabec01dd
update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents:
12518
diff
changeset
|
3 dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc. |
6527 | 4 dnl This file is free software; the Free Software Foundation |
5 dnl gives unlimited permission to copy and/or distribute it, | |
6 dnl with or without modifications, as long as this notice is preserved. | |
7 | |
8 dnl Written by Paul Eggert. | |
9 | |
10 AC_DEFUN([gl_IGNORE_UNUSED_LIBRARIES], | |
11 [ | |
12 AC_CACHE_CHECK([for flag to ignore unused libraries], | |
13 [gl_cv_ignore_unused_libraries], | |
14 [gl_cv_ignore_unused_libraries=none | |
6562
c89ddea009ce
* lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
Paul Eggert <eggert@cs.ucla.edu>
parents:
6527
diff
changeset
|
15 gl_saved_ldflags=$LDFLAGS |
6912 | 16 gl_saved_libs=$LIBS |
17 # Link with -lm to detect binutils 2.16 bug with --as-needed; see | |
18 # <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00131.html>. | |
19 LIBS="$LIBS -lm" | |
6562
c89ddea009ce
* lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
Paul Eggert <eggert@cs.ucla.edu>
parents:
6527
diff
changeset
|
20 # Use long option sequences like '-z ignore' to test for the feature, |
c89ddea009ce
* lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
Paul Eggert <eggert@cs.ucla.edu>
parents:
6527
diff
changeset
|
21 # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags. |
6912 | 22 # GCC + binutils likes '-Wl,--as-needed'. |
23 # GCC + Solaris ld likes '-Wl,-z,ignore'. | |
24 # Sun C likes '-z ignore'. | |
25 # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11 | |
26 # native cc issues annoying warnings and then ignores it, | |
27 # which would cause us to incorrectly conclude that it worked. | |
28 for gl_flags in \ | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
6912
diff
changeset
|
29 '-Wl,--as-needed' \ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
6912
diff
changeset
|
30 '-Wl,-z,ignore' \ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
6912
diff
changeset
|
31 '-z ignore' |
6912 | 32 do |
6562
c89ddea009ce
* lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
Paul Eggert <eggert@cs.ucla.edu>
parents:
6527
diff
changeset
|
33 LDFLAGS="$gl_flags $LDFLAGS" |
6527 | 34 AC_LINK_IFELSE([AC_LANG_PROGRAM()], |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
6912
diff
changeset
|
35 [gl_cv_ignore_unused_libraries=$gl_flags]) |
6562
c89ddea009ce
* lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
Paul Eggert <eggert@cs.ucla.edu>
parents:
6527
diff
changeset
|
36 LDFLAGS=$gl_saved_ldflags |
c89ddea009ce
* lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
Paul Eggert <eggert@cs.ucla.edu>
parents:
6527
diff
changeset
|
37 test "$gl_cv_ignore_unused_libraries" != none && break |
6912 | 38 done |
39 LIBS=$gl_saved_libs]) | |
6527 | 40 |
41 test "$gl_cv_ignore_unused_libraries" != none && | |
42 LDFLAGS="$LDFLAGS $gl_cv_ignore_unused_libraries" | |
43 ]) |