1 |
ticho 08/05/04 14:35:59 |
2 |
|
3 |
Added: lib-ld.m4 |
4 |
Log: |
5 |
Supply lib-ld.m4 file, originally provided by gettext, for non-nls users - autoconf needs it. Bug #218892, thanks to Natanael Copa. |
6 |
(Portage version: 2.1.4.4) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 app-antivirus/clamav/files/lib-ld.m4 |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/files/lib-ld.m4?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/files/lib-ld.m4?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: lib-ld.m4 |
15 |
=================================================================== |
16 |
# lib-ld.m4 serial 3 (gettext-0.13) |
17 |
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. |
18 |
dnl This file is free software; the Free Software Foundation |
19 |
dnl gives unlimited permission to copy and/or distribute it, |
20 |
dnl with or without modifications, as long as this notice is preserved. |
21 |
|
22 |
dnl Subroutines of libtool.m4, |
23 |
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision |
24 |
dnl with libtool.m4. |
25 |
|
26 |
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. |
27 |
AC_DEFUN([AC_LIB_PROG_LD_GNU], |
28 |
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, |
29 |
[# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
30 |
case `$LD -v 2>&1 </dev/null` in |
31 |
*GNU* | *'with BFD'*) |
32 |
acl_cv_prog_gnu_ld=yes ;; |
33 |
*) |
34 |
acl_cv_prog_gnu_ld=no ;; |
35 |
esac]) |
36 |
with_gnu_ld=$acl_cv_prog_gnu_ld |
37 |
]) |
38 |
|
39 |
dnl From libtool-1.4. Sets the variable LD. |
40 |
AC_DEFUN([AC_LIB_PROG_LD], |
41 |
[AC_ARG_WITH(gnu-ld, |
42 |
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
43 |
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
44 |
AC_REQUIRE([AC_PROG_CC])dnl |
45 |
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
46 |
# Prepare PATH_SEPARATOR. |
47 |
# The user is always right. |
48 |
if test "${PATH_SEPARATOR+set}" != set; then |
49 |
echo "#! /bin/sh" >conf$$.sh |
50 |
echo "exit 0" >>conf$$.sh |
51 |
chmod +x conf$$.sh |
52 |
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then |
53 |
PATH_SEPARATOR=';' |
54 |
else |
55 |
PATH_SEPARATOR=: |
56 |
fi |
57 |
rm -f conf$$.sh |
58 |
fi |
59 |
ac_prog=ld |
60 |
if test "$GCC" = yes; then |
61 |
# Check if gcc -print-prog-name=ld gives a path. |
62 |
AC_MSG_CHECKING([for ld used by GCC]) |
63 |
case $host in |
64 |
*-*-mingw*) |
65 |
# gcc leaves a trailing carriage return which upsets mingw |
66 |
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
67 |
*) |
68 |
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
69 |
esac |
70 |
case $ac_prog in |
71 |
# Accept absolute paths. |
72 |
[[\\/]* | [A-Za-z]:[\\/]*)] |
73 |
[re_direlt='/[^/][^/]*/\.\./'] |
74 |
# Canonicalize the path of ld |
75 |
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
76 |
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
77 |
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
78 |
done |
79 |
test -z "$LD" && LD="$ac_prog" |
80 |
;; |
81 |
"") |
82 |
# If it fails, then pretend we aren't using GCC. |
83 |
ac_prog=ld |
84 |
;; |
85 |
*) |
86 |
# If it is relative, then search for the first ld in PATH. |
87 |
with_gnu_ld=unknown |
88 |
;; |
89 |
esac |
90 |
elif test "$with_gnu_ld" = yes; then |
91 |
AC_MSG_CHECKING([for GNU ld]) |
92 |
else |
93 |
AC_MSG_CHECKING([for non-GNU ld]) |
94 |
fi |
95 |
AC_CACHE_VAL(acl_cv_path_LD, |
96 |
[if test -z "$LD"; then |
97 |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
98 |
for ac_dir in $PATH; do |
99 |
test -z "$ac_dir" && ac_dir=. |
100 |
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
101 |
acl_cv_path_LD="$ac_dir/$ac_prog" |
102 |
# Check to see if the program is GNU ld. I'd rather use --version, |
103 |
# but apparently some GNU ld's only accept -v. |
104 |
# Break only if it was the GNU/non-GNU ld that we prefer. |
105 |
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in |
106 |
*GNU* | *'with BFD'*) |
107 |
test "$with_gnu_ld" != no && break ;; |
108 |
*) |
109 |
test "$with_gnu_ld" != yes && break ;; |
110 |
esac |
111 |
fi |
112 |
done |
113 |
IFS="$ac_save_ifs" |
114 |
else |
115 |
acl_cv_path_LD="$LD" # Let the user override the test with a path. |
116 |
fi]) |
117 |
LD="$acl_cv_path_LD" |
118 |
if test -n "$LD"; then |
119 |
AC_MSG_RESULT($LD) |
120 |
else |
121 |
AC_MSG_RESULT(no) |
122 |
fi |
123 |
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
124 |
AC_LIB_PROG_LD_GNU |
125 |
]) |
126 |
|
127 |
|
128 |
|
129 |
-- |
130 |
gentoo-commits@l.g.o mailing list |