Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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