config.rpath 18 KB
Newer Older
Radford Neal's avatar
Radford Neal committed
1 2 3 4
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
Radford Neal's avatar
Radford Neal committed
5
#   Copyright 1996-2010 Free Software Foundation, Inc.
Radford Neal's avatar
Radford Neal committed
6 7 8
#   Taken from GNU libtool, 2001
#   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
Radford Neal's avatar
Radford Neal committed
9 10 11
#   This file is free software; the Free Software Foundation gives
#   unlimited permission to copy and/or distribute it, with or without
#   modifications, as long as this notice is preserved.
Radford Neal's avatar
Radford Neal committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#
# The first argument passed to this file is the canonical host specification,
#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
# should be set by the caller.
#
# The set of defined variables is at the end of this script.

# Known limitations:
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
#   than 256 bytes, otherwise the compiler driver will dump core. The only
#   known workaround is to choose shorter directory names for the build
#   directory and/or the installation directory.

Radford Neal's avatar
Radford Neal committed
28
# All known linkers require a `.a' archive for static linking (except MSVC,
Radford Neal's avatar
Radford Neal committed
29 30 31 32 33 34 35 36 37
# which needs '.lib').
libext=a
shrext=.so

host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

Radford Neal's avatar
Radford Neal committed
38 39 40 41 42 43 44 45 46 47 48 49 50
# Code taken from libtool.m4's _LT_CC_BASENAME.

for cc_temp in $CC""; do
  case $cc_temp in
    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
    \-*) ;;
    *) break;;
  esac
done
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`

# Code taken from libtool.m4's _LT_COMPILER_PIC.
Radford Neal's avatar
Radford Neal committed
51 52 53 54 55 56 57 58 59

wl=
if test "$GCC" = yes; then
  wl='-Wl,'
else
  case "$host_os" in
    aix*)
      wl='-Wl,'
      ;;
Radford Neal's avatar
Radford Neal committed
60 61 62 63 64 65 66 67
    darwin*)
      case $cc_basename in
        xlc*)
          wl='-Wl,'
          ;;
      esac
      ;;
    mingw* | cygwin* | pw32* | os2* | cegcc*)
Radford Neal's avatar
Radford Neal committed
68 69 70 71 72 73 74 75 76
      ;;
    hpux9* | hpux10* | hpux11*)
      wl='-Wl,'
      ;;
    irix5* | irix6* | nonstopux*)
      wl='-Wl,'
      ;;
    newsos6)
      ;;
Radford Neal's avatar
Radford Neal committed
77 78 79
    linux* | k*bsd*-gnu)
      case $cc_basename in
        ecc*)
Radford Neal's avatar
Radford Neal committed
80 81
          wl='-Wl,'
          ;;
Radford Neal's avatar
Radford Neal committed
82
        icc* | ifort*)
Radford Neal's avatar
Radford Neal committed
83 84
          wl='-Wl,'
          ;;
Radford Neal's avatar
Radford Neal committed
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
        lf95*)
          wl='-Wl,'
          ;;
        pgcc | pgf77 | pgf90)
          wl='-Wl,'
          ;;
        ccc*)
          wl='-Wl,'
          ;;
        como)
          wl='-lopt='
          ;;
        *)
          case `$CC -V 2>&1 | sed 5q` in
            *Sun\ C*)
              wl='-Wl,'
              ;;
          esac
          ;;
Radford Neal's avatar
Radford Neal committed
104 105 106 107 108
      esac
      ;;
    osf3* | osf4* | osf5*)
      wl='-Wl,'
      ;;
Radford Neal's avatar
Radford Neal committed
109
    rdos*)
Radford Neal's avatar
Radford Neal committed
110 111 112 113 114 115 116
      ;;
    solaris*)
      wl='-Wl,'
      ;;
    sunos4*)
      wl='-Qoption ld '
      ;;
Radford Neal's avatar
Radford Neal committed
117
    sysv4 | sysv4.2uw2* | sysv4.3*)
Radford Neal's avatar
Radford Neal committed
118 119 120 121
      wl='-Wl,'
      ;;
    sysv4*MP*)
      ;;
Radford Neal's avatar
Radford Neal committed
122 123 124 125 126 127
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
      wl='-Wl,'
      ;;
    unicos*)
      wl='-Wl,'
      ;;
Radford Neal's avatar
Radford Neal committed
128 129 130 131 132
    uts4*)
      ;;
  esac
fi

Radford Neal's avatar
Radford Neal committed
133
# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
Radford Neal's avatar
Radford Neal committed
134 135 136 137 138 139 140

hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no

case "$host_os" in
Radford Neal's avatar
Radford Neal committed
141
  cygwin* | mingw* | pw32* | cegcc*)
Radford Neal's avatar
Radford Neal committed
142 143 144 145 146 147 148
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
    # When not using gcc, we currently assume that we are using
    # Microsoft Visual C++.
    if test "$GCC" != yes; then
      with_gnu_ld=no
    fi
    ;;
Radford Neal's avatar
Radford Neal committed
149 150 151 152
  interix*)
    # we just hope/assume this is gcc and not c89 (= MSVC++)
    with_gnu_ld=yes
    ;;
Radford Neal's avatar
Radford Neal committed
153 154 155 156 157 158 159
  openbsd*)
    with_gnu_ld=no
    ;;
esac

ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
Radford Neal's avatar
Radford Neal committed
160 161 162 163 164 165
  # Set some defaults for GNU ld with shared library support. These
  # are reset later if shared libraries are not supported. Putting them
  # here allows them to be overridden if necessary.
  # Unlike libtool, we use -rpath here, not --rpath, since the documented
  # option of GNU ld is called -rpath, not --rpath.
  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
Radford Neal's avatar
Radford Neal committed
166
  case "$host_os" in
Radford Neal's avatar
Radford Neal committed
167
    aix[3-9]*)
Radford Neal's avatar
Radford Neal committed
168 169 170 171 172 173 174 175 176 177 178 179
      # On AIX/PPC, the GNU linker is very broken
      if test "$host_cpu" != ia64; then
        ld_shlibs=no
      fi
      ;;
    amigaos*)
      hardcode_libdir_flag_spec='-L$libdir'
      hardcode_minus_L=yes
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
      # that the semantics of dynamic libraries on AmigaOS, at least up
      # to version 4, is to share data among multiple programs linked
      # with the same dynamic library.  Since this doesn't match the
Radford Neal's avatar
Radford Neal committed
180
      # behavior of shared libraries on other platforms, we cannot use
Radford Neal's avatar
Radford Neal committed
181 182 183 184 185 186 187 188 189 190
      # them.
      ld_shlibs=no
      ;;
    beos*)
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
        :
      else
        ld_shlibs=no
      fi
      ;;
Radford Neal's avatar
Radford Neal committed
191
    cygwin* | mingw* | pw32* | cegcc*)
Radford Neal's avatar
Radford Neal committed
192 193 194 195 196 197 198 199 200
      # hardcode_libdir_flag_spec is actually meaningless, as there is
      # no search path for DLLs.
      hardcode_libdir_flag_spec='-L$libdir'
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
        :
      else
        ld_shlibs=no
      fi
      ;;
Radford Neal's avatar
Radford Neal committed
201 202 203 204 205 206 207 208 209 210 211
    interix[3-9]*)
      hardcode_direct=no
      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
      ;;
    gnu* | linux* | k*bsd*-gnu)
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
        :
      else
        ld_shlibs=no
      fi
      ;;
Radford Neal's avatar
Radford Neal committed
212 213
    netbsd*)
      ;;
Radford Neal's avatar
Radford Neal committed
214
    solaris*)
Radford Neal's avatar
Radford Neal committed
215 216 217 218 219 220 221 222
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
        ld_shlibs=no
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
        :
      else
        ld_shlibs=no
      fi
      ;;
Radford Neal's avatar
Radford Neal committed
223 224 225 226 227 228 229 230 231 232 233 234 235 236
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
      case `$LD -v 2>&1` in
        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
          ld_shlibs=no
          ;;
        *)
          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
            hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
          else
            ld_shlibs=no
          fi
          ;;
      esac
      ;;
Radford Neal's avatar
Radford Neal committed
237 238 239 240 241 242 243 244 245 246 247
    sunos4*)
      hardcode_direct=yes
      ;;
    *)
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
        :
      else
        ld_shlibs=no
      fi
      ;;
  esac
Radford Neal's avatar
Radford Neal committed
248 249
  if test "$ld_shlibs" = no; then
    hardcode_libdir_flag_spec=
Radford Neal's avatar
Radford Neal committed
250 251 252 253 254 255 256 257 258 259 260 261 262
  fi
else
  case "$host_os" in
    aix3*)
      # Note: this linker hardcodes the directories in LIBPATH if there
      # are no directories specified by -L.
      hardcode_minus_L=yes
      if test "$GCC" = yes; then
        # Neither direct hardcoding nor static linking is supported with a
        # broken collect2.
        hardcode_direct=unsupported
      fi
      ;;
Radford Neal's avatar
Radford Neal committed
263
    aix[4-9]*)
Radford Neal's avatar
Radford Neal committed
264 265 266 267 268 269 270 271 272
      if test "$host_cpu" = ia64; then
        # On IA64, the linker does run time linking by default, so we don't
        # have to do anything special.
        aix_use_runtimelinking=no
      else
        aix_use_runtimelinking=no
        # Test if we are trying to use run time linking or normal
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
        # need to do runtime linking.
Radford Neal's avatar
Radford Neal committed
273
        case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
Radford Neal's avatar
Radford Neal committed
274 275 276 277 278 279
          for ld_flag in $LDFLAGS; do
            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
              aix_use_runtimelinking=yes
              break
            fi
          done
Radford Neal's avatar
Radford Neal committed
280
          ;;
Radford Neal's avatar
Radford Neal committed
281 282 283 284 285 286 287 288 289 290 291
        esac
      fi
      hardcode_direct=yes
      hardcode_libdir_separator=':'
      if test "$GCC" = yes; then
        case $host_os in aix4.[012]|aix4.[012].*)
          collect2name=`${CC} -print-prog-name=collect2`
          if test -f "$collect2name" && \
            strings "$collect2name" | grep resolve_lib_name >/dev/null
          then
            # We have reworked collect2
Radford Neal's avatar
Radford Neal committed
292
            :
Radford Neal's avatar
Radford Neal committed
293 294 295 296 297 298 299
          else
            # We have old collect2
            hardcode_direct=unsupported
            hardcode_minus_L=yes
            hardcode_libdir_flag_spec='-L$libdir'
            hardcode_libdir_separator=
          fi
Radford Neal's avatar
Radford Neal committed
300
          ;;
Radford Neal's avatar
Radford Neal committed
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332
        esac
      fi
      # Begin _LT_AC_SYS_LIBPATH_AIX.
      echo 'int main () { return 0; }' > conftest.c
      ${CC} ${LDFLAGS} conftest.c -o conftest
      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
}'`
      if test -z "$aix_libpath"; then
        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
}'`
      fi
      if test -z "$aix_libpath"; then
        aix_libpath="/usr/lib:/lib"
      fi
      rm -f conftest.c conftest
      # End _LT_AC_SYS_LIBPATH_AIX.
      if test "$aix_use_runtimelinking" = yes; then
        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
      else
        if test "$host_cpu" = ia64; then
          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
        else
          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
        fi
      fi
      ;;
    amigaos*)
      hardcode_libdir_flag_spec='-L$libdir'
      hardcode_minus_L=yes
      # see comment about different semantics on the GNU ld section
      ld_shlibs=no
      ;;
Radford Neal's avatar
Radford Neal committed
333
    bsdi[45]*)
Radford Neal's avatar
Radford Neal committed
334
      ;;
Radford Neal's avatar
Radford Neal committed
335
    cygwin* | mingw* | pw32* | cegcc*)
Radford Neal's avatar
Radford Neal committed
336 337 338 339 340 341 342 343
      # When not using gcc, we currently assume that we are using
      # Microsoft Visual C++.
      # hardcode_libdir_flag_spec is actually meaningless, as there is
      # no search path for DLLs.
      hardcode_libdir_flag_spec=' '
      libext=lib
      ;;
    darwin* | rhapsody*)
Radford Neal's avatar
Radford Neal committed
344 345 346 347 348 349 350 351 352 353 354
      hardcode_direct=no
      if test "$GCC" = yes ; then
        :
      else
        case $cc_basename in
          xlc*)
            ;;
          *)
            ld_shlibs=no
            ;;
        esac
Radford Neal's avatar
Radford Neal committed
355 356 357 358 359
      fi
      ;;
    dgux*)
      hardcode_libdir_flag_spec='-L$libdir'
      ;;
Radford Neal's avatar
Radford Neal committed
360
    freebsd1.*)
Radford Neal's avatar
Radford Neal committed
361 362 363 364 365 366 367 368 369 370
      ld_shlibs=no
      ;;
    freebsd2.2*)
      hardcode_libdir_flag_spec='-R$libdir'
      hardcode_direct=yes
      ;;
    freebsd2*)
      hardcode_direct=yes
      hardcode_minus_L=yes
      ;;
Radford Neal's avatar
Radford Neal committed
371
    freebsd* | dragonfly*)
Radford Neal's avatar
Radford Neal committed
372 373 374 375 376 377 378 379 380 381 382
      hardcode_libdir_flag_spec='-R$libdir'
      hardcode_direct=yes
      ;;
    hpux9*)
      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
      hardcode_libdir_separator=:
      hardcode_direct=yes
      # hardcode_minus_L: Not really in the search PATH,
      # but as the default location of the library.
      hardcode_minus_L=yes
      ;;
Radford Neal's avatar
Radford Neal committed
383
    hpux10*)
Radford Neal's avatar
Radford Neal committed
384
      if test "$with_gnu_ld" = no; then
Radford Neal's avatar
Radford Neal committed
385 386 387 388 389 390 391 392 393 394 395 396 397 398
        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
        hardcode_libdir_separator=:
        hardcode_direct=yes
        # hardcode_minus_L: Not really in the search PATH,
        # but as the default location of the library.
        hardcode_minus_L=yes
      fi
      ;;
    hpux11*)
      if test "$with_gnu_ld" = no; then
        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
        hardcode_libdir_separator=:
        case $host_cpu in
          hppa*64*|ia64*)
Radford Neal's avatar
Radford Neal committed
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423
            hardcode_direct=no
            ;;
          *)
            hardcode_direct=yes
            # hardcode_minus_L: Not really in the search PATH,
            # but as the default location of the library.
            hardcode_minus_L=yes
            ;;
        esac
      fi
      ;;
    irix5* | irix6* | nonstopux*)
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
      hardcode_libdir_separator=:
      ;;
    netbsd*)
      hardcode_libdir_flag_spec='-R$libdir'
      hardcode_direct=yes
      ;;
    newsos6)
      hardcode_direct=yes
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
      hardcode_libdir_separator=:
      ;;
    openbsd*)
Radford Neal's avatar
Radford Neal committed
424 425 426 427 428 429 430 431 432 433 434 435 436 437
      if test -f /usr/libexec/ld.so; then
        hardcode_direct=yes
        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
        else
          case "$host_os" in
            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
              hardcode_libdir_flag_spec='-R$libdir'
              ;;
            *)
              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
              ;;
          esac
        fi
Radford Neal's avatar
Radford Neal committed
438
      else
Radford Neal's avatar
Radford Neal committed
439
        ld_shlibs=no
Radford Neal's avatar
Radford Neal committed
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486
      fi
      ;;
    os2*)
      hardcode_libdir_flag_spec='-L$libdir'
      hardcode_minus_L=yes
      ;;
    osf3*)
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
      hardcode_libdir_separator=:
      ;;
    osf4* | osf5*)
      if test "$GCC" = yes; then
        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
      else
        # Both cc and cxx compiler support -rpath directly
        hardcode_libdir_flag_spec='-rpath $libdir'
      fi
      hardcode_libdir_separator=:
      ;;
    solaris*)
      hardcode_libdir_flag_spec='-R$libdir'
      ;;
    sunos4*)
      hardcode_libdir_flag_spec='-L$libdir'
      hardcode_direct=yes
      hardcode_minus_L=yes
      ;;
    sysv4)
      case $host_vendor in
        sni)
          hardcode_direct=yes # is this really true???
          ;;
        siemens)
          hardcode_direct=no
          ;;
        motorola)
          hardcode_direct=no #Motorola manual says yes, but my tests say they lie
          ;;
      esac
      ;;
    sysv4.3*)
      ;;
    sysv4*MP*)
      if test -d /usr/nec; then
        ld_shlibs=yes
      fi
      ;;
Radford Neal's avatar
Radford Neal committed
487
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
Radford Neal's avatar
Radford Neal committed
488
      ;;
Radford Neal's avatar
Radford Neal committed
489 490 491
    sysv5* | sco3.2v5* | sco5v6*)
      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
      hardcode_libdir_separator=':'
Radford Neal's avatar
Radford Neal committed
492 493 494 495 496 497 498 499 500 501 502
      ;;
    uts4*)
      hardcode_libdir_flag_spec='-L$libdir'
      ;;
    *)
      ld_shlibs=no
      ;;
  esac
fi

# Check dynamic linker characteristics
Radford Neal's avatar
Radford Neal committed
503 504 505 506 507 508
# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
# only about the one the linker finds when passed -lNAME. This is the last
# element of library_names_spec in libtool.m4, or possibly two of them if the
# linker has special search rules.
library_names_spec=      # the last element of library_names_spec in libtool.m4
Radford Neal's avatar
Radford Neal committed
509 510 511
libname_spec='lib$name'
case "$host_os" in
  aix3*)
Radford Neal's avatar
Radford Neal committed
512
    library_names_spec='$libname.a'
Radford Neal's avatar
Radford Neal committed
513
    ;;
Radford Neal's avatar
Radford Neal committed
514 515
  aix[4-9]*)
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
516 517
    ;;
  amigaos*)
Radford Neal's avatar
Radford Neal committed
518
    library_names_spec='$libname.a'
Radford Neal's avatar
Radford Neal committed
519 520
    ;;
  beos*)
Radford Neal's avatar
Radford Neal committed
521
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
522
    ;;
Radford Neal's avatar
Radford Neal committed
523 524
  bsdi[45]*)
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
525
    ;;
Radford Neal's avatar
Radford Neal committed
526
  cygwin* | mingw* | pw32* | cegcc*)
Radford Neal's avatar
Radford Neal committed
527
    shrext=.dll
Radford Neal's avatar
Radford Neal committed
528
    library_names_spec='$libname.dll.a $libname.lib'
Radford Neal's avatar
Radford Neal committed
529 530 531
    ;;
  darwin* | rhapsody*)
    shrext=.dylib
Radford Neal's avatar
Radford Neal committed
532
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
533 534
    ;;
  dgux*)
Radford Neal's avatar
Radford Neal committed
535
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
536
    ;;
Radford Neal's avatar
Radford Neal committed
537
  freebsd1.*)
Radford Neal's avatar
Radford Neal committed
538
    ;;
Radford Neal's avatar
Radford Neal committed
539 540 541 542 543 544 545
  freebsd* | dragonfly*)
    case "$host_os" in
      freebsd[123].*)
        library_names_spec='$libname$shrext$versuffix' ;;
      *)
        library_names_spec='$libname$shrext' ;;
    esac
Radford Neal's avatar
Radford Neal committed
546 547
    ;;
  gnu*)
Radford Neal's avatar
Radford Neal committed
548
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
549 550
    ;;
  hpux9* | hpux10* | hpux11*)
Radford Neal's avatar
Radford Neal committed
551
    case $host_cpu in
Radford Neal's avatar
Radford Neal committed
552 553 554 555 556 557 558 559 560 561
      ia64*)
        shrext=.so
        ;;
      hppa*64*)
        shrext=.sl
        ;;
      *)
        shrext=.sl
        ;;
    esac
Radford Neal's avatar
Radford Neal committed
562 563 564 565
    library_names_spec='$libname$shrext'
    ;;
  interix[3-9]*)
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
566 567
    ;;
  irix5* | irix6* | nonstopux*)
Radford Neal's avatar
Radford Neal committed
568
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584
    case "$host_os" in
      irix5* | nonstopux*)
        libsuff= shlibsuff=
        ;;
      *)
        case $LD in
          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
          *) libsuff= shlibsuff= ;;
        esac
        ;;
    esac
    ;;
  linux*oldld* | linux*aout* | linux*coff*)
    ;;
Radford Neal's avatar
Radford Neal committed
585 586 587 588 589
  linux* | k*bsd*-gnu)
    library_names_spec='$libname$shrext'
    ;;
  knetbsd*-gnu)
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
590 591
    ;;
  netbsd*)
Radford Neal's avatar
Radford Neal committed
592
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
593 594
    ;;
  newsos6)
Radford Neal's avatar
Radford Neal committed
595
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
596
    ;;
Radford Neal's avatar
Radford Neal committed
597 598
  nto-qnx*)
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
599 600
    ;;
  openbsd*)
Radford Neal's avatar
Radford Neal committed
601
    library_names_spec='$libname$shrext$versuffix'
Radford Neal's avatar
Radford Neal committed
602 603 604 605
    ;;
  os2*)
    libname_spec='$name'
    shrext=.dll
Radford Neal's avatar
Radford Neal committed
606
    library_names_spec='$libname.a'
Radford Neal's avatar
Radford Neal committed
607 608
    ;;
  osf3* | osf4* | osf5*)
Radford Neal's avatar
Radford Neal committed
609
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
610
    ;;
Radford Neal's avatar
Radford Neal committed
611
  rdos*)
Radford Neal's avatar
Radford Neal committed
612 613
    ;;
  solaris*)
Radford Neal's avatar
Radford Neal committed
614
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
615 616
    ;;
  sunos4*)
Radford Neal's avatar
Radford Neal committed
617
    library_names_spec='$libname$shrext$versuffix'
Radford Neal's avatar
Radford Neal committed
618
    ;;
Radford Neal's avatar
Radford Neal committed
619 620
  sysv4 | sysv4.3*)
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
621 622
    ;;
  sysv4*MP*)
Radford Neal's avatar
Radford Neal committed
623 624 625 626
    library_names_spec='$libname$shrext'
    ;;
  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
627 628
    ;;
  uts4*)
Radford Neal's avatar
Radford Neal committed
629
    library_names_spec='$libname$shrext'
Radford Neal's avatar
Radford Neal committed
630 631 632 633 634 635
    ;;
esac

sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
Radford Neal's avatar
Radford Neal committed
636 637
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
Radford Neal's avatar
Radford Neal committed
638 639
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`

Radford Neal's avatar
Radford Neal committed
640
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
Radford Neal's avatar
Radford Neal committed
641 642 643 644 645 646 647 648 649 650

# How to pass a linker flag through the compiler.
wl="$escaped_wl"

# Static library suffix (normally "a").
libext="$libext"

# Shared library suffix (normally "so").
shlibext="$shlibext"

Radford Neal's avatar
Radford Neal committed
651 652 653 654 655 656
# Format of library name prefix.
libname_spec="$escaped_libname_spec"

# Library names that the linker finds when passed -lNAME.
library_names_spec="$escaped_library_names_spec"

Radford Neal's avatar
Radford Neal committed
657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"

# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator="$hardcode_libdir_separator"

# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
hardcode_direct="$hardcode_direct"

# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L="$hardcode_minus_L"

EOF