3 ?RCS: You may redistribute only under the terms of the Artistic Licence,
4 ?RCS: as specified in the README file that comes with the distribution.
5 ?RCS: You may reuse parts of this distribution only within the terms of
6 ?RCS: that same Artistic Licence; a copy of which may be found at the root
7 ?RCS: of the source tree for dist 3.0.
9 ?RCS: $Log: dlsrc.U,v $
11 ?X: hpux support thanks to Jeff Okamoto <okamoto@hpcc101.corp.hp.com>
13 ?X: To create a shared library, you must compile ALL source files in the
14 ?X: library with +z (or possibly +Z if the library is whopping huge),
15 ?X: then link the library with -b. Example:
16 ?X: cc -c +z module_a.c
17 ?X: cc -c +z module_b.c
18 ?X: ld -b module_a.o module_b.o -o module.sl
20 ?MAKE:usedl dlsrc dlobj dldir cccdlflags lddlflags ccdlflags \
21 shlibsuffix: Getfile Myread test osname sed i_dlfcn Findhdr cc
22 ?MAKE: -pick add $@ %<
24 ?S: This variable contains indicates if the the system supports dynamic
25 ?S: loading of some sort. See also dlsrc and dlobj.
28 ?S: This variable contains the name of the dynamic loading file that
29 ?S: will be used with the package.
32 ?S: This variable contains the name of the dynamic loading object
33 ?S: file that will be used with the package. This is used in Makefile.
36 ?S: This variable contains the directory from which to fetch dlsrc.
37 ?S: It is up to the makefile to use it.
40 ?S: This variable contains any special flags that might need to be
41 ?S: passed with cc -c to compile modules to be used to create a shared
42 ?S: library that will be used for dynamic loading. For hpux, this
43 ?S: should be +z. It is up to the makefile to use it.
46 ?S: This variable contains any special flags that might need to be
47 ?S: passed to ld to create a shared library suitable for dynamic
48 ?S: loading. It is up to the makefile to use it. For hpux, it
49 ?S: should be -b. For sunos 4.1, it is empty.
52 ?S: This variable contains any special flags that might need to be
53 ?S: passed to cc to link with a shared library for dynamic loading.
54 ?S: It is up to the makefile to use it. For sunos 4.1, it should
58 ?S: Shared libraries are built by Makefile in the form
59 ?S: lib/auto/xxx/xxx${shsuffix}, where xxx is
60 ?S: the name of the library, e.g. /lib/auto/POSIX/POSIX.so
62 ?C:USE_DYNAMIC_LOADING ~ %<:
63 ?C: This symbol, if defined, indicates that dynamic loading of
64 ?C: some sort is available.
66 ?H:?%<:#$usedl USE_DYNAMIC_LOADING /**/
69 ?INIT:: File to use for dynamic loading
73 ?X: We select a default of 'define' for usedl if either dl_$osname.c
74 ?X: exists or if i_dlfcn is defined (which probably means dl_sunos.c
77 : determine which dynamic loading, if any, to compile in
80 '') case "$i_dlfcn" in
84 : Does a dl.c file exist for this operating system
85 $test -f ../ext/dl/dl_${osname}.c && dflt='y'
87 define|y|true) dflt='y'
93 rp="Do you wish to attempt to use dynamic loading?"
98 if $test -f ../ext/dl/dl_${osname}.c ; then
99 dflt="ext/dl/dl_${osname}.c"
103 echo "The following dynamic loading files are available:"
104 cd ..; ls -C ext/dl/dl*.c; cd UU
105 rp="Source file to use for dynamic loading"
108 : emulate basename and dirname
109 xxx=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@' -e 's@\.c$@@'`
112 dldir=`echo $ans | $sed 's@\(.*\)/[^/]*$@\1@'`
117 if $test -f ../$dldir/$dlsrc; then
120 echo "File $dlsrc does not exist -- ignored"
126 Some systems may require passing special flags to $cc -c to
127 compile modules that will be used to create a shared library.
128 To use no flags, say "none".
130 case "$cccdlflags" in
131 ''|' ') case "$osname" in
134 sunos) dflt='none' ;;
138 *) dflt="$cccdlflags" ;;
140 rp="Any special flags to pass to $cc -c to compile shared library modules?"
143 none) cccdlflags='' ;;
144 *) cccdlflags="$ans" ;;
149 Some systems may require passing special flags to ld to
150 create a shared library. To use no flags, say "none".
152 ?X: I have received one report that NeXT requires -r here.
153 ?X: On SunOS 4.1.3, that makes the library no longer shared.
155 ''|' ') case "$osname" in
158 sunos) dflt='none' ;;
162 *) dflt="$lddlflags" ;;
164 rp="Any special flags to pass to ld to create a shared library?"
167 none) lddlflags='' ;;
168 *) lddlflags="$ans" ;;
173 Some systems may require passing special flags to $cc to indicate that
174 dynamic linking will be used. To use no flags, say "none".
181 sunos) dflt='none' ;;
188 rp="Any special flags to pass to $cc to use dynamic loading?"
191 none) ccdlflags='' ;;
192 *) ccdlflags="$ans" ;;
196 Some systems may require using a special suffix for shared libraries.
197 To create the shared library for POSIX, for example, you may need to
198 actually build the file POSIX.so.
201 case "$shlibsuffix" in
210 *) dflt="$shlibsuffix"
213 rp="What is the suffix used for shared libraries?"
216 none) shlibsuffix='' ;;
217 *) shlibsuffix="$ans" ;;
220 ?X: End of usedl=y section
222 : These are currently not used.