source: trunk/essentials/sys-apps/diffutils/config/config.rpath@ 3137

Last change on this file since 3137 was 2556, checked in by bird, 20 years ago

diffutils 2.8.1

File size: 13.8 KB
Line 
1#! /bin/sh
2# Output a system dependent set of variables, describing how to set the
3# run time search path of shared libraries in an executable.
4#
5# Copyright 1996-2002 Free Software Foundation, Inc.
6# Taken from GNU libtool, 2001
7# Originally by Gordon Matzigkeit <[email protected]>, 1996
8#
9# This program is free software; you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17# General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software
21# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22#
23# As a special exception to the GNU General Public License, if you
24# distribute this file as part of a program that contains a
25# configuration script generated by Autoconf, you may include it under
26# the same distribution terms that you use for the rest of that program.
27#
28# The first argument passed to this file is the canonical host specification,
29# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
30# or
31# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
32# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
33# should be set by the caller.
34#
35# The set of defined variables is at the end of this script.
36
37# All known linkers require a `.a' archive for static linking (except M$VC,
38# which needs '.lib').
39libext=a
40shlibext=
41
42host="$1"
43host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
44host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
45host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
46
47wl=
48if test "$GCC" = yes; then
49 wl='-Wl,'
50else
51 case "$host_os" in
52 aix3* | aix4* | aix5*)
53 wl='-Wl,'
54 ;;
55 hpux9* | hpux10* | hpux11*)
56 wl='-Wl,'
57 ;;
58 irix5* | irix6*)
59 wl='-Wl,'
60 ;;
61 linux*)
62 echo '__INTEL_COMPILER' > conftest.$ac_ext
63 if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
64 then
65 :
66 else
67 # Intel icc
68 wl='-Qoption,ld,'
69 fi
70 ;;
71 osf3* | osf4* | osf5*)
72 wl='-Wl,'
73 ;;
74 solaris*)
75 wl='-Wl,'
76 ;;
77 sunos4*)
78 wl='-Qoption ld '
79 ;;
80 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
81 if test "x$host_vendor" = xsni; then
82 wl='-LD'
83 else
84 wl='-Wl,'
85 fi
86 ;;
87 esac
88fi
89
90hardcode_libdir_flag_spec=
91hardcode_libdir_separator=
92hardcode_direct=no
93hardcode_minus_L=no
94
95case "$host_os" in
96 cygwin* | mingw* | pw32*)
97 # FIXME: the MSVC++ port hasn't been tested in a loooong time
98 # When not using gcc, we currently assume that we are using
99 # Microsoft Visual C++.
100 if test "$GCC" != yes; then
101 with_gnu_ld=no
102 fi
103 ;;
104 openbsd*)
105 with_gnu_ld=no
106 ;;
107esac
108