Mercurial > audlegacy
annotate m4/lib-ld.m4 @ 4851:8ebd8358de04
On second thought, apply equalizer settings on (re)opening audio
author | John Lindgren <john.lindgren@tds.net> |
---|---|
date | Mon, 13 Apr 2009 01:18:06 -0400 |
parents | 0b924771b26e |
children |
rev | line source |
---|---|
4462
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
1 # lib-ld.m4 serial 2 (gettext-0.12) |
0 | 2 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. |
4462
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
3 dnl This file is free software, distributed under the terms of the GNU |
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
4 dnl General Public License. As a special exception to the GNU General |
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
5 dnl Public License, this file may be distributed as part of a program |
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
6 dnl that contains a configuration script generated by Autoconf, under |
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
7 dnl the same distribution terms as the rest of that program. |
0 | 8 |
9 dnl Subroutines of libtool.m4, | |
10 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision | |
11 dnl with libtool.m4. | |
12 | |
13 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. | |
14 AC_DEFUN([AC_LIB_PROG_LD_GNU], | |
15 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, | |
16 [# I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
4462
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
17 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
18 acl_cv_prog_gnu_ld=yes |
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
19 else |
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
20 acl_cv_prog_gnu_ld=no |
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
21 fi]) |
0 | 22 with_gnu_ld=$acl_cv_prog_gnu_ld |
23 ]) | |
24 | |
25 dnl From libtool-1.4. Sets the variable LD. | |
26 AC_DEFUN([AC_LIB_PROG_LD], | |
27 [AC_ARG_WITH(gnu-ld, | |
28 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], | |
29 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) | |
30 AC_REQUIRE([AC_PROG_CC])dnl | |
31 AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
32 # Prepare PATH_SEPARATOR. | |
33 # The user is always right. | |
34 if test "${PATH_SEPARATOR+set}" != set; then | |
35 echo "#! /bin/sh" >conf$$.sh | |
36 echo "exit 0" >>conf$$.sh | |
37 chmod +x conf$$.sh | |
38 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
39 PATH_SEPARATOR=';' | |
40 else | |
41 PATH_SEPARATOR=: | |
42 fi | |
43 rm -f conf$$.sh | |
44 fi | |
45 ac_prog=ld | |
46 if test "$GCC" = yes; then | |
47 # Check if gcc -print-prog-name=ld gives a path. | |
48 AC_MSG_CHECKING([for ld used by GCC]) | |
49 case $host in | |
50 *-*-mingw*) | |
51 # gcc leaves a trailing carriage return which upsets mingw | |
52 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
53 *) | |
54 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
55 esac | |
56 case $ac_prog in | |
57 # Accept absolute paths. | |
58 [[\\/]* | [A-Za-z]:[\\/]*)] | |
59 [re_direlt='/[^/][^/]*/\.\./'] | |
60 # Canonicalize the path of ld | |
61 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
62 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
63 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
64 done | |
65 test -z "$LD" && LD="$ac_prog" | |
66 ;; | |
67 "") | |
68 # If it fails, then pretend we aren't using GCC. | |
69 ac_prog=ld | |
70 ;; | |
71 *) | |
72 # If it is relative, then search for the first ld in PATH. | |
73 with_gnu_ld=unknown | |
74 ;; | |
75 esac | |
76 elif test "$with_gnu_ld" = yes; then | |
77 AC_MSG_CHECKING([for GNU ld]) | |
78 else | |
79 AC_MSG_CHECKING([for non-GNU ld]) | |
80 fi | |
81 AC_CACHE_VAL(acl_cv_path_LD, | |
82 [if test -z "$LD"; then | |
83 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
84 for ac_dir in $PATH; do | |
85 test -z "$ac_dir" && ac_dir=. | |
86 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
87 acl_cv_path_LD="$ac_dir/$ac_prog" | |
88 # Check to see if the program is GNU ld. I'd rather use --version, | |
89 # but apparently some GNU ld's only accept -v. | |
90 # Break only if it was the GNU/non-GNU ld that we prefer. | |
4462
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
91 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
92 test "$with_gnu_ld" != no && break |
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
93 else |
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
94 test "$with_gnu_ld" != yes && break |
0b924771b26e
Backed out changeset b128239bfc7a
Matti Hamalainen <ccr@tnsp.org>
parents:
4458
diff
changeset
|
95 fi |
0 | 96 fi |
97 done | |
98 IFS="$ac_save_ifs" | |
99 else | |
100 acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
101 fi]) | |
102 LD="$acl_cv_path_LD" | |
103 if test -n "$LD"; then | |
104 AC_MSG_RESULT($LD) | |
105 else | |
106 AC_MSG_RESULT(no) | |
107 fi | |
108 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | |
109 AC_LIB_PROG_LD_GNU | |
110 ]) |