Codebase list ocaml-dssi / 133f58f
Imported Upstream version 0.1.0 Romain Beauxis 12 years ago
15 changed file(s) with 9471 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 0.1.0 (04-07-2011)
1 =====
2 * Initial release.
0 GNU GENERAL PUBLIC LICENSE
1 Version 2, June 1991
2
3 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
4 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8 Preamble
9
10 The licenses for most software are designed to take away your
11 freedom to share and change it. By contrast, the GNU General Public
12 License is intended to guarantee your freedom to share and change free
13 software--to make sure the software is free for all its users. This
14 General Public License applies to most of the Free Software
15 Foundation's software and to any other program whose authors commit to
16 using it. (Some other Free Software Foundation software is covered by
17 the GNU Library General Public License instead.) You can apply it to
18 your programs, too.
19
20 When we speak of free software, we are referring to freedom, not
21 price. Our General Public Licenses are designed to make sure that you
22 have the freedom to distribute copies of free software (and charge for
23 this service if you wish), that you receive source code or can get it
24 if you want it, that you can change the software or use pieces of it
25 in new free programs; and that you know you can do these things.
26
27 To protect your rights, we need to make restrictions that forbid
28 anyone to deny you these rights or to ask you to surrender the rights.
29 These restrictions translate to certain responsibilities for you if you
30 distribute copies of the software, or if you modify it.
31
32 For example, if you distribute copies of such a program, whether
33 gratis or for a fee, you must give the recipients all the rights that
34 you have. You must make sure that they, too, receive or can get the
35 source code. And you must show them these terms so they know their
36 rights.
37
38 We protect your rights with two steps: (1) copyright the software, and
39 (2) offer you this license which gives you legal permission to copy,
40 distribute and/or modify the software.
41
42 Also, for each author's protection and ours, we want to make certain
43 that everyone understands that there is no warranty for this free
44 software. If the software is modified by someone else and passed on, we
45 want its recipients to know that what they have is not the original, so
46 that any problems introduced by others will not reflect on the original
47 authors' reputations.
48
49 Finally, any free program is threatened constantly by software
50 patents. We wish to avoid the danger that redistributors of a free
51 program will individually obtain patent licenses, in effect making the
52 program proprietary. To prevent this, we have made it clear that any
53 patent must be licensed for everyone's free use or not licensed at all.
54
55 The precise terms and conditions for copying, distribution and
56 modification follow.
57
58 GNU GENERAL PUBLIC LICENSE
59 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
60
61 0. This License applies to any program or other work which contains
62 a notice placed by the copyright holder saying it may be distributed
63 under the terms of this General Public License. The "Program", below,
64 refers to any such program or work, and a "work based on the Program"
65 means either the Program or any derivative work under copyright law:
66 that is to say, a work containing the Program or a portion of it,
67 either verbatim or with modifications and/or translated into another
68 language. (Hereinafter, translation is included without limitation in
69 the term "modification".) Each licensee is addressed as "you".
70
71 Activities other than copying, distribution and modification are not
72 covered by this License; they are outside its scope. The act of
73 running the Program is not restricted, and the output from the Program
74 is covered only if its contents constitute a work based on the
75 Program (independent of having been made by running the Program).
76 Whether that is true depends on what the Program does.
77
78 1. You may copy and distribute verbatim copies of the Program's
79 source code as you receive it, in any medium, provided that you
80 conspicuously and appropriately publish on each copy an appropriate
81 copyright notice and disclaimer of warranty; keep intact all the
82 notices that refer to this License and to the absence of any warranty;
83 and give any other recipients of the Program a copy of this License
84 along with the Program.
85
86 You may charge a fee for the physical act of transferring a copy, and
87 you may at your option offer warranty protection in exchange for a fee.
88
89 2. You may modify your copy or copies of the Program or any portion
90 of it, thus forming a work based on the Program, and copy and
91 distribute such modifications or work under the terms of Section 1
92 above, provided that you also meet all of these conditions:
93
94 a) You must cause the modified files to carry prominent notices
95 stating that you changed the files and the date of any change.
96
97 b) You must cause any work that you distribute or publish, that in
98 whole or in part contains or is derived from the Program or any
99 part thereof, to be licensed as a whole at no charge to all third
100 parties under the terms of this License.
101
102 c) If the modified program normally reads commands interactively
103 when run, you must cause it, when started running for such
104 interactive use in the most ordinary way, to print or display an
105 announcement including an appropriate copyright notice and a
106 notice that there is no warranty (or else, saying that you provide
107 a warranty) and that users may redistribute the program under
108 these conditions, and telling the user how to view a copy of this
109 License. (Exception: if the Program itself is interactive but
110 does not normally print such an announcement, your work based on
111 the Program is not required to print an announcement.)
112
113 These requirements apply to the modified work as a whole. If
114 identifiable sections of that work are not derived from the Program,
115 and can be reasonably considered independent and separate works in
116 themselves, then this License, and its terms, do not apply to those
117 sections when you distribute them as separate works. But when you
118 distribute the same sections as part of a whole which is a work based
119 on the Program, the distribution of the whole must be on the terms of
120 this License, whose permissions for other licensees extend to the
121 entire whole, and thus to each and every part regardless of who wrote it.
122
123 Thus, it is not the intent of this section to claim rights or contest
124 your rights to work written entirely by you; rather, the intent is to
125 exercise the right to control the distribution of derivative or
126 collective works based on the Program.
127
128 In addition, mere aggregation of another work not based on the Program
129 with the Program (or with a work based on the Program) on a volume of
130 a storage or distribution medium does not bring the other work under
131 the scope of this License.
132
133 3. You may copy and distribute the Program (or a work based on it,
134 under Section 2) in object code or executable form under the terms of
135 Sections 1 and 2 above provided that you also do one of the following:
136
137 a) Accompany it with the complete corresponding machine-readable
138 source code, which must be distributed under the terms of Sections
139 1 and 2 above on a medium customarily used for software interchange; or,
140
141 b) Accompany it with a written offer, valid for at least three
142 years, to give any third party, for a charge no more than your
143 cost of physically performing source distribution, a complete
144 machine-readable copy of the corresponding source code, to be
145 distributed under the terms of Sections 1 and 2 above on a medium
146 customarily used for software interchange; or,
147
148 c) Accompany it with the information you received as to the offer
149 to distribute corresponding source code. (This alternative is
150 allowed only for noncommercial distribution and only if you
151 received the program in object code or executable form with such
152 an offer, in accord with Subsection b above.)
153
154 The source code for a work means the preferred form of the work for
155 making modifications to it. For an executable work, complete source
156 code means all the source code for all modules it contains, plus any
157 associated interface definition files, plus the scripts used to
158 control compilation and installation of the executable. However, as a
159 special exception, the source code distributed need not include
160 anything that is normally distributed (in either source or binary
161 form) with the major components (compiler, kernel, and so on) of the
162 operating system on which the executable runs, unless that component
163 itself accompanies the executable.
164
165 If distribution of executable or object code is made by offering
166 access to copy from a designated place, then offering equivalent
167 access to copy the source code from the same place counts as
168 distribution of the source code, even though third parties are not
169 compelled to copy the source along with the object code.
170
171 4. You may not copy, modify, sublicense, or distribute the Program
172 except as expressly provided under this License. Any attempt
173 otherwise to copy, modify, sublicense or distribute the Program is
174 void, and will automatically terminate your rights under this License.
175 However, parties who have received copies, or rights, from you under
176 this License will not have their licenses terminated so long as such
177 parties remain in full compliance.
178
179 5. You are not required to accept this License, since you have not
180 signed it. However, nothing else grants you permission to modify or
181 distribute the Program or its derivative works. These actions are
182 prohibited by law if you do not accept this License. Therefore, by
183 modifying or distributing the Program (or any work based on the
184 Program), you indicate your acceptance of this License to do so, and
185 all its terms and conditions for copying, distributing or modifying
186 the Program or works based on it.
187
188 6. Each time you redistribute the Program (or any work based on the
189 Program), the recipient automatically receives a license from the
190 original licensor to copy, distribute or modify the Program subject to
191 these terms and conditions. You may not impose any further
192 restrictions on the recipients' exercise of the rights granted herein.
193 You are not responsible for enforcing compliance by third parties to
194 this License.
195
196 7. If, as a consequence of a court judgment or allegation of patent
197 infringement or for any other reason (not limited to patent issues),
198 conditions are imposed on you (whether by court order, agreement or
199 otherwise) that contradict the conditions of this License, they do not
200 excuse you from the conditions of this License. If you cannot
201 distribute so as to satisfy simultaneously your obligations under this
202 License and any other pertinent obligations, then as a consequence you
203 may not distribute the Program at all. For example, if a patent
204 license would not permit royalty-free redistribution of the Program by
205 all those who receive copies directly or indirectly through you, then
206 the only way you could satisfy both it and this License would be to
207 refrain entirely from distribution of the Program.
208
209 If any portion of this section is held invalid or unenforceable under
210 any particular circumstance, the balance of the section is intended to
211 apply and the section as a whole is intended to apply in other
212 circumstances.
213
214 It is not the purpose of this section to induce you to infringe any
215 patents or other property right claims or to contest validity of any
216 such claims; this section has the sole purpose of protecting the
217 integrity of the free software distribution system, which is
218 implemented by public license practices. Many people have made
219 generous contributions to the wide range of software distributed
220 through that system in reliance on consistent application of that
221 system; it is up to the author/donor to decide if he or she is willing
222 to distribute software through any other system and a licensee cannot
223 impose that choice.
224
225 This section is intended to make thoroughly clear what is believed to
226 be a consequence of the rest of this License.
227
228 8. If the distribution and/or use of the Program is restricted in
229 certain countries either by patents or by copyrighted interfaces, the
230 original copyright holder who places the Program under this License
231 may add an explicit geographical distribution limitation excluding
232 those countries, so that distribution is permitted only in or among
233 countries not thus excluded. In such case, this License incorporates
234 the limitation as if written in the body of this License.
235
236 9. The Free Software Foundation may publish revised and/or new versions
237 of the General Public License from time to time. Such new versions will
238 be similar in spirit to the present version, but may differ in detail to
239 address new problems or concerns.
240
241 Each version is given a distinguishing version number. If the Program
242 specifies a version number of this License which applies to it and "any
243 later version", you have the option of following the terms and conditions
244 either of that version or of any later version published by the Free
245 Software Foundation. If the Program does not specify a version number of
246 this License, you may choose any version ever published by the Free Software
247 Foundation.
248
249 10. If you wish to incorporate parts of the Program into other free
250 programs whose distribution conditions are different, write to the author
251 to ask for permission. For software which is copyrighted by the Free
252 Software Foundation, write to the Free Software Foundation; we sometimes
253 make exceptions for this. Our decision will be guided by the two goals
254 of preserving the free status of all derivatives of our free software and
255 of promoting the sharing and reuse of software generally.
256
257 NO WARRANTY
258
259 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
260 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
261 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
262 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
263 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
264 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
265 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
266 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
267 REPAIR OR CORRECTION.
268
269 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
270 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
271 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
272 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
273 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
274 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
275 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
276 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
277 POSSIBILITY OF SUCH DAMAGES.
278
279 END OF TERMS AND CONDITIONS
280
281 How to Apply These Terms to Your New Programs
282
283 If you develop a new program, and you want it to be of the greatest
284 possible use to the public, the best way to achieve this is to make it
285 free software which everyone can redistribute and change under these terms.
286
287 To do so, attach the following notices to the program. It is safest
288 to attach them to the start of each source file to most effectively
289 convey the exclusion of warranty; and each file should have at least
290 the "copyright" line and a pointer to where the full notice is found.
291
292 <one line to give the program's name and a brief idea of what it does.>
293 Copyright (C) <year> <name of author>
294
295 This program is free software; you can redistribute it and/or modify
296 it under the terms of the GNU General Public License as published by
297 the Free Software Foundation; either version 2 of the License, or
298 (at your option) any later version.
299
300 This program is distributed in the hope that it will be useful,
301 but WITHOUT ANY WARRANTY; without even the implied warranty of
302 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
303 GNU General Public License for more details.
304
305 You should have received a copy of the GNU General Public License
306 along with this program; if not, write to the Free Software
307 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
308
309
310 Also add information on how to contact you by electronic and paper mail.
311
312 If the program is interactive, make it output a short notice like this
313 when it starts in an interactive mode:
314
315 Gnomovision version 69, Copyright (C) year name of author
316 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 This is free software, and you are welcome to redistribute it
318 under certain conditions; type `show c' for details.
319
320 The hypothetical commands `show w' and `show c' should show the appropriate
321 parts of the General Public License. Of course, the commands you use may
322 be called something other than `show w' and `show c'; they could even be
323 mouse-clicks or menu items--whatever suits your program.
324
325 You should also get your employer (if you work as a programmer) or your
326 school, if any, to sign a "copyright disclaimer" for the program, if
327 necessary. Here is a sample; alter the names:
328
329 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
332 <signature of Ty Coon>, 1 April 1989
333 Ty Coon, President of Vice
334
335 This General Public License does not permit incorporating your program into
336 proprietary programs. If your program is a subroutine library, you may
337 consider it more useful to permit linking proprietary applications with the
338 library. If this is what you want to do, use the GNU Library General
339 Public License instead of this License.
0 PROGNAME := ocaml-dssi
1 DISTFILES := COPYING CHANGES Makefile.in \
2 bootstrap configure configure.ac m4/*.m4 \
3 $(wildcard src/*.ml src/*.mli src/*.c) src/Makefile.in src/META.in \
4 src/OCamlMakefile \
5 $(wildcard examples/*/*.ml examples/*/Makefile examples/*/OCamlMakefile)
6 VERSION = @VERSION@
7
8 all clean install uninstall:
9 $(MAKE) -C src $@
10
11 distclean: clean
12 $(MAKE) -C examples clean
13
14 doc:
15 $(MAKE) -C src htdoc
16 mkdir -p doc
17 rm -rf doc/html
18 mv src/doc/dssi/html doc
19 rm -rf src/doc
20
21 dist:
22 rm -rf $(PROGNAME)-$(VERSION)
23 mkdir $(PROGNAME)-$(VERSION)
24 cp -r --parents $(DISTFILES) $(PROGNAME)-$(VERSION)
25 tar zcvf ../$(PROGNAME)-$(VERSION).tar.gz $(PROGNAME)-$(VERSION)
26 rm -rf $(PROGNAME)-$(VERSION)
27
28 .PHONY: dist doc
0 #!/bin/sh
1
2 aclocal -I m4
3 autoconf
4 autoconf
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.68 for ocaml-dssi 0.1.0.
3 #
4 # Report bugs to <savonet-users@lists.sourceforge.net>.
5 #
6 #
7 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
8 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
9 # Foundation, Inc.
10 #
11 #
12 # This configure script is free software; the Free Software Foundation
13 # gives unlimited permission to copy, distribute and modify it.
14 ## -------------------- ##
15 ## M4sh Initialization. ##
16 ## -------------------- ##
17
18 # Be more Bourne compatible
19 DUALCASE=1; export DUALCASE # for MKS sh
20 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21 emulate sh
22 NULLCMD=:
23 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
26 setopt NO_GLOB_SUBST
27 else
28 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
33 esac
34 fi
35
36
37 as_nl='
38 '
39 export as_nl
40 # Printing a long string crashes Solaris 7 /usr/bin/printf.
41 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44 # Prefer a ksh shell builtin over an external printf program on Solaris,
45 # but without wasting forks for bash or zsh.
46 if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53 else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73 fi
74
75 # The user is always right.
76 if test "${PATH_SEPARATOR+set}" != set; then
77 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
82 fi
83
84
85 # IFS
86 # We need space, tab and new line, in precisely that order. Quoting is
87 # there to prevent editors from complaining about space-tab.
88 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
89 # splitting by setting IFS to empty value.)
90 IFS=" "" $as_nl"
91
92 # Find who we are. Look in the path if we contain no directory separator.
93 as_myself=
94 case $0 in #((
95 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97 for as_dir in $PATH
98 do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
103 IFS=$as_save_IFS
104
105 ;;
106 esac
107 # We did not find ourselves, most probably we were run as `sh COMMAND'
108 # in which case we are not to be found in the path.
109 if test "x$as_myself" = x; then
110 as_myself=$0
111 fi
112 if test ! -f "$as_myself"; then
113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
115 fi
116
117 # Unset variables that we do not need and which cause bugs (e.g. in
118 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119 # suppresses any "Segmentation fault" message there. '((' could
120 # trigger a bug in pdksh 5.2.14.
121 for as_var in BASH_ENV ENV MAIL MAILPATH
122 do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124 done
125 PS1='$ '
126 PS2='> '
127 PS4='+ '
128
129 # NLS nuisances.
130 LC_ALL=C
131 export LC_ALL
132 LANGUAGE=C
133 export LANGUAGE
134
135 # CDPATH.
136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138 if test "x$CONFIG_SHELL" = x; then
139 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140 emulate sh
141 NULLCMD=:
142 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143 # is contrary to our usage. Disable this feature.
144 alias -g '\${1+\"\$@\"}'='\"\$@\"'
145 setopt NO_GLOB_SUBST
146 else
147 case \`(set -o) 2>/dev/null\` in #(
148 *posix*) :
149 set -o posix ;; #(
150 *) :
151 ;;
152 esac
153 fi
154 "
155 as_required="as_fn_return () { (exit \$1); }
156 as_fn_success () { as_fn_return 0; }
157 as_fn_failure () { as_fn_return 1; }
158 as_fn_ret_success () { return 0; }
159 as_fn_ret_failure () { return 1; }
160
161 exitcode=0
162 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168 else
169 exitcode=1; echo positional parameters were not saved.
170 fi
171 test x\$exitcode = x0 || exit 1"
172 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176 test \$(( 1 + 1 )) = 2 || exit 1"
177 if (eval "$as_required") 2>/dev/null; then :
178 as_have_required=yes
179 else
180 as_have_required=no
181 fi
182 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184 else
185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186 as_found=false
187 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188 do
189 IFS=$as_save_IFS
190 test -z "$as_dir" && as_dir=.
191 as_found=:
192 case $as_dir in #(
193 /*)
194 for as_base in sh bash ksh sh5; do
195 # Try only shells that exist, to save several forks.
196 as_shell=$as_dir/$as_base
197 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 CONFIG_SHELL=$as_shell as_have_required=yes
200 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 break 2
202 fi
203 fi
204 done;;
205 esac
206 as_found=false
207 done
208 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210 CONFIG_SHELL=$SHELL as_have_required=yes
211 fi; }
212 IFS=$as_save_IFS
213
214
215 if test "x$CONFIG_SHELL" != x; then :
216 # We cannot yet assume a decent shell, so we have to provide a
217 # neutralization value for shells without unset; and this also
218 # works around shells that cannot unset nonexistent variables.
219 # Preserve -v and -x to the replacement shell.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
224 case $- in # ((((
225 *v*x* | *x*v* ) as_opts=-vx ;;
226 *v* ) as_opts=-v ;;
227 *x* ) as_opts=-x ;;
228 * ) as_opts= ;;
229 esac
230 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
231 fi
232
233 if test x$as_have_required = xno; then :
234 $as_echo "$0: This script requires a shell more modern than all"
235 $as_echo "$0: the shells that I found on your system."
236 if test x${ZSH_VERSION+set} = xset ; then
237 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
238 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
239 else
240 $as_echo "$0: Please tell bug-autoconf@gnu.org and
241 $0: savonet-users@lists.sourceforge.net about your system,
242 $0: including any error possibly output before this
243 $0: message. Then install a modern shell, or manually run
244 $0: the script under such a shell if you do have one."
245 fi
246 exit 1
247 fi
248 fi
249 fi
250 SHELL=${CONFIG_SHELL-/bin/sh}
251 export SHELL
252 # Unset more variables known to interfere with behavior of common tools.
253 CLICOLOR_FORCE= GREP_OPTIONS=
254 unset CLICOLOR_FORCE GREP_OPTIONS
255
256 ## --------------------- ##
257 ## M4sh Shell Functions. ##
258 ## --------------------- ##
259 # as_fn_unset VAR
260 # ---------------
261 # Portably unset VAR.
262 as_fn_unset ()
263 {
264 { eval $1=; unset $1;}
265 }
266 as_unset=as_fn_unset
267
268 # as_fn_set_status STATUS
269 # -----------------------
270 # Set $? to STATUS, without forking.
271 as_fn_set_status ()
272 {
273 return $1
274 } # as_fn_set_status
275
276 # as_fn_exit STATUS
277 # -----------------
278 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
279 as_fn_exit ()
280 {
281 set +e
282 as_fn_set_status $1
283 exit $1
284 } # as_fn_exit
285
286 # as_fn_mkdir_p
287 # -------------
288 # Create "$as_dir" as a directory, including parents if necessary.
289 as_fn_mkdir_p ()
290 {
291
292 case $as_dir in #(
293 -*) as_dir=./$as_dir;;
294 esac
295 test -d "$as_dir" || eval $as_mkdir_p || {
296 as_dirs=
297 while :; do
298 case $as_dir in #(
299 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
300 *) as_qdir=$as_dir;;
301 esac
302 as_dirs="'$as_qdir' $as_dirs"
303 as_dir=`$as_dirname -- "$as_dir" ||
304 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
305 X"$as_dir" : 'X\(//\)[^/]' \| \
306 X"$as_dir" : 'X\(//\)$' \| \
307 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
308 $as_echo X"$as_dir" |
309 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
310 s//\1/
311 q
312 }
313 /^X\(\/\/\)[^/].*/{
314 s//\1/
315 q
316 }
317 /^X\(\/\/\)$/{
318 s//\1/
319 q
320 }
321 /^X\(\/\).*/{
322 s//\1/
323 q
324 }
325 s/.*/./; q'`
326 test -d "$as_dir" && break
327 done
328 test -z "$as_dirs" || eval "mkdir $as_dirs"
329 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
330
331
332 } # as_fn_mkdir_p
333 # as_fn_append VAR VALUE
334 # ----------------------
335 # Append the text in VALUE to the end of the definition contained in VAR. Take
336 # advantage of any shell optimizations that allow amortized linear growth over
337 # repeated appends, instead of the typical quadratic growth present in naive
338 # implementations.
339 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
340 eval 'as_fn_append ()
341 {
342 eval $1+=\$2
343 }'
344 else
345 as_fn_append ()
346 {
347 eval $1=\$$1\$2
348 }
349 fi # as_fn_append
350
351 # as_fn_arith ARG...
352 # ------------------
353 # Perform arithmetic evaluation on the ARGs, and store the result in the
354 # global $as_val. Take advantage of shells that can avoid forks. The arguments
355 # must be portable across $(()) and expr.
356 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
357 eval 'as_fn_arith ()
358 {
359 as_val=$(( $* ))
360 }'
361 else
362 as_fn_arith ()
363 {
364 as_val=`expr "$@" || test $? -eq 1`
365 }
366 fi # as_fn_arith
367
368
369 # as_fn_error STATUS ERROR [LINENO LOG_FD]
370 # ----------------------------------------
371 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
372 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
373 # script with STATUS, using 1 if that was 0.
374 as_fn_error ()
375 {
376 as_status=$1; test $as_status -eq 0 && as_status=1
377 if test "$4"; then
378 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
379 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
380 fi
381 $as_echo "$as_me: error: $2" >&2
382 as_fn_exit $as_status
383 } # as_fn_error
384
385 if expr a : '\(a\)' >/dev/null 2>&1 &&
386 test "X`expr 00001 : '.*\(...\)'`" = X001; then
387 as_expr=expr
388 else
389 as_expr=false
390 fi
391
392 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
393 as_basename=basename
394 else
395 as_basename=false
396 fi
397
398 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
399 as_dirname=dirname
400 else
401 as_dirname=false
402 fi
403
404 as_me=`$as_basename -- "$0" ||
405 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
406 X"$0" : 'X\(//\)$' \| \
407 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
408 $as_echo X/"$0" |
409 sed '/^.*\/\([^/][^/]*\)\/*$/{
410 s//\1/
411 q
412 }
413 /^X\/\(\/\/\)$/{
414 s//\1/
415 q
416 }
417 /^X\/\(\/\).*/{
418 s//\1/
419 q
420 }
421 s/.*/./; q'`
422
423 # Avoid depending upon Character Ranges.
424 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
425 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
426 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
427 as_cr_digits='0123456789'
428 as_cr_alnum=$as_cr_Letters$as_cr_digits
429
430
431 as_lineno_1=$LINENO as_lineno_1a=$LINENO
432 as_lineno_2=$LINENO as_lineno_2a=$LINENO
433 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
434 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
435 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
436 sed -n '
437 p
438 /[$]LINENO/=
439 ' <$as_myself |
440 sed '
441 s/[$]LINENO.*/&-/
442 t lineno
443 b
444 :lineno
445 N
446 :loop
447 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
448 t loop
449 s/-\n.*//
450 ' >$as_me.lineno &&
451 chmod +x "$as_me.lineno" ||
452 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
453
454 # Don't try to exec as it changes $[0], causing all sort of problems
455 # (the dirname of $[0] is not the place where we might find the
456 # original and so on. Autoconf is especially sensitive to this).
457 . "./$as_me.lineno"
458 # Exit status is that of the last command.
459 exit
460 }
461
462 ECHO_C= ECHO_N= ECHO_T=
463 case `echo -n x` in #(((((
464 -n*)
465 case `echo 'xy\c'` in
466 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
467 xy) ECHO_C='\c';;
468 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
469 ECHO_T=' ';;
470 esac;;
471 *)
472 ECHO_N='-n';;
473 esac
474
475 rm -f conf$$ conf$$.exe conf$$.file
476 if test -d conf$$.dir; then
477 rm -f conf$$.dir/conf$$.file
478 else
479 rm -f conf$$.dir
480 mkdir conf$$.dir 2>/dev/null
481 fi
482 if (echo >conf$$.file) 2>/dev/null; then
483 if ln -s conf$$.file conf$$ 2>/dev/null; then
484 as_ln_s='ln -s'
485 # ... but there are two gotchas:
486 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
487 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
488 # In both cases, we have to default to `cp -p'.
489 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
490 as_ln_s='cp -p'
491 elif ln conf$$.file conf$$ 2>/dev/null; then
492 as_ln_s=ln
493 else
494 as_ln_s='cp -p'
495 fi
496 else
497 as_ln_s='cp -p'
498 fi
499 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
500 rmdir conf$$.dir 2>/dev/null
501
502 if mkdir -p . 2>/dev/null; then
503 as_mkdir_p='mkdir -p "$as_dir"'
504 else
505 test -d ./-p && rmdir ./-p
506 as_mkdir_p=false
507 fi
508
509 if test -x / >/dev/null 2>&1; then
510 as_test_x='test -x'
511 else
512 if ls -dL / >/dev/null 2>&1; then
513 as_ls_L_option=L
514 else
515 as_ls_L_option=
516 fi
517 as_test_x='
518 eval sh -c '\''
519 if test -d "$1"; then
520 test -d "$1/.";
521 else
522 case $1 in #(
523 -*)set "./$1";;
524 esac;
525 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
526 ???[sx]*):;;*)false;;esac;fi
527 '\'' sh
528 '
529 fi
530 as_executable_p=$as_test_x
531
532 # Sed expression to map a string onto a valid CPP name.
533 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
534
535 # Sed expression to map a string onto a valid variable name.
536 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
537
538 as_awk_strverscmp='
539 # Use only awk features that work with 7th edition Unix awk (1978).
540 # My, what an old awk you have, Mr. Solaris!
541 END {
542 while (length(v1) && length(v2)) {
543 # Set d1 to be the next thing to compare from v1, and likewise for d2.
544 # Normally this is a single character, but if v1 and v2 contain digits,
545 # compare them as integers and fractions as strverscmp does.
546 if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) {
547 # Split v1 and v2 into their leading digit string components d1 and d2,
548 # and advance v1 and v2 past the leading digit strings.
549 for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue
550 for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue
551 d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1)
552 d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1)
553 if (d1 ~ /^0/) {
554 if (d2 ~ /^0/) {
555 # Compare two fractions.
556 while (d1 ~ /^0/ && d2 ~ /^0/) {
557 d1 = substr(d1, 2); len1--
558 d2 = substr(d2, 2); len2--
559 }
560 if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) {
561 # The two components differ in length, and the common prefix
562 # contains only leading zeros. Consider the longer to be less.
563 d1 = -len1
564 d2 = -len2
565 } else {
566 # Otherwise, compare as strings.
567 d1 = "x" d1
568 d2 = "x" d2
569 }
570 } else {
571 # A fraction is less than an integer.
572 exit 1
573 }
574 } else {
575 if (d2 ~ /^0/) {
576 # An integer is greater than a fraction.
577 exit 2
578 } else {
579 # Compare two integers.
580 d1 += 0
581 d2 += 0
582 }
583 }
584 } else {
585 # The normal case, without worrying about digits.
586 d1 = substr(v1, 1, 1); v1 = substr(v1, 2)
587 d2 = substr(v2, 1, 1); v2 = substr(v2, 2)
588 }
589 if (d1 < d2) exit 1
590 if (d1 > d2) exit 2
591 }
592 # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10),
593 # which mishandles some comparisons of empty strings to integers.
594 if (length(v2)) exit 1
595 if (length(v1)) exit 2
596 }
597 '
598
599 test -n "$DJDIR" || exec 7<&0 </dev/null
600 exec 6>&1
601
602 # Name of the host.
603 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
604 # so uname gets run too.
605 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
606
607 #
608 # Initializations.
609 #
610 ac_default_prefix=/usr/local
611 ac_clean_files=
612 ac_config_libobj_dir=.
613 LIBOBJS=
614 cross_compiling=no
615 subdirs=
616 MFLAGS=
617 MAKEFLAGS=
618
619 # Identity of this package.
620 PACKAGE_NAME='ocaml-dssi'
621 PACKAGE_TARNAME='ocaml-dssi'
622 PACKAGE_VERSION='0.1.0'
623 PACKAGE_STRING='ocaml-dssi 0.1.0'
624 PACKAGE_BUGREPORT='savonet-users@lists.sourceforge.net'
625 PACKAGE_URL=''
626
627 # Factoring default headers for most tests.
628 ac_includes_default="\
629 #include <stdio.h>
630 #ifdef HAVE_SYS_TYPES_H
631 # include <sys/types.h>
632 #endif
633 #ifdef HAVE_SYS_STAT_H
634 # include <sys/stat.h>
635 #endif
636 #ifdef STDC_HEADERS
637 # include <stdlib.h>
638 # include <stddef.h>
639 #else
640 # ifdef HAVE_STDLIB_H
641 # include <stdlib.h>
642 # endif
643 #endif
644 #ifdef HAVE_STRING_H
645 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
646 # include <memory.h>
647 # endif
648 # include <string.h>
649 #endif
650 #ifdef HAVE_STRINGS_H
651 # include <strings.h>
652 #endif
653 #ifdef HAVE_INTTYPES_H
654 # include <inttypes.h>
655 #endif
656 #ifdef HAVE_STDINT_H
657 # include <stdint.h>
658 #endif
659 #ifdef HAVE_UNISTD_H
660 # include <unistd.h>
661 #endif"
662
663 ac_subst_vars='LTLIBOBJS
664 LIBOBJS
665 all_requires
666 requires
667 ALL_INC
668 INC
669 VERSION
670 OCAMLLADSPA_INC
671 EGREP
672 GREP
673 CPP
674 AR
675 OCAMLFLAGS
676 CAMLLIBPATH
677 OCAMLNCFLAGS
678 OBJEXT
679 EXEEXT
680 ac_ct_CC
681 CPPFLAGS
682 LDFLAGS
683 CFLAGS
684 CC
685 OCAMLFIND
686 CAMLP4RF
687 CAMLP4R
688 CAMLP4PROF
689 CAMLP4ORF
690 CAMLP4OOF
691 CAMLP4OF
692 CAMLP4O
693 CAMLP4BOOT
694 CAMLP4
695 OCAMLYACC
696 OCAMLLEXDOTOPT
697 OCAMLLEX
698 CAMLIDL
699 OCAMLBUILD
700 OCAMLDOC
701 OCAMLMKLIB
702 OCAMLMKTOP
703 OCAMLDEP
704 OCAML
705 OCAMLOPTDOTOPT
706 OCAMLCDOTOPT
707 OCAML_DYNLINK
708 OCAMLBEST
709 OCAMLOPT
710 OCAMLLIB
711 OCAMLVERSION
712 OCAML_HAS_FIRST_CLASS_MODULES
713 OCAMLC
714 OCAMLFIND_LDCONF
715 target_alias
716 host_alias
717 build_alias
718 LIBS
719 ECHO_T
720 ECHO_N
721 ECHO_C
722 DEFS
723 mandir
724 localedir
725 libdir
726 psdir
727 pdfdir
728 dvidir
729 htmldir
730 infodir
731 docdir
732 oldincludedir
733 includedir
734 localstatedir
735 sharedstatedir
736 sysconfdir
737 datadir
738 datarootdir
739 libexecdir
740 sbindir
741 bindir
742 program_transform_name
743 prefix
744 exec_prefix
745 PACKAGE_URL
746 PACKAGE_BUGREPORT
747 PACKAGE_STRING
748 PACKAGE_VERSION
749 PACKAGE_TARNAME
750 PACKAGE_NAME
751 PATH_SEPARATOR
752 SHELL'
753 ac_subst_files=''
754 ac_user_opts='
755 enable_option_checking
756 enable_ldconf
757 enable_camlp4
758 enable_debugging
759 enable_profiling
760 enable_nativecode
761 enable_custom
762 with_ladspa_dir
763 '
764 ac_precious_vars='build_alias
765 host_alias
766 target_alias
767 CC
768 CFLAGS
769 LDFLAGS
770 LIBS
771 CPPFLAGS
772 CPP'
773
774
775 # Initialize some variables set by options.
776 ac_init_help=
777 ac_init_version=false
778 ac_unrecognized_opts=
779 ac_unrecognized_sep=
780 # The variables have the same names as the options, with
781 # dashes changed to underlines.
782 cache_file=/dev/null
783 exec_prefix=NONE
784 no_create=
785 no_recursion=
786 prefix=NONE
787 program_prefix=NONE
788 program_suffix=NONE
789 program_transform_name=s,x,x,
790 silent=
791 site=
792 srcdir=
793 verbose=
794 x_includes=NONE
795 x_libraries=NONE
796
797 # Installation directory options.
798 # These are left unexpanded so users can "make install exec_prefix=/foo"
799 # and all the variables that are supposed to be based on exec_prefix
800 # by default will actually change.
801 # Use braces instead of parens because sh, perl, etc. also accept them.
802 # (The list follows the same order as the GNU Coding Standards.)
803 bindir='${exec_prefix}/bin'
804 sbindir='${exec_prefix}/sbin'
805 libexecdir='${exec_prefix}/libexec'
806 datarootdir='${prefix}/share'
807 datadir='${datarootdir}'
808 sysconfdir='${prefix}/etc'
809 sharedstatedir='${prefix}/com'
810 localstatedir='${prefix}/var'
811 includedir='${prefix}/include'
812 oldincludedir='/usr/include'
813 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
814 infodir='${datarootdir}/info'
815 htmldir='${docdir}'
816 dvidir='${docdir}'
817 pdfdir='${docdir}'
818 psdir='${docdir}'
819 libdir='${exec_prefix}/lib'
820 localedir='${datarootdir}/locale'
821 mandir='${datarootdir}/man'
822
823 ac_prev=
824 ac_dashdash=
825 for ac_option
826 do
827 # If the previous option needs an argument, assign it.
828 if test -n "$ac_prev"; then
829 eval $ac_prev=\$ac_option
830 ac_prev=
831 continue
832 fi
833
834 case $ac_option in
835 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
836 *=) ac_optarg= ;;
837 *) ac_optarg=yes ;;
838 esac
839
840 # Accept the important Cygnus configure options, so we can diagnose typos.
841
842 case $ac_dashdash$ac_option in
843 --)
844 ac_dashdash=yes ;;
845
846 -bindir | --bindir | --bindi | --bind | --bin | --bi)
847 ac_prev=bindir ;;
848 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
849 bindir=$ac_optarg ;;
850
851 -build | --build | --buil | --bui | --bu)
852 ac_prev=build_alias ;;
853 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
854 build_alias=$ac_optarg ;;
855
856 -cache-file | --cache-file | --cache-fil | --cache-fi \
857 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
858 ac_prev=cache_file ;;
859 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
860 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
861 cache_file=$ac_optarg ;;
862
863 --config-cache | -C)
864 cache_file=config.cache ;;
865
866 -datadir | --datadir | --datadi | --datad)
867 ac_prev=datadir ;;
868 -datadir=* | --datadir=* | --datadi=* | --datad=*)
869 datadir=$ac_optarg ;;
870
871 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
872 | --dataroo | --dataro | --datar)
873 ac_prev=datarootdir ;;
874 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
875 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
876 datarootdir=$ac_optarg ;;
877
878 -disable-* | --disable-*)
879 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
880 # Reject names that are not valid shell variable names.
881 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
882 as_fn_error $? "invalid feature name: $ac_useropt"
883 ac_useropt_orig=$ac_useropt
884 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
885 case $ac_user_opts in
886 *"
887 "enable_$ac_useropt"
888 "*) ;;
889 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
890 ac_unrecognized_sep=', ';;
891 esac
892 eval enable_$ac_useropt=no ;;
893
894 -docdir | --docdir | --docdi | --doc | --do)
895 ac_prev=docdir ;;
896 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
897 docdir=$ac_optarg ;;
898
899 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
900 ac_prev=dvidir ;;
901 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
902 dvidir=$ac_optarg ;;
903
904 -enable-* | --enable-*)
905 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
906 # Reject names that are not valid shell variable names.
907 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
908 as_fn_error $? "invalid feature name: $ac_useropt"
909 ac_useropt_orig=$ac_useropt
910 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
911 case $ac_user_opts in
912 *"
913 "enable_$ac_useropt"
914 "*) ;;
915 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
916 ac_unrecognized_sep=', ';;
917 esac
918 eval enable_$ac_useropt=\$ac_optarg ;;
919
920 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
921 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
922 | --exec | --exe | --ex)
923 ac_prev=exec_prefix ;;
924 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
925 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
926 | --exec=* | --exe=* | --ex=*)
927 exec_prefix=$ac_optarg ;;
928
929 -gas | --gas | --ga | --g)
930 # Obsolete; use --with-gas.
931 with_gas=yes ;;
932
933 -help | --help | --hel | --he | -h)
934 ac_init_help=long ;;
935 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
936 ac_init_help=recursive ;;
937 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
938 ac_init_help=short ;;
939
940 -host | --host | --hos | --ho)
941 ac_prev=host_alias ;;
942 -host=* | --host=* | --hos=* | --ho=*)
943 host_alias=$ac_optarg ;;
944
945 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
946 ac_prev=htmldir ;;
947 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
948 | --ht=*)
949 htmldir=$ac_optarg ;;
950
951 -includedir | --includedir | --includedi | --included | --include \
952 | --includ | --inclu | --incl | --inc)
953 ac_prev=includedir ;;
954 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
955 | --includ=* | --inclu=* | --incl=* | --inc=*)
956 includedir=$ac_optarg ;;
957
958 -infodir | --infodir | --infodi | --infod | --info | --inf)
959 ac_prev=infodir ;;
960 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
961 infodir=$ac_optarg ;;
962
963 -libdir | --libdir | --libdi | --libd)
964 ac_prev=libdir ;;
965 -libdir=* | --libdir=* | --libdi=* | --libd=*)
966 libdir=$ac_optarg ;;
967
968 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
969 | --libexe | --libex | --libe)
970 ac_prev=libexecdir ;;
971 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
972 | --libexe=* | --libex=* | --libe=*)
973 libexecdir=$ac_optarg ;;
974
975 -localedir | --localedir | --localedi | --localed | --locale)
976 ac_prev=localedir ;;
977 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
978 localedir=$ac_optarg ;;
979
980 -localstatedir | --localstatedir | --localstatedi | --localstated \
981 | --localstate | --localstat | --localsta | --localst | --locals)
982 ac_prev=localstatedir ;;
983 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
984 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
985 localstatedir=$ac_optarg ;;
986
987 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
988 ac_prev=mandir ;;
989 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
990 mandir=$ac_optarg ;;
991
992 -nfp | --nfp | --nf)
993 # Obsolete; use --without-fp.
994 with_fp=no ;;
995
996 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
997 | --no-cr | --no-c | -n)
998 no_create=yes ;;
999
1000 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1001 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1002 no_recursion=yes ;;
1003
1004 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1005 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1006 | --oldin | --oldi | --old | --ol | --o)
1007 ac_prev=oldincludedir ;;
1008 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1009 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1010 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1011 oldincludedir=$ac_optarg ;;
1012
1013 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1014 ac_prev=prefix ;;
1015 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1016 prefix=$ac_optarg ;;
1017
1018 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1019 | --program-pre | --program-pr | --program-p)
1020 ac_prev=program_prefix ;;
1021 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1022 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1023 program_prefix=$ac_optarg ;;
1024
1025 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1026 | --program-suf | --program-su | --program-s)
1027 ac_prev=program_suffix ;;
1028 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1029 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1030 program_suffix=$ac_optarg ;;
1031
1032 -program-transform-name | --program-transform-name \
1033 | --program-transform-nam | --program-transform-na \
1034 | --program-transform-n | --program-transform- \
1035 | --program-transform | --program-transfor \
1036 | --program-transfo | --program-transf \
1037 | --program-trans | --program-tran \
1038 | --progr-tra | --program-tr | --program-t)
1039 ac_prev=program_transform_name ;;
1040 -program-transform-name=* | --program-transform-name=* \
1041 | --program-transform-nam=* | --program-transform-na=* \
1042 | --program-transform-n=* | --program-transform-=* \
1043 | --program-transform=* | --program-transfor=* \
1044 | --program-transfo=* | --program-transf=* \
1045 | --program-trans=* | --program-tran=* \
1046 | --progr-tra=* | --program-tr=* | --program-t=*)
1047 program_transform_name=$ac_optarg ;;
1048
1049 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1050 ac_prev=pdfdir ;;
1051 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1052 pdfdir=$ac_optarg ;;
1053
1054 -psdir | --psdir | --psdi | --psd | --ps)
1055 ac_prev=psdir ;;
1056 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1057 psdir=$ac_optarg ;;
1058
1059 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1060 | -silent | --silent | --silen | --sile | --sil)
1061 silent=yes ;;
1062
1063 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1064 ac_prev=sbindir ;;
1065 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1066 | --sbi=* | --sb=*)
1067 sbindir=$ac_optarg ;;
1068
1069 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1070 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1071 | --sharedst | --shareds | --shared | --share | --shar \
1072 | --sha | --sh)
1073 ac_prev=sharedstatedir ;;
1074 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1075 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1076 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1077 | --sha=* | --sh=*)
1078 sharedstatedir=$ac_optarg ;;
1079
1080 -site | --site | --sit)
1081 ac_prev=site ;;
1082 -site=* | --site=* | --sit=*)
1083 site=$ac_optarg ;;
1084
1085 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1086 ac_prev=srcdir ;;
1087 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1088 srcdir=$ac_optarg ;;
1089
1090 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1091 | --syscon | --sysco | --sysc | --sys | --sy)
1092 ac_prev=sysconfdir ;;
1093 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1094 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1095 sysconfdir=$ac_optarg ;;
1096
1097 -target | --target | --targe | --targ | --tar | --ta | --t)
1098 ac_prev=target_alias ;;
1099 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1100 target_alias=$ac_optarg ;;
1101
1102 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1103 verbose=yes ;;
1104
1105 -version | --version | --versio | --versi | --vers | -V)
1106 ac_init_version=: ;;
1107
1108 -with-* | --with-*)
1109 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1110 # Reject names that are not valid shell variable names.
1111 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1112 as_fn_error $? "invalid package name: $ac_useropt"
1113 ac_useropt_orig=$ac_useropt
1114 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1115 case $ac_user_opts in
1116 *"
1117 "with_$ac_useropt"
1118 "*) ;;
1119 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1120 ac_unrecognized_sep=', ';;
1121 esac
1122 eval with_$ac_useropt=\$ac_optarg ;;
1123
1124 -without-* | --without-*)
1125 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1126 # Reject names that are not valid shell variable names.
1127 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1128 as_fn_error $? "invalid package name: $ac_useropt"
1129 ac_useropt_orig=$ac_useropt
1130 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1131 case $ac_user_opts in
1132 *"
1133 "with_$ac_useropt"
1134 "*) ;;
1135 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1136 ac_unrecognized_sep=', ';;
1137 esac
1138 eval with_$ac_useropt=no ;;
1139
1140 --x)
1141 # Obsolete; use --with-x.
1142 with_x=yes ;;
1143
1144 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1145 | --x-incl | --x-inc | --x-in | --x-i)
1146 ac_prev=x_includes ;;
1147 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1148 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1149 x_includes=$ac_optarg ;;
1150
1151 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1152 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1153 ac_prev=x_libraries ;;
1154 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1155 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1156 x_libraries=$ac_optarg ;;
1157
1158 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1159 Try \`$0 --help' for more information"
1160 ;;
1161
1162 *=*)
1163 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1164 # Reject names that are not valid shell variable names.
1165 case $ac_envvar in #(
1166 '' | [0-9]* | *[!_$as_cr_alnum]* )
1167 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1168 esac
1169 eval $ac_envvar=\$ac_optarg
1170 export $ac_envvar ;;
1171
1172 *)
1173 # FIXME: should be removed in autoconf 3.0.
1174 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1175 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1176 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1177 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1178 ;;
1179
1180 esac
1181 done
1182
1183 if test -n "$ac_prev"; then
1184 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1185 as_fn_error $? "missing argument to $ac_option"
1186 fi
1187
1188 if test -n "$ac_unrecognized_opts"; then
1189 case $enable_option_checking in
1190 no) ;;
1191 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1192 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1193 esac
1194 fi
1195
1196 # Check all directory arguments for consistency.
1197 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1198 datadir sysconfdir sharedstatedir localstatedir includedir \
1199 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1200 libdir localedir mandir
1201 do
1202 eval ac_val=\$$ac_var
1203 # Remove trailing slashes.
1204 case $ac_val in
1205 */ )
1206 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1207 eval $ac_var=\$ac_val;;
1208 esac
1209 # Be sure to have absolute directory names.
1210 case $ac_val in
1211 [\\/$]* | ?:[\\/]* ) continue;;
1212 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1213 esac
1214 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1215 done
1216
1217 # There might be people who depend on the old broken behavior: `$host'
1218 # used to hold the argument of --host etc.
1219 # FIXME: To remove some day.
1220 build=$build_alias
1221 host=$host_alias
1222 target=$target_alias
1223
1224 # FIXME: To remove some day.
1225 if test "x$host_alias" != x; then
1226 if test "x$build_alias" = x; then
1227 cross_compiling=maybe
1228 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1229 If a cross compiler is detected then cross compile mode will be used" >&2
1230 elif test "x$build_alias" != "x$host_alias"; then
1231 cross_compiling=yes
1232 fi
1233 fi
1234
1235 ac_tool_prefix=
1236 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1237
1238 test "$silent" = yes && exec 6>/dev/null
1239
1240
1241 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1242 ac_ls_di=`ls -di .` &&
1243 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1244 as_fn_error $? "working directory cannot be determined"
1245 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1246 as_fn_error $? "pwd does not report name of working directory"
1247
1248
1249 # Find the source files, if location was not specified.
1250 if test -z "$srcdir"; then
1251 ac_srcdir_defaulted=yes
1252 # Try the directory containing this script, then the parent directory.
1253 ac_confdir=`$as_dirname -- "$as_myself" ||
1254 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1255 X"$as_myself" : 'X\(//\)[^/]' \| \
1256 X"$as_myself" : 'X\(//\)$' \| \
1257 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1258 $as_echo X"$as_myself" |
1259 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\/\)[^/].*/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\/\)$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\).*/{
1272 s//\1/
1273 q
1274 }
1275 s/.*/./; q'`
1276 srcdir=$ac_confdir
1277 if test ! -r "$srcdir/$ac_unique_file"; then
1278 srcdir=..
1279 fi
1280 else
1281 ac_srcdir_defaulted=no
1282 fi
1283 if test ! -r "$srcdir/$ac_unique_file"; then
1284 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1285 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1286 fi
1287 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1288 ac_abs_confdir=`(
1289 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1290 pwd)`
1291 # When building in place, set srcdir=.
1292 if test "$ac_abs_confdir" = "$ac_pwd"; then
1293 srcdir=.
1294 fi
1295 # Remove unnecessary trailing slashes from srcdir.
1296 # Double slashes in file names in object file debugging info
1297 # mess up M-x gdb in Emacs.
1298 case $srcdir in
1299 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1300 esac
1301 for ac_var in $ac_precious_vars; do
1302 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1303 eval ac_env_${ac_var}_value=\$${ac_var}
1304 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1305 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1306 done
1307
1308 #
1309 # Report the --help message.
1310 #
1311 if test "$ac_init_help" = "long"; then
1312 # Omit some internal or obsolete options to make the list less imposing.
1313 # This message is too long to be a string in the A/UX 3.1 sh.
1314 cat <<_ACEOF
1315 \`configure' configures ocaml-dssi 0.1.0 to adapt to many kinds of systems.
1316
1317 Usage: $0 [OPTION]... [VAR=VALUE]...
1318
1319 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1320 VAR=VALUE. See below for descriptions of some of the useful variables.
1321
1322 Defaults for the options are specified in brackets.
1323
1324 Configuration:
1325 -h, --help display this help and exit
1326 --help=short display options specific to this package
1327 --help=recursive display the short help of all the included packages
1328 -V, --version display version information and exit
1329 -q, --quiet, --silent do not print \`checking ...' messages
1330 --cache-file=FILE cache test results in FILE [disabled]
1331 -C, --config-cache alias for \`--cache-file=config.cache'
1332 -n, --no-create do not create output files
1333 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1334
1335 Installation directories:
1336 --prefix=PREFIX install architecture-independent files in PREFIX
1337 [$ac_default_prefix]
1338 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1339 [PREFIX]
1340
1341 By default, \`make install' will install all the files in
1342 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1343 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1344 for instance \`--prefix=\$HOME'.
1345
1346 For better control, use the options below.
1347
1348 Fine tuning of the installation directories:
1349 --bindir=DIR user executables [EPREFIX/bin]
1350 --sbindir=DIR system admin executables [EPREFIX/sbin]
1351 --libexecdir=DIR program executables [EPREFIX/libexec]
1352 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1353 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1354 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1355 --libdir=DIR object code libraries [EPREFIX/lib]
1356 --includedir=DIR C header files [PREFIX/include]
1357 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1358 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1359 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1360 --infodir=DIR info documentation [DATAROOTDIR/info]
1361 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1362 --mandir=DIR man documentation [DATAROOTDIR/man]
1363 --docdir=DIR documentation root [DATAROOTDIR/doc/ocaml-dssi]
1364 --htmldir=DIR html documentation [DOCDIR]
1365 --dvidir=DIR dvi documentation [DOCDIR]
1366 --pdfdir=DIR pdf documentation [DOCDIR]
1367 --psdir=DIR ps documentation [DOCDIR]
1368 _ACEOF
1369
1370 cat <<\_ACEOF
1371 _ACEOF
1372 fi
1373
1374 if test -n "$ac_init_help"; then
1375 case $ac_init_help in
1376 short | recursive ) echo "Configuration of ocaml-dssi 0.1.0:";;
1377 esac
1378 cat <<\_ACEOF
1379
1380 Optional Features:
1381 --disable-option-checking ignore unrecognized --enable/--with options
1382 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1383 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1384 --disable-ldconf don't modify the dynamic loader configuration file
1385 (default is enable)
1386 --disable-camlp4 disable camlp4 auto-detection.
1387 --disable-debugging disable debugging information (backtrace printing in
1388 particular)
1389 --enable-profiling compile to generate profiling infomation
1390 --disable-nativecode compile in bytecode
1391 --disable-custom disable custom mode for bytecode compilation (use if
1392 you know what you are doing)
1393
1394 Optional Packages:
1395 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1396 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1397 --with-ladspa-dir=path use "path" as the location of ocaml-ladspa
1398 (autodetected by default)
1399
1400 Some influential environment variables:
1401 CC C compiler command
1402 CFLAGS C compiler flags
1403 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1404 nonstandard directory <lib dir>
1405 LIBS libraries to pass to the linker, e.g. -l<library>
1406 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1407 you have headers in a nonstandard directory <include dir>
1408 CPP C preprocessor
1409
1410 Use these variables to override the choices made by `configure' or to help
1411 it to find libraries and programs with nonstandard names/locations.
1412
1413 Report bugs to <savonet-users@lists.sourceforge.net>.
1414 _ACEOF
1415 ac_status=$?
1416 fi
1417
1418 if test "$ac_init_help" = "recursive"; then
1419 # If there are subdirs, report their specific --help.
1420 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1421 test -d "$ac_dir" ||
1422 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1423 continue
1424 ac_builddir=.
1425
1426 case "$ac_dir" in
1427 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1428 *)
1429 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1430 # A ".." for each directory in $ac_dir_suffix.
1431 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1432 case $ac_top_builddir_sub in
1433 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1434 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1435 esac ;;
1436 esac
1437 ac_abs_top_builddir=$ac_pwd
1438 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1439 # for backward compatibility:
1440 ac_top_builddir=$ac_top_build_prefix
1441
1442 case $srcdir in
1443 .) # We are building in place.
1444 ac_srcdir=.
1445 ac_top_srcdir=$ac_top_builddir_sub
1446 ac_abs_top_srcdir=$ac_pwd ;;
1447 [\\/]* | ?:[\\/]* ) # Absolute name.
1448 ac_srcdir=$srcdir$ac_dir_suffix;
1449 ac_top_srcdir=$srcdir
1450 ac_abs_top_srcdir=$srcdir ;;
1451 *) # Relative name.
1452 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1453 ac_top_srcdir=$ac_top_build_prefix$srcdir
1454 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1455 esac
1456 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1457
1458 cd "$ac_dir" || { ac_status=$?; continue; }
1459 # Check for guested configure.
1460 if test -f "$ac_srcdir/configure.gnu"; then
1461 echo &&
1462 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1463 elif test -f "$ac_srcdir/configure"; then
1464 echo &&
1465 $SHELL "$ac_srcdir/configure" --help=recursive
1466 else
1467 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1468 fi || ac_status=$?
1469 cd "$ac_pwd" || { ac_status=$?; break; }
1470 done
1471 fi
1472
1473 test -n "$ac_init_help" && exit $ac_status
1474 if $ac_init_version; then
1475 cat <<\_ACEOF
1476 ocaml-dssi configure 0.1.0
1477 generated by GNU Autoconf 2.68
1478
1479 Copyright (C) 2010 Free Software Foundation, Inc.
1480 This configure script is free software; the Free Software Foundation
1481 gives unlimited permission to copy, distribute and modify it.
1482 _ACEOF
1483 exit
1484 fi
1485
1486 ## ------------------------ ##
1487 ## Autoconf initialization. ##
1488 ## ------------------------ ##
1489
1490 # ac_fn_c_try_compile LINENO
1491 # --------------------------
1492 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1493 ac_fn_c_try_compile ()
1494 {
1495 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1496 rm -f conftest.$ac_objext
1497 if { { ac_try="$ac_compile"
1498 case "(($ac_try" in
1499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1500 *) ac_try_echo=$ac_try;;
1501 esac
1502 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1503 $as_echo "$ac_try_echo"; } >&5
1504 (eval "$ac_compile") 2>conftest.err
1505 ac_status=$?
1506 if test -s conftest.err; then
1507 grep -v '^ *+' conftest.err >conftest.er1
1508 cat conftest.er1 >&5
1509 mv -f conftest.er1 conftest.err
1510 fi
1511 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1512 test $ac_status = 0; } && {
1513 test -z "$ac_c_werror_flag" ||
1514 test ! -s conftest.err
1515 } && test -s conftest.$ac_objext; then :
1516 ac_retval=0
1517 else
1518 $as_echo "$as_me: failed program was:" >&5
1519 sed 's/^/| /' conftest.$ac_ext >&5
1520
1521 ac_retval=1
1522 fi
1523 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1524 as_fn_set_status $ac_retval
1525
1526 } # ac_fn_c_try_compile
1527
1528 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1529 # -------------------------------------------------------
1530 # Tests whether HEADER exists and can be compiled using the include files in
1531 # INCLUDES, setting the cache variable VAR accordingly.
1532 ac_fn_c_check_header_compile ()
1533 {
1534 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1536 $as_echo_n "checking for $2... " >&6; }
1537 if eval \${$3+:} false; then :
1538 $as_echo_n "(cached) " >&6
1539 else
1540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1541 /* end confdefs.h. */
1542 $4
1543 #include <$2>
1544 _ACEOF
1545 if ac_fn_c_try_compile "$LINENO"; then :
1546 eval "$3=yes"
1547 else
1548 eval "$3=no"
1549 fi
1550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1551 fi
1552 eval ac_res=\$$3
1553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1554 $as_echo "$ac_res" >&6; }
1555 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1556
1557 } # ac_fn_c_check_header_compile
1558
1559 # ac_fn_c_try_cpp LINENO
1560 # ----------------------
1561 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1562 ac_fn_c_try_cpp ()
1563 {
1564 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1565 if { { ac_try="$ac_cpp conftest.$ac_ext"
1566 case "(($ac_try" in
1567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1568 *) ac_try_echo=$ac_try;;
1569 esac
1570 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1571 $as_echo "$ac_try_echo"; } >&5
1572 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1573 ac_status=$?
1574 if test -s conftest.err; then
1575 grep -v '^ *+' conftest.err >conftest.er1
1576 cat conftest.er1 >&5
1577 mv -f conftest.er1 conftest.err
1578 fi
1579 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1580 test $ac_status = 0; } > conftest.i && {
1581 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1582 test ! -s conftest.err
1583 }; then :
1584 ac_retval=0
1585 else
1586 $as_echo "$as_me: failed program was:" >&5
1587 sed 's/^/| /' conftest.$ac_ext >&5
1588
1589 ac_retval=1
1590 fi
1591 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1592 as_fn_set_status $ac_retval
1593
1594 } # ac_fn_c_try_cpp
1595
1596 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1597 # -------------------------------------------------------
1598 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1599 # the include files in INCLUDES and setting the cache variable VAR
1600 # accordingly.
1601 ac_fn_c_check_header_mongrel ()
1602 {
1603 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1604 if eval \${$3+:} false; then :
1605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1606 $as_echo_n "checking for $2... " >&6; }
1607 if eval \${$3+:} false; then :
1608 $as_echo_n "(cached) " >&6
1609 fi
1610 eval ac_res=\$$3
1611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1612 $as_echo "$ac_res" >&6; }
1613 else
1614 # Is the header compilable?
1615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1616 $as_echo_n "checking $2 usability... " >&6; }
1617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1618 /* end confdefs.h. */
1619 $4
1620 #include <$2>
1621 _ACEOF
1622 if ac_fn_c_try_compile "$LINENO"; then :
1623 ac_header_compiler=yes
1624 else
1625 ac_header_compiler=no
1626 fi
1627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1629 $as_echo "$ac_header_compiler" >&6; }
1630
1631 # Is the header present?
1632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1633 $as_echo_n "checking $2 presence... " >&6; }
1634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1635 /* end confdefs.h. */
1636 #include <$2>
1637 _ACEOF
1638 if ac_fn_c_try_cpp "$LINENO"; then :
1639 ac_header_preproc=yes
1640 else
1641 ac_header_preproc=no
1642 fi
1643 rm -f conftest.err conftest.i conftest.$ac_ext
1644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1645 $as_echo "$ac_header_preproc" >&6; }
1646
1647 # So? What about this header?
1648 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1649 yes:no: )
1650 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1651 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1653 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1654 ;;
1655 no:yes:* )
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1657 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1659 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1661 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1663 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1665 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1666 ( $as_echo "## -------------------------------------------------- ##
1667 ## Report this to savonet-users@lists.sourceforge.net ##
1668 ## -------------------------------------------------- ##"
1669 ) | sed "s/^/$as_me: WARNING: /" >&2
1670 ;;
1671 esac
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1673 $as_echo_n "checking for $2... " >&6; }
1674 if eval \${$3+:} false; then :
1675 $as_echo_n "(cached) " >&6
1676 else
1677 eval "$3=\$ac_header_compiler"
1678 fi
1679 eval ac_res=\$$3
1680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1681 $as_echo "$ac_res" >&6; }
1682 fi
1683 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1684
1685 } # ac_fn_c_check_header_mongrel
1686
1687 # ac_fn_c_try_run LINENO
1688 # ----------------------
1689 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1690 # that executables *can* be run.
1691 ac_fn_c_try_run ()
1692 {
1693 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1694 if { { ac_try="$ac_link"
1695 case "(($ac_try" in
1696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697 *) ac_try_echo=$ac_try;;
1698 esac
1699 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700 $as_echo "$ac_try_echo"; } >&5
1701 (eval "$ac_link") 2>&5
1702 ac_status=$?
1703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1704 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1705 { { case "(($ac_try" in
1706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1707 *) ac_try_echo=$ac_try;;
1708 esac
1709 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1710 $as_echo "$ac_try_echo"; } >&5
1711 (eval "$ac_try") 2>&5
1712 ac_status=$?
1713 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1714 test $ac_status = 0; }; }; then :
1715 ac_retval=0
1716 else
1717 $as_echo "$as_me: program exited with status $ac_status" >&5
1718 $as_echo "$as_me: failed program was:" >&5
1719 sed 's/^/| /' conftest.$ac_ext >&5
1720
1721 ac_retval=$ac_status
1722 fi
1723 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1724 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1725 as_fn_set_status $ac_retval
1726
1727 } # ac_fn_c_try_run
1728 cat >config.log <<_ACEOF
1729 This file contains any messages produced by compilers while
1730 running configure, to aid debugging if configure makes a mistake.
1731
1732 It was created by ocaml-dssi $as_me 0.1.0, which was
1733 generated by GNU Autoconf 2.68. Invocation command line was
1734
1735 $ $0 $@
1736
1737 _ACEOF
1738 exec 5>>config.log
1739 {
1740 cat <<_ASUNAME
1741 ## --------- ##
1742 ## Platform. ##
1743 ## --------- ##
1744
1745 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1746 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1747 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1748 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1749 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1750
1751 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1752 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1753
1754 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1755 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1756 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1757 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1758 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1759 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1760 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1761
1762 _ASUNAME
1763
1764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1765 for as_dir in $PATH
1766 do
1767 IFS=$as_save_IFS
1768 test -z "$as_dir" && as_dir=.
1769 $as_echo "PATH: $as_dir"
1770 done
1771 IFS=$as_save_IFS
1772
1773 } >&5
1774
1775 cat >&5 <<_ACEOF
1776
1777
1778 ## ----------- ##
1779 ## Core tests. ##
1780 ## ----------- ##
1781
1782 _ACEOF
1783
1784
1785 # Keep a trace of the command line.
1786 # Strip out --no-create and --no-recursion so they do not pile up.
1787 # Strip out --silent because we don't want to record it for future runs.
1788 # Also quote any args containing shell meta-characters.
1789 # Make two passes to allow for proper duplicate-argument suppression.
1790 ac_configure_args=
1791 ac_configure_args0=
1792 ac_configure_args1=
1793 ac_must_keep_next=false
1794 for ac_pass in 1 2
1795 do
1796 for ac_arg
1797 do
1798 case $ac_arg in
1799 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1800 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1801 | -silent | --silent | --silen | --sile | --sil)
1802 continue ;;
1803 *\'*)
1804 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1805 esac
1806 case $ac_pass in
1807 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1808 2)
1809 as_fn_append ac_configure_args1 " '$ac_arg'"
1810 if test $ac_must_keep_next = true; then
1811 ac_must_keep_next=false # Got value, back to normal.
1812 else
1813 case $ac_arg in
1814 *=* | --config-cache | -C | -disable-* | --disable-* \
1815 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1816 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1817 | -with-* | --with-* | -without-* | --without-* | --x)
1818 case "$ac_configure_args0 " in
1819 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1820 esac
1821 ;;
1822 -* ) ac_must_keep_next=true ;;
1823 esac
1824 fi
1825 as_fn_append ac_configure_args " '$ac_arg'"
1826 ;;
1827 esac
1828 done
1829 done
1830 { ac_configure_args0=; unset ac_configure_args0;}
1831 { ac_configure_args1=; unset ac_configure_args1;}
1832
1833 # When interrupted or exit'd, cleanup temporary files, and complete
1834 # config.log. We remove comments because anyway the quotes in there
1835 # would cause problems or look ugly.
1836 # WARNING: Use '\'' to represent an apostrophe within the trap.
1837 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1838 trap 'exit_status=$?
1839 # Save into config.log some information that might help in debugging.
1840 {
1841 echo
1842
1843 $as_echo "## ---------------- ##
1844 ## Cache variables. ##
1845 ## ---------------- ##"
1846 echo
1847 # The following way of writing the cache mishandles newlines in values,
1848 (
1849 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1850 eval ac_val=\$$ac_var
1851 case $ac_val in #(
1852 *${as_nl}*)
1853 case $ac_var in #(
1854 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1855 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1856 esac
1857 case $ac_var in #(
1858 _ | IFS | as_nl) ;; #(
1859 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1860 *) { eval $ac_var=; unset $ac_var;} ;;
1861 esac ;;
1862 esac
1863 done
1864 (set) 2>&1 |
1865 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1866 *${as_nl}ac_space=\ *)
1867 sed -n \
1868 "s/'\''/'\''\\\\'\'''\''/g;
1869 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1870 ;; #(
1871 *)
1872 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1873 ;;
1874 esac |
1875 sort
1876 )
1877 echo
1878
1879 $as_echo "## ----------------- ##
1880 ## Output variables. ##
1881 ## ----------------- ##"
1882 echo
1883 for ac_var in $ac_subst_vars
1884 do
1885 eval ac_val=\$$ac_var
1886 case $ac_val in
1887 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1888 esac
1889 $as_echo "$ac_var='\''$ac_val'\''"
1890 done | sort
1891 echo
1892
1893 if test -n "$ac_subst_files"; then
1894 $as_echo "## ------------------- ##
1895 ## File substitutions. ##
1896 ## ------------------- ##"
1897 echo
1898 for ac_var in $ac_subst_files
1899 do
1900 eval ac_val=\$$ac_var
1901 case $ac_val in
1902 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1903 esac
1904 $as_echo "$ac_var='\''$ac_val'\''"
1905 done | sort
1906 echo
1907 fi
1908
1909 if test -s confdefs.h; then
1910 $as_echo "## ----------- ##
1911 ## confdefs.h. ##
1912 ## ----------- ##"
1913 echo
1914 cat confdefs.h
1915 echo
1916 fi
1917 test "$ac_signal" != 0 &&
1918 $as_echo "$as_me: caught signal $ac_signal"
1919 $as_echo "$as_me: exit $exit_status"
1920 } >&5
1921 rm -f core *.core core.conftest.* &&
1922 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1923 exit $exit_status
1924 ' 0
1925 for ac_signal in 1 2 13 15; do
1926 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
1927 done
1928 ac_signal=0
1929
1930 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1931 rm -f -r conftest* confdefs.h
1932
1933 $as_echo "/* confdefs.h */" > confdefs.h
1934
1935 # Predefined preprocessor variables.
1936
1937 cat >>confdefs.h <<_ACEOF
1938 #define PACKAGE_NAME "$PACKAGE_NAME"
1939 _ACEOF
1940
1941 cat >>confdefs.h <<_ACEOF
1942 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1943 _ACEOF
1944
1945 cat >>confdefs.h <<_ACEOF
1946 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1947 _ACEOF
1948
1949 cat >>confdefs.h <<_ACEOF
1950 #define PACKAGE_STRING "$PACKAGE_STRING"
1951 _ACEOF
1952
1953 cat >>confdefs.h <<_ACEOF
1954 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1955 _ACEOF
1956
1957 cat >>confdefs.h <<_ACEOF
1958 #define PACKAGE_URL "$PACKAGE_URL"
1959 _ACEOF
1960
1961
1962 # Let the site file select an alternate cache file if it wants to.
1963 # Prefer an explicitly selected file to automatically selected ones.
1964 ac_site_file1=NONE
1965 ac_site_file2=NONE
1966 if test -n "$CONFIG_SITE"; then
1967 # We do not want a PATH search for config.site.
1968 case $CONFIG_SITE in #((
1969 -*) ac_site_file1=./$CONFIG_SITE;;
1970 */*) ac_site_file1=$CONFIG_SITE;;
1971 *) ac_site_file1=./$CONFIG_SITE;;
1972 esac
1973 elif test "x$prefix" != xNONE; then
1974 ac_site_file1=$prefix/share/config.site
1975 ac_site_file2=$prefix/etc/config.site
1976 else
1977 ac_site_file1=$ac_default_prefix/share/config.site
1978 ac_site_file2=$ac_default_prefix/etc/config.site
1979 fi
1980 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1981 do
1982 test "x$ac_site_file" = xNONE && continue
1983 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
1985 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1986 sed 's/^/| /' "$ac_site_file" >&5
1987 . "$ac_site_file" \
1988 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1989 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1990 as_fn_error $? "failed to load site script $ac_site_file
1991 See \`config.log' for more details" "$LINENO" 5; }
1992 fi
1993 done
1994
1995 if test -r "$cache_file"; then
1996 # Some versions of bash will fail to source /dev/null (special files
1997 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
1998 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
1999 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2000 $as_echo "$as_me: loading cache $cache_file" >&6;}
2001 case $cache_file in
2002 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2003 *) . "./$cache_file";;
2004 esac
2005 fi
2006 else
2007 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2008 $as_echo "$as_me: creating cache $cache_file" >&6;}
2009 >$cache_file
2010 fi
2011
2012 # Check that the precious variables saved in the cache have kept the same
2013 # value.
2014 ac_cache_corrupted=false
2015 for ac_var in $ac_precious_vars; do
2016 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2017 eval ac_new_set=\$ac_env_${ac_var}_set
2018 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2019 eval ac_new_val=\$ac_env_${ac_var}_value
2020 case $ac_old_set,$ac_new_set in
2021 set,)
2022 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2023 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2024 ac_cache_corrupted=: ;;
2025 ,set)
2026 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2027 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2028 ac_cache_corrupted=: ;;
2029 ,);;
2030 *)
2031 if test "x$ac_old_val" != "x$ac_new_val"; then
2032 # differences in whitespace do not lead to failure.
2033 ac_old_val_w=`echo x $ac_old_val`
2034 ac_new_val_w=`echo x $ac_new_val`
2035 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2037 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2038 ac_cache_corrupted=:
2039 else
2040 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2041 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2042 eval $ac_var=\$ac_old_val
2043 fi
2044 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2045 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2046 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2047 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2048 fi;;
2049 esac
2050 # Pass precious variables to config.status.
2051 if test "$ac_new_set" = set; then
2052 case $ac_new_val in
2053 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2054 *) ac_arg=$ac_var=$ac_new_val ;;
2055 esac
2056 case " $ac_configure_args " in
2057 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2058 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2059 esac
2060 fi
2061 done
2062 if $ac_cache_corrupted; then
2063 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2064 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2065 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2066 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2067 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2068 fi
2069 ## -------------------- ##
2070 ## Main body of script. ##
2071 ## -------------------- ##
2072
2073 ac_ext=c
2074 ac_cpp='$CPP $CPPFLAGS'
2075 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2076 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2077 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2078
2079
2080
2081 VERSION=$PACKAGE_VERSION
2082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: configuring $PACKAGE_STRING" >&5
2083 $as_echo "configuring $PACKAGE_STRING" >&6; }
2084
2085 # Add prefix to compilation variables
2086 # if passed
2087 if test "x$prefix" != "xNONE"; then
2088 CFLAGS="$CFLAGS -I$prefix/include"
2089 LDFLAGS="$LDFLAGS -L$prefix/lib"
2090 CPPFLAGS="$CPPFLAGS -I$prefix/include"
2091 fi
2092
2093 ac_ext=c
2094 ac_cpp='$CPP $CPPFLAGS'
2095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2098 if test -n "$ac_tool_prefix"; then
2099 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2100 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2102 $as_echo_n "checking for $ac_word... " >&6; }
2103 if ${ac_cv_prog_CC+:} false; then :
2104 $as_echo_n "(cached) " >&6
2105 else
2106 if test -n "$CC"; then
2107 ac_cv_prog_CC="$CC" # Let the user override the test.
2108 else
2109 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2110 for as_dir in $PATH
2111 do
2112 IFS=$as_save_IFS
2113 test -z "$as_dir" && as_dir=.
2114 for ac_exec_ext in '' $ac_executable_extensions; do
2115 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2116 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2117 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2118 break 2
2119 fi
2120 done
2121 done
2122 IFS=$as_save_IFS
2123
2124 fi
2125 fi
2126 CC=$ac_cv_prog_CC
2127 if test -n "$CC"; then
2128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2129 $as_echo "$CC" >&6; }
2130 else
2131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2132 $as_echo "no" >&6; }
2133 fi
2134
2135
2136 fi
2137 if test -z "$ac_cv_prog_CC"; then
2138 ac_ct_CC=$CC
2139 # Extract the first word of "gcc", so it can be a program name with args.
2140 set dummy gcc; ac_word=$2
2141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2142 $as_echo_n "checking for $ac_word... " >&6; }
2143 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2144 $as_echo_n "(cached) " >&6
2145 else
2146 if test -n "$ac_ct_CC"; then
2147 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2148 else
2149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2150 for as_dir in $PATH
2151 do
2152 IFS=$as_save_IFS
2153 test -z "$as_dir" && as_dir=.
2154 for ac_exec_ext in '' $ac_executable_extensions; do
2155 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2156 ac_cv_prog_ac_ct_CC="gcc"
2157 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2158 break 2
2159 fi
2160 done
2161 done
2162 IFS=$as_save_IFS
2163
2164 fi
2165 fi
2166 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2167 if test -n "$ac_ct_CC"; then
2168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2169 $as_echo "$ac_ct_CC" >&6; }
2170 else
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2172 $as_echo "no" >&6; }
2173 fi
2174
2175 if test "x$ac_ct_CC" = x; then
2176 CC=""
2177 else
2178 case $cross_compiling:$ac_tool_warned in
2179 yes:)
2180 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2181 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2182 ac_tool_warned=yes ;;
2183 esac
2184 CC=$ac_ct_CC
2185 fi
2186 else
2187 CC="$ac_cv_prog_CC"
2188 fi
2189
2190 if test -z "$CC"; then
2191 if test -n "$ac_tool_prefix"; then
2192 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2193 set dummy ${ac_tool_prefix}cc; ac_word=$2
2194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2195 $as_echo_n "checking for $ac_word... " >&6; }
2196 if ${ac_cv_prog_CC+:} false; then :
2197 $as_echo_n "(cached) " >&6
2198 else
2199 if test -n "$CC"; then
2200 ac_cv_prog_CC="$CC" # Let the user override the test.
2201 else
2202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2203 for as_dir in $PATH
2204 do
2205 IFS=$as_save_IFS
2206 test -z "$as_dir" && as_dir=.
2207 for ac_exec_ext in '' $ac_executable_extensions; do
2208 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2209 ac_cv_prog_CC="${ac_tool_prefix}cc"
2210 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2211 break 2
2212 fi
2213 done
2214 done
2215 IFS=$as_save_IFS
2216
2217 fi
2218 fi
2219 CC=$ac_cv_prog_CC
2220 if test -n "$CC"; then
2221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2222 $as_echo "$CC" >&6; }
2223 else
2224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2225 $as_echo "no" >&6; }
2226 fi
2227
2228
2229 fi
2230 fi
2231 if test -z "$CC"; then
2232 # Extract the first word of "cc", so it can be a program name with args.
2233 set dummy cc; ac_word=$2
2234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2235 $as_echo_n "checking for $ac_word... " >&6; }
2236 if ${ac_cv_prog_CC+:} false; then :
2237 $as_echo_n "(cached) " >&6
2238 else
2239 if test -n "$CC"; then
2240 ac_cv_prog_CC="$CC" # Let the user override the test.
2241 else
2242 ac_prog_rejected=no
2243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2244 for as_dir in $PATH
2245 do
2246 IFS=$as_save_IFS
2247 test -z "$as_dir" && as_dir=.
2248 for ac_exec_ext in '' $ac_executable_extensions; do
2249 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2250 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2251 ac_prog_rejected=yes
2252 continue
2253 fi
2254 ac_cv_prog_CC="cc"
2255 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2256 break 2
2257 fi
2258 done
2259 done
2260 IFS=$as_save_IFS
2261
2262 if test $ac_prog_rejected = yes; then
2263 # We found a bogon in the path, so make sure we never use it.
2264 set dummy $ac_cv_prog_CC
2265 shift
2266 if test $# != 0; then
2267 # We chose a different compiler from the bogus one.
2268 # However, it has the same basename, so the bogon will be chosen
2269 # first if we set CC to just the basename; use the full file name.
2270 shift
2271 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2272 fi
2273 fi
2274 fi
2275 fi
2276 CC=$ac_cv_prog_CC
2277 if test -n "$CC"; then
2278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2279 $as_echo "$CC" >&6; }
2280 else
2281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2282 $as_echo "no" >&6; }
2283 fi
2284
2285
2286 fi
2287 if test -z "$CC"; then
2288 if test -n "$ac_tool_prefix"; then
2289 for ac_prog in cl.exe
2290 do
2291 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2292 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2294 $as_echo_n "checking for $ac_word... " >&6; }
2295 if ${ac_cv_prog_CC+:} false; then :
2296 $as_echo_n "(cached) " >&6
2297 else
2298 if test -n "$CC"; then
2299 ac_cv_prog_CC="$CC" # Let the user override the test.
2300 else
2301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2302 for as_dir in $PATH
2303 do
2304 IFS=$as_save_IFS
2305 test -z "$as_dir" && as_dir=.
2306 for ac_exec_ext in '' $ac_executable_extensions; do
2307 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2308 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2309 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2310 break 2
2311 fi
2312 done
2313 done
2314 IFS=$as_save_IFS
2315
2316 fi
2317 fi
2318 CC=$ac_cv_prog_CC
2319 if test -n "$CC"; then
2320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2321 $as_echo "$CC" >&6; }
2322 else
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2324 $as_echo "no" >&6; }
2325 fi
2326
2327
2328 test -n "$CC" && break
2329 done
2330 fi
2331 if test -z "$CC"; then
2332 ac_ct_CC=$CC
2333 for ac_prog in cl.exe
2334 do
2335 # Extract the first word of "$ac_prog", so it can be a program name with args.
2336 set dummy $ac_prog; ac_word=$2
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2338 $as_echo_n "checking for $ac_word... " >&6; }
2339 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2340 $as_echo_n "(cached) " >&6
2341 else
2342 if test -n "$ac_ct_CC"; then
2343 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2344 else
2345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2346 for as_dir in $PATH
2347 do
2348 IFS=$as_save_IFS
2349 test -z "$as_dir" && as_dir=.
2350 for ac_exec_ext in '' $ac_executable_extensions; do
2351 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2352 ac_cv_prog_ac_ct_CC="$ac_prog"
2353 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2354 break 2
2355 fi
2356 done
2357 done
2358 IFS=$as_save_IFS
2359
2360 fi
2361 fi
2362 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2363 if test -n "$ac_ct_CC"; then
2364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2365 $as_echo "$ac_ct_CC" >&6; }
2366 else
2367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2368 $as_echo "no" >&6; }
2369 fi
2370
2371
2372 test -n "$ac_ct_CC" && break
2373 done
2374
2375 if test "x$ac_ct_CC" = x; then
2376 CC=""
2377 else
2378 case $cross_compiling:$ac_tool_warned in
2379 yes:)
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2381 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2382 ac_tool_warned=yes ;;
2383 esac
2384 CC=$ac_ct_CC
2385 fi
2386 fi
2387
2388 fi
2389
2390
2391 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2392 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2393 as_fn_error $? "no acceptable C compiler found in \$PATH
2394 See \`config.log' for more details" "$LINENO" 5; }
2395
2396 # Provide some information about the compiler.
2397 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2398 set X $ac_compile
2399 ac_compiler=$2
2400 for ac_option in --version -v -V -qversion; do
2401 { { ac_try="$ac_compiler $ac_option >&5"
2402 case "(($ac_try" in
2403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2404 *) ac_try_echo=$ac_try;;
2405 esac
2406 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2407 $as_echo "$ac_try_echo"; } >&5
2408 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2409 ac_status=$?
2410 if test -s conftest.err; then
2411 sed '10a\
2412 ... rest of stderr output deleted ...
2413 10q' conftest.err >conftest.er1
2414 cat conftest.er1 >&5
2415 fi
2416 rm -f conftest.er1 conftest.err
2417 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2418 test $ac_status = 0; }
2419 done
2420
2421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2422 /* end confdefs.h. */
2423
2424 int
2425 main ()
2426 {
2427
2428 ;
2429 return 0;
2430 }
2431 _ACEOF
2432 ac_clean_files_save=$ac_clean_files
2433 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2434 # Try to create an executable without -o first, disregard a.out.
2435 # It will help us diagnose broken compilers, and finding out an intuition
2436 # of exeext.
2437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2438 $as_echo_n "checking whether the C compiler works... " >&6; }
2439 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2440
2441 # The possible output files:
2442 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2443
2444 ac_rmfiles=
2445 for ac_file in $ac_files
2446 do
2447 case $ac_file in
2448 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2449 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2450 esac
2451 done
2452 rm -f $ac_rmfiles
2453
2454 if { { ac_try="$ac_link_default"
2455 case "(($ac_try" in
2456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2457 *) ac_try_echo=$ac_try;;
2458 esac
2459 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2460 $as_echo "$ac_try_echo"; } >&5
2461 (eval "$ac_link_default") 2>&5
2462 ac_status=$?
2463 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2464 test $ac_status = 0; }; then :
2465 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2466 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2467 # in a Makefile. We should not override ac_cv_exeext if it was cached,
2468 # so that the user can short-circuit this test for compilers unknown to
2469 # Autoconf.
2470 for ac_file in $ac_files ''
2471 do
2472 test -f "$ac_file" || continue
2473 case $ac_file in
2474 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2475 ;;
2476 [ab].out )
2477 # We found the default executable, but exeext='' is most
2478 # certainly right.
2479 break;;
2480 *.* )
2481 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2482 then :; else
2483 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2484 fi
2485 # We set ac_cv_exeext here because the later test for it is not
2486 # safe: cross compilers may not add the suffix if given an `-o'
2487 # argument, so we may need to know it at that point already.
2488 # Even if this section looks crufty: it has the advantage of
2489 # actually working.
2490 break;;
2491 * )
2492 break;;
2493 esac
2494 done
2495 test "$ac_cv_exeext" = no && ac_cv_exeext=
2496
2497 else
2498 ac_file=''
2499 fi
2500 if test -z "$ac_file"; then :
2501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2502 $as_echo "no" >&6; }
2503 $as_echo "$as_me: failed program was:" >&5
2504 sed 's/^/| /' conftest.$ac_ext >&5
2505
2506 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2507 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2508 as_fn_error 77 "C compiler cannot create executables
2509 See \`config.log' for more details" "$LINENO" 5; }
2510 else
2511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2512 $as_echo "yes" >&6; }
2513 fi
2514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2515 $as_echo_n "checking for C compiler default output file name... " >&6; }
2516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2517 $as_echo "$ac_file" >&6; }
2518 ac_exeext=$ac_cv_exeext
2519
2520 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2521 ac_clean_files=$ac_clean_files_save
2522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2523 $as_echo_n "checking for suffix of executables... " >&6; }
2524 if { { ac_try="$ac_link"
2525 case "(($ac_try" in
2526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2527 *) ac_try_echo=$ac_try;;
2528 esac
2529 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2530 $as_echo "$ac_try_echo"; } >&5
2531 (eval "$ac_link") 2>&5
2532 ac_status=$?
2533 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2534 test $ac_status = 0; }; then :
2535 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2536 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2537 # work properly (i.e., refer to `conftest.exe'), while it won't with
2538 # `rm'.
2539 for ac_file in conftest.exe conftest conftest.*; do
2540 test -f "$ac_file" || continue
2541 case $ac_file in
2542 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2543 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2544 break;;
2545 * ) break;;
2546 esac
2547 done
2548 else
2549 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2550 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2551 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2552 See \`config.log' for more details" "$LINENO" 5; }
2553 fi
2554 rm -f conftest conftest$ac_cv_exeext
2555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2556 $as_echo "$ac_cv_exeext" >&6; }
2557
2558 rm -f conftest.$ac_ext
2559 EXEEXT=$ac_cv_exeext
2560 ac_exeext=$EXEEXT
2561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562 /* end confdefs.h. */
2563 #include <stdio.h>
2564 int
2565 main ()
2566 {
2567 FILE *f = fopen ("conftest.out", "w");
2568 return ferror (f) || fclose (f) != 0;
2569
2570 ;
2571 return 0;
2572 }
2573 _ACEOF
2574 ac_clean_files="$ac_clean_files conftest.out"
2575 # Check that the compiler produces executables we can run. If not, either
2576 # the compiler is broken, or we cross compile.
2577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
2578 $as_echo_n "checking whether we are cross compiling... " >&6; }
2579 if test "$cross_compiling" != yes; then
2580 { { ac_try="$ac_link"
2581 case "(($ac_try" in
2582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2583 *) ac_try_echo=$ac_try;;
2584 esac
2585 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2586 $as_echo "$ac_try_echo"; } >&5
2587 (eval "$ac_link") 2>&5
2588 ac_status=$?
2589 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2590 test $ac_status = 0; }
2591 if { ac_try='./conftest$ac_cv_exeext'
2592 { { case "(($ac_try" in
2593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2594 *) ac_try_echo=$ac_try;;
2595 esac
2596 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2597 $as_echo "$ac_try_echo"; } >&5
2598 (eval "$ac_try") 2>&5
2599 ac_status=$?
2600 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2601 test $ac_status = 0; }; }; then
2602 cross_compiling=no
2603 else
2604 if test "$cross_compiling" = maybe; then
2605 cross_compiling=yes
2606 else
2607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2608 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2609 as_fn_error $? "cannot run C compiled programs.
2610 If you meant to cross compile, use \`--host'.
2611 See \`config.log' for more details" "$LINENO" 5; }
2612 fi
2613 fi
2614 fi
2615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
2616 $as_echo "$cross_compiling" >&6; }
2617
2618 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
2619 ac_clean_files=$ac_clean_files_save
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
2621 $as_echo_n "checking for suffix of object files... " >&6; }
2622 if ${ac_cv_objext+:} false; then :
2623 $as_echo_n "(cached) " >&6
2624 else
2625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2626 /* end confdefs.h. */
2627
2628 int
2629 main ()
2630 {
2631
2632 ;
2633 return 0;
2634 }
2635 _ACEOF
2636 rm -f conftest.o conftest.obj
2637 if { { ac_try="$ac_compile"
2638 case "(($ac_try" in
2639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2640 *) ac_try_echo=$ac_try;;
2641 esac
2642 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2643 $as_echo "$ac_try_echo"; } >&5
2644 (eval "$ac_compile") 2>&5
2645 ac_status=$?
2646 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2647 test $ac_status = 0; }; then :
2648 for ac_file in conftest.o conftest.obj conftest.*; do
2649 test -f "$ac_file" || continue;
2650 case $ac_file in
2651 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
2652 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2653 break;;
2654 esac
2655 done
2656 else
2657 $as_echo "$as_me: failed program was:" >&5
2658 sed 's/^/| /' conftest.$ac_ext >&5
2659
2660 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2661 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2662 as_fn_error $? "cannot compute suffix of object files: cannot compile
2663 See \`config.log' for more details" "$LINENO" 5; }
2664 fi
2665 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2666 fi
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
2668 $as_echo "$ac_cv_objext" >&6; }
2669 OBJEXT=$ac_cv_objext
2670 ac_objext=$OBJEXT
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
2672 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
2673 if ${ac_cv_c_compiler_gnu+:} false; then :
2674 $as_echo_n "(cached) " >&6
2675 else
2676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2677 /* end confdefs.h. */
2678
2679 int
2680 main ()
2681 {
2682 #ifndef __GNUC__
2683 choke me
2684 #endif
2685
2686 ;
2687 return 0;
2688 }
2689 _ACEOF
2690 if ac_fn_c_try_compile "$LINENO"; then :
2691 ac_compiler_gnu=yes
2692 else
2693 ac_compiler_gnu=no
2694 fi
2695 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2696 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2697
2698 fi
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
2700 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
2701 if test $ac_compiler_gnu = yes; then
2702 GCC=yes
2703 else
2704 GCC=
2705 fi
2706 ac_test_CFLAGS=${CFLAGS+set}
2707 ac_save_CFLAGS=$CFLAGS
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
2709 $as_echo_n "checking whether $CC accepts -g... " >&6; }
2710 if ${ac_cv_prog_cc_g+:} false; then :
2711 $as_echo_n "(cached) " >&6
2712 else
2713 ac_save_c_werror_flag=$ac_c_werror_flag
2714 ac_c_werror_flag=yes
2715 ac_cv_prog_cc_g=no
2716 CFLAGS="-g"
2717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2718 /* end confdefs.h. */
2719
2720 int
2721 main ()
2722 {
2723
2724 ;
2725 return 0;
2726 }
2727 _ACEOF
2728 if ac_fn_c_try_compile "$LINENO"; then :
2729 ac_cv_prog_cc_g=yes
2730 else
2731 CFLAGS=""
2732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2733 /* end confdefs.h. */
2734
2735 int
2736 main ()
2737 {
2738
2739 ;
2740 return 0;
2741 }
2742 _ACEOF
2743 if ac_fn_c_try_compile "$LINENO"; then :
2744
2745 else
2746 ac_c_werror_flag=$ac_save_c_werror_flag
2747 CFLAGS="-g"
2748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2749 /* end confdefs.h. */
2750
2751 int
2752 main ()
2753 {
2754
2755 ;
2756 return 0;
2757 }
2758 _ACEOF
2759 if ac_fn_c_try_compile "$LINENO"; then :
2760 ac_cv_prog_cc_g=yes
2761 fi
2762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2763 fi
2764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2765 fi
2766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2767 ac_c_werror_flag=$ac_save_c_werror_flag
2768 fi
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
2770 $as_echo "$ac_cv_prog_cc_g" >&6; }
2771 if test "$ac_test_CFLAGS" = set; then
2772 CFLAGS=$ac_save_CFLAGS
2773 elif test $ac_cv_prog_cc_g = yes; then
2774 if test "$GCC" = yes; then
2775 CFLAGS="-g -O2"
2776 else
2777 CFLAGS="-g"
2778 fi
2779 else
2780 if test "$GCC" = yes; then
2781 CFLAGS="-O2"
2782 else
2783 CFLAGS=
2784 fi
2785 fi
2786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
2787 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
2788 if ${ac_cv_prog_cc_c89+:} false; then :
2789 $as_echo_n "(cached) " >&6
2790 else
2791 ac_cv_prog_cc_c89=no
2792 ac_save_CC=$CC
2793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2794 /* end confdefs.h. */
2795 #include <stdarg.h>
2796 #include <stdio.h>
2797 #include <sys/types.h>
2798 #include <sys/stat.h>
2799 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2800 struct buf { int x; };
2801 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2802 static char *e (p, i)
2803 char **p;
2804 int i;
2805 {
2806 return p[i];
2807 }
2808 static char *f (char * (*g) (char **, int), char **p, ...)
2809 {
2810 char *s;
2811 va_list v;
2812 va_start (v,p);
2813 s = g (p, va_arg (v,int));
2814 va_end (v);
2815 return s;
2816 }
2817
2818 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2819 function prototypes and stuff, but not '\xHH' hex character constants.
2820 These don't provoke an error unfortunately, instead are silently treated
2821 as 'x'. The following induces an error, until -std is added to get
2822 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2823 array size at least. It's necessary to write '\x00'==0 to get something
2824 that's true only with -std. */
2825 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2826
2827 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2828 inside strings and character constants. */
2829 #define FOO(x) 'x'
2830 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
2831
2832 int test (int i, double x);
2833 struct s1 {int (*f) (int a);};
2834 struct s2 {int (*f) (double a);};
2835 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2836 int argc;
2837 char **argv;
2838 int
2839 main ()
2840 {
2841 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2842 ;
2843 return 0;
2844 }
2845 _ACEOF
2846 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
2847 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2848 do
2849 CC="$ac_save_CC $ac_arg"
2850 if ac_fn_c_try_compile "$LINENO"; then :
2851 ac_cv_prog_cc_c89=$ac_arg
2852 fi
2853 rm -f core conftest.err conftest.$ac_objext
2854 test "x$ac_cv_prog_cc_c89" != "xno" && break
2855 done
2856 rm -f conftest.$ac_ext
2857 CC=$ac_save_CC
2858
2859 fi
2860 # AC_CACHE_VAL
2861 case "x$ac_cv_prog_cc_c89" in
2862 x)
2863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
2864 $as_echo "none needed" >&6; } ;;
2865 xno)
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
2867 $as_echo "unsupported" >&6; } ;;
2868 *)
2869 CC="$CC $ac_cv_prog_cc_c89"
2870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
2871 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
2872 esac
2873 if test "x$ac_cv_prog_cc_c89" != xno; then :
2874
2875 fi
2876
2877 ac_ext=c
2878 ac_cpp='$CPP $CPPFLAGS'
2879 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2880 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2882
2883
2884
2885 OCAMLFIND_LDCONF=""
2886 # Check whether --enable-ldconf was given.
2887 if test "${enable_ldconf+set}" = set; then :
2888 enableval=$enable_ldconf; ac_enable_ldconf=$enableval
2889 else
2890 ac_enable_ldconf=$enableval
2891 fi
2892
2893 if test "$ac_enable_ldconf" = no ; then
2894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabling modification of ld.conf" >&5
2895 $as_echo "disabling modification of ld.conf" >&6; }
2896 OCAMLFIND_LDCONF=dummy
2897 fi
2898
2899
2900 # Check for Ocaml compilers
2901
2902 # checking for ocamlc
2903 if test -n "$ac_tool_prefix"; then
2904 # Extract the first word of "${ac_tool_prefix}ocamlc", so it can be a program name with args.
2905 set dummy ${ac_tool_prefix}ocamlc; ac_word=$2
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2907 $as_echo_n "checking for $ac_word... " >&6; }
2908 if ${ac_cv_prog_OCAMLC+:} false; then :
2909 $as_echo_n "(cached) " >&6
2910 else
2911 if test -n "$OCAMLC"; then
2912 ac_cv_prog_OCAMLC="$OCAMLC" # Let the user override the test.
2913 else
2914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2915 for as_dir in $PATH
2916 do
2917 IFS=$as_save_IFS
2918 test -z "$as_dir" && as_dir=.
2919 for ac_exec_ext in '' $ac_executable_extensions; do
2920 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2921 ac_cv_prog_OCAMLC="${ac_tool_prefix}ocamlc"
2922 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2923 break 2
2924 fi
2925 done
2926 done
2927 IFS=$as_save_IFS
2928
2929 fi
2930 fi
2931 OCAMLC=$ac_cv_prog_OCAMLC
2932 if test -n "$OCAMLC"; then
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLC" >&5
2934 $as_echo "$OCAMLC" >&6; }
2935 else
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2937 $as_echo "no" >&6; }
2938 fi
2939
2940
2941 fi
2942 if test -z "$ac_cv_prog_OCAMLC"; then
2943 ac_ct_OCAMLC=$OCAMLC
2944 # Extract the first word of "ocamlc", so it can be a program name with args.
2945 set dummy ocamlc; ac_word=$2
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2947 $as_echo_n "checking for $ac_word... " >&6; }
2948 if ${ac_cv_prog_ac_ct_OCAMLC+:} false; then :
2949 $as_echo_n "(cached) " >&6
2950 else
2951 if test -n "$ac_ct_OCAMLC"; then
2952 ac_cv_prog_ac_ct_OCAMLC="$ac_ct_OCAMLC" # Let the user override the test.
2953 else
2954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2955 for as_dir in $PATH
2956 do
2957 IFS=$as_save_IFS
2958 test -z "$as_dir" && as_dir=.
2959 for ac_exec_ext in '' $ac_executable_extensions; do
2960 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2961 ac_cv_prog_ac_ct_OCAMLC="ocamlc"
2962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2963 break 2
2964 fi
2965 done
2966 done
2967 IFS=$as_save_IFS
2968
2969 fi
2970 fi
2971 ac_ct_OCAMLC=$ac_cv_prog_ac_ct_OCAMLC
2972 if test -n "$ac_ct_OCAMLC"; then
2973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLC" >&5
2974 $as_echo "$ac_ct_OCAMLC" >&6; }
2975 else
2976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2977 $as_echo "no" >&6; }
2978 fi
2979
2980 if test "x$ac_ct_OCAMLC" = x; then
2981 OCAMLC="no"
2982 else
2983 case $cross_compiling:$ac_tool_warned in
2984 yes:)
2985 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2986 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2987 ac_tool_warned=yes ;;
2988 esac
2989 OCAMLC=$ac_ct_OCAMLC
2990 fi
2991 else
2992 OCAMLC="$ac_cv_prog_OCAMLC"
2993 fi
2994
2995
2996 if test "$OCAMLC" = "no"; then
2997 as_fn_error $? "Cannot find ocamlc." "$LINENO" 5
2998 fi
2999
3000
3001
3002 OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'`
3003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCaml version is $OCAMLVERSION" >&5
3004 $as_echo "OCaml version is $OCAMLVERSION" >&6; }
3005 # Check if version is >= 3.12.0
3006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ocaml compiler supports first-class modules" >&5
3007 $as_echo_n "checking if ocaml compiler supports first-class modules... " >&6; }
3008 as_arg_v1=$OCAMLVERSION
3009 as_arg_v2=3.12.0
3010 awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
3011 case $? in #(
3012 1) :
3013 ;; #(
3014 0) :
3015 OCAML_HAS_FIRST_CLASS_MODULES="yes" ;; #(
3016 2) :
3017 OCAML_HAS_FIRST_CLASS_MODULES="yes" ;; #(
3018 *) :
3019 ;;
3020 esac
3021 if test -n "${OCAML_HAS_FIRST_CLASS_MODULES}"; then
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3023 $as_echo "yes" >&6; }
3024 else
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3026 $as_echo "no" >&6; }
3027 fi
3028
3029
3030 # If OCAMLLIB is set, use it
3031 if test "$OCAMLLIB" = ""; then
3032 OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4`
3033 else
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCAMLLIB previously set; preserving it." >&5
3035 $as_echo "OCAMLLIB previously set; preserving it." >&6; }
3036 fi
3037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCaml library path is $OCAMLLIB" >&5
3038 $as_echo "OCaml library path is $OCAMLLIB" >&6; }
3039
3040
3041
3042
3043 # checking for ocamlopt
3044 # Extract the first word of "${ac_tool_prefix}ocamlopt", so it can be a program name with args.
3045 set dummy ${ac_tool_prefix}ocamlopt; ac_word=$2
3046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3047 $as_echo_n "checking for $ac_word... " >&6; }
3048 if ${ac_cv_prog_OCAMLOPT+:} false; then :
3049 $as_echo_n "(cached) " >&6
3050 else
3051 if test -n "$OCAMLOPT"; then
3052 ac_cv_prog_OCAMLOPT="$OCAMLOPT" # Let the user override the test.
3053 else
3054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3055 for as_dir in $PATH
3056 do
3057 IFS=$as_save_IFS
3058 test -z "$as_dir" && as_dir=.
3059 for ac_exec_ext in '' $ac_executable_extensions; do
3060 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3061 ac_cv_prog_OCAMLOPT="${ac_tool_prefix}ocamlopt"
3062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3063 break 2
3064 fi
3065 done
3066 done
3067 IFS=$as_save_IFS
3068
3069 test -z "$ac_cv_prog_OCAMLOPT" && ac_cv_prog_OCAMLOPT="no"
3070 fi
3071 fi
3072 OCAMLOPT=$ac_cv_prog_OCAMLOPT
3073 if test -n "$OCAMLOPT"; then
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPT" >&5
3075 $as_echo "$OCAMLOPT" >&6; }
3076 else
3077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3078 $as_echo "no" >&6; }
3079 fi
3080
3081
3082 OCAMLBEST=byte
3083 OCAML_DYNLINK=byte-dyn
3084 if test "$OCAMLOPT" = "no"; then
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find ocamlopt; bytecode compilation only." >&5
3086 $as_echo "$as_me: WARNING: Cannot find ocamlopt; bytecode compilation only." >&2;}
3087 else
3088 TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
3089 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc; ocamlopt discarded." >&5
3091 $as_echo "versions differs from ocamlc; ocamlopt discarded." >&6; }
3092 OCAMLOPT=no
3093 else
3094 OCAMLBEST="byte opt"
3095 OCAML_DYNLINK="byte-dyn opt-dyn"
3096 fi
3097 fi
3098
3099
3100
3101
3102 # checking for ocamlc.opt
3103 # Extract the first word of "${ac_tool_prefix}ocamlc.opt", so it can be a program name with args.
3104 set dummy ${ac_tool_prefix}ocamlc.opt; ac_word=$2
3105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3106 $as_echo_n "checking for $ac_word... " >&6; }
3107 if ${ac_cv_prog_OCAMLCDOTOPT+:} false; then :
3108 $as_echo_n "(cached) " >&6
3109 else
3110 if test -n "$OCAMLCDOTOPT"; then
3111 ac_cv_prog_OCAMLCDOTOPT="$OCAMLCDOTOPT" # Let the user override the test.
3112 else
3113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3114 for as_dir in $PATH
3115 do
3116 IFS=$as_save_IFS
3117 test -z "$as_dir" && as_dir=.
3118 for ac_exec_ext in '' $ac_executable_extensions; do
3119 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3120 ac_cv_prog_OCAMLCDOTOPT="${ac_tool_prefix}ocamlc.opt"
3121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3122 break 2
3123 fi
3124 done
3125 done
3126 IFS=$as_save_IFS
3127
3128 test -z "$ac_cv_prog_OCAMLCDOTOPT" && ac_cv_prog_OCAMLCDOTOPT="no"
3129 fi
3130 fi
3131 OCAMLCDOTOPT=$ac_cv_prog_OCAMLCDOTOPT
3132 if test -n "$OCAMLCDOTOPT"; then
3133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLCDOTOPT" >&5
3134 $as_echo "$OCAMLCDOTOPT" >&6; }
3135 else
3136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3137 $as_echo "no" >&6; }
3138 fi
3139
3140
3141 if test "$OCAMLCDOTOPT" != "no"; then
3142 TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
3143 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
3144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc; ocamlc.opt discarded." >&5
3145 $as_echo "versions differs from ocamlc; ocamlc.opt discarded." >&6; }
3146 else
3147 OCAMLC=$OCAMLCDOTOPT
3148 fi
3149 fi
3150
3151 # checking for ocamlopt.opt
3152 if test "$OCAMLOPT" != "no" ; then
3153 # Extract the first word of "${ac_tool_prefix}ocamlopt.opt", so it can be a program name with args.
3154 set dummy ${ac_tool_prefix}ocamlopt.opt; ac_word=$2
3155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3156 $as_echo_n "checking for $ac_word... " >&6; }
3157 if ${ac_cv_prog_OCAMLOPTDOTOPT+:} false; then :
3158 $as_echo_n "(cached) " >&6
3159 else
3160 if test -n "$OCAMLOPTDOTOPT"; then
3161 ac_cv_prog_OCAMLOPTDOTOPT="$OCAMLOPTDOTOPT" # Let the user override the test.
3162 else
3163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3164 for as_dir in $PATH
3165 do
3166 IFS=$as_save_IFS
3167 test -z "$as_dir" && as_dir=.
3168 for ac_exec_ext in '' $ac_executable_extensions; do
3169 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3170 ac_cv_prog_OCAMLOPTDOTOPT="${ac_tool_prefix}ocamlopt.opt"
3171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3172 break 2
3173 fi
3174 done
3175 done
3176 IFS=$as_save_IFS
3177
3178 test -z "$ac_cv_prog_OCAMLOPTDOTOPT" && ac_cv_prog_OCAMLOPTDOTOPT="no"
3179 fi
3180 fi
3181 OCAMLOPTDOTOPT=$ac_cv_prog_OCAMLOPTDOTOPT
3182 if test -n "$OCAMLOPTDOTOPT"; then
3183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPTDOTOPT" >&5
3184 $as_echo "$OCAMLOPTDOTOPT" >&6; }
3185 else
3186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3187 $as_echo "no" >&6; }
3188 fi
3189
3190
3191 if test "$OCAMLOPTDOTOPT" != "no"; then
3192 TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
3193 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
3194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: version differs from ocamlc; ocamlopt.opt discarded." >&5
3195 $as_echo "version differs from ocamlc; ocamlopt.opt discarded." >&6; }
3196 else
3197 OCAMLOPT=$OCAMLOPTDOTOPT
3198 fi
3199 fi
3200 fi
3201
3202
3203
3204 # checking for ocaml toplevel
3205 # Extract the first word of "${ac_tool_prefix}ocaml", so it can be a program name with args.
3206 set dummy ${ac_tool_prefix}ocaml; ac_word=$2
3207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3208 $as_echo_n "checking for $ac_word... " >&6; }
3209 if ${ac_cv_prog_OCAML+:} false; then :
3210 $as_echo_n "(cached) " >&6
3211 else
3212 if test -n "$OCAML"; then
3213 ac_cv_prog_OCAML="$OCAML" # Let the user override the test.
3214 else
3215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3216 for as_dir in $PATH
3217 do
3218 IFS=$as_save_IFS
3219 test -z "$as_dir" && as_dir=.
3220 for ac_exec_ext in '' $ac_executable_extensions; do
3221 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3222 ac_cv_prog_OCAML="${ac_tool_prefix}ocaml"
3223 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3224 break 2
3225 fi
3226 done
3227 done
3228 IFS=$as_save_IFS
3229
3230 test -z "$ac_cv_prog_OCAML" && ac_cv_prog_OCAML="no"
3231 fi
3232 fi
3233 OCAML=$ac_cv_prog_OCAML
3234 if test -n "$OCAML"; then
3235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAML" >&5
3236 $as_echo "$OCAML" >&6; }
3237 else
3238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3239 $as_echo "no" >&6; }
3240 fi
3241
3242
3243
3244
3245
3246 # checking for ocamldep
3247 # Extract the first word of "${ac_tool_prefix}ocamldep", so it can be a program name with args.
3248 set dummy ${ac_tool_prefix}ocamldep; ac_word=$2
3249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3250 $as_echo_n "checking for $ac_word... " >&6; }
3251 if ${ac_cv_prog_OCAMLDEP+:} false; then :
3252 $as_echo_n "(cached) " >&6
3253 else
3254 if test -n "$OCAMLDEP"; then
3255 ac_cv_prog_OCAMLDEP="$OCAMLDEP" # Let the user override the test.
3256 else
3257 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3258 for as_dir in $PATH
3259 do
3260 IFS=$as_save_IFS
3261 test -z "$as_dir" && as_dir=.
3262 for ac_exec_ext in '' $ac_executable_extensions; do
3263 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3264 ac_cv_prog_OCAMLDEP="${ac_tool_prefix}ocamldep"
3265 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3266 break 2
3267 fi
3268 done
3269 done
3270 IFS=$as_save_IFS
3271
3272 test -z "$ac_cv_prog_OCAMLDEP" && ac_cv_prog_OCAMLDEP="no"
3273 fi
3274 fi
3275 OCAMLDEP=$ac_cv_prog_OCAMLDEP
3276 if test -n "$OCAMLDEP"; then
3277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDEP" >&5
3278 $as_echo "$OCAMLDEP" >&6; }
3279 else
3280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3281 $as_echo "no" >&6; }
3282 fi
3283
3284
3285 if test "$OCAMLDEP" = "no"; then
3286 as_fn_error $? "Cannot find ocamlmklib." "$LINENO" 5
3287 fi
3288
3289
3290
3291 # checking for ocamlmktop
3292 # Extract the first word of "${ac_tool_prefix}ocamlmktop", so it can be a program name with args.
3293 set dummy ${ac_tool_prefix}ocamlmktop; ac_word=$2
3294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3295 $as_echo_n "checking for $ac_word... " >&6; }
3296 if ${ac_cv_prog_OCAMLMKTOP+:} false; then :
3297 $as_echo_n "(cached) " >&6
3298 else
3299 if test -n "$OCAMLMKTOP"; then
3300 ac_cv_prog_OCAMLMKTOP="$OCAMLMKTOP" # Let the user override the test.
3301 else
3302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3303 for as_dir in $PATH
3304 do
3305 IFS=$as_save_IFS
3306 test -z "$as_dir" && as_dir=.
3307 for ac_exec_ext in '' $ac_executable_extensions; do
3308 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3309 ac_cv_prog_OCAMLMKTOP="${ac_tool_prefix}ocamlmktop"
3310 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3311 break 2
3312 fi
3313 done
3314 done
3315 IFS=$as_save_IFS
3316
3317 test -z "$ac_cv_prog_OCAMLMKTOP" && ac_cv_prog_OCAMLMKTOP="no"
3318 fi
3319 fi
3320 OCAMLMKTOP=$ac_cv_prog_OCAMLMKTOP
3321 if test -n "$OCAMLMKTOP"; then
3322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLMKTOP" >&5
3323 $as_echo "$OCAMLMKTOP" >&6; }
3324 else
3325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3326 $as_echo "no" >&6; }
3327 fi
3328
3329
3330
3331
3332
3333 # checking for ocamlmklib
3334 # Extract the first word of "${ac_tool_prefix}ocamlmklib", so it can be a program name with args.
3335 set dummy ${ac_tool_prefix}ocamlmklib; ac_word=$2
3336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3337 $as_echo_n "checking for $ac_word... " >&6; }
3338 if ${ac_cv_prog_OCAMLMKLIB+:} false; then :
3339 $as_echo_n "(cached) " >&6
3340 else
3341 if test -n "$OCAMLMKLIB"; then
3342 ac_cv_prog_OCAMLMKLIB="$OCAMLMKLIB" # Let the user override the test.
3343 else
3344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3345 for as_dir in $PATH
3346 do
3347 IFS=$as_save_IFS
3348 test -z "$as_dir" && as_dir=.
3349 for ac_exec_ext in '' $ac_executable_extensions; do
3350 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3351 ac_cv_prog_OCAMLMKLIB="${ac_tool_prefix}ocamlmklib"
3352 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3353 break 2
3354 fi
3355 done
3356 done
3357 IFS=$as_save_IFS
3358
3359 test -z "$ac_cv_prog_OCAMLMKLIB" && ac_cv_prog_OCAMLMKLIB="no"
3360 fi
3361 fi
3362 OCAMLMKLIB=$ac_cv_prog_OCAMLMKLIB
3363 if test -n "$OCAMLMKLIB"; then
3364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLMKLIB" >&5
3365 $as_echo "$OCAMLMKLIB" >&6; }
3366 else
3367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3368 $as_echo "no" >&6; }
3369 fi
3370
3371
3372 if test "$OCAMLMKLIB" = "no"; then
3373 as_fn_error $? "Cannot find ocamlmklib." "$LINENO" 5
3374 fi
3375
3376
3377
3378 # checking for ocamldoc
3379 if test -n "$ac_tool_prefix"; then
3380 # Extract the first word of "${ac_tool_prefix}ocamldoc", so it can be a program name with args.
3381 set dummy ${ac_tool_prefix}ocamldoc; ac_word=$2
3382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3383 $as_echo_n "checking for $ac_word... " >&6; }
3384 if ${ac_cv_prog_OCAMLDOC+:} false; then :
3385 $as_echo_n "(cached) " >&6
3386 else
3387 if test -n "$OCAMLDOC"; then
3388 ac_cv_prog_OCAMLDOC="$OCAMLDOC" # Let the user override the test.
3389 else
3390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3391 for as_dir in $PATH
3392 do
3393 IFS=$as_save_IFS
3394 test -z "$as_dir" && as_dir=.
3395 for ac_exec_ext in '' $ac_executable_extensions; do
3396 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3397 ac_cv_prog_OCAMLDOC="${ac_tool_prefix}ocamldoc"
3398 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3399 break 2
3400 fi
3401 done
3402 done
3403 IFS=$as_save_IFS
3404
3405 fi
3406 fi
3407 OCAMLDOC=$ac_cv_prog_OCAMLDOC
3408 if test -n "$OCAMLDOC"; then
3409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDOC" >&5
3410 $as_echo "$OCAMLDOC" >&6; }
3411 else
3412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3413 $as_echo "no" >&6; }
3414 fi
3415
3416
3417 fi
3418 if test -z "$ac_cv_prog_OCAMLDOC"; then
3419 ac_ct_OCAMLDOC=$OCAMLDOC
3420 # Extract the first word of "ocamldoc", so it can be a program name with args.
3421 set dummy ocamldoc; ac_word=$2
3422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3423 $as_echo_n "checking for $ac_word... " >&6; }
3424 if ${ac_cv_prog_ac_ct_OCAMLDOC+:} false; then :
3425 $as_echo_n "(cached) " >&6
3426 else
3427 if test -n "$ac_ct_OCAMLDOC"; then
3428 ac_cv_prog_ac_ct_OCAMLDOC="$ac_ct_OCAMLDOC" # Let the user override the test.
3429 else
3430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3431 for as_dir in $PATH
3432 do
3433 IFS=$as_save_IFS
3434 test -z "$as_dir" && as_dir=.
3435 for ac_exec_ext in '' $ac_executable_extensions; do
3436 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3437 ac_cv_prog_ac_ct_OCAMLDOC="ocamldoc"
3438 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3439 break 2
3440 fi
3441 done
3442 done
3443 IFS=$as_save_IFS
3444
3445 fi
3446 fi
3447 ac_ct_OCAMLDOC=$ac_cv_prog_ac_ct_OCAMLDOC
3448 if test -n "$ac_ct_OCAMLDOC"; then
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLDOC" >&5
3450 $as_echo "$ac_ct_OCAMLDOC" >&6; }
3451 else
3452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3453 $as_echo "no" >&6; }
3454 fi
3455
3456 if test "x$ac_ct_OCAMLDOC" = x; then
3457 OCAMLDOC="no"
3458 else
3459 case $cross_compiling:$ac_tool_warned in
3460 yes:)
3461 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3462 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3463 ac_tool_warned=yes ;;
3464 esac
3465 OCAMLDOC=$ac_ct_OCAMLDOC
3466 fi
3467 else
3468 OCAMLDOC="$ac_cv_prog_OCAMLDOC"
3469 fi
3470
3471
3472
3473
3474 # checking for ocamlbuild
3475 if test -n "$ac_tool_prefix"; then
3476 # Extract the first word of "${ac_tool_prefix}ocamlbuild", so it can be a program name with args.
3477 set dummy ${ac_tool_prefix}ocamlbuild; ac_word=$2
3478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3479 $as_echo_n "checking for $ac_word... " >&6; }
3480 if ${ac_cv_prog_OCAMLBUILD+:} false; then :
3481 $as_echo_n "(cached) " >&6
3482 else
3483 if test -n "$OCAMLBUILD"; then
3484 ac_cv_prog_OCAMLBUILD="$OCAMLBUILD" # Let the user override the test.
3485 else
3486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3487 for as_dir in $PATH
3488 do
3489 IFS=$as_save_IFS
3490 test -z "$as_dir" && as_dir=.
3491 for ac_exec_ext in '' $ac_executable_extensions; do
3492 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3493 ac_cv_prog_OCAMLBUILD="${ac_tool_prefix}ocamlbuild"
3494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3495 break 2
3496 fi
3497 done
3498 done
3499 IFS=$as_save_IFS
3500
3501 fi
3502 fi
3503 OCAMLBUILD=$ac_cv_prog_OCAMLBUILD
3504 if test -n "$OCAMLBUILD"; then
3505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLBUILD" >&5
3506 $as_echo "$OCAMLBUILD" >&6; }
3507 else
3508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3509 $as_echo "no" >&6; }
3510 fi
3511
3512
3513 fi
3514 if test -z "$ac_cv_prog_OCAMLBUILD"; then
3515 ac_ct_OCAMLBUILD=$OCAMLBUILD
3516 # Extract the first word of "ocamlbuild", so it can be a program name with args.
3517 set dummy ocamlbuild; ac_word=$2
3518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3519 $as_echo_n "checking for $ac_word... " >&6; }
3520 if ${ac_cv_prog_ac_ct_OCAMLBUILD+:} false; then :
3521 $as_echo_n "(cached) " >&6
3522 else
3523 if test -n "$ac_ct_OCAMLBUILD"; then
3524 ac_cv_prog_ac_ct_OCAMLBUILD="$ac_ct_OCAMLBUILD" # Let the user override the test.
3525 else
3526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3527 for as_dir in $PATH
3528 do
3529 IFS=$as_save_IFS
3530 test -z "$as_dir" && as_dir=.
3531 for ac_exec_ext in '' $ac_executable_extensions; do
3532 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3533 ac_cv_prog_ac_ct_OCAMLBUILD="ocamlbuild"
3534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3535 break 2
3536 fi
3537 done
3538 done
3539 IFS=$as_save_IFS
3540
3541 fi
3542 fi
3543 ac_ct_OCAMLBUILD=$ac_cv_prog_ac_ct_OCAMLBUILD
3544 if test -n "$ac_ct_OCAMLBUILD"; then
3545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLBUILD" >&5
3546 $as_echo "$ac_ct_OCAMLBUILD" >&6; }
3547 else
3548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3549 $as_echo "no" >&6; }
3550 fi
3551
3552 if test "x$ac_ct_OCAMLBUILD" = x; then
3553 OCAMLBUILD="no"
3554 else
3555 case $cross_compiling:$ac_tool_warned in
3556 yes:)
3557 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3558 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3559 ac_tool_warned=yes ;;
3560 esac
3561 OCAMLBUILD=$ac_ct_OCAMLBUILD
3562 fi
3563 else
3564 OCAMLBUILD="$ac_cv_prog_OCAMLBUILD"
3565 fi
3566
3567
3568
3569
3570
3571 if test -n "$ac_tool_prefix"; then
3572 # Extract the first word of "${ac_tool_prefix}camlidl", so it can be a program name with args.
3573 set dummy ${ac_tool_prefix}camlidl; ac_word=$2
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3575 $as_echo_n "checking for $ac_word... " >&6; }
3576 if ${ac_cv_prog_CAMLIDL+:} false; then :
3577 $as_echo_n "(cached) " >&6
3578 else
3579 if test -n "$CAMLIDL"; then
3580 ac_cv_prog_CAMLIDL="$CAMLIDL" # Let the user override the test.
3581 else
3582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3583 for as_dir in $PATH
3584 do
3585 IFS=$as_save_IFS
3586 test -z "$as_dir" && as_dir=.
3587 for ac_exec_ext in '' $ac_executable_extensions; do
3588 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3589 ac_cv_prog_CAMLIDL="${ac_tool_prefix}camlidl"
3590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3591 break 2
3592 fi
3593 done
3594 done
3595 IFS=$as_save_IFS
3596
3597 fi
3598 fi
3599 CAMLIDL=$ac_cv_prog_CAMLIDL
3600 if test -n "$CAMLIDL"; then
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLIDL" >&5
3602 $as_echo "$CAMLIDL" >&6; }
3603 else
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3605 $as_echo "no" >&6; }
3606 fi
3607
3608
3609 fi
3610 if test -z "$ac_cv_prog_CAMLIDL"; then
3611 ac_ct_CAMLIDL=$CAMLIDL
3612 # Extract the first word of "camlidl", so it can be a program name with args.
3613 set dummy camlidl; ac_word=$2
3614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3615 $as_echo_n "checking for $ac_word... " >&6; }
3616 if ${ac_cv_prog_ac_ct_CAMLIDL+:} false; then :
3617 $as_echo_n "(cached) " >&6
3618 else
3619 if test -n "$ac_ct_CAMLIDL"; then
3620 ac_cv_prog_ac_ct_CAMLIDL="$ac_ct_CAMLIDL" # Let the user override the test.
3621 else
3622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3623 for as_dir in $PATH
3624 do
3625 IFS=$as_save_IFS
3626 test -z "$as_dir" && as_dir=.
3627 for ac_exec_ext in '' $ac_executable_extensions; do
3628 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3629 ac_cv_prog_ac_ct_CAMLIDL="camlidl"
3630 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3631 break 2
3632 fi
3633 done
3634 done
3635 IFS=$as_save_IFS
3636
3637 fi
3638 fi
3639 ac_ct_CAMLIDL=$ac_cv_prog_ac_ct_CAMLIDL
3640 if test -n "$ac_ct_CAMLIDL"; then
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CAMLIDL" >&5
3642 $as_echo "$ac_ct_CAMLIDL" >&6; }
3643 else
3644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3645 $as_echo "no" >&6; }
3646 fi
3647
3648 if test "x$ac_ct_CAMLIDL" = x; then
3649 CAMLIDL="no"
3650 else
3651 case $cross_compiling:$ac_tool_warned in
3652 yes:)
3653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3654 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3655 ac_tool_warned=yes ;;
3656 esac
3657 CAMLIDL=$ac_ct_CAMLIDL
3658 fi
3659 else
3660 CAMLIDL="$ac_cv_prog_CAMLIDL"
3661 fi
3662
3663
3664
3665 # checking for ocamllex
3666 if test -n "$ac_tool_prefix"; then
3667 # Extract the first word of "${ac_tool_prefix}ocamllex", so it can be a program name with args.
3668 set dummy ${ac_tool_prefix}ocamllex; ac_word=$2
3669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3670 $as_echo_n "checking for $ac_word... " >&6; }
3671 if ${ac_cv_prog_OCAMLLEX+:} false; then :
3672 $as_echo_n "(cached) " >&6
3673 else
3674 if test -n "$OCAMLLEX"; then
3675 ac_cv_prog_OCAMLLEX="$OCAMLLEX" # Let the user override the test.
3676 else
3677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3678 for as_dir in $PATH
3679 do
3680 IFS=$as_save_IFS
3681 test -z "$as_dir" && as_dir=.
3682 for ac_exec_ext in '' $ac_executable_extensions; do
3683 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3684 ac_cv_prog_OCAMLLEX="${ac_tool_prefix}ocamllex"
3685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3686 break 2
3687 fi
3688 done
3689 done
3690 IFS=$as_save_IFS
3691
3692 fi
3693 fi
3694 OCAMLLEX=$ac_cv_prog_OCAMLLEX
3695 if test -n "$OCAMLLEX"; then
3696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLLEX" >&5
3697 $as_echo "$OCAMLLEX" >&6; }
3698 else
3699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3700 $as_echo "no" >&6; }
3701 fi
3702
3703
3704 fi
3705 if test -z "$ac_cv_prog_OCAMLLEX"; then
3706 ac_ct_OCAMLLEX=$OCAMLLEX
3707 # Extract the first word of "ocamllex", so it can be a program name with args.
3708 set dummy ocamllex; ac_word=$2
3709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3710 $as_echo_n "checking for $ac_word... " >&6; }
3711 if ${ac_cv_prog_ac_ct_OCAMLLEX+:} false; then :
3712 $as_echo_n "(cached) " >&6
3713 else
3714 if test -n "$ac_ct_OCAMLLEX"; then
3715 ac_cv_prog_ac_ct_OCAMLLEX="$ac_ct_OCAMLLEX" # Let the user override the test.
3716 else
3717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3718 for as_dir in $PATH
3719 do
3720 IFS=$as_save_IFS
3721 test -z "$as_dir" && as_dir=.
3722 for ac_exec_ext in '' $ac_executable_extensions; do
3723 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3724 ac_cv_prog_ac_ct_OCAMLLEX="ocamllex"
3725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3726 break 2
3727 fi
3728 done
3729 done
3730 IFS=$as_save_IFS
3731
3732 fi
3733 fi
3734 ac_ct_OCAMLLEX=$ac_cv_prog_ac_ct_OCAMLLEX
3735 if test -n "$ac_ct_OCAMLLEX"; then
3736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLLEX" >&5
3737 $as_echo "$ac_ct_OCAMLLEX" >&6; }
3738 else
3739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3740 $as_echo "no" >&6; }
3741 fi
3742
3743 if test "x$ac_ct_OCAMLLEX" = x; then
3744 OCAMLLEX="no"
3745 else
3746 case $cross_compiling:$ac_tool_warned in
3747 yes:)
3748 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3749 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3750 ac_tool_warned=yes ;;
3751 esac
3752 OCAMLLEX=$ac_ct_OCAMLLEX
3753 fi
3754 else
3755 OCAMLLEX="$ac_cv_prog_OCAMLLEX"
3756 fi
3757
3758 if test "$OCAMLLEX" != "no"; then
3759 if test -n "$ac_tool_prefix"; then
3760 # Extract the first word of "${ac_tool_prefix}ocamllex.opt", so it can be a program name with args.
3761 set dummy ${ac_tool_prefix}ocamllex.opt; ac_word=$2
3762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3763 $as_echo_n "checking for $ac_word... " >&6; }
3764 if ${ac_cv_prog_OCAMLLEXDOTOPT+:} false; then :
3765 $as_echo_n "(cached) " >&6
3766 else
3767 if test -n "$OCAMLLEXDOTOPT"; then
3768 ac_cv_prog_OCAMLLEXDOTOPT="$OCAMLLEXDOTOPT" # Let the user override the test.
3769 else
3770 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3771 for as_dir in $PATH
3772 do
3773 IFS=$as_save_IFS
3774 test -z "$as_dir" && as_dir=.
3775 for ac_exec_ext in '' $ac_executable_extensions; do
3776 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3777 ac_cv_prog_OCAMLLEXDOTOPT="${ac_tool_prefix}ocamllex.opt"
3778 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3779 break 2
3780 fi
3781 done
3782 done
3783 IFS=$as_save_IFS
3784
3785 fi
3786 fi
3787 OCAMLLEXDOTOPT=$ac_cv_prog_OCAMLLEXDOTOPT
3788 if test -n "$OCAMLLEXDOTOPT"; then
3789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLLEXDOTOPT" >&5
3790 $as_echo "$OCAMLLEXDOTOPT" >&6; }
3791 else
3792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3793 $as_echo "no" >&6; }
3794 fi
3795
3796
3797 fi
3798 if test -z "$ac_cv_prog_OCAMLLEXDOTOPT"; then
3799 ac_ct_OCAMLLEXDOTOPT=$OCAMLLEXDOTOPT
3800 # Extract the first word of "ocamllex.opt", so it can be a program name with args.
3801 set dummy ocamllex.opt; ac_word=$2
3802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3803 $as_echo_n "checking for $ac_word... " >&6; }
3804 if ${ac_cv_prog_ac_ct_OCAMLLEXDOTOPT+:} false; then :
3805 $as_echo_n "(cached) " >&6
3806 else
3807 if test -n "$ac_ct_OCAMLLEXDOTOPT"; then
3808 ac_cv_prog_ac_ct_OCAMLLEXDOTOPT="$ac_ct_OCAMLLEXDOTOPT" # Let the user override the test.
3809 else
3810 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3811 for as_dir in $PATH
3812 do
3813 IFS=$as_save_IFS
3814 test -z "$as_dir" && as_dir=.
3815 for ac_exec_ext in '' $ac_executable_extensions; do
3816 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3817 ac_cv_prog_ac_ct_OCAMLLEXDOTOPT="ocamllex.opt"
3818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3819 break 2
3820 fi
3821 done
3822 done
3823 IFS=$as_save_IFS
3824
3825 fi
3826 fi
3827 ac_ct_OCAMLLEXDOTOPT=$ac_cv_prog_ac_ct_OCAMLLEXDOTOPT
3828 if test -n "$ac_ct_OCAMLLEXDOTOPT"; then
3829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLLEXDOTOPT" >&5
3830 $as_echo "$ac_ct_OCAMLLEXDOTOPT" >&6; }
3831 else
3832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3833 $as_echo "no" >&6; }
3834 fi
3835
3836 if test "x$ac_ct_OCAMLLEXDOTOPT" = x; then
3837 OCAMLLEXDOTOPT="no"
3838 else
3839 case $cross_compiling:$ac_tool_warned in
3840 yes:)
3841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3842 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3843 ac_tool_warned=yes ;;
3844 esac
3845 OCAMLLEXDOTOPT=$ac_ct_OCAMLLEXDOTOPT
3846 fi
3847 else
3848 OCAMLLEXDOTOPT="$ac_cv_prog_OCAMLLEXDOTOPT"
3849 fi
3850
3851 if test "$OCAMLLEXDOTOPT" != "no"; then
3852 OCAMLLEX=$OCAMLLEXDOTOPT
3853 fi
3854 fi
3855
3856
3857
3858 if test -n "$ac_tool_prefix"; then
3859 # Extract the first word of "${ac_tool_prefix}ocamlyacc", so it can be a program name with args.
3860 set dummy ${ac_tool_prefix}ocamlyacc; ac_word=$2
3861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862 $as_echo_n "checking for $ac_word... " >&6; }
3863 if ${ac_cv_prog_OCAMLYACC+:} false; then :
3864 $as_echo_n "(cached) " >&6
3865 else
3866 if test -n "$OCAMLYACC"; then
3867 ac_cv_prog_OCAMLYACC="$OCAMLYACC" # Let the user override the test.
3868 else
3869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3870 for as_dir in $PATH
3871 do
3872 IFS=$as_save_IFS
3873 test -z "$as_dir" && as_dir=.
3874 for ac_exec_ext in '' $ac_executable_extensions; do
3875 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3876 ac_cv_prog_OCAMLYACC="${ac_tool_prefix}ocamlyacc"
3877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3878 break 2
3879 fi
3880 done
3881 done
3882 IFS=$as_save_IFS
3883
3884 fi
3885 fi
3886 OCAMLYACC=$ac_cv_prog_OCAMLYACC
3887 if test -n "$OCAMLYACC"; then
3888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLYACC" >&5
3889 $as_echo "$OCAMLYACC" >&6; }
3890 else
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3892 $as_echo "no" >&6; }
3893 fi
3894
3895
3896 fi
3897 if test -z "$ac_cv_prog_OCAMLYACC"; then
3898 ac_ct_OCAMLYACC=$OCAMLYACC
3899 # Extract the first word of "ocamlyacc", so it can be a program name with args.
3900 set dummy ocamlyacc; ac_word=$2
3901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3902 $as_echo_n "checking for $ac_word... " >&6; }
3903 if ${ac_cv_prog_ac_ct_OCAMLYACC+:} false; then :
3904 $as_echo_n "(cached) " >&6
3905 else
3906 if test -n "$ac_ct_OCAMLYACC"; then
3907 ac_cv_prog_ac_ct_OCAMLYACC="$ac_ct_OCAMLYACC" # Let the user override the test.
3908 else
3909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3910 for as_dir in $PATH
3911 do
3912 IFS=$as_save_IFS
3913 test -z "$as_dir" && as_dir=.
3914 for ac_exec_ext in '' $ac_executable_extensions; do
3915 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3916 ac_cv_prog_ac_ct_OCAMLYACC="ocamlyacc"
3917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3918 break 2
3919 fi
3920 done
3921 done
3922 IFS=$as_save_IFS
3923
3924 fi
3925 fi
3926 ac_ct_OCAMLYACC=$ac_cv_prog_ac_ct_OCAMLYACC
3927 if test -n "$ac_ct_OCAMLYACC"; then
3928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLYACC" >&5
3929 $as_echo "$ac_ct_OCAMLYACC" >&6; }
3930 else
3931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3932 $as_echo "no" >&6; }
3933 fi
3934
3935 if test "x$ac_ct_OCAMLYACC" = x; then
3936 OCAMLYACC="no"
3937 else
3938 case $cross_compiling:$ac_tool_warned in
3939 yes:)
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3941 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3942 ac_tool_warned=yes ;;
3943 esac
3944 OCAMLYACC=$ac_ct_OCAMLYACC
3945 fi
3946 else
3947 OCAMLYACC="$ac_cv_prog_OCAMLYACC"
3948 fi
3949
3950
3951
3952
3953
3954
3955 # Check whether --enable-camlp4 was given.
3956 if test "${enable_camlp4+set}" = set; then :
3957 enableval=$enable_camlp4;
3958 fi
3959
3960
3961 # checking for camlp4
3962 if test "x$enable_camlp4" != "xno"; then
3963 # Extract the first word of "${ac_tool_prefix}camlp4", so it can be a program name with args.
3964 set dummy ${ac_tool_prefix}camlp4; ac_word=$2
3965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3966 $as_echo_n "checking for $ac_word... " >&6; }
3967 if ${ac_cv_prog_CAMLP4+:} false; then :
3968 $as_echo_n "(cached) " >&6
3969 else
3970 if test -n "$CAMLP4"; then
3971 ac_cv_prog_CAMLP4="$CAMLP4" # Let the user override the test.
3972 else
3973 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3974 for as_dir in $PATH
3975 do
3976 IFS=$as_save_IFS
3977 test -z "$as_dir" && as_dir=.
3978 for ac_exec_ext in '' $ac_executable_extensions; do
3979 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3980 ac_cv_prog_CAMLP4="${ac_tool_prefix}camlp4"
3981 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3982 break 2
3983 fi
3984 done
3985 done
3986 IFS=$as_save_IFS
3987
3988 test -z "$ac_cv_prog_CAMLP4" && ac_cv_prog_CAMLP4="no"
3989 fi
3990 fi
3991 CAMLP4=$ac_cv_prog_CAMLP4
3992 if test -n "$CAMLP4"; then
3993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4" >&5
3994 $as_echo "$CAMLP4" >&6; }
3995 else
3996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3997 $as_echo "no" >&6; }
3998 fi
3999
4000
4001 if test "$CAMLP4" != "no"; then
4002 TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p' | tr -d '\r'`
4003 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
4004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc" >&5
4005 $as_echo "versions differs from ocamlc" >&6; }
4006 CAMLP4=no
4007 fi
4008 fi
4009
4010
4011 # checking for companion tools
4012 # Extract the first word of "${ac_tool_prefix}camlp4boot", so it can be a program name with args.
4013 set dummy ${ac_tool_prefix}camlp4boot; ac_word=$2
4014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4015 $as_echo_n "checking for $ac_word... " >&6; }
4016 if ${ac_cv_prog_CAMLP4BOOT+:} false; then :
4017 $as_echo_n "(cached) " >&6
4018 else
4019 if test -n "$CAMLP4BOOT"; then
4020 ac_cv_prog_CAMLP4BOOT="$CAMLP4BOOT" # Let the user override the test.
4021 else
4022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4023 for as_dir in $PATH
4024 do
4025 IFS=$as_save_IFS
4026 test -z "$as_dir" && as_dir=.
4027 for ac_exec_ext in '' $ac_executable_extensions; do
4028 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4029 ac_cv_prog_CAMLP4BOOT="${ac_tool_prefix}camlp4boot"
4030 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4031 break 2
4032 fi
4033 done
4034 done
4035 IFS=$as_save_IFS
4036
4037 test -z "$ac_cv_prog_CAMLP4BOOT" && ac_cv_prog_CAMLP4BOOT="no"
4038 fi
4039 fi
4040 CAMLP4BOOT=$ac_cv_prog_CAMLP4BOOT
4041 if test -n "$CAMLP4BOOT"; then
4042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4BOOT" >&5
4043 $as_echo "$CAMLP4BOOT" >&6; }
4044 else
4045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4046 $as_echo "no" >&6; }
4047 fi
4048
4049
4050 # Extract the first word of "${ac_tool_prefix}camlp4o", so it can be a program name with args.
4051 set dummy ${ac_tool_prefix}camlp4o; ac_word=$2
4052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4053 $as_echo_n "checking for $ac_word... " >&6; }
4054 if ${ac_cv_prog_CAMLP4O+:} false; then :
4055 $as_echo_n "(cached) " >&6
4056 else
4057 if test -n "$CAMLP4O"; then
4058 ac_cv_prog_CAMLP4O="$CAMLP4O" # Let the user override the test.
4059 else
4060 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4061 for as_dir in $PATH
4062 do
4063 IFS=$as_save_IFS
4064 test -z "$as_dir" && as_dir=.
4065 for ac_exec_ext in '' $ac_executable_extensions; do
4066 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4067 ac_cv_prog_CAMLP4O="${ac_tool_prefix}camlp4o"
4068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4069 break 2
4070 fi
4071 done
4072 done
4073 IFS=$as_save_IFS
4074
4075 test -z "$ac_cv_prog_CAMLP4O" && ac_cv_prog_CAMLP4O="no"
4076 fi
4077 fi
4078 CAMLP4O=$ac_cv_prog_CAMLP4O
4079 if test -n "$CAMLP4O"; then
4080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4O" >&5
4081 $as_echo "$CAMLP4O" >&6; }
4082 else
4083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4084 $as_echo "no" >&6; }
4085 fi
4086
4087
4088 # Extract the first word of "${ac_tool_prefix}camlp4of", so it can be a program name with args.
4089 set dummy ${ac_tool_prefix}camlp4of; ac_word=$2
4090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4091 $as_echo_n "checking for $ac_word... " >&6; }
4092 if ${ac_cv_prog_CAMLP4OF+:} false; then :
4093 $as_echo_n "(cached) " >&6
4094 else
4095 if test -n "$CAMLP4OF"; then
4096 ac_cv_prog_CAMLP4OF="$CAMLP4OF" # Let the user override the test.
4097 else
4098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4099 for as_dir in $PATH
4100 do
4101 IFS=$as_save_IFS
4102 test -z "$as_dir" && as_dir=.
4103 for ac_exec_ext in '' $ac_executable_extensions; do
4104 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4105 ac_cv_prog_CAMLP4OF="${ac_tool_prefix}camlp4of"
4106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4107 break 2
4108 fi
4109 done
4110 done
4111 IFS=$as_save_IFS
4112
4113 test -z "$ac_cv_prog_CAMLP4OF" && ac_cv_prog_CAMLP4OF="no"
4114 fi
4115 fi
4116 CAMLP4OF=$ac_cv_prog_CAMLP4OF
4117 if test -n "$CAMLP4OF"; then
4118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4OF" >&5
4119 $as_echo "$CAMLP4OF" >&6; }
4120 else
4121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4122 $as_echo "no" >&6; }
4123 fi
4124
4125
4126 # Extract the first word of "${ac_tool_prefix}camlp4oof", so it can be a program name with args.
4127 set dummy ${ac_tool_prefix}camlp4oof; ac_word=$2
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4129 $as_echo_n "checking for $ac_word... " >&6; }
4130 if ${ac_cv_prog_CAMLP4OOF+:} false; then :
4131 $as_echo_n "(cached) " >&6
4132 else
4133 if test -n "$CAMLP4OOF"; then
4134 ac_cv_prog_CAMLP4OOF="$CAMLP4OOF" # Let the user override the test.
4135 else
4136 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4137 for as_dir in $PATH
4138 do
4139 IFS=$as_save_IFS
4140 test -z "$as_dir" && as_dir=.
4141 for ac_exec_ext in '' $ac_executable_extensions; do
4142 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4143 ac_cv_prog_CAMLP4OOF="${ac_tool_prefix}camlp4oof"
4144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4145 break 2
4146 fi
4147 done
4148 done
4149 IFS=$as_save_IFS
4150
4151 test -z "$ac_cv_prog_CAMLP4OOF" && ac_cv_prog_CAMLP4OOF="no"
4152 fi
4153 fi
4154 CAMLP4OOF=$ac_cv_prog_CAMLP4OOF
4155 if test -n "$CAMLP4OOF"; then
4156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4OOF" >&5
4157 $as_echo "$CAMLP4OOF" >&6; }
4158 else
4159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4160 $as_echo "no" >&6; }
4161 fi
4162
4163
4164 # Extract the first word of "${ac_tool_prefix}camlp4orf", so it can be a program name with args.
4165 set dummy ${ac_tool_prefix}camlp4orf; ac_word=$2
4166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4167 $as_echo_n "checking for $ac_word... " >&6; }
4168 if ${ac_cv_prog_CAMLP4ORF+:} false; then :
4169 $as_echo_n "(cached) " >&6
4170 else
4171 if test -n "$CAMLP4ORF"; then
4172 ac_cv_prog_CAMLP4ORF="$CAMLP4ORF" # Let the user override the test.
4173 else
4174 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4175 for as_dir in $PATH
4176 do
4177 IFS=$as_save_IFS
4178 test -z "$as_dir" && as_dir=.
4179 for ac_exec_ext in '' $ac_executable_extensions; do
4180 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4181 ac_cv_prog_CAMLP4ORF="${ac_tool_prefix}camlp4orf"
4182 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4183 break 2
4184 fi
4185 done
4186 done
4187 IFS=$as_save_IFS
4188
4189 test -z "$ac_cv_prog_CAMLP4ORF" && ac_cv_prog_CAMLP4ORF="no"
4190 fi
4191 fi
4192 CAMLP4ORF=$ac_cv_prog_CAMLP4ORF
4193 if test -n "$CAMLP4ORF"; then
4194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4ORF" >&5
4195 $as_echo "$CAMLP4ORF" >&6; }
4196 else
4197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4198 $as_echo "no" >&6; }
4199 fi
4200
4201
4202 # Extract the first word of "${ac_tool_prefix}camlp4prof", so it can be a program name with args.
4203 set dummy ${ac_tool_prefix}camlp4prof; ac_word=$2
4204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4205 $as_echo_n "checking for $ac_word... " >&6; }
4206 if ${ac_cv_prog_CAMLP4PROF+:} false; then :
4207 $as_echo_n "(cached) " >&6
4208 else
4209 if test -n "$CAMLP4PROF"; then
4210 ac_cv_prog_CAMLP4PROF="$CAMLP4PROF" # Let the user override the test.
4211 else
4212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213 for as_dir in $PATH
4214 do
4215 IFS=$as_save_IFS
4216 test -z "$as_dir" && as_dir=.
4217 for ac_exec_ext in '' $ac_executable_extensions; do
4218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4219 ac_cv_prog_CAMLP4PROF="${ac_tool_prefix}camlp4prof"
4220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4221 break 2
4222 fi
4223 done
4224 done
4225 IFS=$as_save_IFS
4226
4227 test -z "$ac_cv_prog_CAMLP4PROF" && ac_cv_prog_CAMLP4PROF="no"
4228 fi
4229 fi
4230 CAMLP4PROF=$ac_cv_prog_CAMLP4PROF
4231 if test -n "$CAMLP4PROF"; then
4232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4PROF" >&5
4233 $as_echo "$CAMLP4PROF" >&6; }
4234 else
4235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4236 $as_echo "no" >&6; }
4237 fi
4238
4239
4240 # Extract the first word of "${ac_tool_prefix}camlp4r", so it can be a program name with args.
4241 set dummy ${ac_tool_prefix}camlp4r; ac_word=$2
4242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4243 $as_echo_n "checking for $ac_word... " >&6; }
4244 if ${ac_cv_prog_CAMLP4R+:} false; then :
4245 $as_echo_n "(cached) " >&6
4246 else
4247 if test -n "$CAMLP4R"; then
4248 ac_cv_prog_CAMLP4R="$CAMLP4R" # Let the user override the test.
4249 else
4250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4251 for as_dir in $PATH
4252 do
4253 IFS=$as_save_IFS
4254 test -z "$as_dir" && as_dir=.
4255 for ac_exec_ext in '' $ac_executable_extensions; do
4256 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4257 ac_cv_prog_CAMLP4R="${ac_tool_prefix}camlp4r"
4258 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4259 break 2
4260 fi
4261 done
4262 done
4263 IFS=$as_save_IFS
4264
4265 test -z "$ac_cv_prog_CAMLP4R" && ac_cv_prog_CAMLP4R="no"
4266 fi
4267 fi
4268 CAMLP4R=$ac_cv_prog_CAMLP4R
4269 if test -n "$CAMLP4R"; then
4270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4R" >&5
4271 $as_echo "$CAMLP4R" >&6; }
4272 else
4273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4274 $as_echo "no" >&6; }
4275 fi
4276
4277
4278 # Extract the first word of "${ac_tool_prefix}camlp4rf", so it can be a program name with args.
4279 set dummy ${ac_tool_prefix}camlp4rf; ac_word=$2
4280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4281 $as_echo_n "checking for $ac_word... " >&6; }
4282 if ${ac_cv_prog_CAMLP4RF+:} false; then :
4283 $as_echo_n "(cached) " >&6
4284 else
4285 if test -n "$CAMLP4RF"; then
4286 ac_cv_prog_CAMLP4RF="$CAMLP4RF" # Let the user override the test.
4287 else
4288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4289 for as_dir in $PATH
4290 do
4291 IFS=$as_save_IFS
4292 test -z "$as_dir" && as_dir=.
4293 for ac_exec_ext in '' $ac_executable_extensions; do
4294 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4295 ac_cv_prog_CAMLP4RF="${ac_tool_prefix}camlp4rf"
4296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4297 break 2
4298 fi
4299 done
4300 done
4301 IFS=$as_save_IFS
4302
4303 test -z "$ac_cv_prog_CAMLP4RF" && ac_cv_prog_CAMLP4RF="no"
4304 fi
4305 fi
4306 CAMLP4RF=$ac_cv_prog_CAMLP4RF
4307 if test -n "$CAMLP4RF"; then
4308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4RF" >&5
4309 $as_echo "$CAMLP4RF" >&6; }
4310 else
4311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4312 $as_echo "no" >&6; }
4313 fi
4314
4315
4316 else
4317 CAMLP4=no
4318 CAMLP4BOOT=no
4319 CAMLP4O=no
4320 CAMLP4OF=no
4321 CAMLP4OOF=no
4322 CAMLP4ORF=no
4323 CAMLP4PROF=no
4324 CAMLP4R=no
4325 CAMLP4RF=no
4326 fi
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339 # checking for ocamlfind
4340 if test -n "$ac_tool_prefix"; then
4341 # Extract the first word of "${ac_tool_prefix}ocamlfind", so it can be a program name with args.
4342 set dummy ${ac_tool_prefix}ocamlfind; ac_word=$2
4343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4344 $as_echo_n "checking for $ac_word... " >&6; }
4345 if ${ac_cv_prog_OCAMLFIND+:} false; then :
4346 $as_echo_n "(cached) " >&6
4347 else
4348 if test -n "$OCAMLFIND"; then
4349 ac_cv_prog_OCAMLFIND="$OCAMLFIND" # Let the user override the test.
4350 else
4351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4352 for as_dir in $PATH
4353 do
4354 IFS=$as_save_IFS
4355 test -z "$as_dir" && as_dir=.
4356 for ac_exec_ext in '' $ac_executable_extensions; do
4357 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4358 ac_cv_prog_OCAMLFIND="${ac_tool_prefix}ocamlfind"
4359 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4360 break 2
4361 fi
4362 done
4363 done
4364 IFS=$as_save_IFS
4365
4366 fi
4367 fi
4368 OCAMLFIND=$ac_cv_prog_OCAMLFIND
4369 if test -n "$OCAMLFIND"; then
4370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLFIND" >&5
4371 $as_echo "$OCAMLFIND" >&6; }
4372 else
4373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4374 $as_echo "no" >&6; }
4375 fi
4376
4377
4378 fi
4379 if test -z "$ac_cv_prog_OCAMLFIND"; then
4380 ac_ct_OCAMLFIND=$OCAMLFIND
4381 # Extract the first word of "ocamlfind", so it can be a program name with args.
4382 set dummy ocamlfind; ac_word=$2
4383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4384 $as_echo_n "checking for $ac_word... " >&6; }
4385 if ${ac_cv_prog_ac_ct_OCAMLFIND+:} false; then :
4386 $as_echo_n "(cached) " >&6
4387 else
4388 if test -n "$ac_ct_OCAMLFIND"; then
4389 ac_cv_prog_ac_ct_OCAMLFIND="$ac_ct_OCAMLFIND" # Let the user override the test.
4390 else
4391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4392 for as_dir in $PATH
4393 do
4394 IFS=$as_save_IFS
4395 test -z "$as_dir" && as_dir=.
4396 for ac_exec_ext in '' $ac_executable_extensions; do
4397 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4398 ac_cv_prog_ac_ct_OCAMLFIND="ocamlfind"
4399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4400 break 2
4401 fi
4402 done
4403 done
4404 IFS=$as_save_IFS
4405
4406 fi
4407 fi
4408 ac_ct_OCAMLFIND=$ac_cv_prog_ac_ct_OCAMLFIND
4409 if test -n "$ac_ct_OCAMLFIND"; then
4410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLFIND" >&5
4411 $as_echo "$ac_ct_OCAMLFIND" >&6; }
4412 else
4413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4414 $as_echo "no" >&6; }
4415 fi
4416
4417 if test "x$ac_ct_OCAMLFIND" = x; then
4418 OCAMLFIND="no"
4419 else
4420 case $cross_compiling:$ac_tool_warned in
4421 yes:)
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4423 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4424 ac_tool_warned=yes ;;
4425 esac
4426 OCAMLFIND=$ac_ct_OCAMLFIND
4427 fi
4428 else
4429 OCAMLFIND="$ac_cv_prog_OCAMLFIND"
4430 fi
4431
4432
4433
4434
4435 # Check if caml/threads.h is present
4436 ac_fn_c_check_header_compile "$LINENO" "caml/threads.h" "ac_cv_header_caml_threads_h" "#include <caml/misc.h>
4437 "
4438 if test "x$ac_cv_header_caml_threads_h" = xyes; then :
4439 CAML_THREADS=yes
4440 fi
4441
4442
4443
4444 # Check whether --enable-debugging was given.
4445 if test "${enable_debugging+set}" = set; then :
4446 enableval=$enable_debugging;
4447 fi
4448
4449
4450 if test "x$enable_debugging" = "xyes" ; then
4451 OCAMLFLAGS="$OCAMLFLAGS -g"
4452 fi
4453
4454 # Check whether --enable-profiling was given.
4455 if test "${enable_profiling+set}" = set; then :
4456 enableval=$enable_profiling;
4457 fi
4458
4459 if test "x$enable_profiling" = "xyes" ; then
4460 OCAMLNCFLAGS="$OCAMLNCFLAGS -p"
4461 fi
4462
4463
4464 # Check whether --enable-nativecode was given.
4465 if test "${enable_nativecode+set}" = set; then :
4466 enableval=$enable_nativecode;
4467 fi
4468
4469
4470 # Check whether --enable-custom was given.
4471 if test "${enable_custom+set}" = set; then :
4472 enableval=$enable_custom;
4473 fi
4474
4475
4476 CAMLLIBPATH=$OCAMLLIB
4477
4478
4479
4480
4481
4482
4483 ac_ext=c
4484 ac_cpp='$CPP $CPPFLAGS'
4485 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4486 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4487 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4488 if test -n "$ac_tool_prefix"; then
4489 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4490 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4492 $as_echo_n "checking for $ac_word... " >&6; }
4493 if ${ac_cv_prog_CC+:} false; then :
4494 $as_echo_n "(cached) " >&6
4495 else
4496 if test -n "$CC"; then
4497 ac_cv_prog_CC="$CC" # Let the user override the test.
4498 else
4499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4500 for as_dir in $PATH
4501 do
4502 IFS=$as_save_IFS
4503 test -z "$as_dir" && as_dir=.
4504 for ac_exec_ext in '' $ac_executable_extensions; do
4505 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4506 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4507 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4508 break 2
4509 fi
4510 done
4511 done
4512 IFS=$as_save_IFS
4513
4514 fi
4515 fi
4516 CC=$ac_cv_prog_CC
4517 if test -n "$CC"; then
4518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4519 $as_echo "$CC" >&6; }
4520 else
4521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4522 $as_echo "no" >&6; }
4523 fi
4524
4525
4526 fi
4527 if test -z "$ac_cv_prog_CC"; then
4528 ac_ct_CC=$CC
4529 # Extract the first word of "gcc", so it can be a program name with args.
4530 set dummy gcc; ac_word=$2
4531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4532 $as_echo_n "checking for $ac_word... " >&6; }
4533 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4534 $as_echo_n "(cached) " >&6
4535 else
4536 if test -n "$ac_ct_CC"; then
4537 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4538 else
4539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540 for as_dir in $PATH
4541 do
4542 IFS=$as_save_IFS
4543 test -z "$as_dir" && as_dir=.
4544 for ac_exec_ext in '' $ac_executable_extensions; do
4545 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4546 ac_cv_prog_ac_ct_CC="gcc"
4547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4548 break 2
4549 fi
4550 done
4551 done
4552 IFS=$as_save_IFS
4553
4554 fi
4555 fi
4556 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4557 if test -n "$ac_ct_CC"; then
4558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4559 $as_echo "$ac_ct_CC" >&6; }
4560 else
4561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4562 $as_echo "no" >&6; }
4563 fi
4564
4565 if test "x$ac_ct_CC" = x; then
4566 CC=""
4567 else
4568 case $cross_compiling:$ac_tool_warned in
4569 yes:)
4570 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4571 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4572 ac_tool_warned=yes ;;
4573 esac
4574 CC=$ac_ct_CC
4575 fi
4576 else
4577 CC="$ac_cv_prog_CC"
4578 fi
4579
4580 if test -z "$CC"; then
4581 if test -n "$ac_tool_prefix"; then
4582 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4583 set dummy ${ac_tool_prefix}cc; ac_word=$2
4584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4585 $as_echo_n "checking for $ac_word... " >&6; }
4586 if ${ac_cv_prog_CC+:} false; then :
4587 $as_echo_n "(cached) " >&6
4588 else
4589 if test -n "$CC"; then
4590 ac_cv_prog_CC="$CC" # Let the user override the test.
4591 else
4592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4593 for as_dir in $PATH
4594 do
4595 IFS=$as_save_IFS
4596 test -z "$as_dir" && as_dir=.
4597 for ac_exec_ext in '' $ac_executable_extensions; do
4598 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4599 ac_cv_prog_CC="${ac_tool_prefix}cc"
4600 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4601 break 2
4602 fi
4603 done
4604 done
4605 IFS=$as_save_IFS
4606
4607 fi
4608 fi
4609 CC=$ac_cv_prog_CC
4610 if test -n "$CC"; then
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4612 $as_echo "$CC" >&6; }
4613 else
4614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4615 $as_echo "no" >&6; }
4616 fi
4617
4618
4619 fi
4620 fi
4621 if test -z "$CC"; then
4622 # Extract the first word of "cc", so it can be a program name with args.
4623 set dummy cc; ac_word=$2
4624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625 $as_echo_n "checking for $ac_word... " >&6; }
4626 if ${ac_cv_prog_CC+:} false; then :
4627 $as_echo_n "(cached) " >&6
4628 else
4629 if test -n "$CC"; then
4630 ac_cv_prog_CC="$CC" # Let the user override the test.
4631 else
4632 ac_prog_rejected=no
4633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4634 for as_dir in $PATH
4635 do
4636 IFS=$as_save_IFS
4637 test -z "$as_dir" && as_dir=.
4638 for ac_exec_ext in '' $ac_executable_extensions; do
4639 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4640 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4641 ac_prog_rejected=yes
4642 continue
4643 fi
4644 ac_cv_prog_CC="cc"
4645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646 break 2
4647 fi
4648 done
4649 done
4650 IFS=$as_save_IFS
4651
4652 if test $ac_prog_rejected = yes; then
4653 # We found a bogon in the path, so make sure we never use it.
4654 set dummy $ac_cv_prog_CC
4655 shift
4656 if test $# != 0; then
4657 # We chose a different compiler from the bogus one.
4658 # However, it has the same basename, so the bogon will be chosen
4659 # first if we set CC to just the basename; use the full file name.
4660 shift
4661 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4662 fi
4663 fi
4664 fi
4665 fi
4666 CC=$ac_cv_prog_CC
4667 if test -n "$CC"; then
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4669 $as_echo "$CC" >&6; }
4670 else
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4672 $as_echo "no" >&6; }
4673 fi
4674
4675
4676 fi
4677 if test -z "$CC"; then
4678 if test -n "$ac_tool_prefix"; then
4679 for ac_prog in cl.exe
4680 do
4681 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4682 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684 $as_echo_n "checking for $ac_word... " >&6; }
4685 if ${ac_cv_prog_CC+:} false; then :
4686 $as_echo_n "(cached) " >&6
4687 else
4688 if test -n "$CC"; then
4689 ac_cv_prog_CC="$CC" # Let the user override the test.
4690 else
4691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692 for as_dir in $PATH
4693 do
4694 IFS=$as_save_IFS
4695 test -z "$as_dir" && as_dir=.
4696 for ac_exec_ext in '' $ac_executable_extensions; do
4697 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4698 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4699 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4700 break 2
4701 fi
4702 done
4703 done
4704 IFS=$as_save_IFS
4705
4706 fi
4707 fi
4708 CC=$ac_cv_prog_CC
4709 if test -n "$CC"; then
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4711 $as_echo "$CC" >&6; }
4712 else
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714 $as_echo "no" >&6; }
4715 fi
4716
4717
4718 test -n "$CC" && break
4719 done
4720 fi
4721 if test -z "$CC"; then
4722 ac_ct_CC=$CC
4723 for ac_prog in cl.exe
4724 do
4725 # Extract the first word of "$ac_prog", so it can be a program name with args.
4726 set dummy $ac_prog; ac_word=$2
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4728 $as_echo_n "checking for $ac_word... " >&6; }
4729 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4730 $as_echo_n "(cached) " >&6
4731 else
4732 if test -n "$ac_ct_CC"; then
4733 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4734 else
4735 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4736 for as_dir in $PATH
4737 do
4738 IFS=$as_save_IFS
4739 test -z "$as_dir" && as_dir=.
4740 for ac_exec_ext in '' $ac_executable_extensions; do
4741 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4742 ac_cv_prog_ac_ct_CC="$ac_prog"
4743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4744 break 2
4745 fi
4746 done
4747 done
4748 IFS=$as_save_IFS
4749
4750 fi
4751 fi
4752 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4753 if test -n "$ac_ct_CC"; then
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4755 $as_echo "$ac_ct_CC" >&6; }
4756 else
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4758 $as_echo "no" >&6; }
4759 fi
4760
4761
4762 test -n "$ac_ct_CC" && break
4763 done
4764
4765 if test "x$ac_ct_CC" = x; then
4766 CC=""
4767 else
4768 case $cross_compiling:$ac_tool_warned in
4769 yes:)
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4771 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4772 ac_tool_warned=yes ;;
4773 esac
4774 CC=$ac_ct_CC
4775 fi
4776 fi
4777
4778 fi
4779
4780
4781 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4782 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4783 as_fn_error $? "no acceptable C compiler found in \$PATH
4784 See \`config.log' for more details" "$LINENO" 5; }
4785
4786 # Provide some information about the compiler.
4787 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4788 set X $ac_compile
4789 ac_compiler=$2
4790 for ac_option in --version -v -V -qversion; do
4791 { { ac_try="$ac_compiler $ac_option >&5"
4792 case "(($ac_try" in
4793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4794 *) ac_try_echo=$ac_try;;
4795 esac
4796 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4797 $as_echo "$ac_try_echo"; } >&5
4798 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4799 ac_status=$?
4800 if test -s conftest.err; then
4801 sed '10a\
4802 ... rest of stderr output deleted ...
4803 10q' conftest.err >conftest.er1
4804 cat conftest.er1 >&5
4805 fi
4806 rm -f conftest.er1 conftest.err
4807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4808 test $ac_status = 0; }
4809 done
4810
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4812 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4813 if ${ac_cv_c_compiler_gnu+:} false; then :
4814 $as_echo_n "(cached) " >&6
4815 else
4816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4817 /* end confdefs.h. */
4818
4819 int
4820 main ()
4821 {
4822 #ifndef __GNUC__
4823 choke me
4824 #endif
4825
4826 ;
4827 return 0;
4828 }
4829 _ACEOF
4830 if ac_fn_c_try_compile "$LINENO"; then :
4831 ac_compiler_gnu=yes
4832 else
4833 ac_compiler_gnu=no
4834 fi
4835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4836 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4837
4838 fi
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4840 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4841 if test $ac_compiler_gnu = yes; then
4842 GCC=yes
4843 else
4844 GCC=
4845 fi
4846 ac_test_CFLAGS=${CFLAGS+set}
4847 ac_save_CFLAGS=$CFLAGS
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4849 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4850 if ${ac_cv_prog_cc_g+:} false; then :
4851 $as_echo_n "(cached) " >&6
4852 else
4853 ac_save_c_werror_flag=$ac_c_werror_flag
4854 ac_c_werror_flag=yes
4855 ac_cv_prog_cc_g=no
4856 CFLAGS="-g"
4857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4858 /* end confdefs.h. */
4859
4860 int
4861 main ()
4862 {
4863
4864 ;
4865 return 0;
4866 }
4867 _ACEOF
4868 if ac_fn_c_try_compile "$LINENO"; then :
4869 ac_cv_prog_cc_g=yes
4870 else
4871 CFLAGS=""
4872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4873 /* end confdefs.h. */
4874
4875 int
4876 main ()
4877 {
4878
4879 ;
4880 return 0;
4881 }
4882 _ACEOF
4883 if ac_fn_c_try_compile "$LINENO"; then :
4884
4885 else
4886 ac_c_werror_flag=$ac_save_c_werror_flag
4887 CFLAGS="-g"
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h. */
4890
4891 int
4892 main ()
4893 {
4894
4895 ;
4896 return 0;
4897 }
4898 _ACEOF
4899 if ac_fn_c_try_compile "$LINENO"; then :
4900 ac_cv_prog_cc_g=yes
4901 fi
4902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4903 fi
4904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4905 fi
4906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4907 ac_c_werror_flag=$ac_save_c_werror_flag
4908 fi
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4910 $as_echo "$ac_cv_prog_cc_g" >&6; }
4911 if test "$ac_test_CFLAGS" = set; then
4912 CFLAGS=$ac_save_CFLAGS
4913 elif test $ac_cv_prog_cc_g = yes; then
4914 if test "$GCC" = yes; then
4915 CFLAGS="-g -O2"
4916 else
4917 CFLAGS="-g"
4918 fi
4919 else
4920 if test "$GCC" = yes; then
4921 CFLAGS="-O2"
4922 else
4923 CFLAGS=
4924 fi
4925 fi
4926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4927 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4928 if ${ac_cv_prog_cc_c89+:} false; then :
4929 $as_echo_n "(cached) " >&6
4930 else
4931 ac_cv_prog_cc_c89=no
4932 ac_save_CC=$CC
4933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4934 /* end confdefs.h. */
4935 #include <stdarg.h>
4936 #include <stdio.h>
4937 #include <sys/types.h>
4938 #include <sys/stat.h>
4939 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4940 struct buf { int x; };
4941 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4942 static char *e (p, i)
4943 char **p;
4944 int i;
4945 {
4946 return p[i];
4947 }
4948 static char *f (char * (*g) (char **, int), char **p, ...)
4949 {
4950 char *s;
4951 va_list v;
4952 va_start (v,p);
4953 s = g (p, va_arg (v,int));
4954 va_end (v);
4955 return s;
4956 }
4957
4958 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4959 function prototypes and stuff, but not '\xHH' hex character constants.
4960 These don't provoke an error unfortunately, instead are silently treated
4961 as 'x'. The following induces an error, until -std is added to get
4962 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4963 array size at least. It's necessary to write '\x00'==0 to get something
4964 that's true only with -std. */
4965 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4966
4967 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4968 inside strings and character constants. */
4969 #define FOO(x) 'x'
4970 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4971
4972 int test (int i, double x);
4973 struct s1 {int (*f) (int a);};
4974 struct s2 {int (*f) (double a);};
4975 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4976 int argc;
4977 char **argv;
4978 int
4979 main ()
4980 {
4981 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4982 ;
4983 return 0;
4984 }
4985 _ACEOF
4986 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4987 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4988 do
4989 CC="$ac_save_CC $ac_arg"
4990 if ac_fn_c_try_compile "$LINENO"; then :
4991 ac_cv_prog_cc_c89=$ac_arg
4992 fi
4993 rm -f core conftest.err conftest.$ac_objext
4994 test "x$ac_cv_prog_cc_c89" != "xno" && break
4995 done
4996 rm -f conftest.$ac_ext
4997 CC=$ac_save_CC
4998
4999 fi
5000 # AC_CACHE_VAL
5001 case "x$ac_cv_prog_cc_c89" in
5002 x)
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5004 $as_echo "none needed" >&6; } ;;
5005 xno)
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5007 $as_echo "unsupported" >&6; } ;;
5008 *)
5009 CC="$CC $ac_cv_prog_cc_c89"
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5011 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5012 esac
5013 if test "x$ac_cv_prog_cc_c89" != xno; then :
5014
5015 fi
5016
5017 ac_ext=c
5018 ac_cpp='$CPP $CPPFLAGS'
5019 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5020 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5021 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5022
5023 if test -n "$ac_tool_prefix"; then
5024 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5025 set dummy ${ac_tool_prefix}ar; ac_word=$2
5026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5027 $as_echo_n "checking for $ac_word... " >&6; }
5028 if ${ac_cv_prog_AR+:} false; then :
5029 $as_echo_n "(cached) " >&6
5030 else
5031 if test -n "$AR"; then
5032 ac_cv_prog_AR="$AR" # Let the user override the test.
5033 else
5034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5035 for as_dir in $PATH
5036 do
5037 IFS=$as_save_IFS
5038 test -z "$as_dir" && as_dir=.
5039 for ac_exec_ext in '' $ac_executable_extensions; do
5040 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5041 ac_cv_prog_AR="${ac_tool_prefix}ar"
5042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5043 break 2
5044 fi
5045 done
5046 done
5047 IFS=$as_save_IFS
5048
5049 fi
5050 fi
5051 AR=$ac_cv_prog_AR
5052 if test -n "$AR"; then
5053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5054 $as_echo "$AR" >&6; }
5055 else
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5057 $as_echo "no" >&6; }
5058 fi
5059
5060
5061 fi
5062 if test -z "$ac_cv_prog_AR"; then
5063 ac_ct_AR=$AR
5064 # Extract the first word of "ar", so it can be a program name with args.
5065 set dummy ar; ac_word=$2
5066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067 $as_echo_n "checking for $ac_word... " >&6; }
5068 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5069 $as_echo_n "(cached) " >&6
5070 else
5071 if test -n "$ac_ct_AR"; then
5072 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5073 else
5074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5075 for as_dir in $PATH
5076 do
5077 IFS=$as_save_IFS
5078 test -z "$as_dir" && as_dir=.
5079 for ac_exec_ext in '' $ac_executable_extensions; do
5080 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5081 ac_cv_prog_ac_ct_AR="ar"
5082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5083 break 2
5084 fi
5085 done
5086 done
5087 IFS=$as_save_IFS
5088
5089 fi
5090 fi
5091 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5092 if test -n "$ac_ct_AR"; then
5093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5094 $as_echo "$ac_ct_AR" >&6; }
5095 else
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5097 $as_echo "no" >&6; }
5098 fi
5099
5100 if test "x$ac_ct_AR" = x; then
5101 AR="no"
5102 else
5103 case $cross_compiling:$ac_tool_warned in
5104 yes:)
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5106 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5107 ac_tool_warned=yes ;;
5108 esac
5109 AR=$ac_ct_AR
5110 fi
5111 else
5112 AR="$ac_cv_prog_AR"
5113 fi
5114
5115
5116
5117 # Check for DSSI
5118 ac_ext=c
5119 ac_cpp='$CPP $CPPFLAGS'
5120 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5121 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5122 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5124 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5125 # On Suns, sometimes $CPP names a directory.
5126 if test -n "$CPP" && test -d "$CPP"; then
5127 CPP=
5128 fi
5129 if test -z "$CPP"; then
5130 if ${ac_cv_prog_CPP+:} false; then :
5131 $as_echo_n "(cached) " >&6
5132 else
5133 # Double quotes because CPP needs to be expanded
5134 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5135 do
5136 ac_preproc_ok=false
5137 for ac_c_preproc_warn_flag in '' yes
5138 do
5139 # Use a header file that comes with gcc, so configuring glibc
5140 # with a fresh cross-compiler works.
5141 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5142 # <limits.h> exists even on freestanding compilers.
5143 # On the NeXT, cc -E runs the code through the compiler's parser,
5144 # not just through cpp. "Syntax error" is here to catch this case.
5145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5146 /* end confdefs.h. */
5147 #ifdef __STDC__
5148 # include <limits.h>
5149 #else
5150 # include <assert.h>
5151 #endif
5152 Syntax error
5153 _ACEOF
5154 if ac_fn_c_try_cpp "$LINENO"; then :
5155
5156 else
5157 # Broken: fails on valid input.
5158 continue
5159 fi
5160 rm -f conftest.err conftest.i conftest.$ac_ext
5161
5162 # OK, works on sane cases. Now check whether nonexistent headers
5163 # can be detected and how.
5164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5165 /* end confdefs.h. */
5166 #include <ac_nonexistent.h>
5167 _ACEOF
5168 if ac_fn_c_try_cpp "$LINENO"; then :
5169 # Broken: success on invalid input.
5170 continue
5171 else
5172 # Passes both tests.
5173 ac_preproc_ok=:
5174 break
5175 fi
5176 rm -f conftest.err conftest.i conftest.$ac_ext
5177
5178 done
5179 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5180 rm -f conftest.i conftest.err conftest.$ac_ext
5181 if $ac_preproc_ok; then :
5182 break
5183 fi
5184
5185 done
5186 ac_cv_prog_CPP=$CPP
5187
5188 fi
5189 CPP=$ac_cv_prog_CPP
5190 else
5191 ac_cv_prog_CPP=$CPP
5192 fi
5193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5194 $as_echo "$CPP" >&6; }
5195 ac_preproc_ok=false
5196 for ac_c_preproc_warn_flag in '' yes
5197 do
5198 # Use a header file that comes with gcc, so configuring glibc
5199 # with a fresh cross-compiler works.
5200 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5201 # <limits.h> exists even on freestanding compilers.
5202 # On the NeXT, cc -E runs the code through the compiler's parser,
5203 # not just through cpp. "Syntax error" is here to catch this case.
5204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5205 /* end confdefs.h. */
5206 #ifdef __STDC__
5207 # include <limits.h>
5208 #else
5209 # include <assert.h>
5210 #endif
5211 Syntax error
5212 _ACEOF
5213 if ac_fn_c_try_cpp "$LINENO"; then :
5214
5215 else
5216 # Broken: fails on valid input.
5217 continue
5218 fi
5219 rm -f conftest.err conftest.i conftest.$ac_ext
5220
5221 # OK, works on sane cases. Now check whether nonexistent headers
5222 # can be detected and how.
5223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5224 /* end confdefs.h. */
5225 #include <ac_nonexistent.h>
5226 _ACEOF
5227 if ac_fn_c_try_cpp "$LINENO"; then :
5228 # Broken: success on invalid input.
5229 continue
5230 else
5231 # Passes both tests.
5232 ac_preproc_ok=:
5233 break
5234 fi
5235 rm -f conftest.err conftest.i conftest.$ac_ext
5236
5237 done
5238 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5239 rm -f conftest.i conftest.err conftest.$ac_ext
5240 if $ac_preproc_ok; then :
5241
5242 else
5243 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5244 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5245 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5246 See \`config.log' for more details" "$LINENO" 5; }
5247 fi
5248
5249 ac_ext=c
5250 ac_cpp='$CPP $CPPFLAGS'
5251 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5252 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5253 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5254
5255
5256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5257 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5258 if ${ac_cv_path_GREP+:} false; then :
5259 $as_echo_n "(cached) " >&6
5260 else
5261 if test -z "$GREP"; then
5262 ac_path_GREP_found=false
5263 # Loop through the user's path and test for each of PROGNAME-LIST
5264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5265 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5266 do
5267 IFS=$as_save_IFS
5268 test -z "$as_dir" && as_dir=.
5269 for ac_prog in grep ggrep; do
5270 for ac_exec_ext in '' $ac_executable_extensions; do
5271 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5272 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5273 # Check for GNU ac_path_GREP and select it if it is found.
5274 # Check for GNU $ac_path_GREP
5275 case `"$ac_path_GREP" --version 2>&1` in
5276 *GNU*)
5277 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5278 *)
5279 ac_count=0
5280 $as_echo_n 0123456789 >"conftest.in"
5281 while :
5282 do
5283 cat "conftest.in" "conftest.in" >"conftest.tmp"
5284 mv "conftest.tmp" "conftest.in"
5285 cp "conftest.in" "conftest.nl"
5286 $as_echo 'GREP' >> "conftest.nl"
5287 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5288 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5289 as_fn_arith $ac_count + 1 && ac_count=$as_val
5290 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5291 # Best one so far, save it but keep looking for a better one
5292 ac_cv_path_GREP="$ac_path_GREP"
5293 ac_path_GREP_max=$ac_count
5294 fi
5295 # 10*(2^10) chars as input seems more than enough
5296 test $ac_count -gt 10 && break
5297 done
5298 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5299 esac
5300
5301 $ac_path_GREP_found && break 3
5302 done
5303 done
5304 done
5305 IFS=$as_save_IFS
5306 if test -z "$ac_cv_path_GREP"; then
5307 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5308 fi
5309 else
5310 ac_cv_path_GREP=$GREP
5311 fi
5312
5313 fi
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5315 $as_echo "$ac_cv_path_GREP" >&6; }
5316 GREP="$ac_cv_path_GREP"
5317
5318
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5320 $as_echo_n "checking for egrep... " >&6; }
5321 if ${ac_cv_path_EGREP+:} false; then :
5322 $as_echo_n "(cached) " >&6
5323 else
5324 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5325 then ac_cv_path_EGREP="$GREP -E"
5326 else
5327 if test -z "$EGREP"; then
5328 ac_path_EGREP_found=false
5329 # Loop through the user's path and test for each of PROGNAME-LIST
5330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5331 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5332 do
5333 IFS=$as_save_IFS
5334 test -z "$as_dir" && as_dir=.
5335 for ac_prog in egrep; do
5336 for ac_exec_ext in '' $ac_executable_extensions; do
5337 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5338 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5339 # Check for GNU ac_path_EGREP and select it if it is found.
5340 # Check for GNU $ac_path_EGREP
5341 case `"$ac_path_EGREP" --version 2>&1` in
5342 *GNU*)
5343 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5344 *)
5345 ac_count=0
5346 $as_echo_n 0123456789 >"conftest.in"
5347 while :
5348 do
5349 cat "conftest.in" "conftest.in" >"conftest.tmp"
5350 mv "conftest.tmp" "conftest.in"
5351 cp "conftest.in" "conftest.nl"
5352 $as_echo 'EGREP' >> "conftest.nl"
5353 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5354 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5355 as_fn_arith $ac_count + 1 && ac_count=$as_val
5356 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5357 # Best one so far, save it but keep looking for a better one
5358 ac_cv_path_EGREP="$ac_path_EGREP"
5359 ac_path_EGREP_max=$ac_count
5360 fi
5361 # 10*(2^10) chars as input seems more than enough
5362 test $ac_count -gt 10 && break
5363 done
5364 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5365 esac
5366
5367 $ac_path_EGREP_found && break 3
5368 done
5369 done
5370 done
5371 IFS=$as_save_IFS
5372 if test -z "$ac_cv_path_EGREP"; then
5373 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5374 fi
5375 else
5376 ac_cv_path_EGREP=$EGREP
5377 fi
5378
5379 fi
5380 fi
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5382 $as_echo "$ac_cv_path_EGREP" >&6; }
5383 EGREP="$ac_cv_path_EGREP"
5384
5385
5386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5387 $as_echo_n "checking for ANSI C header files... " >&6; }
5388 if ${ac_cv_header_stdc+:} false; then :
5389 $as_echo_n "(cached) " >&6
5390 else
5391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5392 /* end confdefs.h. */
5393 #include <stdlib.h>
5394 #include <stdarg.h>
5395 #include <string.h>
5396 #include <float.h>
5397
5398 int
5399 main ()
5400 {
5401
5402 ;
5403 return 0;
5404 }
5405 _ACEOF
5406 if ac_fn_c_try_compile "$LINENO"; then :
5407 ac_cv_header_stdc=yes
5408 else
5409 ac_cv_header_stdc=no
5410 fi
5411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5412
5413 if test $ac_cv_header_stdc = yes; then
5414 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5416 /* end confdefs.h. */
5417 #include <string.h>
5418
5419 _ACEOF
5420 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5421 $EGREP "memchr" >/dev/null 2>&1; then :
5422
5423 else
5424 ac_cv_header_stdc=no
5425 fi
5426 rm -f conftest*
5427
5428 fi
5429
5430 if test $ac_cv_header_stdc = yes; then
5431 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5433 /* end confdefs.h. */
5434 #include <stdlib.h>
5435
5436 _ACEOF
5437 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5438 $EGREP "free" >/dev/null 2>&1; then :
5439
5440 else
5441 ac_cv_header_stdc=no
5442 fi
5443 rm -f conftest*
5444
5445 fi
5446
5447 if test $ac_cv_header_stdc = yes; then
5448 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5449 if test "$cross_compiling" = yes; then :
5450 :
5451 else
5452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5453 /* end confdefs.h. */
5454 #include <ctype.h>
5455 #include <stdlib.h>
5456 #if ((' ' & 0x0FF) == 0x020)
5457 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5458 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5459 #else
5460 # define ISLOWER(c) \
5461 (('a' <= (c) && (c) <= 'i') \
5462 || ('j' <= (c) && (c) <= 'r') \
5463 || ('s' <= (c) && (c) <= 'z'))
5464 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5465 #endif
5466
5467 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5468 int
5469 main ()
5470 {
5471 int i;
5472 for (i = 0; i < 256; i++)
5473 if (XOR (islower (i), ISLOWER (i))
5474 || toupper (i) != TOUPPER (i))
5475 return 2;
5476 return 0;
5477 }
5478 _ACEOF
5479 if ac_fn_c_try_run "$LINENO"; then :
5480
5481 else
5482 ac_cv_header_stdc=no
5483 fi
5484 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5485 conftest.$ac_objext conftest.beam conftest.$ac_ext
5486 fi
5487
5488 fi
5489 fi
5490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5491 $as_echo "$ac_cv_header_stdc" >&6; }
5492 if test $ac_cv_header_stdc = yes; then
5493
5494 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5495
5496 fi
5497
5498 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5499 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5500 inttypes.h stdint.h unistd.h
5501 do :
5502 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5503 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5504 "
5505 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5506 cat >>confdefs.h <<_ACEOF
5507 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5508 _ACEOF
5509
5510 fi
5511
5512 done
5513
5514
5515 for ac_header in dssi.h
5516 do :
5517 ac_fn_c_check_header_mongrel "$LINENO" "dssi.h" "ac_cv_header_dssi_h" "$ac_includes_default"
5518 if test "x$ac_cv_header_dssi_h" = xyes; then :
5519 cat >>confdefs.h <<_ACEOF
5520 #define HAVE_DSSI_H 1
5521 _ACEOF
5522 ac_have_dssi="yes"
5523 fi
5524
5525 done
5526
5527 if test "$ac_have_dssi" != "yes"; then
5528 as_fn_error $? "DSSI headers not found." "$LINENO" 5
5529 fi
5530
5531 # Check for LADSPA
5532
5533 # Check whether --with-ladspa-dir was given.
5534 if test "${with_ladspa_dir+set}" = set; then :
5535 withval=$with_ladspa_dir;
5536 fi
5537
5538 if test -z "$with_ladspa_dir"; then
5539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ocaml-ladspa" >&5
5540 $as_echo_n "checking for ocaml-ladspa... " >&6; }
5541 if ($OCAMLFIND query ladspa > /dev/null 2>&1); then
5542 OCAMLLADSPA_INC=`$OCAMLFIND query ladspa`
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
5544 $as_echo "ok" >&6; }
5545 else
5546 as_fn_error $? "not found." "$LINENO" 5
5547 fi
5548 else
5549 echo $with_ladspa_dir | grep ^/ > /dev/null 2>&1 \
5550 || with_ladspa_dir=$PWD/$with_ladspa_dir
5551 OCAMLLADSPA_INC="$with_ladspa_dir"
5552 fi
5553
5554 CFLAGS="-I$OCAMLLADSPA_INC $CFLAGS"
5555 for ac_header in ocaml_ladspa.h
5556 do :
5557 ac_fn_c_check_header_mongrel "$LINENO" "ocaml_ladspa.h" "ac_cv_header_ocaml_ladspa_h" "$ac_includes_default"
5558 if test "x$ac_cv_header_ocaml_ladspa_h" = xyes; then :
5559 cat >>confdefs.h <<_ACEOF
5560 #define HAVE_OCAML_LADSPA_H 1
5561 _ACEOF
5562 ac_have_ladspa="yes"
5563 fi
5564
5565 done
5566
5567 if test "$ac_have_ladspa" != "yes"; then
5568 as_fn_error $? "ocaml-ladspa headers not found." "$LINENO" 5
5569 fi
5570
5571 # substitutions to perform
5572
5573
5574 ALL_INC="`ocamlfind query -r -separator " " $requires` $INC"
5575
5576
5577 all_requires="`ocamlfind query -r -separator " " -format "%p" $requires`"
5578
5579
5580 # Finally create the Makefile and samples
5581 ac_config_files="$ac_config_files Makefile"
5582
5583 ac_config_files="$ac_config_files src/META"
5584
5585 ac_config_files="$ac_config_files src/Makefile"
5586
5587 cat >confcache <<\_ACEOF
5588 # This file is a shell script that caches the results of configure
5589 # tests run on this system so they can be shared between configure
5590 # scripts and configure runs, see configure's option --config-cache.
5591 # It is not useful on other systems. If it contains results you don't
5592 # want to keep, you may remove or edit it.
5593 #
5594 # config.status only pays attention to the cache file if you give it
5595 # the --recheck option to rerun configure.
5596 #
5597 # `ac_cv_env_foo' variables (set or unset) will be overridden when
5598 # loading this file, other *unset* `ac_cv_foo' will be assigned the
5599 # following values.
5600
5601 _ACEOF
5602
5603 # The following way of writing the cache mishandles newlines in values,
5604 # but we know of no workaround that is simple, portable, and efficient.
5605 # So, we kill variables containing newlines.
5606 # Ultrix sh set writes to stderr and can't be redirected directly,
5607 # and sets the high bit in the cache file unless we assign to the vars.
5608 (
5609 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
5610 eval ac_val=\$$ac_var
5611 case $ac_val in #(
5612 *${as_nl}*)
5613 case $ac_var in #(
5614 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
5615 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
5616 esac
5617 case $ac_var in #(
5618 _ | IFS | as_nl) ;; #(
5619 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
5620 *) { eval $ac_var=; unset $ac_var;} ;;
5621 esac ;;
5622 esac
5623 done
5624
5625 (set) 2>&1 |
5626 case $as_nl`(ac_space=' '; set) 2>&1` in #(
5627 *${as_nl}ac_space=\ *)
5628 # `set' does not quote correctly, so add quotes: double-quote
5629 # substitution turns \\\\ into \\, and sed turns \\ into \.
5630 sed -n \
5631 "s/'/'\\\\''/g;
5632 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5633 ;; #(
5634 *)
5635 # `set' quotes correctly as required by POSIX, so do not add quotes.
5636 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
5637 ;;
5638 esac |
5639 sort
5640 ) |
5641 sed '
5642 /^ac_cv_env_/b end
5643 t clear
5644 :clear
5645 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
5646 t end
5647 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
5648 :end' >>confcache
5649 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
5650 if test -w "$cache_file"; then
5651 if test "x$cache_file" != "x/dev/null"; then
5652 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
5653 $as_echo "$as_me: updating cache $cache_file" >&6;}
5654 if test ! -f "$cache_file" || test -h "$cache_file"; then
5655 cat confcache >"$cache_file"
5656 else
5657 case $cache_file in #(
5658 */* | ?:*)
5659 mv -f confcache "$cache_file"$$ &&
5660 mv -f "$cache_file"$$ "$cache_file" ;; #(
5661 *)
5662 mv -f confcache "$cache_file" ;;
5663 esac
5664 fi
5665 fi
5666 else
5667 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
5668 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
5669 fi
5670 fi
5671 rm -f confcache
5672
5673 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5674 # Let make expand exec_prefix.
5675 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5676
5677 # Transform confdefs.h into DEFS.
5678 # Protect against shell expansion while executing Makefile rules.
5679 # Protect against Makefile macro expansion.
5680 #
5681 # If the first sed substitution is executed (which looks for macros that
5682 # take arguments), then branch to the quote section. Otherwise,
5683 # look for a macro that doesn't take arguments.
5684 ac_script='
5685 :mline
5686 /\\$/{
5687 N
5688 s,\\\n,,
5689 b mline
5690 }
5691 t clear
5692 :clear
5693 s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
5694 t quote
5695 s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
5696 t quote
5697 b any
5698 :quote
5699 s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
5700 s/\[/\\&/g
5701 s/\]/\\&/g
5702 s/\$/$$/g
5703 H
5704 :any
5705 ${
5706 g
5707 s/^\n//
5708 s/\n/ /g
5709 p
5710 }
5711 '
5712 DEFS=`sed -n "$ac_script" confdefs.h`
5713
5714
5715 ac_libobjs=
5716 ac_ltlibobjs=
5717 U=
5718 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
5719 # 1. Remove the extension, and $U if already installed.
5720 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
5721 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
5722 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
5723 # will be set to the directory where LIBOBJS objects are built.
5724 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
5725 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
5726 done
5727 LIBOBJS=$ac_libobjs
5728
5729 LTLIBOBJS=$ac_ltlibobjs
5730
5731
5732
5733 : "${CONFIG_STATUS=./config.status}"
5734 ac_write_fail=0
5735 ac_clean_files_save=$ac_clean_files
5736 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
5738 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
5739 as_write_fail=0
5740 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
5741 #! $SHELL
5742 # Generated by $as_me.
5743 # Run this file to recreate the current configuration.
5744 # Compiler output produced by configure, useful for debugging
5745 # configure, is in config.log if it exists.
5746
5747 debug=false
5748 ac_cs_recheck=false
5749 ac_cs_silent=false
5750
5751 SHELL=\${CONFIG_SHELL-$SHELL}
5752 export SHELL
5753 _ASEOF
5754 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
5755 ## -------------------- ##
5756 ## M4sh Initialization. ##
5757 ## -------------------- ##
5758
5759 # Be more Bourne compatible
5760 DUALCASE=1; export DUALCASE # for MKS sh
5761 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
5762 emulate sh
5763 NULLCMD=:
5764 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
5765 # is contrary to our usage. Disable this feature.
5766 alias -g '${1+"$@"}'='"$@"'
5767 setopt NO_GLOB_SUBST
5768 else
5769 case `(set -o) 2>/dev/null` in #(
5770 *posix*) :
5771 set -o posix ;; #(
5772 *) :
5773 ;;
5774 esac
5775 fi
5776
5777
5778 as_nl='
5779 '
5780 export as_nl
5781 # Printing a long string crashes Solaris 7 /usr/bin/printf.
5782 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
5783 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
5784 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
5785 # Prefer a ksh shell builtin over an external printf program on Solaris,
5786 # but without wasting forks for bash or zsh.
5787 if test -z "$BASH_VERSION$ZSH_VERSION" \
5788 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
5789 as_echo='print -r --'
5790 as_echo_n='print -rn --'
5791 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
5792 as_echo='printf %s\n'
5793 as_echo_n='printf %s'
5794 else
5795 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
5796 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
5797 as_echo_n='/usr/ucb/echo -n'
5798 else
5799 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
5800 as_echo_n_body='eval
5801 arg=$1;
5802 case $arg in #(
5803 *"$as_nl"*)
5804 expr "X$arg" : "X\\(.*\\)$as_nl";
5805 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
5806 esac;
5807 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
5808 '
5809 export as_echo_n_body
5810 as_echo_n='sh -c $as_echo_n_body as_echo'
5811 fi
5812 export as_echo_body
5813 as_echo='sh -c $as_echo_body as_echo'
5814 fi
5815
5816 # The user is always right.
5817 if test "${PATH_SEPARATOR+set}" != set; then
5818 PATH_SEPARATOR=:
5819 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
5820 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
5821 PATH_SEPARATOR=';'
5822 }
5823 fi
5824
5825
5826 # IFS
5827 # We need space, tab and new line, in precisely that order. Quoting is
5828 # there to prevent editors from complaining about space-tab.
5829 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
5830 # splitting by setting IFS to empty value.)
5831 IFS=" "" $as_nl"
5832
5833 # Find who we are. Look in the path if we contain no directory separator.
5834 as_myself=
5835 case $0 in #((
5836 *[\\/]* ) as_myself=$0 ;;
5837 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838 for as_dir in $PATH
5839 do
5840 IFS=$as_save_IFS
5841 test -z "$as_dir" && as_dir=.
5842 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
5843 done
5844 IFS=$as_save_IFS
5845
5846 ;;
5847 esac
5848 # We did not find ourselves, most probably we were run as `sh COMMAND'
5849 # in which case we are not to be found in the path.
5850 if test "x$as_myself" = x; then
5851 as_myself=$0
5852 fi
5853 if test ! -f "$as_myself"; then
5854 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
5855 exit 1
5856 fi
5857
5858 # Unset variables that we do not need and which cause bugs (e.g. in
5859 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
5860 # suppresses any "Segmentation fault" message there. '((' could
5861 # trigger a bug in pdksh 5.2.14.
5862 for as_var in BASH_ENV ENV MAIL MAILPATH
5863 do eval test x\${$as_var+set} = xset \
5864 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
5865 done
5866 PS1='$ '
5867 PS2='> '
5868 PS4='+ '
5869
5870 # NLS nuisances.
5871 LC_ALL=C
5872 export LC_ALL
5873 LANGUAGE=C
5874 export LANGUAGE
5875
5876 # CDPATH.
5877 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5878
5879
5880 # as_fn_error STATUS ERROR [LINENO LOG_FD]
5881 # ----------------------------------------
5882 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
5883 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
5884 # script with STATUS, using 1 if that was 0.
5885 as_fn_error ()
5886 {
5887 as_status=$1; test $as_status -eq 0 && as_status=1
5888 if test "$4"; then
5889 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5890 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
5891 fi
5892 $as_echo "$as_me: error: $2" >&2
5893 as_fn_exit $as_status
5894 } # as_fn_error
5895
5896
5897 # as_fn_set_status STATUS
5898 # -----------------------
5899 # Set $? to STATUS, without forking.
5900 as_fn_set_status ()
5901 {
5902 return $1
5903 } # as_fn_set_status
5904
5905 # as_fn_exit STATUS
5906 # -----------------
5907 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
5908 as_fn_exit ()
5909 {
5910 set +e
5911 as_fn_set_status $1
5912 exit $1
5913 } # as_fn_exit
5914
5915 # as_fn_unset VAR
5916 # ---------------
5917 # Portably unset VAR.
5918 as_fn_unset ()
5919 {
5920 { eval $1=; unset $1;}
5921 }
5922 as_unset=as_fn_unset
5923 # as_fn_append VAR VALUE
5924 # ----------------------
5925 # Append the text in VALUE to the end of the definition contained in VAR. Take
5926 # advantage of any shell optimizations that allow amortized linear growth over
5927 # repeated appends, instead of the typical quadratic growth present in naive
5928 # implementations.
5929 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
5930 eval 'as_fn_append ()
5931 {
5932 eval $1+=\$2
5933 }'
5934 else
5935 as_fn_append ()
5936 {
5937 eval $1=\$$1\$2
5938 }
5939 fi # as_fn_append
5940
5941 # as_fn_arith ARG...
5942 # ------------------
5943 # Perform arithmetic evaluation on the ARGs, and store the result in the
5944 # global $as_val. Take advantage of shells that can avoid forks. The arguments
5945 # must be portable across $(()) and expr.
5946 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
5947 eval 'as_fn_arith ()
5948 {
5949 as_val=$(( $* ))
5950 }'
5951 else
5952 as_fn_arith ()
5953 {
5954 as_val=`expr "$@" || test $? -eq 1`
5955 }
5956 fi # as_fn_arith
5957
5958
5959 if expr a : '\(a\)' >/dev/null 2>&1 &&
5960 test "X`expr 00001 : '.*\(...\)'`" = X001; then
5961 as_expr=expr
5962 else
5963 as_expr=false
5964 fi
5965
5966 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
5967 as_basename=basename
5968 else
5969 as_basename=false
5970 fi
5971
5972 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
5973 as_dirname=dirname
5974 else
5975 as_dirname=false
5976 fi
5977
5978 as_me=`$as_basename -- "$0" ||
5979 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
5980 X"$0" : 'X\(//\)$' \| \
5981 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
5982 $as_echo X/"$0" |
5983 sed '/^.*\/\([^/][^/]*\)\/*$/{
5984 s//\1/
5985 q
5986 }
5987 /^X\/\(\/\/\)$/{
5988 s//\1/
5989 q
5990 }
5991 /^X\/\(\/\).*/{
5992 s//\1/
5993 q
5994 }
5995 s/.*/./; q'`
5996
5997 # Avoid depending upon Character Ranges.
5998 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
5999 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
6000 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
6001 as_cr_digits='0123456789'
6002 as_cr_alnum=$as_cr_Letters$as_cr_digits
6003
6004 ECHO_C= ECHO_N= ECHO_T=
6005 case `echo -n x` in #(((((
6006 -n*)
6007 case `echo 'xy\c'` in
6008 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
6009 xy) ECHO_C='\c';;
6010 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
6011 ECHO_T=' ';;
6012 esac;;
6013 *)
6014 ECHO_N='-n';;
6015 esac
6016
6017 rm -f conf$$ conf$$.exe conf$$.file
6018 if test -d conf$$.dir; then
6019 rm -f conf$$.dir/conf$$.file
6020 else
6021 rm -f conf$$.dir
6022 mkdir conf$$.dir 2>/dev/null
6023 fi
6024 if (echo >conf$$.file) 2>/dev/null; then
6025 if ln -s conf$$.file conf$$ 2>/dev/null; then
6026 as_ln_s='ln -s'
6027 # ... but there are two gotchas:
6028 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
6029 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
6030 # In both cases, we have to default to `cp -p'.
6031 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
6032 as_ln_s='cp -p'
6033 elif ln conf$$.file conf$$ 2>/dev/null; then
6034 as_ln_s=ln
6035 else
6036 as_ln_s='cp -p'
6037 fi
6038 else
6039 as_ln_s='cp -p'
6040 fi
6041 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
6042 rmdir conf$$.dir 2>/dev/null
6043
6044
6045 # as_fn_mkdir_p
6046 # -------------
6047 # Create "$as_dir" as a directory, including parents if necessary.
6048 as_fn_mkdir_p ()
6049 {
6050
6051 case $as_dir in #(
6052 -*) as_dir=./$as_dir;;
6053 esac
6054 test -d "$as_dir" || eval $as_mkdir_p || {
6055 as_dirs=
6056 while :; do
6057 case $as_dir in #(
6058 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
6059 *) as_qdir=$as_dir;;
6060 esac
6061 as_dirs="'$as_qdir' $as_dirs"
6062 as_dir=`$as_dirname -- "$as_dir" ||
6063 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6064 X"$as_dir" : 'X\(//\)[^/]' \| \
6065 X"$as_dir" : 'X\(//\)$' \| \
6066 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6067 $as_echo X"$as_dir" |
6068 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
6069 s//\1/
6070 q
6071 }
6072 /^X\(\/\/\)[^/].*/{
6073 s//\1/
6074 q
6075 }
6076 /^X\(\/\/\)$/{
6077 s//\1/
6078 q
6079 }
6080 /^X\(\/\).*/{
6081 s//\1/
6082 q
6083 }
6084 s/.*/./; q'`
6085 test -d "$as_dir" && break
6086 done
6087 test -z "$as_dirs" || eval "mkdir $as_dirs"
6088 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
6089
6090
6091 } # as_fn_mkdir_p
6092 if mkdir -p . 2>/dev/null; then
6093 as_mkdir_p='mkdir -p "$as_dir"'
6094 else
6095 test -d ./-p && rmdir ./-p
6096 as_mkdir_p=false
6097 fi
6098
6099 if test -x / >/dev/null 2>&1; then
6100 as_test_x='test -x'
6101 else
6102 if ls -dL / >/dev/null 2>&1; then
6103 as_ls_L_option=L
6104 else
6105 as_ls_L_option=
6106 fi
6107 as_test_x='
6108 eval sh -c '\''
6109 if test -d "$1"; then
6110 test -d "$1/.";
6111 else
6112 case $1 in #(
6113 -*)set "./$1";;
6114 esac;
6115 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
6116 ???[sx]*):;;*)false;;esac;fi
6117 '\'' sh
6118 '
6119 fi
6120 as_executable_p=$as_test_x
6121
6122 # Sed expression to map a string onto a valid CPP name.
6123 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
6124
6125 # Sed expression to map a string onto a valid variable name.
6126 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
6127
6128
6129 exec 6>&1
6130 ## ----------------------------------- ##
6131 ## Main body of $CONFIG_STATUS script. ##
6132 ## ----------------------------------- ##
6133 _ASEOF
6134 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
6135
6136 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6137 # Save the log message, to keep $0 and so on meaningful, and to
6138 # report actual input values of CONFIG_FILES etc. instead of their
6139 # values after options handling.
6140 ac_log="
6141 This file was extended by ocaml-dssi $as_me 0.1.0, which was
6142 generated by GNU Autoconf 2.68. Invocation command line was
6143
6144 CONFIG_FILES = $CONFIG_FILES
6145 CONFIG_HEADERS = $CONFIG_HEADERS
6146 CONFIG_LINKS = $CONFIG_LINKS
6147 CONFIG_COMMANDS = $CONFIG_COMMANDS
6148 $ $0 $@
6149
6150 on `(hostname || uname -n) 2>/dev/null | sed 1q`
6151 "
6152
6153 _ACEOF
6154
6155 case $ac_config_files in *"
6156 "*) set x $ac_config_files; shift; ac_config_files=$*;;
6157 esac
6158
6159
6160
6161 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
6162 # Files that config.status was made for.
6163 config_files="$ac_config_files"
6164
6165 _ACEOF
6166
6167 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6168 ac_cs_usage="\
6169 \`$as_me' instantiates files and other configuration actions
6170 from templates according to the current configuration. Unless the files
6171 and actions are specified as TAGs, all are instantiated by default.
6172
6173 Usage: $0 [OPTION]... [TAG]...
6174
6175 -h, --help print this help, then exit
6176 -V, --version print version number and configuration settings, then exit
6177 --config print configuration, then exit
6178 -q, --quiet, --silent
6179 do not print progress messages
6180 -d, --debug don't remove temporary files
6181 --recheck update $as_me by reconfiguring in the same conditions
6182 --file=FILE[:TEMPLATE]
6183 instantiate the configuration file FILE
6184
6185 Configuration files:
6186 $config_files
6187
6188 Report bugs to <savonet-users@lists.sourceforge.net>."
6189
6190 _ACEOF
6191 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
6192 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
6193 ac_cs_version="\\
6194 ocaml-dssi config.status 0.1.0
6195 configured by $0, generated by GNU Autoconf 2.68,
6196 with options \\"\$ac_cs_config\\"
6197
6198 Copyright (C) 2010 Free Software Foundation, Inc.
6199 This config.status script is free software; the Free Software Foundation
6200 gives unlimited permission to copy, distribute and modify it."
6201
6202 ac_pwd='$ac_pwd'
6203 srcdir='$srcdir'
6204 test -n "\$AWK" || AWK=awk
6205 _ACEOF
6206
6207 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6208 # The default lists apply if the user does not specify any file.
6209 ac_need_defaults=:
6210 while test $# != 0
6211 do
6212 case $1 in
6213 --*=?*)
6214 ac_option=`expr "X$1" : 'X\([^=]*\)='`
6215 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6216 ac_shift=:
6217 ;;
6218 --*=)
6219 ac_option=`expr "X$1" : 'X\([^=]*\)='`
6220 ac_optarg=
6221 ac_shift=:
6222 ;;
6223 *)
6224 ac_option=$1
6225 ac_optarg=$2
6226 ac_shift=shift
6227 ;;
6228 esac
6229
6230 case $ac_option in
6231 # Handling of the options.
6232 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6233 ac_cs_recheck=: ;;
6234 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
6235 $as_echo "$ac_cs_version"; exit ;;
6236 --config | --confi | --conf | --con | --co | --c )
6237 $as_echo "$ac_cs_config"; exit ;;
6238 --debug | --debu | --deb | --de | --d | -d )
6239 debug=: ;;
6240 --file | --fil | --fi | --f )
6241 $ac_shift
6242 case $ac_optarg in
6243 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
6244 '') as_fn_error $? "missing file argument" ;;
6245 esac
6246 as_fn_append CONFIG_FILES " '$ac_optarg'"
6247 ac_need_defaults=false;;
6248 --he | --h | --help | --hel | -h )
6249 $as_echo "$ac_cs_usage"; exit ;;
6250 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
6251 | -silent | --silent | --silen | --sile | --sil | --si | --s)
6252 ac_cs_silent=: ;;
6253
6254 # This is an error.
6255 -*) as_fn_error $? "unrecognized option: \`$1'
6256 Try \`$0 --help' for more information." ;;
6257
6258 *) as_fn_append ac_config_targets " $1"
6259 ac_need_defaults=false ;;
6260
6261 esac
6262 shift
6263 done
6264
6265 ac_configure_extra_args=
6266
6267 if $ac_cs_silent; then
6268 exec 6>/dev/null
6269 ac_configure_extra_args="$ac_configure_extra_args --silent"
6270 fi
6271
6272 _ACEOF
6273 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
6274 if \$ac_cs_recheck; then
6275 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
6276 shift
6277 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
6278 CONFIG_SHELL='$SHELL'
6279 export CONFIG_SHELL
6280 exec "\$@"
6281 fi
6282
6283 _ACEOF
6284 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6285 exec 5>>config.log
6286 {
6287 echo
6288 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
6289 ## Running $as_me. ##
6290 _ASBOX
6291 $as_echo "$ac_log"
6292 } >&5
6293
6294 _ACEOF
6295 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
6296 _ACEOF
6297
6298 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6299
6300 # Handling of arguments.
6301 for ac_config_target in $ac_config_targets
6302 do
6303 case $ac_config_target in
6304 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
6305 "src/META") CONFIG_FILES="$CONFIG_FILES src/META" ;;
6306 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
6307
6308 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
6309 esac
6310 done
6311
6312
6313 # If the user did not use the arguments to specify the items to instantiate,
6314 # then the envvar interface is used. Set only those that are not.
6315 # We use the long form for the default assignment because of an extremely
6316 # bizarre bug on SunOS 4.1.3.
6317 if $ac_need_defaults; then
6318 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
6319 fi
6320
6321 # Have a temporary directory for convenience. Make it in the build tree
6322 # simply because there is no reason against having it here, and in addition,
6323 # creating and moving files from /tmp can sometimes cause problems.
6324 # Hook for its removal unless debugging.
6325 # Note that there is a small window in which the directory will not be cleaned:
6326 # after its creation but before its name has been assigned to `$tmp'.
6327 $debug ||
6328 {
6329 tmp= ac_tmp=
6330 trap 'exit_status=$?
6331 : "${ac_tmp:=$tmp}"
6332 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
6333 ' 0
6334 trap 'as_fn_exit 1' 1 2 13 15
6335 }
6336 # Create a (secure) tmp directory for tmp files.
6337
6338 {
6339 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
6340 test -d "$tmp"
6341 } ||
6342 {
6343 tmp=./conf$$-$RANDOM
6344 (umask 077 && mkdir "$tmp")
6345 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
6346 ac_tmp=$tmp
6347
6348 # Set up the scripts for CONFIG_FILES section.
6349 # No need to generate them if there are no CONFIG_FILES.
6350 # This happens for instance with `./config.status config.h'.
6351 if test -n "$CONFIG_FILES"; then
6352
6353
6354 ac_cr=`echo X | tr X '\015'`
6355 # On cygwin, bash can eat \r inside `` if the user requested igncr.
6356 # But we know of no other shell where ac_cr would be empty at this
6357 # point, so we can use a bashism as a fallback.
6358 if test "x$ac_cr" = x; then
6359 eval ac_cr=\$\'\\r\'
6360 fi
6361 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
6362 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
6363 ac_cs_awk_cr='\\r'
6364 else
6365 ac_cs_awk_cr=$ac_cr
6366 fi
6367
6368 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
6369 _ACEOF
6370
6371
6372 {
6373 echo "cat >conf$$subs.awk <<_ACEOF" &&
6374 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
6375 echo "_ACEOF"
6376 } >conf$$subs.sh ||
6377 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
6378 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
6379 ac_delim='%!_!# '
6380 for ac_last_try in false false false false false :; do
6381 . ./conf$$subs.sh ||
6382 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
6383
6384 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
6385 if test $ac_delim_n = $ac_delim_num; then
6386 break
6387 elif $ac_last_try; then
6388 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
6389 else
6390 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
6391 fi
6392 done
6393 rm -f conf$$subs.sh
6394
6395 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
6396 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
6397 _ACEOF
6398 sed -n '
6399 h
6400 s/^/S["/; s/!.*/"]=/
6401 p
6402 g
6403 s/^[^!]*!//
6404 :repl
6405 t repl
6406 s/'"$ac_delim"'$//
6407 t delim
6408 :nl
6409 h
6410 s/\(.\{148\}\)..*/\1/
6411 t more1
6412 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
6413 p
6414 n
6415 b repl
6416 :more1
6417 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
6418 p
6419 g
6420 s/.\{148\}//
6421 t nl
6422 :delim
6423 h
6424 s/\(.\{148\}\)..*/\1/
6425 t more2
6426 s/["\\]/\\&/g; s/^/"/; s/$/"/
6427 p
6428 b
6429 :more2
6430 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
6431 p
6432 g
6433 s/.\{148\}//
6434 t delim
6435 ' <conf$$subs.awk | sed '
6436 /^[^""]/{
6437 N
6438 s/\n//
6439 }
6440 ' >>$CONFIG_STATUS || ac_write_fail=1
6441 rm -f conf$$subs.awk
6442 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
6443 _ACAWK
6444 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
6445 for (key in S) S_is_set[key] = 1
6446 FS = ""
6447
6448 }
6449 {
6450 line = $ 0
6451 nfields = split(line, field, "@")
6452 substed = 0
6453 len = length(field[1])
6454 for (i = 2; i < nfields; i++) {
6455 key = field[i]
6456 keylen = length(key)
6457 if (S_is_set[key]) {
6458 value = S[key]
6459 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
6460 len += length(value) + length(field[++i])
6461 substed = 1
6462 } else
6463 len += 1 + keylen
6464 }
6465
6466 print line
6467 }
6468
6469 _ACAWK
6470 _ACEOF
6471 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6472 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
6473 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
6474 else
6475 cat
6476 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
6477 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
6478 _ACEOF
6479
6480 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
6481 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
6482 # trailing colons and then remove the whole line if VPATH becomes empty
6483 # (actually we leave an empty line to preserve line numbers).
6484 if test "x$srcdir" = x.; then
6485 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
6486 h
6487 s///
6488 s/^/:/
6489 s/[ ]*$/:/
6490 s/:\$(srcdir):/:/g
6491 s/:\${srcdir}:/:/g
6492 s/:@srcdir@:/:/g
6493 s/^:*//
6494 s/:*$//
6495 x
6496 s/\(=[ ]*\).*/\1/
6497 G
6498 s/\n//
6499 s/^[^=]*=[ ]*$//
6500 }'
6501 fi
6502
6503 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6504 fi # test -n "$CONFIG_FILES"
6505
6506
6507 eval set X " :F $CONFIG_FILES "
6508 shift
6509 for ac_tag
6510 do
6511 case $ac_tag in
6512 :[FHLC]) ac_mode=$ac_tag; continue;;
6513 esac
6514 case $ac_mode$ac_tag in
6515 :[FHL]*:*);;
6516 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
6517 :[FH]-) ac_tag=-:-;;
6518 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
6519 esac
6520 ac_save_IFS=$IFS
6521 IFS=:
6522 set x $ac_tag
6523 IFS=$ac_save_IFS
6524 shift
6525 ac_file=$1
6526 shift
6527
6528 case $ac_mode in
6529 :L) ac_source=$1;;
6530 :[FH])
6531 ac_file_inputs=
6532 for ac_f
6533 do
6534 case $ac_f in
6535 -) ac_f="$ac_tmp/stdin";;
6536 *) # Look for the file first in the build tree, then in the source tree
6537 # (if the path is not absolute). The absolute path cannot be DOS-style,
6538 # because $ac_f cannot contain `:'.
6539 test -f "$ac_f" ||
6540 case $ac_f in
6541 [\\/$]*) false;;
6542 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
6543 esac ||
6544 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
6545 esac
6546 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
6547 as_fn_append ac_file_inputs " '$ac_f'"
6548 done
6549
6550 # Let's still pretend it is `configure' which instantiates (i.e., don't
6551 # use $as_me), people would be surprised to read:
6552 # /* config.h. Generated by config.status. */
6553 configure_input='Generated from '`
6554 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
6555 `' by configure.'
6556 if test x"$ac_file" != x-; then
6557 configure_input="$ac_file. $configure_input"
6558 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
6559 $as_echo "$as_me: creating $ac_file" >&6;}
6560 fi
6561 # Neutralize special characters interpreted by sed in replacement strings.
6562 case $configure_input in #(
6563 *\&* | *\|* | *\\* )
6564 ac_sed_conf_input=`$as_echo "$configure_input" |
6565 sed 's/[\\\\&|]/\\\\&/g'`;; #(
6566 *) ac_sed_conf_input=$configure_input;;
6567 esac
6568
6569 case $ac_tag in
6570 *:-:* | *:-) cat >"$ac_tmp/stdin" \
6571 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
6572 esac
6573 ;;
6574 esac
6575
6576 ac_dir=`$as_dirname -- "$ac_file" ||
6577 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6578 X"$ac_file" : 'X\(//\)[^/]' \| \
6579 X"$ac_file" : 'X\(//\)$' \| \
6580 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
6581 $as_echo X"$ac_file" |
6582 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
6583 s//\1/
6584 q
6585 }
6586 /^X\(\/\/\)[^/].*/{
6587 s//\1/
6588 q
6589 }
6590 /^X\(\/\/\)$/{
6591 s//\1/
6592 q
6593 }
6594 /^X\(\/\).*/{
6595 s//\1/
6596 q
6597 }
6598 s/.*/./; q'`
6599 as_dir="$ac_dir"; as_fn_mkdir_p
6600 ac_builddir=.
6601
6602 case "$ac_dir" in
6603 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
6604 *)
6605 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
6606 # A ".." for each directory in $ac_dir_suffix.
6607 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
6608 case $ac_top_builddir_sub in
6609 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
6610 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
6611 esac ;;
6612 esac
6613 ac_abs_top_builddir=$ac_pwd
6614 ac_abs_builddir=$ac_pwd$ac_dir_suffix
6615 # for backward compatibility:
6616 ac_top_builddir=$ac_top_build_prefix
6617
6618 case $srcdir in
6619 .) # We are building in place.
6620 ac_srcdir=.
6621 ac_top_srcdir=$ac_top_builddir_sub
6622 ac_abs_top_srcdir=$ac_pwd ;;
6623 [\\/]* | ?:[\\/]* ) # Absolute name.
6624 ac_srcdir=$srcdir$ac_dir_suffix;
6625 ac_top_srcdir=$srcdir
6626 ac_abs_top_srcdir=$srcdir ;;
6627 *) # Relative name.
6628 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
6629 ac_top_srcdir=$ac_top_build_prefix$srcdir
6630 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
6631 esac
6632 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
6633
6634
6635 case $ac_mode in
6636 :F)
6637 #
6638 # CONFIG_FILE
6639 #
6640
6641 _ACEOF
6642
6643 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6644 # If the template does not know about datarootdir, expand it.
6645 # FIXME: This hack should be removed a few years after 2.60.
6646 ac_datarootdir_hack=; ac_datarootdir_seen=
6647 ac_sed_dataroot='
6648 /datarootdir/ {
6649 p
6650 q
6651 }
6652 /@datadir@/p
6653 /@docdir@/p
6654 /@infodir@/p
6655 /@localedir@/p
6656 /@mandir@/p'
6657 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
6658 *datarootdir*) ac_datarootdir_seen=yes;;
6659 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
6660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
6661 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
6662 _ACEOF
6663 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
6664 ac_datarootdir_hack='
6665 s&@datadir@&$datadir&g
6666 s&@docdir@&$docdir&g
6667 s&@infodir@&$infodir&g
6668 s&@localedir@&$localedir&g
6669 s&@mandir@&$mandir&g
6670 s&\\\${datarootdir}&$datarootdir&g' ;;
6671 esac
6672 _ACEOF
6673
6674 # Neutralize VPATH when `$srcdir' = `.'.
6675 # Shell code in configure.ac might set extrasub.
6676 # FIXME: do we really want to maintain this feature?
6677 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
6678 ac_sed_extra="$ac_vpsub
6679 $extrasub
6680 _ACEOF
6681 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6682 :t
6683 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
6684 s|@configure_input@|$ac_sed_conf_input|;t t
6685 s&@top_builddir@&$ac_top_builddir_sub&;t t
6686 s&@top_build_prefix@&$ac_top_build_prefix&;t t
6687 s&@srcdir@&$ac_srcdir&;t t
6688 s&@abs_srcdir@&$ac_abs_srcdir&;t t
6689 s&@top_srcdir@&$ac_top_srcdir&;t t
6690 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
6691 s&@builddir@&$ac_builddir&;t t
6692 s&@abs_builddir@&$ac_abs_builddir&;t t
6693 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
6694 $ac_datarootdir_hack
6695 "
6696 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
6697 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
6698
6699 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
6700 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
6701 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
6702 "$ac_tmp/out"`; test -z "$ac_out"; } &&
6703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
6704 which seems to be undefined. Please make sure it is defined" >&5
6705 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
6706 which seems to be undefined. Please make sure it is defined" >&2;}
6707
6708 rm -f "$ac_tmp/stdin"
6709 case $ac_file in
6710 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
6711 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
6712 esac \
6713 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
6714 ;;
6715
6716
6717
6718 esac
6719
6720
6721 case $ac_file$ac_mode in
6722 "Makefile":F) chmod a-w Makefile ;;
6723
6724 esac
6725 done # for ac_tag
6726
6727
6728 as_fn_exit 0
6729 _ACEOF
6730 ac_clean_files=$ac_clean_files_save
6731
6732 test $ac_write_fail = 0 ||
6733 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
6734
6735
6736 # configure is writing to config.log, and then calls config.status.
6737 # config.status does its own redirection, appending to config.log.
6738 # Unfortunately, on DOS this fails, as config.log is still kept open
6739 # by configure, so config.status won't be able to write to it; its
6740 # output is simply discarded. So we exec the FD to /dev/null,
6741 # effectively closing config.log, so it can be properly (re)opened and
6742 # appended to by config.status. When coming back to configure, we
6743 # need to make the FD available again.
6744 if test "$no_create" != yes; then
6745 ac_cs_success=:
6746 ac_config_status_args=
6747 test "$silent" = yes &&
6748 ac_config_status_args="$ac_config_status_args --quiet"
6749 exec 5>/dev/null
6750 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
6751 exec 5>>config.log
6752 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
6753 # would make configure fail if this is the last instruction.
6754 $ac_cs_success || as_fn_exit 1
6755 fi
6756 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
6757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
6758 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
6759 fi
6760
0 # check for one particular file of the sources
1 AC_INIT(ocaml-dssi, 0.1.0, savonet-users@lists.sourceforge.net)
2
3 VERSION=$PACKAGE_VERSION
4 AC_MSG_RESULT([configuring $PACKAGE_STRING])
5
6 # Add prefix to compilation variables
7 # if passed
8 if test "x$prefix" != "xNONE"; then
9 CFLAGS="$CFLAGS -I$prefix/include"
10 LDFLAGS="$LDFLAGS -L$prefix/lib"
11 CPPFLAGS="$CPPFLAGS -I$prefix/include"
12 fi
13
14 AC_CHECK_OCAML_COMPILERS()
15
16 AC_PROG_CC()
17 AC_CHECK_TOOL([AR],[ar],no)
18 AC_SUBST(AR)
19
20 # Check for DSSI
21 AC_CHECK_HEADERS([dssi.h], [ac_have_dssi="yes"])
22 if test "$ac_have_dssi" != "yes"; then
23 AC_MSG_ERROR([DSSI headers not found.])
24 fi
25
26 # Check for LADSPA
27 AC_ARG_WITH([ladspa-dir],AC_HELP_STRING([--with-ladspa-dir=path],
28 [use "path" as the location of ocaml-ladspa (autodetected by default)]))
29 if test -z "$with_ladspa_dir"; then
30 AC_MSG_CHECKING(for ocaml-ladspa)
31 if ($OCAMLFIND query ladspa > /dev/null 2>&1); then
32 OCAMLLADSPA_INC=`$OCAMLFIND query ladspa`
33 AC_MSG_RESULT(ok)
34 else
35 AC_MSG_ERROR(not found.)
36 fi
37 else
38 echo $with_ladspa_dir | grep ^/ > /dev/null 2>&1 \
39 || with_ladspa_dir=$PWD/$with_ladspa_dir
40 OCAMLLADSPA_INC="$with_ladspa_dir"
41 fi
42 AC_SUBST(OCAMLLADSPA_INC)
43 CFLAGS="-I$OCAMLLADSPA_INC $CFLAGS"
44 AC_CHECK_HEADERS([ocaml_ladspa.h],[ac_have_ladspa="yes"])
45 if test "$ac_have_ladspa" != "yes"; then
46 AC_MSG_ERROR([ocaml-ladspa headers not found.])
47 fi
48
49 # substitutions to perform
50 AC_SUBST(VERSION)
51 AC_SUBST(INC)
52 ALL_INC="`ocamlfind query -r -separator " " $requires` $INC"
53 AC_SUBST(ALL_INC)
54 AC_SUBST(requires)
55 all_requires="`ocamlfind query -r -separator " " -format "%p" $requires`"
56 AC_SUBST(all_requires)
57
58 # Finally create the Makefile and samples
59 AC_CONFIG_FILES([Makefile],[chmod a-w Makefile])
60 AC_CONFIG_FILES([src/META])
61 AC_CONFIG_FILES([src/Makefile])
62 AC_OUTPUT
0 dnl ===========================================================================
1 dnl Helper macro to detect an optional binding
2
3 m4_defun([AC_OCAML_COMPARE_VERSION],
4 [if test -z "$2" ; then
5 VERSION_OK=yes
6 else
7 AS_VERSION_COMPARE([$1],[$2],
8 [VERSION_OK=],
9 [VERSION_OK=yes],
10 [VERSION_OK=yes])
11 fi])
12
13 m4_defun([AC_OCAML_CHECK_DEPS],
14 [dnl
15 m4_define([deps],[m4_translit([$1],['a-z'],['A-Z'])])
16 DEPS_CHECK=yes
17 for i in deps(); do
18 eval "dep_check=\$W_$i"
19 if test -z "${dep_check}"; then
20 DEPS_CHECK=
21 break
22 fi
23 done])
24
25 m4_defun([AC_MSG_RESULT_NOT],
26 [ifelse([$1],[],[AC_MSG_RESULT($2)],[AC_MSG_ERROR($2)])])
27
28 m4_defun([AC_COND_PLUGIN],
29 [ifelse([$1],[],
30 [AC_ARG_ENABLE([$2-dynamic-plugin],
31 AC_HELP_STRING(
32 [--enable-$2-dynamic-plugin],
33 [Compile $2 as an optional dynamic plugin.]))])])
34
35 AC_DEFUN([AC_CHECK_OCAML_BINDING],[dnl
36
37 m4_define([BINDING],[m4_translit([$1],['a-z.-'],['A-Z__'])])
38 m4_define([binding],[m4_translit([$1],['A-Z.-'],['a-z__'])])
39
40 AC_ARG_WITH([binding()-dir],
41 AC_HELP_STRING(
42 [--with-binding()-dir=path],
43 [look for ocaml-binding() library in "path" (autodetected by default)]))
44
45 AC_COND_PLUGIN([$4],[$1])
46
47 # Version stuff
48 m4_define([VERSION_CHECK],[ifelse([$2],[],[],[ >= $2])])
49
50 AC_MSG_CHECKING([for ocaml $1 module[]VERSION_CHECK()])
51
52 if ! test -z "$7"; then
53 OCAML_CHECK="$7"
54 else
55 OCAML_CHECK="${OCAMLFIND} query $1"
56 fi
57
58 # This (horrible) macro does the following:
59 # Detect optional binding
60 # If builtin and provided by ocamlfind,
61 # fills liquidsoap_ocamlcflags with "-package deps" for
62 # each dependency
63 # If builtin and provided by us, fills
64 # liquidsoap_ocamlcflags with "-I /path/to/ocaml-foo/src"
65 # and liquidsoap_ocamllfflags with "foo.cmxa"
66 # If plugin and provided by ocamlfind,
67 # fills plugin_packages with "deps"
68 # If plugin and provided by us, fills
69 # plugin_ocamlcflags with "-I /path/to/ocaml-foo/src"
70 # and plugin_ocamllflags with "foo.cmxa"
71 # Ultimately, plugin_ocamlcflags and plugin_ocamllflags
72 # are added to the global $PLUGINS_DATA variable and
73 # $PLUGINS is updated with the name of this plugin.
74 # W_plugin is set to "yes" for builtin compilation
75 # and "binding" for plugin compilation.
76
77 if test "x$enable_[]binding()_dynamic_plugin" = "xyes" ; then
78 BINDING()_SHARED="yes"
79 PLUGINS="$PLUGINS binding()"
80 fi
81
82 AC_OCAML_CHECK_DEPS([$3])
83 if test -z $DEPS_CHECK; then
84 AC_MSG_RESULT([[]binding() needs $3])
85 else
86 if test -z "${with_[]binding()_dir}" ; then
87 if ! ${OCAML_CHECK} > /dev/null 2>&1 ; then
88 AC_MSG_RESULT_NOT([$4],[Not found.])
89 else
90 BINDING()_version="`${OCAMLFIND} query -format "%v" $1 2>/dev/null`"
91 AC_OCAML_COMPARE_VERSION([${[]BINDING()_version}],[$2])
92 if test -z "${VERSION_OK}"; then
93 AC_MSG_RESULT_NOT([$4],[requires version >= $2 found ${[]BINDING()_version}.])
94 else
95 if test -z "${[]BINDING()_SHARED}"; then
96 BINDING()_PACKAGES="`${OCAMLFIND} query -r -separator " " -format "-package %p" $1 $5 2>/dev/null`"
97 liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} ${[]BINDING()_PACKAGES}"
98 W_[]BINDING()=yes
99 else
100 []binding()_packages="`${OCAMLFIND} query -r -separator " " -format "%p" $1 $5 2>/dev/null`"
101 W_[]BINDING()=[]binding()
102 fi
103 LIBS_VERSIONS="${LIBS_VERSIONS} $1=$[]BINDING()_version"
104 AC_MSG_RESULT(ok)
105 fi
106 fi
107 else
108 BINDING()_STOP_CHECK=
109 BINDING()_version=changequote({,})"[unknown version]"changequote([,])
110 BINDING()_requires=
111 if test -r ${with_[]binding()_dir}/META >/dev/null 2>&1; then
112 # Grab version
113 BINDING()_version=`cat "${with_[]binding()_dir}/META" | grep version | cut -d'=' -f 2 | tr -d ' ' | tr -d '"' | head -n 1`
114 AC_OCAML_COMPARE_VERSION([${[]BINDING()_version}],[$2])
115 if test -z "${VERSION_OK}"; then
116 AC_MSG_RESULT_NOT([$4],[requires version >= $2 found ${[]BINDING()version}.])
117 BINDING()_STOP_CHECK=yes
118 fi
119 BINDING()_requires=`cat "${with_[]binding()_dir}/META" | grep 'requires' | cut -d '=' -f 2 | tr -d '"'`
120 BINDING()_path="${with_[]binding()_dir}"
121 else
122 BINDING()_path=`${OCAMLFIND} -query $1 2>/dev/null`
123 if ! test -z "$2"; then
124 AC_MSG_RESULT_NOT([$4],[cannot find version from META file.])
125 BINDING()_STOP_CHECK=yes
126 fi
127 fi
128 if test -z "${STOP_CHECK}"; then
129 if ! test -z "$6"; then
130 for i in $6; do
131 CMA_OBJS="${CMA_OBJS} $i.${cma}"
132 done
133 else
134 CMA_OBJS=$1.${cma}
135 fi
136 BINDING()_PACKAGES="`${OCAMLFIND} query -r -separator " " -format "-package %p" $5 2>/dev/null`"
137 echo ${with_[]binding()_dir} | grep ^/ > /dev/null 2>&1 \
138 || with_[]binding()_dir=${PWD}/${with_[]binding()_dir}
139 if test -z "${[]BINDING()_SHARED}"; then
140 liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} -I ${with_[]binding()_dir} ${[]BINDING()_PACKAGES}"
141 else
142 []binding()_ocamlcflags="-I ${with_[]binding()_dir} ${[]BINDING()_PACKAGES}"
143 fi
144 # We need to recurse here because
145 # some package may not be registered using ocamlfind
146 for i in ${[]BINDING()_requires}; do
147 BINDING()_PACKAGES="${[]BINDING()_PACKAGES} `${OCAMLFIND} query -r -separator " " -format "-package %p" $i 2>/dev/null`"
148 done
149 if test -z "${[]BINDING()_SHARED}"; then
150 liquidsoap_ocamllflags="${liquidsoap_ocamllflags} ${[]BINDING()_PACKAGES} ${CMA_OBJS}"
151 W_[]BINDING()=yes
152 else
153 []binding()_ocamllflags="${[]BINDING()_PACKAGES} ${CMA_OBJS}"
154 W_[]BINDING()=[]binding()
155 fi
156 LIBS_VERSIONS="${LIBS_VERSIONS} $1=$[]BINDING()_version"
157 AC_MSG_RESULT(ok)
158 fi
159 fi
160 fi
161
162 AC_SUBST(W_[]BINDING())
163 if test -z "${W_[]BINDING()}" ; then
164 w_[]BINDING()="no (requires $1)"
165 else
166 if test -z "${[]BINDING()_SHARED}"; then
167 w_[]BINDING()=yes
168 else
169 PLUGINS_DATA="$PLUGINS_DATA
170 []binding()_ocamlcflags=${[]binding()_ocamlcflags}
171 []binding()_ocamllflags=${[]binding()_ocamllflags}
172 []binding()_packages=${[]binding()_packages}"
173 w_[]BINDING()=plugin
174 fi
175 fi])
176
177
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 AC_MSG_ERROR(Cannot find ocamlc.)
17 fi
18
19 AC_SUBST([OCAMLC])
20
21 OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'`
22 AC_MSG_RESULT([OCaml version is $OCAMLVERSION])
23 # Check if version is >= 3.12.0
24 AC_MSG_CHECKING([if ocaml compiler supports first-class modules])
25 AS_VERSION_COMPARE([$OCAMLVERSION],[3.12.0],[],[OCAML_HAS_FIRST_CLASS_MODULES="yes"],[OCAML_HAS_FIRST_CLASS_MODULES="yes"])
26 if test -n "${OCAML_HAS_FIRST_CLASS_MODULES}"; then
27 AC_MSG_RESULT([yes])
28 else
29 AC_MSG_RESULT([no])
30 fi
31 AC_SUBST(OCAML_HAS_FIRST_CLASS_MODULES)
32
33 # If OCAMLLIB is set, use it
34 if test "$OCAMLLIB" = ""; then
35 OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4`
36 else
37 AC_MSG_RESULT([OCAMLLIB previously set; preserving it.])
38 fi
39 AC_MSG_RESULT([OCaml library path is $OCAMLLIB])
40
41 AC_SUBST([OCAMLVERSION])
42 AC_SUBST([OCAMLLIB])
43
44 # checking for ocamlopt
45 AC_CHECK_TOOL_STRICT([OCAMLOPT],[ocamlopt],[no])
46 OCAMLBEST=byte
47 OCAML_DYNLINK=byte-dyn
48 if test "$OCAMLOPT" = "no"; then
49 AC_MSG_WARN([Cannot find ocamlopt; bytecode compilation only.])
50 else
51 TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
52 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
53 AC_MSG_RESULT([versions differs from ocamlc; ocamlopt discarded.])
54 OCAMLOPT=no
55 else
56 OCAMLBEST="byte opt"
57 OCAML_DYNLINK="byte-dyn opt-dyn"
58 fi
59 fi
60
61 AC_SUBST([OCAMLBEST])
62 AC_SUBST([OCAML_DYNLINK])
63
64 # checking for ocamlc.opt
65 AC_CHECK_TOOL_STRICT([OCAMLCDOTOPT],[ocamlc.opt],[no])
66 if test "$OCAMLCDOTOPT" != "no"; then
67 TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
68 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
69 AC_MSG_RESULT([versions differs from ocamlc; ocamlc.opt discarded.])
70 else
71 OCAMLC=$OCAMLCDOTOPT
72 fi
73 fi
74
75 # checking for ocamlopt.opt
76 if test "$OCAMLOPT" != "no" ; then
77 AC_CHECK_TOOL_STRICT([OCAMLOPTDOTOPT],[ocamlopt.opt],[no])
78 if test "$OCAMLOPTDOTOPT" != "no"; then
79 TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
80 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
81 AC_MSG_RESULT([version differs from ocamlc; ocamlopt.opt discarded.])
82 else
83 OCAMLOPT=$OCAMLOPTDOTOPT
84 fi
85 fi
86 fi
87
88 AC_SUBST([OCAMLOPT])
89
90 # checking for ocaml toplevel
91 AC_CHECK_TOOL_STRICT([OCAML],[ocaml],[no])
92
93 AC_SUBST([OCAML])
94
95 # checking for ocamldep
96 AC_CHECK_TOOL_STRICT([OCAMLDEP],[ocamldep],[no])
97 if test "$OCAMLDEP" = "no"; then
98 AC_MSG_ERROR(Cannot find ocamlmklib.)
99 fi
100
101 AC_SUBST([OCAMLDEP])
102
103 # checking for ocamlmktop
104 AC_CHECK_TOOL_STRICT([OCAMLMKTOP],[ocamlmktop],[no])
105
106 AC_SUBST([OCAMLMKTOP])
107
108 # checking for ocamlmklib
109 AC_CHECK_TOOL_STRICT([OCAMLMKLIB],[ocamlmklib],[no])
110 if test "$OCAMLMKLIB" = "no"; then
111 AC_MSG_ERROR(Cannot find ocamlmklib.)
112 fi
113
114 AC_SUBST([OCAMLMKLIB])
115
116 # checking for ocamldoc
117 AC_CHECK_TOOL([OCAMLDOC],[ocamldoc],[no])
118
119 AC_SUBST([OCAMLDOC])
120
121 # checking for ocamlbuild
122 AC_CHECK_TOOL([OCAMLBUILD],[ocamlbuild],[no])
123
124 AC_SUBST([OCAMLBUILD])
125 ])
126
127
128 AC_DEFUN([AC_PROG_OCAMLLEX],
129 [dnl
130 # checking for ocamllex
131 AC_CHECK_TOOL([OCAMLLEX],[ocamllex],[no])
132 if test "$OCAMLLEX" != "no"; then
133 AC_CHECK_TOOL([OCAMLLEXDOTOPT],[ocamllex.opt],[no])
134 if test "$OCAMLLEXDOTOPT" != "no"; then
135 OCAMLLEX=$OCAMLLEXDOTOPT
136 fi
137 fi
138 AC_SUBST([OCAMLLEX])
139 ])
140
141 AC_DEFUN([AC_PROG_OCAMLYACC],
142 [dnl
143 AC_CHECK_TOOL([OCAMLYACC],[ocamlyacc],[no])
144 AC_SUBST([OCAMLYACC])
145 ])
146
147
148 AC_DEFUN([AC_PROG_CAMLP4],
149 [dnl
150 AC_REQUIRE([AC_PROG_OCAML])dnl
151
152
153 AC_ARG_ENABLE([camlp4],
154 AC_HELP_STRING([--disable-camlp4],
155 [disable camlp4 auto-detection.]))
156
157 # checking for camlp4
158 if test "x$enable_camlp4" != "xno"; then
159 AC_CHECK_TOOL_STRICT([CAMLP4],[camlp4],[no])
160 if test "$CAMLP4" != "no"; then
161 TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p' | tr -d '\r'`
162 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
163 AC_MSG_RESULT([versions differs from ocamlc])
164 CAMLP4=no
165 fi
166 fi
167 AC_SUBST([CAMLP4])
168
169 # checking for companion tools
170 AC_CHECK_TOOL_STRICT([CAMLP4BOOT],[camlp4boot],[no])
171 AC_CHECK_TOOL_STRICT([CAMLP4O],[camlp4o],[no])
172 AC_CHECK_TOOL_STRICT([CAMLP4OF],[camlp4of],[no])
173 AC_CHECK_TOOL_STRICT([CAMLP4OOF],[camlp4oof],[no])
174 AC_CHECK_TOOL_STRICT([CAMLP4ORF],[camlp4orf],[no])
175 AC_CHECK_TOOL_STRICT([CAMLP4PROF],[camlp4prof],[no])
176 AC_CHECK_TOOL_STRICT([CAMLP4R],[camlp4r],[no])
177 AC_CHECK_TOOL_STRICT([CAMLP4RF],[camlp4rf],[no])
178 else
179 CAMLP4=no
180 CAMLP4BOOT=no
181 CAMLP4O=no
182 CAMLP4OF=no
183 CAMLP4OOF=no
184 CAMLP4ORF=no
185 CAMLP4PROF=no
186 CAMLP4R=no
187 CAMLP4RF=no
188 fi
189
190 AC_SUBST([CAMLP4BOOT])
191 AC_SUBST([CAMLP4O])
192 AC_SUBST([CAMLP4OF])
193 AC_SUBST([CAMLP4OOF])
194 AC_SUBST([CAMLP4ORF])
195 AC_SUBST([CAMLP4PROF])
196 AC_SUBST([CAMLP4R])
197 AC_SUBST([CAMLP4RF])
198 ])
199
200
201 AC_DEFUN([AC_PROG_FINDLIB],
202 [dnl
203 AC_REQUIRE([AC_PROG_OCAML])dnl
204
205 # checking for ocamlfind
206 AC_CHECK_TOOL([OCAMLFIND],[ocamlfind],[no])
207 AC_SUBST([OCAMLFIND])
208 ])
209
210
211 dnl Thanks to Jim Meyering for working this next bit out for us.
212 dnl XXX We should define AS_TR_SH if it's not defined already
213 dnl (eg. for old autoconf).
214 AC_DEFUN([AC_CHECK_OCAML_PKG],
215 [dnl
216 AC_REQUIRE([AC_PROG_FINDLIB])dnl
217
218 AC_ARG_WITH([$1-dir],AC_HELP_STRING([--with-$1-dir=path],
219 [use "path" as the location of ocaml-$1 (autodetected by default)]))
220 AC_MSG_CHECKING([for OCaml library $1])
221
222 unset found
223 unset pkg
224 found=no
225 if test -z "$with_$1_dir"; then
226 for pkg in $1 $2 ; do
227 if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then
228 AC_MSG_RESULT([found])
229 AS_TR_SH([OCAML_PKG_$1])=$pkg
230 AS_TR_SH([OCAML_DIR_$1])=`$OCAMLFIND query $1`
231 found=yes
232 break
233 fi
234 done
235 else
236 echo $with_$1_dir | grep ^/ > /dev/null 2>&1 || with_$1_dir=$PWD/$with_$1_dir
237 AS_TR_SH([OCAML_PKG_$1])=no
238 OCAML_DIR_$1="$with_$1_dir"
239 found=yes
240 fi
241 if test "$found" = "no" ; then
242 AC_MSG_RESULT([not found])
243 AS_TR_SH([OCAML_HAS_$1])=no
244 AS_TR_SH([OCAML_PKG_$1])=no
245 else
246 AS_TR_SH([OCAML_HAS_$1])=yes
247 fi
248
249 AC_SUBST(AS_TR_SH([OCAML_PKG_$1]))
250 ])
251
252
253 AC_DEFUN([AC_CHECK_OCAML_MODULE],
254 [dnl
255 AC_MSG_CHECKING([for OCaml module $2])
256
257 cat > conftest.ml <<EOF
258 open $3
259 EOF
260 unset found
261 for $1 in $$1 $4 ; do
262 if $OCAMLC -c -I "$$1" conftest.ml >&5 2>&5 ; then
263 found=yes
264 break
265 fi
266 done
267
268 if test "$found" ; then
269 AC_MSG_RESULT([$$1])
270 else
271 AC_MSG_RESULT([not found])
272 $1=no
273 fi
274 AC_SUBST([$1])
275 ])
276
277
278 dnl XXX Cross-compiling
279 AC_DEFUN([AC_CHECK_OCAML_WORD_SIZE],
280 [dnl
281 AC_REQUIRE([AC_PROG_OCAML])dnl
282 AC_MSG_CHECKING([for OCaml compiler word size])
283 cat > conftest.ml <<EOF
284 print_endline (string_of_int Sys.word_size)
285 EOF
286 OCAML_WORD_SIZE=`$OCAML conftest.ml`
287 AC_MSG_RESULT([$OCAML_WORD_SIZE])
288 AC_SUBST([OCAML_WORD_SIZE])
289 ])
290
291 AC_DEFUN([AC_CHECK_OCAML_OS_TYPE],
292 [dnl
293 AC_REQUIRE([AC_PROG_OCAML])dnl
294 AC_MSG_CHECKING([OCaml Sys.os_type])
295
296 cat > conftest.ml <<EOF
297 print_string(Sys.os_type);;
298 EOF
299
300 OCAML_OS_TYPE=`$OCAML conftest.ml`
301 AC_MSG_RESULT([$OCAML_OS_TYPE])
302 AC_SUBST([OCAML_OS_TYPE])
303 ])
0 AC_DEFUN([AC_CHECK_OCAML_COMPILERS],[
1 OCAMLFIND_LDCONF=""
2 AC_ARG_ENABLE([ldconf], AC_HELP_STRING([--disable-ldconf],[don't modify the dynamic loader configuration file (default is enable)]),[ac_enable_ldconf=$enableval],[ac_enable_ldconf=$enableval],[ac_enable_ldconf=yes])
3 if test "$ac_enable_ldconf" = no ; then
4 AC_MSG_RESULT([disabling modification of ld.conf])
5 OCAMLFIND_LDCONF=dummy
6 fi
7 AC_SUBST(OCAMLFIND_LDCONF)
8
9 # Check for Ocaml compilers
10
11 AC_PROG_OCAML()
12
13 AC_CHECK_TOOL(CAMLIDL,camlidl,no)
14 AC_SUBST(CAMLIDL)
15
16 AC_PROG_OCAMLLEX()
17
18 AC_PROG_OCAMLYACC()
19
20 AC_PROG_CAMLP4()
21
22 AC_PROG_FINDLIB()
23
24 # Check if caml/threads.h is present
25 AC_CHECK_HEADER([caml/threads.h],[CAML_THREADS=yes],[],[#include <caml/misc.h>])
26
27 AC_ARG_ENABLE([debugging],
28 AC_HELP_STRING(
29 [--disable-debugging],
30 [disable debugging information (backtrace printing in particular)]))
31
32 if test "x$enable_debugging" = "xyes" ; then
33 OCAMLFLAGS="$OCAMLFLAGS -g"
34 fi
35
36 AC_ARG_ENABLE([profiling],
37 AC_HELP_STRING(
38 [--enable-profiling],
39 [compile to generate profiling infomation]))
40 if test "x$enable_profiling" = "xyes" ; then
41 OCAMLNCFLAGS="$OCAMLNCFLAGS -p"
42 fi
43 AC_SUBST(OCAMLNCFLAGS)
44
45 AC_ARG_ENABLE([nativecode],
46 AC_HELP_STRING(
47 [--disable-nativecode],
48 [compile in bytecode]))
49
50 AC_ARG_ENABLE([custom],
51 AC_HELP_STRING(
52 [--disable-custom],
53 [disable custom mode for bytecode compilation (use if you know what you are doing)]))
54
55 CAMLLIBPATH=$OCAMLLIB
56 AC_SUBST(CAMLLIBPATH)
57
58 AC_SUBST(CAMLIDL)
59 AC_SUBST(OCAMLFLAGS)
60 ])
0 AC_DEFUN([AC_CHECK_TOOL_STRICT],
1 [AC_CHECK_PROG([$1], [${ac_tool_prefix}$2], [${ac_tool_prefix}$2], [$3], [$4])])
2
3 AC_DEFUN([AC_PATH_TOOL_STRICT],
4 [AC_PATH_PROG([$1], [${ac_tool_prefix}$2], [$3])])
5
6
0 name="dssi"
1 version="@VERSION@"
2 description="OCaml bindings for DSSI"
3 requires="@requires@"
4 archive(byte)="dssi.cma"
5 archive(native)="dssi.cmxa"
0 OCAMLMAKEFILE = OCamlMakefile
1
2 OCAMLFIND = @OCAMLFIND@
3 OCAMLFIND_LDCONF = @OCAMLFIND_LDCONF@
4 OCAMLC = @OCAMLC@
5 OCAMLOPT = @OCAMLOPT@
6 OCAMLBEST = @OCAMLBEST@
7 OCAMLMKTOP = @OCAMLMKTOP@
8 OCAMLMKLIB = @OCAMLMKLIB@
9 OCAMLCP = @OCAMLCP@
10 OCAMLDEP = @OCAMLDEP@
11 OCAMLLEX = @OCAMLLEX@
12 OCAMLYACC = @OCAMLYACC@
13 OCAMLDOC = @OCAMLDOC@
14 AR = @AR@
15 LATEX = @LATEX@
16 DVIPS = @DVIPS@
17 PS2PDF = @PS2PDF@
18 OCAMLLIBPATH = @CAMLLIBPATH@
19
20 SOURCES = dssi_stubs.c dssi.ml
21 RESULT = dssi
22 OCAMLDOCFLAGS = -stars
23 LIBINSTALL_FILES = $(wildcard *.mli *.cmi *.cma *.cmxa *.cmx *.a *.so)
24 ACLIBS = @LIBS@
25 LDFLAGS = @LDFLAGS@
26 CLIBS = $(ACLIBS:-l%=%)
27 LIBDIRS = $(LDFLAGS:-L%=%) @OCAMLLADSPA_INC@
28 CC = @CC@
29 CFLAGS = @CFLAGS@ -Wall -DCAML_NAME_SPACE
30 CPPFLAGS = @CPPFLAGS@
31 INCDIRS = @INC@ @OCAMLLADSPA_INC@
32 NO_CUSTOM = yes
33 OCAMLFLAGS = @OCAMLFLAGS@
34
35 all: $(OCAMLBEST)
36
37 byte: byte-code-library
38
39 opt: native-code-library
40
41 native-code-library: byte-code-library
42
43 install: libinstall
44
45 uninstall: libuninstall
46
47 update: uninstall install
48
49 -include $(OCAMLMAKEFILE)
0 ###########################################################################
1 # OCamlMakefile
2 # Copyright (C) 1999- Markus Mottl
3 #
4 # For updates see:
5 # http://www.ocaml.info/home/ocaml_sources.html
6 #
7 ###########################################################################
8
9 # Modified by damien for .glade.ml compilation
10
11 # Set these variables to the names of the sources to be processed and
12 # the result variable. Order matters during linkage!
13
14 ifndef SOURCES
15 SOURCES := foo.ml
16 endif
17 export SOURCES
18
19 ifndef RES_CLIB_SUF
20 RES_CLIB_SUF := _stubs
21 endif
22 export RES_CLIB_SUF
23
24 ifndef RESULT
25 RESULT := foo
26 endif
27 export RESULT := $(strip $(RESULT))
28
29 export LIB_PACK_NAME
30
31 ifndef DOC_FILES
32 DOC_FILES := $(filter %.mli, $(SOURCES))
33 endif
34 export DOC_FILES
35 FIRST_DOC_FILE := $(firstword $(DOC_FILES))
36
37 export BCSUFFIX
38 export NCSUFFIX
39
40 ifndef TOPSUFFIX
41 TOPSUFFIX := .top
42 endif
43 export TOPSUFFIX
44
45 # Eventually set include- and library-paths, libraries to link,
46 # additional compilation-, link- and ocamlyacc-flags
47 # Path- and library information needs not be written with "-I" and such...
48 # Define THREADS if you need it, otherwise leave it unset (same for
49 # USE_CAMLP4)!
50
51 export THREADS
52 export VMTHREADS
53 export ANNOTATE
54 export USE_CAMLP4
55
56 export INCDIRS
57 export LIBDIRS
58 export EXTLIBDIRS
59 export RESULTDEPS
60 export OCAML_DEFAULT_DIRS
61
62 export LIBS
63 export CLIBS
64 export CFRAMEWORKS
65
66 export OCAMLFLAGS
67 export OCAMLNCFLAGS
68 export OCAMLBCFLAGS
69
70 export OCAMLLDFLAGS
71 export OCAMLNLDFLAGS
72 export OCAMLBLDFLAGS
73
74 export OCAMLMKLIB_FLAGS
75
76 ifndef OCAMLCPFLAGS
77 OCAMLCPFLAGS := a
78 endif
79 export OCAMLCPFLAGS
80
81 ifndef DOC_DIR
82 DOC_DIR := doc
83 endif
84 export DOC_DIR
85
86 export PPFLAGS
87
88 export LFLAGS
89 export YFLAGS
90 export IDLFLAGS
91
92 export OCAMLDOCFLAGS
93
94 export OCAMLFIND_INSTFLAGS
95
96 export DVIPSFLAGS
97
98 export STATIC
99
100 # Add a list of optional trash files that should be deleted by "make clean"
101 export TRASH
102
103 ECHO := echo
104
105 ifdef REALLY_QUIET
106 export REALLY_QUIET
107 ECHO := true
108 LFLAGS := $(LFLAGS) -q
109 YFLAGS := $(YFLAGS) -q
110 endif
111
112 #################### variables depending on your OCaml-installation
113
114 SYSTEM := $(shell ocamlc -config 2>/dev/null | grep system | sed 's/system: //')
115 # This may be
116 # - mingw
117 # - win32
118 # - cygwin
119 # - some other string means Unix
120 # - empty means ocamlc does not support -config
121
122 ifeq ($(SYSTEM),mingw)
123 MINGW=1
124 endif
125 ifeq ($(SYSTEM),win32)
126 MSVC=1
127 endif
128
129 ifdef MINGW
130 export MINGW
131 WIN32 := 1
132 # We are compiling with cygwin tools:
133 CFLAGS_WIN32 := -mno-cygwin
134 # The default value 'cc' makes 'ocamlc -cc "cc"' raises the error 'The
135 # NTVDM CPU has encountered an illegal instruction'.
136 CC := gcc
137 # The OCaml C header files use this flag:
138 CFLAGS += -D__MINGW32__
139 endif
140 ifdef MSVC
141 export MSVC
142 WIN32 := 1
143 ifndef STATIC
144 CPPFLAGS_WIN32 := -DCAML_DLL
145 endif
146 CFLAGS_WIN32 += -nologo
147 EXT_OBJ := obj
148 EXT_LIB := lib
149 ifeq ($(CC),gcc)
150 # work around GNU Make default value
151 ifdef THREADS
152 CC := cl -MT
153 else
154 CC := cl
155 endif
156 endif
157 ifeq ($(CXX),g++)
158 # work around GNU Make default value
159 CXX := $(CC)
160 endif
161 CFLAG_O := -Fo
162 endif
163 ifdef WIN32
164 EXT_CXX := cpp
165 EXE := .exe
166 endif
167
168 ifndef EXT_OBJ
169 EXT_OBJ := o
170 endif
171 ifndef EXT_LIB
172 EXT_LIB := a
173 endif
174 ifndef EXT_CXX
175 EXT_CXX := cc
176 endif
177 ifndef EXE
178 EXE := # empty
179 endif
180 ifndef CFLAG_O
181 CFLAG_O := -o # do not delete this comment (preserves trailing whitespace)!
182 endif
183
184 export CC
185 export CXX
186 export CFLAGS
187 export CXXFLAGS
188 export LDFLAGS
189 export CPPFLAGS
190
191 ifndef RPATH_FLAG
192 ifdef ELF_RPATH_FLAG
193 RPATH_FLAG := $(ELF_RPATH_FLAG)
194 else
195 RPATH_FLAG := -R
196 endif
197 endif
198 export RPATH_FLAG
199
200 ifndef MSVC
201 ifndef PIC_CFLAGS
202 PIC_CFLAGS := -fPIC
203 endif
204 ifndef PIC_CPPFLAGS
205 PIC_CPPFLAGS := -DPIC
206 endif
207 endif
208
209 export PIC_CFLAGS
210 export PIC_CPPFLAGS
211
212 BCRESULT := $(addsuffix $(BCSUFFIX), $(RESULT))
213 NCRESULT := $(addsuffix $(NCSUFFIX), $(RESULT))
214 TOPRESULT := $(addsuffix $(TOPSUFFIX), $(RESULT))
215
216 ifndef OCAMLFIND
217 OCAMLFIND := ocamlfind
218 endif
219 export OCAMLFIND
220
221 ifndef OCAMLC
222 OCAMLC := ocamlc
223 endif
224 export OCAMLC
225
226 ifndef OCAMLOPT
227 OCAMLOPT := ocamlopt
228 endif
229 export OCAMLOPT
230
231 ifndef OCAMLMKTOP
232 OCAMLMKTOP := ocamlmktop
233 endif
234 export OCAMLMKTOP
235
236 ifndef OCAMLCP
237 OCAMLCP := ocamlcp
238 endif
239 export OCAMLCP
240
241 ifndef OCAMLDEP
242 OCAMLDEP := ocamldep
243 endif
244 export OCAMLDEP
245
246 ifndef OCAMLLEX
247 OCAMLLEX := ocamllex
248 endif
249 export OCAMLLEX
250
251 ifndef OCAMLYACC
252 OCAMLYACC := ocamlyacc
253 endif
254 export OCAMLYACC
255
256 ifndef OCAMLMKLIB
257 OCAMLMKLIB := ocamlmklib
258 endif
259 export OCAMLMKLIB
260
261 ifndef OCAML_GLADECC
262 OCAML_GLADECC := lablgladecc2
263 endif
264 export OCAML_GLADECC
265
266 ifndef OCAML_GLADECC_FLAGS
267 OCAML_GLADECC_FLAGS :=
268 endif
269 export OCAML_GLADECC_FLAGS
270
271 ifndef CAMELEON_REPORT
272 CAMELEON_REPORT := report
273 endif
274 export CAMELEON_REPORT
275
276 ifndef CAMELEON_REPORT_FLAGS
277 CAMELEON_REPORT_FLAGS :=
278 endif
279 export CAMELEON_REPORT_FLAGS
280
281 ifndef CAMELEON_ZOGGY
282 CAMELEON_ZOGGY := camlp4o pa_zog.cma pr_o.cmo
283 endif
284 export CAMELEON_ZOGGY
285
286 ifndef CAMELEON_ZOGGY_FLAGS
287 CAMELEON_ZOGGY_FLAGS :=
288 endif
289 export CAMELEON_ZOGGY_FLAGS
290
291 ifndef OXRIDL
292 OXRIDL := oxridl
293 endif
294 export OXRIDL
295
296 ifndef CAMLIDL
297 CAMLIDL := camlidl
298 endif
299 export CAMLIDL
300
301 ifndef CAMLIDLDLL
302 CAMLIDLDLL := camlidldll
303 endif
304 export CAMLIDLDLL
305
306 ifndef NOIDLHEADER
307 MAYBE_IDL_HEADER := -header
308 endif
309 export NOIDLHEADER
310
311 export NO_CUSTOM
312
313 ifndef CAMLP4
314 CAMLP4 := camlp4
315 endif
316 export CAMLP4
317
318 ifndef REAL_OCAMLFIND
319 ifdef PACKS
320 ifndef CREATE_LIB
321 ifdef THREADS
322 PACKS += threads
323 endif
324 endif
325 empty :=
326 space := $(empty) $(empty)
327 comma := ,
328 ifdef PREDS
329 PRE_OCAML_FIND_PREDICATES := $(subst $(space),$(comma),$(PREDS))
330 PRE_OCAML_FIND_PACKAGES := $(subst $(space),$(comma),$(PACKS))
331 OCAML_FIND_PREDICATES := -predicates $(PRE_OCAML_FIND_PREDICATES)
332 # OCAML_DEP_PREDICATES := -syntax $(PRE_OCAML_FIND_PREDICATES)
333 OCAML_FIND_PACKAGES := $(OCAML_FIND_PREDICATES) -package $(PRE_OCAML_FIND_PACKAGES)
334 OCAML_DEP_PACKAGES := $(OCAML_DEP_PREDICATES) -package $(PRE_OCAML_FIND_PACKAGES)
335 else
336 OCAML_FIND_PACKAGES := -package $(subst $(space),$(comma),$(PACKS))
337 OCAML_DEP_PACKAGES :=
338 endif
339 OCAML_FIND_LINKPKG := -linkpkg
340 REAL_OCAMLFIND := $(OCAMLFIND)
341 endif
342 endif
343
344 export OCAML_FIND_PACKAGES
345 export OCAML_DEP_PACKAGES
346 export OCAML_FIND_LINKPKG
347 export REAL_OCAMLFIND
348
349 ifndef OCAMLDOC
350 OCAMLDOC := ocamldoc
351 endif
352 export OCAMLDOC
353
354 ifndef LATEX
355 LATEX := latex
356 endif
357 export LATEX
358
359 ifndef DVIPS
360 DVIPS := dvips
361 endif
362 export DVIPS
363
364 ifndef PS2PDF
365 PS2PDF := ps2pdf
366 endif
367 export PS2PDF
368
369 ifndef OCAMLMAKEFILE
370 OCAMLMAKEFILE := OCamlMakefile
371 endif
372 export OCAMLMAKEFILE
373
374 ifndef OCAMLLIBPATH
375 OCAMLLIBPATH := \
376 $(shell $(OCAMLC) 2>/dev/null -where || echo /usr/lib/ocaml)
377 endif
378 export OCAMLLIBPATH
379
380 ifndef OCAML_LIB_INSTALL
381 OCAML_LIB_INSTALL := $(OCAMLLIBPATH)/contrib
382 endif
383 export OCAML_LIB_INSTALL
384
385 ###########################################################################
386
387 #################### change following sections only if
388 #################### you know what you are doing!
389
390 # delete target files when a build command fails
391 .PHONY: .DELETE_ON_ERROR
392 .DELETE_ON_ERROR:
393
394 # for pedants using "--warn-undefined-variables"
395 export MAYBE_IDL
396 export REAL_RESULT
397 export CAMLIDLFLAGS
398 export THREAD_FLAG
399 export RES_CLIB
400 export MAKEDLL
401 export ANNOT_FLAG
402 export C_OXRIDL
403 export SUBPROJS
404 export CFLAGS_WIN32
405 export CPPFLAGS_WIN32
406
407 INCFLAGS :=
408
409 SHELL := /bin/sh
410
411 MLDEPDIR := ._d
412 BCDIDIR := ._bcdi
413 NCDIDIR := ._ncdi
414
415 FILTER_EXTNS := %.mli %.ml %.mll %.mly %.idl %.oxridl %.c %.m %.$(EXT_CXX) %.rep %.zog %.glade
416
417 FILTERED := $(filter $(FILTER_EXTNS), $(SOURCES))
418 SOURCE_DIRS := $(filter-out ./, $(sort $(dir $(FILTERED))))
419
420 FILTERED_REP := $(filter %.rep, $(FILTERED))
421 DEP_REP := $(FILTERED_REP:%.rep=$(MLDEPDIR)/%.d)
422 AUTO_REP := $(FILTERED_REP:.rep=.ml)
423
424 FILTERED_ZOG := $(filter %.zog, $(FILTERED))
425 DEP_ZOG := $(FILTERED_ZOG:%.zog=$(MLDEPDIR)/%.d)
426 AUTO_ZOG := $(FILTERED_ZOG:.zog=.ml)
427
428 FILTERED_GLADE := $(filter %.glade, $(FILTERED))
429 DEP_GLADE := $(FILTERED_GLADE:%.glade=$(MLDEPDIR)/%.d)
430 AUTO_GLADE := $(FILTERED_GLADE:.glade=.ml)
431
432 FILTERED_ML := $(filter %.ml, $(FILTERED))
433 DEP_ML := $(FILTERED_ML:%.ml=$(MLDEPDIR)/%.d)
434
435 FILTERED_MLI := $(filter %.mli, $(FILTERED))
436 DEP_MLI := $(FILTERED_MLI:.mli=.di)
437
438 FILTERED_MLL := $(filter %.mll, $(FILTERED))
439 DEP_MLL := $(FILTERED_MLL:%.mll=$(MLDEPDIR)/%.d)
440 AUTO_MLL := $(FILTERED_MLL:.mll=.ml)
441
442 FILTERED_MLY := $(filter %.mly, $(FILTERED))
443 DEP_MLY := $(FILTERED_MLY:%.mly=$(MLDEPDIR)/%.d) $(FILTERED_MLY:.mly=.di)
444 AUTO_MLY := $(FILTERED_MLY:.mly=.mli) $(FILTERED_MLY:.mly=.ml)
445
446 FILTERED_IDL := $(filter %.idl, $(FILTERED))
447 DEP_IDL := $(FILTERED_IDL:%.idl=$(MLDEPDIR)/%.d) $(FILTERED_IDL:.idl=.di)
448 C_IDL := $(FILTERED_IDL:%.idl=%_stubs.c)
449 ifndef NOIDLHEADER
450 C_IDL += $(FILTERED_IDL:.idl=.h)
451 endif
452 OBJ_C_IDL := $(FILTERED_IDL:%.idl=%_stubs.$(EXT_OBJ))
453 AUTO_IDL := $(FILTERED_IDL:.idl=.mli) $(FILTERED_IDL:.idl=.ml) $(C_IDL)
454
455 FILTERED_OXRIDL := $(filter %.oxridl, $(FILTERED))
456 DEP_OXRIDL := $(FILTERED_OXRIDL:%.oxridl=$(MLDEPDIR)/%.d) $(FILTERED_OXRIDL:.oxridl=.di)
457 AUTO_OXRIDL := $(FILTERED_OXRIDL:.oxridl=.mli) $(FILTERED_OXRIDL:.oxridl=.ml) $(C_OXRIDL)
458
459 FILTERED_C_CXX := $(filter %.c %.m %.$(EXT_CXX), $(FILTERED))
460 OBJ_C_CXX := $(FILTERED_C_CXX:.c=.$(EXT_OBJ))
461 OBJ_C_CXX := $(OBJ_C_CXX:.m=.$(EXT_OBJ))
462 OBJ_C_CXX := $(OBJ_C_CXX:.$(EXT_CXX)=.$(EXT_OBJ))
463
464 PRE_TARGETS += $(AUTO_MLL) $(AUTO_MLY) $(AUTO_IDL) $(AUTO_OXRIDL) $(AUTO_ZOG) $(AUTO_REP) $(AUTO_GLADE)
465
466 ALL_DEPS := $(DEP_ML) $(DEP_MLI) $(DEP_MLL) $(DEP_MLY) $(DEP_IDL) $(DEP_OXRIDL) $(DEP_ZOG) $(DEP_REP) $(DEP_GLADE)
467
468 MLDEPS := $(filter %.d, $(ALL_DEPS))
469 MLIDEPS := $(filter %.di, $(ALL_DEPS))
470 BCDEPIS := $(MLIDEPS:%.di=$(BCDIDIR)/%.di)
471 NCDEPIS := $(MLIDEPS:%.di=$(NCDIDIR)/%.di)
472
473 ALLML := $(filter %.mli %.ml %.mll %.mly %.idl %.oxridl %.rep %.zog %.glade, $(FILTERED))
474
475 IMPLO_INTF := $(ALLML:%.mli=%.mli.__)
476 IMPLO_INTF := $(foreach file, $(IMPLO_INTF), \
477 $(basename $(file)).cmi $(basename $(file)).cmo)
478 IMPLO_INTF := $(filter-out %.mli.cmo, $(IMPLO_INTF))
479 IMPLO_INTF := $(IMPLO_INTF:%.mli.cmi=%.cmi)
480
481 IMPLX_INTF := $(IMPLO_INTF:.cmo=.cmx)
482
483 INTF := $(filter %.cmi, $(IMPLO_INTF))
484 IMPL_CMO := $(filter %.cmo, $(IMPLO_INTF))
485 IMPL_CMX := $(IMPL_CMO:.cmo=.cmx)
486 IMPL_ASM := $(IMPL_CMO:.cmo=.asm)
487 IMPL_S := $(IMPL_CMO:.cmo=.s)
488
489 OBJ_LINK := $(OBJ_C_IDL) $(OBJ_C_CXX)
490 OBJ_FILES := $(IMPL_CMO:.cmo=.$(EXT_OBJ)) $(OBJ_LINK)
491
492 EXECS := $(addsuffix $(EXE), \
493 $(sort $(TOPRESULT) $(BCRESULT) $(NCRESULT)))
494 ifdef WIN32
495 EXECS += $(BCRESULT).dll $(NCRESULT).dll
496 endif
497
498 CLIB_BASE := $(RESULT)$(RES_CLIB_SUF)
499 ifneq ($(strip $(OBJ_LINK)),)
500 RES_CLIB := lib$(CLIB_BASE).$(EXT_LIB)
501 endif
502
503 ifdef WIN32
504 DLLSONAME := dll$(CLIB_BASE).dll
505 else
506 DLLSONAME := dll$(CLIB_BASE).so
507 endif
508
509 NONEXECS := $(INTF) $(IMPL_CMO) $(IMPL_CMX) $(IMPL_ASM) $(IMPL_S) \
510 $(OBJ_FILES) $(PRE_TARGETS) $(BCRESULT).cma $(NCRESULT).cmxa \
511 $(NCRESULT).$(EXT_LIB) $(BCRESULT).cmi $(BCRESULT).cmo \
512 $(NCRESULT).cmi $(NCRESULT).cmx $(NCRESULT).$(EXT_OBJ) \
513 $(RES_CLIB) $(IMPL_CMO:.cmo=.annot) \
514 $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo $(LIB_PACK_NAME).cmx \
515 $(LIB_PACK_NAME).$(EXT_OBJ)
516
517 ifndef STATIC
518 NONEXECS += $(DLLSONAME)
519 endif
520
521 ifndef LIBINSTALL_FILES
522 LIBINSTALL_FILES := $(RESULT).mli $(RESULT).cmi $(RESULT).cma \
523 $(RESULT).cmxa $(RESULT).$(EXT_LIB) $(RES_CLIB)
524 ifndef STATIC
525 ifneq ($(strip $(OBJ_LINK)),)
526 LIBINSTALL_FILES += $(DLLSONAME)
527 endif
528 endif
529 endif
530
531 export LIBINSTALL_FILES
532
533 ifdef WIN32
534 # some extra stuff is created while linking DLLs
535 NONEXECS += $(BCRESULT).$(EXT_LIB) $(BCRESULT).exp $(NCRESULT).exp $(CLIB_BASE).exp $(CLIB_BASE).lib
536 endif
537
538 TARGETS := $(EXECS) $(NONEXECS)
539
540 # If there are IDL-files
541 ifneq ($(strip $(FILTERED_IDL)),)
542 MAYBE_IDL := -cclib -lcamlidl
543 endif
544
545 ifdef USE_CAMLP4
546 CAMLP4PATH := \
547 $(shell $(CAMLP4) -where 2>/dev/null || echo /usr/lib/camlp4)
548 INCFLAGS := -I $(CAMLP4PATH)
549 CINCFLAGS := -I$(CAMLP4PATH)
550 endif
551
552 DINCFLAGS := $(INCFLAGS) $(SOURCE_DIRS:%=-I %) $(OCAML_DEFAULT_DIRS:%=-I %)
553 INCFLAGS := $(DINCFLAGS) $(INCDIRS:%=-I %)
554 CINCFLAGS += $(SOURCE_DIRS:%=-I%) $(INCDIRS:%=-I%) $(OCAML_DEFAULT_DIRS:%=-I%)
555
556 ifndef MSVC
557 CLIBFLAGS += $(SOURCE_DIRS:%=-L%) $(LIBDIRS:%=-L%) \
558 $(EXTLIBDIRS:%=-L%) $(OCAML_DEFAULT_DIRS:%=-L%)
559
560 ifeq ($(ELF_RPATH), yes)
561 CLIBFLAGS += $(EXTLIBDIRS:%=-Wl,$(RPATH_FLAG)%)
562 endif
563 endif
564
565 ifndef PROFILING
566 INTF_OCAMLC := $(OCAMLC)
567 else
568 ifndef THREADS
569 INTF_OCAMLC := $(OCAMLCP) -p $(OCAMLCPFLAGS)
570 else
571 # OCaml does not support profiling byte code
572 # with threads (yet), therefore we force an error.
573 ifndef REAL_OCAMLC
574 $(error Profiling of multithreaded byte code not yet supported by OCaml)
575 endif
576 INTF_OCAMLC := $(OCAMLC)
577 endif
578 endif
579
580 ifndef MSVC
581 COMMON_LDFLAGS := $(LDFLAGS:%=-ccopt %) $(SOURCE_DIRS:%=-ccopt -L%) \
582 $(LIBDIRS:%=-ccopt -L%) $(EXTLIBDIRS:%=-ccopt -L%) \
583 $(EXTLIBDIRS:%=-ccopt -Wl $(OCAML_DEFAULT_DIRS:%=-ccopt -L%))
584
585 ifeq ($(ELF_RPATH),yes)
586 COMMON_LDFLAGS += $(EXTLIBDIRS:%=-ccopt -Wl,$(RPATH_FLAG)%)
587 endif
588 else
589 COMMON_LDFLAGS := -ccopt "/link -NODEFAULTLIB:LIBC $(LDFLAGS:%=%) $(SOURCE_DIRS:%=-LIBPATH:%) \
590 $(LIBDIRS:%=-LIBPATH:%) $(EXTLIBDIRS:%=-LIBPATH:%) \
591 $(OCAML_DEFAULT_DIRS:%=-LIBPATH:%) "
592 endif
593
594 CLIBS_OPTS := $(CLIBS:%=-cclib -l%) $(CFRAMEWORKS:%=-cclib '-framework %')
595 ifdef MSVC
596 ifndef STATIC
597 # MSVC libraries do not have 'lib' prefix
598 CLIBS_OPTS := $(CLIBS:%=-cclib %.lib)
599 endif
600 endif
601
602 ifneq ($(strip $(OBJ_LINK)),)
603 ifdef CREATE_LIB
604 OBJS_LIBS := -cclib -l$(CLIB_BASE) $(CLIBS_OPTS) $(MAYBE_IDL)
605 else
606 OBJS_LIBS := $(OBJ_LINK) $(CLIBS_OPTS) $(MAYBE_IDL)
607 endif
608 else
609 OBJS_LIBS := $(CLIBS_OPTS) $(MAYBE_IDL)
610 endif
611
612 ifdef LIB_PACK_NAME
613 FOR_PACK_NAME := $(shell echo $(LIB_PACK_NAME) | awk '{print toupper(substr($$0,1,1))substr($$0,2)}')
614 endif
615
616 # If we have to make byte-code
617 ifndef REAL_OCAMLC
618 BYTE_OCAML := y
619
620 # EXTRADEPS is added dependencies we have to insert for all
621 # executable files we generate. Ideally it should be all of the
622 # libraries we use, but it's hard to find the ones that get searched on
623 # the path since I don't know the paths built into the compiler, so
624 # just include the ones with slashes in their names.
625 EXTRADEPS := $(addsuffix .cma,$(foreach i,$(LIBS),$(if $(findstring /,$(i)),$(i))))
626
627
628 ifndef LIB_PACK_NAME
629 SPECIAL_OCAMLFLAGS := $(OCAMLBCFLAGS)
630 else
631 SPECIAL_OCAMLFLAGS := -for-pack $(FOR_PACK_NAME) $(OCAMLBCFLAGS)
632 endif
633
634 REAL_OCAMLC := $(INTF_OCAMLC)
635
636 REAL_IMPL := $(IMPL_CMO)
637 REAL_IMPL_INTF := $(IMPLO_INTF)
638 IMPL_SUF := .cmo
639
640 DEPFLAGS :=
641 MAKE_DEPS := $(MLDEPS) $(BCDEPIS)
642
643 ifdef CREATE_LIB
644 override CFLAGS := $(PIC_CFLAGS) $(CFLAGS)
645 override CPPFLAGS := $(PIC_CPPFLAGS) $(CPPFLAGS)
646 ifndef STATIC
647 ifneq ($(strip $(OBJ_LINK)),)
648 MAKEDLL := $(DLLSONAME)
649 ALL_LDFLAGS := -dllib $(DLLSONAME)
650 endif
651 endif
652 endif
653
654 ifndef NO_CUSTOM
655 ifneq "$(strip $(OBJ_LINK) $(THREADS) $(MAYBE_IDL) $(CLIBS) $(CFRAMEWORKS))" ""
656 ALL_LDFLAGS += -custom
657 endif
658 endif
659
660 ALL_LDFLAGS += $(INCFLAGS) $(OCAMLLDFLAGS) $(OCAMLBLDFLAGS) \
661 $(COMMON_LDFLAGS) $(LIBS:%=%.cma)
662 CAMLIDLDLLFLAGS :=
663
664 ifdef THREADS
665 ifdef VMTHREADS
666 THREAD_FLAG := -vmthread
667 else
668 THREAD_FLAG := -thread
669 endif
670 ALL_LDFLAGS := $(THREAD_FLAG) $(ALL_LDFLAGS)
671 ifndef CREATE_LIB
672 ifndef REAL_OCAMLFIND
673 ALL_LDFLAGS := unix.cma threads.cma $(ALL_LDFLAGS)
674 endif
675 endif
676 endif
677
678 # we have to make native-code
679 else
680 EXTRADEPS := $(addsuffix .cmxa,$(foreach i,$(LIBS),$(if $(findstring /,$(i)),$(i))))
681 ifndef PROFILING
682 SPECIAL_OCAMLFLAGS := $(OCAMLNCFLAGS)
683 PLDFLAGS :=
684 else
685 SPECIAL_OCAMLFLAGS := -p $(OCAMLNCFLAGS)
686 PLDFLAGS := -p
687 endif
688
689 ifndef LIB_PACK_NAME
690 SPECIAL_OCAMLFLAGS := $(OCAMLNCFLAGS)
691 else
692 SPECIAL_OCAMLFLAGS := -for-pack $(FOR_PACK_NAME) $(OCAMLNCFLAGS)
693 endif
694 REAL_IMPL := $(IMPL_CMX)
695 REAL_IMPL_INTF := $(IMPLX_INTF)
696 IMPL_SUF := .cmx
697
698 override CPPFLAGS := -DNATIVE_CODE $(CPPFLAGS)
699
700 DEPFLAGS := -native
701 MAKE_DEPS := $(MLDEPS) $(NCDEPIS)
702
703 ALL_LDFLAGS := $(PLDFLAGS) $(INCFLAGS) $(OCAMLLDFLAGS) \
704 $(OCAMLNLDFLAGS) $(COMMON_LDFLAGS)
705 CAMLIDLDLLFLAGS := -opt
706
707 ifndef CREATE_LIB
708 ALL_LDFLAGS += $(LIBS:%=%.cmxa)
709 else
710 override CFLAGS := $(PIC_CFLAGS) $(CFLAGS)
711 override CPPFLAGS := $(PIC_CPPFLAGS) $(CPPFLAGS)
712 endif
713
714 ifdef THREADS
715 THREAD_FLAG := -thread
716 ALL_LDFLAGS := $(THREAD_FLAG) $(ALL_LDFLAGS)
717 ifndef CREATE_LIB
718 ifndef REAL_OCAMLFIND
719 ALL_LDFLAGS := unix.cmxa threads.cmxa $(ALL_LDFLAGS)
720 endif
721 endif
722 endif
723 endif
724
725 export MAKE_DEPS
726
727 ifdef ANNOTATE
728 ANNOT_FLAG := -dtypes
729 else
730 endif
731
732 ALL_OCAMLCFLAGS := $(THREAD_FLAG) $(ANNOT_FLAG) $(OCAMLFLAGS) \
733 $(INCFLAGS) $(SPECIAL_OCAMLFLAGS)
734
735 ifdef make_deps
736 -include $(MAKE_DEPS)
737 PRE_TARGETS :=
738 endif
739
740 ###########################################################################
741 # USER RULES
742
743 # Call "OCamlMakefile QUIET=" to get rid of all of the @'s.
744 QUIET=@
745
746 # generates byte-code (default)
747 byte-code: $(PRE_TARGETS)
748 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT) \
749 REAL_RESULT="$(BCRESULT)" make_deps=yes
750 bc: byte-code
751
752 byte-code-nolink: $(PRE_TARGETS)
753 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
754 REAL_RESULT="$(BCRESULT)" make_deps=yes
755 bcnl: byte-code-nolink
756
757 top: $(PRE_TARGETS)
758 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(TOPRESULT) \
759 REAL_RESULT="$(BCRESULT)" make_deps=yes
760
761 # generates native-code
762
763 native-code: $(PRE_TARGETS)
764 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(NCRESULT) \
765 REAL_RESULT="$(NCRESULT)" \
766 REAL_OCAMLC="$(OCAMLOPT)" \
767 make_deps=yes
768 nc: native-code
769
770 native-code-nolink: $(PRE_TARGETS)
771 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
772 REAL_RESULT="$(NCRESULT)" \
773 REAL_OCAMLC="$(OCAMLOPT)" \
774 make_deps=yes
775 ncnl: native-code-nolink
776
777 # generates byte-code libraries
778 byte-code-library: $(PRE_TARGETS)
779 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
780 $(RES_CLIB) $(BCRESULT).cma \
781 REAL_RESULT="$(BCRESULT)" \
782 CREATE_LIB=yes \
783 make_deps=yes
784 bcl: byte-code-library
785
786 # generates native-code libraries
787 native-code-library: $(PRE_TARGETS)
788 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
789 $(RES_CLIB) $(NCRESULT).cmxa \
790 REAL_RESULT="$(NCRESULT)" \
791 REAL_OCAMLC="$(OCAMLOPT)" \
792 CREATE_LIB=yes \
793 make_deps=yes
794 ncl: native-code-library
795
796 ifdef WIN32
797 # generates byte-code dll
798 byte-code-dll: $(PRE_TARGETS)
799 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
800 $(RES_CLIB) $(BCRESULT).dll \
801 REAL_RESULT="$(BCRESULT)" \
802 make_deps=yes
803 bcd: byte-code-dll
804
805 # generates native-code dll
806 native-code-dll: $(PRE_TARGETS)
807 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
808 $(RES_CLIB) $(NCRESULT).dll \
809 REAL_RESULT="$(NCRESULT)" \
810 REAL_OCAMLC="$(OCAMLOPT)" \
811 make_deps=yes
812 ncd: native-code-dll
813 endif
814
815 # generates byte-code with debugging information
816 debug-code: $(PRE_TARGETS)
817 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT) \
818 REAL_RESULT="$(BCRESULT)" make_deps=yes \
819 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
820 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
821 dc: debug-code
822
823 debug-code-nolink: $(PRE_TARGETS)
824 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
825 REAL_RESULT="$(BCRESULT)" make_deps=yes \
826 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
827 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
828 dcnl: debug-code-nolink
829
830 # generates byte-code with debugging information (native code)
831 debug-native-code: $(PRE_TARGETS)
832 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(NCRESULT) \
833 REAL_RESULT="$(NCRESULT)" make_deps=yes \
834 REAL_OCAMLC="$(OCAMLOPT)" \
835 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
836 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
837 dnc: debug-native-code
838
839 debug-native-code-nolink: $(PRE_TARGETS)
840 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
841 REAL_RESULT="$(NCRESULT)" make_deps=yes \
842 REAL_OCAMLC="$(OCAMLOPT)" \
843 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
844 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
845 dncnl: debug-native-code-nolink
846
847 # generates byte-code libraries with debugging information
848 debug-code-library: $(PRE_TARGETS)
849 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
850 $(RES_CLIB) $(BCRESULT).cma \
851 REAL_RESULT="$(BCRESULT)" make_deps=yes \
852 CREATE_LIB=yes \
853 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
854 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
855 dcl: debug-code-library
856
857 # generates byte-code libraries with debugging information (native code)
858 debug-native-code-library: $(PRE_TARGETS)
859 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
860 $(RES_CLIB) $(NCRESULT).cma \
861 REAL_RESULT="$(NCRESULT)" make_deps=yes \
862 REAL_OCAMLC="$(OCAMLOPT)" \
863 CREATE_LIB=yes \
864 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
865 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
866 dncl: debug-native-code-library
867
868 # generates byte-code for profiling
869 profiling-byte-code: $(PRE_TARGETS)
870 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT) \
871 REAL_RESULT="$(BCRESULT)" PROFILING="y" \
872 make_deps=yes
873 pbc: profiling-byte-code
874
875 # generates native-code
876
877 profiling-native-code: $(PRE_TARGETS)
878 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(NCRESULT) \
879 REAL_RESULT="$(NCRESULT)" \
880 REAL_OCAMLC="$(OCAMLOPT)" \
881 PROFILING="y" \
882 make_deps=yes
883 pnc: profiling-native-code
884
885 # generates byte-code libraries
886 profiling-byte-code-library: $(PRE_TARGETS)
887 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
888 $(RES_CLIB) $(BCRESULT).cma \
889 REAL_RESULT="$(BCRESULT)" PROFILING="y" \
890 CREATE_LIB=yes \
891 make_deps=yes
892 pbcl: profiling-byte-code-library
893
894 # generates native-code libraries
895 profiling-native-code-library: $(PRE_TARGETS)
896 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
897 $(RES_CLIB) $(NCRESULT).cmxa \
898 REAL_RESULT="$(NCRESULT)" PROFILING="y" \
899 REAL_OCAMLC="$(OCAMLOPT)" \
900 CREATE_LIB=yes \
901 make_deps=yes
902 pncl: profiling-native-code-library
903
904 # packs byte-code objects
905 pack-byte-code: $(PRE_TARGETS)
906 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT).cmo \
907 REAL_RESULT="$(BCRESULT)" \
908 PACK_LIB=yes make_deps=yes
909 pabc: pack-byte-code
910
911 # packs native-code objects
912 pack-native-code: $(PRE_TARGETS)
913 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
914 $(NCRESULT).cmx $(NCRESULT).$(EXT_OBJ) \
915 REAL_RESULT="$(NCRESULT)" \
916 REAL_OCAMLC="$(OCAMLOPT)" \
917 PACK_LIB=yes make_deps=yes
918 panc: pack-native-code
919
920 # generates HTML-documentation
921 htdoc: $(DOC_DIR)/$(RESULT)/html/index.html
922
923 # generates Latex-documentation
924 ladoc: $(DOC_DIR)/$(RESULT)/latex/doc.tex
925
926 # generates PostScript-documentation
927 psdoc: $(DOC_DIR)/$(RESULT)/latex/doc.ps
928
929 # generates PDF-documentation
930 pdfdoc: $(DOC_DIR)/$(RESULT)/latex/doc.pdf
931
932 # generates all supported forms of documentation
933 doc: htdoc ladoc psdoc pdfdoc
934
935 ###########################################################################
936 # LOW LEVEL RULES
937
938 $(REAL_RESULT): $(REAL_IMPL_INTF) $(OBJ_LINK) $(EXTRADEPS) $(RESULTDEPS)
939 $(REAL_OCAMLFIND) $(REAL_OCAMLC) \
940 $(OCAML_FIND_PACKAGES) $(OCAML_FIND_LINKPKG) \
941 $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@$(EXE) \
942 $(REAL_IMPL)
943
944 nolink: $(REAL_IMPL_INTF) $(OBJ_LINK)
945
946 ifdef WIN32
947 $(REAL_RESULT).dll: $(REAL_IMPL_INTF) $(OBJ_LINK)
948 $(CAMLIDLDLL) $(CAMLIDLDLLFLAGS) $(OBJ_LINK) $(CLIBS) \
949 -o $@ $(REAL_IMPL)
950 endif
951
952 %$(TOPSUFFIX): $(REAL_IMPL_INTF) $(OBJ_LINK) $(EXTRADEPS)
953 $(REAL_OCAMLFIND) $(OCAMLMKTOP) \
954 $(OCAML_FIND_PACKAGES) $(OCAML_FIND_LINKPKG) \
955 $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@$(EXE) \
956 $(REAL_IMPL)
957
958 .SUFFIXES: .mli .ml .cmi .cmo .cmx .cma .cmxa .$(EXT_OBJ) \
959 .mly .di .d .$(EXT_LIB) .idl %.oxridl .c .m .$(EXT_CXX) .h .so \
960 .rep .zog .glade
961
962 ifndef STATIC
963 ifdef MINGW
964 # From OCaml 3.11.0, ocamlmklib is available on windows
965 OCAMLMLIB_EXISTS = $(shell which $(OCAMLMKLIB))
966 ifeq ($(strip $(OCAMLMLIB_EXISTS)),)
967 $(DLLSONAME): $(OBJ_LINK)
968 $(CC) $(CFLAGS) $(CFLAGS_WIN32) $(OBJ_LINK) -shared -o $@ \
969 $(wildcard $(foreach dir,$(LIBDIRS),$(CLIBS:%=$(dir)/lib%.a))) \
970 '$(OCAMLLIBPATH)/ocamlrun.a' \
971 -Wl,--whole-archive \
972 -Wl,--export-all-symbols \
973 -Wl,--allow-multiple-definition \
974 -Wl,--enable-auto-import
975 else
976 $(DLLSONAME): $(OBJ_LINK)
977 $(OCAMLMKLIB) $(INCFLAGS) $(CLIBFLAGS) \
978 -o $(CLIB_BASE) $(OBJ_LINK) $(CLIBS:%=-l%) \
979 $(CFRAMEWORKS:%=-framework %) \
980 $(OCAMLMKLIB_FLAGS)
981 endif
982 else
983 ifdef MSVC
984 $(DLLSONAME): $(OBJ_LINK)
985 link /NOLOGO /DLL /OUT:$@ $(OBJ_LINK) \
986 $(wildcard $(foreach dir,$(LIBDIRS),$(CLIBS:%=$(dir)/%.lib))) \
987 '$(OCAMLLIBPATH)/ocamlrun.lib'
988
989 else
990 $(DLLSONAME): $(OBJ_LINK)
991 $(OCAMLMKLIB) $(INCFLAGS) $(CLIBFLAGS) \
992 -o $(CLIB_BASE) $(OBJ_LINK) $(CLIBS:%=-l%) $(CFRAMEWORKS:%=-framework %) \
993 $(OCAMLMKLIB_FLAGS)
994 endif
995 endif
996 endif
997
998 ifndef LIB_PACK_NAME
999 $(RESULT).cma: $(REAL_IMPL_INTF) $(MAKEDLL) $(EXTRADEPS) $(RESULTDEPS)
1000 $(REAL_OCAMLFIND) $(REAL_OCAMLC) -a $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@ $(REAL_IMPL)
1001
1002 $(RESULT).cmxa $(RESULT).$(EXT_LIB): $(REAL_IMPL_INTF) $(EXTRADEPS) $(RESULTDEPS)
1003 $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@ $(REAL_IMPL)
1004 else
1005 # Packing a bytecode library
1006 ifdef BYTE_OCAML
1007 $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo: $(REAL_IMPL_INTF)
1008 $(REAL_OCAMLFIND) $(REAL_OCAMLC) -pack -o $(LIB_PACK_NAME).cmo $(OCAMLLDFLAGS) $(REAL_IMPL)
1009 # Packing into a unit which can be transformed into a library
1010 # Remember the .ml's must have been compiled with -for-pack $(LIB_PACK_NAME)
1011 else
1012 $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmx: $(REAL_IMPL_INTF)
1013 $(REAL_OCAMLFIND) $(OCAMLOPT) -pack -o $(LIB_PACK_NAME).cmx $(OCAMLLDFLAGS) $(REAL_IMPL)
1014 endif
1015
1016 $(RESULT).cma: $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo $(MAKEDLL) $(EXTRADEPS) $(RESULTDEPS)
1017 $(REAL_OCAMLFIND) $(REAL_OCAMLC) -a $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@ $(LIB_PACK_NAME).cmo
1018
1019 $(RESULT).cmxa $(RESULT).$(EXT_LIB): $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmx $(EXTRADEPS) $(RESULTDEPS)
1020 $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(filter-out -custom, $(ALL_LDFLAGS)) $(OBJS_LIBS) -o $@ $(LIB_PACK_NAME).cmx
1021 endif
1022
1023 $(RES_CLIB): $(OBJ_LINK)
1024 ifndef MSVC
1025 ifneq ($(strip $(OBJ_LINK)),)
1026 $(AR) rcs $@ $(OBJ_LINK)
1027 endif
1028 else
1029 ifneq ($(strip $(OBJ_LINK)),)
1030 lib -nologo -debugtype:cv -out:$(RES_CLIB) $(OBJ_LINK)
1031 endif
1032 endif
1033
1034 .mli.cmi: $(EXTRADEPS)
1035 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
1036 if [ -z "$$pp" ]; then \
1037 $(ECHO) $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
1038 -c $(THREAD_FLAG) $(ANNOT_FLAG) \
1039 $(OCAMLFLAGS) $(INCFLAGS) $<; \
1040 $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
1041 -c $(THREAD_FLAG) $(ANNOT_FLAG) \
1042 $(OCAMLFLAGS) $(INCFLAGS) $<; \
1043 else \
1044 $(ECHO) $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
1045 -c -pp \"$$pp $(PPFLAGS)\" $(THREAD_FLAG) $(ANNOT_FLAG) \
1046 $(OCAMLFLAGS) $(INCFLAGS) $<; \
1047 $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
1048 -c -pp "$$pp $(PPFLAGS)" $(THREAD_FLAG) $(ANNOT_FLAG) \
1049 $(OCAMLFLAGS) $(INCFLAGS) $<; \
1050 fi
1051
1052 .ml.cmi .ml.$(EXT_OBJ) .ml.cmx .ml.cmo: $(EXTRADEPS)
1053 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
1054 if [ -z "$$pp" ]; then \
1055 $(ECHO) $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
1056 -c $(ALL_OCAMLCFLAGS) $<; \
1057 $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
1058 -c $(ALL_OCAMLCFLAGS) $<; \
1059 else \
1060 $(ECHO) $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
1061 -c -pp \"$$pp $(PPFLAGS)\" $(ALL_OCAMLCFLAGS) $<; \
1062 $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
1063 -c -pp "$$pp $(PPFLAGS)" $(ALL_OCAMLCFLAGS) $<; \
1064 fi
1065
1066 .PRECIOUS: %.ml
1067 %.ml: %.mll
1068 $(OCAMLLEX) $(LFLAGS) $<
1069
1070 .PRECIOUS: %.ml %.mli
1071 %.ml %.mli: %.mly
1072 $(OCAMLYACC) $(YFLAGS) $<
1073 $(QUIET)pp=`sed -n -e 's/.*(\*pp \([^*]*\) \*).*/\1/p;q' $<`; \
1074 if [ ! -z "$$pp" ]; then \
1075 mv $*.ml $*.ml.temporary; \
1076 echo "(*pp $$pp $(PPFLAGS)*)" > $*.ml; \
1077 cat $*.ml.temporary >> $*.ml; \
1078 rm $*.ml.temporary; \
1079 mv $*.mli $*.mli.temporary; \
1080 echo "(*pp $$pp $(PPFLAGS)*)" > $*.mli; \
1081 cat $*.mli.temporary >> $*.mli; \
1082 rm $*.mli.temporary; \
1083 fi
1084
1085
1086 .PRECIOUS: %.ml
1087 %.ml: %.rep
1088 $(CAMELEON_REPORT) $(CAMELEON_REPORT_FLAGS) -gen $<
1089
1090 .PRECIOUS: %.ml
1091 %.ml: %.zog
1092 $(CAMELEON_ZOGGY) $(CAMELEON_ZOGGY_FLAGS) -impl $< > $@
1093
1094 .PRECIOUS: %.ml
1095 %.ml: %.glade
1096 $(OCAML_GLADECC) $(OCAML_GLADECC_FLAGS) $< > $@
1097
1098 .PRECIOUS: %.ml %.mli
1099 %.ml %.mli: %.oxridl
1100 $(OXRIDL) $<
1101
1102 .PRECIOUS: %.ml %.mli %_stubs.c %.h
1103 %.ml %.mli %_stubs.c %.h: %.idl
1104 $(CAMLIDL) $(MAYBE_IDL_HEADER) $(IDLFLAGS) \
1105 $(CAMLIDLFLAGS) $<
1106 $(QUIET)if [ $(NOIDLHEADER) ]; then touch $*.h; fi
1107
1108 .c.$(EXT_OBJ):
1109 $(OCAMLC) -c -cc "$(CC)" -ccopt "$(CFLAGS) \
1110 $(CPPFLAGS) $(CPPFLAGS_WIN32) \
1111 $(CFLAGS_WIN32) $(CINCFLAGS) $(CFLAG_O)$@ " $<
1112
1113 .m.$(EXT_OBJ):
1114 $(CC) -c $(CFLAGS) $(CINCFLAGS) $(CPPFLAGS) \
1115 -I'$(OCAMLLIBPATH)' \
1116 $< $(CFLAG_O)$@
1117
1118 .$(EXT_CXX).$(EXT_OBJ):
1119 $(CXX) -c $(CXXFLAGS) $(CINCFLAGS) $(CPPFLAGS) \
1120 -I'$(OCAMLLIBPATH)' \
1121 $< $(CFLAG_O)$@
1122
1123 $(MLDEPDIR)/%.d: %.ml
1124 $(QUIET)if [ ! -d $(@D) ]; then mkdir -p $(@D); fi
1125 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
1126 if [ -z "$$pp" ]; then \
1127 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
1128 $(DINCFLAGS) $< \> $@; \
1129 $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
1130 $(DINCFLAGS) $< > $@; \
1131 else \
1132 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
1133 -pp \"$$pp $(PPFLAGS)\" $(DINCFLAGS) $< \> $@; \
1134 $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
1135 -pp "$$pp $(PPFLAGS)" $(DINCFLAGS) $< > $@; \
1136 fi
1137
1138 $(BCDIDIR)/%.di $(NCDIDIR)/%.di: %.mli
1139 $(QUIET)if [ ! -d $(@D) ]; then mkdir -p $(@D); fi
1140 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
1141 if [ -z "$$pp" ]; then \
1142 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) $(DINCFLAGS) $< \> $@; \
1143 $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) $(DINCFLAGS) $< > $@; \
1144 else \
1145 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) \
1146 -pp \"$$pp $(PPFLAGS)\" $(DINCFLAGS) $< \> $@; \
1147 $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) \
1148 -pp "$$pp $(PPFLAGS)" $(DINCFLAGS) $< > $@; \
1149 fi
1150
1151 $(DOC_DIR)/$(RESULT)/html:
1152 mkdir -p $@
1153
1154 $(DOC_DIR)/$(RESULT)/html/index.html: $(DOC_DIR)/$(RESULT)/html $(DOC_FILES)
1155 rm -rf $</*
1156 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $(FIRST_DOC_FILE)`; \
1157 if [ -z "$$pp" ]; then \
1158 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -html -d $< $(OCAMLDOCFLAGS) $(INCFLAGS) $(DOC_FILES); \
1159 $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -html -d $< $(OCAMLDOCFLAGS) $(INCFLAGS) $(DOC_FILES); \
1160 else \
1161 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -pp \"$$pp $(PPFLAGS)\" -html -d $< $(OCAMLDOCFLAGS) \
1162 $(INCFLAGS) $(DOC_FILES); \
1163 $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -pp "$$pp $(PPFLAGS)" -html -d $< $(OCAMLDOCFLAGS) \
1164 $(INCFLAGS) $(DOC_FILES); \
1165 fi
1166
1167 $(DOC_DIR)/$(RESULT)/latex:
1168 mkdir -p $@
1169
1170 $(DOC_DIR)/$(RESULT)/latex/doc.tex: $(DOC_DIR)/$(RESULT)/latex $(DOC_FILES)
1171 rm -rf $</*
1172 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $(FIRST_DOC_FILE)`; \
1173 if [ -z "$$pp" ]; then \
1174 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -latex $(OCAMLDOCFLAGS) $(INCFLAGS) \
1175 $(DOC_FILES) -o $@; \
1176 $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -latex $(OCAMLDOCFLAGS) $(INCFLAGS) $(DOC_FILES) \
1177 -o $@; \
1178 else \
1179 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -pp \"$$pp $(PPFLAGS)\" -latex $(OCAMLDOCFLAGS) \
1180 $(INCFLAGS) $(DOC_FILES) -o $@; \
1181 $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -pp "$$pp $(PPFLAGS)" -latex $(OCAMLDOCFLAGS) \
1182 $(INCFLAGS) $(DOC_FILES) -o $@; \
1183 fi
1184
1185 $(DOC_DIR)/$(RESULT)/latex/doc.ps: $(DOC_DIR)/$(RESULT)/latex/doc.tex
1186 cd $(DOC_DIR)/$(RESULT)/latex && \
1187 $(LATEX) doc.tex && \
1188 $(LATEX) doc.tex && \
1189 $(DVIPS) $(DVIPSFLAGS) doc.dvi -o $(@F)
1190
1191 $(DOC_DIR)/$(RESULT)/latex/doc.pdf: $(DOC_DIR)/$(RESULT)/latex/doc.ps
1192 cd $(DOC_DIR)/$(RESULT)/latex && $(PS2PDF) $(<F)
1193
1194 define make_subproj
1195 .PHONY:
1196 subproj_$(1):
1197 $$(eval $$(call PROJ_$(1)))
1198 $(QUIET)if [ "$(SUBTARGET)" != "all" ]; then \
1199 $(MAKE) -f $(OCAMLMAKEFILE) $(SUBTARGET); \
1200 fi
1201 endef
1202
1203 $(foreach subproj,$(SUBPROJS),$(eval $(call make_subproj,$(subproj))))
1204
1205 .PHONY:
1206 subprojs: $(SUBPROJS:%=subproj_%)
1207
1208 ###########################################################################
1209 # (UN)INSTALL RULES FOR LIBRARIES
1210
1211 .PHONY: libinstall
1212 libinstall: all
1213 $(QUIET)printf "\nInstalling library with ocamlfind\n"
1214 $(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META $(LIBINSTALL_FILES)
1215 $(QUIET)printf "\nInstallation successful.\n"
1216
1217 .PHONY: libinstall-byte-code
1218 libinstall-byte-code: all
1219 $(QUIET)printf "\nInstalling byte-code library with ocamlfind\n"
1220 $(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META \
1221 $(filter-out $(RESULT).$(EXT_LIB) $(RESULT).cmxa, $(LIBINSTALL_FILES))
1222 $(QUIET)printf "\nInstallation successful.\n"
1223
1224 .PHONY: libinstall-native-code
1225 libinstall-native-code: all
1226 $(QUIET)printf "\nInstalling native-code library with ocamlfind\n"
1227 $(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META \
1228 $(filter-out $(DLLSONAME) $(RESULT).cma, $(LIBINSTALL_FILES))
1229 $(QUIET)printf "\nInstallation successful.\n"
1230
1231 .PHONY: libuninstall
1232 libuninstall:
1233 $(QUIET)printf "\nUninstalling library with ocamlfind\n"
1234 $(OCAMLFIND) remove $(OCAMLFIND_INSTFLAGS) $(RESULT)
1235 $(QUIET)printf "\nUninstallation successful.\n"
1236
1237 .PHONY: rawinstall
1238 rawinstall: all
1239 $(QUIET)printf "\nInstalling library to: $(OCAML_LIB_INSTALL)\n"
1240 -install -d $(OCAML_LIB_INSTALL)
1241 for i in $(LIBINSTALL_FILES); do \
1242 if [ -f $$i ]; then \
1243 install -c -m 0644 $$i $(OCAML_LIB_INSTALL); \
1244 fi; \
1245 done
1246 $(QUIET)printf "\nInstallation successful.\n"
1247
1248 .PHONY: rawuninstall
1249 rawuninstall:
1250 $(QUIET)printf "\nUninstalling library from: $(OCAML_LIB_INSTALL)\n"
1251 cd $(OCAML_LIB_INSTALL) && rm $(notdir $(LIBINSTALL_FILES))
1252 $(QUIET)printf "\nUninstallation successful.\n"
1253
1254 ###########################################################################
1255 # MAINTENANCE RULES
1256
1257 .PHONY: clean
1258 clean::
1259 rm -f $(TARGETS) $(TRASH)
1260 rm -rf $(BCDIDIR) $(NCDIDIR) $(MLDEPDIR)
1261
1262 .PHONY: cleanup
1263 cleanup::
1264 rm -f $(NONEXECS) $(TRASH)
1265 rm -rf $(BCDIDIR) $(NCDIDIR) $(MLDEPDIR)
1266
1267 .PHONY: clean-doc
1268 clean-doc::
1269 rm -rf $(DOC_DIR)/$(RESULT)
1270
1271 .PHONY: clean-all
1272 clean-all:: clean clean-doc
1273
1274 .PHONY: nobackup
1275 nobackup:
1276 rm -f *.bak *~ *.dup
0 (*
1 * Copyright 2003-2011 Savonet team
2 *
3 * This file is part of ocaml-dssi.
4 *
5 * Ocaml-mad is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * Ocaml-mad is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with Ocaml-mad; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *)
19
20 type event =
21 | Event_system of int * int
22 | Event_result of int * int
23 (* Event_note is forbidden by DSSI specification. *)
24 | Event_note_on of int * int * int
25 | Event_note_off of int * int * int
26
27 module Plugin =
28 struct
29 type t
30
31 exception Not_a_plugin
32
33 external load : string -> t = "ocaml_dssi_open"
34
35 external unload : t -> unit = "ocaml_dssi_close"
36 end
37
38 module Descriptor =
39 struct
40 type t
41
42 exception Not_implemented
43
44 external descriptor : Plugin.t -> int -> t = "ocaml_dssi_descriptor"
45
46 let rec descriptors p n =
47 try
48 let d = descriptor p n in
49 let dd = descriptors p (n+1) in
50 d::dd
51 with
52 | Not_found -> []
53
54 let descriptors p = Array.of_list (descriptors p 0)
55
56 external api_version : t -> int = "ocaml_dssi_api_version"
57
58 external ladspa : t -> Ladspa.Descriptor.t = "ocaml_dssi_ladspa"
59
60 external configure : t -> Ladspa.Descriptor.instance -> string -> string -> string = "ocaml_dssi_configure"
61
62 external get_program : t -> Ladspa.Descriptor.instance -> int -> int * int * string = "ocaml_dssi_get_program"
63
64 external select_program : t -> Ladspa.Descriptor.instance -> int -> int -> unit = "ocaml_dssi_select_program"
65
66 external get_midi_controller : t -> Ladspa.Descriptor.instance -> int -> int = "ocaml_dssi_get_midi_controller_for_port"
67
68 external can_run_synth : t -> bool = "ocaml_dssi_can_run_synth"
69
70 external can_run_synth_adding : t -> bool = "ocaml_dssi_can_run_synth_adding"
71
72 external run_synth : t -> bool -> Ladspa.Descriptor.instance -> int -> (int * event) array -> unit = "ocaml_dssi_run_synth"
73
74 external can_run_multiple_synths : t -> bool = "ocaml_dssi_can_run_multiple_synths"
75
76 external can_run_multiple_synths_adding : t -> bool = "ocaml_dssi_can_run_multiple_synths_adding"
77
78 external run_multiple_synths : t -> bool -> Ladspa.Descriptor.instance array -> int -> (int * event) array array -> unit = "ocaml_dssi_run_multiple_synths"
79
80 let run_multiple_synths d ?(adding=false) i n e =
81 Array.iter (fun i -> Ladspa.Descriptor.pre_run i) i;
82 if adding then
83 (
84 try
85 run_multiple_synths d true i n e;
86 Array.iter (fun i -> Ladspa.Descriptor.post_run i) i
87 with
88 | Not_implemented ->
89 run_multiple_synths d false i n e;
90 Array.iter (fun i -> Ladspa.Descriptor.post_run_adding i) i
91 )
92 else
93 (
94 run_multiple_synths d false i n e;
95 Array.iter (fun i -> Ladspa.Descriptor.post_run i) i
96 )
97
98 let run_synth d ?(adding=false) i n e =
99 Ladspa.Descriptor.pre_run i;
100 try
101 (
102 try
103 run_synth d adding i n e;
104 Ladspa.Descriptor.post_run i
105 with
106 | Not_implemented ->
107 if adding then
108 (
109 run_synth d false i n e;
110 Ladspa.Descriptor.post_run_adding i
111 )
112 else
113 raise Not_implemented
114 )
115 with
116 | Not_implemented ->
117 run_multiple_synths d ~adding [|i|] n [|e|]
118 end
119
120 let init () =
121 Callback.register_exception "ocaml_dssi_exn_not_found" Not_found;
122 Callback.register_exception "ocaml_dssi_exn_not_a_plugin" Plugin.Not_a_plugin;
123 Callback.register_exception "ocaml_dssi_exn_not_implemented" Descriptor.Not_implemented
124
125 let () = init ()
0 /*
1 * OCaml bindings for DSSI
2 *
3 * Copyright 2003-2011 Savonet team
4 *
5 * This file is part of Ocaml-mad.
6 * The libmad's stubs are based on madlld (see README for details).
7 *
8 * Ocaml-mad is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * Ocaml-mad is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with Ocaml-mad; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23
24 #include <caml/alloc.h>
25 #include <caml/callback.h>
26 #include <caml/custom.h>
27 #include <caml/fail.h>
28 #include <caml/memory.h>
29 #include <caml/mlvalues.h>
30 #include <caml/signals.h>
31
32 #include <assert.h>
33 #include <dlfcn.h>
34
35 #include <ladspa.h>
36 #include <dssi.h>
37 #include <ocaml_ladspa.h>
38
39 #define Descr_val(v) ((DSSI_Descriptor*)v)
40 #define Val_descr(d) ((value)d)
41
42 CAMLprim value ocaml_dssi_open(value fname)
43 {
44 void *handle = dlopen(String_val(fname), RTLD_LAZY);
45 DSSI_Descriptor_Function dssi_descriptor;
46
47 if (!handle)
48 caml_raise_constant(*caml_named_value("ocaml_dssi_exn_not_a_plugin"));
49 dssi_descriptor = (DSSI_Descriptor_Function)dlsym((void*)handle, "dssi_descriptor");
50 if (dlerror() != NULL || !dssi_descriptor)
51 {
52 dlclose(handle);
53 caml_raise_constant(*caml_named_value("ocaml_dssi_exn_not_a_plugin"));
54 }
55
56 return (value)handle;
57 }
58
59 CAMLprim value ocaml_dssi_close(value handle)
60 {
61 dlclose((void*)handle);
62
63 return Val_unit;
64 }
65
66 CAMLprim value ocaml_dssi_descriptor(value handle, value n)
67 {
68 DSSI_Descriptor_Function dssi_descriptor = (DSSI_Descriptor_Function)dlsym((void*)handle, "dssi_descriptor");
69 const DSSI_Descriptor *d = dssi_descriptor(Int_val(n));
70
71 if (!d)
72 caml_raise_constant(*caml_named_value("ocaml_dssi_exn_not_found"));
73
74 return Val_descr(d);
75 }
76
77 CAMLprim value ocaml_dssi_api_version(value d)
78 {
79 return Val_int(Descr_val(d)->DSSI_API_Version);
80 }
81
82 CAMLprim value ocaml_dssi_ladspa(value d)
83 {
84 return Val_LADSPA_descr(Descr_val(d)->LADSPA_Plugin);
85 }
86
87 CAMLprim value ocaml_dssi_configure(value d, value i, value key, value v)
88 {
89 char *ans;
90
91 if (!Descr_val(d)->configure)
92 caml_raise_constant(*caml_named_value("ocaml_dssi_exn_not_implemented"));
93 ans = Descr_val(d)->configure(Instance_val(i)->handle, String_val(key), String_val(v));
94 /* TODO */
95 assert(ans);
96 value ret = caml_copy_string(ans);
97 free(ans);
98
99 return ret;
100 }
101
102 CAMLprim value ocaml_dssi_get_program(value d, value i, value n)
103 {
104 CAMLparam1(d);
105 CAMLlocal1(ret);
106 const DSSI_Program_Descriptor *ans;
107
108 if (!Descr_val(d)->get_program)
109 caml_raise_constant(*caml_named_value("ocaml_dssi_exn_not_implemented"));
110 ans = Descr_val(d)->get_program(Instance_val(i)->handle, Int_val(n));
111 if (!ans)
112 caml_raise_constant(*caml_named_value("ocaml_dssi_exn_not_found"));
113
114 ret = caml_alloc_tuple(3);
115 Store_field(ret, 0, Val_int(ans->Bank));
116 Store_field(ret, 1, Val_int(ans->Program));
117 Store_field(ret, 2, caml_copy_string(ans->Name));
118 CAMLreturn(ret);
119 }
120
121 CAMLprim value ocaml_dssi_select_program(value d, value i, value bank, value program)
122 {
123 if (!Descr_val(d)->select_program)
124 caml_raise_constant(*caml_named_value("ocaml_dssi_exn_not_implemented"));
125 Descr_val(d)->select_program(Instance_val(i)->handle, Int_val(bank), Int_val(program));
126 return Val_unit;
127 }
128
129 CAMLprim value ocaml_dssi_get_midi_controller_for_port(value d, value i, value port)
130 {
131 int ans;
132
133 if (!Descr_val(d)->get_midi_controller_for_port)
134 caml_raise_constant(*caml_named_value("ocaml_dssi_exn_not_implemented"));
135 ans = Descr_val(d)->get_midi_controller_for_port(Instance_val(i)->handle, Int_val(port));
136
137 return Val_int(ans);
138 }
139
140 static snd_seq_event_t* events_of_array(value ev)
141 {
142 int event_count = Wosize_val(ev);
143 snd_seq_event_t *events = malloc(event_count * sizeof(snd_seq_event_t));
144 int i;
145 value e;
146
147 for (i = 0; i < event_count; i++)
148 {
149 events[i].time.tick = Int_val(Field(Field(ev, i), 0));
150 e = Field(Field(ev, i), 1);
151
152 if (Is_block(e))
153 {
154 switch (Tag_val(e))
155 {
156 case 2:
157 events[i].type = SND_SEQ_EVENT_NOTEON;
158 events[i].data.note.channel = Int_val(Field(e, 0));
159 events[i].data.note.note = Int_val(Field(e, 1));
160 events[i].data.note.velocity = Int_val(Field(e, 2));
161 break;
162
163 case 3:
164 events[i].type = SND_SEQ_EVENT_NOTEOFF;
165 events[i].data.note.channel = Int_val(Field(e, 0));
166 events[i].data.note.note = Int_val(Field(e, 1));
167 events[i].data.note.velocity = Int_val(Field(e, 2));
168 break;
169 }
170 }
171 }
172
173 return events;
174 }
175
176 CAMLprim value ocaml_dssi_can_run_synth(value d)
177 {
178 return Val_bool(Descr_val(d)->run_synth);
179 }
180
181 CAMLprim value ocaml_dssi_can_run_synth_adding(value d)
182 {
183 return Val_bool(Descr_val(d)->run_synth_adding);
184 }
185
186 CAMLprim value ocaml_dssi_run_synth(value d, value vadd, value i, value sc, value ev)
187 {
188 DSSI_Descriptor* descr = Descr_val(d);
189 LADSPA_Handle h = Instance_val(i)->handle;
190 int sample_count = Int_val(sc);
191 unsigned long event_count = Wosize_val(ev);
192 snd_seq_event_t *events;
193 int add = Bool_val(vadd);
194
195 if ((!add && !Descr_val(d)->run_synth) || (add && !Descr_val(d)->run_synth_adding))
196 caml_raise_constant(*caml_named_value("ocaml_dssi_exn_not_implemented"));
197 events = events_of_array(ev);
198
199 caml_enter_blocking_section();
200 if (add)
201 descr->run_synth_adding(h, sample_count, events, event_count);
202 else
203 descr->run_synth(h, sample_count, events, event_count);
204 caml_leave_blocking_section();
205
206 free(events);
207 return Val_unit;
208 }
209
210 CAMLprim value ocaml_dssi_can_run_multiple_synths(value d)
211 {
212 return Val_bool(Descr_val(d)->run_multiple_synths);
213 }
214
215 CAMLprim value ocaml_dssi_can_run_multiple_synths_adding(value d)
216 {
217 return Val_bool(Descr_val(d)->run_multiple_synths_adding);
218 }
219
220
221 CAMLprim value ocaml_dssi_run_multiple_synths(value d, value vadd, value inst, value sc, value ev)
222 {
223 DSSI_Descriptor* descr = Descr_val(d);
224 int sample_count = Int_val(sc);
225 int instance_count = Wosize_val(inst);
226 LADSPA_Handle *h;
227 unsigned long *event_count;
228 snd_seq_event_t **events;
229 int i;
230 int add = Bool_val(vadd);
231
232 if ((!add && !Descr_val(d)->run_multiple_synths) || (add && !Descr_val(d)->run_multiple_synths_adding))
233 caml_raise_constant(*caml_named_value("ocaml_dssi_exn_not_implemented"));
234 if (Wosize_val(ev) != instance_count)
235 caml_invalid_argument("the number of events should be the same as the number of instances");
236
237 h = malloc(instance_count * sizeof(LADSPA_Handle));
238 event_count = malloc(instance_count * sizeof(unsigned long));
239 events = malloc(instance_count * sizeof(snd_seq_event_t*));
240 for (i = 0; i < instance_count; i++)
241 {
242 h[i] = Instance_val(Field(inst,i))->handle;
243 event_count[i] = Wosize_val(Field(ev,i));
244 events[i] = events_of_array(Field(ev,i));
245 }
246
247 caml_enter_blocking_section();
248 if (add)
249 descr->run_multiple_synths_adding(instance_count, h, sample_count, events, event_count);
250 else
251 descr->run_multiple_synths(instance_count, h, sample_count, events, event_count);
252 caml_leave_blocking_section();
253
254 for (i = 0; i < instance_count; i++)
255 free(events[i]);
256 free(events);
257 free(event_count);
258 free(h);
259 return Val_unit;
260 }