* lib/stat-time.h: (get_stat_birthtime): Check for zero-valued
[gnulib.git] / build-aux / config.libpath
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 at run time.
4 #
5 #   Copyright 1996-2005 Free Software Foundation, Inc.
6 #   Taken from GNU libtool, 2003
7 #   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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 Foundation,
21 #   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 variable LD should be set by the caller.
33 #
34 # The set of defined variables is at the end of this script.
35
36 host="$1"
37 host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
38 host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
39 host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
40
41 shlibpath_var=
42 case $host_os in
43   aix3*)
44     shlibpath_var=LIBPATH
45     ;;
46   aix4* | aix5*)
47     if test "$host_cpu" = ia64; then
48       # AIX 5 supports IA64
49       shlibpath_var=LD_LIBRARY_PATH
50     else
51       shlibpath_var=LIBPATH
52     fi
53     ;;
54   beos*)
55     shlibpath_var=LIBRARY_PATH
56     ;;
57   bsdi[45]*)
58     shlibpath_var=LD_LIBRARY_PATH
59     ;;
60   cygwin* | mingw* | pw32*)
61     # FIXME: first we should search . and the directory the executable is in
62     shlibpath_var=PATH
63     ;;
64   darwin* | rhapsody*)
65     shlibpath_var=DYLD_LIBRARY_PATH
66     ;;
67   dgux*)
68     shlibpath_var=LD_LIBRARY_PATH
69     ;;
70   kfreebsd*-gnu)
71     shlibpath_var=LD_LIBRARY_PATH
72     ;;
73   freebsd1*)
74     ;;
75   freebsd* | dragonfly*)
76     shlibpath_var=LD_LIBRARY_PATH
77     ;;
78   gnu*)
79     shlibpath_var=LD_LIBRARY_PATH
80     ;;
81   hpux9* | hpux10* | hpux11*)
82     case "$host_cpu" in
83       ia64* | hppa*64*) shlibpath_var=LD_LIBRARY_PATH ;;
84       *) shlibpath_var=SHLIB_PATH ;;
85     esac
86     ;;
87   interix3*)
88     shlibpath_var=LD_LIBRARY_PATH
89     ;;
90   irix5* | irix6* | nonstopux*)
91     case $host_os in
92       irix5* | nonstopux*)
93         shlibsuff=
94         ;;
95       *)
96         case $LD in # libtool.m4 will add one of these switches to LD
97           *-32|*"-32 ") shlibsuff= ;;
98           *-n32|*"-n32 ") shlibsuff=N32 ;;
99           *-64|*"-64 ") shlibsuff=64 ;;
100           *) shlibsuff= ;;
101         esac
102         ;;
103     esac
104     shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
105     ;;
106   linux*oldld* | linux*aout* | linux*coff*)
107     ;;
108   linux*)
109     shlibpath_var=LD_LIBRARY_PATH
110     ;;
111   knetbsd*-gnu)
112     shlibpath_var=LD_LIBRARY_PATH
113     ;;
114   netbsd*)
115     shlibpath_var=LD_LIBRARY_PATH
116     ;;
117   newsos6)
118     shlibpath_var=LD_LIBRARY_PATH
119     ;;
120   nto-qnx*)
121     shlibpath_var=LD_LIBRARY_PATH
122     ;;
123   openbsd*)
124     shlibpath_var=LD_LIBRARY_PATH
125     ;;
126   os2*)
127     shlibpath_var=LIBPATH
128     ;;
129   osf3* | osf4* | osf5*)
130     shlibpath_var=LD_LIBRARY_PATH
131     ;;
132   solaris*)
133     shlibpath_var=LD_LIBRARY_PATH
134     ;;
135   sunos4*)
136     shlibpath_var=LD_LIBRARY_PATH
137     ;;
138   sysv4 | sysv4.3*)
139     shlibpath_var=LD_LIBRARY_PATH
140     ;;
141   sysv4*MP*)
142     if test -d /usr/nec ;then
143       shlibpath_var=LD_LIBRARY_PATH
144     fi
145     ;;
146   sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
147     shlibpath_var=LD_LIBRARY_PATH
148     ;;
149   uts4*)
150     shlibpath_var=LD_LIBRARY_PATH
151     ;;
152 esac
153
154 LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
155
156 # This is the shared library path variable.
157 shlibpath_var=$shlibpath_var
158
159 EOF