| 1 | # $Id: dgux.sh,v 1.9 2001-05-07 00:06:00-05 Takis Exp $
|
|---|
| 2 |
|
|---|
| 3 | # This is a hints file for DGUX, which is EMC's Data General's Unix. It
|
|---|
| 4 | # was originally developed with version 5.4.3.10 of the OS, and then was
|
|---|
| 5 | # later updated running under version 4.11.2 (running on m88k hardware).
|
|---|
| 6 | # The gross features should work with versions going back to 2.nil but
|
|---|
| 7 | # some tweaking will probably be necessary.
|
|---|
| 8 | #
|
|---|
| 9 | # DGUX is an SVR4 derivative. It ships with gcc as the standard
|
|---|
| 10 | # compiler. Since version 3.0 it has shipped with Perl 4.036
|
|---|
| 11 | # installed in /usr/bin, which is kind of neat. Be careful when you
|
|---|
| 12 | # install that you don't overwrite the system version, though (by
|
|---|
| 13 | # answering yes to the question about installing perl as /usr/bin/perl),
|
|---|
| 14 | # as it would suck to try to get support if the vendor learned that you
|
|---|
| 15 | # were physically replacing the system binaries.
|
|---|
| 16 | #
|
|---|
| 17 | # -Roderick Schertler <[email protected]>
|
|---|
| 18 |
|
|---|
| 19 | # The standard system compiler is gcc, but invoking it as cc changes its
|
|---|
| 20 | # behavior. I have to pick one name or the other so I can get the
|
|---|
| 21 | # dynamic loading switches right (they vary depending on this). I'm
|
|---|
| 22 | # picking gcc because there's no way to get at the optimization options
|
|---|
| 23 | # and so on when you call it cc.
|
|---|
| 24 |
|
|---|
| 25 | ##########################################
|
|---|
| 26 | # Modified by Takis Psarogiannakopoulos
|
|---|
| 27 | # Universirty of Cambridge
|
|---|
| 28 | # Centre for Mathematical Sciences
|
|---|
| 29 | # Department of Pure Mathematics
|
|---|
| 30 | # Wilberforce road
|
|---|
| 31 | # Cambridge CB3 0WB , UK
|
|---|
| 32 | # e-mail <[email protected]>
|
|---|
| 33 | # Use GCC-2.95.2/3 rev (DG/UX) for threads
|
|---|
| 34 | # This compiler supports the -pthread switch
|
|---|
| 35 | # to link correctly DG/UX 's -lthread.
|
|---|
| 36 | # March 2002
|
|---|
| 37 | ###########################################
|
|---|
| 38 |
|
|---|
| 39 | cc=gcc
|
|---|
| 40 | ccflags="-DDGUX -D_DGUX_SOURCE"
|
|---|
| 41 | # Debug build. If using GNU as,ld use the flag -gstabs+
|
|---|
| 42 | # ccflags="-g -mstandard -DDGUX -D_DGUX_SOURCE -DDEBUGGING"
|
|---|
| 43 | # Dummy ; always compile with -O2 on GCC 2.95.2/3 rev (DG/UX)
|
|---|
| 44 | # even if you debugging the program!
|
|---|
| 45 | optimize="-mno-legend -O2"
|
|---|
| 46 |
|
|---|
| 47 | archname="ix86-dgux"
|
|---|
| 48 | libpth="/usr/lib"
|
|---|
| 49 |
|
|---|
| 50 | #####################################
|
|---|
| 51 | # <[email protected]>
|
|---|
| 52 | # Change this if you want.
|
|---|
| 53 | # prefix =/usr/local
|
|---|
| 54 | #####################################
|
|---|
| 55 |
|
|---|
| 56 | prefix=/usr/local
|
|---|
| 57 | perlpath="$prefix/bin/perl58"
|
|---|
| 58 | startperl="#! $prefix/bin/perl58"
|
|---|
| 59 | privlib="$prefix/lib/perl58"
|
|---|
| 60 | man1dir="$prefix/man/man1"
|
|---|
| 61 | man3dir="$prefix/man/man3"
|
|---|
| 62 |
|
|---|
| 63 | sitearch="$prefix/lib/perl58/$archname"
|
|---|
| 64 | sitelib="$prefix/lib/perl58"
|
|---|
| 65 |
|
|---|
| 66 | #Do not overwrite by default /usr/bin/perl of DG/UX
|
|---|
| 67 | installusrbinperl="$undef"
|
|---|
| 68 |
|
|---|
| 69 | # Configure may fail to find lstat()
|
|---|
| 70 | # function in <sys/stat.h>.
|
|---|
| 71 | d_lstat='define'
|
|---|
| 72 |
|
|---|
| 73 | # Internal (perl) malloc is causing serious problems and
|
|---|
| 74 | # test failures in DG/UX. Most notable Embed.t
|
|---|
| 75 | # So for perl-5.7.3 and on do NOT use.
|
|---|
| 76 | # I have no time to investigate more.
|
|---|
| 77 | # <[email protected]>
|
|---|
| 78 |
|
|---|
| 79 | case "$usemymalloc" in
|
|---|
| 80 | '') usemymalloc='n' ;;
|
|---|
| 81 | esac
|
|---|
| 82 |
|
|---|
| 83 | case "$uselongdouble" in
|
|---|
| 84 | '') uselongdouble='y' ;;
|
|---|
| 85 | esac
|
|---|
| 86 |
|
|---|
| 87 | #usevfork=true
|
|---|
| 88 | usevfork=false
|
|---|
| 89 |
|
|---|
| 90 | # DG has this thing set up with symlinks which point to different places
|
|---|
| 91 | # depending on environment variables (see elink(5)) and the compiler and
|
|---|
| 92 | # related tools use them to access different development environments
|
|---|
| 93 | # (COFF, ELF, m88k BCS and so on), see sde(5). The upshot, however, is
|
|---|
| 94 | # that when a normal program tries to access one of these elinks it sees
|
|---|
| 95 | # no such file (like stat()ting a mis-directed symlink). Setting
|
|---|
| 96 | # $plibpth to explicitly include the place to which the elinks point
|
|---|
| 97 | # allows Configure to find libraries which vary based on the development
|
|---|
| 98 | # environment.
|
|---|
| 99 | #
|
|---|
| 100 | # Starting with version 4.10 (the first time the OS supported Intel
|
|---|
| 101 | # hardware) all libraries are accessed with this mechanism.
|
|---|
| 102 | #
|
|---|
| 103 | # The default $TARGET_BINARY_INTERFACE changed with version 4.10. The
|
|---|
| 104 | # system now comes with a link named /usr/sde/default which points to
|
|---|
| 105 | # the proper entry, but older versions lacked this and used m88kdgux
|
|---|
| 106 | # directly.
|
|---|
| 107 |
|
|---|
| 108 | : && sde_path=${SDE_PATH:-/usr}/sde # hide from Configure
|
|---|
| 109 | while : # dummy loop
|
|---|
| 110 | do
|
|---|
| 111 | if [ -n "$TARGET_BINARY_INTERFACE" ]
|
|---|
| 112 | then set X "$TARGET_BINARY_INTERFACE"
|
|---|
| 113 | else set X default dg m88k_dg ix86_dg m88kdgux m88kdguxelf
|
|---|
| 114 | fi
|
|---|
| 115 | shift
|
|---|
| 116 | default_sde=$1
|
|---|
| 117 | for sde
|
|---|
| 118 | do
|
|---|
| 119 | [ -d "$sde_path/$sde" ] && break 2
|
|---|
| 120 | done
|
|---|
| 121 | cat <<END >&2
|
|---|
| 122 |
|
|---|
| 123 | NOTE: I can't figure out what SDE is used by default on this machine (I
|
|---|
| 124 | didn't find a likely directory under $sde_path). This is bad news. If
|
|---|
| 125 | this is a R4.10 or newer system I'm not going to be able to find any of
|
|---|
| 126 | your libraries, if this system is R3.10 or older I won't be able to find
|
|---|
| 127 | the math library. You should re-run Configure with the environment
|
|---|
| 128 | variable TARGET_BINARY_INTERFACE set to the proper value for this
|
|---|
| 129 | machine, see sde(5) and the notes in hints/dgux.sh.
|
|---|
| 130 |
|
|---|
| 131 | END
|
|---|
| 132 | sde=$default_sde
|
|---|
| 133 | break
|
|---|
| 134 | done
|
|---|
| 135 |
|
|---|
| 136 | plibpth="$plibpth $sde_path/$sde/usr/lib"
|
|---|
| 137 | unset sde_path default_sde sde
|
|---|
| 138 |
|
|---|
| 139 | #####################################
|
|---|
| 140 | # <[email protected]>
|
|---|
| 141 | #####################################
|
|---|
| 142 |
|
|---|
| 143 | libperl="libperl58.so"
|
|---|
| 144 |
|
|---|
| 145 | # Many functions (eg, gethostent(), killpg(), getpriority(), setruid()
|
|---|
| 146 | # dbm_*(), and plenty more) are defined in -ldgc. Usually you don't
|
|---|
| 147 | # need to know this (it seems that libdgc.so is searched automatically
|
|---|
| 148 | # by ld), but Configure needs to check it otherwise it will report all
|
|---|
| 149 | # those functions as missing.
|
|---|
| 150 |
|
|---|
| 151 | #####################################
|
|---|
| 152 | # <[email protected]>
|
|---|
| 153 | #####################################
|
|---|
| 154 |
|
|---|
| 155 | # libswanted="dgc gdbm $libswanted"
|
|---|
| 156 | #libswanted="dbm posix $libswanted"
|
|---|
| 157 | # Do *NOT* add there the malloc native
|
|---|
| 158 | # DG/UX library!
|
|---|
| 159 | libswanted="dbm posix resolv socket nsl dl m"
|
|---|
| 160 |
|
|---|
| 161 | #####################################
|
|---|
| 162 | # <[email protected]>
|
|---|
| 163 | #####################################
|
|---|
| 164 |
|
|---|
| 165 | mydomain='.localhost'
|
|---|
| 166 | cf_by=`(whoami) 2>/dev/null`
|
|---|
| 167 | cf_email="$cf_by@localhost"
|
|---|
| 168 |
|
|---|
| 169 | # Dynamic loading works using the dlopen() functions. Note that dlfcn.h
|
|---|
| 170 | # used to be broken, it declared _dl*() rather than dl*(). This was the
|
|---|
| 171 | # case up to 3.10, it has been fixed in 4.11. I'm not sure if it was
|
|---|
| 172 | # fixed in 4.10. If you have the older header just ignore the warnings
|
|---|
| 173 | # (since pointers and integers have the same format on m88k).
|
|---|
| 174 |
|
|---|
| 175 | # usedl=true
|
|---|
| 176 | usedl=false
|
|---|
| 177 |
|
|---|
| 178 | # For cc rather than gcc the flags would be `-K PIC' for compiling and
|
|---|
| 179 | # -G for loading. I haven't tested this.
|
|---|
| 180 |
|
|---|
| 181 | #####################################
|
|---|
| 182 | # <[email protected]>
|
|---|
| 183 | # Use -fPIC instead -fpic
|
|---|
| 184 | #####################################
|
|---|
| 185 |
|
|---|
| 186 | cccdlflags=-fPIC
|
|---|
| 187 | #We must use gcc
|
|---|
| 188 | ld="gcc"
|
|---|
| 189 | lddlflags="-shared"
|
|---|
| 190 |
|
|---|
| 191 | ############################################################################
|
|---|
| 192 | # DGUX Posix 4A Draft 10 Thread support
|
|---|
| 193 | # <[email protected]>
|
|---|
| 194 | # use Configure -Dusethreads to enable
|
|---|
| 195 | ############################################################################
|
|---|
| 196 |
|
|---|
| 197 | cat > UU/usethreads.cbu <<'EOCBU'
|
|---|
| 198 | case "$usethreads" in
|
|---|
| 199 | $define|true|[yY]*)
|
|---|
| 200 | ccflags="$ccflags"
|
|---|
| 201 | # DG/UX has this for sure! Main Configure fails to
|
|---|
| 202 | # detect it but it is needed!
|
|---|
| 203 | d_pthread_atfork='define'
|
|---|
| 204 | shift
|
|---|
| 205 | # DG/UX's sched_yield is in -lrte
|
|---|
| 206 | # Do *NOT* add there the malloc native
|
|---|
| 207 | # DG/UX library!
|
|---|
| 208 | libswanted="dbm posix resolv socket nsl dl m rte"
|
|---|
| 209 | archname="ix86-dgux-thread"
|
|---|
| 210 | sitearch="$prefix/lib/perl58/$archname"
|
|---|
| 211 | sitelib="$prefix/lib/perl58"
|
|---|
| 212 | case "$cc" in
|
|---|
| 213 | *gcc*)
|
|---|
| 214 | #### Use GCC -2.95.2/3 rev (DG/UX) and -pthread
|
|---|
| 215 | #### Otherwise take out the switch -pthread
|
|---|
| 216 | #### And add manually the -D_POSIX4A_DRAFT10_SOURCE flag.
|
|---|
| 217 | ld="gcc"
|
|---|
| 218 | ccflags="$ccflags -D_POSIX4A_DRAFT10_SOURCE"
|
|---|
| 219 | # Debug build : use -DS flag on command line perl
|
|---|
| 220 | # ccflags="$ccflags -g -mstandard -DDEBUGGING -D_POSIX4A_DRAFT10_SOURCE -pthread"
|
|---|
| 221 | cccdlflags='-fPIC'
|
|---|
| 222 | lddlflags="-shared"
|
|---|
| 223 | #### Use GCC -2.95.2/3 rev (DG/UX) and -pthread
|
|---|
| 224 | #### Otherwise take out the switch -pthread
|
|---|
| 225 | #### And add manually the -lthread library.
|
|---|
| 226 | ldflags="$ldflags -pthread"
|
|---|
| 227 | ;;
|
|---|
| 228 |
|
|---|
| 229 | *)
|
|---|
| 230 | echo "Not supported DG/UX cc and threads !"
|
|---|
| 231 | ;;
|
|---|
| 232 | esac
|
|---|
| 233 | esac
|
|---|
| 234 | EOCBU
|
|---|
| 235 |
|
|---|
| 236 | # "./Configure -d" can't figure this out easily
|
|---|
| 237 | d_suidsafe='define'
|
|---|
| 238 |
|
|---|
| 239 | ###################################################
|
|---|