]> git.ipfire.org Git - thirdparty/bash.git/blame - support/xenix-link.sh
Imported from ../bash-4.0-rc1.tar.gz.
[thirdparty/bash.git] / support / xenix-link.sh
CommitLineData
d166f048
JA
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
7117c2d2
JA
17# Copyright (C) 1989-2002 Free Software Foundation, Inc.
18#
3185942a
JA
19# This program is free software: you can redistribute it and/or modify
20# it under the terms of the GNU General Public License as published by
21# the Free Software Foundation, either version 3 of the License, or
22# (at your option) any later version.
7117c2d2 23#
3185942a
JA
24# This program is distributed in the hope that it will be useful,
25# but WITHOUT ANY WARRANTY; without even the implied warranty of
26# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27# GNU General Public License for more details.
28#
29# You should have received a copy of the GNU General Public License
30# along with this program. If not, see <http://www.gnu.org/licenses/>.
7117c2d2 31#
7117c2d2 32
d166f048
JA
33set -x
34
35rm -f bash
36
37if [ -z "$CC" ]
38then
b80f6443 39 if [ -f /unix ] && [ ! -f /xenix ]
d166f048
JA
40 then
41 CC="cc -xenix"
42 else
43 CC=gcc
44 fi
45fi
46
47try_dir=no
48try_23=no
49try_x=yes
50
51case "$CC" in
52*-ldir*) try_dir=yes ;;
53esac
54
55case "$CC" in
56*-lx*) try_23=no ; try_x=yes ;;
57esac
58
59case "$CC" in
60*-x2.3*|*-l2.3*) try_23=yes ; try_dir=yes ;;
61esac
62
63libs=
64try="socket"
65if [ $try_dir = yes ] ; then try="$try dir" ; fi
66if [ $try_23 = yes ] ; then try="$try 2.3" ; fi
67if [ $try_x = yes ] ; then try="$try x" ; fi
68for name in $try
69do
70 if [ -r "/lib/386/Slib${name}.a" ] ; then libs="$libs -l$name" ; fi
71done
72
73$CC -o bash shell.o eval.o y.tab.o \
74general.o make_cmd.o print_cmd.o dispose_cmd.o execute_cmd.o variables.o \
75copy_cmd.o error.o expr.o flags.o nojobs.o subst.o hashcmd.o hashlib.o \
76mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o test.o \
77version.o alias.o array.o braces.o bracecomp.o bashhist.o bashline.o \
78getcwd.o siglist.o vprint.o oslib.o list.o stringlib.o locale.o \
79xmalloc.o builtins/libbuiltins.a \
80lib/readline/libreadline.a lib/readline/libhistory.a \
81-ltermcap lib/glob/libglob.a lib/tilde/libtilde.a lib/malloc/libmalloc.a \
82$libs
83
84ls -l bash