Codebase list ocp-indent / 53bd0bc
Update upstream source from tag 'upstream/1.7.0' Update to upstream version '1.7.0' with Debian dir 7ec939e4203f066eb1b443ccfdfcbae353ec63c0 Johannes 'josch' Schauer 5 years ago
56 changed file(s) with 1522 addition(s) and 5777 deletion(s). Raw diff Collapse all Expand all
00 .hgignore.in
11 Makefile.config
2 jbuild
32 jbuild-ignore
43 ocp-build.root*
54 _obuild
1312 aclocal.m4
1413 man/man1/
1514 src/.hgignore.in
16 src/jbuild
1715 src/Makefile.extracted-from-jenga
1816 src/buildable_targets.list
1917 **/.fe.sexp
18 _build
19 .merlin
20 *.install
0 ## 1.7.0
1 * lots of small fixes
2 * better handling of attributes and extension points
3 * better handling of GADT definitions
4 * fixed a stack-overflow on extremely large files
5 * indent the same (1 step) after `let f = fun x ->` and `let f =\n fun x ->`
6 * build using dune
7
08 ## 1.6.1
19 * fixes related to ppx extensions
210 * fixed regression on indentation within record types
+0
-26
META less more
0 package "lib" (
1 version = "1.6.1"
2 directory = "lib"
3 archive(byte) = "ocp-indent.lib.cma"
4 archive(native) = "ocp-indent.lib.cmxa"
5 requires = "ocp-indent.lexer ocp-indent.utils"
6 )
7 package "utils" (
8 version = "1.6.1"
9 directory = "utils"
10 archive(byte) = "ocp-indent.utils.cma"
11 archive(native) = "ocp-indent.utils.cmxa"
12 requires = "ocp-indent.lexer"
13 )
14 package "lexer" (
15 version = "1.6.1"
16 directory = "lexer"
17 archive(byte) = "ocp-indent.lexer.cma"
18 archive(native) = "ocp-indent.lexer.cmxa"
19 )
20 package "dynlink" (
21 version = "1.6.1"
22 directory = "dynlink"
23 archive(byte) = "ocp-indent.dynlink.cma"
24 archive(native) = "ocp-indent.dynlink.cmxa"
25 )
+0
-97
Makefile less more
0 -include Makefile.config
1
2 byte = _obuild/ocp-indent/ocp-indent.byte
3 native = _obuild/ocp-indent/ocp-indent.asm
4 manpage = man/man1/ocp-indent.1
5
6 OCPBUILD_ARGS =
7
8 .PHONY: $(native) $(byte)
9
10 all: ocp-indent $(manpage)
11 @
12
13 ocp-indent: $(native)
14 cp $^ ocp-indent
15
16 ALWAYS:
17
18 $(byte) byte: ocp-build.root ALWAYS
19 ocp-build $(OCPBUILD_ARGS)
20
21 $(native) native asm: ocp-build.root ALWAYS
22 ocp-build $(OCPBUILD_ARGS)
23
24 .PHONY: man
25 man: $(manpage)
26 $(manpage): $(byte)
27 mkdir -p $(@D)
28 $(byte) --help=groff >$@
29
30 bootstrap: ocp-indent
31 ./ocp-indent -c match_clause=4 --inplace src/*.mli src/*.ml
32
33 sanitize:
34 ocp-build -sanitize $(OCPBUILD_ARGS)
35
36 .PHONY: clean
37 clean:
38 ocp-build clean $(OCPBUILD_ARGS)
39
40 .PHONY: distclean
41 distclean:
42 ocp-build clean $(OCPBUILD_ARGS)
43 rm -rf _build _obuild
44 rm -f configure Makefile.config config.* ocp-build.root* version.ocp
45
46 install.sh: ocp-indent.install
47 opam-installer --prefix '$$1' $^ --script >$@
48 chmod a+x $@
49
50 uninstall.sh: ocp-indent.install
51 opam-installer --prefix '$$1' $^ --script --uninstall >$@
52 chmod a+x $@
53
54 .PHONY: install
55 install: $(manpage) install.sh uninstall.sh
56 ./install.sh $(prefix)
57 @echo
58 @echo
59 @echo "=== ocp-indent installed ==="
60 @echo
61 @echo "To setup tuareg-mode to use ocp-indent, please add the following"
62 @echo "to your .emacs :"
63 @echo
64 @if [ "$(prefix)" != "/usr" ]; then \
65 echo " (add-to-list 'load-path \"$(datarootdir)/emacs/site-lisp\")"; \
66 fi
67 @echo " (require 'ocp-indent)"
68 @echo
69 @echo "Vim users are welcome to add the following to their .vimrc :"
70 @echo
71 @echo ' set rtp^="$(prefix)/share/ocp-indent/vim"'
72 @echo
73
74 .PHONY: uninstall
75 uninstall: uninstall.sh
76 ./uninstall.sh $(prefix)
77
78 .PHONY: test
79 test: ocp-indent
80 ./tests/test.sh
81
82 configure: configure.ac
83 aclocal -I m4
84 autoconf
85
86 version.ocp: configure.ac
87 @echo "version.ocp not up-to-date, please rerun ./configure"
88 @exit 1
89
90 ocp-build.root: version.ocp
91 @if (ocp-build -version 2>/dev/null |\
92 awk -F'.' '{ exit $$1 > 1 || ($$1 == 1 && $$2 >= 99) }'); then \
93 echo "Error: you need ocp-build >= 1.99." >&2;\
94 exit 1;\
95 fi
96 ocp-build -init $(OCPBUILD_ARGS)
+0
-4
Makefile.config.in less more
0 datarootdir = @datarootdir@
1 prefix=@prefix@
2 mandir = $(shell if test -d @mandir@; then echo @mandir@; else echo @prefix@/man; fi)
3 version=@PACKAGE_VERSION@
+0
-71
Makefile.simple less more
0 # -*- makefile -*-
1
2 GENERATED = src/indentVersion.ml src/compat.ml
3
4 NAME = 'ocp-indent'
5 VERSION != awk -F'[(,)]' '/AC_INIT/ { print $$3 }' configure.ac
6
7 BEST != if ocamlopt 2>/dev/null; then echo native; else echo byte; fi
8 OCAML_MAJOR != ocaml -vnum | sed 's/\..*//'
9 COMPAT_DIR = src/ocaml_$(OCAML_MAJOR)/
10
11 OCAMLBUILD = ocamlbuild -I src -use-ocamlfind
12
13 LIB = ocp-indent-lib
14
15 PKGS = cmdliner,findlib,dynlink
16
17 BINS = ocp-indent.byte
18 LIBS = $(LIB).cma
19 ifeq ($(BEST),native)
20 LIBS += $(LIB).cmxa $(LIB).a $(LIB).cmxs
21 BINS += ocp-indent.native
22 endif
23
24 .PHONY: all
25 all: $(LIBS) $(BINS) ocp-indent.1
26
27 .PHONY: man
28 man: ocp-indent.1
29
30 ocp-indent.1: ocp-indent.$(BEST)
31 ./ocp-indent.$(BEST) --help=groff >$@
32
33 ocp-indent.byte:
34 $(OCAMLBUILD) indentMain.byte -pkgs $(PKGS)
35 ln -f _build/src/indentMain.byte $@
36
37 ocp-indent.native:
38 $(OCAMLBUILD) indentMain.native -pkgs $(PKGS)
39 ln -f _build/src/indentMain.native $@
40
41 src/compat.ml:
42 cp $(COMPAT_DIR)/compat.ml src/
43
44 src/indentVersion.ml:
45 echo 'let version = "'$(VERSION)'"' > $@
46
47 src/approx_common.ml: src/approx_common.mli
48 cp $< $@
49
50 $(LIB).cma $(LIB).cmxa $(LIB).a $(LIB).cmxs: $(GENERATED)
51 $(OCAMLBUILD) -use-ocamlfind $@
52
53 .PHONY: clean
54 clean:
55 rm -rf $(GENERATED) META _build
56 rm -rf $(BINS) ocp-indent.1
57
58 META:
59 mkdir -p _build/src
60 echo 'name = "'$(NAME)'"' >$@
61 echo 'version = "'$(VERSION)'"' >> $@
62 echo 'archive(byte) = "'$(LIB)'.cma"' >> $@
63 echo 'archive(native) = "'$(LIB)'.cmxa"' >> $@
64
65 .PHONY: install
66 install: META $(LIBS) $(BINS)
67 ocamlfind remove $(NAME) || true
68 ocamlfind install $(NAME) \
69 $(LIBS:%=_build/src/%) $(BINS) META \
70 _build/src/*.{mli,cmi,cmt,cmti,annot}
0 1.7.0
+0
-4717
configure less more
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for ocp-indent 1.6.1.
3 #
4 #
5 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
6 #
7 #
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 #
11 # Copyright 2013-2017 OcamlPro SAS
12 ## -------------------- ##
13 ## M4sh Initialization. ##
14 ## -------------------- ##
15
16 # Be more Bourne compatible
17 DUALCASE=1; export DUALCASE # for MKS sh
18 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19 emulate sh
20 NULLCMD=:
21 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
24 setopt NO_GLOB_SUBST
25 else
26 case `(set -o) 2>/dev/null` in #(
27 *posix*) :
28 set -o posix ;; #(
29 *) :
30 ;;
31 esac
32 fi
33
34
35 as_nl='
36 '
37 export as_nl
38 # Printing a long string crashes Solaris 7 /usr/bin/printf.
39 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
42 # Prefer a ksh shell builtin over an external printf program on Solaris,
43 # but without wasting forks for bash or zsh.
44 if test -z "$BASH_VERSION$ZSH_VERSION" \
45 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
46 as_echo='print -r --'
47 as_echo_n='print -rn --'
48 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='printf %s\n'
50 as_echo_n='printf %s'
51 else
52 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
54 as_echo_n='/usr/ucb/echo -n'
55 else
56 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
57 as_echo_n_body='eval
58 arg=$1;
59 case $arg in #(
60 *"$as_nl"*)
61 expr "X$arg" : "X\\(.*\\)$as_nl";
62 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
63 esac;
64 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65 '
66 export as_echo_n_body
67 as_echo_n='sh -c $as_echo_n_body as_echo'
68 fi
69 export as_echo_body
70 as_echo='sh -c $as_echo_body as_echo'
71 fi
72
73 # The user is always right.
74 if test "${PATH_SEPARATOR+set}" != set; then
75 PATH_SEPARATOR=:
76 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
77 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
78 PATH_SEPARATOR=';'
79 }
80 fi
81
82
83 # IFS
84 # We need space, tab and new line, in precisely that order. Quoting is
85 # there to prevent editors from complaining about space-tab.
86 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
87 # splitting by setting IFS to empty value.)
88 IFS=" "" $as_nl"
89
90 # Find who we are. Look in the path if we contain no directory separator.
91 as_myself=
92 case $0 in #((
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95 for as_dir in $PATH
96 do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
101 IFS=$as_save_IFS
102
103 ;;
104 esac
105 # We did not find ourselves, most probably we were run as `sh COMMAND'
106 # in which case we are not to be found in the path.
107 if test "x$as_myself" = x; then
108 as_myself=$0
109 fi
110 if test ! -f "$as_myself"; then
111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112 exit 1
113 fi
114
115 # Unset variables that we do not need and which cause bugs (e.g. in
116 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117 # suppresses any "Segmentation fault" message there. '((' could
118 # trigger a bug in pdksh 5.2.14.
119 for as_var in BASH_ENV ENV MAIL MAILPATH
120 do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122 done
123 PS1='$ '
124 PS2='> '
125 PS4='+ '
126
127 # NLS nuisances.
128 LC_ALL=C
129 export LC_ALL
130 LANGUAGE=C
131 export LANGUAGE
132
133 # CDPATH.
134 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136 # Use a proper internal environment variable to ensure we don't fall
137 # into an infinite loop, continuously re-executing ourselves.
138 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
139 _as_can_reexec=no; export _as_can_reexec;
140 # We cannot yet assume a decent shell, so we have to provide a
141 # neutralization value for shells without unset; and this also
142 # works around shells that cannot unset nonexistent variables.
143 # Preserve -v and -x to the replacement shell.
144 BASH_ENV=/dev/null
145 ENV=/dev/null
146 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
147 case $- in # ((((
148 *v*x* | *x*v* ) as_opts=-vx ;;
149 *v* ) as_opts=-v ;;
150 *x* ) as_opts=-x ;;
151 * ) as_opts= ;;
152 esac
153 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
154 # Admittedly, this is quite paranoid, since all the known shells bail
155 # out after a failed `exec'.
156 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
157 as_fn_exit 255
158 fi
159 # We don't want this to propagate to other subprocesses.
160 { _as_can_reexec=; unset _as_can_reexec;}
161 if test "x$CONFIG_SHELL" = x; then
162 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
163 emulate sh
164 NULLCMD=:
165 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
166 # is contrary to our usage. Disable this feature.
167 alias -g '\${1+\"\$@\"}'='\"\$@\"'
168 setopt NO_GLOB_SUBST
169 else
170 case \`(set -o) 2>/dev/null\` in #(
171 *posix*) :
172 set -o posix ;; #(
173 *) :
174 ;;
175 esac
176 fi
177 "
178 as_required="as_fn_return () { (exit \$1); }
179 as_fn_success () { as_fn_return 0; }
180 as_fn_failure () { as_fn_return 1; }
181 as_fn_ret_success () { return 0; }
182 as_fn_ret_failure () { return 1; }
183
184 exitcode=0
185 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
186 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
187 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
188 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
189 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
190
191 else
192 exitcode=1; echo positional parameters were not saved.
193 fi
194 test x\$exitcode = x0 || exit 1
195 test -x / || exit 1"
196 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
197 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
198 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
199 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME='ocp-indent'
579 PACKAGE_TARNAME='ocp-indent'
580 PACKAGE_VERSION='1.6.1'
581 PACKAGE_STRING='ocp-indent 1.6.1'
582 PACKAGE_BUGREPORT=''
583 PACKAGE_URL=''
584
585 ac_subst_vars='LTLIBOBJS
586 LIBOBJS
587 OCAMLBUILD
588 OCAMLDOC
589 OCAMLMKLIB
590 OCAMLMKTOP
591 OCAMLDEP
592 OCAML
593 OCAMLOPTDOTOPT
594 OCAMLCDOTOPT
595 OCAMLBEST
596 OCAMLOPT
597 OCAMLLIB
598 OCAMLVERSION
599 OCAMLC
600 OBJEXT
601 EXEEXT
602 ac_ct_CC
603 CPPFLAGS
604 LDFLAGS
605 CFLAGS
606 CC
607 target_alias
608 host_alias
609 build_alias
610 LIBS
611 ECHO_T
612 ECHO_N
613 ECHO_C
614 DEFS
615 mandir
616 localedir
617 libdir
618 psdir
619 pdfdir
620 dvidir
621 htmldir
622 infodir
623 docdir
624 oldincludedir
625 includedir
626 runstatedir
627 localstatedir
628 sharedstatedir
629 sysconfdir
630 datadir
631 datarootdir
632 libexecdir
633 sbindir
634 bindir
635 program_transform_name
636 prefix
637 exec_prefix
638 PACKAGE_URL
639 PACKAGE_BUGREPORT
640 PACKAGE_STRING
641 PACKAGE_VERSION
642 PACKAGE_TARNAME
643 PACKAGE_NAME
644 PATH_SEPARATOR
645 SHELL'
646 ac_subst_files=''
647 ac_user_opts='
648 enable_option_checking
649 '
650 ac_precious_vars='build_alias
651 host_alias
652 target_alias
653 CC
654 CFLAGS
655 LDFLAGS
656 LIBS
657 CPPFLAGS'
658
659
660 # Initialize some variables set by options.
661 ac_init_help=
662 ac_init_version=false
663 ac_unrecognized_opts=
664 ac_unrecognized_sep=
665 # The variables have the same names as the options, with
666 # dashes changed to underlines.
667 cache_file=/dev/null
668 exec_prefix=NONE
669 no_create=
670 no_recursion=
671 prefix=NONE
672 program_prefix=NONE
673 program_suffix=NONE
674 program_transform_name=s,x,x,
675 silent=
676 site=
677 srcdir=
678 verbose=
679 x_includes=NONE
680 x_libraries=NONE
681
682 # Installation directory options.
683 # These are left unexpanded so users can "make install exec_prefix=/foo"
684 # and all the variables that are supposed to be based on exec_prefix
685 # by default will actually change.
686 # Use braces instead of parens because sh, perl, etc. also accept them.
687 # (The list follows the same order as the GNU Coding Standards.)
688 bindir='${exec_prefix}/bin'
689 sbindir='${exec_prefix}/sbin'
690 libexecdir='${exec_prefix}/libexec'
691 datarootdir='${prefix}/share'
692 datadir='${datarootdir}'
693 sysconfdir='${prefix}/etc'
694 sharedstatedir='${prefix}/com'
695 localstatedir='${prefix}/var'
696 runstatedir='${localstatedir}/run'
697 includedir='${prefix}/include'
698 oldincludedir='/usr/include'
699 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
700 infodir='${datarootdir}/info'
701 htmldir='${docdir}'
702 dvidir='${docdir}'
703 pdfdir='${docdir}'
704 psdir='${docdir}'
705 libdir='${exec_prefix}/lib'
706 localedir='${datarootdir}/locale'
707 mandir='${datarootdir}/man'
708
709 ac_prev=
710 ac_dashdash=
711 for ac_option
712 do
713 # If the previous option needs an argument, assign it.
714 if test -n "$ac_prev"; then
715 eval $ac_prev=\$ac_option
716 ac_prev=
717 continue
718 fi
719
720 case $ac_option in
721 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
722 *=) ac_optarg= ;;
723 *) ac_optarg=yes ;;
724 esac
725
726 # Accept the important Cygnus configure options, so we can diagnose typos.
727
728 case $ac_dashdash$ac_option in
729 --)
730 ac_dashdash=yes ;;
731
732 -bindir | --bindir | --bindi | --bind | --bin | --bi)
733 ac_prev=bindir ;;
734 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
735 bindir=$ac_optarg ;;
736
737 -build | --build | --buil | --bui | --bu)
738 ac_prev=build_alias ;;
739 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
740 build_alias=$ac_optarg ;;
741
742 -cache-file | --cache-file | --cache-fil | --cache-fi \
743 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
744 ac_prev=cache_file ;;
745 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
746 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
747 cache_file=$ac_optarg ;;
748
749 --config-cache | -C)
750 cache_file=config.cache ;;
751
752 -datadir | --datadir | --datadi | --datad)
753 ac_prev=datadir ;;
754 -datadir=* | --datadir=* | --datadi=* | --datad=*)
755 datadir=$ac_optarg ;;
756
757 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
758 | --dataroo | --dataro | --datar)
759 ac_prev=datarootdir ;;
760 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
761 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
762 datarootdir=$ac_optarg ;;
763
764 -disable-* | --disable-*)
765 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
766 # Reject names that are not valid shell variable names.
767 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
768 as_fn_error $? "invalid feature name: $ac_useropt"
769 ac_useropt_orig=$ac_useropt
770 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
771 case $ac_user_opts in
772 *"
773 "enable_$ac_useropt"
774 "*) ;;
775 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
776 ac_unrecognized_sep=', ';;
777 esac
778 eval enable_$ac_useropt=no ;;
779
780 -docdir | --docdir | --docdi | --doc | --do)
781 ac_prev=docdir ;;
782 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
783 docdir=$ac_optarg ;;
784
785 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
786 ac_prev=dvidir ;;
787 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
788 dvidir=$ac_optarg ;;
789
790 -enable-* | --enable-*)
791 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
792 # Reject names that are not valid shell variable names.
793 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
794 as_fn_error $? "invalid feature name: $ac_useropt"
795 ac_useropt_orig=$ac_useropt
796 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
797 case $ac_user_opts in
798 *"
799 "enable_$ac_useropt"
800 "*) ;;
801 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
802 ac_unrecognized_sep=', ';;
803 esac
804 eval enable_$ac_useropt=\$ac_optarg ;;
805
806 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
807 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
808 | --exec | --exe | --ex)
809 ac_prev=exec_prefix ;;
810 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
811 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
812 | --exec=* | --exe=* | --ex=*)
813 exec_prefix=$ac_optarg ;;
814
815 -gas | --gas | --ga | --g)
816 # Obsolete; use --with-gas.
817 with_gas=yes ;;
818
819 -help | --help | --hel | --he | -h)
820 ac_init_help=long ;;
821 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
822 ac_init_help=recursive ;;
823 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
824 ac_init_help=short ;;
825
826 -host | --host | --hos | --ho)
827 ac_prev=host_alias ;;
828 -host=* | --host=* | --hos=* | --ho=*)
829 host_alias=$ac_optarg ;;
830
831 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
832 ac_prev=htmldir ;;
833 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
834 | --ht=*)
835 htmldir=$ac_optarg ;;
836
837 -includedir | --includedir | --includedi | --included | --include \
838 | --includ | --inclu | --incl | --inc)
839 ac_prev=includedir ;;
840 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
841 | --includ=* | --inclu=* | --incl=* | --inc=*)
842 includedir=$ac_optarg ;;
843
844 -infodir | --infodir | --infodi | --infod | --info | --inf)
845 ac_prev=infodir ;;
846 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
847 infodir=$ac_optarg ;;
848
849 -libdir | --libdir | --libdi | --libd)
850 ac_prev=libdir ;;
851 -libdir=* | --libdir=* | --libdi=* | --libd=*)
852 libdir=$ac_optarg ;;
853
854 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
855 | --libexe | --libex | --libe)
856 ac_prev=libexecdir ;;
857 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
858 | --libexe=* | --libex=* | --libe=*)
859 libexecdir=$ac_optarg ;;
860
861 -localedir | --localedir | --localedi | --localed | --locale)
862 ac_prev=localedir ;;
863 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
864 localedir=$ac_optarg ;;
865
866 -localstatedir | --localstatedir | --localstatedi | --localstated \
867 | --localstate | --localstat | --localsta | --localst | --locals)
868 ac_prev=localstatedir ;;
869 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
870 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
871 localstatedir=$ac_optarg ;;
872
873 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
874 ac_prev=mandir ;;
875 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
876 mandir=$ac_optarg ;;
877
878 -nfp | --nfp | --nf)
879 # Obsolete; use --without-fp.
880 with_fp=no ;;
881
882 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
883 | --no-cr | --no-c | -n)
884 no_create=yes ;;
885
886 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
887 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
888 no_recursion=yes ;;
889
890 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
891 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
892 | --oldin | --oldi | --old | --ol | --o)
893 ac_prev=oldincludedir ;;
894 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
895 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
896 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
897 oldincludedir=$ac_optarg ;;
898
899 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
900 ac_prev=prefix ;;
901 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
902 prefix=$ac_optarg ;;
903
904 -program-prefix | --program-prefix | --program-prefi | --program-pref \
905 | --program-pre | --program-pr | --program-p)
906 ac_prev=program_prefix ;;
907 -program-prefix=* | --program-prefix=* | --program-prefi=* \
908 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
909 program_prefix=$ac_optarg ;;
910
911 -program-suffix | --program-suffix | --program-suffi | --program-suff \
912 | --program-suf | --program-su | --program-s)
913 ac_prev=program_suffix ;;
914 -program-suffix=* | --program-suffix=* | --program-suffi=* \
915 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
916 program_suffix=$ac_optarg ;;
917
918 -program-transform-name | --program-transform-name \
919 | --program-transform-nam | --program-transform-na \
920 | --program-transform-n | --program-transform- \
921 | --program-transform | --program-transfor \
922 | --program-transfo | --program-transf \
923 | --program-trans | --program-tran \
924 | --progr-tra | --program-tr | --program-t)
925 ac_prev=program_transform_name ;;
926 -program-transform-name=* | --program-transform-name=* \
927 | --program-transform-nam=* | --program-transform-na=* \
928 | --program-transform-n=* | --program-transform-=* \
929 | --program-transform=* | --program-transfor=* \
930 | --program-transfo=* | --program-transf=* \
931 | --program-trans=* | --program-tran=* \
932 | --progr-tra=* | --program-tr=* | --program-t=*)
933 program_transform_name=$ac_optarg ;;
934
935 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
936 ac_prev=pdfdir ;;
937 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
938 pdfdir=$ac_optarg ;;
939
940 -psdir | --psdir | --psdi | --psd | --ps)
941 ac_prev=psdir ;;
942 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
943 psdir=$ac_optarg ;;
944
945 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
946 | -silent | --silent | --silen | --sile | --sil)
947 silent=yes ;;
948
949 -runstatedir | --runstatedir | --runstatedi | --runstated \
950 | --runstate | --runstat | --runsta | --runst | --runs \
951 | --run | --ru | --r)
952 ac_prev=runstatedir ;;
953 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
954 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
955 | --run=* | --ru=* | --r=*)
956 runstatedir=$ac_optarg ;;
957
958 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
959 ac_prev=sbindir ;;
960 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
961 | --sbi=* | --sb=*)
962 sbindir=$ac_optarg ;;
963
964 -sharedstatedir | --sharedstatedir | --sharedstatedi \
965 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
966 | --sharedst | --shareds | --shared | --share | --shar \
967 | --sha | --sh)
968 ac_prev=sharedstatedir ;;
969 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
970 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
971 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
972 | --sha=* | --sh=*)
973 sharedstatedir=$ac_optarg ;;
974
975 -site | --site | --sit)
976 ac_prev=site ;;
977 -site=* | --site=* | --sit=*)
978 site=$ac_optarg ;;
979
980 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
981 ac_prev=srcdir ;;
982 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
983 srcdir=$ac_optarg ;;
984
985 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
986 | --syscon | --sysco | --sysc | --sys | --sy)
987 ac_prev=sysconfdir ;;
988 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
989 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
990 sysconfdir=$ac_optarg ;;
991
992 -target | --target | --targe | --targ | --tar | --ta | --t)
993 ac_prev=target_alias ;;
994 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
995 target_alias=$ac_optarg ;;
996
997 -v | -verbose | --verbose | --verbos | --verbo | --verb)
998 verbose=yes ;;
999
1000 -version | --version | --versio | --versi | --vers | -V)
1001 ac_init_version=: ;;
1002
1003 -with-* | --with-*)
1004 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1005 # Reject names that are not valid shell variable names.
1006 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1007 as_fn_error $? "invalid package name: $ac_useropt"
1008 ac_useropt_orig=$ac_useropt
1009 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1010 case $ac_user_opts in
1011 *"
1012 "with_$ac_useropt"
1013 "*) ;;
1014 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1015 ac_unrecognized_sep=', ';;
1016 esac
1017 eval with_$ac_useropt=\$ac_optarg ;;
1018
1019 -without-* | --without-*)
1020 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1021 # Reject names that are not valid shell variable names.
1022 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1023 as_fn_error $? "invalid package name: $ac_useropt"
1024 ac_useropt_orig=$ac_useropt
1025 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1026 case $ac_user_opts in
1027 *"
1028 "with_$ac_useropt"
1029 "*) ;;
1030 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1031 ac_unrecognized_sep=', ';;
1032 esac
1033 eval with_$ac_useropt=no ;;
1034
1035 --x)
1036 # Obsolete; use --with-x.
1037 with_x=yes ;;
1038
1039 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1040 | --x-incl | --x-inc | --x-in | --x-i)
1041 ac_prev=x_includes ;;
1042 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1043 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1044 x_includes=$ac_optarg ;;
1045
1046 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1047 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1048 ac_prev=x_libraries ;;
1049 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1050 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1051 x_libraries=$ac_optarg ;;
1052
1053 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1054 Try \`$0 --help' for more information"
1055 ;;
1056
1057 *=*)
1058 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1059 # Reject names that are not valid shell variable names.
1060 case $ac_envvar in #(
1061 '' | [0-9]* | *[!_$as_cr_alnum]* )
1062 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1063 esac
1064 eval $ac_envvar=\$ac_optarg
1065 export $ac_envvar ;;
1066
1067 *)
1068 # FIXME: should be removed in autoconf 3.0.
1069 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1070 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1071 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1072 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1073 ;;
1074
1075 esac
1076 done
1077
1078 if test -n "$ac_prev"; then
1079 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1080 as_fn_error $? "missing argument to $ac_option"
1081 fi
1082
1083 if test -n "$ac_unrecognized_opts"; then
1084 case $enable_option_checking in
1085 no) ;;
1086 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1087 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1088 esac
1089 fi
1090
1091 # Check all directory arguments for consistency.
1092 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1093 datadir sysconfdir sharedstatedir localstatedir includedir \
1094 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1095 libdir localedir mandir runstatedir
1096 do
1097 eval ac_val=\$$ac_var
1098 # Remove trailing slashes.
1099 case $ac_val in
1100 */ )
1101 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1102 eval $ac_var=\$ac_val;;
1103 esac
1104 # Be sure to have absolute directory names.
1105 case $ac_val in
1106 [\\/$]* | ?:[\\/]* ) continue;;
1107 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1108 esac
1109 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1110 done
1111
1112 # There might be people who depend on the old broken behavior: `$host'
1113 # used to hold the argument of --host etc.
1114 # FIXME: To remove some day.
1115 build=$build_alias
1116 host=$host_alias
1117 target=$target_alias
1118
1119 # FIXME: To remove some day.
1120 if test "x$host_alias" != x; then
1121 if test "x$build_alias" = x; then
1122 cross_compiling=maybe
1123 elif test "x$build_alias" != "x$host_alias"; then
1124 cross_compiling=yes
1125 fi
1126 fi
1127
1128 ac_tool_prefix=
1129 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1130
1131 test "$silent" = yes && exec 6>/dev/null
1132
1133
1134 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1135 ac_ls_di=`ls -di .` &&
1136 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1137 as_fn_error $? "working directory cannot be determined"
1138 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1139 as_fn_error $? "pwd does not report name of working directory"
1140
1141
1142 # Find the source files, if location was not specified.
1143 if test -z "$srcdir"; then
1144 ac_srcdir_defaulted=yes
1145 # Try the directory containing this script, then the parent directory.
1146 ac_confdir=`$as_dirname -- "$as_myself" ||
1147 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1148 X"$as_myself" : 'X\(//\)[^/]' \| \
1149 X"$as_myself" : 'X\(//\)$' \| \
1150 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1151 $as_echo X"$as_myself" |
1152 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1153 s//\1/
1154 q
1155 }
1156 /^X\(\/\/\)[^/].*/{
1157 s//\1/
1158 q
1159 }
1160 /^X\(\/\/\)$/{
1161 s//\1/
1162 q
1163 }
1164 /^X\(\/\).*/{
1165 s//\1/
1166 q
1167 }
1168 s/.*/./; q'`
1169 srcdir=$ac_confdir
1170 if test ! -r "$srcdir/$ac_unique_file"; then
1171 srcdir=..
1172 fi
1173 else
1174 ac_srcdir_defaulted=no
1175 fi
1176 if test ! -r "$srcdir/$ac_unique_file"; then
1177 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1178 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1179 fi
1180 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1181 ac_abs_confdir=`(
1182 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1183 pwd)`
1184 # When building in place, set srcdir=.
1185 if test "$ac_abs_confdir" = "$ac_pwd"; then
1186 srcdir=.
1187 fi
1188 # Remove unnecessary trailing slashes from srcdir.
1189 # Double slashes in file names in object file debugging info
1190 # mess up M-x gdb in Emacs.
1191 case $srcdir in
1192 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1193 esac
1194 for ac_var in $ac_precious_vars; do
1195 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1196 eval ac_env_${ac_var}_value=\$${ac_var}
1197 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1198 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1199 done
1200
1201 #
1202 # Report the --help message.
1203 #
1204 if test "$ac_init_help" = "long"; then
1205 # Omit some internal or obsolete options to make the list less imposing.
1206 # This message is too long to be a string in the A/UX 3.1 sh.
1207 cat <<_ACEOF
1208 \`configure' configures ocp-indent 1.6.1 to adapt to many kinds of systems.
1209
1210 Usage: $0 [OPTION]... [VAR=VALUE]...
1211
1212 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1213 VAR=VALUE. See below for descriptions of some of the useful variables.
1214
1215 Defaults for the options are specified in brackets.
1216
1217 Configuration:
1218 -h, --help display this help and exit
1219 --help=short display options specific to this package
1220 --help=recursive display the short help of all the included packages
1221 -V, --version display version information and exit
1222 -q, --quiet, --silent do not print \`checking ...' messages
1223 --cache-file=FILE cache test results in FILE [disabled]
1224 -C, --config-cache alias for \`--cache-file=config.cache'
1225 -n, --no-create do not create output files
1226 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1227
1228 Installation directories:
1229 --prefix=PREFIX install architecture-independent files in PREFIX
1230 [$ac_default_prefix]
1231 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1232 [PREFIX]
1233
1234 By default, \`make install' will install all the files in
1235 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1236 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1237 for instance \`--prefix=\$HOME'.
1238
1239 For better control, use the options below.
1240
1241 Fine tuning of the installation directories:
1242 --bindir=DIR user executables [EPREFIX/bin]
1243 --sbindir=DIR system admin executables [EPREFIX/sbin]
1244 --libexecdir=DIR program executables [EPREFIX/libexec]
1245 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1246 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1247 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1248 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1249 --libdir=DIR object code libraries [EPREFIX/lib]
1250 --includedir=DIR C header files [PREFIX/include]
1251 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1252 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1253 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1254 --infodir=DIR info documentation [DATAROOTDIR/info]
1255 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1256 --mandir=DIR man documentation [DATAROOTDIR/man]
1257 --docdir=DIR documentation root [DATAROOTDIR/doc/ocp-indent]
1258 --htmldir=DIR html documentation [DOCDIR]
1259 --dvidir=DIR dvi documentation [DOCDIR]
1260 --pdfdir=DIR pdf documentation [DOCDIR]
1261 --psdir=DIR ps documentation [DOCDIR]
1262 _ACEOF
1263
1264 cat <<\_ACEOF
1265 _ACEOF
1266 fi
1267
1268 if test -n "$ac_init_help"; then
1269 case $ac_init_help in
1270 short | recursive ) echo "Configuration of ocp-indent 1.6.1:";;
1271 esac
1272 cat <<\_ACEOF
1273
1274 Some influential environment variables:
1275 CC C compiler command
1276 CFLAGS C compiler flags
1277 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1278 nonstandard directory <lib dir>
1279 LIBS libraries to pass to the linker, e.g. -l<library>
1280 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1281 you have headers in a nonstandard directory <include dir>
1282
1283 Use these variables to override the choices made by `configure' or to help
1284 it to find libraries and programs with nonstandard names/locations.
1285
1286 Report bugs to the package provider.
1287 _ACEOF
1288 ac_status=$?
1289 fi
1290
1291 if test "$ac_init_help" = "recursive"; then
1292 # If there are subdirs, report their specific --help.
1293 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1294 test -d "$ac_dir" ||
1295 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1296 continue
1297 ac_builddir=.
1298
1299 case "$ac_dir" in
1300 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1301 *)
1302 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1303 # A ".." for each directory in $ac_dir_suffix.
1304 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1305 case $ac_top_builddir_sub in
1306 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1307 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1308 esac ;;
1309 esac
1310 ac_abs_top_builddir=$ac_pwd
1311 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1312 # for backward compatibility:
1313 ac_top_builddir=$ac_top_build_prefix
1314
1315 case $srcdir in
1316 .) # We are building in place.
1317 ac_srcdir=.
1318 ac_top_srcdir=$ac_top_builddir_sub
1319 ac_abs_top_srcdir=$ac_pwd ;;
1320 [\\/]* | ?:[\\/]* ) # Absolute name.
1321 ac_srcdir=$srcdir$ac_dir_suffix;
1322 ac_top_srcdir=$srcdir
1323 ac_abs_top_srcdir=$srcdir ;;
1324 *) # Relative name.
1325 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1326 ac_top_srcdir=$ac_top_build_prefix$srcdir
1327 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1328 esac
1329 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1330
1331 cd "$ac_dir" || { ac_status=$?; continue; }
1332 # Check for guested configure.
1333 if test -f "$ac_srcdir/configure.gnu"; then
1334 echo &&
1335 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1336 elif test -f "$ac_srcdir/configure"; then
1337 echo &&
1338 $SHELL "$ac_srcdir/configure" --help=recursive
1339 else
1340 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1341 fi || ac_status=$?
1342 cd "$ac_pwd" || { ac_status=$?; break; }
1343 done
1344 fi
1345
1346 test -n "$ac_init_help" && exit $ac_status
1347 if $ac_init_version; then
1348 cat <<\_ACEOF
1349 ocp-indent configure 1.6.1
1350 generated by GNU Autoconf 2.69
1351
1352 Copyright (C) 2012 Free Software Foundation, Inc.
1353 This configure script is free software; the Free Software Foundation
1354 gives unlimited permission to copy, distribute and modify it.
1355
1356 Copyright 2013-2017 OcamlPro SAS
1357 _ACEOF
1358 exit
1359 fi
1360
1361 ## ------------------------ ##
1362 ## Autoconf initialization. ##
1363 ## ------------------------ ##
1364
1365 # ac_fn_c_try_compile LINENO
1366 # --------------------------
1367 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1368 ac_fn_c_try_compile ()
1369 {
1370 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1371 rm -f conftest.$ac_objext
1372 if { { ac_try="$ac_compile"
1373 case "(($ac_try" in
1374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1375 *) ac_try_echo=$ac_try;;
1376 esac
1377 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1378 $as_echo "$ac_try_echo"; } >&5
1379 (eval "$ac_compile") 2>conftest.err
1380 ac_status=$?
1381 if test -s conftest.err; then
1382 grep -v '^ *+' conftest.err >conftest.er1
1383 cat conftest.er1 >&5
1384 mv -f conftest.er1 conftest.err
1385 fi
1386 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1387 test $ac_status = 0; } && {
1388 test -z "$ac_c_werror_flag" ||
1389 test ! -s conftest.err
1390 } && test -s conftest.$ac_objext; then :
1391 ac_retval=0
1392 else
1393 $as_echo "$as_me: failed program was:" >&5
1394 sed 's/^/| /' conftest.$ac_ext >&5
1395
1396 ac_retval=1
1397 fi
1398 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1399 as_fn_set_status $ac_retval
1400
1401 } # ac_fn_c_try_compile
1402 cat >config.log <<_ACEOF
1403 This file contains any messages produced by compilers while
1404 running configure, to aid debugging if configure makes a mistake.
1405
1406 It was created by ocp-indent $as_me 1.6.1, which was
1407 generated by GNU Autoconf 2.69. Invocation command line was
1408
1409 $ $0 $@
1410
1411 _ACEOF
1412 exec 5>>config.log
1413 {
1414 cat <<_ASUNAME
1415 ## --------- ##
1416 ## Platform. ##
1417 ## --------- ##
1418
1419 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1420 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1421 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1422 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1423 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1424
1425 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1426 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1427
1428 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1429 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1430 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1431 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1432 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1433 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1434 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1435
1436 _ASUNAME
1437
1438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1439 for as_dir in $PATH
1440 do
1441 IFS=$as_save_IFS
1442 test -z "$as_dir" && as_dir=.
1443 $as_echo "PATH: $as_dir"
1444 done
1445 IFS=$as_save_IFS
1446
1447 } >&5
1448
1449 cat >&5 <<_ACEOF
1450
1451
1452 ## ----------- ##
1453 ## Core tests. ##
1454 ## ----------- ##
1455
1456 _ACEOF
1457
1458
1459 # Keep a trace of the command line.
1460 # Strip out --no-create and --no-recursion so they do not pile up.
1461 # Strip out --silent because we don't want to record it for future runs.
1462 # Also quote any args containing shell meta-characters.
1463 # Make two passes to allow for proper duplicate-argument suppression.
1464 ac_configure_args=
1465 ac_configure_args0=
1466 ac_configure_args1=
1467 ac_must_keep_next=false
1468 for ac_pass in 1 2
1469 do
1470 for ac_arg
1471 do
1472 case $ac_arg in
1473 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1474 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1475 | -silent | --silent | --silen | --sile | --sil)
1476 continue ;;
1477 *\'*)
1478 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1479 esac
1480 case $ac_pass in
1481 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1482 2)
1483 as_fn_append ac_configure_args1 " '$ac_arg'"
1484 if test $ac_must_keep_next = true; then
1485 ac_must_keep_next=false # Got value, back to normal.
1486 else
1487 case $ac_arg in
1488 *=* | --config-cache | -C | -disable-* | --disable-* \
1489 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1490 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1491 | -with-* | --with-* | -without-* | --without-* | --x)
1492 case "$ac_configure_args0 " in
1493 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1494 esac
1495 ;;
1496 -* ) ac_must_keep_next=true ;;
1497 esac
1498 fi
1499 as_fn_append ac_configure_args " '$ac_arg'"
1500 ;;
1501 esac
1502 done
1503 done
1504 { ac_configure_args0=; unset ac_configure_args0;}
1505 { ac_configure_args1=; unset ac_configure_args1;}
1506
1507 # When interrupted or exit'd, cleanup temporary files, and complete
1508 # config.log. We remove comments because anyway the quotes in there
1509 # would cause problems or look ugly.
1510 # WARNING: Use '\'' to represent an apostrophe within the trap.
1511 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1512 trap 'exit_status=$?
1513 # Save into config.log some information that might help in debugging.
1514 {
1515 echo
1516
1517 $as_echo "## ---------------- ##
1518 ## Cache variables. ##
1519 ## ---------------- ##"
1520 echo
1521 # The following way of writing the cache mishandles newlines in values,
1522 (
1523 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1524 eval ac_val=\$$ac_var
1525 case $ac_val in #(
1526 *${as_nl}*)
1527 case $ac_var in #(
1528 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1529 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1530 esac
1531 case $ac_var in #(
1532 _ | IFS | as_nl) ;; #(
1533 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1534 *) { eval $ac_var=; unset $ac_var;} ;;
1535 esac ;;
1536 esac
1537 done
1538 (set) 2>&1 |
1539 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1540 *${as_nl}ac_space=\ *)
1541 sed -n \
1542 "s/'\''/'\''\\\\'\'''\''/g;
1543 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1544 ;; #(
1545 *)
1546 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1547 ;;
1548 esac |
1549 sort
1550 )
1551 echo
1552
1553 $as_echo "## ----------------- ##
1554 ## Output variables. ##
1555 ## ----------------- ##"
1556 echo
1557 for ac_var in $ac_subst_vars
1558 do
1559 eval ac_val=\$$ac_var
1560 case $ac_val in
1561 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1562 esac
1563 $as_echo "$ac_var='\''$ac_val'\''"
1564 done | sort
1565 echo
1566
1567 if test -n "$ac_subst_files"; then
1568 $as_echo "## ------------------- ##
1569 ## File substitutions. ##
1570 ## ------------------- ##"
1571 echo
1572 for ac_var in $ac_subst_files
1573 do
1574 eval ac_val=\$$ac_var
1575 case $ac_val in
1576 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1577 esac
1578 $as_echo "$ac_var='\''$ac_val'\''"
1579 done | sort
1580 echo
1581 fi
1582
1583 if test -s confdefs.h; then
1584 $as_echo "## ----------- ##
1585 ## confdefs.h. ##
1586 ## ----------- ##"
1587 echo
1588 cat confdefs.h
1589 echo
1590 fi
1591 test "$ac_signal" != 0 &&
1592 $as_echo "$as_me: caught signal $ac_signal"
1593 $as_echo "$as_me: exit $exit_status"
1594 } >&5
1595 rm -f core *.core core.conftest.* &&
1596 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1597 exit $exit_status
1598 ' 0
1599 for ac_signal in 1 2 13 15; do
1600 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
1601 done
1602 ac_signal=0
1603
1604 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1605 rm -f -r conftest* confdefs.h
1606
1607 $as_echo "/* confdefs.h */" > confdefs.h
1608
1609 # Predefined preprocessor variables.
1610
1611 cat >>confdefs.h <<_ACEOF
1612 #define PACKAGE_NAME "$PACKAGE_NAME"
1613 _ACEOF
1614
1615 cat >>confdefs.h <<_ACEOF
1616 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1617 _ACEOF
1618
1619 cat >>confdefs.h <<_ACEOF
1620 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1621 _ACEOF
1622
1623 cat >>confdefs.h <<_ACEOF
1624 #define PACKAGE_STRING "$PACKAGE_STRING"
1625 _ACEOF
1626
1627 cat >>confdefs.h <<_ACEOF
1628 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1629 _ACEOF
1630
1631 cat >>confdefs.h <<_ACEOF
1632 #define PACKAGE_URL "$PACKAGE_URL"
1633 _ACEOF
1634
1635
1636 # Let the site file select an alternate cache file if it wants to.
1637 # Prefer an explicitly selected file to automatically selected ones.
1638 ac_site_file1=NONE
1639 ac_site_file2=NONE
1640 if test -n "$CONFIG_SITE"; then
1641 # We do not want a PATH search for config.site.
1642 case $CONFIG_SITE in #((
1643 -*) ac_site_file1=./$CONFIG_SITE;;
1644 */*) ac_site_file1=$CONFIG_SITE;;
1645 *) ac_site_file1=./$CONFIG_SITE;;
1646 esac
1647 elif test "x$prefix" != xNONE; then
1648 ac_site_file1=$prefix/share/config.site
1649 ac_site_file2=$prefix/etc/config.site
1650 else
1651 ac_site_file1=$ac_default_prefix/share/config.site
1652 ac_site_file2=$ac_default_prefix/etc/config.site
1653 fi
1654 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1655 do
1656 test "x$ac_site_file" = xNONE && continue
1657 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
1659 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1660 sed 's/^/| /' "$ac_site_file" >&5
1661 . "$ac_site_file" \
1662 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1663 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1664 as_fn_error $? "failed to load site script $ac_site_file
1665 See \`config.log' for more details" "$LINENO" 5; }
1666 fi
1667 done
1668
1669 if test -r "$cache_file"; then
1670 # Some versions of bash will fail to source /dev/null (special files
1671 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
1672 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
1673 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
1674 $as_echo "$as_me: loading cache $cache_file" >&6;}
1675 case $cache_file in
1676 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1677 *) . "./$cache_file";;
1678 esac
1679 fi
1680 else
1681 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
1682 $as_echo "$as_me: creating cache $cache_file" >&6;}
1683 >$cache_file
1684 fi
1685
1686 # Check that the precious variables saved in the cache have kept the same
1687 # value.
1688 ac_cache_corrupted=false
1689 for ac_var in $ac_precious_vars; do
1690 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1691 eval ac_new_set=\$ac_env_${ac_var}_set
1692 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1693 eval ac_new_val=\$ac_env_${ac_var}_value
1694 case $ac_old_set,$ac_new_set in
1695 set,)
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1697 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1698 ac_cache_corrupted=: ;;
1699 ,set)
1700 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
1701 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1702 ac_cache_corrupted=: ;;
1703 ,);;
1704 *)
1705 if test "x$ac_old_val" != "x$ac_new_val"; then
1706 # differences in whitespace do not lead to failure.
1707 ac_old_val_w=`echo x $ac_old_val`
1708 ac_new_val_w=`echo x $ac_new_val`
1709 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1710 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
1711 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1712 ac_cache_corrupted=:
1713 else
1714 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1715 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1716 eval $ac_var=\$ac_old_val
1717 fi
1718 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
1719 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
1720 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
1721 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
1722 fi;;
1723 esac
1724 # Pass precious variables to config.status.
1725 if test "$ac_new_set" = set; then
1726 case $ac_new_val in
1727 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1728 *) ac_arg=$ac_var=$ac_new_val ;;
1729 esac
1730 case " $ac_configure_args " in
1731 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1732 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
1733 esac
1734 fi
1735 done
1736 if $ac_cache_corrupted; then
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1738 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
1740 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1741 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
1742 fi
1743 ## -------------------- ##
1744 ## Main body of script. ##
1745 ## -------------------- ##
1746
1747 ac_ext=c
1748 ac_cpp='$CPP $CPPFLAGS'
1749 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1750 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1751 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1752
1753
1754
1755
1756
1757 ac_ext=c
1758 ac_cpp='$CPP $CPPFLAGS'
1759 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1760 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1761 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1762 if test -n "$ac_tool_prefix"; then
1763 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1764 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1766 $as_echo_n "checking for $ac_word... " >&6; }
1767 if ${ac_cv_prog_CC+:} false; then :
1768 $as_echo_n "(cached) " >&6
1769 else
1770 if test -n "$CC"; then
1771 ac_cv_prog_CC="$CC" # Let the user override the test.
1772 else
1773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1774 for as_dir in $PATH
1775 do
1776 IFS=$as_save_IFS
1777 test -z "$as_dir" && as_dir=.
1778 for ac_exec_ext in '' $ac_executable_extensions; do
1779 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1780 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1781 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1782 break 2
1783 fi
1784 done
1785 done
1786 IFS=$as_save_IFS
1787
1788 fi
1789 fi
1790 CC=$ac_cv_prog_CC
1791 if test -n "$CC"; then
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
1793 $as_echo "$CC" >&6; }
1794 else
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1796 $as_echo "no" >&6; }
1797 fi
1798
1799
1800 fi
1801 if test -z "$ac_cv_prog_CC"; then
1802 ac_ct_CC=$CC
1803 # Extract the first word of "gcc", so it can be a program name with args.
1804 set dummy gcc; ac_word=$2
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1806 $as_echo_n "checking for $ac_word... " >&6; }
1807 if ${ac_cv_prog_ac_ct_CC+:} false; then :
1808 $as_echo_n "(cached) " >&6
1809 else
1810 if test -n "$ac_ct_CC"; then
1811 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1812 else
1813 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1814 for as_dir in $PATH
1815 do
1816 IFS=$as_save_IFS
1817 test -z "$as_dir" && as_dir=.
1818 for ac_exec_ext in '' $ac_executable_extensions; do
1819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1820 ac_cv_prog_ac_ct_CC="gcc"
1821 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1822 break 2
1823 fi
1824 done
1825 done
1826 IFS=$as_save_IFS
1827
1828 fi
1829 fi
1830 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1831 if test -n "$ac_ct_CC"; then
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
1833 $as_echo "$ac_ct_CC" >&6; }
1834 else
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1836 $as_echo "no" >&6; }
1837 fi
1838
1839 if test "x$ac_ct_CC" = x; then
1840 CC=""
1841 else
1842 case $cross_compiling:$ac_tool_warned in
1843 yes:)
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
1845 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1846 ac_tool_warned=yes ;;
1847 esac
1848 CC=$ac_ct_CC
1849 fi
1850 else
1851 CC="$ac_cv_prog_CC"
1852 fi
1853
1854 if test -z "$CC"; then
1855 if test -n "$ac_tool_prefix"; then
1856 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1857 set dummy ${ac_tool_prefix}cc; ac_word=$2
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1859 $as_echo_n "checking for $ac_word... " >&6; }
1860 if ${ac_cv_prog_CC+:} false; then :
1861 $as_echo_n "(cached) " >&6
1862 else
1863 if test -n "$CC"; then
1864 ac_cv_prog_CC="$CC" # Let the user override the test.
1865 else
1866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1867 for as_dir in $PATH
1868 do
1869 IFS=$as_save_IFS
1870 test -z "$as_dir" && as_dir=.
1871 for ac_exec_ext in '' $ac_executable_extensions; do
1872 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1873 ac_cv_prog_CC="${ac_tool_prefix}cc"
1874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1875 break 2
1876 fi
1877 done
1878 done
1879 IFS=$as_save_IFS
1880
1881 fi
1882 fi
1883 CC=$ac_cv_prog_CC
1884 if test -n "$CC"; then
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
1886 $as_echo "$CC" >&6; }
1887 else
1888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1889 $as_echo "no" >&6; }
1890 fi
1891
1892
1893 fi
1894 fi
1895 if test -z "$CC"; then
1896 # Extract the first word of "cc", so it can be a program name with args.
1897 set dummy cc; ac_word=$2
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1899 $as_echo_n "checking for $ac_word... " >&6; }
1900 if ${ac_cv_prog_CC+:} false; then :
1901 $as_echo_n "(cached) " >&6
1902 else
1903 if test -n "$CC"; then
1904 ac_cv_prog_CC="$CC" # Let the user override the test.
1905 else
1906 ac_prog_rejected=no
1907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1908 for as_dir in $PATH
1909 do
1910 IFS=$as_save_IFS
1911 test -z "$as_dir" && as_dir=.
1912 for ac_exec_ext in '' $ac_executable_extensions; do
1913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1914 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1915 ac_prog_rejected=yes
1916 continue
1917 fi
1918 ac_cv_prog_CC="cc"
1919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1920 break 2
1921 fi
1922 done
1923 done
1924 IFS=$as_save_IFS
1925
1926 if test $ac_prog_rejected = yes; then
1927 # We found a bogon in the path, so make sure we never use it.
1928 set dummy $ac_cv_prog_CC
1929 shift
1930 if test $# != 0; then
1931 # We chose a different compiler from the bogus one.
1932 # However, it has the same basename, so the bogon will be chosen
1933 # first if we set CC to just the basename; use the full file name.
1934 shift
1935 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1936 fi
1937 fi
1938 fi
1939 fi
1940 CC=$ac_cv_prog_CC
1941 if test -n "$CC"; then
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
1943 $as_echo "$CC" >&6; }
1944 else
1945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1946 $as_echo "no" >&6; }
1947 fi
1948
1949
1950 fi
1951 if test -z "$CC"; then
1952 if test -n "$ac_tool_prefix"; then
1953 for ac_prog in cl.exe
1954 do
1955 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1956 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1958 $as_echo_n "checking for $ac_word... " >&6; }
1959 if ${ac_cv_prog_CC+:} false; then :
1960 $as_echo_n "(cached) " >&6
1961 else
1962 if test -n "$CC"; then
1963 ac_cv_prog_CC="$CC" # Let the user override the test.
1964 else
1965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1966 for as_dir in $PATH
1967 do
1968 IFS=$as_save_IFS
1969 test -z "$as_dir" && as_dir=.
1970 for ac_exec_ext in '' $ac_executable_extensions; do
1971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1972 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1974 break 2
1975 fi
1976 done
1977 done
1978 IFS=$as_save_IFS
1979
1980 fi
1981 fi
1982 CC=$ac_cv_prog_CC
1983 if test -n "$CC"; then
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
1985 $as_echo "$CC" >&6; }
1986 else
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1988 $as_echo "no" >&6; }
1989 fi
1990
1991
1992 test -n "$CC" && break
1993 done
1994 fi
1995 if test -z "$CC"; then
1996 ac_ct_CC=$CC
1997 for ac_prog in cl.exe
1998 do
1999 # Extract the first word of "$ac_prog", so it can be a program name with args.
2000 set dummy $ac_prog; ac_word=$2
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2002 $as_echo_n "checking for $ac_word... " >&6; }
2003 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2004 $as_echo_n "(cached) " >&6
2005 else
2006 if test -n "$ac_ct_CC"; then
2007 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2008 else
2009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2010 for as_dir in $PATH
2011 do
2012 IFS=$as_save_IFS
2013 test -z "$as_dir" && as_dir=.
2014 for ac_exec_ext in '' $ac_executable_extensions; do
2015 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2016 ac_cv_prog_ac_ct_CC="$ac_prog"
2017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2018 break 2
2019 fi
2020 done
2021 done
2022 IFS=$as_save_IFS
2023
2024 fi
2025 fi
2026 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2027 if test -n "$ac_ct_CC"; then
2028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2029 $as_echo "$ac_ct_CC" >&6; }
2030 else
2031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2032 $as_echo "no" >&6; }
2033 fi
2034
2035
2036 test -n "$ac_ct_CC" && break
2037 done
2038
2039 if test "x$ac_ct_CC" = x; then
2040 CC=""
2041 else
2042 case $cross_compiling:$ac_tool_warned in
2043 yes:)
2044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2045 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2046 ac_tool_warned=yes ;;
2047 esac
2048 CC=$ac_ct_CC
2049 fi
2050 fi
2051
2052 fi
2053
2054
2055 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2056 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2057 as_fn_error $? "no acceptable C compiler found in \$PATH
2058 See \`config.log' for more details" "$LINENO" 5; }
2059
2060 # Provide some information about the compiler.
2061 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2062 set X $ac_compile
2063 ac_compiler=$2
2064 for ac_option in --version -v -V -qversion; do
2065 { { ac_try="$ac_compiler $ac_option >&5"
2066 case "(($ac_try" in
2067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2068 *) ac_try_echo=$ac_try;;
2069 esac
2070 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2071 $as_echo "$ac_try_echo"; } >&5
2072 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2073 ac_status=$?
2074 if test -s conftest.err; then
2075 sed '10a\
2076 ... rest of stderr output deleted ...
2077 10q' conftest.err >conftest.er1
2078 cat conftest.er1 >&5
2079 fi
2080 rm -f conftest.er1 conftest.err
2081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2082 test $ac_status = 0; }
2083 done
2084
2085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086 /* end confdefs.h. */
2087
2088 int
2089 main ()
2090 {
2091
2092 ;
2093 return 0;
2094 }
2095 _ACEOF
2096 ac_clean_files_save=$ac_clean_files
2097 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2098 # Try to create an executable without -o first, disregard a.out.
2099 # It will help us diagnose broken compilers, and finding out an intuition
2100 # of exeext.
2101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2102 $as_echo_n "checking whether the C compiler works... " >&6; }
2103 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2104
2105 # The possible output files:
2106 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2107
2108 ac_rmfiles=
2109 for ac_file in $ac_files
2110 do
2111 case $ac_file in
2112 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2113 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2114 esac
2115 done
2116 rm -f $ac_rmfiles
2117
2118 if { { ac_try="$ac_link_default"
2119 case "(($ac_try" in
2120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2121 *) ac_try_echo=$ac_try;;
2122 esac
2123 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2124 $as_echo "$ac_try_echo"; } >&5
2125 (eval "$ac_link_default") 2>&5
2126 ac_status=$?
2127 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2128 test $ac_status = 0; }; then :
2129 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2130 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2131 # in a Makefile. We should not override ac_cv_exeext if it was cached,
2132 # so that the user can short-circuit this test for compilers unknown to
2133 # Autoconf.
2134 for ac_file in $ac_files ''
2135 do
2136 test -f "$ac_file" || continue
2137 case $ac_file in
2138 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2139 ;;
2140 [ab].out )
2141 # We found the default executable, but exeext='' is most
2142 # certainly right.
2143 break;;
2144 *.* )
2145 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2146 then :; else
2147 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2148 fi
2149 # We set ac_cv_exeext here because the later test for it is not
2150 # safe: cross compilers may not add the suffix if given an `-o'
2151 # argument, so we may need to know it at that point already.
2152 # Even if this section looks crufty: it has the advantage of
2153 # actually working.
2154 break;;
2155 * )
2156 break;;
2157 esac
2158 done
2159 test "$ac_cv_exeext" = no && ac_cv_exeext=
2160
2161 else
2162 ac_file=''
2163 fi
2164 if test -z "$ac_file"; then :
2165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2166 $as_echo "no" >&6; }
2167 $as_echo "$as_me: failed program was:" >&5
2168 sed 's/^/| /' conftest.$ac_ext >&5
2169
2170 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2171 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2172 as_fn_error 77 "C compiler cannot create executables
2173 See \`config.log' for more details" "$LINENO" 5; }
2174 else
2175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2176 $as_echo "yes" >&6; }
2177 fi
2178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2179 $as_echo_n "checking for C compiler default output file name... " >&6; }
2180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2181 $as_echo "$ac_file" >&6; }
2182 ac_exeext=$ac_cv_exeext
2183
2184 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2185 ac_clean_files=$ac_clean_files_save
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2187 $as_echo_n "checking for suffix of executables... " >&6; }
2188 if { { ac_try="$ac_link"
2189 case "(($ac_try" in
2190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2191 *) ac_try_echo=$ac_try;;
2192 esac
2193 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2194 $as_echo "$ac_try_echo"; } >&5
2195 (eval "$ac_link") 2>&5
2196 ac_status=$?
2197 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2198 test $ac_status = 0; }; then :
2199 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2200 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2201 # work properly (i.e., refer to `conftest.exe'), while it won't with
2202 # `rm'.
2203 for ac_file in conftest.exe conftest conftest.*; do
2204 test -f "$ac_file" || continue
2205 case $ac_file in
2206 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2207 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2208 break;;
2209 * ) break;;
2210 esac
2211 done
2212 else
2213 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2214 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2215 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2216 See \`config.log' for more details" "$LINENO" 5; }
2217 fi
2218 rm -f conftest conftest$ac_cv_exeext
2219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2220 $as_echo "$ac_cv_exeext" >&6; }
2221
2222 rm -f conftest.$ac_ext
2223 EXEEXT=$ac_cv_exeext
2224 ac_exeext=$EXEEXT
2225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2226 /* end confdefs.h. */
2227 #include <stdio.h>
2228 int
2229 main ()
2230 {
2231 FILE *f = fopen ("conftest.out", "w");
2232 return ferror (f) || fclose (f) != 0;
2233
2234 ;
2235 return 0;
2236 }
2237 _ACEOF
2238 ac_clean_files="$ac_clean_files conftest.out"
2239 # Check that the compiler produces executables we can run. If not, either
2240 # the compiler is broken, or we cross compile.
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
2242 $as_echo_n "checking whether we are cross compiling... " >&6; }
2243 if test "$cross_compiling" != yes; then
2244 { { ac_try="$ac_link"
2245 case "(($ac_try" in
2246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2247 *) ac_try_echo=$ac_try;;
2248 esac
2249 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2250 $as_echo "$ac_try_echo"; } >&5
2251 (eval "$ac_link") 2>&5
2252 ac_status=$?
2253 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2254 test $ac_status = 0; }
2255 if { ac_try='./conftest$ac_cv_exeext'
2256 { { case "(($ac_try" in
2257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2258 *) ac_try_echo=$ac_try;;
2259 esac
2260 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2261 $as_echo "$ac_try_echo"; } >&5
2262 (eval "$ac_try") 2>&5
2263 ac_status=$?
2264 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2265 test $ac_status = 0; }; }; then
2266 cross_compiling=no
2267 else
2268 if test "$cross_compiling" = maybe; then
2269 cross_compiling=yes
2270 else
2271 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2272 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2273 as_fn_error $? "cannot run C compiled programs.
2274 If you meant to cross compile, use \`--host'.
2275 See \`config.log' for more details" "$LINENO" 5; }
2276 fi
2277 fi
2278 fi
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
2280 $as_echo "$cross_compiling" >&6; }
2281
2282 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
2283 ac_clean_files=$ac_clean_files_save
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
2285 $as_echo_n "checking for suffix of object files... " >&6; }
2286 if ${ac_cv_objext+:} false; then :
2287 $as_echo_n "(cached) " >&6
2288 else
2289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2290 /* end confdefs.h. */
2291
2292 int
2293 main ()
2294 {
2295
2296 ;
2297 return 0;
2298 }
2299 _ACEOF
2300 rm -f conftest.o conftest.obj
2301 if { { ac_try="$ac_compile"
2302 case "(($ac_try" in
2303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2304 *) ac_try_echo=$ac_try;;
2305 esac
2306 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2307 $as_echo "$ac_try_echo"; } >&5
2308 (eval "$ac_compile") 2>&5
2309 ac_status=$?
2310 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2311 test $ac_status = 0; }; then :
2312 for ac_file in conftest.o conftest.obj conftest.*; do
2313 test -f "$ac_file" || continue;
2314 case $ac_file in
2315 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
2316 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2317 break;;
2318 esac
2319 done
2320 else
2321 $as_echo "$as_me: failed program was:" >&5
2322 sed 's/^/| /' conftest.$ac_ext >&5
2323
2324 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2325 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2326 as_fn_error $? "cannot compute suffix of object files: cannot compile
2327 See \`config.log' for more details" "$LINENO" 5; }
2328 fi
2329 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2330 fi
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
2332 $as_echo "$ac_cv_objext" >&6; }
2333 OBJEXT=$ac_cv_objext
2334 ac_objext=$OBJEXT
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
2336 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
2337 if ${ac_cv_c_compiler_gnu+:} false; then :
2338 $as_echo_n "(cached) " >&6
2339 else
2340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341 /* end confdefs.h. */
2342
2343 int
2344 main ()
2345 {
2346 #ifndef __GNUC__
2347 choke me
2348 #endif
2349
2350 ;
2351 return 0;
2352 }
2353 _ACEOF
2354 if ac_fn_c_try_compile "$LINENO"; then :
2355 ac_compiler_gnu=yes
2356 else
2357 ac_compiler_gnu=no
2358 fi
2359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2360 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2361
2362 fi
2363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
2364 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
2365 if test $ac_compiler_gnu = yes; then
2366 GCC=yes
2367 else
2368 GCC=
2369 fi
2370 ac_test_CFLAGS=${CFLAGS+set}
2371 ac_save_CFLAGS=$CFLAGS
2372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
2373 $as_echo_n "checking whether $CC accepts -g... " >&6; }
2374 if ${ac_cv_prog_cc_g+:} false; then :
2375 $as_echo_n "(cached) " >&6
2376 else
2377 ac_save_c_werror_flag=$ac_c_werror_flag
2378 ac_c_werror_flag=yes
2379 ac_cv_prog_cc_g=no
2380 CFLAGS="-g"
2381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2382 /* end confdefs.h. */
2383
2384 int
2385 main ()
2386 {
2387
2388 ;
2389 return 0;
2390 }
2391 _ACEOF
2392 if ac_fn_c_try_compile "$LINENO"; then :
2393 ac_cv_prog_cc_g=yes
2394 else
2395 CFLAGS=""
2396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2397 /* end confdefs.h. */
2398
2399 int
2400 main ()
2401 {
2402
2403 ;
2404 return 0;
2405 }
2406 _ACEOF
2407 if ac_fn_c_try_compile "$LINENO"; then :
2408
2409 else
2410 ac_c_werror_flag=$ac_save_c_werror_flag
2411 CFLAGS="-g"
2412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2413 /* end confdefs.h. */
2414
2415 int
2416 main ()
2417 {
2418
2419 ;
2420 return 0;
2421 }
2422 _ACEOF
2423 if ac_fn_c_try_compile "$LINENO"; then :
2424 ac_cv_prog_cc_g=yes
2425 fi
2426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2427 fi
2428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2429 fi
2430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2431 ac_c_werror_flag=$ac_save_c_werror_flag
2432 fi
2433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
2434 $as_echo "$ac_cv_prog_cc_g" >&6; }
2435 if test "$ac_test_CFLAGS" = set; then
2436 CFLAGS=$ac_save_CFLAGS
2437 elif test $ac_cv_prog_cc_g = yes; then
2438 if test "$GCC" = yes; then
2439 CFLAGS="-g -O2"
2440 else
2441 CFLAGS="-g"
2442 fi
2443 else
2444 if test "$GCC" = yes; then
2445 CFLAGS="-O2"
2446 else
2447 CFLAGS=
2448 fi
2449 fi
2450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
2451 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
2452 if ${ac_cv_prog_cc_c89+:} false; then :
2453 $as_echo_n "(cached) " >&6
2454 else
2455 ac_cv_prog_cc_c89=no
2456 ac_save_CC=$CC
2457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2458 /* end confdefs.h. */
2459 #include <stdarg.h>
2460 #include <stdio.h>
2461 struct stat;
2462 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2463 struct buf { int x; };
2464 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2465 static char *e (p, i)
2466 char **p;
2467 int i;
2468 {
2469 return p[i];
2470 }
2471 static char *f (char * (*g) (char **, int), char **p, ...)
2472 {
2473 char *s;
2474 va_list v;
2475 va_start (v,p);
2476 s = g (p, va_arg (v,int));
2477 va_end (v);
2478 return s;
2479 }
2480
2481 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2482 function prototypes and stuff, but not '\xHH' hex character constants.
2483 These don't provoke an error unfortunately, instead are silently treated
2484 as 'x'. The following induces an error, until -std is added to get
2485 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2486 array size at least. It's necessary to write '\x00'==0 to get something
2487 that's true only with -std. */
2488 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2489
2490 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2491 inside strings and character constants. */
2492 #define FOO(x) 'x'
2493 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
2494
2495 int test (int i, double x);
2496 struct s1 {int (*f) (int a);};
2497 struct s2 {int (*f) (double a);};
2498 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2499 int argc;
2500 char **argv;
2501 int
2502 main ()
2503 {
2504 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2505 ;
2506 return 0;
2507 }
2508 _ACEOF
2509 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
2510 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2511 do
2512 CC="$ac_save_CC $ac_arg"
2513 if ac_fn_c_try_compile "$LINENO"; then :
2514 ac_cv_prog_cc_c89=$ac_arg
2515 fi
2516 rm -f core conftest.err conftest.$ac_objext
2517 test "x$ac_cv_prog_cc_c89" != "xno" && break
2518 done
2519 rm -f conftest.$ac_ext
2520 CC=$ac_save_CC
2521
2522 fi
2523 # AC_CACHE_VAL
2524 case "x$ac_cv_prog_cc_c89" in
2525 x)
2526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
2527 $as_echo "none needed" >&6; } ;;
2528 xno)
2529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
2530 $as_echo "unsupported" >&6; } ;;
2531 *)
2532 CC="$CC $ac_cv_prog_cc_c89"
2533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
2534 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
2535 esac
2536 if test "x$ac_cv_prog_cc_c89" != xno; then :
2537
2538 fi
2539
2540 ac_ext=c
2541 ac_cpp='$CPP $CPPFLAGS'
2542 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2543 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2544 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2545
2546
2547 # checking for ocamlc
2548 if test -n "$ac_tool_prefix"; then
2549 # Extract the first word of "${ac_tool_prefix}ocamlc", so it can be a program name with args.
2550 set dummy ${ac_tool_prefix}ocamlc; ac_word=$2
2551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2552 $as_echo_n "checking for $ac_word... " >&6; }
2553 if ${ac_cv_prog_OCAMLC+:} false; then :
2554 $as_echo_n "(cached) " >&6
2555 else
2556 if test -n "$OCAMLC"; then
2557 ac_cv_prog_OCAMLC="$OCAMLC" # Let the user override the test.
2558 else
2559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2560 for as_dir in $PATH
2561 do
2562 IFS=$as_save_IFS
2563 test -z "$as_dir" && as_dir=.
2564 for ac_exec_ext in '' $ac_executable_extensions; do
2565 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2566 ac_cv_prog_OCAMLC="${ac_tool_prefix}ocamlc"
2567 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2568 break 2
2569 fi
2570 done
2571 done
2572 IFS=$as_save_IFS
2573
2574 fi
2575 fi
2576 OCAMLC=$ac_cv_prog_OCAMLC
2577 if test -n "$OCAMLC"; then
2578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLC" >&5
2579 $as_echo "$OCAMLC" >&6; }
2580 else
2581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2582 $as_echo "no" >&6; }
2583 fi
2584
2585
2586 fi
2587 if test -z "$ac_cv_prog_OCAMLC"; then
2588 ac_ct_OCAMLC=$OCAMLC
2589 # Extract the first word of "ocamlc", so it can be a program name with args.
2590 set dummy ocamlc; ac_word=$2
2591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2592 $as_echo_n "checking for $ac_word... " >&6; }
2593 if ${ac_cv_prog_ac_ct_OCAMLC+:} false; then :
2594 $as_echo_n "(cached) " >&6
2595 else
2596 if test -n "$ac_ct_OCAMLC"; then
2597 ac_cv_prog_ac_ct_OCAMLC="$ac_ct_OCAMLC" # Let the user override the test.
2598 else
2599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2600 for as_dir in $PATH
2601 do
2602 IFS=$as_save_IFS
2603 test -z "$as_dir" && as_dir=.
2604 for ac_exec_ext in '' $ac_executable_extensions; do
2605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2606 ac_cv_prog_ac_ct_OCAMLC="ocamlc"
2607 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2608 break 2
2609 fi
2610 done
2611 done
2612 IFS=$as_save_IFS
2613
2614 fi
2615 fi
2616 ac_ct_OCAMLC=$ac_cv_prog_ac_ct_OCAMLC
2617 if test -n "$ac_ct_OCAMLC"; then
2618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLC" >&5
2619 $as_echo "$ac_ct_OCAMLC" >&6; }
2620 else
2621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2622 $as_echo "no" >&6; }
2623 fi
2624
2625 if test "x$ac_ct_OCAMLC" = x; then
2626 OCAMLC="no"
2627 else
2628 case $cross_compiling:$ac_tool_warned in
2629 yes:)
2630 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2631 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2632 ac_tool_warned=yes ;;
2633 esac
2634 OCAMLC=$ac_ct_OCAMLC
2635 fi
2636 else
2637 OCAMLC="$ac_cv_prog_OCAMLC"
2638 fi
2639
2640
2641 if test "$OCAMLC" != "no"; then
2642 OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'`
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCaml version is $OCAMLVERSION" >&5
2644 $as_echo "OCaml version is $OCAMLVERSION" >&6; }
2645 # If OCAMLLIB is set, use it
2646 if test "$OCAMLLIB" = ""; then
2647 OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4`
2648 else
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCAMLLIB previously set; preserving it." >&5
2650 $as_echo "OCAMLLIB previously set; preserving it." >&6; }
2651 fi
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCaml library path is $OCAMLLIB" >&5
2653 $as_echo "OCaml library path is $OCAMLLIB" >&6; }
2654
2655
2656
2657
2658 # checking for ocamlopt
2659 if test -n "$ac_tool_prefix"; then
2660 # Extract the first word of "${ac_tool_prefix}ocamlopt", so it can be a program name with args.
2661 set dummy ${ac_tool_prefix}ocamlopt; ac_word=$2
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2663 $as_echo_n "checking for $ac_word... " >&6; }
2664 if ${ac_cv_prog_OCAMLOPT+:} false; then :
2665 $as_echo_n "(cached) " >&6
2666 else
2667 if test -n "$OCAMLOPT"; then
2668 ac_cv_prog_OCAMLOPT="$OCAMLOPT" # Let the user override the test.
2669 else
2670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2671 for as_dir in $PATH
2672 do
2673 IFS=$as_save_IFS
2674 test -z "$as_dir" && as_dir=.
2675 for ac_exec_ext in '' $ac_executable_extensions; do
2676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2677 ac_cv_prog_OCAMLOPT="${ac_tool_prefix}ocamlopt"
2678 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2679 break 2
2680 fi
2681 done
2682 done
2683 IFS=$as_save_IFS
2684
2685 fi
2686 fi
2687 OCAMLOPT=$ac_cv_prog_OCAMLOPT
2688 if test -n "$OCAMLOPT"; then
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPT" >&5
2690 $as_echo "$OCAMLOPT" >&6; }
2691 else
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2693 $as_echo "no" >&6; }
2694 fi
2695
2696
2697 fi
2698 if test -z "$ac_cv_prog_OCAMLOPT"; then
2699 ac_ct_OCAMLOPT=$OCAMLOPT
2700 # Extract the first word of "ocamlopt", so it can be a program name with args.
2701 set dummy ocamlopt; ac_word=$2
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2703 $as_echo_n "checking for $ac_word... " >&6; }
2704 if ${ac_cv_prog_ac_ct_OCAMLOPT+:} false; then :
2705 $as_echo_n "(cached) " >&6
2706 else
2707 if test -n "$ac_ct_OCAMLOPT"; then
2708 ac_cv_prog_ac_ct_OCAMLOPT="$ac_ct_OCAMLOPT" # Let the user override the test.
2709 else
2710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2711 for as_dir in $PATH
2712 do
2713 IFS=$as_save_IFS
2714 test -z "$as_dir" && as_dir=.
2715 for ac_exec_ext in '' $ac_executable_extensions; do
2716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2717 ac_cv_prog_ac_ct_OCAMLOPT="ocamlopt"
2718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2719 break 2
2720 fi
2721 done
2722 done
2723 IFS=$as_save_IFS
2724
2725 fi
2726 fi
2727 ac_ct_OCAMLOPT=$ac_cv_prog_ac_ct_OCAMLOPT
2728 if test -n "$ac_ct_OCAMLOPT"; then
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLOPT" >&5
2730 $as_echo "$ac_ct_OCAMLOPT" >&6; }
2731 else
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2733 $as_echo "no" >&6; }
2734 fi
2735
2736 if test "x$ac_ct_OCAMLOPT" = x; then
2737 OCAMLOPT="no"
2738 else
2739 case $cross_compiling:$ac_tool_warned in
2740 yes:)
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2742 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2743 ac_tool_warned=yes ;;
2744 esac
2745 OCAMLOPT=$ac_ct_OCAMLOPT
2746 fi
2747 else
2748 OCAMLOPT="$ac_cv_prog_OCAMLOPT"
2749 fi
2750
2751 OCAMLBEST=byte
2752 if test "$OCAMLOPT" = "no"; then
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find ocamlopt; bytecode compilation only." >&5
2754 $as_echo "$as_me: WARNING: Cannot find ocamlopt; bytecode compilation only." >&2;}
2755 else
2756 TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
2757 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc; ocamlopt discarded." >&5
2759 $as_echo "versions differs from ocamlc; ocamlopt discarded." >&6; }
2760 OCAMLOPT=no
2761 else
2762 OCAMLBEST=opt
2763 fi
2764 fi
2765
2766
2767
2768 # checking for ocamlc.opt
2769 if test -n "$ac_tool_prefix"; then
2770 # Extract the first word of "${ac_tool_prefix}ocamlc.opt", so it can be a program name with args.
2771 set dummy ${ac_tool_prefix}ocamlc.opt; ac_word=$2
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2773 $as_echo_n "checking for $ac_word... " >&6; }
2774 if ${ac_cv_prog_OCAMLCDOTOPT+:} false; then :
2775 $as_echo_n "(cached) " >&6
2776 else
2777 if test -n "$OCAMLCDOTOPT"; then
2778 ac_cv_prog_OCAMLCDOTOPT="$OCAMLCDOTOPT" # Let the user override the test.
2779 else
2780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2781 for as_dir in $PATH
2782 do
2783 IFS=$as_save_IFS
2784 test -z "$as_dir" && as_dir=.
2785 for ac_exec_ext in '' $ac_executable_extensions; do
2786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2787 ac_cv_prog_OCAMLCDOTOPT="${ac_tool_prefix}ocamlc.opt"
2788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2789 break 2
2790 fi
2791 done
2792 done
2793 IFS=$as_save_IFS
2794
2795 fi
2796 fi
2797 OCAMLCDOTOPT=$ac_cv_prog_OCAMLCDOTOPT
2798 if test -n "$OCAMLCDOTOPT"; then
2799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLCDOTOPT" >&5
2800 $as_echo "$OCAMLCDOTOPT" >&6; }
2801 else
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2803 $as_echo "no" >&6; }
2804 fi
2805
2806
2807 fi
2808 if test -z "$ac_cv_prog_OCAMLCDOTOPT"; then
2809 ac_ct_OCAMLCDOTOPT=$OCAMLCDOTOPT
2810 # Extract the first word of "ocamlc.opt", so it can be a program name with args.
2811 set dummy ocamlc.opt; ac_word=$2
2812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2813 $as_echo_n "checking for $ac_word... " >&6; }
2814 if ${ac_cv_prog_ac_ct_OCAMLCDOTOPT+:} false; then :
2815 $as_echo_n "(cached) " >&6
2816 else
2817 if test -n "$ac_ct_OCAMLCDOTOPT"; then
2818 ac_cv_prog_ac_ct_OCAMLCDOTOPT="$ac_ct_OCAMLCDOTOPT" # Let the user override the test.
2819 else
2820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2821 for as_dir in $PATH
2822 do
2823 IFS=$as_save_IFS
2824 test -z "$as_dir" && as_dir=.
2825 for ac_exec_ext in '' $ac_executable_extensions; do
2826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2827 ac_cv_prog_ac_ct_OCAMLCDOTOPT="ocamlc.opt"
2828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2829 break 2
2830 fi
2831 done
2832 done
2833 IFS=$as_save_IFS
2834
2835 fi
2836 fi
2837 ac_ct_OCAMLCDOTOPT=$ac_cv_prog_ac_ct_OCAMLCDOTOPT
2838 if test -n "$ac_ct_OCAMLCDOTOPT"; then
2839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLCDOTOPT" >&5
2840 $as_echo "$ac_ct_OCAMLCDOTOPT" >&6; }
2841 else
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2843 $as_echo "no" >&6; }
2844 fi
2845
2846 if test "x$ac_ct_OCAMLCDOTOPT" = x; then
2847 OCAMLCDOTOPT="no"
2848 else
2849 case $cross_compiling:$ac_tool_warned in
2850 yes:)
2851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2852 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2853 ac_tool_warned=yes ;;
2854 esac
2855 OCAMLCDOTOPT=$ac_ct_OCAMLCDOTOPT
2856 fi
2857 else
2858 OCAMLCDOTOPT="$ac_cv_prog_OCAMLCDOTOPT"
2859 fi
2860
2861 if test "$OCAMLCDOTOPT" != "no"; then
2862 TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
2863 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc; ocamlc.opt discarded." >&5
2865 $as_echo "versions differs from ocamlc; ocamlc.opt discarded." >&6; }
2866 else
2867 OCAMLC=$OCAMLCDOTOPT
2868 fi
2869 fi
2870
2871 # checking for ocamlopt.opt
2872 if test "$OCAMLOPT" != "no" ; then
2873 if test -n "$ac_tool_prefix"; then
2874 # Extract the first word of "${ac_tool_prefix}ocamlopt.opt", so it can be a program name with args.
2875 set dummy ${ac_tool_prefix}ocamlopt.opt; ac_word=$2
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2877 $as_echo_n "checking for $ac_word... " >&6; }
2878 if ${ac_cv_prog_OCAMLOPTDOTOPT+:} false; then :
2879 $as_echo_n "(cached) " >&6
2880 else
2881 if test -n "$OCAMLOPTDOTOPT"; then
2882 ac_cv_prog_OCAMLOPTDOTOPT="$OCAMLOPTDOTOPT" # Let the user override the test.
2883 else
2884 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2885 for as_dir in $PATH
2886 do
2887 IFS=$as_save_IFS
2888 test -z "$as_dir" && as_dir=.
2889 for ac_exec_ext in '' $ac_executable_extensions; do
2890 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2891 ac_cv_prog_OCAMLOPTDOTOPT="${ac_tool_prefix}ocamlopt.opt"
2892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2893 break 2
2894 fi
2895 done
2896 done
2897 IFS=$as_save_IFS
2898
2899 fi
2900 fi
2901 OCAMLOPTDOTOPT=$ac_cv_prog_OCAMLOPTDOTOPT
2902 if test -n "$OCAMLOPTDOTOPT"; then
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPTDOTOPT" >&5
2904 $as_echo "$OCAMLOPTDOTOPT" >&6; }
2905 else
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2907 $as_echo "no" >&6; }
2908 fi
2909
2910
2911 fi
2912 if test -z "$ac_cv_prog_OCAMLOPTDOTOPT"; then
2913 ac_ct_OCAMLOPTDOTOPT=$OCAMLOPTDOTOPT
2914 # Extract the first word of "ocamlopt.opt", so it can be a program name with args.
2915 set dummy ocamlopt.opt; ac_word=$2
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2917 $as_echo_n "checking for $ac_word... " >&6; }
2918 if ${ac_cv_prog_ac_ct_OCAMLOPTDOTOPT+:} false; then :
2919 $as_echo_n "(cached) " >&6
2920 else
2921 if test -n "$ac_ct_OCAMLOPTDOTOPT"; then
2922 ac_cv_prog_ac_ct_OCAMLOPTDOTOPT="$ac_ct_OCAMLOPTDOTOPT" # Let the user override the test.
2923 else
2924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2925 for as_dir in $PATH
2926 do
2927 IFS=$as_save_IFS
2928 test -z "$as_dir" && as_dir=.
2929 for ac_exec_ext in '' $ac_executable_extensions; do
2930 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2931 ac_cv_prog_ac_ct_OCAMLOPTDOTOPT="ocamlopt.opt"
2932 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2933 break 2
2934 fi
2935 done
2936 done
2937 IFS=$as_save_IFS
2938
2939 fi
2940 fi
2941 ac_ct_OCAMLOPTDOTOPT=$ac_cv_prog_ac_ct_OCAMLOPTDOTOPT
2942 if test -n "$ac_ct_OCAMLOPTDOTOPT"; then
2943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLOPTDOTOPT" >&5
2944 $as_echo "$ac_ct_OCAMLOPTDOTOPT" >&6; }
2945 else
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2947 $as_echo "no" >&6; }
2948 fi
2949
2950 if test "x$ac_ct_OCAMLOPTDOTOPT" = x; then
2951 OCAMLOPTDOTOPT="no"
2952 else
2953 case $cross_compiling:$ac_tool_warned in
2954 yes:)
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2956 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2957 ac_tool_warned=yes ;;
2958 esac
2959 OCAMLOPTDOTOPT=$ac_ct_OCAMLOPTDOTOPT
2960 fi
2961 else
2962 OCAMLOPTDOTOPT="$ac_cv_prog_OCAMLOPTDOTOPT"
2963 fi
2964
2965 if test "$OCAMLOPTDOTOPT" != "no"; then
2966 TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
2967 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: version differs from ocamlc; ocamlopt.opt discarded." >&5
2969 $as_echo "version differs from ocamlc; ocamlopt.opt discarded." >&6; }
2970 else
2971 OCAMLOPT=$OCAMLOPTDOTOPT
2972 fi
2973 fi
2974 fi
2975
2976
2977 fi
2978
2979
2980
2981 # checking for ocaml toplevel
2982 if test -n "$ac_tool_prefix"; then
2983 # Extract the first word of "${ac_tool_prefix}ocaml", so it can be a program name with args.
2984 set dummy ${ac_tool_prefix}ocaml; ac_word=$2
2985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2986 $as_echo_n "checking for $ac_word... " >&6; }
2987 if ${ac_cv_prog_OCAML+:} false; then :
2988 $as_echo_n "(cached) " >&6
2989 else
2990 if test -n "$OCAML"; then
2991 ac_cv_prog_OCAML="$OCAML" # Let the user override the test.
2992 else
2993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2994 for as_dir in $PATH
2995 do
2996 IFS=$as_save_IFS
2997 test -z "$as_dir" && as_dir=.
2998 for ac_exec_ext in '' $ac_executable_extensions; do
2999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3000 ac_cv_prog_OCAML="${ac_tool_prefix}ocaml"
3001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3002 break 2
3003 fi
3004 done
3005 done
3006 IFS=$as_save_IFS
3007
3008 fi
3009 fi
3010 OCAML=$ac_cv_prog_OCAML
3011 if test -n "$OCAML"; then
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAML" >&5
3013 $as_echo "$OCAML" >&6; }
3014 else
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3016 $as_echo "no" >&6; }
3017 fi
3018
3019
3020 fi
3021 if test -z "$ac_cv_prog_OCAML"; then
3022 ac_ct_OCAML=$OCAML
3023 # Extract the first word of "ocaml", so it can be a program name with args.
3024 set dummy ocaml; ac_word=$2
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3026 $as_echo_n "checking for $ac_word... " >&6; }
3027 if ${ac_cv_prog_ac_ct_OCAML+:} false; then :
3028 $as_echo_n "(cached) " >&6
3029 else
3030 if test -n "$ac_ct_OCAML"; then
3031 ac_cv_prog_ac_ct_OCAML="$ac_ct_OCAML" # Let the user override the test.
3032 else
3033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3034 for as_dir in $PATH
3035 do
3036 IFS=$as_save_IFS
3037 test -z "$as_dir" && as_dir=.
3038 for ac_exec_ext in '' $ac_executable_extensions; do
3039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3040 ac_cv_prog_ac_ct_OCAML="ocaml"
3041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3042 break 2
3043 fi
3044 done
3045 done
3046 IFS=$as_save_IFS
3047
3048 fi
3049 fi
3050 ac_ct_OCAML=$ac_cv_prog_ac_ct_OCAML
3051 if test -n "$ac_ct_OCAML"; then
3052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAML" >&5
3053 $as_echo "$ac_ct_OCAML" >&6; }
3054 else
3055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3056 $as_echo "no" >&6; }
3057 fi
3058
3059 if test "x$ac_ct_OCAML" = x; then
3060 OCAML="no"
3061 else
3062 case $cross_compiling:$ac_tool_warned in
3063 yes:)
3064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3065 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3066 ac_tool_warned=yes ;;
3067 esac
3068 OCAML=$ac_ct_OCAML
3069 fi
3070 else
3071 OCAML="$ac_cv_prog_OCAML"
3072 fi
3073
3074
3075 # checking for ocamldep
3076 if test -n "$ac_tool_prefix"; then
3077 # Extract the first word of "${ac_tool_prefix}ocamldep", so it can be a program name with args.
3078 set dummy ${ac_tool_prefix}ocamldep; ac_word=$2
3079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3080 $as_echo_n "checking for $ac_word... " >&6; }
3081 if ${ac_cv_prog_OCAMLDEP+:} false; then :
3082 $as_echo_n "(cached) " >&6
3083 else
3084 if test -n "$OCAMLDEP"; then
3085 ac_cv_prog_OCAMLDEP="$OCAMLDEP" # Let the user override the test.
3086 else
3087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3088 for as_dir in $PATH
3089 do
3090 IFS=$as_save_IFS
3091 test -z "$as_dir" && as_dir=.
3092 for ac_exec_ext in '' $ac_executable_extensions; do
3093 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3094 ac_cv_prog_OCAMLDEP="${ac_tool_prefix}ocamldep"
3095 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3096 break 2
3097 fi
3098 done
3099 done
3100 IFS=$as_save_IFS
3101
3102 fi
3103 fi
3104 OCAMLDEP=$ac_cv_prog_OCAMLDEP
3105 if test -n "$OCAMLDEP"; then
3106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDEP" >&5
3107 $as_echo "$OCAMLDEP" >&6; }
3108 else
3109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3110 $as_echo "no" >&6; }
3111 fi
3112
3113
3114 fi
3115 if test -z "$ac_cv_prog_OCAMLDEP"; then
3116 ac_ct_OCAMLDEP=$OCAMLDEP
3117 # Extract the first word of "ocamldep", so it can be a program name with args.
3118 set dummy ocamldep; ac_word=$2
3119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3120 $as_echo_n "checking for $ac_word... " >&6; }
3121 if ${ac_cv_prog_ac_ct_OCAMLDEP+:} false; then :
3122 $as_echo_n "(cached) " >&6
3123 else
3124 if test -n "$ac_ct_OCAMLDEP"; then
3125 ac_cv_prog_ac_ct_OCAMLDEP="$ac_ct_OCAMLDEP" # Let the user override the test.
3126 else
3127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3128 for as_dir in $PATH
3129 do
3130 IFS=$as_save_IFS
3131 test -z "$as_dir" && as_dir=.
3132 for ac_exec_ext in '' $ac_executable_extensions; do
3133 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3134 ac_cv_prog_ac_ct_OCAMLDEP="ocamldep"
3135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3136 break 2
3137 fi
3138 done
3139 done
3140 IFS=$as_save_IFS
3141
3142 fi
3143 fi
3144 ac_ct_OCAMLDEP=$ac_cv_prog_ac_ct_OCAMLDEP
3145 if test -n "$ac_ct_OCAMLDEP"; then
3146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLDEP" >&5
3147 $as_echo "$ac_ct_OCAMLDEP" >&6; }
3148 else
3149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3150 $as_echo "no" >&6; }
3151 fi
3152
3153 if test "x$ac_ct_OCAMLDEP" = x; then
3154 OCAMLDEP="no"
3155 else
3156 case $cross_compiling:$ac_tool_warned in
3157 yes:)
3158 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3159 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3160 ac_tool_warned=yes ;;
3161 esac
3162 OCAMLDEP=$ac_ct_OCAMLDEP
3163 fi
3164 else
3165 OCAMLDEP="$ac_cv_prog_OCAMLDEP"
3166 fi
3167
3168
3169 # checking for ocamlmktop
3170 if test -n "$ac_tool_prefix"; then
3171 # Extract the first word of "${ac_tool_prefix}ocamlmktop", so it can be a program name with args.
3172 set dummy ${ac_tool_prefix}ocamlmktop; ac_word=$2
3173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3174 $as_echo_n "checking for $ac_word... " >&6; }
3175 if ${ac_cv_prog_OCAMLMKTOP+:} false; then :
3176 $as_echo_n "(cached) " >&6
3177 else
3178 if test -n "$OCAMLMKTOP"; then
3179 ac_cv_prog_OCAMLMKTOP="$OCAMLMKTOP" # Let the user override the test.
3180 else
3181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3182 for as_dir in $PATH
3183 do
3184 IFS=$as_save_IFS
3185 test -z "$as_dir" && as_dir=.
3186 for ac_exec_ext in '' $ac_executable_extensions; do
3187 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3188 ac_cv_prog_OCAMLMKTOP="${ac_tool_prefix}ocamlmktop"
3189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3190 break 2
3191 fi
3192 done
3193 done
3194 IFS=$as_save_IFS
3195
3196 fi
3197 fi
3198 OCAMLMKTOP=$ac_cv_prog_OCAMLMKTOP
3199 if test -n "$OCAMLMKTOP"; then
3200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLMKTOP" >&5
3201 $as_echo "$OCAMLMKTOP" >&6; }
3202 else
3203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3204 $as_echo "no" >&6; }
3205 fi
3206
3207
3208 fi
3209 if test -z "$ac_cv_prog_OCAMLMKTOP"; then
3210 ac_ct_OCAMLMKTOP=$OCAMLMKTOP
3211 # Extract the first word of "ocamlmktop", so it can be a program name with args.
3212 set dummy ocamlmktop; ac_word=$2
3213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3214 $as_echo_n "checking for $ac_word... " >&6; }
3215 if ${ac_cv_prog_ac_ct_OCAMLMKTOP+:} false; then :
3216 $as_echo_n "(cached) " >&6
3217 else
3218 if test -n "$ac_ct_OCAMLMKTOP"; then
3219 ac_cv_prog_ac_ct_OCAMLMKTOP="$ac_ct_OCAMLMKTOP" # Let the user override the test.
3220 else
3221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3222 for as_dir in $PATH
3223 do
3224 IFS=$as_save_IFS
3225 test -z "$as_dir" && as_dir=.
3226 for ac_exec_ext in '' $ac_executable_extensions; do
3227 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3228 ac_cv_prog_ac_ct_OCAMLMKTOP="ocamlmktop"
3229 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3230 break 2
3231 fi
3232 done
3233 done
3234 IFS=$as_save_IFS
3235
3236 fi
3237 fi
3238 ac_ct_OCAMLMKTOP=$ac_cv_prog_ac_ct_OCAMLMKTOP
3239 if test -n "$ac_ct_OCAMLMKTOP"; then
3240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLMKTOP" >&5
3241 $as_echo "$ac_ct_OCAMLMKTOP" >&6; }
3242 else
3243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3244 $as_echo "no" >&6; }
3245 fi
3246
3247 if test "x$ac_ct_OCAMLMKTOP" = x; then
3248 OCAMLMKTOP="no"
3249 else
3250 case $cross_compiling:$ac_tool_warned in
3251 yes:)
3252 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3253 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3254 ac_tool_warned=yes ;;
3255 esac
3256 OCAMLMKTOP=$ac_ct_OCAMLMKTOP
3257 fi
3258 else
3259 OCAMLMKTOP="$ac_cv_prog_OCAMLMKTOP"
3260 fi
3261
3262
3263 # checking for ocamlmklib
3264 if test -n "$ac_tool_prefix"; then
3265 # Extract the first word of "${ac_tool_prefix}ocamlmklib", so it can be a program name with args.
3266 set dummy ${ac_tool_prefix}ocamlmklib; ac_word=$2
3267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3268 $as_echo_n "checking for $ac_word... " >&6; }
3269 if ${ac_cv_prog_OCAMLMKLIB+:} false; then :
3270 $as_echo_n "(cached) " >&6
3271 else
3272 if test -n "$OCAMLMKLIB"; then
3273 ac_cv_prog_OCAMLMKLIB="$OCAMLMKLIB" # Let the user override the test.
3274 else
3275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3276 for as_dir in $PATH
3277 do
3278 IFS=$as_save_IFS
3279 test -z "$as_dir" && as_dir=.
3280 for ac_exec_ext in '' $ac_executable_extensions; do
3281 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3282 ac_cv_prog_OCAMLMKLIB="${ac_tool_prefix}ocamlmklib"
3283 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3284 break 2
3285 fi
3286 done
3287 done
3288 IFS=$as_save_IFS
3289
3290 fi
3291 fi
3292 OCAMLMKLIB=$ac_cv_prog_OCAMLMKLIB
3293 if test -n "$OCAMLMKLIB"; then
3294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLMKLIB" >&5
3295 $as_echo "$OCAMLMKLIB" >&6; }
3296 else
3297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3298 $as_echo "no" >&6; }
3299 fi
3300
3301
3302 fi
3303 if test -z "$ac_cv_prog_OCAMLMKLIB"; then
3304 ac_ct_OCAMLMKLIB=$OCAMLMKLIB
3305 # Extract the first word of "ocamlmklib", so it can be a program name with args.
3306 set dummy ocamlmklib; ac_word=$2
3307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3308 $as_echo_n "checking for $ac_word... " >&6; }
3309 if ${ac_cv_prog_ac_ct_OCAMLMKLIB+:} false; then :
3310 $as_echo_n "(cached) " >&6
3311 else
3312 if test -n "$ac_ct_OCAMLMKLIB"; then
3313 ac_cv_prog_ac_ct_OCAMLMKLIB="$ac_ct_OCAMLMKLIB" # Let the user override the test.
3314 else
3315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316 for as_dir in $PATH
3317 do
3318 IFS=$as_save_IFS
3319 test -z "$as_dir" && as_dir=.
3320 for ac_exec_ext in '' $ac_executable_extensions; do
3321 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3322 ac_cv_prog_ac_ct_OCAMLMKLIB="ocamlmklib"
3323 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3324 break 2
3325 fi
3326 done
3327 done
3328 IFS=$as_save_IFS
3329
3330 fi
3331 fi
3332 ac_ct_OCAMLMKLIB=$ac_cv_prog_ac_ct_OCAMLMKLIB
3333 if test -n "$ac_ct_OCAMLMKLIB"; then
3334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLMKLIB" >&5
3335 $as_echo "$ac_ct_OCAMLMKLIB" >&6; }
3336 else
3337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3338 $as_echo "no" >&6; }
3339 fi
3340
3341 if test "x$ac_ct_OCAMLMKLIB" = x; then
3342 OCAMLMKLIB="no"
3343 else
3344 case $cross_compiling:$ac_tool_warned in
3345 yes:)
3346 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3347 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3348 ac_tool_warned=yes ;;
3349 esac
3350 OCAMLMKLIB=$ac_ct_OCAMLMKLIB
3351 fi
3352 else
3353 OCAMLMKLIB="$ac_cv_prog_OCAMLMKLIB"
3354 fi
3355
3356
3357 # checking for ocamldoc
3358 if test -n "$ac_tool_prefix"; then
3359 # Extract the first word of "${ac_tool_prefix}ocamldoc", so it can be a program name with args.
3360 set dummy ${ac_tool_prefix}ocamldoc; ac_word=$2
3361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3362 $as_echo_n "checking for $ac_word... " >&6; }
3363 if ${ac_cv_prog_OCAMLDOC+:} false; then :
3364 $as_echo_n "(cached) " >&6
3365 else
3366 if test -n "$OCAMLDOC"; then
3367 ac_cv_prog_OCAMLDOC="$OCAMLDOC" # Let the user override the test.
3368 else
3369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3370 for as_dir in $PATH
3371 do
3372 IFS=$as_save_IFS
3373 test -z "$as_dir" && as_dir=.
3374 for ac_exec_ext in '' $ac_executable_extensions; do
3375 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3376 ac_cv_prog_OCAMLDOC="${ac_tool_prefix}ocamldoc"
3377 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3378 break 2
3379 fi
3380 done
3381 done
3382 IFS=$as_save_IFS
3383
3384 fi
3385 fi
3386 OCAMLDOC=$ac_cv_prog_OCAMLDOC
3387 if test -n "$OCAMLDOC"; then
3388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDOC" >&5
3389 $as_echo "$OCAMLDOC" >&6; }
3390 else
3391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3392 $as_echo "no" >&6; }
3393 fi
3394
3395
3396 fi
3397 if test -z "$ac_cv_prog_OCAMLDOC"; then
3398 ac_ct_OCAMLDOC=$OCAMLDOC
3399 # Extract the first word of "ocamldoc", so it can be a program name with args.
3400 set dummy ocamldoc; ac_word=$2
3401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3402 $as_echo_n "checking for $ac_word... " >&6; }
3403 if ${ac_cv_prog_ac_ct_OCAMLDOC+:} false; then :
3404 $as_echo_n "(cached) " >&6
3405 else
3406 if test -n "$ac_ct_OCAMLDOC"; then
3407 ac_cv_prog_ac_ct_OCAMLDOC="$ac_ct_OCAMLDOC" # Let the user override the test.
3408 else
3409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3410 for as_dir in $PATH
3411 do
3412 IFS=$as_save_IFS
3413 test -z "$as_dir" && as_dir=.
3414 for ac_exec_ext in '' $ac_executable_extensions; do
3415 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3416 ac_cv_prog_ac_ct_OCAMLDOC="ocamldoc"
3417 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3418 break 2
3419 fi
3420 done
3421 done
3422 IFS=$as_save_IFS
3423
3424 fi
3425 fi
3426 ac_ct_OCAMLDOC=$ac_cv_prog_ac_ct_OCAMLDOC
3427 if test -n "$ac_ct_OCAMLDOC"; then
3428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLDOC" >&5
3429 $as_echo "$ac_ct_OCAMLDOC" >&6; }
3430 else
3431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3432 $as_echo "no" >&6; }
3433 fi
3434
3435 if test "x$ac_ct_OCAMLDOC" = x; then
3436 OCAMLDOC="no"
3437 else
3438 case $cross_compiling:$ac_tool_warned in
3439 yes:)
3440 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3441 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3442 ac_tool_warned=yes ;;
3443 esac
3444 OCAMLDOC=$ac_ct_OCAMLDOC
3445 fi
3446 else
3447 OCAMLDOC="$ac_cv_prog_OCAMLDOC"
3448 fi
3449
3450
3451 # checking for ocamlbuild
3452 if test -n "$ac_tool_prefix"; then
3453 # Extract the first word of "${ac_tool_prefix}ocamlbuild", so it can be a program name with args.
3454 set dummy ${ac_tool_prefix}ocamlbuild; ac_word=$2
3455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3456 $as_echo_n "checking for $ac_word... " >&6; }
3457 if ${ac_cv_prog_OCAMLBUILD+:} false; then :
3458 $as_echo_n "(cached) " >&6
3459 else
3460 if test -n "$OCAMLBUILD"; then
3461 ac_cv_prog_OCAMLBUILD="$OCAMLBUILD" # Let the user override the test.
3462 else
3463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3464 for as_dir in $PATH
3465 do
3466 IFS=$as_save_IFS
3467 test -z "$as_dir" && as_dir=.
3468 for ac_exec_ext in '' $ac_executable_extensions; do
3469 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3470 ac_cv_prog_OCAMLBUILD="${ac_tool_prefix}ocamlbuild"
3471 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3472 break 2
3473 fi
3474 done
3475 done
3476 IFS=$as_save_IFS
3477
3478 fi
3479 fi
3480 OCAMLBUILD=$ac_cv_prog_OCAMLBUILD
3481 if test -n "$OCAMLBUILD"; then
3482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLBUILD" >&5
3483 $as_echo "$OCAMLBUILD" >&6; }
3484 else
3485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3486 $as_echo "no" >&6; }
3487 fi
3488
3489
3490 fi
3491 if test -z "$ac_cv_prog_OCAMLBUILD"; then
3492 ac_ct_OCAMLBUILD=$OCAMLBUILD
3493 # Extract the first word of "ocamlbuild", so it can be a program name with args.
3494 set dummy ocamlbuild; ac_word=$2
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3496 $as_echo_n "checking for $ac_word... " >&6; }
3497 if ${ac_cv_prog_ac_ct_OCAMLBUILD+:} false; then :
3498 $as_echo_n "(cached) " >&6
3499 else
3500 if test -n "$ac_ct_OCAMLBUILD"; then
3501 ac_cv_prog_ac_ct_OCAMLBUILD="$ac_ct_OCAMLBUILD" # Let the user override the test.
3502 else
3503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3504 for as_dir in $PATH
3505 do
3506 IFS=$as_save_IFS
3507 test -z "$as_dir" && as_dir=.
3508 for ac_exec_ext in '' $ac_executable_extensions; do
3509 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3510 ac_cv_prog_ac_ct_OCAMLBUILD="ocamlbuild"
3511 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3512 break 2
3513 fi
3514 done
3515 done
3516 IFS=$as_save_IFS
3517
3518 fi
3519 fi
3520 ac_ct_OCAMLBUILD=$ac_cv_prog_ac_ct_OCAMLBUILD
3521 if test -n "$ac_ct_OCAMLBUILD"; then
3522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLBUILD" >&5
3523 $as_echo "$ac_ct_OCAMLBUILD" >&6; }
3524 else
3525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3526 $as_echo "no" >&6; }
3527 fi
3528
3529 if test "x$ac_ct_OCAMLBUILD" = x; then
3530 OCAMLBUILD="no"
3531 else
3532 case $cross_compiling:$ac_tool_warned in
3533 yes:)
3534 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3535 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3536 ac_tool_warned=yes ;;
3537 esac
3538 OCAMLBUILD=$ac_ct_OCAMLBUILD
3539 fi
3540 else
3541 OCAMLBUILD="$ac_cv_prog_OCAMLBUILD"
3542 fi
3543
3544
3545 if test "$OCAMLC" = "no"; then
3546 as_fn_error $? "You must install the OCaml compiler" "$LINENO" 5
3547 fi
3548
3549 ac_config_files="$ac_config_files Makefile.config version.ocp"
3550
3551 cat >confcache <<\_ACEOF
3552 # This file is a shell script that caches the results of configure
3553 # tests run on this system so they can be shared between configure
3554 # scripts and configure runs, see configure's option --config-cache.
3555 # It is not useful on other systems. If it contains results you don't
3556 # want to keep, you may remove or edit it.
3557 #
3558 # config.status only pays attention to the cache file if you give it
3559 # the --recheck option to rerun configure.
3560 #
3561 # `ac_cv_env_foo' variables (set or unset) will be overridden when
3562 # loading this file, other *unset* `ac_cv_foo' will be assigned the
3563 # following values.
3564
3565 _ACEOF
3566
3567 # The following way of writing the cache mishandles newlines in values,
3568 # but we know of no workaround that is simple, portable, and efficient.
3569 # So, we kill variables containing newlines.
3570 # Ultrix sh set writes to stderr and can't be redirected directly,
3571 # and sets the high bit in the cache file unless we assign to the vars.
3572 (
3573 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
3574 eval ac_val=\$$ac_var
3575 case $ac_val in #(
3576 *${as_nl}*)
3577 case $ac_var in #(
3578 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3579 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3580 esac
3581 case $ac_var in #(
3582 _ | IFS | as_nl) ;; #(
3583 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3584 *) { eval $ac_var=; unset $ac_var;} ;;
3585 esac ;;
3586 esac
3587 done
3588
3589 (set) 2>&1 |
3590 case $as_nl`(ac_space=' '; set) 2>&1` in #(
3591 *${as_nl}ac_space=\ *)
3592 # `set' does not quote correctly, so add quotes: double-quote
3593 # substitution turns \\\\ into \\, and sed turns \\ into \.
3594 sed -n \
3595 "s/'/'\\\\''/g;
3596 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
3597 ;; #(
3598 *)
3599 # `set' quotes correctly as required by POSIX, so do not add quotes.
3600 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3601 ;;
3602 esac |
3603 sort
3604 ) |
3605 sed '
3606 /^ac_cv_env_/b end
3607 t clear
3608 :clear
3609 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
3610 t end
3611 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
3612 :end' >>confcache
3613 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
3614 if test -w "$cache_file"; then
3615 if test "x$cache_file" != "x/dev/null"; then
3616 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
3617 $as_echo "$as_me: updating cache $cache_file" >&6;}
3618 if test ! -f "$cache_file" || test -h "$cache_file"; then
3619 cat confcache >"$cache_file"
3620 else
3621 case $cache_file in #(
3622 */* | ?:*)
3623 mv -f confcache "$cache_file"$$ &&
3624 mv -f "$cache_file"$$ "$cache_file" ;; #(
3625 *)
3626 mv -f confcache "$cache_file" ;;
3627 esac
3628 fi
3629 fi
3630 else
3631 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
3632 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
3633 fi
3634 fi
3635 rm -f confcache
3636
3637 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3638 # Let make expand exec_prefix.
3639 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3640
3641 # Transform confdefs.h into DEFS.
3642 # Protect against shell expansion while executing Makefile rules.
3643 # Protect against Makefile macro expansion.
3644 #
3645 # If the first sed substitution is executed (which looks for macros that
3646 # take arguments), then branch to the quote section. Otherwise,
3647 # look for a macro that doesn't take arguments.
3648 ac_script='
3649 :mline
3650 /\\$/{
3651 N
3652 s,\\\n,,
3653 b mline
3654 }
3655 t clear
3656 :clear
3657 s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
3658 t quote
3659 s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
3660 t quote
3661 b any
3662 :quote
3663 s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
3664 s/\[/\\&/g
3665 s/\]/\\&/g
3666 s/\$/$$/g
3667 H
3668 :any
3669 ${
3670 g
3671 s/^\n//
3672 s/\n/ /g
3673 p
3674 }
3675 '
3676 DEFS=`sed -n "$ac_script" confdefs.h`
3677
3678
3679 ac_libobjs=
3680 ac_ltlibobjs=
3681 U=
3682 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
3683 # 1. Remove the extension, and $U if already installed.
3684 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
3685 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
3686 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
3687 # will be set to the directory where LIBOBJS objects are built.
3688 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
3689 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
3690 done
3691 LIBOBJS=$ac_libobjs
3692
3693 LTLIBOBJS=$ac_ltlibobjs
3694
3695
3696
3697 : "${CONFIG_STATUS=./config.status}"
3698 ac_write_fail=0
3699 ac_clean_files_save=$ac_clean_files
3700 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
3701 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
3702 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
3703 as_write_fail=0
3704 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
3705 #! $SHELL
3706 # Generated by $as_me.
3707 # Run this file to recreate the current configuration.
3708 # Compiler output produced by configure, useful for debugging
3709 # configure, is in config.log if it exists.
3710
3711 debug=false
3712 ac_cs_recheck=false
3713 ac_cs_silent=false
3714
3715 SHELL=\${CONFIG_SHELL-$SHELL}
3716 export SHELL
3717 _ASEOF
3718 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
3719 ## -------------------- ##
3720 ## M4sh Initialization. ##
3721 ## -------------------- ##
3722
3723 # Be more Bourne compatible
3724 DUALCASE=1; export DUALCASE # for MKS sh
3725 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
3726 emulate sh
3727 NULLCMD=:
3728 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
3729 # is contrary to our usage. Disable this feature.
3730 alias -g '${1+"$@"}'='"$@"'
3731 setopt NO_GLOB_SUBST
3732 else
3733 case `(set -o) 2>/dev/null` in #(
3734 *posix*) :
3735 set -o posix ;; #(
3736 *) :
3737 ;;
3738 esac
3739 fi
3740
3741
3742 as_nl='
3743 '
3744 export as_nl
3745 # Printing a long string crashes Solaris 7 /usr/bin/printf.
3746 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3747 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
3748 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
3749 # Prefer a ksh shell builtin over an external printf program on Solaris,
3750 # but without wasting forks for bash or zsh.
3751 if test -z "$BASH_VERSION$ZSH_VERSION" \
3752 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
3753 as_echo='print -r --'
3754 as_echo_n='print -rn --'
3755 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
3756 as_echo='printf %s\n'
3757 as_echo_n='printf %s'
3758 else
3759 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
3760 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
3761 as_echo_n='/usr/ucb/echo -n'
3762 else
3763 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
3764 as_echo_n_body='eval
3765 arg=$1;
3766 case $arg in #(
3767 *"$as_nl"*)
3768 expr "X$arg" : "X\\(.*\\)$as_nl";
3769 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
3770 esac;
3771 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
3772 '
3773 export as_echo_n_body
3774 as_echo_n='sh -c $as_echo_n_body as_echo'
3775 fi
3776 export as_echo_body
3777 as_echo='sh -c $as_echo_body as_echo'
3778 fi
3779
3780 # The user is always right.
3781 if test "${PATH_SEPARATOR+set}" != set; then
3782 PATH_SEPARATOR=:
3783 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
3784 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
3785 PATH_SEPARATOR=';'
3786 }
3787 fi
3788
3789
3790 # IFS
3791 # We need space, tab and new line, in precisely that order. Quoting is
3792 # there to prevent editors from complaining about space-tab.
3793 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
3794 # splitting by setting IFS to empty value.)
3795 IFS=" "" $as_nl"
3796
3797 # Find who we are. Look in the path if we contain no directory separator.
3798 as_myself=
3799 case $0 in #((
3800 *[\\/]* ) as_myself=$0 ;;
3801 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3802 for as_dir in $PATH
3803 do
3804 IFS=$as_save_IFS
3805 test -z "$as_dir" && as_dir=.
3806 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
3807 done
3808 IFS=$as_save_IFS
3809
3810 ;;
3811 esac
3812 # We did not find ourselves, most probably we were run as `sh COMMAND'
3813 # in which case we are not to be found in the path.
3814 if test "x$as_myself" = x; then
3815 as_myself=$0
3816 fi
3817 if test ! -f "$as_myself"; then
3818 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
3819 exit 1
3820 fi
3821
3822 # Unset variables that we do not need and which cause bugs (e.g. in
3823 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
3824 # suppresses any "Segmentation fault" message there. '((' could
3825 # trigger a bug in pdksh 5.2.14.
3826 for as_var in BASH_ENV ENV MAIL MAILPATH
3827 do eval test x\${$as_var+set} = xset \
3828 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
3829 done
3830 PS1='$ '
3831 PS2='> '
3832 PS4='+ '
3833
3834 # NLS nuisances.
3835 LC_ALL=C
3836 export LC_ALL
3837 LANGUAGE=C
3838 export LANGUAGE
3839
3840 # CDPATH.
3841 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3842
3843
3844 # as_fn_error STATUS ERROR [LINENO LOG_FD]
3845 # ----------------------------------------
3846 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
3847 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
3848 # script with STATUS, using 1 if that was 0.
3849 as_fn_error ()
3850 {
3851 as_status=$1; test $as_status -eq 0 && as_status=1
3852 if test "$4"; then
3853 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3854 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
3855 fi
3856 $as_echo "$as_me: error: $2" >&2
3857 as_fn_exit $as_status
3858 } # as_fn_error
3859
3860
3861 # as_fn_set_status STATUS
3862 # -----------------------
3863 # Set $? to STATUS, without forking.
3864 as_fn_set_status ()
3865 {
3866 return $1
3867 } # as_fn_set_status
3868
3869 # as_fn_exit STATUS
3870 # -----------------
3871 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
3872 as_fn_exit ()
3873 {
3874 set +e
3875 as_fn_set_status $1
3876 exit $1
3877 } # as_fn_exit
3878
3879 # as_fn_unset VAR
3880 # ---------------
3881 # Portably unset VAR.
3882 as_fn_unset ()
3883 {
3884 { eval $1=; unset $1;}
3885 }
3886 as_unset=as_fn_unset
3887 # as_fn_append VAR VALUE
3888 # ----------------------
3889 # Append the text in VALUE to the end of the definition contained in VAR. Take
3890 # advantage of any shell optimizations that allow amortized linear growth over
3891 # repeated appends, instead of the typical quadratic growth present in naive
3892 # implementations.
3893 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
3894 eval 'as_fn_append ()
3895 {
3896 eval $1+=\$2
3897 }'
3898 else
3899 as_fn_append ()
3900 {
3901 eval $1=\$$1\$2
3902 }
3903 fi # as_fn_append
3904
3905 # as_fn_arith ARG...
3906 # ------------------
3907 # Perform arithmetic evaluation on the ARGs, and store the result in the
3908 # global $as_val. Take advantage of shells that can avoid forks. The arguments
3909 # must be portable across $(()) and expr.
3910 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
3911 eval 'as_fn_arith ()
3912 {
3913 as_val=$(( $* ))
3914 }'
3915 else
3916 as_fn_arith ()
3917 {
3918 as_val=`expr "$@" || test $? -eq 1`
3919 }
3920 fi # as_fn_arith
3921
3922
3923 if expr a : '\(a\)' >/dev/null 2>&1 &&
3924 test "X`expr 00001 : '.*\(...\)'`" = X001; then
3925 as_expr=expr
3926 else
3927 as_expr=false
3928 fi
3929
3930 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
3931 as_basename=basename
3932 else
3933 as_basename=false
3934 fi
3935
3936 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
3937 as_dirname=dirname
3938 else
3939 as_dirname=false
3940 fi
3941
3942 as_me=`$as_basename -- "$0" ||
3943 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
3944 X"$0" : 'X\(//\)$' \| \
3945 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
3946 $as_echo X/"$0" |
3947 sed '/^.*\/\([^/][^/]*\)\/*$/{
3948 s//\1/
3949 q
3950 }
3951 /^X\/\(\/\/\)$/{
3952 s//\1/
3953 q
3954 }
3955 /^X\/\(\/\).*/{
3956 s//\1/
3957 q
3958 }
3959 s/.*/./; q'`
3960
3961 # Avoid depending upon Character Ranges.
3962 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
3963 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
3964 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
3965 as_cr_digits='0123456789'
3966 as_cr_alnum=$as_cr_Letters$as_cr_digits
3967
3968 ECHO_C= ECHO_N= ECHO_T=
3969 case `echo -n x` in #(((((
3970 -n*)
3971 case `echo 'xy\c'` in
3972 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
3973 xy) ECHO_C='\c';;
3974 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
3975 ECHO_T=' ';;
3976 esac;;
3977 *)
3978 ECHO_N='-n';;
3979 esac
3980
3981 rm -f conf$$ conf$$.exe conf$$.file
3982 if test -d conf$$.dir; then
3983 rm -f conf$$.dir/conf$$.file
3984 else
3985 rm -f conf$$.dir
3986 mkdir conf$$.dir 2>/dev/null
3987 fi
3988 if (echo >conf$$.file) 2>/dev/null; then
3989 if ln -s conf$$.file conf$$ 2>/dev/null; then
3990 as_ln_s='ln -s'
3991 # ... but there are two gotchas:
3992 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
3993 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
3994 # In both cases, we have to default to `cp -pR'.
3995 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
3996 as_ln_s='cp -pR'
3997 elif ln conf$$.file conf$$ 2>/dev/null; then
3998 as_ln_s=ln
3999 else
4000 as_ln_s='cp -pR'
4001 fi
4002 else
4003 as_ln_s='cp -pR'
4004 fi
4005 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
4006 rmdir conf$$.dir 2>/dev/null
4007
4008
4009 # as_fn_mkdir_p
4010 # -------------
4011 # Create "$as_dir" as a directory, including parents if necessary.
4012 as_fn_mkdir_p ()
4013 {
4014
4015 case $as_dir in #(
4016 -*) as_dir=./$as_dir;;
4017 esac
4018 test -d "$as_dir" || eval $as_mkdir_p || {
4019 as_dirs=
4020 while :; do
4021 case $as_dir in #(
4022 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
4023 *) as_qdir=$as_dir;;
4024 esac
4025 as_dirs="'$as_qdir' $as_dirs"
4026 as_dir=`$as_dirname -- "$as_dir" ||
4027 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4028 X"$as_dir" : 'X\(//\)[^/]' \| \
4029 X"$as_dir" : 'X\(//\)$' \| \
4030 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
4031 $as_echo X"$as_dir" |
4032 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4033 s//\1/
4034 q
4035 }
4036 /^X\(\/\/\)[^/].*/{
4037 s//\1/
4038 q
4039 }
4040 /^X\(\/\/\)$/{
4041 s//\1/
4042 q
4043 }
4044 /^X\(\/\).*/{
4045 s//\1/
4046 q
4047 }
4048 s/.*/./; q'`
4049 test -d "$as_dir" && break
4050 done
4051 test -z "$as_dirs" || eval "mkdir $as_dirs"
4052 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
4053
4054
4055 } # as_fn_mkdir_p
4056 if mkdir -p . 2>/dev/null; then
4057 as_mkdir_p='mkdir -p "$as_dir"'
4058 else
4059 test -d ./-p && rmdir ./-p
4060 as_mkdir_p=false
4061 fi
4062
4063
4064 # as_fn_executable_p FILE
4065 # -----------------------
4066 # Test if FILE is an executable regular file.
4067 as_fn_executable_p ()
4068 {
4069 test -f "$1" && test -x "$1"
4070 } # as_fn_executable_p
4071 as_test_x='test -x'
4072 as_executable_p=as_fn_executable_p
4073
4074 # Sed expression to map a string onto a valid CPP name.
4075 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
4076
4077 # Sed expression to map a string onto a valid variable name.
4078 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
4079
4080
4081 exec 6>&1
4082 ## ----------------------------------- ##
4083 ## Main body of $CONFIG_STATUS script. ##
4084 ## ----------------------------------- ##
4085 _ASEOF
4086 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
4087
4088 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4089 # Save the log message, to keep $0 and so on meaningful, and to
4090 # report actual input values of CONFIG_FILES etc. instead of their
4091 # values after options handling.
4092 ac_log="
4093 This file was extended by ocp-indent $as_me 1.6.1, which was
4094 generated by GNU Autoconf 2.69. Invocation command line was
4095
4096 CONFIG_FILES = $CONFIG_FILES
4097 CONFIG_HEADERS = $CONFIG_HEADERS
4098 CONFIG_LINKS = $CONFIG_LINKS
4099 CONFIG_COMMANDS = $CONFIG_COMMANDS
4100 $ $0 $@
4101
4102 on `(hostname || uname -n) 2>/dev/null | sed 1q`
4103 "
4104
4105 _ACEOF
4106
4107 case $ac_config_files in *"
4108 "*) set x $ac_config_files; shift; ac_config_files=$*;;
4109 esac
4110
4111
4112
4113 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4114 # Files that config.status was made for.
4115 config_files="$ac_config_files"
4116
4117 _ACEOF
4118
4119 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4120 ac_cs_usage="\
4121 \`$as_me' instantiates files and other configuration actions
4122 from templates according to the current configuration. Unless the files
4123 and actions are specified as TAGs, all are instantiated by default.
4124
4125 Usage: $0 [OPTION]... [TAG]...
4126
4127 -h, --help print this help, then exit
4128 -V, --version print version number and configuration settings, then exit
4129 --config print configuration, then exit
4130 -q, --quiet, --silent
4131 do not print progress messages
4132 -d, --debug don't remove temporary files
4133 --recheck update $as_me by reconfiguring in the same conditions
4134 --file=FILE[:TEMPLATE]
4135 instantiate the configuration file FILE
4136
4137 Configuration files:
4138 $config_files
4139
4140 Report bugs to the package provider."
4141
4142 _ACEOF
4143 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4144 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
4145 ac_cs_version="\\
4146 ocp-indent config.status 1.6.1
4147 configured by $0, generated by GNU Autoconf 2.69,
4148 with options \\"\$ac_cs_config\\"
4149
4150 Copyright (C) 2012 Free Software Foundation, Inc.
4151 This config.status script is free software; the Free Software Foundation
4152 gives unlimited permission to copy, distribute and modify it."
4153
4154 ac_pwd='$ac_pwd'
4155 srcdir='$srcdir'
4156 test -n "\$AWK" || AWK=awk
4157 _ACEOF
4158
4159 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4160 # The default lists apply if the user does not specify any file.
4161 ac_need_defaults=:
4162 while test $# != 0
4163 do
4164 case $1 in
4165 --*=?*)
4166 ac_option=`expr "X$1" : 'X\([^=]*\)='`
4167 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
4168 ac_shift=:
4169 ;;
4170 --*=)
4171 ac_option=`expr "X$1" : 'X\([^=]*\)='`
4172 ac_optarg=
4173 ac_shift=:
4174 ;;
4175 *)
4176 ac_option=$1
4177 ac_optarg=$2
4178 ac_shift=shift
4179 ;;
4180 esac
4181
4182 case $ac_option in
4183 # Handling of the options.
4184 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4185 ac_cs_recheck=: ;;
4186 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
4187 $as_echo "$ac_cs_version"; exit ;;
4188 --config | --confi | --conf | --con | --co | --c )
4189 $as_echo "$ac_cs_config"; exit ;;
4190 --debug | --debu | --deb | --de | --d | -d )
4191 debug=: ;;
4192 --file | --fil | --fi | --f )
4193 $ac_shift
4194 case $ac_optarg in
4195 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
4196 '') as_fn_error $? "missing file argument" ;;
4197 esac
4198 as_fn_append CONFIG_FILES " '$ac_optarg'"
4199 ac_need_defaults=false;;
4200 --he | --h | --help | --hel | -h )
4201 $as_echo "$ac_cs_usage"; exit ;;
4202 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
4203 | -silent | --silent | --silen | --sile | --sil | --si | --s)
4204 ac_cs_silent=: ;;
4205
4206 # This is an error.
4207 -*) as_fn_error $? "unrecognized option: \`$1'
4208 Try \`$0 --help' for more information." ;;
4209
4210 *) as_fn_append ac_config_targets " $1"
4211 ac_need_defaults=false ;;
4212
4213 esac
4214 shift
4215 done
4216
4217 ac_configure_extra_args=
4218
4219 if $ac_cs_silent; then
4220 exec 6>/dev/null
4221 ac_configure_extra_args="$ac_configure_extra_args --silent"
4222 fi
4223
4224 _ACEOF
4225 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4226 if \$ac_cs_recheck; then
4227 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
4228 shift
4229 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
4230 CONFIG_SHELL='$SHELL'
4231 export CONFIG_SHELL
4232 exec "\$@"
4233 fi
4234
4235 _ACEOF
4236 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4237 exec 5>>config.log
4238 {
4239 echo
4240 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
4241 ## Running $as_me. ##
4242 _ASBOX
4243 $as_echo "$ac_log"
4244 } >&5
4245
4246 _ACEOF
4247 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4248 _ACEOF
4249
4250 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4251
4252 # Handling of arguments.
4253 for ac_config_target in $ac_config_targets
4254 do
4255 case $ac_config_target in
4256 "Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;;
4257 "version.ocp") CONFIG_FILES="$CONFIG_FILES version.ocp" ;;
4258
4259 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
4260 esac
4261 done
4262
4263
4264 # If the user did not use the arguments to specify the items to instantiate,
4265 # then the envvar interface is used. Set only those that are not.
4266 # We use the long form for the default assignment because of an extremely
4267 # bizarre bug on SunOS 4.1.3.
4268 if $ac_need_defaults; then
4269 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
4270 fi
4271
4272 # Have a temporary directory for convenience. Make it in the build tree
4273 # simply because there is no reason against having it here, and in addition,
4274 # creating and moving files from /tmp can sometimes cause problems.
4275 # Hook for its removal unless debugging.
4276 # Note that there is a small window in which the directory will not be cleaned:
4277 # after its creation but before its name has been assigned to `$tmp'.
4278 $debug ||
4279 {
4280 tmp= ac_tmp=
4281 trap 'exit_status=$?
4282 : "${ac_tmp:=$tmp}"
4283 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
4284 ' 0
4285 trap 'as_fn_exit 1' 1 2 13 15
4286 }
4287 # Create a (secure) tmp directory for tmp files.
4288
4289 {
4290 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
4291 test -d "$tmp"
4292 } ||
4293 {
4294 tmp=./conf$$-$RANDOM
4295 (umask 077 && mkdir "$tmp")
4296 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
4297 ac_tmp=$tmp
4298
4299 # Set up the scripts for CONFIG_FILES section.
4300 # No need to generate them if there are no CONFIG_FILES.
4301 # This happens for instance with `./config.status config.h'.
4302 if test -n "$CONFIG_FILES"; then
4303
4304
4305 ac_cr=`echo X | tr X '\015'`
4306 # On cygwin, bash can eat \r inside `` if the user requested igncr.
4307 # But we know of no other shell where ac_cr would be empty at this
4308 # point, so we can use a bashism as a fallback.
4309 if test "x$ac_cr" = x; then
4310 eval ac_cr=\$\'\\r\'
4311 fi
4312 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
4313 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
4314 ac_cs_awk_cr='\\r'
4315 else
4316 ac_cs_awk_cr=$ac_cr
4317 fi
4318
4319 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
4320 _ACEOF
4321
4322
4323 {
4324 echo "cat >conf$$subs.awk <<_ACEOF" &&
4325 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
4326 echo "_ACEOF"
4327 } >conf$$subs.sh ||
4328 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
4329 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
4330 ac_delim='%!_!# '
4331 for ac_last_try in false false false false false :; do
4332 . ./conf$$subs.sh ||
4333 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
4334
4335 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
4336 if test $ac_delim_n = $ac_delim_num; then
4337 break
4338 elif $ac_last_try; then
4339 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
4340 else
4341 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
4342 fi
4343 done
4344 rm -f conf$$subs.sh
4345
4346 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4347 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
4348 _ACEOF
4349 sed -n '
4350 h
4351 s/^/S["/; s/!.*/"]=/
4352 p
4353 g
4354 s/^[^!]*!//
4355 :repl
4356 t repl
4357 s/'"$ac_delim"'$//
4358 t delim
4359 :nl
4360 h
4361 s/\(.\{148\}\)..*/\1/
4362 t more1
4363 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
4364 p
4365 n
4366 b repl
4367 :more1
4368 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
4369 p
4370 g
4371 s/.\{148\}//
4372 t nl
4373 :delim
4374 h
4375 s/\(.\{148\}\)..*/\1/
4376 t more2
4377 s/["\\]/\\&/g; s/^/"/; s/$/"/
4378 p
4379 b
4380 :more2
4381 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
4382 p
4383 g
4384 s/.\{148\}//
4385 t delim
4386 ' <conf$$subs.awk | sed '
4387 /^[^""]/{
4388 N
4389 s/\n//
4390 }
4391 ' >>$CONFIG_STATUS || ac_write_fail=1
4392 rm -f conf$$subs.awk
4393 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4394 _ACAWK
4395 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
4396 for (key in S) S_is_set[key] = 1
4397 FS = ""
4398
4399 }
4400 {
4401 line = $ 0
4402 nfields = split(line, field, "@")
4403 substed = 0
4404 len = length(field[1])
4405 for (i = 2; i < nfields; i++) {
4406 key = field[i]
4407 keylen = length(key)
4408 if (S_is_set[key]) {
4409 value = S[key]
4410 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
4411 len += length(value) + length(field[++i])
4412 substed = 1
4413 } else
4414 len += 1 + keylen
4415 }
4416
4417 print line
4418 }
4419
4420 _ACAWK
4421 _ACEOF
4422 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4423 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
4424 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
4425 else
4426 cat
4427 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
4428 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
4429 _ACEOF
4430
4431 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
4432 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
4433 # trailing colons and then remove the whole line if VPATH becomes empty
4434 # (actually we leave an empty line to preserve line numbers).
4435 if test "x$srcdir" = x.; then
4436 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
4437 h
4438 s///
4439 s/^/:/
4440 s/[ ]*$/:/
4441 s/:\$(srcdir):/:/g
4442 s/:\${srcdir}:/:/g
4443 s/:@srcdir@:/:/g
4444 s/^:*//
4445 s/:*$//
4446 x
4447 s/\(=[ ]*\).*/\1/
4448 G
4449 s/\n//
4450 s/^[^=]*=[ ]*$//
4451 }'
4452 fi
4453
4454 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4455 fi # test -n "$CONFIG_FILES"
4456
4457
4458 eval set X " :F $CONFIG_FILES "
4459 shift
4460 for ac_tag
4461 do
4462 case $ac_tag in
4463 :[FHLC]) ac_mode=$ac_tag; continue;;
4464 esac
4465 case $ac_mode$ac_tag in
4466 :[FHL]*:*);;
4467 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
4468 :[FH]-) ac_tag=-:-;;
4469 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
4470 esac
4471 ac_save_IFS=$IFS
4472 IFS=:
4473 set x $ac_tag
4474 IFS=$ac_save_IFS
4475 shift
4476 ac_file=$1
4477 shift
4478
4479 case $ac_mode in
4480 :L) ac_source=$1;;
4481 :[FH])
4482 ac_file_inputs=
4483 for ac_f
4484 do
4485 case $ac_f in
4486 -) ac_f="$ac_tmp/stdin";;
4487 *) # Look for the file first in the build tree, then in the source tree
4488 # (if the path is not absolute). The absolute path cannot be DOS-style,
4489 # because $ac_f cannot contain `:'.
4490 test -f "$ac_f" ||
4491 case $ac_f in
4492 [\\/$]*) false;;
4493 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
4494 esac ||
4495 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
4496 esac
4497 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
4498 as_fn_append ac_file_inputs " '$ac_f'"
4499 done
4500
4501 # Let's still pretend it is `configure' which instantiates (i.e., don't
4502 # use $as_me), people would be surprised to read:
4503 # /* config.h. Generated by config.status. */
4504 configure_input='Generated from '`
4505 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
4506 `' by configure.'
4507 if test x"$ac_file" != x-; then
4508 configure_input="$ac_file. $configure_input"
4509 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
4510 $as_echo "$as_me: creating $ac_file" >&6;}
4511 fi
4512 # Neutralize special characters interpreted by sed in replacement strings.
4513 case $configure_input in #(
4514 *\&* | *\|* | *\\* )
4515 ac_sed_conf_input=`$as_echo "$configure_input" |
4516 sed 's/[\\\\&|]/\\\\&/g'`;; #(
4517 *) ac_sed_conf_input=$configure_input;;
4518 esac
4519
4520 case $ac_tag in
4521 *:-:* | *:-) cat >"$ac_tmp/stdin" \
4522 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
4523 esac
4524 ;;
4525 esac
4526
4527 ac_dir=`$as_dirname -- "$ac_file" ||
4528 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4529 X"$ac_file" : 'X\(//\)[^/]' \| \
4530 X"$ac_file" : 'X\(//\)$' \| \
4531 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
4532 $as_echo X"$ac_file" |
4533 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
4534 s//\1/
4535 q
4536 }
4537 /^X\(\/\/\)[^/].*/{
4538 s//\1/
4539 q
4540 }
4541 /^X\(\/\/\)$/{
4542 s//\1/
4543 q
4544 }
4545 /^X\(\/\).*/{
4546 s//\1/
4547 q
4548 }
4549 s/.*/./; q'`
4550 as_dir="$ac_dir"; as_fn_mkdir_p
4551 ac_builddir=.
4552
4553 case "$ac_dir" in
4554 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
4555 *)
4556 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
4557 # A ".." for each directory in $ac_dir_suffix.
4558 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
4559 case $ac_top_builddir_sub in
4560 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
4561 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
4562 esac ;;
4563 esac
4564 ac_abs_top_builddir=$ac_pwd
4565 ac_abs_builddir=$ac_pwd$ac_dir_suffix
4566 # for backward compatibility:
4567 ac_top_builddir=$ac_top_build_prefix
4568
4569 case $srcdir in
4570 .) # We are building in place.
4571 ac_srcdir=.
4572 ac_top_srcdir=$ac_top_builddir_sub
4573 ac_abs_top_srcdir=$ac_pwd ;;
4574 [\\/]* | ?:[\\/]* ) # Absolute name.
4575 ac_srcdir=$srcdir$ac_dir_suffix;
4576 ac_top_srcdir=$srcdir
4577 ac_abs_top_srcdir=$srcdir ;;
4578 *) # Relative name.
4579 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
4580 ac_top_srcdir=$ac_top_build_prefix$srcdir
4581 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
4582 esac
4583 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
4584
4585
4586 case $ac_mode in
4587 :F)
4588 #
4589 # CONFIG_FILE
4590 #
4591
4592 _ACEOF
4593
4594 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4595 # If the template does not know about datarootdir, expand it.
4596 # FIXME: This hack should be removed a few years after 2.60.
4597 ac_datarootdir_hack=; ac_datarootdir_seen=
4598 ac_sed_dataroot='
4599 /datarootdir/ {
4600 p
4601 q
4602 }
4603 /@datadir@/p
4604 /@docdir@/p
4605 /@infodir@/p
4606 /@localedir@/p
4607 /@mandir@/p'
4608 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
4609 *datarootdir*) ac_datarootdir_seen=yes;;
4610 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
4612 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
4613 _ACEOF
4614 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4615 ac_datarootdir_hack='
4616 s&@datadir@&$datadir&g
4617 s&@docdir@&$docdir&g
4618 s&@infodir@&$infodir&g
4619 s&@localedir@&$localedir&g
4620 s&@mandir@&$mandir&g
4621 s&\\\${datarootdir}&$datarootdir&g' ;;
4622 esac
4623 _ACEOF
4624
4625 # Neutralize VPATH when `$srcdir' = `.'.
4626 # Shell code in configure.ac might set extrasub.
4627 # FIXME: do we really want to maintain this feature?
4628 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4629 ac_sed_extra="$ac_vpsub
4630 $extrasub
4631 _ACEOF
4632 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4633 :t
4634 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
4635 s|@configure_input@|$ac_sed_conf_input|;t t
4636 s&@top_builddir@&$ac_top_builddir_sub&;t t
4637 s&@top_build_prefix@&$ac_top_build_prefix&;t t
4638 s&@srcdir@&$ac_srcdir&;t t
4639 s&@abs_srcdir@&$ac_abs_srcdir&;t t
4640 s&@top_srcdir@&$ac_top_srcdir&;t t
4641 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
4642 s&@builddir@&$ac_builddir&;t t
4643 s&@abs_builddir@&$ac_abs_builddir&;t t
4644 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
4645 $ac_datarootdir_hack
4646 "
4647 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
4648 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
4649
4650 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
4651 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
4652 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
4653 "$ac_tmp/out"`; test -z "$ac_out"; } &&
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
4655 which seems to be undefined. Please make sure it is defined" >&5
4656 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
4657 which seems to be undefined. Please make sure it is defined" >&2;}
4658
4659 rm -f "$ac_tmp/stdin"
4660 case $ac_file in
4661 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
4662 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
4663 esac \
4664 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
4665 ;;
4666
4667
4668
4669 esac
4670
4671 done # for ac_tag
4672
4673
4674 as_fn_exit 0
4675 _ACEOF
4676 ac_clean_files=$ac_clean_files_save
4677
4678 test $ac_write_fail = 0 ||
4679 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
4680
4681
4682 # configure is writing to config.log, and then calls config.status.
4683 # config.status does its own redirection, appending to config.log.
4684 # Unfortunately, on DOS this fails, as config.log is still kept open
4685 # by configure, so config.status won't be able to write to it; its
4686 # output is simply discarded. So we exec the FD to /dev/null,
4687 # effectively closing config.log, so it can be properly (re)opened and
4688 # appended to by config.status. When coming back to configure, we
4689 # need to make the FD available again.
4690 if test "$no_create" != yes; then
4691 ac_cs_success=:
4692 ac_config_status_args=
4693 test "$silent" = yes &&
4694 ac_config_status_args="$ac_config_status_args --quiet"
4695 exec 5>/dev/null
4696 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
4697 exec 5>>config.log
4698 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
4699 # would make configure fail if this is the last instruction.
4700 $ac_cs_success || as_fn_exit 1
4701 fi
4702 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
4704 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
4705 fi
4706
4707
4708 if test "$prefix" = "NONE"; then
4709 prefix=$ac_default_prefix
4710 fi
4711
4712 bindir="`eval echo ${bindir}`"
4713 bindir="`eval echo ${bindir}`"
4714
4715 echo
4716 echo Executables will be installed in ${bindir}
+0
-26
configure.ac less more
0 AC_INIT(ocp-indent,1.6.1)
1 AC_COPYRIGHT(Copyright 2013-2017 OcamlPro SAS)
2
3 AC_CONFIG_MACRO_DIR([m4])
4 AC_PROG_CC
5
6 AC_PROG_OCAML
7 if test "$OCAMLC" = "no"; then
8 AC_MSG_ERROR([You must install the OCaml compiler])
9 fi
10
11 AC_CONFIG_FILES(
12 Makefile.config
13 version.ocp
14 )
15 AC_OUTPUT
16
17 if test "$prefix" = "NONE"; then
18 prefix=$ac_default_prefix
19 fi
20
21 bindir="`eval echo ${bindir}`"
22 bindir="`eval echo ${bindir}`"
23
24 echo
25 echo Executables will be installed in ${bindir}
0 (rule
1 (targets ocp-indent.1)
2 (action
3 (with-stdout-to %{targets}
4 (run %{bin:ocp-indent} --help=groff)))
5 )
6 (install
7 (section man)
8 (files ocp-indent.1)
9 )
0 (lang dune 1.0)
1 (name ocp-indent)
+0
-107
install.sh less more
0 #!/bin/bash
1 mkdir -p "$1/bin"
2 if [ -e "_obuild/ocp-indent/ocp-indent.asm" ]
3 then install -m 0755 "_obuild/ocp-indent/ocp-indent.asm" "$1/bin/ocp-indent"
4 else echo "Error: _obuild/ocp-indent/ocp-indent.asm doesn't exist"
5 fi
6 mkdir -p "$1/lib/ocp-indent"
7 if [ -e "META" ]
8 then install -m 0644 "META" "$1/lib/ocp-indent/META"
9 else echo "Error: META doesn't exist"
10 fi
11 mkdir -p "$1/lib/ocp-indent/lib"
12 if [ -e "_obuild/ocp-indent.lib/ocp-indent.lib.a" ]
13 then install -m 0644 "_obuild/ocp-indent.lib/ocp-indent.lib.a" "$1/lib/ocp-indent/lib/ocp-indent.lib.a"
14 else echo "Error: _obuild/ocp-indent.lib/ocp-indent.lib.a doesn't exist"
15 fi
16 if [ -e "_obuild/ocp-indent.lib/ocp-indent.lib.cma" ]
17 then install -m 0644 "_obuild/ocp-indent.lib/ocp-indent.lib.cma" "$1/lib/ocp-indent/lib/ocp-indent.lib.cma"
18 else echo "Error: _obuild/ocp-indent.lib/ocp-indent.lib.cma doesn't exist"
19 fi
20 if [ -e "_obuild/ocp-indent.lib/ocp-indent.lib.cmxa" ]
21 then install -m 0644 "_obuild/ocp-indent.lib/ocp-indent.lib.cmxa" "$1/lib/ocp-indent/lib/ocp-indent.lib.cmxa"
22 else echo "Error: _obuild/ocp-indent.lib/ocp-indent.lib.cmxa doesn't exist"
23 fi
24 if [ -e "_obuild/ocp-indent.lib/indentConfig.cmi" ]
25 then install -m 0644 "_obuild/ocp-indent.lib/indentConfig.cmi" "$1/lib/ocp-indent/lib/indentConfig.cmi"
26 else echo "Error: _obuild/ocp-indent.lib/indentConfig.cmi doesn't exist"
27 fi
28 if [ -e "_obuild/ocp-indent.lib/indentConfig.cmti" ]
29 then install -m 0644 "_obuild/ocp-indent.lib/indentConfig.cmti" "$1/lib/ocp-indent/lib/indentConfig.cmti"
30 fi
31 if [ -e "_obuild/ocp-indent.lib/indentBlock.cmi" ]
32 then install -m 0644 "_obuild/ocp-indent.lib/indentBlock.cmi" "$1/lib/ocp-indent/lib/indentBlock.cmi"
33 else echo "Error: _obuild/ocp-indent.lib/indentBlock.cmi doesn't exist"
34 fi
35 if [ -e "_obuild/ocp-indent.lib/indentBlock.cmti" ]
36 then install -m 0644 "_obuild/ocp-indent.lib/indentBlock.cmti" "$1/lib/ocp-indent/lib/indentBlock.cmti"
37 fi
38 if [ -e "_obuild/ocp-indent.lib/indentPrinter.cmi" ]
39 then install -m 0644 "_obuild/ocp-indent.lib/indentPrinter.cmi" "$1/lib/ocp-indent/lib/indentPrinter.cmi"
40 else echo "Error: _obuild/ocp-indent.lib/indentPrinter.cmi doesn't exist"
41 fi
42 if [ -e "_obuild/ocp-indent.lib/indentPrinter.cmti" ]
43 then install -m 0644 "_obuild/ocp-indent.lib/indentPrinter.cmti" "$1/lib/ocp-indent/lib/indentPrinter.cmti"
44 fi
45 mkdir -p "$1/lib/ocp-indent/utils"
46 if [ -e "_obuild/ocp-indent.utils/ocp-indent.utils.a" ]
47 then install -m 0644 "_obuild/ocp-indent.utils/ocp-indent.utils.a" "$1/lib/ocp-indent/utils/ocp-indent.utils.a"
48 else echo "Error: _obuild/ocp-indent.utils/ocp-indent.utils.a doesn't exist"
49 fi
50 if [ -e "_obuild/ocp-indent.utils/ocp-indent.utils.cma" ]
51 then install -m 0644 "_obuild/ocp-indent.utils/ocp-indent.utils.cma" "$1/lib/ocp-indent/utils/ocp-indent.utils.cma"
52 else echo "Error: _obuild/ocp-indent.utils/ocp-indent.utils.cma doesn't exist"
53 fi
54 if [ -e "_obuild/ocp-indent.utils/ocp-indent.utils.cmxa" ]
55 then install -m 0644 "_obuild/ocp-indent.utils/ocp-indent.utils.cmxa" "$1/lib/ocp-indent/utils/ocp-indent.utils.cmxa"
56 else echo "Error: _obuild/ocp-indent.utils/ocp-indent.utils.cmxa doesn't exist"
57 fi
58 if [ -e "_obuild/ocp-indent.utils/nstream.cmi" ]
59 then install -m 0644 "_obuild/ocp-indent.utils/nstream.cmi" "$1/lib/ocp-indent/utils/nstream.cmi"
60 else echo "Error: _obuild/ocp-indent.utils/nstream.cmi doesn't exist"
61 fi
62 if [ -e "_obuild/ocp-indent.utils/nstream.cmti" ]
63 then install -m 0644 "_obuild/ocp-indent.utils/nstream.cmti" "$1/lib/ocp-indent/utils/nstream.cmti"
64 fi
65 mkdir -p "$1/lib/ocp-indent/lexer"
66 if [ -e "_obuild/ocp-indent.lexer/ocp-indent.lexer.a" ]
67 then install -m 0644 "_obuild/ocp-indent.lexer/ocp-indent.lexer.a" "$1/lib/ocp-indent/lexer/ocp-indent.lexer.a"
68 else echo "Error: _obuild/ocp-indent.lexer/ocp-indent.lexer.a doesn't exist"
69 fi
70 if [ -e "_obuild/ocp-indent.lexer/ocp-indent.lexer.cma" ]
71 then install -m 0644 "_obuild/ocp-indent.lexer/ocp-indent.lexer.cma" "$1/lib/ocp-indent/lexer/ocp-indent.lexer.cma"
72 else echo "Error: _obuild/ocp-indent.lexer/ocp-indent.lexer.cma doesn't exist"
73 fi
74 if [ -e "_obuild/ocp-indent.lexer/ocp-indent.lexer.cmxa" ]
75 then install -m 0644 "_obuild/ocp-indent.lexer/ocp-indent.lexer.cmxa" "$1/lib/ocp-indent/lexer/ocp-indent.lexer.cmxa"
76 else echo "Error: _obuild/ocp-indent.lexer/ocp-indent.lexer.cmxa doesn't exist"
77 fi
78 if [ -e "_obuild/ocp-indent.lexer/approx_tokens.cmi" ]
79 then install -m 0644 "_obuild/ocp-indent.lexer/approx_tokens.cmi" "$1/lib/ocp-indent/lexer/approx_tokens.cmi"
80 else echo "Error: _obuild/ocp-indent.lexer/approx_tokens.cmi doesn't exist"
81 fi
82 if [ -e "_obuild/ocp-indent.lexer/approx_tokens.cmt" ]
83 then install -m 0644 "_obuild/ocp-indent.lexer/approx_tokens.cmt" "$1/lib/ocp-indent/lexer/approx_tokens.cmt"
84 fi
85 if [ -e "_obuild/ocp-indent.lexer/approx_lexer.cmi" ]
86 then install -m 0644 "_obuild/ocp-indent.lexer/approx_lexer.cmi" "$1/lib/ocp-indent/lexer/approx_lexer.cmi"
87 else echo "Error: _obuild/ocp-indent.lexer/approx_lexer.cmi doesn't exist"
88 fi
89 if [ -e "_obuild/ocp-indent.lexer/approx_lexer.cmt" ]
90 then install -m 0644 "_obuild/ocp-indent.lexer/approx_lexer.cmt" "$1/lib/ocp-indent/lexer/approx_lexer.cmt"
91 fi
92 mkdir -p "$1/man/man1"
93 if [ -e "man/man1/ocp-indent.1" ]
94 then install -m 0644 "man/man1/ocp-indent.1" "$1/man/man1/ocp-indent.1"
95 else echo "Error: man/man1/ocp-indent.1 doesn't exist"
96 fi
97 mkdir -p "$1/share/ocp-indent/vim/indent"
98 if [ -e "tools/ocp-indent.vim" ]
99 then install -m 0644 "tools/ocp-indent.vim" "$1/share/ocp-indent/vim/indent/ocaml.vim"
100 else echo "Error: tools/ocp-indent.vim doesn't exist"
101 fi
102 mkdir -p "$1/share/emacs/site-lisp"
103 if [ -e "tools/ocp-indent.el" ]
104 then install -m 0644 "tools/ocp-indent.el" "$1/share/emacs/site-lisp/ocp-indent.el"
105 else echo "Error: tools/ocp-indent.el doesn't exist"
106 fi
+0
-240
m4/ocaml.m4 less more
0 dnl autoconf macros for OCaml
1 dnl
2 dnl Copyright © 2009 Richard W.M. Jones
3 dnl Copyright © 2009 Stefano Zacchiroli
4 dnl Copyright © 2000-2005 Olivier Andrieu
5 dnl Copyright © 2000-2005 Jean-Christophe Filliâtre
6 dnl Copyright © 2000-2005 Georges Mariano
7 dnl
8 dnl For documentation, please read the ocaml.m4 man page.
9
10 AC_DEFUN([AC_PROG_OCAML],
11 [dnl
12 # checking for ocamlc
13 AC_CHECK_TOOL([OCAMLC],[ocamlc],[no])
14
15 if test "$OCAMLC" != "no"; then
16 OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'`
17 AC_MSG_RESULT([OCaml version is $OCAMLVERSION])
18 # If OCAMLLIB is set, use it
19 if test "$OCAMLLIB" = ""; then
20 OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4`
21 else
22 AC_MSG_RESULT([OCAMLLIB previously set; preserving it.])
23 fi
24 AC_MSG_RESULT([OCaml library path is $OCAMLLIB])
25
26 AC_SUBST([OCAMLVERSION])
27 AC_SUBST([OCAMLLIB])
28
29 # checking for ocamlopt
30 AC_CHECK_TOOL([OCAMLOPT],[ocamlopt],[no])
31 OCAMLBEST=byte
32 if test "$OCAMLOPT" = "no"; then
33 AC_MSG_WARN([Cannot find ocamlopt; bytecode compilation only.])
34 else
35 TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
36 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
37 AC_MSG_RESULT([versions differs from ocamlc; ocamlopt discarded.])
38 OCAMLOPT=no
39 else
40 OCAMLBEST=opt
41 fi
42 fi
43
44 AC_SUBST([OCAMLBEST])
45
46 # checking for ocamlc.opt
47 AC_CHECK_TOOL([OCAMLCDOTOPT],[ocamlc.opt],[no])
48 if test "$OCAMLCDOTOPT" != "no"; then
49 TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
50 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
51 AC_MSG_RESULT([versions differs from ocamlc; ocamlc.opt discarded.])
52 else
53 OCAMLC=$OCAMLCDOTOPT
54 fi
55 fi
56
57 # checking for ocamlopt.opt
58 if test "$OCAMLOPT" != "no" ; then
59 AC_CHECK_TOOL([OCAMLOPTDOTOPT],[ocamlopt.opt],[no])
60 if test "$OCAMLOPTDOTOPT" != "no"; then
61 TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
62 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
63 AC_MSG_RESULT([version differs from ocamlc; ocamlopt.opt discarded.])
64 else
65 OCAMLOPT=$OCAMLOPTDOTOPT
66 fi
67 fi
68 fi
69
70 AC_SUBST([OCAMLOPT])
71 fi
72
73 AC_SUBST([OCAMLC])
74
75 # checking for ocaml toplevel
76 AC_CHECK_TOOL([OCAML],[ocaml],[no])
77
78 # checking for ocamldep
79 AC_CHECK_TOOL([OCAMLDEP],[ocamldep],[no])
80
81 # checking for ocamlmktop
82 AC_CHECK_TOOL([OCAMLMKTOP],[ocamlmktop],[no])
83
84 # checking for ocamlmklib
85 AC_CHECK_TOOL([OCAMLMKLIB],[ocamlmklib],[no])
86
87 # checking for ocamldoc
88 AC_CHECK_TOOL([OCAMLDOC],[ocamldoc],[no])
89
90 # checking for ocamlbuild
91 AC_CHECK_TOOL([OCAMLBUILD],[ocamlbuild],[no])
92 ])
93
94
95 AC_DEFUN([AC_PROG_OCAMLLEX],
96 [dnl
97 # checking for ocamllex
98 AC_CHECK_TOOL([OCAMLLEX],[ocamllex],[no])
99 if test "$OCAMLLEX" != "no"; then
100 AC_CHECK_TOOL([OCAMLLEXDOTOPT],[ocamllex.opt],[no])
101 if test "$OCAMLLEXDOTOPT" != "no"; then
102 OCAMLLEX=$OCAMLLEXDOTOPT
103 fi
104 fi
105 AC_SUBST([OCAMLLEX])
106 ])
107
108 AC_DEFUN([AC_PROG_OCAMLYACC],
109 [dnl
110 AC_CHECK_TOOL([OCAMLYACC],[ocamlyacc],[no])
111 AC_SUBST([OCAMLYACC])
112 ])
113
114
115 AC_DEFUN([AC_PROG_CAMLP4],
116 [dnl
117 AC_REQUIRE([AC_PROG_OCAML])dnl
118
119 # checking for camlp4
120 AC_CHECK_TOOL([CAMLP4],[camlp4],[no])
121 if test "$CAMLP4" != "no"; then
122 TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p'`
123 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
124 AC_MSG_RESULT([versions differs from ocamlc])
125 CAMLP4=no
126 fi
127 fi
128 AC_SUBST([CAMLP4])
129
130 # checking for companion tools
131 AC_CHECK_TOOL([CAMLP4BOOT],[camlp4boot],[no])
132 AC_CHECK_TOOL([CAMLP4O],[camlp4o],[no])
133 AC_CHECK_TOOL([CAMLP4OF],[camlp4of],[no])
134 AC_CHECK_TOOL([CAMLP4OOF],[camlp4oof],[no])
135 AC_CHECK_TOOL([CAMLP4ORF],[camlp4orf],[no])
136 AC_CHECK_TOOL([CAMLP4PROF],[camlp4prof],[no])
137 AC_CHECK_TOOL([CAMLP4R],[camlp4r],[no])
138 AC_CHECK_TOOL([CAMLP4RF],[camlp4rf],[no])
139 AC_SUBST([CAMLP4BOOT])
140 AC_SUBST([CAMLP4O])
141 AC_SUBST([CAMLP4OF])
142 AC_SUBST([CAMLP4OOF])
143 AC_SUBST([CAMLP4ORF])
144 AC_SUBST([CAMLP4PROF])
145 AC_SUBST([CAMLP4R])
146 AC_SUBST([CAMLP4RF])
147 ])
148
149
150 AC_DEFUN([AC_PROG_FINDLIB],
151 [dnl
152 AC_REQUIRE([AC_PROG_OCAML])dnl
153
154 # checking for ocamlfind
155 AC_CHECK_TOOL([OCAMLFIND],[ocamlfind],[no])
156 AC_SUBST([OCAMLFIND])
157 ])
158
159
160 dnl Thanks to Jim Meyering for working this next bit out for us.
161 dnl XXX We should define AS_TR_SH if it's not defined already
162 dnl (eg. for old autoconf).
163 AC_DEFUN([AC_CHECK_OCAML_PKG],
164 [dnl
165 AC_REQUIRE([AC_PROG_FINDLIB])dnl
166
167 AC_MSG_CHECKING([for OCaml findlib package $1])
168
169 unset found
170 unset pkg
171 found=no
172 for pkg in $1 $2 ; do
173 if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then
174 AC_MSG_RESULT([found])
175 AS_TR_SH([OCAML_PKG_$1])=$pkg
176 found=yes
177 break
178 fi
179 done
180 if test "$found" = "no" ; then
181 AC_MSG_RESULT([not found])
182 AS_TR_SH([OCAML_PKG_$1])=no
183 fi
184
185 AC_SUBST(AS_TR_SH([OCAML_PKG_$1]))
186 ])
187
188
189 AC_DEFUN([AC_CHECK_OCAML_MODULE],
190 [dnl
191 AC_MSG_CHECKING([for OCaml module $2])
192
193 cat > conftest.ml <<EOF
194 open $3
195 EOF
196 unset found
197 for $1 in $$1 $4 ; do
198 if $OCAMLC -c -I "$$1" conftest.ml >&5 2>&5 ; then
199 found=yes
200 break
201 fi
202 done
203
204 if test "$found" ; then
205 AC_MSG_RESULT([$$1])
206 else
207 AC_MSG_RESULT([not found])
208 $1=no
209 fi
210 AC_SUBST([$1])
211 ])
212
213
214 dnl XXX Cross-compiling
215 AC_DEFUN([AC_CHECK_OCAML_WORD_SIZE],
216 [dnl
217 AC_REQUIRE([AC_PROG_OCAML])dnl
218 AC_MSG_CHECKING([for OCaml compiler word size])
219 cat > conftest.ml <<EOF
220 print_endline (string_of_int Sys.word_size)
221 EOF
222 OCAML_WORD_SIZE=`$OCAML conftest.ml`
223 AC_MSG_RESULT([$OCAML_WORD_SIZE])
224 AC_SUBST([OCAML_WORD_SIZE])
225 ])
226
227 AC_DEFUN([AC_CHECK_OCAML_OS_TYPE],
228 [dnl
229 AC_REQUIRE([AC_PROG_OCAML])dnl
230 AC_MSG_CHECKING([OCaml Sys.os_type])
231
232 cat > conftest.ml <<EOF
233 print_string(Sys.os_type);;
234 EOF
235
236 OCAML_OS_TYPE=`$OCAML conftest.ml`
237 AC_MSG_RESULT([$OCAML_OS_TYPE])
238 AC_SUBST([OCAML_OS_TYPE])
239 ])
+0
-42
ocp-indent.install less more
0 bin: [
1 "_obuild/ocp-indent/ocp-indent.asm" {"ocp-indent"}
2 ]
3 lib: [
4 "META"
5 "_obuild/ocp-indent.lib/ocp-indent.lib.a" {"lib/ocp-indent.lib.a"}
6 "_obuild/ocp-indent.lib/ocp-indent.lib.cma" {"lib/ocp-indent.lib.cma"}
7 "_obuild/ocp-indent.lib/ocp-indent.lib.cmxa" {"lib/ocp-indent.lib.cmxa"}
8 "_obuild/ocp-indent.lib/indentConfig.cmi" {"lib/indentConfig.cmi"}
9 "?_obuild/ocp-indent.lib/indentConfig.cmti" {"lib/indentConfig.cmti"}
10 "_obuild/ocp-indent.lib/indentBlock.cmi" {"lib/indentBlock.cmi"}
11 "?_obuild/ocp-indent.lib/indentBlock.cmti" {"lib/indentBlock.cmti"}
12 "_obuild/ocp-indent.lib/indentPrinter.cmi" {"lib/indentPrinter.cmi"}
13 "?_obuild/ocp-indent.lib/indentPrinter.cmti" {"lib/indentPrinter.cmti"}
14 "_obuild/ocp-indent.utils/ocp-indent.utils.a" {"utils/ocp-indent.utils.a"}
15 "_obuild/ocp-indent.utils/ocp-indent.utils.cma" {"utils/ocp-indent.utils.cma"}
16 "_obuild/ocp-indent.utils/ocp-indent.utils.cmxa" {"utils/ocp-indent.utils.cmxa"}
17 "_obuild/ocp-indent.utils/pos.cmi" {"utils/pos.cmi"}
18 "?_obuild/ocp-indent.utils/pos.cmti" {"utils/pos.cmti"}
19 (* "_obuild/ocp-indent.utils/util.cmi" {"utils/util.cmi"} *)
20 (* "?_obuild/ocp-indent.utils/util.cmt" {"utils/util.cmt"} *)
21 "_obuild/ocp-indent.utils/nstream.cmi" {"utils/nstream.cmi"}
22 "?_obuild/ocp-indent.utils/nstream.cmti" {"utils/nstream.cmti"}
23 (* "_obuild/ocp-indent.utils/compat.cmi" {"utils/compat.cmi"} *)
24 (* "_obuild/ocp-indent.utils/compat.cmt" {"utils/compat.cmt"} *)
25 "_obuild/ocp-indent.lexer/ocp-indent.lexer.a" {"lexer/ocp-indent.lexer.a"}
26 "_obuild/ocp-indent.lexer/ocp-indent.lexer.cma" {"lexer/ocp-indent.lexer.cma"}
27 "_obuild/ocp-indent.lexer/ocp-indent.lexer.cmxa" {"lexer/ocp-indent.lexer.cmxa"}
28 "_obuild/ocp-indent.lexer/approx_tokens.cmi" {"lexer/approx_tokens.cmi"}
29 "?_obuild/ocp-indent.lexer/approx_tokens.cmt" {"lexer/approx_tokens.cmt"}
30 "_obuild/ocp-indent.lexer/approx_lexer.cmi" {"lexer/approx_lexer.cmi"}
31 "?_obuild/ocp-indent.lexer/approx_lexer.cmt" {"lexer/approx_lexer.cmt"}
32 ]
33 man: [
34 "man/man1/ocp-indent.1"
35 ]
36 share: [
37 "tools/ocp-indent.vim" {"vim/indent/ocaml.vim"}
38 ]
39 share_root: [
40 "tools/ocp-indent.el" {"emacs/site-lisp/ocp-indent.el"}
41 ]
0 opam-version: "1.2"
1 maintainer: "contact@ocamlpro.com"
2 authors: [
3 "Louis Gesbert <louis.gesbert@ocamlpro.com>"
4 "Thomas Gazagnaire <thomas@gazagnaire.org>"
5 "Jun Furuse"
6 ]
7 homepage: "http://www.typerex.org/ocp-indent.html"
8 bug-reports: "https://github.com/OCamlPro/ocp-indent/issues"
9 license: "LGPL"
10 tags: ["org:ocamlpro" "org:typerex"]
11 dev-repo: "https://github.com/OCamlPro/ocp-indent.git"
12 build: [
13 ["dune" "build" "-p" name "-j" jobs]
14 ]
15 run-test: [
16 ["dune" "runtest" "-p" name]
17 ]
18 depends: [
19 "dune" {build}
20 "cmdliner" {>= "1.0.0"}
21 "ocamlfind"
22 "base-bytes"
23 ]
24 post-messages: [
25 "This package requires additional configuration for use in editors. Install package 'user-setup', or manually:
26
27 * for Emacs, add these lines to ~/.emacs:
28 (add-to-list 'load-path \"%{share}%/emacs/site-lisp\")
29 (require 'ocp-indent)
30
31 * for Vim, add this line to ~/.vimrc:
32 set rtp^=\"%{share}%/ocp-indent/vim\"
33 "
34 {success & !user-setup:installed}
35 ]
+0
-35
opam less more
0 opam-version: "1.2"
1 name: "ocp-indent"
2 version: "1.6.1"
3 maintainer: "contact@ocamlpro.com"
4 authors: [
5 "Louis Gesbert <louis.gesbert@ocamlpro.com>"
6 "Thomas Gazagnaire <thomas@gazagnaire.org>"
7 "Jun Furuse"
8 ]
9 homepage: "http://www.typerex.org/ocp-indent.html"
10 bug-reports: "https://github.com/OCamlPro/ocp-indent/issues"
11 license: "LGPL"
12 tags: ["org:ocamlpro" "org:typerex"]
13 dev-repo: "https://github.com/OCamlPro/ocp-indent.git"
14 build: [
15 ["./configure" "--prefix" prefix]
16 [make]
17 ]
18 depends: [
19 "ocp-build" {>= "1.99.6-beta"}
20 "cmdliner" {>= "1.0.0"}
21 "base-bytes"
22 ]
23 post-messages: [
24 "This package requires additional configuration for use in editors. Install package 'user-setup', or manually:
25
26 * for Emacs, add these lines to ~/.emacs:
27 (add-to-list 'load-path \"%{share}%/emacs/site-lisp\")
28 (require 'ocp-indent)
29
30 * for Vim, add this line to ~/.vimrc:
31 set rtp^=\"%{share}%/ocp-indent/vim\"
32 "
33 {success & !user-setup:installed}
34 ]
131131 (* To store the position of the beginning of a string and comment *)
132132 let string_start_loc = ref (-1);;
133133 let quotation_start_loc = ref (-1);;
134 let quotation_kind = ref (`Camlp4 : [ `Camlp4 | `Ppx of string ]);;
134 let quotation_kind = ref (`Camlp4 "<:<": [ `Camlp4 of string | `Ppx of string ]);;
135135 type in_comment = Comment
136136 | Code
137137 | Verbatim
158158 reset_string_buffer();
159159 string_start_loc := -1;
160160 quotation_start_loc := -1;
161 quotation_kind := `Camlp4;
161 quotation_kind := `Camlp4 "<:<";
162162 comment_stack := [];
163163 entering_inline_code_block := false
164164 ;;
397397 {
398398 let start = lexbuf.lex_start_p in
399399 quotation_start_loc := Lexing.lexeme_start lexbuf;
400 quotation_kind := `Camlp4;
400 let s = Lexing.lexeme lexbuf in
401 let tag = String.sub s 2 (String.length s - 3) in
402 quotation_kind := `Camlp4 tag;
401403 let token = quotation lexbuf in
402404 lexbuf.lex_start_p <- start;
403405 token
489491
490492 and quotation = parse
491493 ">>"
492 { if !quotation_kind = `Camlp4 then QUOTATION else quotation lexbuf }
494 { match !quotation_kind with
495 | `Camlp4 tag -> QUOTATION ("<:"^tag^"<")
496 | `Ppx _ -> quotation lexbuf }
493497 | "|" identchar * "}"
494498 { match !quotation_kind with
495499 | `Ppx delim ->
496500 let s = Lexing.lexeme lexbuf in
497501 let ndelim = String.sub s 1 (String.length s - 2) in
498 if ndelim = delim then QUOTATION else quotation lexbuf
499 | `Camlp4 -> quotation lexbuf }
502 if ndelim = delim then QUOTATION ("{"^delim^"|")
503 else quotation lexbuf
504 | `Camlp4 _ -> quotation lexbuf }
500505 | newline
501506 { update_loc lexbuf None 1 false 0;
502507 quotation lexbuf
503508 }
504 | eof { QUOTATION }
509 | eof
510 { match !quotation_kind with
511 | `Camlp4 tag -> QUOTATION ("<:"^tag^"<")
512 | `Ppx delim -> QUOTATION ("{"^delim^"|") }
505513 | _ { quotation lexbuf }
506514
507515 and comment = parse
516524 | (Comment | CommentCont) :: _ -> comment lexbuf
517525 | _ -> tok
518526 }
519 | newline? blank* '{' [ '[' 'v' ]
527 | (newline blank*)? '{' [ '[' 'v' ]
520528 { if in_verbatim() then comment lexbuf else
521529 let tok = match !comment_stack with
522530 | CommentCont::_ -> COMMENTCONT
545553 reset_string_buffer ();
546554 comment lexbuf
547555 }
556 | "{" identchar * "|"
557 { quotation_start_loc := Lexing.lexeme_start lexbuf;
558 let s = Lexing.lexeme lexbuf in
559 let delim = String.sub s 1 (String.length s - 2) in
560 quotation_kind := `Ppx delim;
561 ignore (quotation lexbuf);
562 comment lexbuf
563 }
564
548565 | "''"
549566 { comment lexbuf }
550567 | "'" newline "'"
121121 | PRIVATE
122122 | QUESTION
123123 | QUESTIONQUESTION
124 | QUOTATION
124 | QUOTATION of (string)
125125 | QUOTE
126126 | RBRACE
127127 | RBRACKET
0 external ( @* ) : ('a -> 'b) -> 'a -> 'b = "%apply"
1 external ( |> ) : 'a -> ('a -> 'b) -> 'b = "%revapply"
2
3
4 module String = struct
5 include String
6
7 let is_space = function
8 | ' ' | '\012' | '\n' | '\r' | '\t' -> true
9 | _ -> false
10 end
0 (rule
1 (targets indentVersion.ml)
2 (action
3 (with-stdout-to %{targets}
4 (echo "let version = \"%{version:ocp-indent}\"")))
5 )
6 (ocamllex approx_lexer)
7 (library
8 (name ocp_indent_lexer)
9 (public_name ocp-indent.lexer)
10 (wrapped false)
11 (modules indentExtend approx_tokens approx_lexer)
12 )
13 (library
14 (name ocp_indent_lib)
15 (wrapped false)
16 (public_name ocp-indent.lib)
17 (libraries ocp-indent.utils)
18 (modules indentConfig indentBlock indentPrinter)
19 (flags :standard -w -9)
20 )
21 (library
22 (name ocp_indent_utils)
23 (public_name ocp-indent.utils)
24 (wrapped false)
25 (libraries bytes ocp-indent.lexer)
26 (modules compat pos util nstream)
27 )
28 (library
29 (name ocp_indent_dynlink)
30 (public_name ocp-indent.dynlink)
31 (wrapped false)
32 (modules indentLoader)
33 (libraries findlib dynlink ocp-indent.lexer ocp-indent.utils)
34 )
35 (executable
36 (name indentMain)
37 (public_name ocp-indent)
38 (modules indentVersion indentArgs indentMain)
39 (libraries cmdliner ocp-indent.lexer ocp-indent.lib ocp-indent.dynlink)
40 )
2020
2121 module Node = struct
2222
23 type extension_kind = ExtNode | Attr
24
2325 (* Node kind *)
2426 type kind =
2527 | KParen
4042 | KArrow of kind
4143 | KColon
4244 | KType
45 | KConstraint
4346 | KException
4447 | KOpen
4548 | KInclude
6871 | KWhen
6972 | KExternal
7073 | KCodeInComment
71 | KExtendedExpr of string list
72 | KExtendedItem of string list
74 | KExtendedExpr of string list * extension_kind
75 | KExtendedItem of string list * extension_kind
7376 | KAttrId of string list * bool
7477
7578 (* Priority of open expression constructs (see below for operators) *)
8790 (* Special operators that should break arrow indentation have this prio
8891 (eg monad operators, >>=) *)
8992 let prio_flatop = 59
93 let prio_colon = 35
94 let prio_arrow = 32
9095 let prio_semi = 5
9196
9297 let rec follow = function
117122 | KVerbatim _ -> "KVerbatim"
118123 | KUnknown -> "KUnknown"
119124 | KType -> "Ktype"
125 | KConstraint -> "KConstraint"
120126 | KException -> "KException"
121127 | KStruct -> "KStruct"
122128 | KSig -> "KSig"
135141 | KWhen -> "KWhen"
136142 | KExternal -> "KExternal"
137143 | KCodeInComment -> "KCodeInComment"
138 | KExtendedExpr name ->
139 Printf.sprintf "KExtendedExpr(%s)" (String.concat "." (List.rev name))
140 | KExtendedItem name ->
141 Printf.sprintf "KExtendedItem(%s)" (String.concat "." (List.rev name))
144 | KExtendedExpr (name, kind) ->
145 Printf.sprintf "KExtendedExpr(%s,%s)"
146 (String.concat "." (List.rev name))
147 (match kind with ExtNode -> "node" | Attr -> "attr")
148 | KExtendedItem (name, kind) ->
149 Printf.sprintf "KExtendedItem(%s,%s)"
150 (String.concat "." (List.rev name))
151 (match kind with ExtNode -> "node" | Attr -> "attr")
142152 | KAttrId(name, dotted) ->
143153 Printf.sprintf "KAttrId(%s,%B)"
144154 (String.concat "." (List.rev name)) dotted
298308 | _ -> None
299309
300310 let top_kind = function
301 | KStruct|KSig|KParen|KBegin|KObject|KExtendedItem _|KAttrId _ -> true
311 | KStruct|KSig|KParen|KBegin|KObject|KExtendedItem _|KAttrId _|KExtendedExpr _ -> true
302312 | _ -> false
303313
304314 let stritem_kind = function
439449 | OF -> 20,L,2
440450 | LESSMINUS | COLONEQUAL -> 20,L,config.i_base
441451 | COMMA -> 30,align,-2
442 | MINUSGREATER -> 32,L,0 (* is an operator only in types *)
443 | COLON -> 35,T,config.i_base
444 | COLONGREATER -> 35,L,config.i_base
452 | MINUSGREATER -> prio_arrow,L,0 (* is an operator only in types *)
453 | COLON -> prio_colon,T,config.i_base
454 | COLONGREATER -> prio_colon,L,config.i_base
445455 | OR | BARBAR -> 40,T,0
446456 | AMPERSAND | AMPERAMPER -> 50,T,0
447457 | (INFIXOP0 s | INFIXOP1 s | INFIXOP2 s | INFIXOP3 s | INFIXOP4 s)
476486 | _ -> false in
477487 let make_dotted_attr_id = function
478488 | { kind = KAttrId (names, _) } as node ::
479 ({ kind = (KExtendedItem [] | KExtendedExpr [])} :: _ as path) ->
489 ({ kind = (KExtendedItem ([],_) | KExtendedExpr ([],_))} :: _ as path) ->
480490 { node with kind = KAttrId (names, true) } :: path
481491 | _ -> assert false in
482492 let is_dotted_attr_id = function
483 | { kind = KExtendedExpr [] } :: _ -> true
484 | { kind = KExtendedItem [] } :: _ -> true
493 | { kind = KExtendedExpr ([],_) } :: _ -> true
494 | { kind = KExtendedItem ([],_) } :: _ -> true
485495 | { kind = KAttrId (_, dotted) } :: _ -> dotted
486496 | _ -> false in
487497 let make_attr_id name = function
488 | ({ kind = (KExtendedItem [] | KExtendedExpr []);
498 | ({ kind = (KExtendedItem ([],_) | KExtendedExpr ([],_));
489499 indent; pad; } :: _ as path) ->
490500 let indent =
491501 if starts_line then indent + pad
517527 else
518528 None
519529
530 let ext_kind = function
531 | LBRACKETPERCENT | LBRACKETPERCENTPERCENT -> ExtNode
532 | LBRACKETAT | LBRACKETATAT | LBRACKETATATAT -> Attr
533 | _ -> invalid_arg "ext_kind"
534
520535 (* Take a block, a token stream and a token.
521536 Return the new block stack. *)
522537 let rec update_path config block stream tok =
544559 (* Add a new child block *)
545560 let append kind pos ?(pad=config.i_base) = function
546561 | {kind = KAttrId (names, _)} ::
547 ({kind = KExtendedItem [] | KExtendedExpr [] } as n) :: path ->
562 ({kind = KExtendedItem ([],_) | KExtendedExpr ([],_) } as n) :: path ->
548563 let n = { n with kind = match n.kind with
549 | KExtendedItem [] -> KExtendedItem (List.rev names)
550 | KExtendedExpr [] -> KExtendedExpr (List.rev names)
564 | KExtendedItem ([],k) -> KExtendedItem (List.rev names,k)
565 | KExtendedExpr ([],k) -> KExtendedExpr (List.rev names,k)
551566 | _ -> assert false
552567 } in
553568 let path = {n with pad = config.i_ppx_stritem_ext } :: path in
698713 | KBegin -> path
699714 | KParen
700715 when if not config.i_align_ops then not starts_line else
701 match next_token stream with
702 | Some(SIG|STRUCT|OBJECT) -> true
716 match next_token_full stream with
717 | Some({token = SIG|STRUCT|OBJECT}, _) -> true
718 | Some({token = MODULE}, stream)
719 when next_token stream = Some STRUCT ->
720 true
703721 | _ -> false
704722 -> path
705723 | _ ->
720738 in
721739 let make_infix tok path =
722740 let op_prio, align, indent = op_prio_align_indent config tok.token in
723 let in_record =
741 let in_delim_block () =
724742 match unwind_while (fun kind -> prio kind >= op_prio) path with
725 | Some ({ kind = KExpr _ } :: { kind = KBrace } :: _) -> true
743 | Some ({ kind = KExpr _; line } ::
744 { kind = (KBrace|KParen|KBracket|KBracketBar); line = bline } ::
745 _) ->
746 line = bline
726747 | _ -> false in
727748 (* special cases *)
728749 let indent =
729750 (* don't back-indent operators when alone on their line
730751 (except BAR because that would disrupt typing) *)
731752 if indent < 0 && tok.token <> BAR
732 && not (tok.token = SEMI && in_record)
753 && not (tok.token = SEMI && in_delim_block ())
733754 && next_offset tok stream = None
734755 then 0 else indent
735756 in
772793 | BEGIN -> open_paren KBegin block.path
773794 | OBJECT -> append KObject L block.path
774795 | VAL -> append KVal L (unwind_top block.path)
775 | MATCH ->
796 | MATCH | TRY ->
797 let k = match tok.token with
798 | MATCH -> KMatch
799 | TRY -> KTry
800 | _ -> assert false
801 in
776802 let p = fold_expr block.path in
777 if starts_line then append KMatch L p
803 if starts_line then append k L p
778804 else
779805 let enforce_strict =
780806 config.i_strict_with = Always
783809 | {kind=KBegin; indent; column} :: _ -> column = indent
784810 | _ -> false
785811 in
786 let p, pad =
787 if enforce_strict then
788 let p = reset_line_indent config current_line p in
789 reset_padding p, config.i_base
790 else p, Path.pad p + config.i_base
791 in
792 append KMatch L ~pad p
793 | TRY ->
794 let p = fold_expr block.path in
795 if starts_line then append KTry L p
796 else
797 let enforce_strict =
798 config.i_strict_with = Always
799 || config.i_strict_with = Auto
800 && match p with
801 | {kind=KBegin; indent; column} :: _ -> column = indent
802 | _ -> false
803 in
804 let p, pad =
805 if enforce_strict then
806 let p = reset_line_indent config current_line p in
807 reset_padding p, config.i_base
808 else p, Path.pad p + config.i_base
809 in
810 append KTry L ~pad p
812 if enforce_strict then
813 let p = reset_line_indent config current_line p in
814 append k L (reset_padding p)
815 else
816 append k L ~pad:(Path.pad p + config.i_base) p
811817 | LPAREN -> open_paren KParen block.path
812818 | LBRACKET | LBRACKETGREATER | LBRACKETLESS ->
813819 open_paren KBracket block.path
814820 | LBRACKETPERCENT | LBRACKETAT ->
815821 let path = before_append_atom block.path in
816 append ~pad:4 (KExtendedExpr []) L path
822 append ~pad:4 (KExtendedExpr ([], ext_kind tok.token)) L path
817823 | LBRACKETATAT ->
818824 let path =
819825 (unwind (function KBody k | k -> top_kind k || stritem_kind k)
820826 block.path)
821827 in
822 let path = match path with
823 | {kind = KBody k | k} :: p -> if top_kind k then path else p
824 | [] -> []
825 in
826 append ~pad:4 (KExtendedItem []) L path
828 append ~pad:4 (KExtendedItem ([], ext_kind tok.token)) L
829 (reset_padding path)
827830 | LBRACKETPERCENTPERCENT | LBRACKETATATAT ->
828 append ~pad:4 (KExtendedItem []) L (unwind_top block.path)
831 append ~pad:4 (KExtendedItem ([], ext_kind tok.token)) L (unwind_top block.path)
829832 | LBRACKETBAR -> open_paren KBracketBar block.path
830833 | LBRACE | LBRACELESS ->
831834 open_paren KBrace block.path
860863 | _ -> assert false
861864 in
862865 let expr_start =
863 unwind (function KParen | KLet | KLetIn | KBody _ -> true | _ -> false)
866 unwind (function KParen | KBegin | KLet | KLetIn | KBody _ -> true
867 | _ -> false)
864868 block.path
865869 in
866870 let indent = match expr_start with
867 | {kind=KParen}::{kind=KExpr prio; line; indent}::_
871 | {kind=KParen|KBegin}::{kind=KExpr prio}::
872 {kind=KBody KLet; line; indent; pad}::_
873 when prio = prio_apply && line = current_line ->
874 (* reset indent due to align_params for functor application within
875 [let module in] *)
876 indent + pad
877 | {kind=KParen|KBegin}::{kind=KExpr prio; line; indent}::_
868878 when prio = prio_apply && line = current_line ->
869879 indent
870880 | _ -> Path.indent block.path
875885 | WHEN ->
876886 append KWhen L ~pad:(config.i_base + if starts_line then 0 else 2)
877887 (unwind (function
878 | KWith(KTry|KMatch) | KBar(KTry|KMatch) | KFun -> true
888 | KWith(KTry|KMatch) | KBar(KTry|KMatch) | KFun | KExtendedExpr _ ->
889 true
879890 | _ -> false)
880891 block.path)
881892 | OPEN ->
917928 (function KType | KBody KType | KObject -> true | _ -> false)
918929 block.path
919930 in
920 append KLet L path
931 append KConstraint L path
921932
922933 | AND ->
923934 let unwind_to = function
962973 (match last_token block with
963974 | Some LET ->
964975 append KUnknown L block.path (* let module *)
965 | Some COLON | Some EQUAL when next_token stream = Some TYPE ->
976 | Some (COLON|EQUAL|INCLUDE)
977 when next_token stream = Some TYPE ->
966978 append KUnknown L block.path (* : module type of *)
967979 | Some (WITH|AND) -> append KType L block.path
968980 | _ -> append KModule L (unwind_top block.path))
10791091 | RBRACE | GREATERRBRACE -> close ((=) KBrace) block.path
10801092
10811093 | RBRACKET ->
1082 close
1083 (function
1084 | KBracket | KExtendedItem _ | KExtendedExpr _ -> true
1085 | _ -> false)
1086 block.path
1094 let p =
1095 unwind
1096 (function
1097 | KBracket | KExtendedItem _ | KExtendedExpr _ -> true
1098 | _ -> false)
1099 block.path
1100 in
1101 (match p with
1102 | {kind=KExtendedItem (_, Attr)|KExtendedExpr (_, Attr)} :: p -> p
1103 | p -> close (fun _ -> true) p)
10871104
10881105 | GREATERRBRACKET -> close ((=) KBracket) block.path
10891106
11261143 | {kind=KFun} :: ({kind=KExpr i} as e) :: path when i = prio_flatop ->
11271144 (* eg '>>= fun x ->': indent like the top of the expression *)
11281145 {e with kind = KExpr 0} :: path
1129 | {kind=KFun; line } :: _
1146 | {kind=KFun; line } :: {kind=KBody KLet; line=letline} :: _
1147 when next_offset tok stream = None
1148 && line = current_line && line <> letline
1149 ->
1150 append (KArrow KFun) L ~pad:0 (reset_line_indent config line path)
1151 | {kind=KFun; line; _ } :: _
11301152 when next_offset tok stream = None
11311153 && line = current_line
11321154 ->
11761198 | KBar KType
11771199 | KStruct | KSig | KObject
11781200 | KAnd(KModule|KType|KLet|KLetIn)
1201 | KConstraint
11791202 | KExtendedItem _ | KExtendedExpr _ -> true
11801203 | _ -> false
11811204 in
11921215 | _ -> replace (KBody KType) L ~pad:config.i_type path)
11931216 | {kind=KBrace}::_ ->
11941217 (match
1195 unwind_while (fun kind -> prio kind > prio_semi) block.path
1218 unwind_while (fun kind -> kind = KColon || prio kind > prio_semi)
1219 block.path
11961220 with
11971221 | Some ({kind=KExpr prio}::_) when prio = prio_semi + 1 ->
11981222 (* already after a field binding: this '=' must be
12071231 | {kind=KAnd kind | kind} as h::p ->
12081232 let indent = match next_token stream, kind with
12091233 | Some (STRUCT|SIG), _ -> 0
1234 | Some BAR, KType when config.i_strict_with = Always ->
1235 config.i_with
12101236 | _, (KType | KBody KType) -> config.i_type
12111237 | _ -> config.i_base
12121238 in
12311257 | COLON ->
12321258 let path = unwind (function
12331259 | KParen | KBegin | KBrace | KBracket | KBracketBar | KBody _
1234 | KModule | KLet | KLetIn | KExternal | KVal
1235 | KAnd(KModule|KLet|KLetIn) -> true
1260 | KModule | KLet | KLetIn | KExternal | KVal | KColon
1261 | KAnd(KModule|KLet|KLetIn) | KBar KType -> true
12361262 | _ -> false)
12371263 block.path
12381264 in
12391265 (match path with
1266 | {kind = KBody(KVal|KType|KExternal) | KColon} :: _ ->
1267 (match unwind_while (fun kind -> prio kind > prio_arrow) block.path
1268 with
1269 | Some path ->
1270 extend (KExpr prio_colon)
1271 (if config.i_align_params = Never then L else T)
1272 path
1273 | None -> make_infix tok block.path)
12401274 | {kind = KModule|KLet|KLetIn|KExternal
12411275 | KAnd(KModule|KLet|KLetIn|KExternal)} :: _ ->
12421276 append KColon L path
12581292 when i = prio_max && j = prio_apply -> (* "mutable" *)
12591293 extend KColon L p
12601294 | _ -> make_infix tok block.path)
1295 | {kind = KBar KType} :: _ ->
1296 make_infix {tok with token = OF} block.path
12611297 | _ -> make_infix tok block.path)
12621298
12631299 | SEMI ->
12831319 append KExternal L (unwind_top block.path)
12841320
12851321 | DOT ->
1286 let last_expr =
1287 unwind_while (function KExpr _ -> true | _ -> false) block.path
1288 in
1289 (match last_expr with
1322 (match block.path with
1323 | {kind = KArrow KMatch} :: _ -> append expr_atom L block.path
1324 | _ ->
1325 let last_expr =
1326 unwind_while (function KExpr _ -> true | _ -> false) block.path
1327 in
1328 match last_expr with
12901329 | Some ({kind=KExpr _} :: {kind=KType} :: ({kind=KColon} :: _ as p)) ->
12911330 (* let f: type t. t -> t = ... *)
12921331 p
1293 | Some ({kind=KExpr 200} :: ({kind=KColon} :: {kind=KLet} :: _ as p)) ->
1332 | Some ({kind=KExpr 200} ::
1333 ({kind=KColon} :: {kind=KLet|KLetIn} :: _ as p))->
12941334 (* method m : 'x 'y . ... = (KLet is actually "method") *)
1295 p
1335 (* let m : 'x 'y . ... = (in) *)
1336 (match last_token block with
1337 | Some (UIDENT _) -> make_infix tok block.path
1338 | _ -> p)
12961339 | Some ({kind=KExpr i} :: ({kind=KBrace|KWith KBrace} as h :: p))
12971340 when (i = prio_max || i = prio_dot) && next_offset tok stream = None ->
12981341 (* special case: distributive { Module. field; field } *)
13441387 | _ -> false)
13451388 block.path
13461389 with
1390 | Some ( (* (opt)labels in types *)
1391 {kind = KExpr 32 (* prio_arrow *)} ::
1392 ({kind = KBody(KVal|KType|KExternal) | KColon} :: _) |
1393 ({kind = KBody(KVal|KType|KExternal) | KColon} :: _)
1394 ) ->
1395 (* this is for the case [?foo:], parsed as OPTLABEL, but make sure we
1396 are consistent with [foo:] or [? foo:], which are parsed as 2 or 3
1397 tokens *)
1398 extend (KExpr prio_colon)
1399 (if config.i_align_params = Never then L else T)
1400 (append expr_atom L block.path)
13471401 | Some ({kind=KExpr _}::_) | None ->
13481402 (* considered as infix, but forcing function application *)
13491403 make_infix tok (fold_expr block.path)
13811435 | FLOAT _ | CHAR _ | STRING _
13821436 | TRUE | FALSE | NATIVEINT _
13831437 | UNDERSCORE | TILDE | QUESTION
1384 | QUOTE | QUOTATION ->
1438 | QUOTE | QUOTATION _ ->
13851439 atom block.path
13861440
13871441 | PREFIXOP _ | BANG | QUESTIONQUESTION ->
253253 whenever `match with' doesn't start its line.\n\
254254 If `auto', there are exceptions for constructs like \
255255 `begin match with'.\n\
256 If `always', `with' is always strictly respected.")
256 If `always', `with' is always strictly respected, and additionally \
257 applies to variant types definition, for consistency.")
257258 :: pre " Example with `strict_with=$(b,never),with=0':\n\
258259 \ begin match foo with\n\
259260 \ $(b,..)| _ -> bar\n\
1717 (** See the [man] function to get the details of what the options are
1818 supposed to do (or the template .ocp-indent) *)
1919 type t = {
20
21 i_base: int;
2022 (** indentation values *)
21 i_base: int;
2223 i_type: int;
2324 i_in: int;
2425 i_with: int;
2526 i_match_clause: int;
2627 i_ppx_stritem_ext: int;
28
29 i_max_indent: int option;
2730 (** indentation toggles *)
28 i_max_indent: int option;
2931 i_strict_with: threechoices;
3032 i_strict_else: threechoices;
3133 i_strict_comments: bool;
111111 let orig_start_column = IndentBlock.original_column block in
112112 let start_column = IndentBlock.offset block in
113113 (* Handle multi-line tokens (strings, comments) *)
114 let rec print_extra_lines line pad last lines usr =
114 let rec print_extra_lines line pad last ?(item_cont=false) lines usr =
115115 match lines with
116116 | [] -> usr
117117 | text::next_lines ->
132132 String.sub text orig_line_indent
133133 (String.length text - orig_line_indent)
134134 in
135 let indent_value =
135 let indent_value, item_cont =
136136 match pad with
137 | None -> orig_line_indent
137 | None -> orig_line_indent, false
138138 | Some pad -> match tok.token with
139139 | STRING _ ->
140140 if ends_with_escape last then
141141 if is_prefix "\"" text || is_prefix "\\ " text
142 then start_column
143 else start_column + pad
144 else orig_line_indent
142 then start_column, item_cont
143 else start_column + pad, item_cont
144 else orig_line_indent, item_cont
145145 | COMMENT | COMMENTCONT ->
146 let n = if is_prefix "*" text then 1 else pad in
146 let is_item =
147 is_prefix "- " text && not (is_prefix "- :" text)
148 in
147149 let n =
148 if output.config.IndentConfig.i_strict_comments
150 if is_prefix "*" text then 1 else
151 if not is_item && item_cont then pad + 2
152 else pad
153 in
154 let item_cont = is_item || item_cont && text <> "" in
155 let n =
156 if output.config.IndentConfig.i_strict_comments || is_item
149157 then n else max orig_offset n
150158 in
151159 let n = if next_lines = [] && text = "*)" then 0 else n in
152 start_column + n
153 | QUOTATION ->
154 start_column +
155 if next_lines = [] &&
156 (text = ">>" ||
157 (String.length text >= 2 &&
158 text.[0] = '|' && text.[String.length text - 1] = '}'))
159 then 0
160 else max orig_offset pad
161 | _ -> start_column + max orig_offset pad
160 start_column + n, item_cont
161 | QUOTATION opening ->
162 if is_prefix "{" opening then orig_line_indent, item_cont
163 else
164 (start_column +
165 if next_lines = [] && text = ">>" then 0
166 else max orig_offset pad),
167 item_cont
168 | _ -> start_column + max orig_offset pad, item_cont
162169 in
163170 usr
164171 |> print_indent output line "" ~kind:(Fixed indent_value) block
165172 |> pr_string output block text
166 |> print_extra_lines (line+1) pad text next_lines
173 |> print_extra_lines (line+1) pad ~item_cont text next_lines
167174 in
168175 let line = Region.start_line tok.region in
169176 let text, next_lines =
186193 | COMMENTCONT ->
187194 Some (IndentBlock.padding block)
188195 | OCAMLDOC_VERB -> None
189 | QUOTATION ->
190 let i = ref 1 in
191 let len = String.length text in
192 let endc = if len > 0 && text.[0] = '{' then '|' else '<' in
193 while !i < len && text.[!i] <> endc do incr i done;
194 if !i + 1 >= len then None
195 else (
196 incr i; while !i < len && text.[!i] = ' ' do incr i done;
197 Some !i
198 )
196 | QUOTATION opening ->
197 let oplen = String.length opening in
198 let textlen = String.length text in
199 if oplen = textlen then None
200 else
201 Some
202 (oplen +
203 count_leading_spaces
204 (String.sub text oplen (textlen - oplen - 1)))
199205 | _ -> Some 2
200206 in
201207 usr
108108 let spaces = pos_start.pos_cnum - pos_last.pos_cnum in
109109 let len = pos_end.pos_cnum - pos_start.pos_cnum in
110110 let newlines = pos_start.pos_lnum - pos_last.pos_lnum in
111 let between = Lazy.lazy_from_val (Buffer.sub buf 0 spaces) in
112 let substr = Lazy.lazy_from_val (Buffer.sub buf spaces len)
111 let between = let s = Buffer.sub buf 0 spaces in lazy s in
112 let substr = let s = Buffer.sub buf spaces len in lazy s
113113 in
114114 let total = pos_end.pos_cnum - pos_last.pos_cnum in
115115 let more = Buffer.sub buf total (Buffer.length buf - total) in
+0
-34
src/ocaml_3/compat.ml less more
0
1 let ( |> ) : 'a -> ('a -> 'b) -> 'b = fun x f -> f x
2
3
4 module String = struct
5 include String
6
7 let is_space = function
8 | ' ' | '\012' | '\n' | '\r' | '\t' -> true
9 | _ -> false
10
11 let trim s =
12 let len = length s in
13 let i = ref 0 in
14 while !i < len && is_space (unsafe_get s !i) do
15 incr i
16 done;
17 let j = ref (len - 1) in
18 while !j >= !i && is_space (unsafe_get s !j) do
19 decr j
20 done;
21 if !i = 0 && !j = len - 1 then
22 s
23 else if !j >= !i then
24 sub s !i (!j - !i + 1)
25 else
26 ""
27 end
28
29 module Lazy = struct
30 include Lazy
31
32 let from_val = lazy_from_val
33 end
+0
-11
src/ocaml_4/compat.ml less more
0 external ( @* ) : ('a -> 'b) -> 'a -> 'b = "%apply"
1 external ( |> ) : 'a -> ('a -> 'b) -> 'b = "%revapply"
2
3
4 module String = struct
5 include String
6
7 let is_space = function
8 | ' ' | '\012' | '\n' | '\r' | '\t' -> true
9 | _ -> false
10 end
+0
-9
src/ocp-indent-lib.mllib less more
0 Approx_tokens
1 Approx_lexer
2 Compat
3 Pos
4 Util
5 Nstream
6 IndentConfig
7 IndentBlock
8 IndentPrinter
+0
-73
src/ocp-indent.ocp less more
0 comp += [ "-g" "-w" "+A-4-9-44" ]
1
2 begin library "ocp-indent.lexer"
3 files = [
4 "indentExtend.ml"
5 "approx_tokens.ml"
6 "approx_lexer.mll"
7 ]
8 requires = [
9 "bytes"
10 ]
11 bundle = [ "ocp-indent" ]
12 end
13
14 begin library "ocp-indent.utils"
15 sort = false
16 files = [
17 "pos.ml"
18 "util.ml"
19 "nstream.ml"
20 ]
21 if ocaml_major_version = "3" then {
22 files += [ "ocaml_3/compat.ml" ]
23 } else {
24 files += [ "ocaml_4/compat.ml" ]
25 }
26 requires = [
27 "bytes"
28 "ocp-indent.lexer"
29 ]
30 bundle = [ "ocp-indent" ]
31 end
32
33 begin library "ocp-indent.dynlink"
34 files = [
35 "indentLoader.ml"
36 ]
37 requires = [
38 "findlib"
39 "dynlink"
40 "ocp-indent.lexer"
41 "ocp-indent.utils"
42 ]
43 bundle = [ "ocp-indent" ]
44 end
45
46 begin library "ocp-indent.lib"
47 sort = false
48 files = [
49 "indentConfig.ml"
50 "indentBlock.ml"
51 "indentPrinter.ml"
52 ]
53 requires = [
54 "bytes"
55 "ocp-indent.lexer"
56 "ocp-indent.utils"
57 ]
58 bundle = [ "ocp-indent" ]
59 end
60
61 begin program "ocp-indent"
62 sort = false
63 files = [
64 "indentVersion.ml" (ocp2ml) (* auto-generated by ocp-build *)
65 "indentArgs.ml"
66 "indentMain.ml"
67 ]
68 requires = [
69 "cmdliner"
70 "ocp-indent.lexer" "ocp-indent.lib" "ocp-indent.dynlink"
71 ]
72 end
2121 let default d = function Some x -> x | None -> d
2222
2323 let string_split char str =
24 let rec aux pos =
25 try
26 let i = String.index_from str pos char in
27 String.sub str pos (i - pos) :: aux (succ i)
28 with Not_found | Invalid_argument _ ->
29 let l = String.length str in
30 [ String.sub str pos (l - pos) ]
24 let rec aux acc pos =
25 let i =
26 try Some (String.rindex_from str pos char)
27 with Not_found | Invalid_argument _ -> None
28 in
29 match i with
30 | Some i -> aux (String.sub str (i + 1) (pos - i) :: acc) (pred i)
31 | None -> String.sub str 0 (pos + 1) :: acc
3132 in
32 aux 0
33 aux [] (String.length str - 1)
3334
3435 let string_split_chars chars str =
3536 let len = String.length str in
0 type t =
1 { last_trading : Week_date.Spec.t;
2 first_notice : Week_date.Spec.t option;
3 first_notice_exceptions : Date.t Year_month.Map.t
4 with default(Year_month.Map.empty);
5 offset : Week_date.Offset.t;
6 (* n > 0 *)
7 new_contract_expires_in_n_months : int
8 }
9 [@@deriving sexp, compare]
0 type _ term =
1 | Int : int -> int term
2 | Add : (int -> int -> int) term
3 | App : ('b -> 'a) term * 'b term -> 'a term
4
5 let rec eval : type a. a term -> a = function
6 | Int n -> n (* a = int *)
7 | Add -> (fun x y -> x+y) (* a = int -> int -> int *)
8 | App(f,x) -> (eval f) (eval x)
9 (* eval called at types (b->a) and b for fresh b *)
10
11 let two = eval (App (App (Add, Int 1), Int 1))
12
13 let rec sum : type a. a term -> _ = fun x ->
14 let y =
15 match x with
16 | Int n -> n
17 | Add -> 0
18 | App(f,x) -> sum f + sum x
19 in y + 1
20
21 type _ typ =
22 | Int : int typ
23 | String : string typ
24 | Pair : 'a typ * 'b typ -> ('a * 'b) typ
25
26 let rec to_string: type t. t typ -> t -> string =
27 fun t x ->
28 match t with
29 | Int -> string_of_int x
30 | String -> Printf.sprintf "%S" x
31 | Pair(t1,t2) ->
32 let (x1, x2) = x in
33 Printf.sprintf "(%s,%s)" (to_string t1 x1) (to_string t2 x2)
34
35 type (_,_) eq = Eq : ('a,'a) eq
36
37 let cast : type a b. (a,b) eq -> a -> b = fun Eq x -> x
38
39 let rec eq_type : type a b. a typ -> b typ -> (a,b) eq option =
40 fun a b ->
41 match a, b with
42 | Int, Int -> Some Eq
43 | String, String -> Some Eq
44 | Pair(a1,a2), Pair(b1,b2) ->
45 begin match eq_type a1 b1, eq_type a2 b2 with
46 | Some Eq, Some Eq -> Some Eq
47 | _ -> None
48 end
49 | _ -> None
50
51 type dyn = Dyn : 'a typ * 'a -> dyn
52
53 let get_dyn : type a. a typ -> dyn -> a option =
54 fun a (Dyn(b,x)) ->
55 match eq_type a b with
56 | None -> None
57 | Some Eq -> Some x
58
59 let _ =
60 let f: type a. a list -> int =
61 fun _x -> 42
62 in
63 f []
64
65 let nth t n =
66 if n < 0 then None else
67 let rec nth_aux: type b. ('a, b) t -> int -> 'a option = fun t n ->
68 match t with
69 | Empty -> None
70 | Node (a, t) -> if n = 0 then Some a else nth_aux t (n-1)
71 in
72 nth_aux t n
73
74 let rec f : type a b. a = function
75 | _ -> assert false
76 and g : type a. a = function
77 | _ -> assert false
0 (** ocaml classes
1 (http://caml.inria.fr/pub/docs/manual-ocaml/manual017.html)
2 *)
3
4 (* class types *)
5
6 class type c =
7 object
8 end
9
10 class type c =
11 M.cl
12
13 class type c =
14 ['a, 'b] M.cl
15
16 class type c =
17 object
18 ('ty)
19 inherit cl
20 val mutable virtual
21 var : bool
22 method private bar1 x ~y : bool
23 method private virtual bar2 : 'a 'b.('a,'b) Hashtbl.t
24 constraint
25 'a = 'b
26 end
27
28 (* class expressions *)
29
30 class c =
31 ['a, 'b]
32 M.cl
33
34 class c =
35 fun a b ->
36 object
37 end
38
39 class c = object
40 val x = true
41 end
42
43 class c =
44 object
45 (_ :
46 'a)
47 inherit Something.someclass
48 as v
49 val mutable
50 var : bool
51 = true
52 val mutable virtual var2
53 : string
54 method private bar1 x ~y : bool =
55 false
56 method private virtual bar2 : 'a 'b.('a,'b) Hashtbl.t
57 constraint
58 'a = 'b
59 initializer
60 z
61 end
62
63 (* method specific expressions *)
64
65 let e =
66 var <- true
67
68 let e =
69 {< var = false;
70 var2 = true;
71 >}
72
73
74 (* class definitions *)
75
76 class cl =
77 object
78 val x = true
79 end
80 and
81 virtual ['a, 'b]
82 cl2 x y :
83 object
84 val x : bool
85 end = fun x y ->
86 object
87 val x : bool = true
88 end
89
90 class cl
91 : object end
92
93 class type virtual ['a] clty = object
94 method x : int
95 end
96
97 (* objects *)
98 val a :
99 < >
100 let () = ()
101
102 val a :
103 < .. >
104 let () = ()
105
106 val a :
107 < meth: int option;
108 meth2: 'a. 'a option;
109 meth3: 'a 'b. ('a,'b) Hashtbl.t >
110 let () = ()
111
112 val a :
113 < meth: int option;
114 meth2: 'a. 'a option;
115 meth3: 'a 'b. ('a,'b) Hashtbl.t;
116 .. >
117 let () = ()
118
119 (* #-types *)
120 val a :
121 #M.meth
122
123 val a :
124 'a#M.meth
125
126 val a :
127 ('a,'b*'c)
128 #M.meth
129
130 (* object types *)
131 type a =
132 < >
133 let () = ()
134
135 type a =
136 < .. >
137 let () = ()
138
139 type a =
140 < meth: int option;
141 meth2: 'a. 'a option;
142 meth3: 'a 'b. ('a,'b) Hashtbl.t >
143 let () = ()
144
145 type a =
146 < meth: int option;
147 meth2: 'a. 'a option;
148 meth3: 'a 'b. ('a,'b) Hashtbl.t;
149 .. >
150 let () = ()
151
152 type t =
153 < a : int; b:
154 < a: int; b: < c:int > >
155 >
156 let () = ()
157
158 type t =
159 < a : int; b:
160 < a: int; b: < c: int -> int> >;
161 c: int
162 >
163 let () = ()
164
165 type 'a t =
166 | Bla : < x : int > t
167 | Blo : < y : int > t
0 type _ term =
1 | Int : int -> int term
2 | Add : (int -> int -> int) term
3 | App : ('b -> 'a) term * 'b term -> 'a term
4
5 let rec eval : type a. a term -> a = function
6 | Int n -> n (* a = int *)
7 | Add -> (fun x y -> x+y) (* a = int -> int -> int *)
8 | App(f,x) -> (eval f) (eval x)
9 (* eval called at types (b->a) and b for fresh b *)
10
11 let two = eval (App (App (Add, Int 1), Int 1))
12
13 let rec sum : type a. a term -> _ = fun x ->
14 let y =
15 match x with
16 | Int n -> n
17 | Add -> 0
18 | App(f,x) -> sum f + sum x
19 in y + 1
20
21 type _ typ =
22 | Int : int typ
23 | String : string typ
24 | Pair : 'a typ * 'b typ -> ('a * 'b) typ
25
26 let rec to_string: type t. t typ -> t -> string =
27 fun t x ->
28 match t with
29 | Int -> string_of_int x
30 | String -> Printf.sprintf "%S" x
31 | Pair(t1,t2) ->
32 let (x1, x2) = x in
33 Printf.sprintf "(%s,%s)" (to_string t1 x1) (to_string t2 x2)
34
35 type (_,_) eq = Eq : ('a,'a) eq
36
37 let cast : type a b. (a,b) eq -> a -> b = fun Eq x -> x
38
39 let rec eq_type : type a b. a typ -> b typ -> (a,b) eq option =
40 fun a b ->
41 match a, b with
42 | Int, Int -> Some Eq
43 | String, String -> Some Eq
44 | Pair(a1,a2), Pair(b1,b2) ->
45 begin match eq_type a1 b1, eq_type a2 b2 with
46 | Some Eq, Some Eq -> Some Eq
47 | _ -> None
48 end
49 | _ -> None
50
51 type dyn = Dyn : 'a typ * 'a -> dyn
52
53 let get_dyn : type a. a typ -> dyn -> a option =
54 fun a (Dyn(b,x)) ->
55 match eq_type a b with
56 | None -> None
57 | Some Eq -> Some x
58
59 let _ =
60 let f: type a. a list -> int =
61 fun _x -> 42
62 in
63 f []
64
65 let nth t n =
66 if n < 0 then None else
67 let rec nth_aux: type b. ('a, b) t -> int -> 'a option = fun t n ->
68 match t with
69 | Empty -> None
70 | Node (a, t) -> if n = 0 then Some a else nth_aux t (n-1)
71 in
72 nth_aux t n
73
74 let rec f : type a b. a = function
75 | _ -> assert false
76 and g : type a. a = function
77 | _ -> assert false
0 (** ocaml classes
1 (http://caml.inria.fr/pub/docs/manual-ocaml/manual017.html)
2 *)
3
4 (* class types *)
5
6 class type c =
7 object
8 end
9
10 class type c =
11 M.cl
12
13 class type c =
14 ['a, 'b] M.cl
15
16 class type c =
17 object
18 ('ty)
19 inherit cl
20 val mutable virtual
21 var : bool
22 method private bar1 x ~y : bool
23 method private virtual bar2 : 'a 'b.('a,'b) Hashtbl.t
24 constraint
25 'a = 'b
26 end
27
28 (* class expressions *)
29
30 class c =
31 ['a, 'b]
32 M.cl
33
34 class c =
35 fun a b ->
36 object
37 end
38
39 class c = object
40 val x = true
41 end
42
43 class c =
44 object
45 (_ :
46 'a)
47 inherit Something.someclass
48 as v
49 val mutable
50 var : bool
51 = true
52 val mutable virtual var2
53 : string
54 method private bar1 x ~y : bool =
55 false
56 method private virtual bar2 : 'a 'b.('a,'b) Hashtbl.t
57 constraint
58 'a = 'b
59 initializer
60 z
61 end
62
63 (* method specific expressions *)
64
65 let e =
66 var <- true
67
68 let e =
69 {< var = false;
70 var2 = true;
71 >}
72
73
74 (* class definitions *)
75
76 class cl =
77 object
78 val x = true
79 end
80 and
81 virtual ['a, 'b]
82 cl2 x y :
83 object
84 val x : bool
85 end = fun x y ->
86 object
87 val x : bool = true
88 end
89
90 class cl
91 : object end
92
93 class type virtual ['a] clty = object
94 method x : int
95 end
96
97 (* objects *)
98 val a :
99 < >
100 let () = ()
101
102 val a :
103 < .. >
104 let () = ()
105
106 val a :
107 < meth: int option;
108 meth2: 'a. 'a option;
109 meth3: 'a 'b. ('a,'b) Hashtbl.t >
110 let () = ()
111
112 val a :
113 < meth: int option;
114 meth2: 'a. 'a option;
115 meth3: 'a 'b. ('a,'b) Hashtbl.t;
116 .. >
117 let () = ()
118
119 (* #-types *)
120 val a :
121 #M.meth
122
123 val a :
124 'a#M.meth
125
126 val a :
127 ('a,'b*'c)
128 #M.meth
129
130 (* object types *)
131 type a =
132 < >
133 let () = ()
134
135 type a =
136 < .. >
137 let () = ()
138
139 type a =
140 < meth: int option;
141 meth2: 'a. 'a option;
142 meth3: 'a 'b. ('a,'b) Hashtbl.t >
143 let () = ()
144
145 type a =
146 < meth: int option;
147 meth2: 'a. 'a option;
148 meth3: 'a 'b. ('a,'b) Hashtbl.t;
149 .. >
150 let () = ()
151
152 type t =
153 < a : int; b:
154 < a: int; b: < c:int > >
155 >
156 let () = ()
157
158 type t =
159 < a : int; b:
160 < a: int; b: < c: int -> int> >;
161 c: int
162 >
163 let () = ()
164
165 type 'a t =
166 | Bla : < x : int > t
167 | Blo : < y : int > t
11 "http://www.w3.org/TR/REC-html40/loose.dtd">
22 <html>
33 <head>
4 <title>Failing tests, ocp-indent version 1.6.1+2 (2017-08-03)</title>
4 <title>Failing tests, ocp-indent version 1.6.1+45 (2018-11-19)</title>
55 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
66 <style>
77 TABLE { border-collapse: collapse; border-spacing: 0px; margin: auto; }
1616 </style>
1717 </head>
1818 <body>
19 <h1>Failing tests, ocp-indent version 1.6.1+2 (2017-08-03)</h1>
19 <h1>Failing tests, ocp-indent version 1.6.1+45 (2018-11-19)</h1>
2020 <div>
2121 <h2>Differences in edge-cases.ml</h2>
2222 <table>
159159 <tr><td class="linenum">41</td><td class="correct"><pre>s \</pre></td><td class="correct"><pre>s \</pre></td></tr>
160160 <tr><td class="linenum">42</td><td class="correct"><pre> \</pre></td><td class="correct"><pre> \</pre></td></tr>
161161 <tr><td class="linenum">43</td><td class="correct"><pre> "</pre></td><td class="correct"><pre> "</pre></td></tr>
162 </table>
163 </div>
164 <div>
165 <h2>Differences in gadt.ml</h2>
166 <table>
167 <tr><th><th>Expected<th>Ocp-indent output</tr>
168 <tr><td class="linenum">0</td><td class="correct"><pre>type _ term =</pre></td><td class="correct"><pre>type _ term =</pre></td></tr>
169 <tr><td class="linenum">1</td><td class="correct"><pre> | Int : int -> int term</pre></td><td class="correct"><pre> | Int : int -> int term</pre></td></tr>
170 <tr><td class="linenum">2</td><td class="correct"><pre> | Add : (int -> int -> int) term</pre></td><td class="correct"><pre> | Add : (int -> int -> int) term</pre></td></tr>
171 <tr><td class="linenum">3</td><td class="correct"><pre> | App : ('b -> 'a) term * 'b term -> 'a term</pre></td><td class="correct"><pre> | App : ('b -> 'a) term * 'b term -> 'a term</pre></td></tr>
172 <tr><td class="linenum">4</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
173 <tr><td class="linenum">5</td><td class="correct"><pre>let rec eval : type a. a term -> a = function</pre></td><td class="correct"><pre>let rec eval : type a. a term -> a = function</pre></td></tr>
174 <tr><td class="linenum">6</td><td class="correct"><pre> | Int n -> n (* a = int *)</pre></td><td class="correct"><pre> | Int n -> n (* a = int *)</pre></td></tr>
175 <tr><td class="linenum">7</td><td class="correct"><pre> | Add -> (fun x y -> x+y) (* a = int -> int -> int *)</pre></td><td class="correct"><pre> | Add -> (fun x y -> x+y) (* a = int -> int -> int *)</pre></td></tr>
176 <tr><td class="linenum">8</td><td class="correct"><pre> | App(f,x) -> (eval f) (eval x)</pre></td><td class="correct"><pre> | App(f,x) -> (eval f) (eval x)</pre></td></tr>
177 <tr><td class="linenum">9</td><td class="correct"><pre>(* eval called at types (b->a) and b for fresh b *)</pre></td><td class="correct"><pre>(* eval called at types (b->a) and b for fresh b *)</pre></td></tr>
178 <tr><td class="linenum">10</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
179 <tr><td class="linenum">11</td><td class="correct"><pre>let two = eval (App (App (Add, Int 1), Int 1))</pre></td><td class="correct"><pre>let two = eval (App (App (Add, Int 1), Int 1))</pre></td></tr>
180 <tr><td class="linenum">12</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
181 <tr><td class="linenum">13</td><td class="correct"><pre>let rec sum : type a. a term -> _ = fun x -></pre></td><td class="correct"><pre>let rec sum : type a. a term -> _ = fun x -></pre></td></tr>
182 <tr><td class="linenum">14</td><td class="correct"><pre> let y =</pre></td><td class="correct"><pre> let y =</pre></td></tr>
183 <tr><td class="linenum">15</td><td class="correct"><pre> match x with</pre></td><td class="correct"><pre> match x with</pre></td></tr>
184 <tr><td class="linenum">16</td><td class="correct"><pre> | Int n -> n</pre></td><td class="correct"><pre> | Int n -> n</pre></td></tr>
185 <tr><td class="linenum">17</td><td class="correct"><pre> | Add -> 0</pre></td><td class="correct"><pre> | Add -> 0</pre></td></tr>
186 <tr><td class="linenum">18</td><td class="correct"><pre> | App(f,x) -> sum f + sum x</pre></td><td class="correct"><pre> | App(f,x) -> sum f + sum x</pre></td></tr>
187 <tr><td class="linenum">19</td><td class="correct"><pre> in y + 1</pre></td><td class="correct"><pre> in y + 1</pre></td></tr>
188 <tr><td class="linenum">20</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
189 <tr><td class="linenum">21</td><td class="correct"><pre>type _ typ =</pre></td><td class="correct"><pre>type _ typ =</pre></td></tr>
190 <tr><td class="linenum">22</td><td class="correct"><pre> | Int : int typ</pre></td><td class="correct"><pre> | Int : int typ</pre></td></tr>
191 <tr><td class="linenum">23</td><td class="correct"><pre> | String : string typ</pre></td><td class="correct"><pre> | String : string typ</pre></td></tr>
192 <tr><td class="linenum">24</td><td class="correct"><pre> | Pair : 'a typ * 'b typ -> ('a * 'b) typ</pre></td><td class="correct"><pre> | Pair : 'a typ * 'b typ -> ('a * 'b) typ</pre></td></tr>
193 <tr><td class="linenum">25</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
194 <tr><td class="linenum">26</td><td class="correct"><pre>let rec to_string: type t. t typ -> t -> string =</pre></td><td class="correct"><pre>let rec to_string: type t. t typ -> t -> string =</pre></td></tr>
195 <tr><td class="linenum">27</td><td class="correct"><pre> fun t x -></pre></td><td class="correct"><pre> fun t x -></pre></td></tr>
196 <tr><td class="linenum">28</td><td class="different"><pre>····match·t·with</pre></td><td class="different"><pre>··match·t·with</pre></td></tr>
197 <tr><td class="linenum">29</td><td class="different"><pre>····|·Int·->·string_of_int·x</pre></td><td class="different"><pre>··|·Int·->·string_of_int·x</pre></td></tr>
198 <tr><td class="linenum">30</td><td class="different"><pre>····|·String·->·Printf.sprintf·"%S"·x</pre></td><td class="different"><pre>··|·String·->·Printf.sprintf·"%S"·x</pre></td></tr>
199 <tr><td class="linenum">31</td><td class="different"><pre>····|·Pair(t1,t2)·-></pre></td><td class="different"><pre>··|·Pair(t1,t2)·-></pre></td></tr>
200 <tr><td class="linenum">32</td><td class="different"><pre>······let·(x1,·x2)·=·x·in</pre></td><td class="different"><pre>····let·(x1,·x2)·=·x·in</pre></td></tr>
201 <tr><td class="linenum">33</td><td class="different"><pre>······Printf.sprintf·"(%s,%s)"·(to_string·t1·x1)·(to_string·t2·x2)</pre></td><td class="different"><pre>····Printf.sprintf·"(%s,%s)"·(to_string·t1·x1)·(to_string·t2·x2)</pre></td></tr>
202 <tr><td class="linenum">34</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
203 <tr><td class="linenum">35</td><td class="correct"><pre>type (_,_) eq = Eq : ('a,'a) eq</pre></td><td class="correct"><pre>type (_,_) eq = Eq : ('a,'a) eq</pre></td></tr>
204 <tr><td class="linenum">36</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
205 <tr><td class="linenum">37</td><td class="correct"><pre>let cast : type a b. (a,b) eq -> a -> b = fun Eq x -> x</pre></td><td class="correct"><pre>let cast : type a b. (a,b) eq -> a -> b = fun Eq x -> x</pre></td></tr>
206 <tr><td class="linenum">38</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
207 <tr><td class="linenum">39</td><td class="correct"><pre>let rec eq_type : type a b. a typ -> b typ -> (a,b) eq option =</pre></td><td class="correct"><pre>let rec eq_type : type a b. a typ -> b typ -> (a,b) eq option =</pre></td></tr>
208 <tr><td class="linenum">40</td><td class="correct"><pre> fun a b -></pre></td><td class="correct"><pre> fun a b -></pre></td></tr>
209 <tr><td class="linenum">41</td><td class="different"><pre>····match·a,·b·with</pre></td><td class="different"><pre>··match·a,·b·with</pre></td></tr>
210 <tr><td class="linenum">42</td><td class="different"><pre>····|·Int,·Int·->·Some·Eq</pre></td><td class="different"><pre>··|·Int,·Int·->·Some·Eq</pre></td></tr>
211 <tr><td class="linenum">43</td><td class="different"><pre>····|·String,·String·->·Some·Eq</pre></td><td class="different"><pre>··|·String,·String·->·Some·Eq</pre></td></tr>
212 <tr><td class="linenum">44</td><td class="different"><pre>····|·Pair(a1,a2),·Pair(b1,b2)·-></pre></td><td class="different"><pre>··|·Pair(a1,a2),·Pair(b1,b2)·-></pre></td></tr>
213 <tr><td class="linenum">45</td><td class="different"><pre>······begin·match·eq_type·a1·b1,·eq_type·a2·b2·with</pre></td><td class="different"><pre>····begin·match·eq_type·a1·b1,·eq_type·a2·b2·with</pre></td></tr>
214 <tr><td class="linenum">46</td><td class="different"><pre>········|·Some·Eq,·Some·Eq·->·Some·Eq</pre></td><td class="different"><pre>······|·Some·Eq,·Some·Eq·->·Some·Eq</pre></td></tr>
215 <tr><td class="linenum">47</td><td class="different"><pre>········|·_·->·None</pre></td><td class="different"><pre>······|·_·->·None</pre></td></tr>
216 <tr><td class="linenum">48</td><td class="different"><pre>······end</pre></td><td class="different"><pre>····end</pre></td></tr>
217 <tr><td class="linenum">49</td><td class="different"><pre>····|·_·->·None</pre></td><td class="different"><pre>··|·_·->·None</pre></td></tr>
218 <tr><td class="linenum">50</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
219 <tr><td class="linenum">51</td><td class="correct"><pre>type dyn = Dyn : 'a typ * 'a -> dyn</pre></td><td class="correct"><pre>type dyn = Dyn : 'a typ * 'a -> dyn</pre></td></tr>
220 <tr><td class="linenum">52</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
221 <tr><td class="linenum">53</td><td class="correct"><pre>let get_dyn : type a. a typ -> dyn -> a option =</pre></td><td class="correct"><pre>let get_dyn : type a. a typ -> dyn -> a option =</pre></td></tr>
222 <tr><td class="linenum">54</td><td class="correct"><pre> fun a (Dyn(b,x)) -></pre></td><td class="correct"><pre> fun a (Dyn(b,x)) -></pre></td></tr>
223 <tr><td class="linenum">55</td><td class="different"><pre>····match·eq_type·a·b·with</pre></td><td class="different"><pre>··match·eq_type·a·b·with</pre></td></tr>
224 <tr><td class="linenum">56</td><td class="different"><pre>····|·None·->·None</pre></td><td class="different"><pre>··|·None·->·None</pre></td></tr>
225 <tr><td class="linenum">57</td><td class="different"><pre>····|·Some·Eq·->·Some·x</pre></td><td class="different"><pre>··|·Some·Eq·->·Some·x</pre></td></tr>
226 <tr><td class="linenum">58</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
227 <tr><td class="linenum">59</td><td class="correct"><pre>let _ =</pre></td><td class="correct"><pre>let _ =</pre></td></tr>
228 <tr><td class="linenum">60</td><td class="correct"><pre> let f: type a. a list -> int =</pre></td><td class="correct"><pre> let f: type a. a list -> int =</pre></td></tr>
229 <tr><td class="linenum">61</td><td class="correct"><pre> fun _x -> 42</pre></td><td class="correct"><pre> fun _x -> 42</pre></td></tr>
230 <tr><td class="linenum">62</td><td class="correct"><pre> in</pre></td><td class="correct"><pre> in</pre></td></tr>
231 <tr><td class="linenum">63</td><td class="correct"><pre> f []</pre></td><td class="correct"><pre> f []</pre></td></tr>
232 <tr><td class="linenum">64</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
233 <tr><td class="linenum">65</td><td class="correct"><pre>let nth t n =</pre></td><td class="correct"><pre>let nth t n =</pre></td></tr>
234 <tr><td class="linenum">66</td><td class="correct"><pre> if n < 0 then None else</pre></td><td class="correct"><pre> if n < 0 then None else</pre></td></tr>
235 <tr><td class="linenum">67</td><td class="correct"><pre> let rec nth_aux: type b. ('a, b) t -> int -> 'a option = fun t n -></pre></td><td class="correct"><pre> let rec nth_aux: type b. ('a, b) t -> int -> 'a option = fun t n -></pre></td></tr>
236 <tr><td class="linenum">68</td><td class="correct"><pre> match t with</pre></td><td class="correct"><pre> match t with</pre></td></tr>
237 <tr><td class="linenum">69</td><td class="correct"><pre> | Empty -> None</pre></td><td class="correct"><pre> | Empty -> None</pre></td></tr>
238 <tr><td class="linenum">70</td><td class="correct"><pre> | Node (a, t) -> if n = 0 then Some a else nth_aux t (n-1)</pre></td><td class="correct"><pre> | Node (a, t) -> if n = 0 then Some a else nth_aux t (n-1)</pre></td></tr>
239 <tr><td class="linenum">71</td><td class="correct"><pre> in</pre></td><td class="correct"><pre> in</pre></td></tr>
240 <tr><td class="linenum">72</td><td class="correct"><pre> nth_aux t n</pre></td><td class="correct"><pre> nth_aux t n</pre></td></tr>
241 <tr><td class="linenum">73</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
242 <tr><td class="linenum">74</td><td class="correct"><pre>let rec f : type a b. a = function</pre></td><td class="correct"><pre>let rec f : type a b. a = function</pre></td></tr>
243 <tr><td class="linenum">75</td><td class="correct"><pre> | _ -> assert false</pre></td><td class="correct"><pre> | _ -> assert false</pre></td></tr>
244 <tr><td class="linenum">76</td><td class="correct"><pre>and g : type a. a = function</pre></td><td class="correct"><pre>and g : type a. a = function</pre></td></tr>
245 <tr><td class="linenum">77</td><td class="correct"><pre> | _ -> assert false</pre></td><td class="correct"><pre> | _ -> assert false</pre></td></tr>
162246 </table>
163247 </div>
164248 <div>
909993 <tr><td class="linenum">32</td><td class="correct"><pre> (fun () -> 4) ]</pre></td><td class="correct"><pre> (fun () -> 4) ]</pre></td></tr>
910994 </table>
911995 </div>
996 <div>
997 <h2>Differences in unit-classes.ml</h2>
998 <table>
999 <tr><th><th>Expected<th>Ocp-indent output</tr>
1000 <tr><td class="linenum">0</td><td class="correct"><pre>(** ocaml classes</pre></td><td class="correct"><pre>(** ocaml classes</pre></td></tr>
1001 <tr><td class="linenum">1</td><td class="correct"><pre> (http://caml.inria.fr/pub/docs/manual-ocaml/manual017.html)</pre></td><td class="correct"><pre> (http://caml.inria.fr/pub/docs/manual-ocaml/manual017.html)</pre></td></tr>
1002 <tr><td class="linenum">2</td><td class="correct"><pre>*)</pre></td><td class="correct"><pre>*)</pre></td></tr>
1003 <tr><td class="linenum">3</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1004 <tr><td class="linenum">4</td><td class="correct"><pre>(* class types *)</pre></td><td class="correct"><pre>(* class types *)</pre></td></tr>
1005 <tr><td class="linenum">5</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1006 <tr><td class="linenum">6</td><td class="correct"><pre>class type c =</pre></td><td class="correct"><pre>class type c =</pre></td></tr>
1007 <tr><td class="linenum">7</td><td class="correct"><pre> object</pre></td><td class="correct"><pre> object</pre></td></tr>
1008 <tr><td class="linenum">8</td><td class="correct"><pre> end</pre></td><td class="correct"><pre> end</pre></td></tr>
1009 <tr><td class="linenum">9</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1010 <tr><td class="linenum">10</td><td class="correct"><pre>class type c =</pre></td><td class="correct"><pre>class type c =</pre></td></tr>
1011 <tr><td class="linenum">11</td><td class="correct"><pre> M.cl</pre></td><td class="correct"><pre> M.cl</pre></td></tr>
1012 <tr><td class="linenum">12</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1013 <tr><td class="linenum">13</td><td class="correct"><pre>class type c =</pre></td><td class="correct"><pre>class type c =</pre></td></tr>
1014 <tr><td class="linenum">14</td><td class="correct"><pre> ['a, 'b] M.cl</pre></td><td class="correct"><pre> ['a, 'b] M.cl</pre></td></tr>
1015 <tr><td class="linenum">15</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1016 <tr><td class="linenum">16</td><td class="correct"><pre>class type c =</pre></td><td class="correct"><pre>class type c =</pre></td></tr>
1017 <tr><td class="linenum">17</td><td class="correct"><pre> object</pre></td><td class="correct"><pre> object</pre></td></tr>
1018 <tr><td class="linenum">18</td><td class="correct"><pre> ('ty)</pre></td><td class="correct"><pre> ('ty)</pre></td></tr>
1019 <tr><td class="linenum">19</td><td class="correct"><pre> inherit cl</pre></td><td class="correct"><pre> inherit cl</pre></td></tr>
1020 <tr><td class="linenum">20</td><td class="correct"><pre> val mutable virtual</pre></td><td class="correct"><pre> val mutable virtual</pre></td></tr>
1021 <tr><td class="linenum">21</td><td class="correct"><pre> var : bool</pre></td><td class="correct"><pre> var : bool</pre></td></tr>
1022 <tr><td class="linenum">22</td><td class="correct"><pre> method private bar1 x ~y : bool</pre></td><td class="correct"><pre> method private bar1 x ~y : bool</pre></td></tr>
1023 <tr><td class="linenum">23</td><td class="correct"><pre> method private virtual bar2 : 'a 'b.('a,'b) Hashtbl.t</pre></td><td class="correct"><pre> method private virtual bar2 : 'a 'b.('a,'b) Hashtbl.t</pre></td></tr>
1024 <tr><td class="linenum">24</td><td class="correct"><pre> constraint</pre></td><td class="correct"><pre> constraint</pre></td></tr>
1025 <tr><td class="linenum">25</td><td class="correct"><pre> 'a = 'b</pre></td><td class="correct"><pre> 'a = 'b</pre></td></tr>
1026 <tr><td class="linenum">26</td><td class="correct"><pre> end</pre></td><td class="correct"><pre> end</pre></td></tr>
1027 <tr><td class="linenum">27</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1028 <tr><td class="linenum">28</td><td class="correct"><pre>(* class expressions *)</pre></td><td class="correct"><pre>(* class expressions *)</pre></td></tr>
1029 <tr><td class="linenum">29</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1030 <tr><td class="linenum">30</td><td class="correct"><pre>class c =</pre></td><td class="correct"><pre>class c =</pre></td></tr>
1031 <tr><td class="linenum">31</td><td class="correct"><pre> ['a, 'b]</pre></td><td class="correct"><pre> ['a, 'b]</pre></td></tr>
1032 <tr><td class="linenum">32</td><td class="correct"><pre> M.cl</pre></td><td class="correct"><pre> M.cl</pre></td></tr>
1033 <tr><td class="linenum">33</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1034 <tr><td class="linenum">34</td><td class="correct"><pre>class c =</pre></td><td class="correct"><pre>class c =</pre></td></tr>
1035 <tr><td class="linenum">35</td><td class="correct"><pre> fun a b -></pre></td><td class="correct"><pre> fun a b -></pre></td></tr>
1036 <tr><td class="linenum">36</td><td class="different"><pre>····object</pre></td><td class="different"><pre>··object</pre></td></tr>
1037 <tr><td class="linenum">37</td><td class="different"><pre>····end</pre></td><td class="different"><pre>··end</pre></td></tr>
1038 <tr><td class="linenum">38</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1039 <tr><td class="linenum">39</td><td class="correct"><pre>class c = object</pre></td><td class="correct"><pre>class c = object</pre></td></tr>
1040 <tr><td class="linenum">40</td><td class="correct"><pre> val x = true</pre></td><td class="correct"><pre> val x = true</pre></td></tr>
1041 <tr><td class="linenum">41</td><td class="correct"><pre>end</pre></td><td class="correct"><pre>end</pre></td></tr>
1042 <tr><td class="linenum">42</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1043 <tr><td class="linenum">43</td><td class="correct"><pre>class c =</pre></td><td class="correct"><pre>class c =</pre></td></tr>
1044 <tr><td class="linenum">44</td><td class="correct"><pre> object</pre></td><td class="correct"><pre> object</pre></td></tr>
1045 <tr><td class="linenum">45</td><td class="correct"><pre> (_ :</pre></td><td class="correct"><pre> (_ :</pre></td></tr>
1046 <tr><td class="linenum">46</td><td class="correct"><pre> 'a)</pre></td><td class="correct"><pre> 'a)</pre></td></tr>
1047 <tr><td class="linenum">47</td><td class="correct"><pre> inherit Something.someclass</pre></td><td class="correct"><pre> inherit Something.someclass</pre></td></tr>
1048 <tr><td class="linenum">48</td><td class="correct"><pre> as v</pre></td><td class="correct"><pre> as v</pre></td></tr>
1049 <tr><td class="linenum">49</td><td class="correct"><pre> val mutable</pre></td><td class="correct"><pre> val mutable</pre></td></tr>
1050 <tr><td class="linenum">50</td><td class="correct"><pre> var : bool</pre></td><td class="correct"><pre> var : bool</pre></td></tr>
1051 <tr><td class="linenum">51</td><td class="correct"><pre> = true</pre></td><td class="correct"><pre> = true</pre></td></tr>
1052 <tr><td class="linenum">52</td><td class="correct"><pre> val mutable virtual var2</pre></td><td class="correct"><pre> val mutable virtual var2</pre></td></tr>
1053 <tr><td class="linenum">53</td><td class="correct"><pre> : string</pre></td><td class="correct"><pre> : string</pre></td></tr>
1054 <tr><td class="linenum">54</td><td class="correct"><pre> method private bar1 x ~y : bool =</pre></td><td class="correct"><pre> method private bar1 x ~y : bool =</pre></td></tr>
1055 <tr><td class="linenum">55</td><td class="correct"><pre> false</pre></td><td class="correct"><pre> false</pre></td></tr>
1056 <tr><td class="linenum">56</td><td class="correct"><pre> method private virtual bar2 : 'a 'b.('a,'b) Hashtbl.t</pre></td><td class="correct"><pre> method private virtual bar2 : 'a 'b.('a,'b) Hashtbl.t</pre></td></tr>
1057 <tr><td class="linenum">57</td><td class="correct"><pre> constraint</pre></td><td class="correct"><pre> constraint</pre></td></tr>
1058 <tr><td class="linenum">58</td><td class="correct"><pre> 'a = 'b</pre></td><td class="correct"><pre> 'a = 'b</pre></td></tr>
1059 <tr><td class="linenum">59</td><td class="correct"><pre> initializer</pre></td><td class="correct"><pre> initializer</pre></td></tr>
1060 <tr><td class="linenum">60</td><td class="correct"><pre> z</pre></td><td class="correct"><pre> z</pre></td></tr>
1061 <tr><td class="linenum">61</td><td class="correct"><pre> end</pre></td><td class="correct"><pre> end</pre></td></tr>
1062 <tr><td class="linenum">62</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1063 <tr><td class="linenum">63</td><td class="correct"><pre>(* method specific expressions *)</pre></td><td class="correct"><pre>(* method specific expressions *)</pre></td></tr>
1064 <tr><td class="linenum">64</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1065 <tr><td class="linenum">65</td><td class="correct"><pre>let e =</pre></td><td class="correct"><pre>let e =</pre></td></tr>
1066 <tr><td class="linenum">66</td><td class="correct"><pre> var <- true</pre></td><td class="correct"><pre> var <- true</pre></td></tr>
1067 <tr><td class="linenum">67</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1068 <tr><td class="linenum">68</td><td class="correct"><pre>let e =</pre></td><td class="correct"><pre>let e =</pre></td></tr>
1069 <tr><td class="linenum">69</td><td class="correct"><pre> {< var = false;</pre></td><td class="correct"><pre> {< var = false;</pre></td></tr>
1070 <tr><td class="linenum">70</td><td class="correct"><pre> var2 = true;</pre></td><td class="correct"><pre> var2 = true;</pre></td></tr>
1071 <tr><td class="linenum">71</td><td class="correct"><pre> >}</pre></td><td class="correct"><pre> >}</pre></td></tr>
1072 <tr><td class="linenum">72</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1073 <tr><td class="linenum">73</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1074 <tr><td class="linenum">74</td><td class="correct"><pre>(* class definitions *)</pre></td><td class="correct"><pre>(* class definitions *)</pre></td></tr>
1075 <tr><td class="linenum">75</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1076 <tr><td class="linenum">76</td><td class="correct"><pre>class cl =</pre></td><td class="correct"><pre>class cl =</pre></td></tr>
1077 <tr><td class="linenum">77</td><td class="correct"><pre> object</pre></td><td class="correct"><pre> object</pre></td></tr>
1078 <tr><td class="linenum">78</td><td class="correct"><pre> val x = true</pre></td><td class="correct"><pre> val x = true</pre></td></tr>
1079 <tr><td class="linenum">79</td><td class="correct"><pre> end</pre></td><td class="correct"><pre> end</pre></td></tr>
1080 <tr><td class="linenum">80</td><td class="correct"><pre>and</pre></td><td class="correct"><pre>and</pre></td></tr>
1081 <tr><td class="linenum">81</td><td class="correct"><pre> virtual ['a, 'b]</pre></td><td class="correct"><pre> virtual ['a, 'b]</pre></td></tr>
1082 <tr><td class="linenum">82</td><td class="correct"><pre> cl2 x y :</pre></td><td class="correct"><pre> cl2 x y :</pre></td></tr>
1083 <tr><td class="linenum">83</td><td class="correct"><pre> object</pre></td><td class="correct"><pre> object</pre></td></tr>
1084 <tr><td class="linenum">84</td><td class="correct"><pre> val x : bool</pre></td><td class="correct"><pre> val x : bool</pre></td></tr>
1085 <tr><td class="linenum">85</td><td class="correct"><pre> end = fun x y -></pre></td><td class="correct"><pre> end = fun x y -></pre></td></tr>
1086 <tr><td class="linenum">86</td><td class="correct"><pre> object</pre></td><td class="correct"><pre> object</pre></td></tr>
1087 <tr><td class="linenum">87</td><td class="correct"><pre> val x : bool = true</pre></td><td class="correct"><pre> val x : bool = true</pre></td></tr>
1088 <tr><td class="linenum">88</td><td class="correct"><pre> end</pre></td><td class="correct"><pre> end</pre></td></tr>
1089 <tr><td class="linenum">89</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1090 <tr><td class="linenum">90</td><td class="correct"><pre>class cl</pre></td><td class="correct"><pre>class cl</pre></td></tr>
1091 <tr><td class="linenum">91</td><td class="correct"><pre> : object end</pre></td><td class="correct"><pre> : object end</pre></td></tr>
1092 <tr><td class="linenum">92</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1093 <tr><td class="linenum">93</td><td class="correct"><pre>class type virtual ['a] clty = object</pre></td><td class="correct"><pre>class type virtual ['a] clty = object</pre></td></tr>
1094 <tr><td class="linenum">94</td><td class="correct"><pre> method x : int</pre></td><td class="correct"><pre> method x : int</pre></td></tr>
1095 <tr><td class="linenum">95</td><td class="correct"><pre>end</pre></td><td class="correct"><pre>end</pre></td></tr>
1096 <tr><td class="linenum">96</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1097 <tr><td class="linenum">97</td><td class="correct"><pre>(* objects *)</pre></td><td class="correct"><pre>(* objects *)</pre></td></tr>
1098 <tr><td class="linenum">98</td><td class="correct"><pre>val a :</pre></td><td class="correct"><pre>val a :</pre></td></tr>
1099 <tr><td class="linenum">99</td><td class="correct"><pre> < ></pre></td><td class="correct"><pre> < ></pre></td></tr>
1100 <tr><td class="linenum">100</td><td class="correct"><pre>let () = ()</pre></td><td class="correct"><pre>let () = ()</pre></td></tr>
1101 <tr><td class="linenum">101</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1102 <tr><td class="linenum">102</td><td class="correct"><pre>val a :</pre></td><td class="correct"><pre>val a :</pre></td></tr>
1103 <tr><td class="linenum">103</td><td class="correct"><pre> < .. ></pre></td><td class="correct"><pre> < .. ></pre></td></tr>
1104 <tr><td class="linenum">104</td><td class="correct"><pre>let () = ()</pre></td><td class="correct"><pre>let () = ()</pre></td></tr>
1105 <tr><td class="linenum">105</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1106 <tr><td class="linenum">106</td><td class="correct"><pre>val a :</pre></td><td class="correct"><pre>val a :</pre></td></tr>
1107 <tr><td class="linenum">107</td><td class="correct"><pre> < meth: int option;</pre></td><td class="correct"><pre> < meth: int option;</pre></td></tr>
1108 <tr><td class="linenum">108</td><td class="correct"><pre> meth2: 'a. 'a option;</pre></td><td class="correct"><pre> meth2: 'a. 'a option;</pre></td></tr>
1109 <tr><td class="linenum">109</td><td class="correct"><pre> meth3: 'a 'b. ('a,'b) Hashtbl.t ></pre></td><td class="correct"><pre> meth3: 'a 'b. ('a,'b) Hashtbl.t ></pre></td></tr>
1110 <tr><td class="linenum">110</td><td class="correct"><pre>let () = ()</pre></td><td class="correct"><pre>let () = ()</pre></td></tr>
1111 <tr><td class="linenum">111</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1112 <tr><td class="linenum">112</td><td class="correct"><pre>val a :</pre></td><td class="correct"><pre>val a :</pre></td></tr>
1113 <tr><td class="linenum">113</td><td class="correct"><pre> < meth: int option;</pre></td><td class="correct"><pre> < meth: int option;</pre></td></tr>
1114 <tr><td class="linenum">114</td><td class="correct"><pre> meth2: 'a. 'a option;</pre></td><td class="correct"><pre> meth2: 'a. 'a option;</pre></td></tr>
1115 <tr><td class="linenum">115</td><td class="correct"><pre> meth3: 'a 'b. ('a,'b) Hashtbl.t;</pre></td><td class="correct"><pre> meth3: 'a 'b. ('a,'b) Hashtbl.t;</pre></td></tr>
1116 <tr><td class="linenum">116</td><td class="correct"><pre> .. ></pre></td><td class="correct"><pre> .. ></pre></td></tr>
1117 <tr><td class="linenum">117</td><td class="correct"><pre>let () = ()</pre></td><td class="correct"><pre>let () = ()</pre></td></tr>
1118 <tr><td class="linenum">118</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1119 <tr><td class="linenum">119</td><td class="correct"><pre>(* #-types *)</pre></td><td class="correct"><pre>(* #-types *)</pre></td></tr>
1120 <tr><td class="linenum">120</td><td class="correct"><pre>val a :</pre></td><td class="correct"><pre>val a :</pre></td></tr>
1121 <tr><td class="linenum">121</td><td class="correct"><pre> #M.meth</pre></td><td class="correct"><pre> #M.meth</pre></td></tr>
1122 <tr><td class="linenum">122</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1123 <tr><td class="linenum">123</td><td class="correct"><pre>val a :</pre></td><td class="correct"><pre>val a :</pre></td></tr>
1124 <tr><td class="linenum">124</td><td class="correct"><pre> 'a#M.meth</pre></td><td class="correct"><pre> 'a#M.meth</pre></td></tr>
1125 <tr><td class="linenum">125</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1126 <tr><td class="linenum">126</td><td class="correct"><pre>val a :</pre></td><td class="correct"><pre>val a :</pre></td></tr>
1127 <tr><td class="linenum">127</td><td class="correct"><pre> ('a,'b*'c)</pre></td><td class="correct"><pre> ('a,'b*'c)</pre></td></tr>
1128 <tr><td class="linenum">128</td><td class="correct"><pre> #M.meth</pre></td><td class="correct"><pre> #M.meth</pre></td></tr>
1129 <tr><td class="linenum">129</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1130 <tr><td class="linenum">130</td><td class="correct"><pre>(* object types *)</pre></td><td class="correct"><pre>(* object types *)</pre></td></tr>
1131 <tr><td class="linenum">131</td><td class="correct"><pre>type a =</pre></td><td class="correct"><pre>type a =</pre></td></tr>
1132 <tr><td class="linenum">132</td><td class="correct"><pre> < ></pre></td><td class="correct"><pre> < ></pre></td></tr>
1133 <tr><td class="linenum">133</td><td class="correct"><pre>let () = ()</pre></td><td class="correct"><pre>let () = ()</pre></td></tr>
1134 <tr><td class="linenum">134</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1135 <tr><td class="linenum">135</td><td class="correct"><pre>type a =</pre></td><td class="correct"><pre>type a =</pre></td></tr>
1136 <tr><td class="linenum">136</td><td class="correct"><pre> < .. ></pre></td><td class="correct"><pre> < .. ></pre></td></tr>
1137 <tr><td class="linenum">137</td><td class="correct"><pre>let () = ()</pre></td><td class="correct"><pre>let () = ()</pre></td></tr>
1138 <tr><td class="linenum">138</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1139 <tr><td class="linenum">139</td><td class="correct"><pre>type a =</pre></td><td class="correct"><pre>type a =</pre></td></tr>
1140 <tr><td class="linenum">140</td><td class="correct"><pre> < meth: int option;</pre></td><td class="correct"><pre> < meth: int option;</pre></td></tr>
1141 <tr><td class="linenum">141</td><td class="correct"><pre> meth2: 'a. 'a option;</pre></td><td class="correct"><pre> meth2: 'a. 'a option;</pre></td></tr>
1142 <tr><td class="linenum">142</td><td class="correct"><pre> meth3: 'a 'b. ('a,'b) Hashtbl.t ></pre></td><td class="correct"><pre> meth3: 'a 'b. ('a,'b) Hashtbl.t ></pre></td></tr>
1143 <tr><td class="linenum">143</td><td class="correct"><pre>let () = ()</pre></td><td class="correct"><pre>let () = ()</pre></td></tr>
1144 <tr><td class="linenum">144</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1145 <tr><td class="linenum">145</td><td class="correct"><pre>type a =</pre></td><td class="correct"><pre>type a =</pre></td></tr>
1146 <tr><td class="linenum">146</td><td class="correct"><pre> < meth: int option;</pre></td><td class="correct"><pre> < meth: int option;</pre></td></tr>
1147 <tr><td class="linenum">147</td><td class="correct"><pre> meth2: 'a. 'a option;</pre></td><td class="correct"><pre> meth2: 'a. 'a option;</pre></td></tr>
1148 <tr><td class="linenum">148</td><td class="correct"><pre> meth3: 'a 'b. ('a,'b) Hashtbl.t;</pre></td><td class="correct"><pre> meth3: 'a 'b. ('a,'b) Hashtbl.t;</pre></td></tr>
1149 <tr><td class="linenum">149</td><td class="correct"><pre> .. ></pre></td><td class="correct"><pre> .. ></pre></td></tr>
1150 <tr><td class="linenum">150</td><td class="correct"><pre>let () = ()</pre></td><td class="correct"><pre>let () = ()</pre></td></tr>
1151 <tr><td class="linenum">151</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1152 <tr><td class="linenum">152</td><td class="correct"><pre>type t =</pre></td><td class="correct"><pre>type t =</pre></td></tr>
1153 <tr><td class="linenum">153</td><td class="correct"><pre> < a : int; b:</pre></td><td class="correct"><pre> < a : int; b:</pre></td></tr>
1154 <tr><td class="linenum">154</td><td class="correct"><pre> < a: int; b: < c:int > ></pre></td><td class="correct"><pre> < a: int; b: < c:int > ></pre></td></tr>
1155 <tr><td class="linenum">155</td><td class="correct"><pre> ></pre></td><td class="correct"><pre> ></pre></td></tr>
1156 <tr><td class="linenum">156</td><td class="correct"><pre>let () = ()</pre></td><td class="correct"><pre>let () = ()</pre></td></tr>
1157 <tr><td class="linenum">157</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1158 <tr><td class="linenum">158</td><td class="correct"><pre>type t =</pre></td><td class="correct"><pre>type t =</pre></td></tr>
1159 <tr><td class="linenum">159</td><td class="correct"><pre> < a : int; b:</pre></td><td class="correct"><pre> < a : int; b:</pre></td></tr>
1160 <tr><td class="linenum">160</td><td class="correct"><pre> < a: int; b: < c: int -> int> >;</pre></td><td class="correct"><pre> < a: int; b: < c: int -> int> >;</pre></td></tr>
1161 <tr><td class="linenum">161</td><td class="correct"><pre> c: int</pre></td><td class="correct"><pre> c: int</pre></td></tr>
1162 <tr><td class="linenum">162</td><td class="correct"><pre> ></pre></td><td class="correct"><pre> ></pre></td></tr>
1163 <tr><td class="linenum">163</td><td class="correct"><pre>let () = ()</pre></td><td class="correct"><pre>let () = ()</pre></td></tr>
1164 <tr><td class="linenum">164</td><td class="correct"><pre></pre></td><td class="correct"><pre></pre></td></tr>
1165 <tr><td class="linenum">165</td><td class="correct"><pre>type 'a t =</pre></td><td class="correct"><pre>type 'a t =</pre></td></tr>
1166 <tr><td class="linenum">166</td><td class="correct"><pre> | Bla : < x : int > t</pre></td><td class="correct"><pre> | Bla : < x : int > t</pre></td></tr>
1167 <tr><td class="linenum">167</td><td class="correct"><pre> | Blo : < y : int > t</pre></td><td class="correct"><pre> | Blo : < y : int > t</pre></td></tr>
1168 </table>
1169 </div>
9121170 </body>
9131171 </html>
9696 f @@ fun () ->
9797 g;
9898 h
99
100 let funct param
101 : A_very_long_module_name.t t1
102 * t2
103 =
104 something
2525
2626 let rec to_string: type t. t typ -> t -> string =
2727 fun t x ->
28 match t with
29 | Int -> string_of_int x
30 | String -> Printf.sprintf "%S" x
31 | Pair(t1,t2) ->
32 let (x1, x2) = x in
33 Printf.sprintf "(%s,%s)" (to_string t1 x1) (to_string t2 x2)
28 match t with
29 | Int -> string_of_int x
30 | String -> Printf.sprintf "%S" x
31 | Pair(t1,t2) ->
32 let (x1, x2) = x in
33 Printf.sprintf "(%s,%s)" (to_string t1 x1) (to_string t2 x2)
3434
3535 type (_,_) eq = Eq : ('a,'a) eq
3636
3838
3939 let rec eq_type : type a b. a typ -> b typ -> (a,b) eq option =
4040 fun a b ->
41 match a, b with
42 | Int, Int -> Some Eq
43 | String, String -> Some Eq
44 | Pair(a1,a2), Pair(b1,b2) ->
45 begin match eq_type a1 b1, eq_type a2 b2 with
46 | Some Eq, Some Eq -> Some Eq
47 | _ -> None
48 end
49 | _ -> None
41 match a, b with
42 | Int, Int -> Some Eq
43 | String, String -> Some Eq
44 | Pair(a1,a2), Pair(b1,b2) ->
45 begin match eq_type a1 b1, eq_type a2 b2 with
46 | Some Eq, Some Eq -> Some Eq
47 | _ -> None
48 end
49 | _ -> None
5050
5151 type dyn = Dyn : 'a typ * 'a -> dyn
5252
5353 let get_dyn : type a. a typ -> dyn -> a option =
5454 fun a (Dyn(b,x)) ->
55 match eq_type a b with
56 | None -> None
57 | Some Eq -> Some x
55 match eq_type a b with
56 | None -> None
57 | Some Eq -> Some x
5858
5959 let _ =
6060 let f: type a. a list -> int =
0 (* New issues reported as of 2018 *)
1
2 (* include.ml *)
3
4 module M : sig
5 include module type of struct
6 include I
7 end
8
9 val f : unit -> unit
10 end
11
12 (* record.ml *)
13 let _ =
14 { a_field : int =
15 3
16 ; another_field : int =
17 3
18 }
19
20 let _ =
21 { a_field =
22 3
23 ; another_field =
24 3
25 }
26
27 (* polyvariant.mli *)
28 module type S = sig
29 val a :
30 something:int
31 -> non_optional:
32 int list
33 list
34 list
35 -> ?optional:
36 int
37 -> int
38 end
39
40 module type S = sig
41 val a
42 : something:int
43 -> non_optional:
44 [ `A
45 | `B
46 ]
47 -> ?optional:
48 [ `A
49 | `B
50 ]
51 -> int
52 end
53
54 (* type_annot_ext.ml *)
55 let x =
56 let v : [%ext : int] = w in
57 "hello"
58
59 let f a =
60 match (a : Nothing.t) with
61 | _ -> .
62
63 let g () =
64 1
65
66 ;;
67
68 (* let_module_functor_application.ml *)
69 let module X = Make (struct
70 let i = 10
71 end)
72
73 (* gadts.ml *)
74 type 'a t =
75 | Foo :
76 int list list list list
77 * string list
78 * float list
79 * bool list
80 * 'a option list list
81 -> 'a option list list t
82
83 (* inline_record_indentation.ml *)
84 type t =
85 | Clause of {
86 field : ty;
87 }
88 | Clause of {
89 field : ty;
90 }
91 | Clause of {
92 field : ty;
93 }
94
95 (* constraint.ml *)
96 type 'a t = 'b constraint 'a = < foo : 'b >
97
98 let x = 8
99
100 (* custom_delim_in_comments.ml *)
101 (* some comment {|"|} *)
102 let f x = x
103 (* {|"|} *)
5050 bar
5151 (* about baz *)
5252 baz
53
54 (** Trying lists within comments:
55 - this is a
56 multi-line element of a list.
57 - and this is a one-liner
58 - this
59 has
60 many
61 more
62 lines
63 - and this is indented like a sub-list
64 - but isn't one at
65 -all
66
67 this is outside of the list though.
68
69 - and this is
70 - another
71 list
72
73 - and another
74 one
75
76 the end
77 *)
78
79 (* There is an issue with toplevel sessions:
80 # expr1;;
81 - : type1 = value1
82 # expr2;;
83 - : type2 = value2
84
85 Comment. *)
86
87 (* Comment:
88
89 - [code];
90 - {[ code ]} *)
5050 bar
5151 (* about baz *)
5252 baz
53
54 (** Trying lists within comments:
55 - this is a
56 multi-line element of a list.
57 - and this is a one-liner
58 - this
59 has
60 many
61 more
62 lines
63 - and this is indented like a sub-list
64 - but isn't one at
65 -all
66
67 this is outside of the list though.
68
69 - and this is
70 - another
71 list
72
73 - and another
74 one
75
76 the end
77 *)
78
79 (* There is an issue with toplevel sessions:
80 # expr1;;
81 - : type1 = value1
82 # expr2;;
83 - : type2 = value2
84
85 Comment. *)
86
87 (* Comment:
88
89 - [code];
90 - {[ code ]} *)
0 open! Base
1 open Ppxlib
2 open Ast_builder.Default
3
4 let loc = location ~start:[%here] ~end_:[%here] ~ghost:true
5
6 (* These three are okay: *)
7
8 include struct
9 let _ = [%expr `x]
10 let _ = ()
11 end
12
13 include struct
14 let _ = [%type: [`x]]
15 let _ = ()
16 end
17
18 include struct
19 let _ = [%pat? `x]
20 let _ = ()
21 end
22
23 (* These four cause the following line to jump back all the way to the left: *)
24
25 include struct
26 let _ = [%stri let () = ();;]
27 let _ = ()
28 end
29
30 include struct
31 let _ = [%str let () = ();;]
32 let _ = ()
33 end
34
35 include struct
36 let _ = [%sigi: val x : int]
37 let _ = ()
38 end
39
40 include struct
41 let _ = [%sig: val x : int]
42 let _ = ()
43 end
0 (* #183 *)
1
2 type 'a repr =
3 | Bytes of ('a -> string)
4 | Int of ('a -> int)
5 | Int32 of ('a -> int32)
6 | Int64 of ('a -> int64)
7 | Float of ('a -> float)
8
9 let bytes_of_repr = function
10 | Bytes b -> fun v -> b v
11 | Int i -> fun v -> R_byte_sort.of_int (i v)
12 | Int32 i -> fun v -> R_byte_sort.of_int32 (i v)
13 | Int64 i -> fun v -> R_byte_sort.of_int64 (i v)
14 | Float f -> fun v -> R_byte_sort.of_float (f v)
15
16 (* #265 *)
17
18 let _ = ( a
19 ;
20 b
21 )
22
23 let _ = {
24 a
25 ;
26 b
27 }
28
29 let f x =
30 ( foo
31 ;
32 bar )
33
34 let _ = ( a
35 ; (* foo *)
36 b
37 )
38
39 let _ = {
40 a
41 ; (* foo *)
42 b
43 }
44
45 let f x =
46 ( foo
47 ; (* foo *)
48 bar )
49
50 (* #224 *)
51 let () =
52 begin [@attribute]
53 print_endline "hello";
54 print_endline "world";
55 end
56
57 (* #188 *)
58 let f : t1 -> t2 -> t3 =
59 fun x y z ->
60 x + y + z
61
62 (* #257 *)
63 module M = struct
64 type a = A of b [@@deriving compare]
65 and b = B of a
66 end
0 -c strict_with=always,with=0
4242 val g : int -> int
4343 end
4444
45 let _ = (module struct
46 end)
47
48 let _ =
49 let _ = (module struct
50 foo
51 end)
52
53 include (Bad : (module type of M
54 with module N = O))
55
56 val debatable : (module Module.Sub
57 with type t1 = t1'
58 and type t2 = t2')
59
4560 module Store (K: API.KEY) (V: API.VALUE) :
4661 API.STORE with module K = K
4762 and module V = V =
0 let s = {|
1 |}
2
3 let s = {xx|
4 xx|}
5
6 let s =
7 {xx|
8 |}
9 |xx}
10
11 let s = {| foo
12 bar
13 |}
14
15 let s = {| foo
16 bar
17 |}
18
19 let s = {| foo
20 bar
21 |}
22
23 let s =
24 {|
25 |}
26
27 let s =
28 {|
29 |}
30
31 let s =
32 {| foo
33 |}
34
35 let s =
36 {xx| foo
37 bar
38 |yy}
39 baz
40 |xx}
41
42 let s =
43 {|
44 foo bar
45 baz
46 |}
116116 open M
117117 let x = 3
118118 ]
119
120 module M = struct
121 type a = A of b [@@deriving compare]
122 and b = B of a
123 end
4141 'a may be expressions where identifiers are strings
4242 'b an expressions where identfiers are uniq
4343 In that case, ('a,'a,'b,'b) represents a function that deconstruct a string expression
44 into a - list of string expression
45 - a function that expects an ident expression list and build you the the 'original' ident expression
44 into a
45 - list of string expression
46 - a function that expects an ident expression list and build you the the 'original' ident expression
4647
4748 DON'T LOOK at the types, it's too scary
4849 Instead take a look at the following example, where you build the subs_cons function for the expressions
121121 and t'' = t
122122 val v: t
123123 end
124
125 module Regression = struct
126 let f : 'a.
127 'a t * some_other_type
128 -> result_type
129 = body
130 end
3333
3434 class c =
3535 fun a b ->
36 object
37 end
36 object
37 end
3838
3939 class c = object
4040 val x = true
1414 shopt -s nullglob
1515
1616 ROOT=$(git rev-parse --show-toplevel)
17 OCP_INDENT="$ROOT"/ocp-indent
17 OCP_INDENT=$ROOT/_build/install/default/bin/ocp-indent
1818 cd $ROOT/tests
1919
2020 UPDATE=
0 (install
1 (section share_root)
2 (files
3 (ocp-indent.el as emacs/site-lisp/ocp-indent.el)
4 (ocp-indent.vim as ocp-indent/vim/indent/ocaml.vim))
5 )
5454 :group 'ocp-indent
5555 :type '(bool))
5656
57 (defcustom ocp-indent-untabify nil
58 "Send the buffer `untabify'ed to ocp-indent. Allows partial
59 indent even with tabs present.
60
61 Tabs are not replaced in the buffer except on lines getting an
62 indentation change."
63 :group 'ocp-indent
64 :type '(bool))
65
5766 (defun ocp-in-indentation-p ()
5867 "Tests whether all characters between beginning of line and point
5968 are blanks."
7584 (with-temp-buffer (insert-file-contents file)
7685 (buffer-string))))
7786
87 (defmacro ocp-indent--with-untabify (&rest body)
88 "If there are tabs and `ocp-indent-untabify', create a
89 temporary buffer containing the current buffer's contents
90 untabified and evaluate BODY there like `progn'. See also
91 `with-temp-buffer'. Otherwise evaluate BODY in the current
92 buffer."
93 (declare (indent 0) (debug t))
94 (let ((buf (make-symbol "buf")))
95 `(if (not (and ocp-indent-untabify
96 (save-excursion (goto-char (point-min)) (search-forward "\t" nil t))))
97 (progn ,@body)
98 (let ((,buf (generate-new-buffer " *ocp-indent*")))
99 (unwind-protect
100 (progn
101 (copy-to-buffer ,buf (point-min) (point-max))
102 (with-current-buffer ,buf
103 (untabify (point-min) (point-max))
104 (progn ,@body)))
105 (and (buffer-name ,buf) (kill-buffer ,buf)))))))
106
78107 (defun ocp-indent-region (start end)
79108 (interactive "r")
80109 (let*
84113 temporary-file-directory))
85114 (indents-str
86115 (with-output-to-string
87 (if (/= 0
88 (apply 'call-process-region
89 (point-min) (point-max) ocp-indent-path nil
90 (list standard-output errfile) nil
91 (ocp-indent-args start-line end-line)))
92 (error "Can't indent: %s returned failure" ocp-indent-path))))
116 (ocp-indent--with-untabify
117 (if (/= 0
118 (apply 'call-process-region
119 (point-min) (point-max) ocp-indent-path nil
120 (list standard-output errfile) nil
121 (ocp-indent-args start-line end-line)))
122 (error "Can't indent: %s returned failure" ocp-indent-path)))))
93123 (indents (mapcar 'string-to-number (split-string indents-str))))
94124 (when (file-exists-p errfile)
95125 (message (ocp-indent-file-to-string errfile))
+0
-113
uninstall.sh less more
0 #!/bin/bash
1 if [ -e "$1/bin/ocp-indent" ]; then rm -f "$1/bin/ocp-indent"
2 else echo "Warning: $1/bin/ocp-indent doesn't exist"
3 fi
4 if [ -e "$1/lib/ocp-indent/META" ]; then rm -f "$1/lib/ocp-indent/META"
5 else echo "Warning: $1/lib/ocp-indent/META doesn't exist"
6 fi
7 if [ -e "$1/lib/ocp-indent/lib/ocp-indent.lib.a" ]; then rm -f "$1/lib/ocp-indent/lib/ocp-indent.lib.a"
8 else echo "Warning: $1/lib/ocp-indent/lib/ocp-indent.lib.a doesn't exist"
9 fi
10 if [ -e "$1/lib/ocp-indent/lib/ocp-indent.lib.cma" ]; then rm -f "$1/lib/ocp-indent/lib/ocp-indent.lib.cma"
11 else echo "Warning: $1/lib/ocp-indent/lib/ocp-indent.lib.cma doesn't exist"
12 fi
13 if [ -e "$1/lib/ocp-indent/lib/ocp-indent.lib.cmxa" ]; then rm -f "$1/lib/ocp-indent/lib/ocp-indent.lib.cmxa"
14 else echo "Warning: $1/lib/ocp-indent/lib/ocp-indent.lib.cmxa doesn't exist"
15 fi
16 if [ -e "$1/lib/ocp-indent/lib/indentConfig.cmi" ]; then rm -f "$1/lib/ocp-indent/lib/indentConfig.cmi"
17 else echo "Warning: $1/lib/ocp-indent/lib/indentConfig.cmi doesn't exist"
18 fi
19 if [ -e "$1/lib/ocp-indent/lib/indentConfig.cmti" ]; then rm -f "$1/lib/ocp-indent/lib/indentConfig.cmti"
20 fi
21 if [ -e "$1/lib/ocp-indent/lib/indentBlock.cmi" ]; then rm -f "$1/lib/ocp-indent/lib/indentBlock.cmi"
22 else echo "Warning: $1/lib/ocp-indent/lib/indentBlock.cmi doesn't exist"
23 fi
24 if [ -e "$1/lib/ocp-indent/lib/indentBlock.cmti" ]; then rm -f "$1/lib/ocp-indent/lib/indentBlock.cmti"
25 fi
26 if [ -e "$1/lib/ocp-indent/lib/indentPrinter.cmi" ]; then rm -f "$1/lib/ocp-indent/lib/indentPrinter.cmi"
27 else echo "Warning: $1/lib/ocp-indent/lib/indentPrinter.cmi doesn't exist"
28 fi
29 if [ -e "$1/lib/ocp-indent/lib/indentPrinter.cmti" ]; then rm -f "$1/lib/ocp-indent/lib/indentPrinter.cmti"
30 fi
31 if [ -e "$1/lib/ocp-indent/utils/ocp-indent.utils.a" ]; then rm -f "$1/lib/ocp-indent/utils/ocp-indent.utils.a"
32 else echo "Warning: $1/lib/ocp-indent/utils/ocp-indent.utils.a doesn't exist"
33 fi
34 if [ -e "$1/lib/ocp-indent/utils/ocp-indent.utils.cma" ]; then rm -f "$1/lib/ocp-indent/utils/ocp-indent.utils.cma"
35 else echo "Warning: $1/lib/ocp-indent/utils/ocp-indent.utils.cma doesn't exist"
36 fi
37 if [ -e "$1/lib/ocp-indent/utils/ocp-indent.utils.cmxa" ]; then rm -f "$1/lib/ocp-indent/utils/ocp-indent.utils.cmxa"
38 else echo "Warning: $1/lib/ocp-indent/utils/ocp-indent.utils.cmxa doesn't exist"
39 fi
40 if [ -e "$1/lib/ocp-indent/utils/nstream.cmi" ]; then rm -f "$1/lib/ocp-indent/utils/nstream.cmi"
41 else echo "Warning: $1/lib/ocp-indent/utils/nstream.cmi doesn't exist"
42 fi
43 if [ -e "$1/lib/ocp-indent/utils/nstream.cmti" ]; then rm -f "$1/lib/ocp-indent/utils/nstream.cmti"
44 fi
45 if [ -e "$1/lib/ocp-indent/lexer/ocp-indent.lexer.a" ]; then rm -f "$1/lib/ocp-indent/lexer/ocp-indent.lexer.a"
46 else echo "Warning: $1/lib/ocp-indent/lexer/ocp-indent.lexer.a doesn't exist"
47 fi
48 if [ -e "$1/lib/ocp-indent/lexer/ocp-indent.lexer.cma" ]; then rm -f "$1/lib/ocp-indent/lexer/ocp-indent.lexer.cma"
49 else echo "Warning: $1/lib/ocp-indent/lexer/ocp-indent.lexer.cma doesn't exist"
50 fi
51 if [ -e "$1/lib/ocp-indent/lexer/ocp-indent.lexer.cmxa" ]; then rm -f "$1/lib/ocp-indent/lexer/ocp-indent.lexer.cmxa"
52 else echo "Warning: $1/lib/ocp-indent/lexer/ocp-indent.lexer.cmxa doesn't exist"
53 fi
54 if [ -e "$1/lib/ocp-indent/lexer/approx_tokens.cmi" ]; then rm -f "$1/lib/ocp-indent/lexer/approx_tokens.cmi"
55 else echo "Warning: $1/lib/ocp-indent/lexer/approx_tokens.cmi doesn't exist"
56 fi
57 if [ -e "$1/lib/ocp-indent/lexer/approx_tokens.cmt" ]; then rm -f "$1/lib/ocp-indent/lexer/approx_tokens.cmt"
58 fi
59 if [ -e "$1/lib/ocp-indent/lexer/approx_lexer.cmi" ]; then rm -f "$1/lib/ocp-indent/lexer/approx_lexer.cmi"
60 else echo "Warning: $1/lib/ocp-indent/lexer/approx_lexer.cmi doesn't exist"
61 fi
62 if [ -e "$1/lib/ocp-indent/lexer/approx_lexer.cmt" ]; then rm -f "$1/lib/ocp-indent/lexer/approx_lexer.cmt"
63 fi
64 if [ -e "$1/man/man1/ocp-indent.1" ]; then rm -f "$1/man/man1/ocp-indent.1"
65 else echo "Warning: $1/man/man1/ocp-indent.1 doesn't exist"
66 fi
67 if [ -e "$1/share/ocp-indent/vim/indent/ocaml.vim" ]; then rm -f "$1/share/ocp-indent/vim/indent/ocaml.vim"
68 else echo "Warning: $1/share/ocp-indent/vim/indent/ocaml.vim doesn't exist"
69 fi
70 if [ -e "$1/share/emacs/site-lisp/ocp-indent.el" ]; then rm -f "$1/share/emacs/site-lisp/ocp-indent.el"
71 else echo "Warning: $1/share/emacs/site-lisp/ocp-indent.el doesn't exist"
72 fi
73 if [ -d "$1/share/ocp-indent/vim/indent" ]
74 then rmdir -p "$1/share/ocp-indent/vim/indent" 2>/dev/null
75 fi
76 if [ -d "$1/share/emacs/site-lisp" ]
77 then rmdir -p "$1/share/emacs/site-lisp" 2>/dev/null
78 fi
79 if [ -d "$1/man/man1" ]
80 then rmdir -p "$1/man/man1" 2>/dev/null
81 fi
82 if [ -d "$1/lib/ocp-indent/utils" ]
83 then rmdir -p "$1/lib/ocp-indent/utils" 2>/dev/null
84 fi
85 if [ -d "$1/lib/ocp-indent/lib" ]
86 then rmdir -p "$1/lib/ocp-indent/lib" 2>/dev/null
87 fi
88 if [ -d "$1/lib/ocp-indent/lexer" ]
89 then rmdir -p "$1/lib/ocp-indent/lexer" 2>/dev/null
90 fi
91 if [ -d "$1/lib/ocp-indent" ]
92 then rmdir -p "$1/lib/ocp-indent" 2>/dev/null
93 fi
94 if [ -d "$1/bin" ]
95 then rmdir -p "$1/bin" 2>/dev/null
96 fi
97 if [ -d "$1/lib/ocp-indent" ]
98 then rmdir -p "$1/lib/ocp-indent" 2>/dev/null ||
99 echo "Warning: could not remove directory $1/lib/ocp-indent"
100 fi
101 if [ -d "$1/share/ocp-indent" ]
102 then rmdir -p "$1/share/ocp-indent" 2>/dev/null ||
103 echo "Warning: could not remove directory $1/share/ocp-indent"
104 fi
105 if [ -d "$1/etc/ocp-indent" ]
106 then rmdir -p "$1/etc/ocp-indent" 2>/dev/null ||
107 echo "Warning: could not remove directory $1/etc/ocp-indent"
108 fi
109 if [ -d "$1/doc/ocp-indent" ]
110 then rmdir -p "$1/doc/ocp-indent" 2>/dev/null ||
111 echo "Warning: could not remove directory $1/doc/ocp-indent"
112 fi
+0
-11
version.ocp.in less more
0 version = "@PACKAGE_VERSION@"
1
2 copyright = [ "OCamlPro 2012-2017" "Copyright 2011 Jun Furuse" ]
3 authors = [
4 "Louis Gesbert <louis.gesbert@ocamlpro.com>"
5 "Thomas Gazagnaire <thomas.gazagnaire@ocamlpro.com>"
6 "Pierre Chambart <pierre.chambart@ocamlpro.com>"
7 "Jun Furuse <jun.furuse@gmail.com>"
8 ]
9
10 license = [ "LGPL-2.1 with OCaml linking exception" ]