1 # The MPE/iX linker doesn't complain about unresolved symbols, and so the only
2 # way to test for unresolved symbols in a program is by attempting to run it.
3 # But this is slow, and fraught with problems, so the better solution is to use
6 # MPE/iX lacks a fully functional native nm, so we need to use our fake nm
7 # script which will extract the symbol info from the native link editor and
8 # reformat into something nm-like.
10 # Created for 5.003 by Mark Klein, mklein@dis.com.
11 # Substantially revised for 5.004_01 by Mark Bixby, markb@cccd.edu.
12 # Revised again for 5.004_69 by Mark Bixby, markb@cccd.edu.
13 # Revised for 5.6.0 by Mark Bixby, mbixby@power.net.
14 # Revised for 5.7.3 by Mark Bixby, mark@bixby.org.
15 # Revised for 5.8.0 by Mark Bixby, mark@bixby.org.
18 osvers=`uname -r | sed -e 's/.[A-Z]\.\([0-9]\)\([0-9]\)\.[0-9][0-9]/\1.\2/'`
20 # Force Configure to use our wrapper mpeix/nm script
22 PATH="$PWD/mpeix:$PATH"
28 # Work around the broken inline cat bug that corrupts here docs
32 # Various directory locations.
34 # Which ones of these does Configure get wrong?
35 test -z "$prefix" && prefix="/$HPACCOUNT/$HPGROUP"
38 installman1dir="$prefix/man/man1"
39 installman3dir="$prefix/man/man3"
40 man1dir="$prefix/man/man1"
41 man3dir="$prefix/man/man3"
42 perlpath="$prefix/PERL"
44 startperl="#!$prefix/perl"
49 test -z "$cc" && cc='gcc'
51 ccflags="$ccflags -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -D_POSIX_JOB_CONTROL -DIS_SOCKET_CLIB_ITSELF"
52 locincpth="$locincpth /usr/local/include /usr/contrib/include /BINDFW/CURRENT/include /SYSLOG/PUB"
53 test -z "$optimize" && optimize="-O2"
55 # Special compiling options for certain source files.
56 # But what if you want -g?
57 regcomp_cflags='optimize=-O'
58 toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
63 # Delete bsd and BSD from the library list. Remove other randomly ordered
64 # libraries and then re-add them in their proper order (the MPE linker is
65 # order-sensitive). Add additional MPE-specific libraries.
66 for mpe_remove in bind bsd BSD c curses m socket str svipc syslog; do
67 set `echo " $libswanted " | sed -e 's/ / /g' -e "s/ $mpe_remove //"`
70 libswanted="$libswanted bind syslog curses svipc socket str m c"
71 loclibpth="$loclibpth /usr/local/lib /usr/contrib/lib /BINDFW/CURRENT/lib /SYSLOG/PUB"
73 # External functions and data items.
75 # Q: Does Configure *really* get *all* of these wrong?
77 # A: Yes. There are two MPE problems here. The 'undef' functions exist on MPE,
78 # but are merely dummy routines that return ENOTIMPL or ESYSERR. Since they're
79 # useless, let's just tell Perl to avoid them. Also, a few data items are
80 # 'undef' because while they may exist in structures, they are uninitialized.
82 # The 'define' cases are a bit weirder. MPE has a libc.a, libc.sl, and two
83 # special kernel shared libraries, /SYS/PUB/XL and /SYS/PUB/NL. Much of what
84 # is in libc.a is duplicated within XL and NL, so when we created libc.sl, we
85 # omitted the duplicated functions. Since Configure end ups scanning libc.sl,
86 # we need to 'define' the functions that had been removed.
88 # We don't want to scan XL or NL because we would find way too many POSIX or
89 # Unix named functions that are really vanilla MPE functions that do something
90 # completely different than on POSIX or Unix.
96 d_Gconvert='gcvt((x),(n),(b))'
100 d_getpbynumber='define'
101 d_getsbyname='define'
102 d_getsbyport='define'
127 d_strerrm='strerror(e)'
140 i_gdbm='undef' # the port is currently incomplete
141 i_termios='undef' # we have termios, but not the full set (just tcget/setattr)
145 timeincl='/usr/include/time.h'
153 uselargefiles="$undef"
155 # Expected functionality provided in mpeix.c.
159 # Help gmake find mpeix.c
160 test -h mpeix.c || ln -s mpeix/mpeix.c mpeix.c