diff options
Diffstat (limited to 'U/dlsrc.U')
-rw-r--r-- | U/dlsrc.U | 230 |
1 files changed, 0 insertions, 230 deletions
diff --git a/U/dlsrc.U b/U/dlsrc.U deleted file mode 100644 index 616818d346..0000000000 --- a/U/dlsrc.U +++ /dev/null @@ -1,230 +0,0 @@ -?RCS: $Id: dlsrc.U,v$ -?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, -?RCS: as specified in the README file that comes with the distribution. -?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. -?RCS: -?RCS: $Log: dlsrc.U,v $ -?RCS: -?X: hpux support thanks to Jeff Okamoto <okamoto@hpcc101.corp.hp.com> -?X: -?X: To create a shared library, you must compile ALL source files in the -?X: library with +z (or possibly +Z if the library is whopping huge), -?X: then link the library with -b. Example: -?X: cc -c +z module_a.c -?X: cc -c +z module_b.c -?X: ld -b module_a.o module_b.o -o module.sl -?X: -?MAKE:usedl dlsrc dlobj dldir cccdlflags lddlflags ccdlflags \ - shlibsuffix: Getfile Myread test osname sed i_dlfcn Findhdr cc -?MAKE: -pick add $@ %< -?S:usedl: -?S: This variable contains indicates if the the system supports dynamic -?S: loading of some sort. See also dlsrc and dlobj. -?S:. -?S:dlsrc: -?S: This variable contains the name of the dynamic loading file that -?S: will be used with the package. -?S:. -?S:dlobj: -?S: This variable contains the name of the dynamic loading object -?S: file that will be used with the package. This is used in Makefile. -?S:. -?S:dldir: -?S: This variable contains the directory from which to fetch dlsrc. -?S: It is up to the makefile to use it. -?S:. -?S:cccdlflags: -?S: This variable contains any special flags that might need to be -?S: passed with cc -c to compile modules to be used to create a shared -?S: library that will be used for dynamic loading. For hpux, this -?S: should be +z. It is up to the makefile to use it. -?S:. -?S:lddlflags: -?S: This variable contains any special flags that might need to be -?S: passed to ld to create a shared library suitable for dynamic -?S: loading. It is up to the makefile to use it. For hpux, it -?S: should be -b. For sunos 4.1, it is empty. -?S:. -?S:ccdlflags: -?S: This variable contains any special flags that might need to be -?S: passed to cc to link with a shared library for dynamic loading. -?S: It is up to the makefile to use it. For sunos 4.1, it should -?S: be empty. -?S:. -?S:shlibsuffix: -?S: Shared libraries are built by Makefile in the form -?S: lib/auto/xxx/xxx${shsuffix}, where xxx is -?S: the name of the library, e.g. /lib/auto/POSIX/POSIX.so -?S:. -?C:USE_DYNAMIC_LOADING ~ %<: -?C: This symbol, if defined, indicates that dynamic loading of -?C: some sort is available. -?C:. -?H:?%<:#$usedl USE_DYNAMIC_LOADING /**/ -?H:. -?W:%<:dlopen -?INIT:: File to use for dynamic loading -?INIT:usedl='' -?T:xxx -?X: -?X: We select a default of 'define' for usedl if either dl_$osname.c -?X: exists or if i_dlfcn is defined (which probably means dl_sunos.c -?X: will work.) -?X: -: determine which dynamic loading, if any, to compile in -echo " " -case "$usedl" in -'') case "$i_dlfcn" in - define) dflt='y' ;; - *) dflt='n' ;; - esac - : Does a dl.c file exist for this operating system - $test -f ../ext/dl/dl_${osname}.c && dflt='y' - ;; -define|y|true) dflt='y' - usedl="$define" - ;; -*) dflt='n' - ;; -esac -rp="Do you wish to attempt to use dynamic loading?" -. ./myread -usedl="$ans" -case "$ans" in -y*) usedl="$define" - if $test -f ../ext/dl/dl_${osname}.c ; then - dflt="ext/dl/dl_${osname}.c" - else - dflt='ext/dl/dl.c' - fi - echo "The following dynamic loading files are available:" - cd ..; ls -C ext/dl/dl*.c; cd UU - rp="Source file to use for dynamic loading" - fn="fne~" - . ./getfile - : emulate basename and dirname - xxx=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@' -e 's@\.c$@@'` - dlobj=$xxx.o - dlsrc=$xxx.c - dldir=`echo $ans | $sed 's@\(.*\)/[^/]*$@\1@'` - case "$dldir" in - '') dldir="." ;; - *) ;; - esac - if $test -f ../$dldir/$dlsrc; then - usedl="$define" - else - echo "File $dlsrc does not exist -- ignored" - usedl="$undef" - fi - - cat << EOM - -Some systems may require passing special flags to $cc -c to -compile modules that will be used to create a shared library. -To use no flags, say "none". -EOM - case "$cccdlflags" in - ''|' ') case "$osname" in - hpux) dflt='+z' ;; - next) dflt='none' ;; - sunos) dflt='none' ;; - *) dflt='none' ;; - esac - ;; - *) dflt="$cccdlflags" ;; - esac - rp="Any special flags to pass to $cc -c to compile shared library modules?" - . ./myread - case "$ans" in - none) cccdlflags='' ;; - *) cccdlflags="$ans" ;; - esac - - cat << 'EOM' - -Some systems may require passing special flags to ld to -create a shared library. To use no flags, say "none". -EOM -?X: I have received one report that NeXT requires -r here. -?X: On SunOS 4.1.3, that makes the library no longer shared. - case "$lddlflags" in - ''|' ') case "$osname" in - hpux) dflt='-b' ;; - next) dflt='none' ;; - sunos) dflt='none' ;; - *) dflt='none' ;; - esac - ;; - *) dflt="$lddlflags" ;; - esac - rp="Any special flags to pass to ld to create a shared library?" - . ./myread - case "$ans" in - none) lddlflags='' ;; - *) lddlflags="$ans" ;; - esac - - cat <<EOM - -Some systems may require passing special flags to $cc to indicate that -dynamic linking will be used. To use no flags, say "none". -EOM - case "$ccdlflags" in - ''|' ') - case "$osname" in - hpux) dflt='none' ;; - next) dflt='none' ;; - sunos) dflt='none' ;; - *) dflt='none' ;; - esac - ;; - *) dflt="$ccdlflags" - ;; - esac - rp="Any special flags to pass to $cc to use dynamic loading?" - . ./myread - case "$ans" in - none) ccdlflags='' ;; - *) ccdlflags="$ans" ;; - esac - cat <<EOM - -Some systems may require using a special suffix for shared libraries. -To create the shared library for POSIX, for example, you may need to -actually build the file POSIX.so. - -EOM - case "$shlibsuffix" in - '') - case "$osname" in - hpux) dflt='.sl' ;; - next) dflt='.so' ;; - sunos) dflt='.so' ;; - *) dflt='.so' ;; - esac - ;; - *) dflt="$shlibsuffix" - ;; - esac - rp="What is the suffix used for shared libraries?" - . ./myread - case "$ans" in - none) shlibsuffix='' ;; - *) shlibsuffix="$ans" ;; - esac - ;; -?X: End of usedl=y section -*) usedl="$undef" - : These are currently not used. - dlsrc='' - dlobj='' - dldir='' - lddlflags='' - ccdlflags='' - shlibsuffix='.o' - ;; -esac |