-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup
executable file
·166 lines (148 loc) · 3.63 KB
/
setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#! /bin/sh -e
# $Id$
#
# This script builds the files necessary to configure this package for
# development. Once you run this script, you will need GNU make,
# autoconf, and automake to build the software. You must run "make
# dist" if you the wish to create a source tree that can be built
# without these tools.
#
# You should generally only need to run this script if you just
# checked sfs out of a CVS repository, or else somehow badly mangled
# the Makefile.
opt_c=
opt_f=
for arg in "$@"; do
case "$arg" in
-cf|-fc)
opt_c='--copy'
opt_f='--force'
;;
-c)
opt_c='--copy'
;;
-f)
opt_f='--force'
rm -f depcomp install-sh missing mkinstalldirs
rm -f libtool ltconfig ltmain.sh
rm -f config.guess config.sub
;;
*)
echo setup: unknown option "$arg"
;;
esac
done
if test -z "${AUTOCONF+set}"; then
AUTOCONF=autoconf
export AUTOCONF
fi
if test -z "${AUTOCONF_VERSION+set}"; then
for acv in 2.59 2.58 2.57 2.54 2.52 2.13; do
for dir in /usr/local/bin /usr/bin; do
if test -x ${dir}/autoconf-${acv}; then
#AUTOCONF=${dir}/autoconf-${acv}
#export AUTOCONF
AUTOCONF_VERSION=$acv
export AUTOCONF_VERSION
echo "Using AUTOCONF_VERSION $AUTOCONF_VERSION"
break 2
fi
done
done
fi
if test -z "${SETUP_TOP_PID}"; then
SETUP_TOP_PID=$$
export SETUP_TOP_PID
fi
if test ! -f configure.in; then
echo Must run this from source directory >&2
exit 1
fi
M4=gm4
$M4 --version < /dev/null 2>&1 | grep GNU >/dev/null 2>&1 || M4=gnum4
$M4 --version < /dev/null 2>&1 | grep GNU >/dev/null 2>&1 || M4=m4
$M4 --version < /dev/null 2>&1 | grep GNU >/dev/null 2>&1 \
|| (echo Cannot locate GNU m4 >&2; exit 1)
if test "${LIBTOOLIZE+set}" != "set"; then
LIBTOOLIZE=libtoolize
if test ! -x /usr/local/bin/libtoolize \
-a ! -x /usr/bin/libtoolize; then
if test -x /usr/bin/glibtoolize; then
LIBTOOLIZE=glibtoolize
elif test -x /usr/local/bin/libtoolize15; then
LIBTOOLIZE=libtoolize15
echo $LIBTOOLIZE
fi
fi
fi
if test "${ACLOCAL+set}" != "set"; then
ACLOCAL=aclocal
if test ! -x /usr/local/bin/aclocal \
-a ! -x /usr/bin/aclocal; then
if test -x /usr/local/bin/aclocal15; then
ACLOCAL=aclocal15
fi
fi
fi
if test "${AUTOHEADER+set}" != "set"; then
AUTOHEADER=autoheader
if test ! -x /usr/local/bin/autoheader \
-a ! -x /usr/bin/autoheader; then
if test -x /usr/local/bin/autoheader259; then
AUTOHEADER=autoheader259
fi
fi
fi
if test "${AUTOMAKE+set}" != "set"; then
AUTOMAKE=automake
if test ! -x /usr/local/bin/automake \
-a ! -x /usr/bin/automake; then
if test -x /usr/local/bin/automake15; then
AUTOMAKE=automake15
fi
fi
fi
for file in acinclude.m4; do
if test ! -f $file -a -f ../$file; then
echo "+ ln -f -s ../$file $file"
ln -f -s ../$file $file
fi
done
for file in Makefile.am.m4 */Makefile.am.m4; do
if test -f $file; then
out=`echo $file | sed -e 's/\.m4$//'`
echo "+ $M4 $file > $out"
rm -f $out~
$M4 $file > $out~
mv -f $out~ $out
fi
done
#
# removed: recursive setup call
#
if test -z "${AM_ARGS:+set}"; then
AM_ARGS="--add-missing $opt_c $opt_f"
fi
if test -z "${LTI_ARGS:+set}"; then
LTI_ARGS="$opt_c $opt_f"
fi
set -x
chmod +x setup
$LIBTOOLIZE $LTI_ARGS
$ACLOCAL
$AUTOHEADER
$AUTOMAKE $AM_ARGS
$AUTOCONF
set +x
if test -f config.status; then
set -x
sh config.status
fi
set +x
if test "$SETUP_TOP_PID" = "$$"; then
echo ""
echo " *** * * * * * * * * * * * * * * * * ***"
echo " *** setup succeeded ***"
echo " *** * * * * * * * * * * * * * * * * ***"
echo ""
fi