| 1 | #! /bin/sh
|
|---|
| 2 | # hints/os2.sh
|
|---|
| 3 | # This file reflects the tireless work of
|
|---|
| 4 | # Ilya Zakharevich <[email protected]>
|
|---|
| 5 | #
|
|---|
| 6 | # Trimmed and comments added by
|
|---|
| 7 | # Andy Dougherty <[email protected]>
|
|---|
| 8 | # Exactly what is required beyond a standard OS/2 installation?
|
|---|
| 9 | # (see in README.os2)
|
|---|
| 10 |
|
|---|
| 11 | # Note that symbol extraction code gives wrong answers (sometimes?) on
|
|---|
| 12 | # gethostent and setsid.
|
|---|
| 13 | set -x
|
|---|
| 14 |
|
|---|
| 15 | # Optimization (GNU make 3.74 cannot be loaded :-():
|
|---|
| 16 | emxload -m 30 sh.exe ls.exe tr.exe id.exe sed.exe # make.exe
|
|---|
| 17 | emxload -m 30 grep.exe egrep.exe fgrep.exe cat.exe rm.exe mv.exe cp.exe
|
|---|
| 18 | emxload -m 30 uniq.exe basename.exe sort.exe awk.exe echo.exe
|
|---|
| 19 |
|
|---|
| 20 | path_sep=\;
|
|---|
| 21 |
|
|---|
| 22 | if test -f $sh.exe; then sh=$sh.exe; fi
|
|---|
| 23 |
|
|---|
| 24 | startsh="#!$sh"
|
|---|
| 25 | cc='gcc'
|
|---|
| 26 |
|
|---|
| 27 | # Make denser object files and DLL
|
|---|
| 28 | case "X$optimize" in
|
|---|
| 29 | X)
|
|---|
| 30 | optimize="-O2 -fomit-frame-pointer -falign-loops=2 -falign-jumps=2 -falign-functions=2 -s"
|
|---|
| 31 | ld_dll_optimize="-s"
|
|---|
| 32 | ;;
|
|---|
| 33 | esac
|
|---|
| 34 |
|
|---|
| 35 | # Get some standard things (indented to avoid putting in config.sh):
|
|---|
| 36 | oifs="$IFS"
|
|---|
| 37 | IFS=" ;"
|
|---|
| 38 | set $MANPATH
|
|---|
| 39 | tryman="$@"
|
|---|
| 40 | set `gcc -print-search-dirs | grep libraries | sed -e "s/^libraries: *=//" `
|
|---|
| 41 | libemx="$@"
|
|---|
| 42 | set $C_INCLUDE_PATH
|
|---|
| 43 | usrinc="$@"
|
|---|
| 44 | IFS="$oifs"
|
|---|
| 45 | tryman="`./UU/loc . /man $tryman`"
|
|---|
| 46 | tryman="`echo $tryman | tr '\\\' '/'`"
|
|---|
| 47 |
|
|---|
| 48 | # indented to avoid having it *two* times at start
|
|---|
| 49 | libemx="`./UU/loc libc_alias.a $libemx`"
|
|---|
| 50 |
|
|---|
| 51 | usrinc="`./UU/loc stdlib.h $usrinc`"
|
|---|
| 52 | usrinc="`dirname $usrinc | tr '\\\' '/'`"
|
|---|
| 53 | libemx="`dirname $libemx | tr '\\\' '/'`"
|
|---|
| 54 |
|
|---|
| 55 | if test -d $tryman/man1; then
|
|---|
| 56 | sysman="$tryman/man1"
|
|---|
| 57 | else
|
|---|
| 58 | sysman="`./UU/loc . /man/man1 $UNIXROOT/usr/share/man/man1 $UNIXROOT/usr/man/man1 c:/man/man1 c:/usr/man/man1 d:/man/man1 d:/usr/man/man1 e:/man/man1 e:/usr/man/man1 f:/man/man1 f:/usr/man/man1 g:/man/man1 g:/usr/man/man1 /usr/man/man1`"
|
|---|
| 59 | fi
|
|---|
| 60 |
|
|---|
| 61 | #emxpath="`dirname $libemx`"
|
|---|
| 62 | #if test ! -d "$emxpath"; then
|
|---|
| 63 | # emxpath="`./UU/loc . /emx c:/emx d:/emx e:/emx f:/emx g:/emx h:/emx /emx`"
|
|---|
| 64 | #fi
|
|---|
| 65 | emxpath="`which gcc.exe`"
|
|---|
| 66 | emxpath="`dirname $emxpath`"
|
|---|
| 67 | emxpath="`dirname $emxpath`"
|
|---|
| 68 | if test ! -d "$emxpath"; then
|
|---|
| 69 | emxpath="$UNIXROOT/usr"
|
|---|
| 70 | fi
|
|---|
| 71 |
|
|---|
| 72 | if test ! -d "$libemx"; then
|
|---|
| 73 | libemx="$emxpath/lib"
|
|---|
| 74 | fi
|
|---|
| 75 | if test ! -d "$libemx"; then
|
|---|
| 76 | if test -d "$LIBRARY_PATH"; then
|
|---|
| 77 | libemx="$LIBRARY_PATH"
|
|---|
| 78 | else
|
|---|
| 79 | libemx="`./UU/loc . X $UNIXROOT/usr/lib $UNIXROOT/lib $UNIXROOT/usr/local/lib`"
|
|---|
| 80 | fi
|
|---|
| 81 | fi
|
|---|
| 82 |
|
|---|
| 83 | if test ! -d "$usrinc"; then
|
|---|
| 84 | if test -d "$emxpath/include"; then
|
|---|
| 85 | usrinc="$emxpath/include"
|
|---|
| 86 | else
|
|---|
| 87 | if test -d "$C_INCLUDE_PATH"; then
|
|---|
| 88 | usrinc="$C_INCLUDE_PATH"
|
|---|
| 89 | else
|
|---|
| 90 | usrinc="`./UU/loc . X $UNIXROOT/usr/include $UNIXROOT/usr/local/include`"
|
|---|
| 91 | fi
|
|---|
| 92 | fi
|
|---|
| 93 | fi
|
|---|
| 94 |
|
|---|
| 95 | #rsx="`./UU/loc rsx.exe undef $pth`"
|
|---|
| 96 |
|
|---|
| 97 | if test "$libemx" = "X"; then echo "Cannot find C library!" >&2; fi
|
|---|
| 98 |
|
|---|
| 99 | # Acute backslashitis:
|
|---|
| 100 | libpth="`echo \"$LIBRARY_PATH\" | tr ';\\\' ' /'`"
|
|---|
| 101 | libpth="$libpth $libemx"
|
|---|
| 102 |
|
|---|
| 103 | #set `cmd /c emxrev -f emxlibcm`
|
|---|
| 104 | #emxcrtrev=$5
|
|---|
| 105 | # indented to not put it into config.sh
|
|---|
| 106 | #_defemxcrtrev=-D_EMX_CRT_REV_=$emxcrtrev
|
|---|
| 107 | _defemxcrtrev=-D_EMX_CRT_REV_=61
|
|---|
| 108 |
|
|---|
| 109 | so='dll'
|
|---|
| 110 |
|
|---|
| 111 | # Additional definitions:
|
|---|
| 112 |
|
|---|
| 113 | firstmakefile='GNUmakefile'
|
|---|
| 114 | exe_ext='.exe'
|
|---|
| 115 |
|
|---|
| 116 | # We provide it
|
|---|
| 117 | i_dlfcn='define'
|
|---|
| 118 |
|
|---|
| 119 | # The default one uses exponential notation between 0.0001 and 0.1
|
|---|
| 120 | d_Gconvert='gcvt_os2((x),(n),(b))'
|
|---|
| 121 |
|
|---|
| 122 | cat > UU/uselongdouble.cbu <<'EOCBU'
|
|---|
| 123 | # This script UU/uselongdouble.cbu will get 'called-back' by Configure
|
|---|
| 124 | # after it has prompted the user for whether to use long doubles.
|
|---|
| 125 | # If we will use them, let Configure choose us a Gconvert.
|
|---|
| 126 | case "$uselongdouble:$d_longdbl:$d_sqrtl:$d_modfl" in
|
|---|
| 127 | "$define:$define:$define:$define") d_Gconvert='' ;;
|
|---|
| 128 | esac
|
|---|
| 129 | EOCBU
|
|---|
| 130 |
|
|---|
| 131 | # -Zomf build has a problem with _exit() *flushing*, so the test
|
|---|
| 132 | # gets confused:
|
|---|
| 133 | fflushNULL="define"
|
|---|
| 134 |
|
|---|
| 135 | aout_d_shrplib='undef'
|
|---|
| 136 | aout_useshrplib='false'
|
|---|
| 137 | aout_obj_ext='.o'
|
|---|
| 138 | aout_lib_ext='.a'
|
|---|
| 139 | aout_ar='ar'
|
|---|
| 140 | aout_plibext='.a'
|
|---|
| 141 | aout_lddlflags="-Zdll $ld_dll_optimize"
|
|---|
| 142 |
|
|---|
| 143 | # Cannot have 32000K stack: get SYS0170 ?!
|
|---|
| 144 | aout_ldflags='-Zexe -Zstack 16000 '
|
|---|
| 145 |
|
|---|
| 146 | # To get into config.sh:
|
|---|
| 147 | aout_ldflags="$aout_ldflags"
|
|---|
| 148 |
|
|---|
| 149 | aout_d_fork='define'
|
|---|
| 150 | aout_ccflags="-DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev "
|
|---|
| 151 | aout_cppflags="-DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev "
|
|---|
| 152 | aout_use_clib='libc_dll'
|
|---|
| 153 | aout_usedl='undef'
|
|---|
| 154 | aout_archobjs="os2.o dl_os2.o"
|
|---|
| 155 | # Not listed in dynamic_ext, but needed for AOUT static_ext nevertheless
|
|---|
| 156 | aout_extra_static_ext="OS2::DLL"
|
|---|
| 157 |
|
|---|
| 158 | # variable which have different values for aout compile
|
|---|
| 159 | used_aout='d_shrplib useshrplib plibext lib_ext obj_ext ar plibext d_fork lddlflags ldflags ccflags use_clib usedl archobjs cppflags'
|
|---|
| 160 |
|
|---|
| 161 | if [ "$emxaout" != "" ]; then
|
|---|
| 162 | d_shrplib="$aout_d_shrplib"
|
|---|
| 163 | useshrplib="$aout_useshrplib"
|
|---|
| 164 | obj_ext="$aout_obj_ext"
|
|---|
| 165 | lib_ext="$aout_lib_ext"
|
|---|
| 166 | ar="$aout_ar"
|
|---|
| 167 | plibext="$aout_plibext"
|
|---|
| 168 | d_fork='define'
|
|---|
| 169 | lddlflags="$aout_lddlflags"
|
|---|
| 170 | ldflags="$aout_ldflags"
|
|---|
| 171 | ccflags="$aout_ccflags"
|
|---|
| 172 | cppflags="$aout_cppflags"
|
|---|
| 173 | use_clib="$aout_use_clib"
|
|---|
| 174 | usedl="$aout_usedl"
|
|---|
| 175 | else
|
|---|
| 176 | d_shrplib='define'
|
|---|
| 177 | useshrplib='true'
|
|---|
| 178 | obj_ext='.o'
|
|---|
| 179 | lib_ext='.lib'
|
|---|
| 180 | ar='emxomfar'
|
|---|
| 181 | plibext='.lib'
|
|---|
| 182 | d_fork='define'
|
|---|
| 183 | lddlflags="-Zdll -Zomf "
|
|---|
| 184 | # Recursive regmatch may eat 2.5M of stack alone.
|
|---|
| 185 | ldflags='-Zexe -Zomf -Zstack 32000 '
|
|---|
| 186 | ccflags="-Zomf -DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev"
|
|---|
| 187 | use_clib='libc_dll'
|
|---|
| 188 | usedl='define'
|
|---|
| 189 | fi
|
|---|
| 190 |
|
|---|
| 191 | # indented to miss config.sh
|
|---|
| 192 | _ar="$ar"
|
|---|
| 193 |
|
|---|
| 194 | # To get into config.sh (should start at the beginning of line)
|
|---|
| 195 | # or you can put it into config.over.
|
|---|
| 196 | plibext="$plibext"
|
|---|
| 197 | # plibext is not needed anymore. Just directly set $libperl.
|
|---|
| 198 | libperl="libperl${plibext}"
|
|---|
| 199 |
|
|---|
| 200 |
|
|---|
| 201 | libc="$libemx/$use_clib$lib_ext"
|
|---|
| 202 |
|
|---|
| 203 | if test -r "$libemx/libc_alias$lib_ext"; then
|
|---|
| 204 | libnames="$libemx/libc_alias$lib_ext"
|
|---|
| 205 | fi
|
|---|
| 206 | # otherwise puts -lc ???
|
|---|
| 207 |
|
|---|
| 208 | # [Maybe we should just remove c from $libswanted ?]
|
|---|
| 209 |
|
|---|
| 210 | # Test would pick up wrong rand, so we hardwire the value for random()
|
|---|
| 211 | libs='-lsocket'
|
|---|
| 212 | randbits=31
|
|---|
| 213 | archobjs="os2$obj_ext dl_os2$obj_ext"
|
|---|
| 214 |
|
|---|
| 215 | # Run files without extension with sh:
|
|---|
| 216 | EXECSHELL=sh
|
|---|
| 217 |
|
|---|
| 218 | cccdlflags='-Zdll'
|
|---|
| 219 | dlsrc='dl_dlopen.xs'
|
|---|
| 220 | ld='gcc'
|
|---|
| 221 |
|
|---|
| 222 | #cppflags='-DDOSISH -DOS2=2 -DEMBED -I.'
|
|---|
| 223 |
|
|---|
| 224 | # for speedup: (some patches to ungetc are also needed):
|
|---|
| 225 | # Note that without this guy tests 8 and 10 of io/tell.t fail, with it 11 fails
|
|---|
| 226 |
|
|---|
| 227 | stdstdunder=`echo "#include <stdio.h>" | cpp | egrep -c "char +\* +_ptr"`
|
|---|
| 228 | d_stdstdio='define'
|
|---|
| 229 | d_stdiobase='define'
|
|---|
| 230 | d_stdio_ptr_lval='define'
|
|---|
| 231 | d_stdio_cnt_lval='define'
|
|---|
| 232 |
|
|---|
| 233 | if test "$stdstdunder" = 0; then
|
|---|
| 234 | stdio_ptr='((fp)->ptr)'
|
|---|
| 235 | stdio_cnt='((fp)->rcount)'
|
|---|
| 236 | stdio_base='((fp)->buffer)'
|
|---|
| 237 | stdio_bufsiz='((fp)->rcount + (fp)->ptr - (fp)->buffer)'
|
|---|
| 238 | ccflags="$ccflags -DMYTTYNAME"
|
|---|
| 239 | myttyname='define'
|
|---|
| 240 | else
|
|---|
| 241 | stdio_ptr='((fp)->_ptr)'
|
|---|
| 242 | stdio_cnt='((fp)->_rcount)'
|
|---|
| 243 | stdio_base='((fp)->_buffer)'
|
|---|
| 244 | stdio_bufsiz='((fp)->_rcount + (fp)->_ptr - (fp)->_buffer)'
|
|---|
| 245 | fi
|
|---|
| 246 |
|
|---|
| 247 | # to put into config.sh
|
|---|
| 248 | myttyname="$myttyname"
|
|---|
| 249 |
|
|---|
| 250 | # To have manpages installed
|
|---|
| 251 | nroff='nroff.cmd'
|
|---|
| 252 | # above will be overwritten otherwise, indented to avoid config.sh
|
|---|
| 253 | _nroff='nroff.cmd'
|
|---|
| 254 |
|
|---|
| 255 | # should be handled automatically by Configure now.
|
|---|
| 256 | ln='cp'
|
|---|
| 257 | # Will be rewritten otherwise, indented to not put in config.sh
|
|---|
| 258 | _ln='cp'
|
|---|
| 259 | lns='cp'
|
|---|
| 260 |
|
|---|
| 261 | nm_opt='-p'
|
|---|
| 262 |
|
|---|
| 263 | ####### We define these functions ourselves
|
|---|
| 264 |
|
|---|
| 265 | d_strtoll='define'
|
|---|
| 266 | d_strtoull='define'
|
|---|
| 267 | d_getprior='define'
|
|---|
| 268 | d_setprior='define'
|
|---|
| 269 | d_usleep='define'
|
|---|
| 270 | d_usleepproto='define'
|
|---|
| 271 |
|
|---|
| 272 | d_link='undef'
|
|---|
| 273 | dont_use_nlink='define'
|
|---|
| 274 | # no posix (aka hard) links for us!
|
|---|
| 275 |
|
|---|
| 276 | # The next two are commented. pdksh handles #!, extproc gives no path part.
|
|---|
| 277 | # sharpbang='extproc '
|
|---|
| 278 | # shsharp='false'
|
|---|
| 279 |
|
|---|
| 280 | # Commented:
|
|---|
| 281 | #startsh='extproc ksh\\n#! sh'
|
|---|
| 282 |
|
|---|
| 283 | # Find patch:
|
|---|
| 284 | gnupatch='patch'
|
|---|
| 285 | if (gnupatch -v || gnupatch --version) 2>&1 >/dev/null; then
|
|---|
| 286 | gnupatch=gnupatch
|
|---|
| 287 | else
|
|---|
| 288 | if (gpatch -v || gpatch --version) 2>&1 >/dev/null; then
|
|---|
| 289 | gnupatch=gpatch
|
|---|
| 290 | else
|
|---|
| 291 | # They may have a special PATH during configuring
|
|---|
| 292 | if (patch -v || patch --version) 2>&1 >/dev/null; then
|
|---|
| 293 | gnupatch="`./UU/loc patch.exe undef $pth`"
|
|---|
| 294 | fi
|
|---|
| 295 | fi
|
|---|
| 296 | fi
|
|---|
| 297 |
|
|---|
| 298 | for f in less.exe less.sh less.ksh less.cmd more.exe more.sh more.ksh more.cmd ; do
|
|---|
| 299 | if test -z "$pager"; then
|
|---|
| 300 | pager="`./UU/loc $f '' $pth`"
|
|---|
| 301 | fi
|
|---|
| 302 | done
|
|---|
| 303 | if test -z "$pager"; then
|
|---|
| 304 | pager='cmd /c more'
|
|---|
| 305 | fi
|
|---|
| 306 |
|
|---|
| 307 | # Apply patches if needed
|
|---|
| 308 | case "$0$running_c_cmd" in
|
|---|
| 309 | *[/\\]Configure|*[/\\]Configure.|Configure|Configure.) # Skip Configure.cmd
|
|---|
| 310 | if test "Xyes" = "X$configure_cmd_loop"; then
|
|---|
| 311 | cat <<EOC >&2
|
|---|
| 312 | !!!
|
|---|
| 313 | !!! PANIC: Loop of self-invocations detected, aborting!
|
|---|
| 314 | !!!
|
|---|
| 315 | EOC
|
|---|
| 316 | exit 20
|
|---|
| 317 | fi
|
|---|
| 318 | configure_cmd_loop=yes
|
|---|
| 319 | export configure_cmd_loop
|
|---|
| 320 |
|
|---|
| 321 | configure_needs_patch=''
|
|---|
| 322 | if test -s ./os2/diff.configure; then
|
|---|
| 323 | if ! grep "^#OS2-PATCH-APPLIED" ./Configure > /dev/null; then
|
|---|
| 324 | configure_needs_patch=yes
|
|---|
| 325 | fi
|
|---|
| 326 | fi
|
|---|
| 327 | if test -n "$configure_needs_patch"; then
|
|---|
| 328 | # Not patched!
|
|---|
| 329 | # Restore the initial command line arguments
|
|---|
| 330 | if test -f ./Configure.cmd ; then
|
|---|
| 331 | cat <<EOC >&2
|
|---|
| 332 | !!!
|
|---|
| 333 | !!! I see that what is running is ./Configure.
|
|---|
| 334 | !!! ./Configure is not patched, but ./Configure.cmd exists.
|
|---|
| 335 | !!!
|
|---|
| 336 | !!! You are supposed to run Configure.cmd, not Configure
|
|---|
| 337 | !!! after an automagic patching.
|
|---|
| 338 | !!!
|
|---|
| 339 | !!! If you insist on running Configure, you may
|
|---|
| 340 | !!! patch it manually from ./os2/diff.configure.
|
|---|
| 341 | !!!
|
|---|
| 342 | !!! However, I went through incredible hoolahoops, and I expect I can
|
|---|
| 343 | !!! auto-restart Configure.cmd myself. I will start it with arguments:
|
|---|
| 344 | !!!
|
|---|
| 345 | !!! Configure.cmd $args_exp
|
|---|
| 346 | !!!
|
|---|
| 347 | EOC
|
|---|
| 348 | rp='Do you want to auto-restart Configure.cmd?'
|
|---|
| 349 | dflt='y'
|
|---|
| 350 | . UU/myread
|
|---|
| 351 | case "$ans" in
|
|---|
| 352 | [yY]) echo >&4 "Okay, continuing." ;;
|
|---|
| 353 | *) echo >&4 "Okay, bye."
|
|---|
| 354 | exit 2
|
|---|
| 355 | ;;
|
|---|
| 356 | esac
|
|---|
| 357 | eval "set X $args_exp";
|
|---|
| 358 | shift;
|
|---|
| 359 | # Restore the output
|
|---|
| 360 | exec Configure.cmd "$@" 1>&2
|
|---|
| 361 | exit 2
|
|---|
| 362 | fi
|
|---|
| 363 | cat <<EOC >&2
|
|---|
| 364 | !!!
|
|---|
| 365 | !!! You did not patch ./Configure!
|
|---|
| 366 | !!! I can create Configure.cmd and patch it from ./os2/diff.configure with the command
|
|---|
| 367 | !!!
|
|---|
| 368 | !!! $gnupatch -b -p1 --output=Configure.cmd <./os2/diff.configure 2>&1 | tee 00_auto_patch
|
|---|
| 369 | EOC
|
|---|
| 370 | rp='Do you want to auto-patch Configure to Configure.cmd?'
|
|---|
| 371 | dflt='y'
|
|---|
| 372 | . UU/myread
|
|---|
| 373 | case "$ans" in
|
|---|
| 374 | [yY]) echo >&4 "Okay, continuing." ;;
|
|---|
| 375 | *) echo >&4 "Okay, bye."
|
|---|
| 376 | exit 2
|
|---|
| 377 | ;;
|
|---|
| 378 | esac
|
|---|
| 379 | ($gnupatch -b -p1 --output=Configure.cmd <./os2/diff.configure 2>&1 | tee 00_auto_patch) >&2
|
|---|
| 380 | cat <<EOC >&2
|
|---|
| 381 | !!!
|
|---|
| 382 | !!! The report of patching is copied to 00_auto_patch.
|
|---|
| 383 | !!! Now we need to restart Configure.cmd with all the options.
|
|---|
| 384 | !!!
|
|---|
| 385 | EOC
|
|---|
| 386 | echo "extproc sh" > Configure.ctm
|
|---|
| 387 | ( cat Configure.cmd >> Configure.ctm && mv -f Configure.ctm Configure.cmd ) || (echo "!!! Failure to add extproc-line to Configure.cmd." >&2 ; exit 21)
|
|---|
| 388 | cat <<EOC >&2
|
|---|
| 389 | !!! I went through incredible hoolahoops, and I expect I can
|
|---|
| 390 | !!! auto-restart Configure.cmd myself. I will start it with arguments:
|
|---|
| 391 | !!!
|
|---|
| 392 | !!! Configure.cmd $args_exp
|
|---|
| 393 | !!!
|
|---|
| 394 | EOC
|
|---|
| 395 | rp='Do you want to auto-restart Configure.cmd?'
|
|---|
| 396 | dflt='y'
|
|---|
| 397 | . UU/myread
|
|---|
| 398 | case "$ans" in
|
|---|
| 399 | [yY]) echo >&4 "Okay, continuing." ;;
|
|---|
| 400 | *) echo >&4 "Okay, bye."
|
|---|
| 401 | exit 2
|
|---|
| 402 | ;;
|
|---|
| 403 | esac
|
|---|
| 404 | eval "set X $args_exp";
|
|---|
| 405 | shift;
|
|---|
| 406 | exec Configure.cmd "$@" 1>&2
|
|---|
| 407 | exit 2
|
|---|
| 408 | else
|
|---|
| 409 | if test -s ./os2/diff.configure; then
|
|---|
| 410 | echo "!!! Apparently we are running a patched Configure." >&2
|
|---|
| 411 | else
|
|---|
| 412 | echo "!!! Apparently there is no need to patch Configure." >&2
|
|---|
| 413 | fi
|
|---|
| 414 | fi
|
|---|
| 415 | ;;
|
|---|
| 416 | *) echo "!!! Apparently we are running a renamed Configure: '$0'." >&2
|
|---|
| 417 | esac
|
|---|
| 418 |
|
|---|
| 419 | # This script UU/usethreads.cbu will get 'called-back' by Configure
|
|---|
| 420 | # after it has prompted the user for whether to use threads.
|
|---|
| 421 | cat > UU/usethreads.cbu <<'EOCBU'
|
|---|
| 422 | case "$usethreads" in
|
|---|
| 423 | $define|true|[yY]*)
|
|---|
| 424 | ccflags="$ccflags"
|
|---|
| 425 | cppflags="$cppflags" # Do we really need to set this?
|
|---|
| 426 | aout_ccflags="-DUSE_THREADS $aout_ccflags"
|
|---|
| 427 | aout_cppflags="-DUSE_THREADS $aout_cppflags"
|
|---|
| 428 | aout_lddlflags="$aout_lddlflags"
|
|---|
| 429 | aout_ldflags="$aout_ldflags"
|
|---|
| 430 | ;;
|
|---|
| 431 | esac
|
|---|
| 432 | EOCBU
|
|---|
| 433 |
|
|---|
| 434 | if test -z "$cryptlib"; then
|
|---|
| 435 | cryptlib=`UU/loc crypt$lib_ext "" $libpth`
|
|---|
| 436 | if $test -n "$cryptlib"; then
|
|---|
| 437 | cryptlib=-lcrypt
|
|---|
| 438 | else
|
|---|
| 439 | cryptlib=`UU/loc ufc$lib_ext "" $libpth`
|
|---|
| 440 | if $test -n "$cryptlib"; then
|
|---|
| 441 | cryptlib=-lufc
|
|---|
| 442 | fi
|
|---|
| 443 | fi
|
|---|
| 444 | fi
|
|---|
| 445 | if test -n "$cryptlib"; then
|
|---|
| 446 | libs="$libs $cryptlib"
|
|---|
| 447 | # d_crypt=define
|
|---|
| 448 | fi
|
|---|
| 449 |
|
|---|
| 450 | # Now install the external modules. We are in the ./hints directory.
|
|---|
| 451 |
|
|---|
| 452 | cd ./os2/OS2
|
|---|
| 453 |
|
|---|
| 454 | if ! test -d ../../ext/OS2 ; then
|
|---|
| 455 | mkdir ../../ext/OS2
|
|---|
| 456 | fi
|
|---|
| 457 |
|
|---|
| 458 | cp -rfu * ../../ext/OS2/
|
|---|
| 459 |
|
|---|
| 460 | # Install tests:
|
|---|
| 461 |
|
|---|
| 462 | cp -uf ../*.t ../../t/lib
|
|---|
| 463 | for xxx in * ; do
|
|---|
| 464 | if $test -d $xxx/t; then
|
|---|
| 465 | cp -uf $xxx/t/*.t ../../t/lib
|
|---|
| 466 | else
|
|---|
| 467 | if $test -d $xxx; then
|
|---|
| 468 | cd $xxx
|
|---|
| 469 | for yyy in * ; do
|
|---|
| 470 | if $test -d $yyy/t; then
|
|---|
| 471 | cp -uf $yyy/t/*.t ../../t/lib
|
|---|
| 472 | fi
|
|---|
| 473 | done
|
|---|
| 474 | cd ..
|
|---|
| 475 | fi
|
|---|
| 476 | fi
|
|---|
| 477 | done
|
|---|
| 478 |
|
|---|
| 479 | case "$ldlibpthname" in
|
|---|
| 480 | '') ldlibpthname=none ;;
|
|---|
| 481 | esac
|
|---|
| 482 |
|
|---|
| 483 | # Now go back
|
|---|
| 484 | cd ../..
|
|---|
| 485 | cp os2/*.t t/lib
|
|---|