bootstrap 13.4 KB
Newer Older
1
2
#! /bin/sh

3
##  bootstrap file for the VLC media player
Sam Hocevar's avatar
Sam Hocevar committed
4
##  $Id$
5
##
6
7
8
## Copyright (C) 2005 the VideoLAN team
##
##  Initial author: Sam Hocevar <sam@zoy.org>
9

Sam Hocevar's avatar
Sam Hocevar committed
10
11
12
13
if test "$#" != "0"; then
  echo "Usage: $0"
  echo "  Calls automake, autoconf, autoheader, autopoint and other auto* to generate"
  echo "  m4 macros and prepare Makefiles."
14
15
16
  exit 1
fi

17
###
18
###  Get a sane environment, just in case
19
###
20
21
LANG=C
export LANG
22
23
CYGWIN=binmode
export CYGWIN
24

25
set -e
26
set -x
27

28
##
29
## Check for various tools
30
##
31
32
AUTOMAKESUCKS=no
INSTALLSUCKS=no
33

34
35
ACLOCAL_ARGS="-I m4"

36
37
38
# Check for contrib directory
if test -d extras/contrib/bin; then
  export PATH=./extras/contrib/bin:$PATH
39
  ACLOCAL_ARGS="${ACLOCAL_ARGS} -I extras/contrib/share/aclocal"
40
41
42
43
44
45
46
  if test ".`uname -s`" = ".Darwin"; then
    export LD_LIBRARY_PATH=./extras/contrib/lib:$LD_LIBRARY_PATH
    export DYLD_LIBRARY_PATH=./extras/contrib/lib:$DYLD_LIBRARY_PATH
  elif test ".`uname -s`" = ".BeOS"; then
    export LIBRARY_PATH=./extras/contrib/lib:$LIBRARY_PATH
    export BELIBRARIES=./extras/contrib/lib:$BELIBRARIES
  fi
47
48
fi

49
50
# Check for automake
amvers="none"
51
52
53
54
55
56
57
58
if automake-1.8 --version >/dev/null 2>&1; then
  amvers="-1.8"
  # If we also have 1.6 (>> 1.6.1), use it instead because it is faster
  if automake-1.6 --version >/dev/null 2>&1; then
    if expr "`automake-1.6 --version | sed -e '1s/[^0-9]*//' -e q`" ">" "1.6.1" > /dev/null 2>&1; then
      amvers="-1.6"
    fi
  fi
Rocky Bernstein's avatar
Rocky Bernstein committed
59
60
61
62
63
64
65
66
elif automake-1.9 --version >/dev/null 2>&1; then
  amvers="-1.9"
  # If we also have 1.6 (>> 1.6.1), use it instead because it is faster
  if automake-1.6 --version >/dev/null 2>&1; then
    if expr "`automake-1.6 --version | sed -e '1s/[^0-9]*//' -e q`" ">" "1.6.1" > /dev/null 2>&1; then
      amvers="-1.6"
    fi
  fi
67
elif automake-1.7 --version >/dev/null 2>&1; then
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
  amvers="-1.7"
  # If we also have 1.6 (>> 1.6.1), use it instead because it is faster
  if automake-1.6 --version >/dev/null 2>&1; then
    if expr "`automake-1.6 --version | sed -e '1s/[^0-9]*//' -e q`" ">" "1.6.1" > /dev/null 2>&1; then
      amvers="-1.6"
    fi
  fi
elif automake-1.6 --version >/dev/null 2>&1; then
  amvers="-1.6"
  if expr "`automake-1.6 --version | sed -e '1s/[^0-9]*//' -e q`" "<=" "1.6.1" > /dev/null 2>&1; then
    AUTOMAKESUCKS=yes
  fi
elif automake-1.5 --version >/dev/null 2>&1; then
  INSTALLSUCKS=yes
  amvers="-1.5"
elif automake --version > /dev/null 2>&1; then
  amvers=""
  case "`automake --version | sed -e '1s/[^0-9]*//' -e q`" in
    0|0.*|1|1.[01234]|1.[01234][-.]*)
      amvers="none" ;;
    1.5|1.5.*)
      INSTALLSUCKS=yes ;;
    1.6|1.6.0|1.6.1)
      AUTOMAKESUCKS=yes ;;
Rocky Bernstein's avatar
Rocky Bernstein committed
92
93
    1.9|1.9.2)
      ;;
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
  esac
fi

if test "${amvers}" = "none"; then
  set +x
  echo "you need automake version 1.5 or later"
  exit 1
fi

# Check for gettext
if gettextize --version >/dev/null 2>&1; then
# Autopoint is available from 0.11.3, but we need 0.11.5
if expr `gettextize --version | sed -e '1s/[^0-9]*//' -e q` \
        '>=' 0.11.5 >/dev/null 2>&1; then
  # We have gettext, and a recent version! Everything is cool.
  autopoint=autopoint
  GETTEXT=yes
else
  # User's gettext is too old. try to continue anyway.
  autopoint=:
  GETTEXT=old
fi;else
  # we don't have gettext. grmbl. try to continue anyway.
  autopoint=:
  GETTEXT=no
fi

# Check for pkg-config
if pkg-config --version >/dev/null 2>&1; then
  # We have pkg-config, everything is cool.
  PKGCONFIG=yes
else
  PKGCONFIG=no
fi

aclocal=aclocal${amvers}
automake=automake${amvers}
autoconf=autoconf
autoheader=autoheader

134
135
136
137
##
## Generate the modules makefile, by parsing modules/**/Modules.am
##

138
set +x
139
echo "generating modules/**/Makefile.am and m4/private.m4"
140

Sam Hocevar's avatar
Sam Hocevar committed
141
# Prepare m4/private.m4
Sam Hocevar's avatar
Sam Hocevar committed
142
rm -f m4/private.m4 && cat > m4/private.m4 << EOF
143
dnl  Private VLC macros - generated by bootstrap
144
145

EOF
gbazin's avatar
   
gbazin committed
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

if [ "${PKGCONFIG}" = "no" ]; then cat >> m4/private.m4 << EOF
dnl  User does not have pkg-config, so this is a no-op
AC_DEFUN([PKG_CHECK_MODULES], [:], [], [], [])

EOF
fi

if [ "${GETTEXT}" != "yes" ]; then cat >> m4/private.m4 << EOF
dnl  User does not have gettext, so this is a no-op
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])

EOF
fi

Sam Hocevar's avatar
Sam Hocevar committed
161
162
163
rm -f m4/private.m4-tmp1 && cat > m4/private.m4-tmp1 << EOF
dnl  The required AM_CONDITIONAL calls
dnl  XXX: too many conditionals make the build very slow, disabled them
Sam Hocevar's avatar
Sam Hocevar committed
164
AC_DEFUN([VLC_CONDITIONALS], [
Sam Hocevar's avatar
Sam Hocevar committed
165
166
167
EOF
rm -f m4/private.m4-tmp2 && cat > m4/private.m4-tmp2 << EOF
dnl  The required AC_SUBST calls
Sam Hocevar's avatar
Sam Hocevar committed
168
AC_DEFUN([VLC_SUBSTS], [
Sam Hocevar's avatar
Sam Hocevar committed
169
170
171
172
EOF
rm -f m4/private.m4-tmp3 && cat > m4/private.m4-tmp3 << EOF
dnl  The required AC_OUTPUT calls
dnl  XXX: this feature is only supported starting from automake-1.7
Sam Hocevar's avatar
Sam Hocevar committed
173
AC_DEFUN([VLC_MAKEFILES], [AC_OUTPUT([
Sam Hocevar's avatar
Sam Hocevar committed
174
175
176
EOF
rm -f m4/private.m4-tmp4 && cat > m4/private.m4-tmp4 << EOF
dnl  Helper macro for vlc-config generation
Sam Hocevar's avatar
Sam Hocevar committed
177
AC_DEFUN([VLC_CONFIG_HELPER], [
Sam Hocevar's avatar
Sam Hocevar committed
178
179
  cat >> vlc-config.in << BLAH
EOF
180
181
182

modules=""

Sam Hocevar's avatar
Sam Hocevar committed
183
184
185
rm -f modules/Makefile.am && cat > modules/Makefile.am << EOF
# Autogenerated by bootstrap - DO NOT EDIT
EXTRA_DIST = LIST
Sam Hocevar's avatar
Sam Hocevar committed
186
187
SUBDIRS = `sed -ne 's,modules/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`
#DIST_SUBDIRS = \$(SUBDIRS)
Sam Hocevar's avatar
Sam Hocevar committed
188
EOF
189

Sam Hocevar's avatar
Sam Hocevar committed
190
for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac`
Sam Hocevar's avatar
Sam Hocevar committed
191
192
do
  printf "."
193
194
  modf="modules/${dir}/Modules.am"
  makf="modules/${dir}/Makefile.am"
Sam Hocevar's avatar
Sam Hocevar committed
195
  basedir="`echo "${dir}" | cut -f1 -d/`"
Sam Hocevar's avatar
Sam Hocevar committed
196
  # automake will not recurse for make dist if we don't define SUBDIRS = .
Sam Hocevar's avatar
Sam Hocevar committed
197
  subdirs="`sed -ne 's,'modules/${dir}'/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`"
198
199
200
201
202
203
204
205
  mods="`sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < "${modf}" | xargs`"
  extra_libs=""
  for mod in $mods
  do
    extra_libs="${extra_libs} lib${mod}_plugin.a"
    extra_libs="${extra_libs} lib${mod}.a lib${mod}_pic.a"
  done
  rm -f "${makf}" && cat > "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
206

207
208
# ${makf} automatically generated from ${modf} by bootstrap
# DO NOT EDIT - edit Modules.am instead
Sam Hocevar's avatar
Sam Hocevar committed
209
210
211
212
213
214
215

NULL =
libvlc_LIBRARIES =
noinst_LIBRARIES =
noinst_HEADERS =
EXTRA_DIST = Modules.am
BUILT_SOURCES =
Sam Hocevar's avatar
Sam Hocevar committed
216
217
SUBDIRS = ${subdirs}
#DIST_SUBDIRS = \$(SUBDIRS)
Sam Hocevar's avatar
Sam Hocevar committed
218
libvlcdir = \$(libdir)/vlc/${basedir}
219
220

EXTRA_LIBRARIES = ${extra_libs}
Sam Hocevar's avatar
Sam Hocevar committed
221
include Modules.am
Sam Hocevar's avatar
Sam Hocevar committed
222

223
if !BUILD_MOZILLA
224
pic = no
Sam Hocevar's avatar
Sam Hocevar committed
225
else
226
227
228
if HAVE_WIN32
dnl There's no need for pic code on win32 so get rid of this to substantially
dnl reduce the compilation time.
Sam Hocevar's avatar
Sam Hocevar committed
229
230
pic = no
endif
231
endif
232

233
clean-local:
Sam Hocevar's avatar
Sam Hocevar committed
234
	-rm -f *.a *.so *.dll *.sl *.dylib
Sam Hocevar's avatar
Sam Hocevar committed
235

Sam Hocevar's avatar
Sam Hocevar committed
236
237
all: all-modules
all-modules:
Sam Hocevar's avatar
Sam Hocevar committed
238
	@set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\
239
240
241
	if test "\$(plugin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list plugin); for mod in $mods; do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_plugin\$(LIBEXT);; esac; done; fi; \\
	if test "\$(builtin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list builtin); for mod in $mods; do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}.a;; esac; done; fi; \\
	if test "\$(pic)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list builtin); for mod in $mods; do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_pic.a;; esac; done; fi; \\
Sam Hocevar's avatar
Sam Hocevar committed
242
243
244
	\`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\
	test -z "\$\$fail"

245
246
247
\$(srcdir)Makefile.am: \$(srcdir)Modules.am \$(top_srcdir)bootstrap
	cd \$(top_srcdir) && \$(SHELL) ./bootstrap

248
EOF
249
  for mod in $mods
250
  do
251
    if grep '^SOURCES_'${mod}'.*=.*PRIVATE' < "${modf}" >/dev/null 2>&1; then
252
253
        PRIVATE='#'; else
        PRIVATE=''; fi
254
    if grep '^nodist_SOURCES_'${mod}'' < "${modf}" >/dev/null 2>&1; then
255
256
        NODIST=''; else
        NODIST='#'; fi
Sam Hocevar's avatar
Sam Hocevar committed
257
258
    cat >> m4/private.m4-tmp4 << EOF
    ${mod}) list="\\\${list} ${dir}/lib${mod}" ;;
259
EOF
Sam Hocevar's avatar
Sam Hocevar committed
260
261
# Generation of modules/**/Makefile.am
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
262
263
264
# - L_ is for LIBRARIES_, D_ for DATA_, B_ for BUILT_SOURCES_, F_ for LDFLAGS_,
#   S_ for SOURCES_, _p is for _plugin, _b is for _builtin. This is to reduce
#   the resulting file size.
Sam Hocevar's avatar
Sam Hocevar committed
265
266
# - *_CFLAGS, *_CXXFLAGS etc. because per-object CPPFLAGS does not seem to
#   work properly with any automake version I tested.
267
    cat >> "${makf}" << EOF
268
# The ${mod} plugin
Sam Hocevar's avatar
Sam Hocevar committed
269

270
EOF
271
    if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
272
clean-local: clean-${mod}
273
clean-${mod}:
Sam Hocevar's avatar
Sam Hocevar committed
274
	-test -z "\$(nodist_SOURCES_${mod})" || rm -f \$(nodist_SOURCES_${mod})
275
276
277

EOF
    fi
278
    if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
279
${PRIVATE}BUILT_SOURCES += \$(B${mod})
Sam Hocevar's avatar
Sam Hocevar committed
280
281
EOF
    fi
282
    cat >> "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
283
284
${PRIVATE}lib${mod}_plugin_a_SOURCES = \$(SOURCES_${mod})
EOF
285
    if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
286
287
288
${PRIVATE}nodist_lib${mod}_plugin_a_SOURCES = \$(nodist_SOURCES_${mod})
EOF
    fi
289
    cat >> "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
290
291
292
293
294
295
lib${mod}_plugin_a_CFLAGS = \`\$(VLC_CONFIG) --cflags plugin ${mod}\`
lib${mod}_plugin_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags plugin ${mod}\`
lib${mod}_plugin_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags plugin ${mod}\`

lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(SOURCES_${mod})
EOF
296
    if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
297
298
299
nodist_lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(nodist_SOURCES_${mod})
EOF
    fi
300
    cat >> "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
301
302
303
304
305
306
lib${mod}_pic_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin pic ${mod}\`
lib${mod}_pic_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin pic ${mod}\`
lib${mod}_pic_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin pic ${mod}\`

lib${mod}_a_SOURCES = ${PRIVATE}\$(SOURCES_${mod})
EOF
307
    if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
308
309
310
nodist_lib${mod}_a_SOURCES = ${PRIVATE}\$(nodist_SOURCES_${mod})
EOF
    fi
311
    cat >> "${makf}" << EOF
Sam Hocevar's avatar
Sam Hocevar committed
312
313
314
315
lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\`
lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\`
lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\`

316
317
libvlc_LIBRARIES += \$(L${mod}b) \$(L${mod}pic)
lib${mod}_DATA = \$(D${mod}p)
318
319

lib${mod}dir = \$(libdir)/vlc/${topdir}
320
${PRIVATE}noinst_LIBRARIES += \$(L${mod}p)
Sam Hocevar's avatar
Sam Hocevar committed
321
${PRIVATE}lib${mod}_plugin\$(LIBEXT): \$(lib${mod}_plugin_a_OBJECTS)
322
323
324
325
${PRIVATE}	@case \`\$(VLC_CONFIG) --linkage ${mod}\` in \\
${PRIVATE}	  c++) echo \$(CXXLINK) \$(lib${mod}_plugin_a_OBJECTS) \\\`\$(VLC_CONFIG) --libs plugin ${mod}\\\` ; \$(CXXLINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\
${PRIVATE}	  objc) echo \$(OBJCLINK) \$(lib${mod}_plugin_a_OBJECTS) \\\`\$(VLC_CONFIG) --libs plugin ${mod}\\\` ; \$(OBJCLINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\
${PRIVATE}	  c|*) echo \$(LINK) \$(lib${mod}_plugin_a_OBJECTS) \\\`\$(VLC_CONFIG) --libs plugin ${mod}\\\` ; \$(LINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\
Sam Hocevar's avatar
Sam Hocevar committed
326
${PRIVATE}	esac
327
328
329
330
331
332


EOF
  done
done

Sam Hocevar's avatar
Sam Hocevar committed
333
334
335
336
337
338
339
340
341
342
343
344
345
346
cat >> m4/private.m4-tmp1 << EOF
])
EOF
cat m4/private.m4-tmp1 >> m4/private.m4 && rm -f m4/private.m4-tmp1
cat >> m4/private.m4-tmp2 << EOF
])
EOF
cat m4/private.m4-tmp2 >> m4/private.m4 && rm -f m4/private.m4-tmp2
cat >> m4/private.m4-tmp3 << EOF
])])
EOF
cat m4/private.m4-tmp3 >> m4/private.m4 && rm -f m4/private.m4-tmp3
cat >> m4/private.m4-tmp4 << EOF
BLAH
347
348
])
EOF
Sam Hocevar's avatar
Sam Hocevar committed
349
cat m4/private.m4-tmp4 >> m4/private.m4 && rm -f m4/private.m4-tmp4
350

351
echo " done."
352

353
###
354
###  classic bootstrap stuff
355
###
356
set -x
357
358

# remove autotools cruft
359
rm -f aclocal.m4 configure config.log config.h config.h.in
360
rm -Rf autom4te.cache
361
362
363
# remove old autotools extra cruft
rm -f config.guess config.sub missing mkinstalldirs compile depcomp install-sh
# remove new autotools extra cruft
Sam Hocevar's avatar
Sam Hocevar committed
364
365
rm -Rf autotools
mkdir autotools
366
367
368
# remove libtool cruft
rm -f ltmain.sh libtool ltconfig
# remove gettext cruft
369
rm -f ABOUT-NLS
370
rm -Rf intl
371
372
# remove old vlc cruft
rm -f m4/oldgettext.m4 stamp-pic configure.ac.in Modules.am
Sam Hocevar's avatar
Sam Hocevar committed
373
374
# remove new vlc cruft
rm -f stamp-builtin stamp-h* mozilla/stamp-pic
375

376
# Automake complains if these are not present
Sam Hocevar's avatar
Sam Hocevar committed
377
rm -f vlc-config.in && printf "" > vlc-config.in
378
379
380
381
382
if [ "$GETTEXT" != "yes" ]; then
  test -d intl || mkdir intl
  printf "" > intl/Makefile.am
  printf "" > ABOUT-NLS
fi
Sam Hocevar's avatar
Sam Hocevar committed
383

384
# Do the rest
Sam Hocevar's avatar
Sam Hocevar committed
385
${autopoint} -f
386
${aclocal} ${ACLOCAL_ARGS}
Sam Hocevar's avatar
Sam Hocevar committed
387
388
389
${autoconf}
${autoheader}
${automake} --add-missing --copy
390
391

##
Sam Hocevar's avatar
Sam Hocevar committed
392
##  files which need to be regenerated
393
##
Sam Hocevar's avatar
Sam Hocevar committed
394
rm -f vlc-config.in vlc-config
395
rm -f src/misc/modules_builtin.h
396
rm -f mozilla/vlcintf.h
397

398
# Shut up
399
set +x
400

401
##
402
##  Tell the user about gettext, pkg-config and sed
403
##
Sam Hocevar's avatar
Sam Hocevar committed
404
case "${GETTEXT}" in
405
406
  yes) ;;
  no) cat << EOF
407
408
409
410
411
412

===========================================================
IMPORTANT NOTE: you do not have gettext installed on your
system. The vlc build will work, but you will not have
internationalization support. We suggest installing gettext.
EOF
413
  ;;
414
  old) cat << EOF
415
416
417

==========================================================
NOTE: you have an old version of gettext installed on your
418
419
system. The vlc build will work, but if your system does not
have libintl you will not have internationalization support.
420
We suggest upgrading to gettext 0.11.5 or later.
421
EOF
422
423
424
  ;;
esac

425
case "$PKGCONFIG" in
426
427
  yes) ;;
  no) cat << EOF
428
429
430
431
432
433
434
435
436

==============================================================
NOTE: you do not have the "pkg-config" utility on your system;
detection of the Gtk-2.0 and GNOME 2.0 libraries will not be
reliable.
EOF
  ;;
esac

437
case "$AUTOMAKESUCKS" in
438
439
  no) ;;
  yes) cat << EOF
440
441
442
443
444
445
446
447
448
449
450

=============================================================
IMPORTANT NOTE: your version of automake has a bug which will
prevent proper plugin compilation. Either compile VLC with
the --disable-plugins flag, or use a version of automake newer
than 1.6.1 (1.6.2 is OK, and so are the 1.5 series).
EOF
  ;;
esac

case "$INSTALLSUCKS" in
451
452
  no) ;;
  yes) cat << EOF
453
454
455
456
457
458
459

=============================================================
IMPORTANT NOTE: your version of automake has a bug which will
prevent proper installation. Do not use "make install" with this
version of automake, or use a version of automake newer than 1.5
(such as 1.6 or 1.7).
EOF
460
461
462
  ;;
esac