1 # Created for 5.003 by Mark Klein, mklein@dis.com.
2 # Substantially revised for 5.004_01 by Mark Bixby, markb@cccd.edu.
3 # Revised again for 5.004_69 by Mark Bixby, markb@cccd.edu.
4 # Revised for 5.6.0 by Mark Bixby, mbixby@power.net.
5 # Revised for 5.7.3 by Mark Bixby, mark@bixby.org.
6 # Revised for 5.8.0 by Mark Bixby, mark@bixby.org.
7 # Revised for 5.8.8/5.9.3 by Ken Hirsch, kenhirsch@ftml.net
10 osvers=`uname -r | sed -e 's/.[A-Z]\.\([0-9]\)\([0-9]\)\.[0-9][0-9]/\1.\2/'`
13 # Don't use nm. Instead, we'll use the MPEAUTOCONF environment variable
14 # to force error for unresolved externals.
15 # This is slower than nm (about 70 minutes instead of 35 minutes),
16 # but much more reliable.
19 export AUTOCONF=1 MPEAUTOCONF=1
21 # Work around the broken inline cat bug that corrupts here docs
25 # Various directory locations.
27 # Which ones of these does Configure get wrong?
28 test -z "$prefix" && prefix="/$HPACCOUNT/$HPGROUP"
31 installman1dir="$prefix/man/man1"
32 installman3dir="$prefix/man/man3"
33 man1dir="$prefix/man/man1"
34 man3dir="$prefix/man/man3"
35 perlpath="$prefix/PERL"
37 startperl="#!$prefix/perl"
43 test -z "$cc" && cc='gcc'
45 ccdlflags='-Xlinker -WL,xl=/usr/lib/libcurses.sl,/lib/libsvipc.sl,/usr/lib/libsocket.sl,/usr/lib/libstr.sl,/lib/libm.sl,/lib/libc.sl'
46 ccflags="$ccflags -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -D_POSIX_JOB_CONTROL"
47 locincpth="$locincpth /usr/local/include /usr/contrib/include /BIND/CURRENT/include /SYSLOG/PUB"
48 test -z "$optimize" && optimize="-O2"
50 # Special compiling options for certain source files.
51 # But what if you want -g?
52 regcomp_cflags='optimize=-O'
53 toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
58 # Build a fixed sigsetjmp that can be used in dynamic libraries
59 # This needs to be compiled with -O2, so I do it here, rather
61 gcc -c -O2 mpeix/mpeix_setjmp.c
62 lddlflags="-b $PWD/mpeix_setjmp.o"
64 # Delete bsd and BSD from the library list. Remove other randomly ordered
65 # libraries and then re-add them in their proper order (the MPE linker is
66 # order-sensitive). Add additional MPE-specific libraries.
67 for mpe_remove in bind bsd BSD c curses m socket str svipc syslog; do
68 set `echo " $libswanted " | sed -e 's/ / /g' -e "s/ $mpe_remove //"`
71 libswanted="$libswanted bind syslog curses svipc socket str m c"
72 loclibpth="$loclibpth /usr/local/lib /usr/contrib/lib /BIND/CURRENT/lib /SYSLOG/PUB"
74 # External functions and data items.
76 # Q: Does Configure *really* get *all* of these wrong?
78 # A: Yes. There are two MPE problems here. The 'undef' functions exist on MPE,
79 # but are merely dummy routines that return ENOTIMPL or ESYSERR. Since they're
80 # useless, let's just tell Perl to avoid them. Also, a few data items are
81 # 'undef' because while they may exist in structures, they are uninitialized.
83 d_Gconvert='gcvt((x),(n),(b))'
87 # these fields exist, but are uninitialized
94 # These functions exist,
95 # but either return ENOSYS/ESYSERR/ENOSYS or work so differently
96 # that it is not helpful to include them
107 # These are defined in mpeix/mpeix.c
113 #??i_gdbm='undef' # the port is currently incomplete
115 i_termios='undef' # we have termios, but not the full set (just tcget/setattr)
120 timeincl='/usr/include/time.h'
128 uselargefiles="$undef"
130 # Expected functionality provided in mpeix.c.
133 # Help gmake find mpeix.c
134 test -h mpeix.c || ln -s mpeix/mpeix.c mpeix.c
136 archobjs='mpeix.o mpeix_setjmp.o'