annotate m4/ldd.m4 @ 17363:5a51fb7777a9

sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin Problem reported by Marco Atzeri in <http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00000.html>. * lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]: Simply delegate to the system <sys/select.h> in this case too. Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to be needed on Solaris either. * lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]: Simply delgate to the system <sys/time.h> in this case.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 19 Mar 2013 09:08:47 -0700
parents e542fd46ad6f
children 344018b6e5d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 # ldd.m4 serial 1
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 16201
diff changeset
2 dnl Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 # Sets LDDPROG to a command and LDDPOSTPROC to a filter command, such that
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 # $LDDPROG program $LDDPOSTPROC
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 # outputs a whitespace-separated list of the dynamically linked dependencies
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 # of the program, as library names (no full pathnames), or nothing if the
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 # program is statically linked or if the service is not supported on the given
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 # system.
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 dnl From Bruno Haible.
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 AC_DEFUN([gl_LDD],
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 [
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 AC_REQUIRE([AC_CANONICAL_HOST])
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 AC_REQUIRE([AC_PROG_CC])
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 dnl Default values.
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 LDDPROG=':'
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 LDDPOSTPROC=
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 dnl First try objdump, since it works when cross-compiling.
6558
e0d912b9ecf4 Compatibility with libtool.
Bruno Haible <bruno@clisp.org>
parents: 6557
diff changeset
24 AC_CHECK_TOOL([OBJDUMP], [objdump], [false])
6557
103bc700d0b0 Use changequote.
Bruno Haible <bruno@clisp.org>
parents: 6555
diff changeset
25 changequote(,)dnl
6558
e0d912b9ecf4 Compatibility with libtool.
Bruno Haible <bruno@clisp.org>
parents: 6557
diff changeset
26 if test "$OBJDUMP" != "false"; then
6559
8557a3e5284c Simplify LC_ALL handling.
Bruno Haible <bruno@clisp.org>
parents: 6558
diff changeset
27 LDDPROG="$OBJDUMP -p"
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 dnl The output of "LC_ALL=C objdump -p program" of a program or library
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 dnl looks like this:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 dnl
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 dnl libnet.so: file format elf32-i386
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 dnl
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 dnl Program Header:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 dnl LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 dnl filesz 0x0001391d memsz 0x0001391d flags r-x
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 dnl LOAD off 0x00013920 vaddr 0x00014920 paddr 0x00014920 align 2**12
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 dnl filesz 0x00001874 memsz 0x0001b020 flags rw-
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 dnl DYNAMIC off 0x00015104 vaddr 0x00016104 paddr 0x00016104 align 2**2
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 dnl filesz 0x00000090 memsz 0x00000090 flags rw-
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 dnl
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 dnl Dynamic Section:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 dnl NEEDED libroot.so
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 dnl SONAME libnet.so
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 dnl SYMBOLIC 0x0
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 dnl INIT 0x2aec
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 dnl FINI 0x12a2c
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 dnl HASH 0x94
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 dnl STRTAB 0x1684
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 dnl SYMTAB 0x774
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 dnl STRSZ 0xbd5
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 dnl SYMENT 0x10
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 dnl PLTGOT 0x15f20
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 dnl PLTRELSZ 0x320
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 dnl PLTREL 0x11
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 dnl JMPREL 0x27cc
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 dnl REL 0x225c
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 dnl RELSZ 0x570
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 dnl RELENT 0x8
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 LDDPOSTPROC="2>/dev/null | sed -n -e 's,^ NEEDED *\\([^ ].*\\)\$,\\1,p'"
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 else
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 if test "$cross_compiling" = no; then
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 dnl Not cross-compiling. Try system dependent vendor tools.
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 case "$host_os" in
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 aix*)
6559
8557a3e5284c Simplify LC_ALL handling.
Bruno Haible <bruno@clisp.org>
parents: 6558
diff changeset
65 LDDPROG="dump -H"
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66 dnl The output of "LC_ALL=C dump -H program" looks like this:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 dnl
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68 dnl program:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 dnl
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 dnl ***Loader Section***
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 dnl Loader Header Information
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 dnl VERSION# #SYMtableENT #RELOCent LENidSTR
10095
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
73 dnl 0x00000001 0x00000005 0x0000000d 0x0000001e
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
74 dnl
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 dnl #IMPfilID OFFidSTR LENstrTBL OFFstrTBL
10095
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
76 dnl 0x00000002 0x00000134 0x0000000d 0x00000152
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
77 dnl
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
78 dnl
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
79 dnl ***Import File Strings***
10095
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
80 dnl INDEX PATH BASE MEMBER
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
81 dnl 0 /usr/lib:/lib
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
82 dnl 1 libc.a shr.o
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 dnl
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 LDDPOSTPROC="2>/dev/null | sed -e '/^[^0-9]/d' -e '/^0x/d' | sed -n -e 's,^[0-9]* *\\([^ ]*\\).*\$,\\1,p' | sed -e 's,^.*/,,'"
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85 ;;
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
86 darwin*)
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 LDDPROG="otool -L"
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88 dnl The output of "otool -L program" looks like this:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 dnl program:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
90 dnl /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 71.1.4)
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
91 LDDPOSTPROC="2>/dev/null | sed -n -e 's,^ \\([^ ]*\\).*\$,\\1,p' | sed -e 's,^.*/,,'"
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
92 ;;
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
93 hpux*)
6559
8557a3e5284c Simplify LC_ALL handling.
Bruno Haible <bruno@clisp.org>
parents: 6558
diff changeset
94 LDDPROG="chatr"
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95 dnl The output of "LC_ALL=C chatr program" looks like this:
10095
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
96 dnl program:
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
97 dnl shared executable
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
98 dnl shared library dynamic path search:
10095
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
99 dnl SHLIB_PATH disabled second
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
100 dnl embedded path disabled first Not Defined
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
101 dnl shared library list:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
102 dnl dynamic /usr/lib/libc.2
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
103 dnl shared library binding:
10095
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
104 dnl deferred
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
105 dnl global hash table disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
106 dnl plabel caching disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
107 dnl global hash array size:1103
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
108 dnl global hash array nbuckets:3
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
109 dnl shared vtable support disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
110 dnl static branch prediction disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
111 dnl executable from stack: D (default)
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
112 dnl kernel assisted branch prediction enabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
113 dnl lazy swap allocation disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
114 dnl text segment locking disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
115 dnl data segment locking disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
116 dnl third quadrant private data space disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
117 dnl fourth quadrant private data space disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
118 dnl third quadrant global data space disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
119 dnl data page size: D (default)
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
120 dnl instruction page size: D (default)
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
121 dnl nulptr references disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
122 dnl shared library private mapping disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
123 dnl shared library text merging disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
124 dnl
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
125 dnl or like this:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
126 dnl a.out:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
127 dnl 32-bit ELF executable
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
128 dnl shared library dynamic path search:
10095
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
129 dnl LD_LIBRARY_PATH enabled first
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
130 dnl SHLIB_PATH enabled second
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
131 dnl embedded path enabled third /usr/lib/hpux32:/opt/langtools/lib/hpux32
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
132 dnl shared library list:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
133 dnl libc.so.1
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
134 dnl shared library binding:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
135 dnl deferred
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
136 dnl global hash table disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
137 dnl global hash table size 1103
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
138 dnl shared library mapped private disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
139 dnl shared library segment merging disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
140 dnl shared vtable support disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
141 dnl explicit unloading disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
142 dnl segments:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
143 dnl index type address flags size
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
144 dnl 7 text 04000000 z---c- D (default)
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
145 dnl 8 data 40000000 ---m-- D (default)
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
146 dnl executable from stack: D (default)
10095
60ed1a52905e remove trailing blanks
Jim Meyering <meyering@redhat.com>
parents: 6559
diff changeset
147 dnl kernel assisted branch prediction enabled
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
148 dnl lazy swap allocation for dynamic segments disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
149 dnl nulptr references disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
150 dnl address space model: default
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
151 dnl caliper dynamic instrumentation disabled
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
152 dnl
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
153 LDDPOSTPROC="2>/dev/null | sed -e '1,/shared library list:/d' -e '/shared library binding:/,\$d' | sed -e 's,^.*[ ]\\([^ ][^ ]*\\)\$,\\1,' | sed -e 's,^.*/,,'"
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
154 ;;
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
155 irix*)
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
156 LDDPROG="elfdump -Dl"
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
157 dnl The output of "elfdump -Dl program" looks like this:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
158 dnl
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
159 dnl program:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
160 dnl
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
161 dnl **** MIPS LIBLIST INFORMATION ****
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
162 dnl .liblist :
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
163 dnl [INDEX] Timestamp Checksum Flags Name Version
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
164 dnl [1] Oct 2 05:19:12 1999 0x867bf7a8 ----- libc.so.1 sgi1.0
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
165 dnl
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
166 LDDPOSTPROC="2>/dev/null | sed -n -e 's,^[[][0-9]*[]].* 0x[^ ]* [^ ][^ ]* \\([^ ][^ ]*\\).*\$,\\1,p' | sed -e 's,^.*/,,'"
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
167 ;;
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
168 linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) # glibc-based systems
6559
8557a3e5284c Simplify LC_ALL handling.
Bruno Haible <bruno@clisp.org>
parents: 6558
diff changeset
169 LDDPROG="ldd"
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
170 dnl The output of "ldd program" looks like this:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
171 dnl libc.so.6 => /lib/libc.so.6 (0x4002d000)
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
172 dnl /lib/ld-linux.so.2 (0x40000000)
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
173 LDDPOSTPROC="2>/dev/null | sed -n -e 's,^ \\([^ ][^ ]*\\).*\$,\\1,p' | sed -e 's,^.*/,,'"
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
174 ;;
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
175 osf*)
6559
8557a3e5284c Simplify LC_ALL handling.
Bruno Haible <bruno@clisp.org>
parents: 6558
diff changeset
176 LDDPROG="odump -Dl"
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
177 dnl The output of "odump -Dl program" looks like this:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
178 dnl
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
179 dnl ***LIBRARY LIST SECTION***
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
180 dnl Name Time-Stamp CheckSum Flags Version
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
181 dnl program:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
182 dnl libc.so Dec 30 00:09:30 1997 0x5e955f9b 0 osf.1
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
183 dnl
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
184 LDDPOSTPROC="2>/dev/null | sed -n -e 's,^ \\([^ ][^ ]*\\).*,\\1,p' | sed -e '/^Name\$/d' | sed -e 's,^.*/,,'"
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
185 ;;
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
186 solaris*)
6559
8557a3e5284c Simplify LC_ALL handling.
Bruno Haible <bruno@clisp.org>
parents: 6558
diff changeset
187 LDDPROG="ldd"
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
188 dnl The output of "ldd program" looks like this:
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
189 dnl libc.so.1 => /usr/lib/libc.so.1
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
190 dnl libdl.so.1 => /usr/lib/libdl.so.1
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
191 dnl /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
192 dnl The first sed collects the indented lines.
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
193 dnl The second sed extracts the left-hand part.
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
194 dnl The third sed removes directory specifications.
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
195 LDDPOSTPROC="2>/dev/null | sed -n -e 's,^ \\([^ ].*\\)\$,\\1,p' | sed -e 's, =>.*\$,,' | sed -e 's,^.*/,,'"
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
196 ;;
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
197 esac
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
198 fi
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
199 fi
6559
8557a3e5284c Simplify LC_ALL handling.
Bruno Haible <bruno@clisp.org>
parents: 6558
diff changeset
200 dnl Avoid locale dependencies.
8557a3e5284c Simplify LC_ALL handling.
Bruno Haible <bruno@clisp.org>
parents: 6558
diff changeset
201 if test "$LDDPROG" != ":"; then
8557a3e5284c Simplify LC_ALL handling.
Bruno Haible <bruno@clisp.org>
parents: 6558
diff changeset
202 LDDPROG="LC_ALL=C $LDDPROG"
8557a3e5284c Simplify LC_ALL handling.
Bruno Haible <bruno@clisp.org>
parents: 6558
diff changeset
203 fi
6557
103bc700d0b0 Use changequote.
Bruno Haible <bruno@clisp.org>
parents: 6555
diff changeset
204 changequote([,])dnl
6555
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
205 AC_SUBST([LDDPROG])
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
206 AC_SUBST([LDDPOSTPROC])
ed2b5c29e4cb New module 'ldd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
207 ])