85655638be5423eec30c2d2b8e8c3369345b948f
[platform/upstream/bash.git] / support / xenix-link.sh
1 :
2 # link bash for Xenix under SCO Unix
3 #
4 # For xenix 2.2:
5 #       CC="cc -xenix -lx" ./configure
6 #       edit config.h:
7 #               comment out the define for HAVE_DIRENT_H
8 #               enable the define for HAVE_SYS_NDIR_H to 1
9 #       make
10 #       CC="cc -xenix -lx" ./link.sh
11 #
12 # For xenix 2.3:
13 #       CC="cc -x2.3" ./configure
14 #       make
15 #       CC="cc -x2.3" ./link.sh
16
17 set -x
18
19 rm -f bash
20
21 if [ -z "$CC" ]
22 then
23         if [ -f /unix -a ! -f /xenix ]
24         then
25                 CC="cc -xenix"
26         else
27                 CC=gcc
28         fi
29 fi
30
31 try_dir=no
32 try_23=no
33 try_x=yes
34
35 case "$CC" in
36 *-ldir*) try_dir=yes ;;
37 esac
38
39 case "$CC" in
40 *-lx*) try_23=no ; try_x=yes ;;
41 esac
42
43 case "$CC" in
44 *-x2.3*|*-l2.3*) try_23=yes ; try_dir=yes ;;
45 esac
46
47 libs=
48 try="socket"
49 if [ $try_dir = yes ] ; then try="$try dir" ; fi
50 if [ $try_23 = yes ] ; then try="$try 2.3" ; fi
51 if [ $try_x = yes ] ; then try="$try x" ; fi
52 for name in $try
53 do
54         if [ -r "/lib/386/Slib${name}.a" ] ; then libs="$libs -l$name" ; fi
55 done
56
57 $CC -o bash shell.o eval.o y.tab.o \
58 general.o make_cmd.o print_cmd.o dispose_cmd.o execute_cmd.o variables.o \
59 copy_cmd.o error.o expr.o flags.o nojobs.o subst.o hashcmd.o hashlib.o \
60 mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o test.o \
61 version.o alias.o array.o braces.o bracecomp.o bashhist.o bashline.o \
62 getcwd.o siglist.o vprint.o oslib.o list.o stringlib.o locale.o \
63 xmalloc.o builtins/libbuiltins.a \
64 lib/readline/libreadline.a lib/readline/libhistory.a \
65 -ltermcap lib/glob/libglob.a lib/tilde/libtilde.a lib/malloc/libmalloc.a \
66 $libs
67
68 ls -l bash