summaryrefslogtreecommitdiffstats
path: root/build-aux
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/config.rpath66
-rw-r--r--build-aux/link-warning.h28
2 files changed, 64 insertions, 30 deletions
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
index e082db6b..35f959b8 100755
--- a/build-aux/config.rpath
+++ b/build-aux/config.rpath
@@ -2,7 +2,7 @@
2# Output a system dependent set of variables, describing how to set the 2# Output a system dependent set of variables, describing how to set the
3# run time search path of shared libraries in an executable. 3# run time search path of shared libraries in an executable.
4# 4#
5# Copyright 1996-2006 Free Software Foundation, Inc. 5# Copyright 1996-2008 Free Software Foundation, Inc.
6# Taken from GNU libtool, 2001 6# Taken from GNU libtool, 2001
7# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 7# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8# 8#
@@ -64,7 +64,7 @@ else
64 ;; 64 ;;
65 esac 65 esac
66 ;; 66 ;;
67 mingw* | pw32* | os2*) 67 mingw* | cygwin* | pw32* | os2*)
68 ;; 68 ;;
69 hpux9* | hpux10* | hpux11*) 69 hpux9* | hpux10* | hpux11*)
70 wl='-Wl,' 70 wl='-Wl,'
@@ -74,7 +74,7 @@ else
74 ;; 74 ;;
75 newsos6) 75 newsos6)
76 ;; 76 ;;
77 linux*) 77 linux* | k*bsd*-gnu)
78 case $cc_basename in 78 case $cc_basename in
79 icc* | ecc*) 79 icc* | ecc*)
80 wl='-Wl,' 80 wl='-Wl,'
@@ -100,7 +100,7 @@ else
100 osf3* | osf4* | osf5*) 100 osf3* | osf4* | osf5*)
101 wl='-Wl,' 101 wl='-Wl,'
102 ;; 102 ;;
103 sco3.2v5*) 103 rdos*)
104 ;; 104 ;;
105 solaris*) 105 solaris*)
106 wl='-Wl,' 106 wl='-Wl,'
@@ -108,11 +108,14 @@ else
108 sunos4*) 108 sunos4*)
109 wl='-Qoption ld ' 109 wl='-Qoption ld '
110 ;; 110 ;;
111 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 111 sysv4 | sysv4.2uw2* | sysv4.3*)
112 wl='-Wl,' 112 wl='-Wl,'
113 ;; 113 ;;
114 sysv4*MP*) 114 sysv4*MP*)
115 ;; 115 ;;
116 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
117 wl='-Wl,'
118 ;;
116 unicos*) 119 unicos*)
117 wl='-Wl,' 120 wl='-Wl,'
118 ;; 121 ;;
@@ -155,7 +158,7 @@ if test "$with_gnu_ld" = yes; then
155 # option of GNU ld is called -rpath, not --rpath. 158 # option of GNU ld is called -rpath, not --rpath.
156 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 159 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
157 case "$host_os" in 160 case "$host_os" in
158 aix3* | aix4* | aix5*) 161 aix[3-9]*)
159 # On AIX/PPC, the GNU linker is very broken 162 # On AIX/PPC, the GNU linker is very broken
160 if test "$host_cpu" != ia64; then 163 if test "$host_cpu" != ia64; then
161 ld_shlibs=no 164 ld_shlibs=no
@@ -189,11 +192,11 @@ if test "$with_gnu_ld" = yes; then
189 ld_shlibs=no 192 ld_shlibs=no
190 fi 193 fi
191 ;; 194 ;;
192 interix3*) 195 interix[3-9]*)
193 hardcode_direct=no 196 hardcode_direct=no
194 hardcode_libdir_flag_spec='${wl}-rpath,$libdir' 197 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
195 ;; 198 ;;
196 linux*) 199 gnu* | linux* | k*bsd*-gnu)
197 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 200 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
198 : 201 :
199 else 202 else
@@ -251,7 +254,7 @@ else
251 hardcode_direct=unsupported 254 hardcode_direct=unsupported
252 fi 255 fi
253 ;; 256 ;;
254 aix4* | aix5*) 257 aix[4-9]*)
255 if test "$host_cpu" = ia64; then 258 if test "$host_cpu" = ia64; then
256 # On IA64, the linker does run time linking by default, so we don't 259 # On IA64, the linker does run time linking by default, so we don't
257 # have to do anything special. 260 # have to do anything special.
@@ -261,7 +264,7 @@ else
261 # Test if we are trying to use run time linking or normal 264 # Test if we are trying to use run time linking or normal
262 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 265 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
263 # need to do runtime linking. 266 # need to do runtime linking.
264 case $host_os in aix4.[23]|aix4.[23].*|aix5*) 267 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
265 for ld_flag in $LDFLAGS; do 268 for ld_flag in $LDFLAGS; do
266 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 269 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
267 aix_use_runtimelinking=yes 270 aix_use_runtimelinking=yes
@@ -280,7 +283,7 @@ else
280 strings "$collect2name" | grep resolve_lib_name >/dev/null 283 strings "$collect2name" | grep resolve_lib_name >/dev/null
281 then 284 then
282 # We have reworked collect2 285 # We have reworked collect2
283 hardcode_direct=yes 286 :
284 else 287 else
285 # We have old collect2 288 # We have old collect2
286 hardcode_direct=unsupported 289 hardcode_direct=unsupported
@@ -359,7 +362,7 @@ else
359 hardcode_direct=yes 362 hardcode_direct=yes
360 hardcode_minus_L=yes 363 hardcode_minus_L=yes
361 ;; 364 ;;
362 freebsd* | kfreebsd*-gnu | dragonfly*) 365 freebsd* | dragonfly*)
363 hardcode_libdir_flag_spec='-R$libdir' 366 hardcode_libdir_flag_spec='-R$libdir'
364 hardcode_direct=yes 367 hardcode_direct=yes
365 ;; 368 ;;
@@ -412,18 +415,22 @@ else
412 hardcode_libdir_separator=: 415 hardcode_libdir_separator=:
413 ;; 416 ;;
414 openbsd*) 417 openbsd*)
415 hardcode_direct=yes 418 if test -f /usr/libexec/ld.so; then
416 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 419 hardcode_direct=yes
417 hardcode_libdir_flag_spec='${wl}-rpath,$libdir' 420 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
421 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
422 else
423 case "$host_os" in
424 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
425 hardcode_libdir_flag_spec='-R$libdir'
426 ;;
427 *)
428 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
429 ;;
430 esac
431 fi
418 else 432 else
419 case "$host_os" in 433 ld_shlibs=no
420 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
421 hardcode_libdir_flag_spec='-R$libdir'
422 ;;
423 *)
424 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
425 ;;
426 esac
427 fi 434 fi
428 ;; 435 ;;
429 os2*) 436 os2*)
@@ -471,7 +478,7 @@ else
471 ld_shlibs=yes 478 ld_shlibs=yes
472 fi 479 fi
473 ;; 480 ;;
474 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) 481 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
475 ;; 482 ;;
476 sysv5* | sco3.2v5* | sco5v6*) 483 sysv5* | sco3.2v5* | sco5v6*)
477 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 484 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
@@ -498,7 +505,7 @@ case "$host_os" in
498 aix3*) 505 aix3*)
499 library_names_spec='$libname.a' 506 library_names_spec='$libname.a'
500 ;; 507 ;;
501 aix4* | aix5*) 508 aix[4-9]*)
502 library_names_spec='$libname$shrext' 509 library_names_spec='$libname$shrext'
503 ;; 510 ;;
504 amigaos*) 511 amigaos*)
@@ -523,9 +530,6 @@ case "$host_os" in
523 ;; 530 ;;
524 freebsd1*) 531 freebsd1*)
525 ;; 532 ;;
526 kfreebsd*-gnu)
527 library_names_spec='$libname$shrext'
528 ;;
529 freebsd* | dragonfly*) 533 freebsd* | dragonfly*)
530 case "$host_os" in 534 case "$host_os" in
531 freebsd[123]*) 535 freebsd[123]*)
@@ -551,7 +555,7 @@ case "$host_os" in
551 esac 555 esac
552 library_names_spec='$libname$shrext' 556 library_names_spec='$libname$shrext'
553 ;; 557 ;;
554 interix3*) 558 interix[3-9]*)
555 library_names_spec='$libname$shrext' 559 library_names_spec='$libname$shrext'
556 ;; 560 ;;
557 irix5* | irix6* | nonstopux*) 561 irix5* | irix6* | nonstopux*)
@@ -572,7 +576,7 @@ case "$host_os" in
572 ;; 576 ;;
573 linux*oldld* | linux*aout* | linux*coff*) 577 linux*oldld* | linux*aout* | linux*coff*)
574 ;; 578 ;;
575 linux*) 579 linux* | k*bsd*-gnu)
576 library_names_spec='$libname$shrext' 580 library_names_spec='$libname$shrext'
577 ;; 581 ;;
578 knetbsd*-gnu) 582 knetbsd*-gnu)
@@ -598,6 +602,8 @@ case "$host_os" in
598 osf3* | osf4* | osf5*) 602 osf3* | osf4* | osf5*)
599 library_names_spec='$libname$shrext' 603 library_names_spec='$libname$shrext'
600 ;; 604 ;;
605 rdos*)
606 ;;
601 solaris*) 607 solaris*)
602 library_names_spec='$libname$shrext' 608 library_names_spec='$libname$shrext'
603 ;; 609 ;;
diff --git a/build-aux/link-warning.h b/build-aux/link-warning.h
new file mode 100644
index 00000000..fda01941
--- /dev/null
+++ b/build-aux/link-warning.h
@@ -0,0 +1,28 @@
1/* GL_LINK_WARNING("literal string") arranges to emit the literal string as
2 a linker warning on most glibc systems.
3 We use a linker warning rather than a preprocessor warning, because
4 #warning cannot be used inside macros. */
5#ifndef GL_LINK_WARNING
6 /* This works on platforms with GNU ld and ELF object format.
7 Testing __GLIBC__ is sufficient for asserting that GNU ld is in use.
8 Testing __ELF__ guarantees the ELF object format.
9 Testing __GNUC__ is necessary for the compound expression syntax. */
10# if defined __GLIBC__ && defined __ELF__ && defined __GNUC__
11# define GL_LINK_WARNING(message) \
12 GL_LINK_WARNING1 (__FILE__, __LINE__, message)
13# define GL_LINK_WARNING1(file, line, message) \
14 GL_LINK_WARNING2 (file, line, message) /* macroexpand file and line */
15# define GL_LINK_WARNING2(file, line, message) \
16 GL_LINK_WARNING3 (file ":" #line ": warning: " message)
17# define GL_LINK_WARNING3(message) \
18 ({ static const char warning[sizeof (message)] \
19 __attribute__ ((__unused__, \
20 __section__ (".gnu.warning"), \
21 __aligned__ (1))) \
22 = message "\n"; \
23 (void)0; \
24 })
25# else
26# define GL_LINK_WARNING(message) ((void) 0)
27# endif
28#endif