The R Project SVN R

Rev

Rev 57728 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 57728 Rev 62956
Line 1... Line 1...
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-2010 Free Software Foundation, Inc.
5
#   Copyright 1996-2012 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
11
#   modifications, as long as this notice is preserved.
11
#   modifications, as long as this notice is preserved.
-
 
12
 
-
 
13
# http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/config.rpath;hb=HEAD
12
#
14
#
13
# The first argument passed to this file is the canonical host specification,
15
# The first argument passed to this file is the canonical host specification,
14
#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
16
#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
15
# or
17
# or
16
#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
18
#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
Line 23... Line 25...
23
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
25
# - 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
26
#   than 256 bytes, otherwise the compiler driver will dump core. The only
25
#   known workaround is to choose shorter directory names for the build
27
#   known workaround is to choose shorter directory names for the build
26
#   directory and/or the installation directory.
28
#   directory and/or the installation directory.
27
 
29
 
28
# All known linkers require a `.a' archive for static linking (except MSVC,
30
# All known linkers require a '.a' archive for static linking (except MSVC,
29
# which needs '.lib').
31
# which needs '.lib').
30
libext=a
32
libext=a
31
shrext=.so
33
shrext=.so
32
 
34
 
33
host="$1"
35
host="$1"
Line 55... Line 57...
55
else
57
else
56
  case "$host_os" in
58
  case "$host_os" in
57
    aix*)
59
    aix*)
58
      wl='-Wl,'
60
      wl='-Wl,'
59
      ;;
61
      ;;
60
    darwin*)
-
 
61
      case $cc_basename in
-
 
62
        xlc*)
-
 
63
          wl='-Wl,'
-
 
64
          ;;
-
 
65
      esac
-
 
66
      ;;
-
 
67
    mingw* | cygwin* | pw32* | os2* | cegcc*)
62
    mingw* | cygwin* | pw32* | os2* | cegcc*)
68
      ;;
63
      ;;
69
    hpux9* | hpux10* | hpux11*)
64
    hpux9* | hpux10* | hpux11*)
70
      wl='-Wl,'
65
      wl='-Wl,'
71
      ;;
66
      ;;
72
    irix5* | irix6* | nonstopux*)
67
    irix5* | irix6* | nonstopux*)
73
      wl='-Wl,'
68
      wl='-Wl,'
74
      ;;
69
      ;;
75
    newsos6)
-
 
76
      ;;
-
 
77
    linux* | k*bsd*-gnu)
70
    linux* | k*bsd*-gnu | kopensolaris*-gnu)
78
      case $cc_basename in
71
      case $cc_basename in
79
        ecc*)
72
        ecc*)
80
          wl='-Wl,'
73
          wl='-Wl,'
81
          ;;
74
          ;;
82
        icc* | ifort*)
75
        icc* | ifort*)
83
          wl='-Wl,'
76
          wl='-Wl,'
84
          ;;
77
          ;;
85
        lf95*)
78
        lf95*)
86
          wl='-Wl,'
79
          wl='-Wl,'
87
          ;;
80
          ;;
-
 
81
        nagfor*)
-
 
82
          wl='-Wl,-Wl,,'
-
 
83
          ;;
88
        pgcc | pgf77 | pgf90)
84
        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
89
          wl='-Wl,'
85
          wl='-Wl,'
90
          ;;
86
          ;;
91
        ccc*)
87
        ccc*)
92
          wl='-Wl,'
88
          wl='-Wl,'
93
          ;;
89
          ;;
-
 
90
        xl* | bgxl* | bgf* | mpixl*)
-
 
91
          wl='-Wl,'
-
 
92
          ;;
94
        como)
93
        como)
95
          wl='-lopt='
94
          wl='-lopt='
96
          ;;
95
          ;;
97
        *)
96
        *)
98
          case `$CC -V 2>&1 | sed 5q` in
97
          case `$CC -V 2>&1 | sed 5q` in
-
 
98
            *Sun\ F* | *Sun*Fortran*)
-
 
99
              wl=
-
 
100
              ;;
99
            *Sun\ C*)
101
            *Sun\ C*)
100
              wl='-Wl,'
102
              wl='-Wl,'
101
              ;;
103
              ;;
102
          esac
104
          esac
103
          ;;
105
          ;;
104
      esac
106
      esac
105
      ;;
107
      ;;
-
 
108
    newsos6)
-
 
109
      ;;
-
 
110
    *nto* | *qnx*)
-
 
111
      ;;
106
    osf3* | osf4* | osf5*)
112
    osf3* | osf4* | osf5*)
107
      wl='-Wl,'
113
      wl='-Wl,'
108
      ;;
114
      ;;
109
    rdos*)
115
    rdos*)
110
      ;;
116
      ;;
111
    solaris*)
117
    solaris*)
-
 
118
      case $cc_basename in
-
 
119
        f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
-
 
120
          wl='-Qoption ld '
-
 
121
          ;;
-
 
122
        *)
112
      wl='-Wl,'
123
          wl='-Wl,'
-
 
124
          ;;
-
 
125
      esac
113
      ;;
126
      ;;
114
    sunos4*)
127
    sunos4*)
115
      wl='-Qoption ld '
128
      wl='-Qoption ld '
116
      ;;
129
      ;;
117
    sysv4 | sysv4.2uw2* | sysv4.3*)
130
    sysv4 | sysv4.2uw2* | sysv4.3*)
Line 169... Line 182...
169
      if test "$host_cpu" != ia64; then
182
      if test "$host_cpu" != ia64; then
170
        ld_shlibs=no
183
        ld_shlibs=no
171
      fi
184
      fi
172
      ;;
185
      ;;
173
    amigaos*)
186
    amigaos*)
174
      hardcode_libdir_flag_spec='-L$libdir'
187
      case "$host_cpu" in
175
      hardcode_minus_L=yes
188
        powerpc)
176
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
189
          ;;
177
      # that the semantics of dynamic libraries on AmigaOS, at least up
-
 
178
      # to version 4, is to share data among multiple programs linked
190
        m68k)
179
      # with the same dynamic library.  Since this doesn't match the
191
          hardcode_libdir_flag_spec='-L$libdir'
180
      # behavior of shared libraries on other platforms, we cannot use
192
          hardcode_minus_L=yes
181
      # them.
193
          ;;
182
      ld_shlibs=no
194
      esac
183
      ;;
195
      ;;
184
    beos*)
196
    beos*)
185
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
197
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
186
        :
198
        :
187
      else
199
      else
Line 196... Line 208...
196
        :
208
        :
197
      else
209
      else
198
        ld_shlibs=no
210
        ld_shlibs=no
199
      fi
211
      fi
200
      ;;
212
      ;;
-
 
213
    haiku*)
-
 
214
      ;;
201
    interix[3-9]*)
215
    interix[3-9]*)
202
      hardcode_direct=no
216
      hardcode_direct=no
203
      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
217
      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
204
      ;;
218
      ;;
205
    gnu* | linux* | k*bsd*-gnu)
219
    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
206
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
220
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
207
        :
221
        :
208
      else
222
      else
209
        ld_shlibs=no
223
        ld_shlibs=no
210
      fi
224
      fi
Line 323... Line 337...
323
          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
337
          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
324
        fi
338
        fi
325
      fi
339
      fi
326
      ;;
340
      ;;
327
    amigaos*)
341
    amigaos*)
-
 
342
      case "$host_cpu" in
-
 
343
        powerpc)
-
 
344
          ;;
-
 
345
        m68k)
328
      hardcode_libdir_flag_spec='-L$libdir'
346
          hardcode_libdir_flag_spec='-L$libdir'
329
      hardcode_minus_L=yes
347
          hardcode_minus_L=yes
330
      # see comment about different semantics on the GNU ld section
348
          ;;
331
      ld_shlibs=no
349
      esac
332
      ;;
350
      ;;
333
    bsdi[45]*)
351
    bsdi[45]*)
334
      ;;
352
      ;;
335
    cygwin* | mingw* | pw32* | cegcc*)
353
    cygwin* | mingw* | pw32* | cegcc*)
336
      # When not using gcc, we currently assume that we are using
354
      # When not using gcc, we currently assume that we are using
Line 340... Line 358...
340
      hardcode_libdir_flag_spec=' '
358
      hardcode_libdir_flag_spec=' '
341
      libext=lib
359
      libext=lib
342
      ;;
360
      ;;
343
    darwin* | rhapsody*)
361
    darwin* | rhapsody*)
344
      hardcode_direct=no
362
      hardcode_direct=no
345
      if test "$GCC" = yes ; then
363
      if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
346
        :
364
        :
347
      else
365
      else
348
        case $cc_basename in
-
 
349
          xlc*)
-
 
350
            ;;
-
 
351
          *)
-
 
352
            ld_shlibs=no
366
        ld_shlibs=no
353
            ;;
-
 
354
        esac
-
 
355
      fi
367
      fi
356
      ;;
368
      ;;
357
    dgux*)
369
    dgux*)
358
      hardcode_libdir_flag_spec='-L$libdir'
370
      hardcode_libdir_flag_spec='-L$libdir'
359
      ;;
371
      ;;
360
    freebsd1.*)
-
 
361
      ld_shlibs=no
-
 
362
      ;;
-
 
363
    freebsd2.2*)
372
    freebsd2.2*)
364
      hardcode_libdir_flag_spec='-R$libdir'
373
      hardcode_libdir_flag_spec='-R$libdir'
365
      hardcode_direct=yes
374
      hardcode_direct=yes
366
      ;;
375
      ;;
367
    freebsd2*)
376
    freebsd2*)
Line 418... Line 427...
418
    newsos6)
427
    newsos6)
419
      hardcode_direct=yes
428
      hardcode_direct=yes
420
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
429
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
421
      hardcode_libdir_separator=:
430
      hardcode_libdir_separator=:
422
      ;;
431
      ;;
-
 
432
    *nto* | *qnx*)
-
 
433
      ;;
423
    openbsd*)
434
    openbsd*)
424
      if test -f /usr/libexec/ld.so; then
435
      if test -f /usr/libexec/ld.so; then
425
        hardcode_direct=yes
436
        hardcode_direct=yes
426
        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
437
        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
427
          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
438
          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
Line 513... Line 524...
513
    ;;
524
    ;;
514
  aix[4-9]*)
525
  aix[4-9]*)
515
    library_names_spec='$libname$shrext'
526
    library_names_spec='$libname$shrext'
516
    ;;
527
    ;;
517
  amigaos*)
528
  amigaos*)
-
 
529
    case "$host_cpu" in
-
 
530
      powerpc*)
-
 
531
        library_names_spec='$libname$shrext' ;;
-
 
532
      m68k)
518
    library_names_spec='$libname.a'
533
        library_names_spec='$libname.a' ;;
-
 
534
    esac
519
    ;;
535
    ;;
520
  beos*)
536
  beos*)
521
    library_names_spec='$libname$shrext'
537
    library_names_spec='$libname$shrext'
522
    ;;
538
    ;;
523
  bsdi[45]*)
539
  bsdi[45]*)
Line 532... Line 548...
532
    library_names_spec='$libname$shrext'
548
    library_names_spec='$libname$shrext'
533
    ;;
549
    ;;
534
  dgux*)
550
  dgux*)
535
    library_names_spec='$libname$shrext'
551
    library_names_spec='$libname$shrext'
536
    ;;
552
    ;;
537
  freebsd1.*)
-
 
538
    ;;
-
 
539
  freebsd* | dragonfly*)
553
  freebsd* | dragonfly*)
540
    case "$host_os" in
554
    case "$host_os" in
541
      freebsd[123].*)
555
      freebsd[123]*)
542
        library_names_spec='$libname$shrext$versuffix' ;;
556
        library_names_spec='$libname$shrext$versuffix' ;;
543
      *)
557
      *)
544
        library_names_spec='$libname$shrext' ;;
558
        library_names_spec='$libname$shrext' ;;
545
    esac
559
    esac
546
    ;;
560
    ;;
547
  gnu*)
561
  gnu*)
548
    library_names_spec='$libname$shrext'
562
    library_names_spec='$libname$shrext'
549
    ;;
563
    ;;
-
 
564
  haiku*)
-
 
565
    library_names_spec='$libname$shrext'
-
 
566
    ;;
550
  hpux9* | hpux10* | hpux11*)
567
  hpux9* | hpux10* | hpux11*)
551
    case $host_cpu in
568
    case $host_cpu in
552
      ia64*)
569
      ia64*)
553
        shrext=.so
570
        shrext=.so
554
        ;;
571
        ;;
Line 580... Line 597...
580
        ;;
597
        ;;
581
    esac
598
    esac
582
    ;;
599
    ;;
583
  linux*oldld* | linux*aout* | linux*coff*)
600
  linux*oldld* | linux*aout* | linux*coff*)
584
    ;;
601
    ;;
585
  linux* | k*bsd*-gnu)
602
  linux* | k*bsd*-gnu | kopensolaris*-gnu)
586
    library_names_spec='$libname$shrext'
603
    library_names_spec='$libname$shrext'
587
    ;;
604
    ;;
588
  knetbsd*-gnu)
605
  knetbsd*-gnu)
589
    library_names_spec='$libname$shrext'
606
    library_names_spec='$libname$shrext'
590
    ;;
607
    ;;
Line 592... Line 609...
592
    library_names_spec='$libname$shrext'
609
    library_names_spec='$libname$shrext'
593
    ;;
610
    ;;
594
  newsos6)
611
  newsos6)
595
    library_names_spec='$libname$shrext'
612
    library_names_spec='$libname$shrext'
596
    ;;
613
    ;;
597
  nto-qnx*)
614
  *nto* | *qnx*)
598
    library_names_spec='$libname$shrext'
615
    library_names_spec='$libname$shrext'
599
    ;;
616
    ;;
600
  openbsd*)
617
  openbsd*)
601
    library_names_spec='$libname$shrext$versuffix'
618
    library_names_spec='$libname$shrext$versuffix'
602
    ;;
619
    ;;
Line 623... Line 640...
623
    library_names_spec='$libname$shrext'
640
    library_names_spec='$libname$shrext'
624
    ;;
641
    ;;
625
  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
642
  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
626
    library_names_spec='$libname$shrext'
643
    library_names_spec='$libname$shrext'
627
    ;;
644
    ;;
-
 
645
  tpf*)
-
 
646
    library_names_spec='$libname$shrext'
-
 
647
    ;;
628
  uts4*)
648
  uts4*)
629
    library_names_spec='$libname$shrext'
649
    library_names_spec='$libname$shrext'
630
    ;;
650
    ;;
631
esac
651
esac
632
 
652