comparison config.rpath @ 390:6bb98fbbae04 trunk

[svn] - translation framework
author nenolod
date Mon, 18 Dec 2006 12:25:28 -0800
parents 13389e613d67
children 032053ca08ab
comparison
equal deleted inserted replaced
389:8ab5fa857f33 390:6bb98fbbae04
1 #! /bin/sh 1 #! /bin/sh
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-2005 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 #
9 # This file is free software; the Free Software Foundation gives 9 # This file is free software; the Free Software Foundation gives
10 # unlimited permission to copy and/or distribute it, with or without 10 # unlimited permission to copy and/or distribute it, with or without
23 # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer 23 # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
24 # than 256 bytes, otherwise the compiler driver will dump core. The only 24 # than 256 bytes, otherwise the compiler driver will dump core. The only
25 # known workaround is to choose shorter directory names for the build 25 # known workaround is to choose shorter directory names for the build
26 # directory and/or the installation directory. 26 # directory and/or the installation directory.
27 27
28 # All known linkers require a `.a' archive for static linking (except MSVC, 28 # All known linkers require a `.a' archive for static linking (except M$VC,
29 # which needs '.lib'). 29 # which needs '.lib').
30 libext=a 30 libext=a
31 shrext=.so 31 shrext=.so
32 32
33 host="$1" 33 host="$1"
34 host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 34 host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
35 host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 35 host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
36 host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 36 host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
37 37
38 # Code taken from libtool.m4's _LT_CC_BASENAME. 38 cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
39
40 for cc_temp in $CC""; do
41 case $cc_temp in
42 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
43 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
44 \-*) ;;
45 *) break;;
46 esac
47 done
48 cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
49 39
50 # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. 40 # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
51 41
52 wl= 42 wl=
53 if test "$GCC" = yes; then 43 if test "$GCC" = yes; then
56 case "$host_os" in 46 case "$host_os" in
57 aix*) 47 aix*)
58 wl='-Wl,' 48 wl='-Wl,'
59 ;; 49 ;;
60 darwin*) 50 darwin*)
61 case $cc_basename in 51 case "$cc_basename" in
62 xlc*) 52 xlc*)
63 wl='-Wl,' 53 wl='-Wl,'
64 ;; 54 ;;
65 esac 55 esac
66 ;; 56 ;;
85 ccc*) 75 ccc*)
86 wl='-Wl,' 76 wl='-Wl,'
87 ;; 77 ;;
88 como) 78 como)
89 wl='-lopt=' 79 wl='-lopt='
90 ;;
91 *)
92 case `$CC -V 2>&1 | sed 5q` in
93 *Sun\ C*)
94 wl='-Wl,'
95 ;;
96 esac
97 ;; 80 ;;
98 esac 81 esac
99 ;; 82 ;;
100 osf3* | osf4* | osf5*) 83 osf3* | osf4* | osf5*)
101 wl='-Wl,' 84 wl='-Wl,'
135 # Microsoft Visual C++. 118 # Microsoft Visual C++.
136 if test "$GCC" != yes; then 119 if test "$GCC" != yes; then
137 with_gnu_ld=no 120 with_gnu_ld=no
138 fi 121 fi
139 ;; 122 ;;
140 interix*)
141 # we just hope/assume this is gcc and not c89 (= MSVC++)
142 with_gnu_ld=yes
143 ;;
144 openbsd*) 123 openbsd*)
145 with_gnu_ld=no 124 with_gnu_ld=no
146 ;; 125 ;;
147 esac 126 esac
148 127
149 ld_shlibs=yes 128 ld_shlibs=yes
150 if test "$with_gnu_ld" = yes; then 129 if test "$with_gnu_ld" = yes; then
151 # Set some defaults for GNU ld with shared library support. These
152 # are reset later if shared libraries are not supported. Putting them
153 # here allows them to be overridden if necessary.
154 # Unlike libtool, we use -rpath here, not --rpath, since the documented
155 # option of GNU ld is called -rpath, not --rpath.
156 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
157 case "$host_os" in 130 case "$host_os" in
158 aix3* | aix4* | aix5*) 131 aix3* | aix4* | aix5*)
159 # On AIX/PPC, the GNU linker is very broken 132 # On AIX/PPC, the GNU linker is very broken
160 if test "$host_cpu" != ia64; then 133 if test "$host_cpu" != ia64; then
161 ld_shlibs=no 134 ld_shlibs=no
187 : 160 :
188 else 161 else
189 ld_shlibs=no 162 ld_shlibs=no
190 fi 163 fi
191 ;; 164 ;;
192 interix3*) 165 netbsd*)
193 hardcode_direct=no 166 ;;
194 hardcode_libdir_flag_spec='${wl}-rpath,$libdir' 167 solaris* | sysv5*)
168 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
169 ld_shlibs=no
170 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
171 :
172 else
173 ld_shlibs=no
174 fi
175 ;;
176 sunos4*)
177 hardcode_direct=yes
195 ;; 178 ;;
196 linux*) 179 linux*)
197 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 180 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
198 : 181 :
199 else 182 else
200 ld_shlibs=no 183 ld_shlibs=no
201 fi 184 fi
202 ;; 185 ;;
203 netbsd*)
204 ;;
205 solaris*)
206 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
207 ld_shlibs=no
208 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
209 :
210 else
211 ld_shlibs=no
212 fi
213 ;;
214 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
215 case `$LD -v 2>&1` in
216 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
217 ld_shlibs=no
218 ;;
219 *)
220 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
221 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
222 else
223 ld_shlibs=no
224 fi
225 ;;
226 esac
227 ;;
228 sunos4*)
229 hardcode_direct=yes
230 ;;
231 *) 186 *)
232 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 187 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
233 : 188 :
234 else 189 else
235 ld_shlibs=no 190 ld_shlibs=no
236 fi 191 fi
237 ;; 192 ;;
238 esac 193 esac
239 if test "$ld_shlibs" = no; then 194 if test "$ld_shlibs" = yes; then
240 hardcode_libdir_flag_spec= 195 # Unlike libtool, we use -rpath here, not --rpath, since the documented
196 # option of GNU ld is called -rpath, not --rpath.
197 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
241 fi 198 fi
242 else 199 else
243 case "$host_os" in 200 case "$host_os" in
244 aix3*) 201 aix3*)
245 # Note: this linker hardcodes the directories in LIBPATH if there 202 # Note: this linker hardcodes the directories in LIBPATH if there
266 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 223 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
267 aix_use_runtimelinking=yes 224 aix_use_runtimelinking=yes
268 break 225 break
269 fi 226 fi
270 done 227 done
271 ;;
272 esac 228 esac
273 fi 229 fi
274 hardcode_direct=yes 230 hardcode_direct=yes
275 hardcode_libdir_separator=':' 231 hardcode_libdir_separator=':'
276 if test "$GCC" = yes; then 232 if test "$GCC" = yes; then
286 hardcode_direct=unsupported 242 hardcode_direct=unsupported
287 hardcode_minus_L=yes 243 hardcode_minus_L=yes
288 hardcode_libdir_flag_spec='-L$libdir' 244 hardcode_libdir_flag_spec='-L$libdir'
289 hardcode_libdir_separator= 245 hardcode_libdir_separator=
290 fi 246 fi
291 ;;
292 esac 247 esac
293 fi 248 fi
294 # Begin _LT_AC_SYS_LIBPATH_AIX. 249 # Begin _LT_AC_SYS_LIBPATH_AIX.
295 echo 'int main () { return 0; }' > conftest.c 250 echo 'int main () { return 0; }' > conftest.c
296 ${CC} ${LDFLAGS} conftest.c -o conftest 251 ${CC} ${LDFLAGS} conftest.c -o conftest
334 darwin* | rhapsody*) 289 darwin* | rhapsody*)
335 hardcode_direct=no 290 hardcode_direct=no
336 if test "$GCC" = yes ; then 291 if test "$GCC" = yes ; then
337 : 292 :
338 else 293 else
339 case $cc_basename in 294 case "$cc_basename" in
340 xlc*) 295 xlc*)
341 ;; 296 ;;
342 *) 297 *)
343 ld_shlibs=no 298 ld_shlibs=no
344 ;; 299 ;;
369 hardcode_direct=yes 324 hardcode_direct=yes
370 # hardcode_minus_L: Not really in the search PATH, 325 # hardcode_minus_L: Not really in the search PATH,
371 # but as the default location of the library. 326 # but as the default location of the library.
372 hardcode_minus_L=yes 327 hardcode_minus_L=yes
373 ;; 328 ;;
374 hpux10*) 329 hpux10* | hpux11*)
375 if test "$with_gnu_ld" = no; then 330 if test "$with_gnu_ld" = no; then
376 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' 331 case "$host_cpu" in
377 hardcode_libdir_separator=: 332 hppa*64*)
378 hardcode_direct=yes 333 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
379 # hardcode_minus_L: Not really in the search PATH, 334 hardcode_libdir_separator=:
380 # but as the default location of the library.
381 hardcode_minus_L=yes
382 fi
383 ;;
384 hpux11*)
385 if test "$with_gnu_ld" = no; then
386 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
387 hardcode_libdir_separator=:
388 case $host_cpu in
389 hppa*64*|ia64*)
390 hardcode_direct=no 335 hardcode_direct=no
391 ;; 336 ;;
337 ia64*)
338 hardcode_libdir_flag_spec='-L$libdir'
339 hardcode_direct=no
340 # hardcode_minus_L: Not really in the search PATH,
341 # but as the default location of the library.
342 hardcode_minus_L=yes
343 ;;
392 *) 344 *)
345 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
346 hardcode_libdir_separator=:
393 hardcode_direct=yes 347 hardcode_direct=yes
394 # hardcode_minus_L: Not really in the search PATH, 348 # hardcode_minus_L: Not really in the search PATH,
395 # but as the default location of the library. 349 # but as the default location of the library.
396 hardcode_minus_L=yes 350 hardcode_minus_L=yes
397 ;; 351 ;;
441 # Both cc and cxx compiler support -rpath directly 395 # Both cc and cxx compiler support -rpath directly
442 hardcode_libdir_flag_spec='-rpath $libdir' 396 hardcode_libdir_flag_spec='-rpath $libdir'
443 fi 397 fi
444 hardcode_libdir_separator=: 398 hardcode_libdir_separator=:
445 ;; 399 ;;
400 sco3.2v5*)
401 ;;
446 solaris*) 402 solaris*)
447 hardcode_libdir_flag_spec='-R$libdir' 403 hardcode_libdir_flag_spec='-R$libdir'
448 ;; 404 ;;
449 sunos4*) 405 sunos4*)
450 hardcode_libdir_flag_spec='-L$libdir' 406 hardcode_libdir_flag_spec='-L$libdir'
469 sysv4*MP*) 425 sysv4*MP*)
470 if test -d /usr/nec; then 426 if test -d /usr/nec; then
471 ld_shlibs=yes 427 ld_shlibs=yes
472 fi 428 fi
473 ;; 429 ;;
474 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) 430 sysv4.2uw2*)
475 ;; 431 hardcode_direct=yes
476 sysv5* | sco3.2v5* | sco5v6*) 432 hardcode_minus_L=no
477 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 433 ;;
478 hardcode_libdir_separator=':' 434 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
435 ;;
436 sysv5*)
437 hardcode_libdir_flag_spec=
479 ;; 438 ;;
480 uts4*) 439 uts4*)
481 hardcode_libdir_flag_spec='-L$libdir' 440 hardcode_libdir_flag_spec='-L$libdir'
482 ;; 441 ;;
483 *) 442 *)
510 ;; 469 ;;
511 freebsd1*) 470 freebsd1*)
512 ;; 471 ;;
513 kfreebsd*-gnu) 472 kfreebsd*-gnu)
514 ;; 473 ;;
515 freebsd* | dragonfly*) 474 freebsd*)
516 ;; 475 ;;
517 gnu*) 476 gnu*)
518 ;; 477 ;;
519 hpux9* | hpux10* | hpux11*) 478 hpux9* | hpux10* | hpux11*)
520 case $host_cpu in 479 case "$host_cpu" in
521 ia64*) 480 ia64*)
522 shrext=.so 481 shrext=.so
523 ;; 482 ;;
524 hppa*64*) 483 hppa*64*)
525 shrext=.sl 484 shrext=.sl
526 ;; 485 ;;
527 *) 486 *)
528 shrext=.sl 487 shrext=.sl
529 ;; 488 ;;
530 esac 489 esac
531 ;;
532 interix3*)
533 ;; 490 ;;
534 irix5* | irix6* | nonstopux*) 491 irix5* | irix6* | nonstopux*)
535 case "$host_os" in 492 case "$host_os" in
536 irix5* | nonstopux*) 493 irix5* | nonstopux*)
537 libsuff= shlibsuff= 494 libsuff= shlibsuff=
564 libname_spec='$name' 521 libname_spec='$name'
565 shrext=.dll 522 shrext=.dll
566 ;; 523 ;;
567 osf3* | osf4* | osf5*) 524 osf3* | osf4* | osf5*)
568 ;; 525 ;;
526 sco3.2v5*)
527 ;;
569 solaris*) 528 solaris*)
570 ;; 529 ;;
571 sunos4*) 530 sunos4*)
572 ;; 531 ;;
573 sysv4 | sysv4.3*) 532 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
574 ;; 533 ;;
575 sysv4*MP*) 534 sysv4*MP*)
576 ;;
577 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
578 ;; 535 ;;
579 uts4*) 536 uts4*)
580 ;; 537 ;;
581 esac 538 esac
582 539