Codebase list ocaml-faad / 84b26c6
New upstream version 0.5.0 Stephane Glondu 2 years ago
38 changed file(s) with 216 addition(s) and 15182 deletion(s). Raw diff Collapse all Expand all
0 *~
1 _build
2 *.byte
3 *.native
4 _tests
5 .merlin
6 *.install
0 language: c
1 sudo: false
2 addons:
3 apt:
4 packages:
5 - ocaml-nox
6 - ocaml-findlib
7 - libfaad-dev
8
9 script: ./bootstrap && ./configure && make
0 0.5.0 (07-10-2020)
1 =====
2 * Convert to Unix.read style API.
3 * Converted to dune for building.
4
05 0.4.0 (18-08-2018)
16 =====
27 * Updated mp4ff code, removed drms code (consistent with VLC)
+0
-29
Makefile.in less more
0 PROGNAME := ocaml-faad
1 DISTFILES := @AUTOCONF_INSTALL_FILES@ CHANGES COPYING Makefile.in README \
2 bootstrap configure configure.ac config.h.in \
3 src/*.ml src/*.mli src/*.c src/Makefile.in src/META.in \
4 src/OCamlMakefile src/*.h example/*.ml example/Makefile \
5 example/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/faad/html doc
19 rm -rf src/doc
20
21 dist:
22 rm -rf $(PROGNAME)-$(VERSION)
23 mkdir $(PROGNAME)-$(VERSION)
24 cp -R -L --parents $(DISTFILES) $(PROGNAME)-$(VERSION)
25 tar zcvf ../$(PROGNAME)-$(VERSION).tar.gz $(PROGNAME)-$(VERSION)
26 rm -rf $(PROGNAME)-$(VERSION)
27
28 .PHONY: dist doc
+0
-32
README less more
0 ocaml-faad
1 ==========
2
3 This package contains an O'Caml interface for the AAC audio decoder, otherwise known as libfaad.
4
5 Please read the COPYING file before using this software.
6
7 Prerequisites:
8 ==============
9
10 - ocaml >= 3.0.6 (haven't tried earlier versions)
11
12 - libfaad >= 2.5 (haven't tried earlier versions)
13
14 - findlib >= 0.8.1 (haven't tried earlier versions)
15
16 Compilation:
17 ============
18
19 $ make all
20
21 This should build both the native and the byte-code version of the
22 extension library.
23
24 Installation:
25 =============
26
27 $ make install
28
29 This should install the library file (using ocamlfind) in the
30 appropriate place.
31
0 # ocaml-faad
1
2 This package contains an O'Caml interface for the AAC audio decoder, otherwise known as libfaad.
3
4 Please read the COPYING file before using this software.
5
6 ## Prerequisites:
7
8 - ocaml >= 3.0.6 (haven't tried earlier versions)
9
10 - libfaad >= 2.5 (haven't tried earlier versions)
11
12 - findlib >= 0.8.1 (haven't tried earlier versions)
13
14 - dune >= 2.0
15
16 ## Compilation:
17
18 ```sh
19 $ dune build
20 ```
21
22 This should build both the native and the byte-code version of the
23 extension library.
24
25 ## Installation:
26
27 Via `opam`:
28
29 ```sh
30 $ opam install faad
31 ```
32
33 Via `dune` (for developers):
34
35 ```sh
36 $ dune install
37 ```
38
39 This should install the library file (using ocamlfind) in the
40 appropriate place.
41
+0
-17
bootstrap less more
0 #!/bin/sh -e
1
2 if [ -d m4 ]; then
3 OPTIONS="-I m4"
4 aclocal -I m4
5 fi
6 autoreconf -f -i $OPTIONS $1
7 # autoconf maintainers have not yet implemented
8 # a function to install missing files from autoconf
9 # itself, so we need to fake a call to automake here..
10 automake -a -c -f 2>/dev/null || true
11 if [ -d examples ]; then
12 if [ -f examples/configure.ac ]; then
13 cd examples
14 autoreconf -f -i
15 fi
16 fi
+0
-1480
config.guess less more
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-02-24'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <https://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25 #
26 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
27 #
28 # You can get the latest version of this script from:
29 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
30 #
31 # Please send patches to <config-patches@gnu.org>.
32
33
34 me=`echo "$0" | sed -e 's,.*/,,'`
35
36 usage="\
37 Usage: $0 [OPTION]
38
39 Output the configuration name of the system \`$me' is run on.
40
41 Options:
42 -h, --help print this help, then exit
43 -t, --time-stamp print date of last modification, then exit
44 -v, --version print version number, then exit
45
46 Report bugs and patches to <config-patches@gnu.org>."
47
48 version="\
49 GNU config.guess ($timestamp)
50
51 Originally written by Per Bothner.
52 Copyright 1992-2018 Free Software Foundation, Inc.
53
54 This is free software; see the source for copying conditions. There is NO
55 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
56
57 help="
58 Try \`$me --help' for more information."
59
60 # Parse command line
61 while test $# -gt 0 ; do
62 case $1 in
63 --time-stamp | --time* | -t )
64 echo "$timestamp" ; exit ;;
65 --version | -v )
66 echo "$version" ; exit ;;
67 --help | --h* | -h )
68 echo "$usage"; exit ;;
69 -- ) # Stop option processing
70 shift; break ;;
71 - ) # Use stdin as input.
72 break ;;
73 -* )
74 echo "$me: invalid option $1$help" >&2
75 exit 1 ;;
76 * )
77 break ;;
78 esac
79 done
80
81 if test $# != 0; then
82 echo "$me: too many arguments$help" >&2
83 exit 1
84 fi
85
86 trap 'exit 1' 1 2 15
87
88 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
89 # compiler to aid in system detection is discouraged as it requires
90 # temporary files to be created and, as you can see below, it is a
91 # headache to deal with in a portable fashion.
92
93 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
94 # use `HOST_CC' if defined, but it is deprecated.
95
96 # Portable tmp directory creation inspired by the Autoconf team.
97
98 set_cc_for_build='
99 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
100 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
101 : ${TMPDIR=/tmp} ;
102 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
103 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
104 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
105 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
106 dummy=$tmp/dummy ;
107 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108 case $CC_FOR_BUILD,$HOST_CC,$CC in
109 ,,) echo "int x;" > "$dummy.c" ;
110 for c in cc gcc c89 c99 ; do
111 if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
112 CC_FOR_BUILD="$c"; break ;
113 fi ;
114 done ;
115 if test x"$CC_FOR_BUILD" = x ; then
116 CC_FOR_BUILD=no_compiler_found ;
117 fi
118 ;;
119 ,,*) CC_FOR_BUILD=$CC ;;
120 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
121 esac ; set_cc_for_build= ;'
122
123 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
124 # (ghazi@noc.rutgers.edu 1994-08-24)
125 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
126 PATH=$PATH:/.attbin ; export PATH
127 fi
128
129 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
130 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
131 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
132 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133
134 case "$UNAME_SYSTEM" in
135 Linux|GNU|GNU/*)
136 # If the system lacks a compiler, then just pick glibc.
137 # We could probably try harder.
138 LIBC=gnu
139
140 eval "$set_cc_for_build"
141 cat <<-EOF > "$dummy.c"
142 #include <features.h>
143 #if defined(__UCLIBC__)
144 LIBC=uclibc
145 #elif defined(__dietlibc__)
146 LIBC=dietlibc
147 #else
148 LIBC=gnu
149 #endif
150 EOF
151 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
152
153 # If ldd exists, use it to detect musl libc.
154 if command -v ldd >/dev/null && \
155 ldd --version 2>&1 | grep -q ^musl
156 then
157 LIBC=musl
158 fi
159 ;;
160 esac
161
162 # Note: order is significant - the case branches are not exclusive.
163
164 case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
165 *:NetBSD:*:*)
166 # NetBSD (nbsd) targets should (where applicable) match one or
167 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
168 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
169 # switched to ELF, *-*-netbsd* would select the old
170 # object file format. This provides both forward
171 # compatibility and a consistent mechanism for selecting the
172 # object file format.
173 #
174 # Note: NetBSD doesn't particularly care about the vendor
175 # portion of the name. We always set it to "unknown".
176 sysctl="sysctl -n hw.machine_arch"
177 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
178 "/sbin/$sysctl" 2>/dev/null || \
179 "/usr/sbin/$sysctl" 2>/dev/null || \
180 echo unknown)`
181 case "$UNAME_MACHINE_ARCH" in
182 armeb) machine=armeb-unknown ;;
183 arm*) machine=arm-unknown ;;
184 sh3el) machine=shl-unknown ;;
185 sh3eb) machine=sh-unknown ;;
186 sh5el) machine=sh5le-unknown ;;
187 earmv*)
188 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
189 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
190 machine="${arch}${endian}"-unknown
191 ;;
192 *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
193 esac
194 # The Operating System including object format, if it has switched
195 # to ELF recently (or will in the future) and ABI.
196 case "$UNAME_MACHINE_ARCH" in
197 earm*)
198 os=netbsdelf
199 ;;
200 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
201 eval "$set_cc_for_build"
202 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
203 | grep -q __ELF__
204 then
205 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
206 # Return netbsd for either. FIX?
207 os=netbsd
208 else
209 os=netbsdelf
210 fi
211 ;;
212 *)
213 os=netbsd
214 ;;
215 esac
216 # Determine ABI tags.
217 case "$UNAME_MACHINE_ARCH" in
218 earm*)
219 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
220 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
221 ;;
222 esac
223 # The OS release
224 # Debian GNU/NetBSD machines have a different userland, and
225 # thus, need a distinct triplet. However, they do not need
226 # kernel version information, so it can be replaced with a
227 # suitable tag, in the style of linux-gnu.
228 case "$UNAME_VERSION" in
229 Debian*)
230 release='-gnu'
231 ;;
232 *)
233 release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
234 ;;
235 esac
236 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
237 # contains redundant information, the shorter form:
238 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
239 echo "$machine-${os}${release}${abi}"
240 exit ;;
241 *:Bitrig:*:*)
242 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
243 echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
244 exit ;;
245 *:OpenBSD:*:*)
246 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
247 echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
248 exit ;;
249 *:LibertyBSD:*:*)
250 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
251 echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
252 exit ;;
253 *:MidnightBSD:*:*)
254 echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
255 exit ;;
256 *:ekkoBSD:*:*)
257 echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
258 exit ;;
259 *:SolidBSD:*:*)
260 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
261 exit ;;
262 macppc:MirBSD:*:*)
263 echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
264 exit ;;
265 *:MirBSD:*:*)
266 echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
267 exit ;;
268 *:Sortix:*:*)
269 echo "$UNAME_MACHINE"-unknown-sortix
270 exit ;;
271 *:Redox:*:*)
272 echo "$UNAME_MACHINE"-unknown-redox
273 exit ;;
274 mips:OSF1:*.*)
275 echo mips-dec-osf1
276 exit ;;
277 alpha:OSF1:*:*)
278 case $UNAME_RELEASE in
279 *4.0)
280 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
281 ;;
282 *5.*)
283 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
284 ;;
285 esac
286 # According to Compaq, /usr/sbin/psrinfo has been available on
287 # OSF/1 and Tru64 systems produced since 1995. I hope that
288 # covers most systems running today. This code pipes the CPU
289 # types through head -n 1, so we only detect the type of CPU 0.
290 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
291 case "$ALPHA_CPU_TYPE" in
292 "EV4 (21064)")
293 UNAME_MACHINE=alpha ;;
294 "EV4.5 (21064)")
295 UNAME_MACHINE=alpha ;;
296 "LCA4 (21066/21068)")
297 UNAME_MACHINE=alpha ;;
298 "EV5 (21164)")
299 UNAME_MACHINE=alphaev5 ;;
300 "EV5.6 (21164A)")
301 UNAME_MACHINE=alphaev56 ;;
302 "EV5.6 (21164PC)")
303 UNAME_MACHINE=alphapca56 ;;
304 "EV5.7 (21164PC)")
305 UNAME_MACHINE=alphapca57 ;;
306 "EV6 (21264)")
307 UNAME_MACHINE=alphaev6 ;;
308 "EV6.7 (21264A)")
309 UNAME_MACHINE=alphaev67 ;;
310 "EV6.8CB (21264C)")
311 UNAME_MACHINE=alphaev68 ;;
312 "EV6.8AL (21264B)")
313 UNAME_MACHINE=alphaev68 ;;
314 "EV6.8CX (21264D)")
315 UNAME_MACHINE=alphaev68 ;;
316 "EV6.9A (21264/EV69A)")
317 UNAME_MACHINE=alphaev69 ;;
318 "EV7 (21364)")
319 UNAME_MACHINE=alphaev7 ;;
320 "EV7.9 (21364A)")
321 UNAME_MACHINE=alphaev79 ;;
322 esac
323 # A Pn.n version is a patched version.
324 # A Vn.n version is a released version.
325 # A Tn.n version is a released field test version.
326 # A Xn.n version is an unreleased experimental baselevel.
327 # 1.2 uses "1.2" for uname -r.
328 echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
329 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
330 exitcode=$?
331 trap '' 0
332 exit $exitcode ;;
333 Amiga*:UNIX_System_V:4.0:*)
334 echo m68k-unknown-sysv4
335 exit ;;
336 *:[Aa]miga[Oo][Ss]:*:*)
337 echo "$UNAME_MACHINE"-unknown-amigaos
338 exit ;;
339 *:[Mm]orph[Oo][Ss]:*:*)
340 echo "$UNAME_MACHINE"-unknown-morphos
341 exit ;;
342 *:OS/390:*:*)
343 echo i370-ibm-openedition
344 exit ;;
345 *:z/VM:*:*)
346 echo s390-ibm-zvmoe
347 exit ;;
348 *:OS400:*:*)
349 echo powerpc-ibm-os400
350 exit ;;
351 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
352 echo arm-acorn-riscix"$UNAME_RELEASE"
353 exit ;;
354 arm*:riscos:*:*|arm*:RISCOS:*:*)
355 echo arm-unknown-riscos
356 exit ;;
357 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
358 echo hppa1.1-hitachi-hiuxmpp
359 exit ;;
360 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
361 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
362 if test "`(/bin/universe) 2>/dev/null`" = att ; then
363 echo pyramid-pyramid-sysv3
364 else
365 echo pyramid-pyramid-bsd
366 fi
367 exit ;;
368 NILE*:*:*:dcosx)
369 echo pyramid-pyramid-svr4
370 exit ;;
371 DRS?6000:unix:4.0:6*)
372 echo sparc-icl-nx6
373 exit ;;
374 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
375 case `/usr/bin/uname -p` in
376 sparc) echo sparc-icl-nx7; exit ;;
377 esac ;;
378 s390x:SunOS:*:*)
379 echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
380 exit ;;
381 sun4H:SunOS:5.*:*)
382 echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
383 exit ;;
384 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
385 echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
386 exit ;;
387 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
388 echo i386-pc-auroraux"$UNAME_RELEASE"
389 exit ;;
390 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
391 eval "$set_cc_for_build"
392 SUN_ARCH=i386
393 # If there is a compiler, see if it is configured for 64-bit objects.
394 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
395 # This test works for both compilers.
396 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
397 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
398 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
399 grep IS_64BIT_ARCH >/dev/null
400 then
401 SUN_ARCH=x86_64
402 fi
403 fi
404 echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
405 exit ;;
406 sun4*:SunOS:6*:*)
407 # According to config.sub, this is the proper way to canonicalize
408 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
409 # it's likely to be more like Solaris than SunOS4.
410 echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
411 exit ;;
412 sun4*:SunOS:*:*)
413 case "`/usr/bin/arch -k`" in
414 Series*|S4*)
415 UNAME_RELEASE=`uname -v`
416 ;;
417 esac
418 # Japanese Language versions have a version number like `4.1.3-JL'.
419 echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
420 exit ;;
421 sun3*:SunOS:*:*)
422 echo m68k-sun-sunos"$UNAME_RELEASE"
423 exit ;;
424 sun*:*:4.2BSD:*)
425 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
426 test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
427 case "`/bin/arch`" in
428 sun3)
429 echo m68k-sun-sunos"$UNAME_RELEASE"
430 ;;
431 sun4)
432 echo sparc-sun-sunos"$UNAME_RELEASE"
433 ;;
434 esac
435 exit ;;
436 aushp:SunOS:*:*)
437 echo sparc-auspex-sunos"$UNAME_RELEASE"
438 exit ;;
439 # The situation for MiNT is a little confusing. The machine name
440 # can be virtually everything (everything which is not
441 # "atarist" or "atariste" at least should have a processor
442 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
443 # to the lowercase version "mint" (or "freemint"). Finally
444 # the system name "TOS" denotes a system which is actually not
445 # MiNT. But MiNT is downward compatible to TOS, so this should
446 # be no problem.
447 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
448 echo m68k-atari-mint"$UNAME_RELEASE"
449 exit ;;
450 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
451 echo m68k-atari-mint"$UNAME_RELEASE"
452 exit ;;
453 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
454 echo m68k-atari-mint"$UNAME_RELEASE"
455 exit ;;
456 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
457 echo m68k-milan-mint"$UNAME_RELEASE"
458 exit ;;
459 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
460 echo m68k-hades-mint"$UNAME_RELEASE"
461 exit ;;
462 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
463 echo m68k-unknown-mint"$UNAME_RELEASE"
464 exit ;;
465 m68k:machten:*:*)
466 echo m68k-apple-machten"$UNAME_RELEASE"
467 exit ;;
468 powerpc:machten:*:*)
469 echo powerpc-apple-machten"$UNAME_RELEASE"
470 exit ;;
471 RISC*:Mach:*:*)
472 echo mips-dec-mach_bsd4.3
473 exit ;;
474 RISC*:ULTRIX:*:*)
475 echo mips-dec-ultrix"$UNAME_RELEASE"
476 exit ;;
477 VAX*:ULTRIX*:*:*)
478 echo vax-dec-ultrix"$UNAME_RELEASE"
479 exit ;;
480 2020:CLIX:*:* | 2430:CLIX:*:*)
481 echo clipper-intergraph-clix"$UNAME_RELEASE"
482 exit ;;
483 mips:*:*:UMIPS | mips:*:*:RISCos)
484 eval "$set_cc_for_build"
485 sed 's/^ //' << EOF > "$dummy.c"
486 #ifdef __cplusplus
487 #include <stdio.h> /* for printf() prototype */
488 int main (int argc, char *argv[]) {
489 #else
490 int main (argc, argv) int argc; char *argv[]; {
491 #endif
492 #if defined (host_mips) && defined (MIPSEB)
493 #if defined (SYSTYPE_SYSV)
494 printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
495 #endif
496 #if defined (SYSTYPE_SVR4)
497 printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
498 #endif
499 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
500 printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
501 #endif
502 #endif
503 exit (-1);
504 }
505 EOF
506 $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
507 dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
508 SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
509 { echo "$SYSTEM_NAME"; exit; }
510 echo mips-mips-riscos"$UNAME_RELEASE"
511 exit ;;
512 Motorola:PowerMAX_OS:*:*)
513 echo powerpc-motorola-powermax
514 exit ;;
515 Motorola:*:4.3:PL8-*)
516 echo powerpc-harris-powermax
517 exit ;;
518 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
519 echo powerpc-harris-powermax
520 exit ;;
521 Night_Hawk:Power_UNIX:*:*)
522 echo powerpc-harris-powerunix
523 exit ;;
524 m88k:CX/UX:7*:*)
525 echo m88k-harris-cxux7
526 exit ;;
527 m88k:*:4*:R4*)
528 echo m88k-motorola-sysv4
529 exit ;;
530 m88k:*:3*:R3*)
531 echo m88k-motorola-sysv3
532 exit ;;
533 AViiON:dgux:*:*)
534 # DG/UX returns AViiON for all architectures
535 UNAME_PROCESSOR=`/usr/bin/uname -p`
536 if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
537 then
538 if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
539 [ "$TARGET_BINARY_INTERFACE"x = x ]
540 then
541 echo m88k-dg-dgux"$UNAME_RELEASE"
542 else
543 echo m88k-dg-dguxbcs"$UNAME_RELEASE"
544 fi
545 else
546 echo i586-dg-dgux"$UNAME_RELEASE"
547 fi
548 exit ;;
549 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
550 echo m88k-dolphin-sysv3
551 exit ;;
552 M88*:*:R3*:*)
553 # Delta 88k system running SVR3
554 echo m88k-motorola-sysv3
555 exit ;;
556 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
557 echo m88k-tektronix-sysv3
558 exit ;;
559 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
560 echo m68k-tektronix-bsd
561 exit ;;
562 *:IRIX*:*:*)
563 echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
564 exit ;;
565 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
566 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
567 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
568 i*86:AIX:*:*)
569 echo i386-ibm-aix
570 exit ;;
571 ia64:AIX:*:*)
572 if [ -x /usr/bin/oslevel ] ; then
573 IBM_REV=`/usr/bin/oslevel`
574 else
575 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
576 fi
577 echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
578 exit ;;
579 *:AIX:2:3)
580 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
581 eval "$set_cc_for_build"
582 sed 's/^ //' << EOF > "$dummy.c"
583 #include <sys/systemcfg.h>
584
585 main()
586 {
587 if (!__power_pc())
588 exit(1);
589 puts("powerpc-ibm-aix3.2.5");
590 exit(0);
591 }
592 EOF
593 if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
594 then
595 echo "$SYSTEM_NAME"
596 else
597 echo rs6000-ibm-aix3.2.5
598 fi
599 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
600 echo rs6000-ibm-aix3.2.4
601 else
602 echo rs6000-ibm-aix3.2
603 fi
604 exit ;;
605 *:AIX:*:[4567])
606 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
607 if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
608 IBM_ARCH=rs6000
609 else
610 IBM_ARCH=powerpc
611 fi
612 if [ -x /usr/bin/lslpp ] ; then
613 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
614 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
615 else
616 IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
617 fi
618 echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
619 exit ;;
620 *:AIX:*:*)
621 echo rs6000-ibm-aix
622 exit ;;
623 ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
624 echo romp-ibm-bsd4.4
625 exit ;;
626 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
627 echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
628 exit ;; # report: romp-ibm BSD 4.3
629 *:BOSX:*:*)
630 echo rs6000-bull-bosx
631 exit ;;
632 DPX/2?00:B.O.S.:*:*)
633 echo m68k-bull-sysv3
634 exit ;;
635 9000/[34]??:4.3bsd:1.*:*)
636 echo m68k-hp-bsd
637 exit ;;
638 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
639 echo m68k-hp-bsd4.4
640 exit ;;
641 9000/[34678]??:HP-UX:*:*)
642 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
643 case "$UNAME_MACHINE" in
644 9000/31?) HP_ARCH=m68000 ;;
645 9000/[34]??) HP_ARCH=m68k ;;
646 9000/[678][0-9][0-9])
647 if [ -x /usr/bin/getconf ]; then
648 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
649 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
650 case "$sc_cpu_version" in
651 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
652 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
653 532) # CPU_PA_RISC2_0
654 case "$sc_kernel_bits" in
655 32) HP_ARCH=hppa2.0n ;;
656 64) HP_ARCH=hppa2.0w ;;
657 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
658 esac ;;
659 esac
660 fi
661 if [ "$HP_ARCH" = "" ]; then
662 eval "$set_cc_for_build"
663 sed 's/^ //' << EOF > "$dummy.c"
664
665 #define _HPUX_SOURCE
666 #include <stdlib.h>
667 #include <unistd.h>
668
669 int main ()
670 {
671 #if defined(_SC_KERNEL_BITS)
672 long bits = sysconf(_SC_KERNEL_BITS);
673 #endif
674 long cpu = sysconf (_SC_CPU_VERSION);
675
676 switch (cpu)
677 {
678 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
679 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
680 case CPU_PA_RISC2_0:
681 #if defined(_SC_KERNEL_BITS)
682 switch (bits)
683 {
684 case 64: puts ("hppa2.0w"); break;
685 case 32: puts ("hppa2.0n"); break;
686 default: puts ("hppa2.0"); break;
687 } break;
688 #else /* !defined(_SC_KERNEL_BITS) */
689 puts ("hppa2.0"); break;
690 #endif
691 default: puts ("hppa1.0"); break;
692 }
693 exit (0);
694 }
695 EOF
696 (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
697 test -z "$HP_ARCH" && HP_ARCH=hppa
698 fi ;;
699 esac
700 if [ "$HP_ARCH" = hppa2.0w ]
701 then
702 eval "$set_cc_for_build"
703
704 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
705 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
706 # generating 64-bit code. GNU and HP use different nomenclature:
707 #
708 # $ CC_FOR_BUILD=cc ./config.guess
709 # => hppa2.0w-hp-hpux11.23
710 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
711 # => hppa64-hp-hpux11.23
712
713 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
714 grep -q __LP64__
715 then
716 HP_ARCH=hppa2.0w
717 else
718 HP_ARCH=hppa64
719 fi
720 fi
721 echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
722 exit ;;
723 ia64:HP-UX:*:*)
724 HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
725 echo ia64-hp-hpux"$HPUX_REV"
726 exit ;;
727 3050*:HI-UX:*:*)
728 eval "$set_cc_for_build"
729 sed 's/^ //' << EOF > "$dummy.c"
730 #include <unistd.h>
731 int
732 main ()
733 {
734 long cpu = sysconf (_SC_CPU_VERSION);
735 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
736 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
737 results, however. */
738 if (CPU_IS_PA_RISC (cpu))
739 {
740 switch (cpu)
741 {
742 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
743 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
744 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
745 default: puts ("hppa-hitachi-hiuxwe2"); break;
746 }
747 }
748 else if (CPU_IS_HP_MC68K (cpu))
749 puts ("m68k-hitachi-hiuxwe2");
750 else puts ("unknown-hitachi-hiuxwe2");
751 exit (0);
752 }
753 EOF
754 $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
755 { echo "$SYSTEM_NAME"; exit; }
756 echo unknown-hitachi-hiuxwe2
757 exit ;;
758 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
759 echo hppa1.1-hp-bsd
760 exit ;;
761 9000/8??:4.3bsd:*:*)
762 echo hppa1.0-hp-bsd
763 exit ;;
764 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
765 echo hppa1.0-hp-mpeix
766 exit ;;
767 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
768 echo hppa1.1-hp-osf
769 exit ;;
770 hp8??:OSF1:*:*)
771 echo hppa1.0-hp-osf
772 exit ;;
773 i*86:OSF1:*:*)
774 if [ -x /usr/sbin/sysversion ] ; then
775 echo "$UNAME_MACHINE"-unknown-osf1mk
776 else
777 echo "$UNAME_MACHINE"-unknown-osf1
778 fi
779 exit ;;
780 parisc*:Lites*:*:*)
781 echo hppa1.1-hp-lites
782 exit ;;
783 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
784 echo c1-convex-bsd
785 exit ;;
786 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
787 if getsysinfo -f scalar_acc
788 then echo c32-convex-bsd
789 else echo c2-convex-bsd
790 fi
791 exit ;;
792 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
793 echo c34-convex-bsd
794 exit ;;
795 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
796 echo c38-convex-bsd
797 exit ;;
798 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
799 echo c4-convex-bsd
800 exit ;;
801 CRAY*Y-MP:*:*:*)
802 echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
803 exit ;;
804 CRAY*[A-Z]90:*:*:*)
805 echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
806 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
807 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
808 -e 's/\.[^.]*$/.X/'
809 exit ;;
810 CRAY*TS:*:*:*)
811 echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
812 exit ;;
813 CRAY*T3E:*:*:*)
814 echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
815 exit ;;
816 CRAY*SV1:*:*:*)
817 echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
818 exit ;;
819 *:UNICOS/mp:*:*)
820 echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
821 exit ;;
822 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
823 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
824 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
825 FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
826 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
827 exit ;;
828 5000:UNIX_System_V:4.*:*)
829 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
830 FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
831 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
832 exit ;;
833 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
834 echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
835 exit ;;
836 sparc*:BSD/OS:*:*)
837 echo sparc-unknown-bsdi"$UNAME_RELEASE"
838 exit ;;
839 *:BSD/OS:*:*)
840 echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
841 exit ;;
842 *:FreeBSD:*:*)
843 UNAME_PROCESSOR=`/usr/bin/uname -p`
844 case "$UNAME_PROCESSOR" in
845 amd64)
846 UNAME_PROCESSOR=x86_64 ;;
847 i386)
848 UNAME_PROCESSOR=i586 ;;
849 esac
850 echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
851 exit ;;
852 i*:CYGWIN*:*)
853 echo "$UNAME_MACHINE"-pc-cygwin
854 exit ;;
855 *:MINGW64*:*)
856 echo "$UNAME_MACHINE"-pc-mingw64
857 exit ;;
858 *:MINGW*:*)
859 echo "$UNAME_MACHINE"-pc-mingw32
860 exit ;;
861 *:MSYS*:*)
862 echo "$UNAME_MACHINE"-pc-msys
863 exit ;;
864 i*:PW*:*)
865 echo "$UNAME_MACHINE"-pc-pw32
866 exit ;;
867 *:Interix*:*)
868 case "$UNAME_MACHINE" in
869 x86)
870 echo i586-pc-interix"$UNAME_RELEASE"
871 exit ;;
872 authenticamd | genuineintel | EM64T)
873 echo x86_64-unknown-interix"$UNAME_RELEASE"
874 exit ;;
875 IA64)
876 echo ia64-unknown-interix"$UNAME_RELEASE"
877 exit ;;
878 esac ;;
879 i*:UWIN*:*)
880 echo "$UNAME_MACHINE"-pc-uwin
881 exit ;;
882 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
883 echo x86_64-unknown-cygwin
884 exit ;;
885 prep*:SunOS:5.*:*)
886 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
887 exit ;;
888 *:GNU:*:*)
889 # the GNU system
890 echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
891 exit ;;
892 *:GNU/*:*:*)
893 # other systems with GNU libc and userland
894 echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
895 exit ;;
896 i*86:Minix:*:*)
897 echo "$UNAME_MACHINE"-pc-minix
898 exit ;;
899 aarch64:Linux:*:*)
900 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
901 exit ;;
902 aarch64_be:Linux:*:*)
903 UNAME_MACHINE=aarch64_be
904 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
905 exit ;;
906 alpha:Linux:*:*)
907 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
908 EV5) UNAME_MACHINE=alphaev5 ;;
909 EV56) UNAME_MACHINE=alphaev56 ;;
910 PCA56) UNAME_MACHINE=alphapca56 ;;
911 PCA57) UNAME_MACHINE=alphapca56 ;;
912 EV6) UNAME_MACHINE=alphaev6 ;;
913 EV67) UNAME_MACHINE=alphaev67 ;;
914 EV68*) UNAME_MACHINE=alphaev68 ;;
915 esac
916 objdump --private-headers /bin/sh | grep -q ld.so.1
917 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
918 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
919 exit ;;
920 arc:Linux:*:* | arceb:Linux:*:*)
921 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
922 exit ;;
923 arm*:Linux:*:*)
924 eval "$set_cc_for_build"
925 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
926 | grep -q __ARM_EABI__
927 then
928 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
929 else
930 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
931 | grep -q __ARM_PCS_VFP
932 then
933 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
934 else
935 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
936 fi
937 fi
938 exit ;;
939 avr32*:Linux:*:*)
940 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
941 exit ;;
942 cris:Linux:*:*)
943 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
944 exit ;;
945 crisv32:Linux:*:*)
946 echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
947 exit ;;
948 e2k:Linux:*:*)
949 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
950 exit ;;
951 frv:Linux:*:*)
952 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
953 exit ;;
954 hexagon:Linux:*:*)
955 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
956 exit ;;
957 i*86:Linux:*:*)
958 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
959 exit ;;
960 ia64:Linux:*:*)
961 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
962 exit ;;
963 k1om:Linux:*:*)
964 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
965 exit ;;
966 m32r*:Linux:*:*)
967 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
968 exit ;;
969 m68*:Linux:*:*)
970 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
971 exit ;;
972 mips:Linux:*:* | mips64:Linux:*:*)
973 eval "$set_cc_for_build"
974 sed 's/^ //' << EOF > "$dummy.c"
975 #undef CPU
976 #undef ${UNAME_MACHINE}
977 #undef ${UNAME_MACHINE}el
978 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
979 CPU=${UNAME_MACHINE}el
980 #else
981 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
982 CPU=${UNAME_MACHINE}
983 #else
984 CPU=
985 #endif
986 #endif
987 EOF
988 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
989 test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
990 ;;
991 mips64el:Linux:*:*)
992 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
993 exit ;;
994 openrisc*:Linux:*:*)
995 echo or1k-unknown-linux-"$LIBC"
996 exit ;;
997 or32:Linux:*:* | or1k*:Linux:*:*)
998 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
999 exit ;;
1000 padre:Linux:*:*)
1001 echo sparc-unknown-linux-"$LIBC"
1002 exit ;;
1003 parisc64:Linux:*:* | hppa64:Linux:*:*)
1004 echo hppa64-unknown-linux-"$LIBC"
1005 exit ;;
1006 parisc:Linux:*:* | hppa:Linux:*:*)
1007 # Look for CPU level
1008 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1009 PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1010 PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1011 *) echo hppa-unknown-linux-"$LIBC" ;;
1012 esac
1013 exit ;;
1014 ppc64:Linux:*:*)
1015 echo powerpc64-unknown-linux-"$LIBC"
1016 exit ;;
1017 ppc:Linux:*:*)
1018 echo powerpc-unknown-linux-"$LIBC"
1019 exit ;;
1020 ppc64le:Linux:*:*)
1021 echo powerpc64le-unknown-linux-"$LIBC"
1022 exit ;;
1023 ppcle:Linux:*:*)
1024 echo powerpcle-unknown-linux-"$LIBC"
1025 exit ;;
1026 riscv32:Linux:*:* | riscv64:Linux:*:*)
1027 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1028 exit ;;
1029 s390:Linux:*:* | s390x:Linux:*:*)
1030 echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
1031 exit ;;
1032 sh64*:Linux:*:*)
1033 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1034 exit ;;
1035 sh*:Linux:*:*)
1036 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1037 exit ;;
1038 sparc:Linux:*:* | sparc64:Linux:*:*)
1039 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1040 exit ;;
1041 tile*:Linux:*:*)
1042 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1043 exit ;;
1044 vax:Linux:*:*)
1045 echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
1046 exit ;;
1047 x86_64:Linux:*:*)
1048 if objdump -f /bin/sh | grep -q elf32-x86-64; then
1049 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32
1050 else
1051 echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
1052 fi
1053 exit ;;
1054 xtensa*:Linux:*:*)
1055 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1056 exit ;;
1057 i*86:DYNIX/ptx:4*:*)
1058 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1059 # earlier versions are messed up and put the nodename in both
1060 # sysname and nodename.
1061 echo i386-sequent-sysv4
1062 exit ;;
1063 i*86:UNIX_SV:4.2MP:2.*)
1064 # Unixware is an offshoot of SVR4, but it has its own version
1065 # number series starting with 2...
1066 # I am not positive that other SVR4 systems won't match this,
1067 # I just have to hope. -- rms.
1068 # Use sysv4.2uw... so that sysv4* matches it.
1069 echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
1070 exit ;;
1071 i*86:OS/2:*:*)
1072 # If we were able to find `uname', then EMX Unix compatibility
1073 # is probably installed.
1074 echo "$UNAME_MACHINE"-pc-os2-emx
1075 exit ;;
1076 i*86:XTS-300:*:STOP)
1077 echo "$UNAME_MACHINE"-unknown-stop
1078 exit ;;
1079 i*86:atheos:*:*)
1080 echo "$UNAME_MACHINE"-unknown-atheos
1081 exit ;;
1082 i*86:syllable:*:*)
1083 echo "$UNAME_MACHINE"-pc-syllable
1084 exit ;;
1085 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1086 echo i386-unknown-lynxos"$UNAME_RELEASE"
1087 exit ;;
1088 i*86:*DOS:*:*)
1089 echo "$UNAME_MACHINE"-pc-msdosdjgpp
1090 exit ;;
1091 i*86:*:4.*:*)
1092 UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
1093 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1094 echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
1095 else
1096 echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
1097 fi
1098 exit ;;
1099 i*86:*:5:[678]*)
1100 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1101 case `/bin/uname -X | grep "^Machine"` in
1102 *486*) UNAME_MACHINE=i486 ;;
1103 *Pentium) UNAME_MACHINE=i586 ;;
1104 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1105 esac
1106 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
1107 exit ;;
1108 i*86:*:3.2:*)
1109 if test -f /usr/options/cb.name; then
1110 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1111 echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
1112 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1113 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1114 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1115 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1116 && UNAME_MACHINE=i586
1117 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1118 && UNAME_MACHINE=i686
1119 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1120 && UNAME_MACHINE=i686
1121 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
1122 else
1123 echo "$UNAME_MACHINE"-pc-sysv32
1124 fi
1125 exit ;;
1126 pc:*:*:*)
1127 # Left here for compatibility:
1128 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1129 # the processor, so we play safe by assuming i586.
1130 # Note: whatever this is, it MUST be the same as what config.sub
1131 # prints for the "djgpp" host, or else GDB configure will decide that
1132 # this is a cross-build.
1133 echo i586-pc-msdosdjgpp
1134 exit ;;
1135 Intel:Mach:3*:*)
1136 echo i386-pc-mach3
1137 exit ;;
1138 paragon:*:*:*)
1139 echo i860-intel-osf1
1140 exit ;;
1141 i860:*:4.*:*) # i860-SVR4
1142 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1143 echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
1144 else # Add other i860-SVR4 vendors below as they are discovered.
1145 echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
1146 fi
1147 exit ;;
1148 mini*:CTIX:SYS*5:*)
1149 # "miniframe"
1150 echo m68010-convergent-sysv
1151 exit ;;
1152 mc68k:UNIX:SYSTEM5:3.51m)
1153 echo m68k-convergent-sysv
1154 exit ;;
1155 M680?0:D-NIX:5.3:*)
1156 echo m68k-diab-dnix
1157 exit ;;
1158 M68*:*:R3V[5678]*:*)
1159 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1160 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1161 OS_REL=''
1162 test -r /etc/.relid \
1163 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1164 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1165 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
1166 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1167 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1168 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1169 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1170 && { echo i486-ncr-sysv4; exit; } ;;
1171 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1172 OS_REL='.3'
1173 test -r /etc/.relid \
1174 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1175 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1176 && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
1177 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1178 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
1179 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1180 && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1181 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1182 echo m68k-unknown-lynxos"$UNAME_RELEASE"
1183 exit ;;
1184 mc68030:UNIX_System_V:4.*:*)
1185 echo m68k-atari-sysv4
1186 exit ;;
1187 TSUNAMI:LynxOS:2.*:*)
1188 echo sparc-unknown-lynxos"$UNAME_RELEASE"
1189 exit ;;
1190 rs6000:LynxOS:2.*:*)
1191 echo rs6000-unknown-lynxos"$UNAME_RELEASE"
1192 exit ;;
1193 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1194 echo powerpc-unknown-lynxos"$UNAME_RELEASE"
1195 exit ;;
1196 SM[BE]S:UNIX_SV:*:*)
1197 echo mips-dde-sysv"$UNAME_RELEASE"
1198 exit ;;
1199 RM*:ReliantUNIX-*:*:*)
1200 echo mips-sni-sysv4
1201 exit ;;
1202 RM*:SINIX-*:*:*)
1203 echo mips-sni-sysv4
1204 exit ;;
1205 *:SINIX-*:*:*)
1206 if uname -p 2>/dev/null >/dev/null ; then
1207 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1208 echo "$UNAME_MACHINE"-sni-sysv4
1209 else
1210 echo ns32k-sni-sysv
1211 fi
1212 exit ;;
1213 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1214 # says <Richard.M.Bartel@ccMail.Census.GOV>
1215 echo i586-unisys-sysv4
1216 exit ;;
1217 *:UNIX_System_V:4*:FTX*)
1218 # From Gerald Hewes <hewes@openmarket.com>.
1219 # How about differentiating between stratus architectures? -djm
1220 echo hppa1.1-stratus-sysv4
1221 exit ;;
1222 *:*:*:FTX*)
1223 # From seanf@swdc.stratus.com.
1224 echo i860-stratus-sysv4
1225 exit ;;
1226 i*86:VOS:*:*)
1227 # From Paul.Green@stratus.com.
1228 echo "$UNAME_MACHINE"-stratus-vos
1229 exit ;;
1230 *:VOS:*:*)
1231 # From Paul.Green@stratus.com.
1232 echo hppa1.1-stratus-vos
1233 exit ;;
1234 mc68*:A/UX:*:*)
1235 echo m68k-apple-aux"$UNAME_RELEASE"
1236 exit ;;
1237 news*:NEWS-OS:6*:*)
1238 echo mips-sony-newsos6
1239 exit ;;
1240 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1241 if [ -d /usr/nec ]; then
1242 echo mips-nec-sysv"$UNAME_RELEASE"
1243 else
1244 echo mips-unknown-sysv"$UNAME_RELEASE"
1245 fi
1246 exit ;;
1247 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1248 echo powerpc-be-beos
1249 exit ;;
1250 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1251 echo powerpc-apple-beos
1252 exit ;;
1253 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1254 echo i586-pc-beos
1255 exit ;;
1256 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1257 echo i586-pc-haiku
1258 exit ;;
1259 x86_64:Haiku:*:*)
1260 echo x86_64-unknown-haiku
1261 exit ;;
1262 SX-4:SUPER-UX:*:*)
1263 echo sx4-nec-superux"$UNAME_RELEASE"
1264 exit ;;
1265 SX-5:SUPER-UX:*:*)
1266 echo sx5-nec-superux"$UNAME_RELEASE"
1267 exit ;;
1268 SX-6:SUPER-UX:*:*)
1269 echo sx6-nec-superux"$UNAME_RELEASE"
1270 exit ;;
1271 SX-7:SUPER-UX:*:*)
1272 echo sx7-nec-superux"$UNAME_RELEASE"
1273 exit ;;
1274 SX-8:SUPER-UX:*:*)
1275 echo sx8-nec-superux"$UNAME_RELEASE"
1276 exit ;;
1277 SX-8R:SUPER-UX:*:*)
1278 echo sx8r-nec-superux"$UNAME_RELEASE"
1279 exit ;;
1280 SX-ACE:SUPER-UX:*:*)
1281 echo sxace-nec-superux"$UNAME_RELEASE"
1282 exit ;;
1283 Power*:Rhapsody:*:*)
1284 echo powerpc-apple-rhapsody"$UNAME_RELEASE"
1285 exit ;;
1286 *:Rhapsody:*:*)
1287 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
1288 exit ;;
1289 *:Darwin:*:*)
1290 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1291 eval "$set_cc_for_build"
1292 if test "$UNAME_PROCESSOR" = unknown ; then
1293 UNAME_PROCESSOR=powerpc
1294 fi
1295 if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1296 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1297 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1298 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1299 grep IS_64BIT_ARCH >/dev/null
1300 then
1301 case $UNAME_PROCESSOR in
1302 i386) UNAME_PROCESSOR=x86_64 ;;
1303 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1304 esac
1305 fi
1306 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1307 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1308 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1309 grep IS_PPC >/dev/null
1310 then
1311 UNAME_PROCESSOR=powerpc
1312 fi
1313 fi
1314 elif test "$UNAME_PROCESSOR" = i386 ; then
1315 # Avoid executing cc on OS X 10.9, as it ships with a stub
1316 # that puts up a graphical alert prompting to install
1317 # developer tools. Any system running Mac OS X 10.7 or
1318 # later (Darwin 11 and later) is required to have a 64-bit
1319 # processor. This is not true of the ARM version of Darwin
1320 # that Apple uses in portable devices.
1321 UNAME_PROCESSOR=x86_64
1322 fi
1323 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
1324 exit ;;
1325 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1326 UNAME_PROCESSOR=`uname -p`
1327 if test "$UNAME_PROCESSOR" = x86; then
1328 UNAME_PROCESSOR=i386
1329 UNAME_MACHINE=pc
1330 fi
1331 echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
1332 exit ;;
1333 *:QNX:*:4*)
1334 echo i386-pc-qnx
1335 exit ;;
1336 NEO-*:NONSTOP_KERNEL:*:*)
1337 echo neo-tandem-nsk"$UNAME_RELEASE"
1338 exit ;;
1339 NSE-*:NONSTOP_KERNEL:*:*)
1340 echo nse-tandem-nsk"$UNAME_RELEASE"
1341 exit ;;
1342 NSR-*:NONSTOP_KERNEL:*:*)
1343 echo nsr-tandem-nsk"$UNAME_RELEASE"
1344 exit ;;
1345 NSV-*:NONSTOP_KERNEL:*:*)
1346 echo nsv-tandem-nsk"$UNAME_RELEASE"
1347 exit ;;
1348 NSX-*:NONSTOP_KERNEL:*:*)
1349 echo nsx-tandem-nsk"$UNAME_RELEASE"
1350 exit ;;
1351 *:NonStop-UX:*:*)
1352 echo mips-compaq-nonstopux
1353 exit ;;
1354 BS2000:POSIX*:*:*)
1355 echo bs2000-siemens-sysv
1356 exit ;;
1357 DS/*:UNIX_System_V:*:*)
1358 echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
1359 exit ;;
1360 *:Plan9:*:*)
1361 # "uname -m" is not consistent, so use $cputype instead. 386
1362 # is converted to i386 for consistency with other x86
1363 # operating systems.
1364 if test "$cputype" = 386; then
1365 UNAME_MACHINE=i386
1366 else
1367 UNAME_MACHINE="$cputype"
1368 fi
1369 echo "$UNAME_MACHINE"-unknown-plan9
1370 exit ;;
1371 *:TOPS-10:*:*)
1372 echo pdp10-unknown-tops10
1373 exit ;;
1374 *:TENEX:*:*)
1375 echo pdp10-unknown-tenex
1376 exit ;;
1377 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1378 echo pdp10-dec-tops20
1379 exit ;;
1380 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1381 echo pdp10-xkl-tops20
1382 exit ;;
1383 *:TOPS-20:*:*)
1384 echo pdp10-unknown-tops20
1385 exit ;;
1386 *:ITS:*:*)
1387 echo pdp10-unknown-its
1388 exit ;;
1389 SEI:*:*:SEIUX)
1390 echo mips-sei-seiux"$UNAME_RELEASE"
1391 exit ;;
1392 *:DragonFly:*:*)
1393 echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
1394 exit ;;
1395 *:*VMS:*:*)
1396 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1397 case "$UNAME_MACHINE" in
1398 A*) echo alpha-dec-vms ; exit ;;
1399 I*) echo ia64-dec-vms ; exit ;;
1400 V*) echo vax-dec-vms ; exit ;;
1401 esac ;;
1402 *:XENIX:*:SysV)
1403 echo i386-pc-xenix
1404 exit ;;
1405 i*86:skyos:*:*)
1406 echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
1407 exit ;;
1408 i*86:rdos:*:*)
1409 echo "$UNAME_MACHINE"-pc-rdos
1410 exit ;;
1411 i*86:AROS:*:*)
1412 echo "$UNAME_MACHINE"-pc-aros
1413 exit ;;
1414 x86_64:VMkernel:*:*)
1415 echo "$UNAME_MACHINE"-unknown-esx
1416 exit ;;
1417 amd64:Isilon\ OneFS:*:*)
1418 echo x86_64-unknown-onefs
1419 exit ;;
1420 esac
1421
1422 echo "$0: unable to guess system type" >&2
1423
1424 case "$UNAME_MACHINE:$UNAME_SYSTEM" in
1425 mips:Linux | mips64:Linux)
1426 # If we got here on MIPS GNU/Linux, output extra information.
1427 cat >&2 <<EOF
1428
1429 NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
1430 the system type. Please install a C compiler and try again.
1431 EOF
1432 ;;
1433 esac
1434
1435 cat >&2 <<EOF
1436
1437 This script (version $timestamp), has failed to recognize the
1438 operating system you are using. If your script is old, overwrite *all*
1439 copies of config.guess and config.sub with the latest versions from:
1440
1441 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1442 and
1443 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1444
1445 If $0 has already been updated, send the following data and any
1446 information you think might be pertinent to config-patches@gnu.org to
1447 provide the necessary information to handle your system.
1448
1449 config.guess timestamp = $timestamp
1450
1451 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1452 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1453 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1454 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1455
1456 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1457 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1458
1459 hostinfo = `(hostinfo) 2>/dev/null`
1460 /bin/universe = `(/bin/universe) 2>/dev/null`
1461 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1462 /bin/arch = `(/bin/arch) 2>/dev/null`
1463 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1464 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1465
1466 UNAME_MACHINE = "$UNAME_MACHINE"
1467 UNAME_RELEASE = "$UNAME_RELEASE"
1468 UNAME_SYSTEM = "$UNAME_SYSTEM"
1469 UNAME_VERSION = "$UNAME_VERSION"
1470 EOF
1471
1472 exit 1
1473
1474 # Local variables:
1475 # eval: (add-hook 'write-file-functions 'time-stamp)
1476 # time-stamp-start: "timestamp='"
1477 # time-stamp-format: "%:y-%02m-%02d"
1478 # time-stamp-end: "'"
1479 # End:
+0
-55
config.h.in less more
0 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define to 1 if you have the <errno.h> header file. */
3 #undef HAVE_ERRNO_H
4
5 /* Define to 1 if you have the <inttypes.h> header file. */
6 #undef HAVE_INTTYPES_H
7
8 /* Define to 1 if you have the <memory.h> header file. */
9 #undef HAVE_MEMORY_H
10
11 /* Define to 1 if you have the <neaacdec.h> header file. */
12 #undef HAVE_NEAACDEC_H
13
14 /* Define to 1 if you have the <stdint.h> header file. */
15 #undef HAVE_STDINT_H
16
17 /* Define to 1 if you have the <stdlib.h> header file. */
18 #undef HAVE_STDLIB_H
19
20 /* Define to 1 if you have the <strings.h> header file. */
21 #undef HAVE_STRINGS_H
22
23 /* Define to 1 if you have the <string.h> header file. */
24 #undef HAVE_STRING_H
25
26 /* Define to 1 if you have the <sys/stat.h> header file. */
27 #undef HAVE_SYS_STAT_H
28
29 /* Define to 1 if you have the <sys/types.h> header file. */
30 #undef HAVE_SYS_TYPES_H
31
32 /* Define to 1 if you have the <unistd.h> header file. */
33 #undef HAVE_UNISTD_H
34
35 /* Define to the address where bug reports for this package should be sent. */
36 #undef PACKAGE_BUGREPORT
37
38 /* Define to the full name of this package. */
39 #undef PACKAGE_NAME
40
41 /* Define to the full name and version of this package. */
42 #undef PACKAGE_STRING
43
44 /* Define to the one symbol short name of this package. */
45 #undef PACKAGE_TARNAME
46
47 /* Define to the home page for this package. */
48 #undef PACKAGE_URL
49
50 /* Define to the version of this package. */
51 #undef PACKAGE_VERSION
52
53 /* Define to 1 if you have the ANSI C header files. */
54 #undef STDC_HEADERS
+0
-1801
config.sub less more
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-02-22'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <https://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25
26
27 # Please send patches to <config-patches@gnu.org>.
28 #
29 # Configuration subroutine to validate and canonicalize a configuration type.
30 # Supply the specified configuration type as an argument.
31 # If it is invalid, we print an error message on stderr and exit with code 1.
32 # Otherwise, we print the canonical config type on stdout and succeed.
33
34 # You can get the latest version of this script from:
35 # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
36
37 # This file is supposed to be the same for all GNU packages
38 # and recognize all the CPU types, system types and aliases
39 # that are meaningful with *any* GNU software.
40 # Each package is responsible for reporting which valid configurations
41 # it does not support. The user should be able to distinguish
42 # a failure to support a valid configuration from a meaningless
43 # configuration.
44
45 # The goal of this file is to map all the various variations of a given
46 # machine specification into a single specification in the form:
47 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
48 # or in some cases, the newer four-part form:
49 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
50 # It is wrong to echo any other type of specification.
51
52 me=`echo "$0" | sed -e 's,.*/,,'`
53
54 usage="\
55 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
56
57 Canonicalize a configuration name.
58
59 Options:
60 -h, --help print this help, then exit
61 -t, --time-stamp print date of last modification, then exit
62 -v, --version print version number, then exit
63
64 Report bugs and patches to <config-patches@gnu.org>."
65
66 version="\
67 GNU config.sub ($timestamp)
68
69 Copyright 1992-2018 Free Software Foundation, Inc.
70
71 This is free software; see the source for copying conditions. There is NO
72 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
73
74 help="
75 Try \`$me --help' for more information."
76
77 # Parse command line
78 while test $# -gt 0 ; do
79 case $1 in
80 --time-stamp | --time* | -t )
81 echo "$timestamp" ; exit ;;
82 --version | -v )
83 echo "$version" ; exit ;;
84 --help | --h* | -h )
85 echo "$usage"; exit ;;
86 -- ) # Stop option processing
87 shift; break ;;
88 - ) # Use stdin as input.
89 break ;;
90 -* )
91 echo "$me: invalid option $1$help"
92 exit 1 ;;
93
94 *local*)
95 # First pass through any local machine types.
96 echo "$1"
97 exit ;;
98
99 * )
100 break ;;
101 esac
102 done
103
104 case $# in
105 0) echo "$me: missing argument$help" >&2
106 exit 1;;
107 1) ;;
108 *) echo "$me: too many arguments$help" >&2
109 exit 1;;
110 esac
111
112 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
113 # Here we must recognize all the valid KERNEL-OS combinations.
114 maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
115 case $maybe_os in
116 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
117 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
118 knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
119 kopensolaris*-gnu* | cloudabi*-eabi* | \
120 storm-chaos* | os2-emx* | rtmk-nova*)
121 os=-$maybe_os
122 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
123 ;;
124 android-linux)
125 os=-linux-android
126 basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
127 ;;
128 *)
129 basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
130 if [ "$basic_machine" != "$1" ]
131 then os=`echo "$1" | sed 's/.*-/-/'`
132 else os=; fi
133 ;;
134 esac
135
136 ### Let's recognize common machines as not being operating systems so
137 ### that things like config.sub decstation-3100 work. We also
138 ### recognize some manufacturers as not being operating systems, so we
139 ### can provide default operating systems below.
140 case $os in
141 -sun*os*)
142 # Prevent following clause from handling this invalid input.
143 ;;
144 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
145 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
146 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
147 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
148 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
149 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
150 -apple | -axis | -knuth | -cray | -microblaze*)
151 os=
152 basic_machine=$1
153 ;;
154 -bluegene*)
155 os=-cnk
156 ;;
157 -sim | -cisco | -oki | -wec | -winbond)
158 os=
159 basic_machine=$1
160 ;;
161 -scout)
162 ;;
163 -wrs)
164 os=-vxworks
165 basic_machine=$1
166 ;;
167 -chorusos*)
168 os=-chorusos
169 basic_machine=$1
170 ;;
171 -chorusrdb)
172 os=-chorusrdb
173 basic_machine=$1
174 ;;
175 -hiux*)
176 os=-hiuxwe2
177 ;;
178 -sco6)
179 os=-sco5v6
180 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
181 ;;
182 -sco5)
183 os=-sco3.2v5
184 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
185 ;;
186 -sco4)
187 os=-sco3.2v4
188 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
189 ;;
190 -sco3.2.[4-9]*)
191 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
192 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
193 ;;
194 -sco3.2v[4-9]*)
195 # Don't forget version if it is 3.2v4 or newer.
196 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
197 ;;
198 -sco5v6*)
199 # Don't forget version if it is 3.2v4 or newer.
200 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
201 ;;
202 -sco*)
203 os=-sco3.2v2
204 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
205 ;;
206 -udk*)
207 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
208 ;;
209 -isc)
210 os=-isc2.2
211 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
212 ;;
213 -clix*)
214 basic_machine=clipper-intergraph
215 ;;
216 -isc*)
217 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
218 ;;
219 -lynx*178)
220 os=-lynxos178
221 ;;
222 -lynx*5)
223 os=-lynxos5
224 ;;
225 -lynx*)
226 os=-lynxos
227 ;;
228 -ptx*)
229 basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
230 ;;
231 -psos*)
232 os=-psos
233 ;;
234 -mint | -mint[0-9]*)
235 basic_machine=m68k-atari
236 os=-mint
237 ;;
238 esac
239
240 # Decode aliases for certain CPU-COMPANY combinations.
241 case $basic_machine in
242 # Recognize the basic CPU types without company name.
243 # Some are omitted here because they have special meanings below.
244 1750a | 580 \
245 | a29k \
246 | aarch64 | aarch64_be \
247 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
248 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
249 | am33_2.0 \
250 | arc | arceb \
251 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
252 | avr | avr32 \
253 | ba \
254 | be32 | be64 \
255 | bfin \
256 | c4x | c8051 | clipper \
257 | d10v | d30v | dlx | dsp16xx \
258 | e2k | epiphany \
259 | fido | fr30 | frv | ft32 \
260 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
261 | hexagon \
262 | i370 | i860 | i960 | ia16 | ia64 \
263 | ip2k | iq2000 \
264 | k1om \
265 | le32 | le64 \
266 | lm32 \
267 | m32c | m32r | m32rle | m68000 | m68k | m88k \
268 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
269 | mips | mipsbe | mipseb | mipsel | mipsle \
270 | mips16 \
271 | mips64 | mips64el \
272 | mips64octeon | mips64octeonel \
273 | mips64orion | mips64orionel \
274 | mips64r5900 | mips64r5900el \
275 | mips64vr | mips64vrel \
276 | mips64vr4100 | mips64vr4100el \
277 | mips64vr4300 | mips64vr4300el \
278 | mips64vr5000 | mips64vr5000el \
279 | mips64vr5900 | mips64vr5900el \
280 | mipsisa32 | mipsisa32el \
281 | mipsisa32r2 | mipsisa32r2el \
282 | mipsisa32r6 | mipsisa32r6el \
283 | mipsisa64 | mipsisa64el \
284 | mipsisa64r2 | mipsisa64r2el \
285 | mipsisa64r6 | mipsisa64r6el \
286 | mipsisa64sb1 | mipsisa64sb1el \
287 | mipsisa64sr71k | mipsisa64sr71kel \
288 | mipsr5900 | mipsr5900el \
289 | mipstx39 | mipstx39el \
290 | mn10200 | mn10300 \
291 | moxie \
292 | mt \
293 | msp430 \
294 | nds32 | nds32le | nds32be \
295 | nios | nios2 | nios2eb | nios2el \
296 | ns16k | ns32k \
297 | open8 | or1k | or1knd | or32 \
298 | pdp10 | pj | pjl \
299 | powerpc | powerpc64 | powerpc64le | powerpcle \
300 | pru \
301 | pyramid \
302 | riscv32 | riscv64 \
303 | rl78 | rx \
304 | score \
305 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
306 | sh64 | sh64le \
307 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
308 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
309 | spu \
310 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
311 | ubicom32 \
312 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
313 | visium \
314 | wasm32 \
315 | x86 | xc16x | xstormy16 | xtensa \
316 | z8k | z80)
317 basic_machine=$basic_machine-unknown
318 ;;
319 c54x)
320 basic_machine=tic54x-unknown
321 ;;
322 c55x)
323 basic_machine=tic55x-unknown
324 ;;
325 c6x)
326 basic_machine=tic6x-unknown
327 ;;
328 leon|leon[3-9])
329 basic_machine=sparc-$basic_machine
330 ;;
331 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
332 basic_machine=$basic_machine-unknown
333 os=-none
334 ;;
335 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
336 ;;
337 ms1)
338 basic_machine=mt-unknown
339 ;;
340
341 strongarm | thumb | xscale)
342 basic_machine=arm-unknown
343 ;;
344 xgate)
345 basic_machine=$basic_machine-unknown
346 os=-none
347 ;;
348 xscaleeb)
349 basic_machine=armeb-unknown
350 ;;
351
352 xscaleel)
353 basic_machine=armel-unknown
354 ;;
355
356 # We use `pc' rather than `unknown'
357 # because (1) that's what they normally are, and
358 # (2) the word "unknown" tends to confuse beginning users.
359 i*86 | x86_64)
360 basic_machine=$basic_machine-pc
361 ;;
362 # Object if more than one company name word.
363 *-*-*)
364 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
365 exit 1
366 ;;
367 # Recognize the basic CPU types with company name.
368 580-* \
369 | a29k-* \
370 | aarch64-* | aarch64_be-* \
371 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
372 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
373 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
374 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
375 | avr-* | avr32-* \
376 | ba-* \
377 | be32-* | be64-* \
378 | bfin-* | bs2000-* \
379 | c[123]* | c30-* | [cjt]90-* | c4x-* \
380 | c8051-* | clipper-* | craynv-* | cydra-* \
381 | d10v-* | d30v-* | dlx-* \
382 | e2k-* | elxsi-* \
383 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
384 | h8300-* | h8500-* \
385 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
386 | hexagon-* \
387 | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
388 | ip2k-* | iq2000-* \
389 | k1om-* \
390 | le32-* | le64-* \
391 | lm32-* \
392 | m32c-* | m32r-* | m32rle-* \
393 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
394 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
395 | microblaze-* | microblazeel-* \
396 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
397 | mips16-* \
398 | mips64-* | mips64el-* \
399 | mips64octeon-* | mips64octeonel-* \
400 | mips64orion-* | mips64orionel-* \
401 | mips64r5900-* | mips64r5900el-* \
402 | mips64vr-* | mips64vrel-* \
403 | mips64vr4100-* | mips64vr4100el-* \
404 | mips64vr4300-* | mips64vr4300el-* \
405 | mips64vr5000-* | mips64vr5000el-* \
406 | mips64vr5900-* | mips64vr5900el-* \
407 | mipsisa32-* | mipsisa32el-* \
408 | mipsisa32r2-* | mipsisa32r2el-* \
409 | mipsisa32r6-* | mipsisa32r6el-* \
410 | mipsisa64-* | mipsisa64el-* \
411 | mipsisa64r2-* | mipsisa64r2el-* \
412 | mipsisa64r6-* | mipsisa64r6el-* \
413 | mipsisa64sb1-* | mipsisa64sb1el-* \
414 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
415 | mipsr5900-* | mipsr5900el-* \
416 | mipstx39-* | mipstx39el-* \
417 | mmix-* \
418 | mt-* \
419 | msp430-* \
420 | nds32-* | nds32le-* | nds32be-* \
421 | nios-* | nios2-* | nios2eb-* | nios2el-* \
422 | none-* | np1-* | ns16k-* | ns32k-* \
423 | open8-* \
424 | or1k*-* \
425 | orion-* \
426 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
427 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
428 | pru-* \
429 | pyramid-* \
430 | riscv32-* | riscv64-* \
431 | rl78-* | romp-* | rs6000-* | rx-* \
432 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
433 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
434 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
435 | sparclite-* \
436 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
437 | tahoe-* \
438 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
439 | tile*-* \
440 | tron-* \
441 | ubicom32-* \
442 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
443 | vax-* \
444 | visium-* \
445 | wasm32-* \
446 | we32k-* \
447 | x86-* | x86_64-* | xc16x-* | xps100-* \
448 | xstormy16-* | xtensa*-* \
449 | ymp-* \
450 | z8k-* | z80-*)
451 ;;
452 # Recognize the basic CPU types without company name, with glob match.
453 xtensa*)
454 basic_machine=$basic_machine-unknown
455 ;;
456 # Recognize the various machine names and aliases which stand
457 # for a CPU type and a company and sometimes even an OS.
458 386bsd)
459 basic_machine=i386-pc
460 os=-bsd
461 ;;
462 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
463 basic_machine=m68000-att
464 ;;
465 3b*)
466 basic_machine=we32k-att
467 ;;
468 a29khif)
469 basic_machine=a29k-amd
470 os=-udi
471 ;;
472 abacus)
473 basic_machine=abacus-unknown
474 ;;
475 adobe68k)
476 basic_machine=m68010-adobe
477 os=-scout
478 ;;
479 alliant | fx80)
480 basic_machine=fx80-alliant
481 ;;
482 altos | altos3068)
483 basic_machine=m68k-altos
484 ;;
485 am29k)
486 basic_machine=a29k-none
487 os=-bsd
488 ;;
489 amd64)
490 basic_machine=x86_64-pc
491 ;;
492 amd64-*)
493 basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
494 ;;
495 amdahl)
496 basic_machine=580-amdahl
497 os=-sysv
498 ;;
499 amiga | amiga-*)
500 basic_machine=m68k-unknown
501 ;;
502 amigaos | amigados)
503 basic_machine=m68k-unknown
504 os=-amigaos
505 ;;
506 amigaunix | amix)
507 basic_machine=m68k-unknown
508 os=-sysv4
509 ;;
510 apollo68)
511 basic_machine=m68k-apollo
512 os=-sysv
513 ;;
514 apollo68bsd)
515 basic_machine=m68k-apollo
516 os=-bsd
517 ;;
518 aros)
519 basic_machine=i386-pc
520 os=-aros
521 ;;
522 asmjs)
523 basic_machine=asmjs-unknown
524 ;;
525 aux)
526 basic_machine=m68k-apple
527 os=-aux
528 ;;
529 balance)
530 basic_machine=ns32k-sequent
531 os=-dynix
532 ;;
533 blackfin)
534 basic_machine=bfin-unknown
535 os=-linux
536 ;;
537 blackfin-*)
538 basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
539 os=-linux
540 ;;
541 bluegene*)
542 basic_machine=powerpc-ibm
543 os=-cnk
544 ;;
545 c54x-*)
546 basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
547 ;;
548 c55x-*)
549 basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
550 ;;
551 c6x-*)
552 basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
553 ;;
554 c90)
555 basic_machine=c90-cray
556 os=-unicos
557 ;;
558 cegcc)
559 basic_machine=arm-unknown
560 os=-cegcc
561 ;;
562 convex-c1)
563 basic_machine=c1-convex
564 os=-bsd
565 ;;
566 convex-c2)
567 basic_machine=c2-convex
568 os=-bsd
569 ;;
570 convex-c32)
571 basic_machine=c32-convex
572 os=-bsd
573 ;;
574 convex-c34)
575 basic_machine=c34-convex
576 os=-bsd
577 ;;
578 convex-c38)
579 basic_machine=c38-convex
580 os=-bsd
581 ;;
582 cray | j90)
583 basic_machine=j90-cray
584 os=-unicos
585 ;;
586 craynv)
587 basic_machine=craynv-cray
588 os=-unicosmp
589 ;;
590 cr16 | cr16-*)
591 basic_machine=cr16-unknown
592 os=-elf
593 ;;
594 crds | unos)
595 basic_machine=m68k-crds
596 ;;
597 crisv32 | crisv32-* | etraxfs*)
598 basic_machine=crisv32-axis
599 ;;
600 cris | cris-* | etrax*)
601 basic_machine=cris-axis
602 ;;
603 crx)
604 basic_machine=crx-unknown
605 os=-elf
606 ;;
607 da30 | da30-*)
608 basic_machine=m68k-da30
609 ;;
610 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
611 basic_machine=mips-dec
612 ;;
613 decsystem10* | dec10*)
614 basic_machine=pdp10-dec
615 os=-tops10
616 ;;
617 decsystem20* | dec20*)
618 basic_machine=pdp10-dec
619 os=-tops20
620 ;;
621 delta | 3300 | motorola-3300 | motorola-delta \
622 | 3300-motorola | delta-motorola)
623 basic_machine=m68k-motorola
624 ;;
625 delta88)
626 basic_machine=m88k-motorola
627 os=-sysv3
628 ;;
629 dicos)
630 basic_machine=i686-pc
631 os=-dicos
632 ;;
633 djgpp)
634 basic_machine=i586-pc
635 os=-msdosdjgpp
636 ;;
637 dpx20 | dpx20-*)
638 basic_machine=rs6000-bull
639 os=-bosx
640 ;;
641 dpx2*)
642 basic_machine=m68k-bull
643 os=-sysv3
644 ;;
645 e500v[12])
646 basic_machine=powerpc-unknown
647 os=$os"spe"
648 ;;
649 e500v[12]-*)
650 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
651 os=$os"spe"
652 ;;
653 ebmon29k)
654 basic_machine=a29k-amd
655 os=-ebmon
656 ;;
657 elxsi)
658 basic_machine=elxsi-elxsi
659 os=-bsd
660 ;;
661 encore | umax | mmax)
662 basic_machine=ns32k-encore
663 ;;
664 es1800 | OSE68k | ose68k | ose | OSE)
665 basic_machine=m68k-ericsson
666 os=-ose
667 ;;
668 fx2800)
669 basic_machine=i860-alliant
670 ;;
671 genix)
672 basic_machine=ns32k-ns
673 ;;
674 gmicro)
675 basic_machine=tron-gmicro
676 os=-sysv
677 ;;
678 go32)
679 basic_machine=i386-pc
680 os=-go32
681 ;;
682 h3050r* | hiux*)
683 basic_machine=hppa1.1-hitachi
684 os=-hiuxwe2
685 ;;
686 h8300hms)
687 basic_machine=h8300-hitachi
688 os=-hms
689 ;;
690 h8300xray)
691 basic_machine=h8300-hitachi
692 os=-xray
693 ;;
694 h8500hms)
695 basic_machine=h8500-hitachi
696 os=-hms
697 ;;
698 harris)
699 basic_machine=m88k-harris
700 os=-sysv3
701 ;;
702 hp300-*)
703 basic_machine=m68k-hp
704 ;;
705 hp300bsd)
706 basic_machine=m68k-hp
707 os=-bsd
708 ;;
709 hp300hpux)
710 basic_machine=m68k-hp
711 os=-hpux
712 ;;
713 hp3k9[0-9][0-9] | hp9[0-9][0-9])
714 basic_machine=hppa1.0-hp
715 ;;
716 hp9k2[0-9][0-9] | hp9k31[0-9])
717 basic_machine=m68000-hp
718 ;;
719 hp9k3[2-9][0-9])
720 basic_machine=m68k-hp
721 ;;
722 hp9k6[0-9][0-9] | hp6[0-9][0-9])
723 basic_machine=hppa1.0-hp
724 ;;
725 hp9k7[0-79][0-9] | hp7[0-79][0-9])
726 basic_machine=hppa1.1-hp
727 ;;
728 hp9k78[0-9] | hp78[0-9])
729 # FIXME: really hppa2.0-hp
730 basic_machine=hppa1.1-hp
731 ;;
732 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
733 # FIXME: really hppa2.0-hp
734 basic_machine=hppa1.1-hp
735 ;;
736 hp9k8[0-9][13679] | hp8[0-9][13679])
737 basic_machine=hppa1.1-hp
738 ;;
739 hp9k8[0-9][0-9] | hp8[0-9][0-9])
740 basic_machine=hppa1.0-hp
741 ;;
742 hppaosf)
743 basic_machine=hppa1.1-hp
744 os=-osf
745 ;;
746 hppro)
747 basic_machine=hppa1.1-hp
748 os=-proelf
749 ;;
750 i370-ibm* | ibm*)
751 basic_machine=i370-ibm
752 ;;
753 i*86v32)
754 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
755 os=-sysv32
756 ;;
757 i*86v4*)
758 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
759 os=-sysv4
760 ;;
761 i*86v)
762 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
763 os=-sysv
764 ;;
765 i*86sol2)
766 basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
767 os=-solaris2
768 ;;
769 i386mach)
770 basic_machine=i386-mach
771 os=-mach
772 ;;
773 vsta)
774 basic_machine=i386-unknown
775 os=-vsta
776 ;;
777 iris | iris4d)
778 basic_machine=mips-sgi
779 case $os in
780 -irix*)
781 ;;
782 *)
783 os=-irix4
784 ;;
785 esac
786 ;;
787 isi68 | isi)
788 basic_machine=m68k-isi
789 os=-sysv
790 ;;
791 leon-*|leon[3-9]-*)
792 basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
793 ;;
794 m68knommu)
795 basic_machine=m68k-unknown
796 os=-linux
797 ;;
798 m68knommu-*)
799 basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
800 os=-linux
801 ;;
802 magnum | m3230)
803 basic_machine=mips-mips
804 os=-sysv
805 ;;
806 merlin)
807 basic_machine=ns32k-utek
808 os=-sysv
809 ;;
810 microblaze*)
811 basic_machine=microblaze-xilinx
812 ;;
813 mingw64)
814 basic_machine=x86_64-pc
815 os=-mingw64
816 ;;
817 mingw32)
818 basic_machine=i686-pc
819 os=-mingw32
820 ;;
821 mingw32ce)
822 basic_machine=arm-unknown
823 os=-mingw32ce
824 ;;
825 miniframe)
826 basic_machine=m68000-convergent
827 ;;
828 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
829 basic_machine=m68k-atari
830 os=-mint
831 ;;
832 mips3*-*)
833 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
834 ;;
835 mips3*)
836 basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
837 ;;
838 monitor)
839 basic_machine=m68k-rom68k
840 os=-coff
841 ;;
842 morphos)
843 basic_machine=powerpc-unknown
844 os=-morphos
845 ;;
846 moxiebox)
847 basic_machine=moxie-unknown
848 os=-moxiebox
849 ;;
850 msdos)
851 basic_machine=i386-pc
852 os=-msdos
853 ;;
854 ms1-*)
855 basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
856 ;;
857 msys)
858 basic_machine=i686-pc
859 os=-msys
860 ;;
861 mvs)
862 basic_machine=i370-ibm
863 os=-mvs
864 ;;
865 nacl)
866 basic_machine=le32-unknown
867 os=-nacl
868 ;;
869 ncr3000)
870 basic_machine=i486-ncr
871 os=-sysv4
872 ;;
873 netbsd386)
874 basic_machine=i386-unknown
875 os=-netbsd
876 ;;
877 netwinder)
878 basic_machine=armv4l-rebel
879 os=-linux
880 ;;
881 news | news700 | news800 | news900)
882 basic_machine=m68k-sony
883 os=-newsos
884 ;;
885 news1000)
886 basic_machine=m68030-sony
887 os=-newsos
888 ;;
889 news-3600 | risc-news)
890 basic_machine=mips-sony
891 os=-newsos
892 ;;
893 necv70)
894 basic_machine=v70-nec
895 os=-sysv
896 ;;
897 next | m*-next)
898 basic_machine=m68k-next
899 case $os in
900 -nextstep* )
901 ;;
902 -ns2*)
903 os=-nextstep2
904 ;;
905 *)
906 os=-nextstep3
907 ;;
908 esac
909 ;;
910 nh3000)
911 basic_machine=m68k-harris
912 os=-cxux
913 ;;
914 nh[45]000)
915 basic_machine=m88k-harris
916 os=-cxux
917 ;;
918 nindy960)
919 basic_machine=i960-intel
920 os=-nindy
921 ;;
922 mon960)
923 basic_machine=i960-intel
924 os=-mon960
925 ;;
926 nonstopux)
927 basic_machine=mips-compaq
928 os=-nonstopux
929 ;;
930 np1)
931 basic_machine=np1-gould
932 ;;
933 neo-tandem)
934 basic_machine=neo-tandem
935 ;;
936 nse-tandem)
937 basic_machine=nse-tandem
938 ;;
939 nsr-tandem)
940 basic_machine=nsr-tandem
941 ;;
942 nsv-tandem)
943 basic_machine=nsv-tandem
944 ;;
945 nsx-tandem)
946 basic_machine=nsx-tandem
947 ;;
948 op50n-* | op60c-*)
949 basic_machine=hppa1.1-oki
950 os=-proelf
951 ;;
952 openrisc | openrisc-*)
953 basic_machine=or32-unknown
954 ;;
955 os400)
956 basic_machine=powerpc-ibm
957 os=-os400
958 ;;
959 OSE68000 | ose68000)
960 basic_machine=m68000-ericsson
961 os=-ose
962 ;;
963 os68k)
964 basic_machine=m68k-none
965 os=-os68k
966 ;;
967 pa-hitachi)
968 basic_machine=hppa1.1-hitachi
969 os=-hiuxwe2
970 ;;
971 paragon)
972 basic_machine=i860-intel
973 os=-osf
974 ;;
975 parisc)
976 basic_machine=hppa-unknown
977 os=-linux
978 ;;
979 parisc-*)
980 basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
981 os=-linux
982 ;;
983 pbd)
984 basic_machine=sparc-tti
985 ;;
986 pbb)
987 basic_machine=m68k-tti
988 ;;
989 pc532 | pc532-*)
990 basic_machine=ns32k-pc532
991 ;;
992 pc98)
993 basic_machine=i386-pc
994 ;;
995 pc98-*)
996 basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
997 ;;
998 pentium | p5 | k5 | k6 | nexgen | viac3)
999 basic_machine=i586-pc
1000 ;;
1001 pentiumpro | p6 | 6x86 | athlon | athlon_*)
1002 basic_machine=i686-pc
1003 ;;
1004 pentiumii | pentium2 | pentiumiii | pentium3)
1005 basic_machine=i686-pc
1006 ;;
1007 pentium4)
1008 basic_machine=i786-pc
1009 ;;
1010 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1011 basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1012 ;;
1013 pentiumpro-* | p6-* | 6x86-* | athlon-*)
1014 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1015 ;;
1016 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1017 basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1018 ;;
1019 pentium4-*)
1020 basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1021 ;;
1022 pn)
1023 basic_machine=pn-gould
1024 ;;
1025 power) basic_machine=power-ibm
1026 ;;
1027 ppc | ppcbe) basic_machine=powerpc-unknown
1028 ;;
1029 ppc-* | ppcbe-*)
1030 basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1031 ;;
1032 ppcle | powerpclittle)
1033 basic_machine=powerpcle-unknown
1034 ;;
1035 ppcle-* | powerpclittle-*)
1036 basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1037 ;;
1038 ppc64) basic_machine=powerpc64-unknown
1039 ;;
1040 ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1041 ;;
1042 ppc64le | powerpc64little)
1043 basic_machine=powerpc64le-unknown
1044 ;;
1045 ppc64le-* | powerpc64little-*)
1046 basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1047 ;;
1048 ps2)
1049 basic_machine=i386-ibm
1050 ;;
1051 pw32)
1052 basic_machine=i586-unknown
1053 os=-pw32
1054 ;;
1055 rdos | rdos64)
1056 basic_machine=x86_64-pc
1057 os=-rdos
1058 ;;
1059 rdos32)
1060 basic_machine=i386-pc
1061 os=-rdos
1062 ;;
1063 rom68k)
1064 basic_machine=m68k-rom68k
1065 os=-coff
1066 ;;
1067 rm[46]00)
1068 basic_machine=mips-siemens
1069 ;;
1070 rtpc | rtpc-*)
1071 basic_machine=romp-ibm
1072 ;;
1073 s390 | s390-*)
1074 basic_machine=s390-ibm
1075 ;;
1076 s390x | s390x-*)
1077 basic_machine=s390x-ibm
1078 ;;
1079 sa29200)
1080 basic_machine=a29k-amd
1081 os=-udi
1082 ;;
1083 sb1)
1084 basic_machine=mipsisa64sb1-unknown
1085 ;;
1086 sb1el)
1087 basic_machine=mipsisa64sb1el-unknown
1088 ;;
1089 sde)
1090 basic_machine=mipsisa32-sde
1091 os=-elf
1092 ;;
1093 sei)
1094 basic_machine=mips-sei
1095 os=-seiux
1096 ;;
1097 sequent)
1098 basic_machine=i386-sequent
1099 ;;
1100 sh5el)
1101 basic_machine=sh5le-unknown
1102 ;;
1103 simso-wrs)
1104 basic_machine=sparclite-wrs
1105 os=-vxworks
1106 ;;
1107 sps7)
1108 basic_machine=m68k-bull
1109 os=-sysv2
1110 ;;
1111 spur)
1112 basic_machine=spur-unknown
1113 ;;
1114 st2000)
1115 basic_machine=m68k-tandem
1116 ;;
1117 stratus)
1118 basic_machine=i860-stratus
1119 os=-sysv4
1120 ;;
1121 strongarm-* | thumb-*)
1122 basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1123 ;;
1124 sun2)
1125 basic_machine=m68000-sun
1126 ;;
1127 sun2os3)
1128 basic_machine=m68000-sun
1129 os=-sunos3
1130 ;;
1131 sun2os4)
1132 basic_machine=m68000-sun
1133 os=-sunos4
1134 ;;
1135 sun3os3)
1136 basic_machine=m68k-sun
1137 os=-sunos3
1138 ;;
1139 sun3os4)
1140 basic_machine=m68k-sun
1141 os=-sunos4
1142 ;;
1143 sun4os3)
1144 basic_machine=sparc-sun
1145 os=-sunos3
1146 ;;
1147 sun4os4)
1148 basic_machine=sparc-sun
1149 os=-sunos4
1150 ;;
1151 sun4sol2)
1152 basic_machine=sparc-sun
1153 os=-solaris2
1154 ;;
1155 sun3 | sun3-*)
1156 basic_machine=m68k-sun
1157 ;;
1158 sun4)
1159 basic_machine=sparc-sun
1160 ;;
1161 sun386 | sun386i | roadrunner)
1162 basic_machine=i386-sun
1163 ;;
1164 sv1)
1165 basic_machine=sv1-cray
1166 os=-unicos
1167 ;;
1168 symmetry)
1169 basic_machine=i386-sequent
1170 os=-dynix
1171 ;;
1172 t3e)
1173 basic_machine=alphaev5-cray
1174 os=-unicos
1175 ;;
1176 t90)
1177 basic_machine=t90-cray
1178 os=-unicos
1179 ;;
1180 tile*)
1181 basic_machine=$basic_machine-unknown
1182 os=-linux-gnu
1183 ;;
1184 tx39)
1185 basic_machine=mipstx39-unknown
1186 ;;
1187 tx39el)
1188 basic_machine=mipstx39el-unknown
1189 ;;
1190 toad1)
1191 basic_machine=pdp10-xkl
1192 os=-tops20
1193 ;;
1194 tower | tower-32)
1195 basic_machine=m68k-ncr
1196 ;;
1197 tpf)
1198 basic_machine=s390x-ibm
1199 os=-tpf
1200 ;;
1201 udi29k)
1202 basic_machine=a29k-amd
1203 os=-udi
1204 ;;
1205 ultra3)
1206 basic_machine=a29k-nyu
1207 os=-sym1
1208 ;;
1209 v810 | necv810)
1210 basic_machine=v810-nec
1211 os=-none
1212 ;;
1213 vaxv)
1214 basic_machine=vax-dec
1215 os=-sysv
1216 ;;
1217 vms)
1218 basic_machine=vax-dec
1219 os=-vms
1220 ;;
1221 vpp*|vx|vx-*)
1222 basic_machine=f301-fujitsu
1223 ;;
1224 vxworks960)
1225 basic_machine=i960-wrs
1226 os=-vxworks
1227 ;;
1228 vxworks68)
1229 basic_machine=m68k-wrs
1230 os=-vxworks
1231 ;;
1232 vxworks29k)
1233 basic_machine=a29k-wrs
1234 os=-vxworks
1235 ;;
1236 w65*)
1237 basic_machine=w65-wdc
1238 os=-none
1239 ;;
1240 w89k-*)
1241 basic_machine=hppa1.1-winbond
1242 os=-proelf
1243 ;;
1244 x64)
1245 basic_machine=x86_64-pc
1246 ;;
1247 xbox)
1248 basic_machine=i686-pc
1249 os=-mingw32
1250 ;;
1251 xps | xps100)
1252 basic_machine=xps100-honeywell
1253 ;;
1254 xscale-* | xscalee[bl]-*)
1255 basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
1256 ;;
1257 ymp)
1258 basic_machine=ymp-cray
1259 os=-unicos
1260 ;;
1261 none)
1262 basic_machine=none-none
1263 os=-none
1264 ;;
1265
1266 # Here we handle the default manufacturer of certain CPU types. It is in
1267 # some cases the only manufacturer, in others, it is the most popular.
1268 w89k)
1269 basic_machine=hppa1.1-winbond
1270 ;;
1271 op50n)
1272 basic_machine=hppa1.1-oki
1273 ;;
1274 op60c)
1275 basic_machine=hppa1.1-oki
1276 ;;
1277 romp)
1278 basic_machine=romp-ibm
1279 ;;
1280 mmix)
1281 basic_machine=mmix-knuth
1282 ;;
1283 rs6000)
1284 basic_machine=rs6000-ibm
1285 ;;
1286 vax)
1287 basic_machine=vax-dec
1288 ;;
1289 pdp11)
1290 basic_machine=pdp11-dec
1291 ;;
1292 we32k)
1293 basic_machine=we32k-att
1294 ;;
1295 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1296 basic_machine=sh-unknown
1297 ;;
1298 cydra)
1299 basic_machine=cydra-cydrome
1300 ;;
1301 orion)
1302 basic_machine=orion-highlevel
1303 ;;
1304 orion105)
1305 basic_machine=clipper-highlevel
1306 ;;
1307 mac | mpw | mac-mpw)
1308 basic_machine=m68k-apple
1309 ;;
1310 pmac | pmac-mpw)
1311 basic_machine=powerpc-apple
1312 ;;
1313 *-unknown)
1314 # Make sure to match an already-canonicalized machine name.
1315 ;;
1316 *)
1317 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
1318 exit 1
1319 ;;
1320 esac
1321
1322 # Here we canonicalize certain aliases for manufacturers.
1323 case $basic_machine in
1324 *-digital*)
1325 basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
1326 ;;
1327 *-commodore*)
1328 basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
1329 ;;
1330 *)
1331 ;;
1332 esac
1333
1334 # Decode manufacturer-specific aliases for certain operating systems.
1335
1336 if [ x"$os" != x"" ]
1337 then
1338 case $os in
1339 # First match some system type aliases that might get confused
1340 # with valid system types.
1341 # -solaris* is a basic system type, with this one exception.
1342 -auroraux)
1343 os=-auroraux
1344 ;;
1345 -solaris1 | -solaris1.*)
1346 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1347 ;;
1348 -solaris)
1349 os=-solaris2
1350 ;;
1351 -unixware*)
1352 os=-sysv4.2uw
1353 ;;
1354 -gnu/linux*)
1355 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1356 ;;
1357 # es1800 is here to avoid being matched by es* (a different OS)
1358 -es1800*)
1359 os=-ose
1360 ;;
1361 # Now accept the basic system types.
1362 # The portable systems comes first.
1363 # Each alternative MUST end in a * to match a version number.
1364 # -sysv* is not here because it comes later, after sysvr4.
1365 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1366 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1367 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1368 | -sym* | -kopensolaris* | -plan9* \
1369 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1370 | -aos* | -aros* | -cloudabi* | -sortix* \
1371 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1372 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1373 | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
1374 | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
1375 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1376 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1377 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1378 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1379 | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
1380 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1381 | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1382 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1383 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1384 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
1385 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1386 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1387 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1388 | -morphos* | -superux* | -rtmk* | -windiss* \
1389 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1390 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
1391 | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
1392 | -midnightbsd*)
1393 # Remember, each alternative MUST END IN *, to match a version number.
1394 ;;
1395 -qnx*)
1396 case $basic_machine in
1397 x86-* | i*86-*)
1398 ;;
1399 *)
1400 os=-nto$os
1401 ;;
1402 esac
1403 ;;
1404 -nto-qnx*)
1405 ;;
1406 -nto*)
1407 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1408 ;;
1409 -sim | -xray | -os68k* | -v88r* \
1410 | -windows* | -osx | -abug | -netware* | -os9* \
1411 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1412 ;;
1413 -mac*)
1414 os=`echo "$os" | sed -e 's|mac|macos|'`
1415 ;;
1416 -linux-dietlibc)
1417 os=-linux-dietlibc
1418 ;;
1419 -linux*)
1420 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1421 ;;
1422 -sunos5*)
1423 os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
1424 ;;
1425 -sunos6*)
1426 os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
1427 ;;
1428 -opened*)
1429 os=-openedition
1430 ;;
1431 -os400*)
1432 os=-os400
1433 ;;
1434 -wince*)
1435 os=-wince
1436 ;;
1437 -utek*)
1438 os=-bsd
1439 ;;
1440 -dynix*)
1441 os=-bsd
1442 ;;
1443 -acis*)
1444 os=-aos
1445 ;;
1446 -atheos*)
1447 os=-atheos
1448 ;;
1449 -syllable*)
1450 os=-syllable
1451 ;;
1452 -386bsd)
1453 os=-bsd
1454 ;;
1455 -ctix* | -uts*)
1456 os=-sysv
1457 ;;
1458 -nova*)
1459 os=-rtmk-nova
1460 ;;
1461 -ns2)
1462 os=-nextstep2
1463 ;;
1464 -nsk*)
1465 os=-nsk
1466 ;;
1467 # Preserve the version number of sinix5.
1468 -sinix5.*)
1469 os=`echo $os | sed -e 's|sinix|sysv|'`
1470 ;;
1471 -sinix*)
1472 os=-sysv4
1473 ;;
1474 -tpf*)
1475 os=-tpf
1476 ;;
1477 -triton*)
1478 os=-sysv3
1479 ;;
1480 -oss*)
1481 os=-sysv3
1482 ;;
1483 -svr4*)
1484 os=-sysv4
1485 ;;
1486 -svr3)
1487 os=-sysv3
1488 ;;
1489 -sysvr4)
1490 os=-sysv4
1491 ;;
1492 # This must come after -sysvr4.
1493 -sysv*)
1494 ;;
1495 -ose*)
1496 os=-ose
1497 ;;
1498 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1499 os=-mint
1500 ;;
1501 -zvmoe)
1502 os=-zvmoe
1503 ;;
1504 -dicos*)
1505 os=-dicos
1506 ;;
1507 -pikeos*)
1508 # Until real need of OS specific support for
1509 # particular features comes up, bare metal
1510 # configurations are quite functional.
1511 case $basic_machine in
1512 arm*)
1513 os=-eabi
1514 ;;
1515 *)
1516 os=-elf
1517 ;;
1518 esac
1519 ;;
1520 -nacl*)
1521 ;;
1522 -ios)
1523 ;;
1524 -none)
1525 ;;
1526 *)
1527 # Get rid of the `-' at the beginning of $os.
1528 os=`echo $os | sed 's/[^-]*-//'`
1529 echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
1530 exit 1
1531 ;;
1532 esac
1533 else
1534
1535 # Here we handle the default operating systems that come with various machines.
1536 # The value should be what the vendor currently ships out the door with their
1537 # machine or put another way, the most popular os provided with the machine.
1538
1539 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1540 # "-sun"), then you have to tell the case statement up towards the top
1541 # that MANUFACTURER isn't an operating system. Otherwise, code above
1542 # will signal an error saying that MANUFACTURER isn't an operating
1543 # system, and we'll never get to this point.
1544
1545 case $basic_machine in
1546 score-*)
1547 os=-elf
1548 ;;
1549 spu-*)
1550 os=-elf
1551 ;;
1552 *-acorn)
1553 os=-riscix1.2
1554 ;;
1555 arm*-rebel)
1556 os=-linux
1557 ;;
1558 arm*-semi)
1559 os=-aout
1560 ;;
1561 c4x-* | tic4x-*)
1562 os=-coff
1563 ;;
1564 c8051-*)
1565 os=-elf
1566 ;;
1567 hexagon-*)
1568 os=-elf
1569 ;;
1570 tic54x-*)
1571 os=-coff
1572 ;;
1573 tic55x-*)
1574 os=-coff
1575 ;;
1576 tic6x-*)
1577 os=-coff
1578 ;;
1579 # This must come before the *-dec entry.
1580 pdp10-*)
1581 os=-tops20
1582 ;;
1583 pdp11-*)
1584 os=-none
1585 ;;
1586 *-dec | vax-*)
1587 os=-ultrix4.2
1588 ;;
1589 m68*-apollo)
1590 os=-domain
1591 ;;
1592 i386-sun)
1593 os=-sunos4.0.2
1594 ;;
1595 m68000-sun)
1596 os=-sunos3
1597 ;;
1598 m68*-cisco)
1599 os=-aout
1600 ;;
1601 mep-*)
1602 os=-elf
1603 ;;
1604 mips*-cisco)
1605 os=-elf
1606 ;;
1607 mips*-*)
1608 os=-elf
1609 ;;
1610 or32-*)
1611 os=-coff
1612 ;;
1613 *-tti) # must be before sparc entry or we get the wrong os.
1614 os=-sysv3
1615 ;;
1616 sparc-* | *-sun)
1617 os=-sunos4.1.1
1618 ;;
1619 pru-*)
1620 os=-elf
1621 ;;
1622 *-be)
1623 os=-beos
1624 ;;
1625 *-ibm)
1626 os=-aix
1627 ;;
1628 *-knuth)
1629 os=-mmixware
1630 ;;
1631 *-wec)
1632 os=-proelf
1633 ;;
1634 *-winbond)
1635 os=-proelf
1636 ;;
1637 *-oki)
1638 os=-proelf
1639 ;;
1640 *-hp)
1641 os=-hpux
1642 ;;
1643 *-hitachi)
1644 os=-hiux
1645 ;;
1646 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1647 os=-sysv
1648 ;;
1649 *-cbm)
1650 os=-amigaos
1651 ;;
1652 *-dg)
1653 os=-dgux
1654 ;;
1655 *-dolphin)
1656 os=-sysv3
1657 ;;
1658 m68k-ccur)
1659 os=-rtu
1660 ;;
1661 m88k-omron*)
1662 os=-luna
1663 ;;
1664 *-next)
1665 os=-nextstep
1666 ;;
1667 *-sequent)
1668 os=-ptx
1669 ;;
1670 *-crds)
1671 os=-unos
1672 ;;
1673 *-ns)
1674 os=-genix
1675 ;;
1676 i370-*)
1677 os=-mvs
1678 ;;
1679 *-gould)
1680 os=-sysv
1681 ;;
1682 *-highlevel)
1683 os=-bsd
1684 ;;
1685 *-encore)
1686 os=-bsd
1687 ;;
1688 *-sgi)
1689 os=-irix
1690 ;;
1691 *-siemens)
1692 os=-sysv4
1693 ;;
1694 *-masscomp)
1695 os=-rtu
1696 ;;
1697 f30[01]-fujitsu | f700-fujitsu)
1698 os=-uxpv
1699 ;;
1700 *-rom68k)
1701 os=-coff
1702 ;;
1703 *-*bug)
1704 os=-coff
1705 ;;
1706 *-apple)
1707 os=-macos
1708 ;;
1709 *-atari*)
1710 os=-mint
1711 ;;
1712 *)
1713 os=-none
1714 ;;
1715 esac
1716 fi
1717
1718 # Here we handle the case where we know the os, and the CPU type, but not the
1719 # manufacturer. We pick the logical manufacturer.
1720 vendor=unknown
1721 case $basic_machine in
1722 *-unknown)
1723 case $os in
1724 -riscix*)
1725 vendor=acorn
1726 ;;
1727 -sunos*)
1728 vendor=sun
1729 ;;
1730 -cnk*|-aix*)
1731 vendor=ibm
1732 ;;
1733 -beos*)
1734 vendor=be
1735 ;;
1736 -hpux*)
1737 vendor=hp
1738 ;;
1739 -mpeix*)
1740 vendor=hp
1741 ;;
1742 -hiux*)
1743 vendor=hitachi
1744 ;;
1745 -unos*)
1746 vendor=crds
1747 ;;
1748 -dgux*)
1749 vendor=dg
1750 ;;
1751 -luna*)
1752 vendor=omron
1753 ;;
1754 -genix*)
1755 vendor=ns
1756 ;;
1757 -mvs* | -opened*)
1758 vendor=ibm
1759 ;;
1760 -os400*)
1761 vendor=ibm
1762 ;;
1763 -ptx*)
1764 vendor=sequent
1765 ;;
1766 -tpf*)
1767 vendor=ibm
1768 ;;
1769 -vxsim* | -vxworks* | -windiss*)
1770 vendor=wrs
1771 ;;
1772 -aux*)
1773 vendor=apple
1774 ;;
1775 -hms*)
1776 vendor=hitachi
1777 ;;
1778 -mpw* | -macos*)
1779 vendor=apple
1780 ;;
1781 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1782 vendor=atari
1783 ;;
1784 -vos*)
1785 vendor=stratus
1786 ;;
1787 esac
1788 basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
1789 ;;
1790 esac
1791
1792 echo "$basic_machine$os"
1793 exit
1794
1795 # Local variables:
1796 # eval: (add-hook 'write-file-functions 'time-stamp)
1797 # time-stamp-start: "timestamp='"
1798 # time-stamp-format: "%:y-%02m-%02d"
1799 # time-stamp-end: "'"
1800 # End:
+0
-7690
configure less more
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for ocaml-faad 0.4.0.
3 #
4 # Report bugs to <savonet-users@lists.sourceforge.net>.
5 #
6 #
7 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
8 #
9 #
10 # This configure script is free software; the Free Software Foundation
11 # gives unlimited permission to copy, distribute and modify it.
12 ## -------------------- ##
13 ## M4sh Initialization. ##
14 ## -------------------- ##
15
16 # Be more Bourne compatible
17 DUALCASE=1; export DUALCASE # for MKS sh
18 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19 emulate sh
20 NULLCMD=:
21 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
24 setopt NO_GLOB_SUBST
25 else
26 case `(set -o) 2>/dev/null` in #(
27 *posix*) :
28 set -o posix ;; #(
29 *) :
30 ;;
31 esac
32 fi
33
34
35 as_nl='
36 '
37 export as_nl
38 # Printing a long string crashes Solaris 7 /usr/bin/printf.
39 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
42 # Prefer a ksh shell builtin over an external printf program on Solaris,
43 # but without wasting forks for bash or zsh.
44 if test -z "$BASH_VERSION$ZSH_VERSION" \
45 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
46 as_echo='print -r --'
47 as_echo_n='print -rn --'
48 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='printf %s\n'
50 as_echo_n='printf %s'
51 else
52 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
54 as_echo_n='/usr/ucb/echo -n'
55 else
56 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
57 as_echo_n_body='eval
58 arg=$1;
59 case $arg in #(
60 *"$as_nl"*)
61 expr "X$arg" : "X\\(.*\\)$as_nl";
62 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
63 esac;
64 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65 '
66 export as_echo_n_body
67 as_echo_n='sh -c $as_echo_n_body as_echo'
68 fi
69 export as_echo_body
70 as_echo='sh -c $as_echo_body as_echo'
71 fi
72
73 # The user is always right.
74 if test "${PATH_SEPARATOR+set}" != set; then
75 PATH_SEPARATOR=:
76 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
77 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
78 PATH_SEPARATOR=';'
79 }
80 fi
81
82
83 # IFS
84 # We need space, tab and new line, in precisely that order. Quoting is
85 # there to prevent editors from complaining about space-tab.
86 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
87 # splitting by setting IFS to empty value.)
88 IFS=" "" $as_nl"
89
90 # Find who we are. Look in the path if we contain no directory separator.
91 as_myself=
92 case $0 in #((
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95 for as_dir in $PATH
96 do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
101 IFS=$as_save_IFS
102
103 ;;
104 esac
105 # We did not find ourselves, most probably we were run as `sh COMMAND'
106 # in which case we are not to be found in the path.
107 if test "x$as_myself" = x; then
108 as_myself=$0
109 fi
110 if test ! -f "$as_myself"; then
111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112 exit 1
113 fi
114
115 # Unset variables that we do not need and which cause bugs (e.g. in
116 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117 # suppresses any "Segmentation fault" message there. '((' could
118 # trigger a bug in pdksh 5.2.14.
119 for as_var in BASH_ENV ENV MAIL MAILPATH
120 do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122 done
123 PS1='$ '
124 PS2='> '
125 PS4='+ '
126
127 # NLS nuisances.
128 LC_ALL=C
129 export LC_ALL
130 LANGUAGE=C
131 export LANGUAGE
132
133 # CDPATH.
134 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136 # Use a proper internal environment variable to ensure we don't fall
137 # into an infinite loop, continuously re-executing ourselves.
138 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
139 _as_can_reexec=no; export _as_can_reexec;
140 # We cannot yet assume a decent shell, so we have to provide a
141 # neutralization value for shells without unset; and this also
142 # works around shells that cannot unset nonexistent variables.
143 # Preserve -v and -x to the replacement shell.
144 BASH_ENV=/dev/null
145 ENV=/dev/null
146 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
147 case $- in # ((((
148 *v*x* | *x*v* ) as_opts=-vx ;;
149 *v* ) as_opts=-v ;;
150 *x* ) as_opts=-x ;;
151 * ) as_opts= ;;
152 esac
153 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
154 # Admittedly, this is quite paranoid, since all the known shells bail
155 # out after a failed `exec'.
156 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
157 as_fn_exit 255
158 fi
159 # We don't want this to propagate to other subprocesses.
160 { _as_can_reexec=; unset _as_can_reexec;}
161 if test "x$CONFIG_SHELL" = x; then
162 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
163 emulate sh
164 NULLCMD=:
165 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
166 # is contrary to our usage. Disable this feature.
167 alias -g '\${1+\"\$@\"}'='\"\$@\"'
168 setopt NO_GLOB_SUBST
169 else
170 case \`(set -o) 2>/dev/null\` in #(
171 *posix*) :
172 set -o posix ;; #(
173 *) :
174 ;;
175 esac
176 fi
177 "
178 as_required="as_fn_return () { (exit \$1); }
179 as_fn_success () { as_fn_return 0; }
180 as_fn_failure () { as_fn_return 1; }
181 as_fn_ret_success () { return 0; }
182 as_fn_ret_failure () { return 1; }
183
184 exitcode=0
185 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
186 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
187 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
188 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
189 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
190
191 else
192 exitcode=1; echo positional parameters were not saved.
193 fi
194 test x\$exitcode = x0 || exit 1
195 test -x / || exit 1"
196 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
197 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
198 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
199 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
200 test \$(( 1 + 1 )) = 2 || exit 1"
201 if (eval "$as_required") 2>/dev/null; then :
202 as_have_required=yes
203 else
204 as_have_required=no
205 fi
206 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
207
208 else
209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
210 as_found=false
211 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
212 do
213 IFS=$as_save_IFS
214 test -z "$as_dir" && as_dir=.
215 as_found=:
216 case $as_dir in #(
217 /*)
218 for as_base in sh bash ksh sh5; do
219 # Try only shells that exist, to save several forks.
220 as_shell=$as_dir/$as_base
221 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
222 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
223 CONFIG_SHELL=$as_shell as_have_required=yes
224 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 break 2
226 fi
227 fi
228 done;;
229 esac
230 as_found=false
231 done
232 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
233 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
234 CONFIG_SHELL=$SHELL as_have_required=yes
235 fi; }
236 IFS=$as_save_IFS
237
238
239 if test "x$CONFIG_SHELL" != x; then :
240 export CONFIG_SHELL
241 # We cannot yet assume a decent shell, so we have to provide a
242 # neutralization value for shells without unset; and this also
243 # works around shells that cannot unset nonexistent variables.
244 # Preserve -v and -x to the replacement shell.
245 BASH_ENV=/dev/null
246 ENV=/dev/null
247 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
248 case $- in # ((((
249 *v*x* | *x*v* ) as_opts=-vx ;;
250 *v* ) as_opts=-v ;;
251 *x* ) as_opts=-x ;;
252 * ) as_opts= ;;
253 esac
254 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
255 # Admittedly, this is quite paranoid, since all the known shells bail
256 # out after a failed `exec'.
257 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
258 exit 255
259 fi
260
261 if test x$as_have_required = xno; then :
262 $as_echo "$0: This script requires a shell more modern than all"
263 $as_echo "$0: the shells that I found on your system."
264 if test x${ZSH_VERSION+set} = xset ; then
265 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
266 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
267 else
268 $as_echo "$0: Please tell bug-autoconf@gnu.org and
269 $0: savonet-users@lists.sourceforge.net about your system,
270 $0: including any error possibly output before this
271 $0: message. Then install a modern shell, or manually run
272 $0: the script under such a shell if you do have one."
273 fi
274 exit 1
275 fi
276 fi
277 fi
278 SHELL=${CONFIG_SHELL-/bin/sh}
279 export SHELL
280 # Unset more variables known to interfere with behavior of common tools.
281 CLICOLOR_FORCE= GREP_OPTIONS=
282 unset CLICOLOR_FORCE GREP_OPTIONS
283
284 ## --------------------- ##
285 ## M4sh Shell Functions. ##
286 ## --------------------- ##
287 # as_fn_unset VAR
288 # ---------------
289 # Portably unset VAR.
290 as_fn_unset ()
291 {
292 { eval $1=; unset $1;}
293 }
294 as_unset=as_fn_unset
295
296 # as_fn_set_status STATUS
297 # -----------------------
298 # Set $? to STATUS, without forking.
299 as_fn_set_status ()
300 {
301 return $1
302 } # as_fn_set_status
303
304 # as_fn_exit STATUS
305 # -----------------
306 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
307 as_fn_exit ()
308 {
309 set +e
310 as_fn_set_status $1
311 exit $1
312 } # as_fn_exit
313
314 # as_fn_mkdir_p
315 # -------------
316 # Create "$as_dir" as a directory, including parents if necessary.
317 as_fn_mkdir_p ()
318 {
319
320 case $as_dir in #(
321 -*) as_dir=./$as_dir;;
322 esac
323 test -d "$as_dir" || eval $as_mkdir_p || {
324 as_dirs=
325 while :; do
326 case $as_dir in #(
327 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
328 *) as_qdir=$as_dir;;
329 esac
330 as_dirs="'$as_qdir' $as_dirs"
331 as_dir=`$as_dirname -- "$as_dir" ||
332 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
333 X"$as_dir" : 'X\(//\)[^/]' \| \
334 X"$as_dir" : 'X\(//\)$' \| \
335 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
336 $as_echo X"$as_dir" |
337 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
338 s//\1/
339 q
340 }
341 /^X\(\/\/\)[^/].*/{
342 s//\1/
343 q
344 }
345 /^X\(\/\/\)$/{
346 s//\1/
347 q
348 }
349 /^X\(\/\).*/{
350 s//\1/
351 q
352 }
353 s/.*/./; q'`
354 test -d "$as_dir" && break
355 done
356 test -z "$as_dirs" || eval "mkdir $as_dirs"
357 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
358
359
360 } # as_fn_mkdir_p
361
362 # as_fn_executable_p FILE
363 # -----------------------
364 # Test if FILE is an executable regular file.
365 as_fn_executable_p ()
366 {
367 test -f "$1" && test -x "$1"
368 } # as_fn_executable_p
369 # as_fn_append VAR VALUE
370 # ----------------------
371 # Append the text in VALUE to the end of the definition contained in VAR. Take
372 # advantage of any shell optimizations that allow amortized linear growth over
373 # repeated appends, instead of the typical quadratic growth present in naive
374 # implementations.
375 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
376 eval 'as_fn_append ()
377 {
378 eval $1+=\$2
379 }'
380 else
381 as_fn_append ()
382 {
383 eval $1=\$$1\$2
384 }
385 fi # as_fn_append
386
387 # as_fn_arith ARG...
388 # ------------------
389 # Perform arithmetic evaluation on the ARGs, and store the result in the
390 # global $as_val. Take advantage of shells that can avoid forks. The arguments
391 # must be portable across $(()) and expr.
392 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
393 eval 'as_fn_arith ()
394 {
395 as_val=$(( $* ))
396 }'
397 else
398 as_fn_arith ()
399 {
400 as_val=`expr "$@" || test $? -eq 1`
401 }
402 fi # as_fn_arith
403
404
405 # as_fn_error STATUS ERROR [LINENO LOG_FD]
406 # ----------------------------------------
407 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
408 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
409 # script with STATUS, using 1 if that was 0.
410 as_fn_error ()
411 {
412 as_status=$1; test $as_status -eq 0 && as_status=1
413 if test "$4"; then
414 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
415 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
416 fi
417 $as_echo "$as_me: error: $2" >&2
418 as_fn_exit $as_status
419 } # as_fn_error
420
421 if expr a : '\(a\)' >/dev/null 2>&1 &&
422 test "X`expr 00001 : '.*\(...\)'`" = X001; then
423 as_expr=expr
424 else
425 as_expr=false
426 fi
427
428 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
429 as_basename=basename
430 else
431 as_basename=false
432 fi
433
434 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
435 as_dirname=dirname
436 else
437 as_dirname=false
438 fi
439
440 as_me=`$as_basename -- "$0" ||
441 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
442 X"$0" : 'X\(//\)$' \| \
443 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
444 $as_echo X/"$0" |
445 sed '/^.*\/\([^/][^/]*\)\/*$/{
446 s//\1/
447 q
448 }
449 /^X\/\(\/\/\)$/{
450 s//\1/
451 q
452 }
453 /^X\/\(\/\).*/{
454 s//\1/
455 q
456 }
457 s/.*/./; q'`
458
459 # Avoid depending upon Character Ranges.
460 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
461 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
462 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
463 as_cr_digits='0123456789'
464 as_cr_alnum=$as_cr_Letters$as_cr_digits
465
466
467 as_lineno_1=$LINENO as_lineno_1a=$LINENO
468 as_lineno_2=$LINENO as_lineno_2a=$LINENO
469 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
470 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
471 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
472 sed -n '
473 p
474 /[$]LINENO/=
475 ' <$as_myself |
476 sed '
477 s/[$]LINENO.*/&-/
478 t lineno
479 b
480 :lineno
481 N
482 :loop
483 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
484 t loop
485 s/-\n.*//
486 ' >$as_me.lineno &&
487 chmod +x "$as_me.lineno" ||
488 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
489
490 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
491 # already done that, so ensure we don't try to do so again and fall
492 # in an infinite loop. This has already happened in practice.
493 _as_can_reexec=no; export _as_can_reexec
494 # Don't try to exec as it changes $[0], causing all sort of problems
495 # (the dirname of $[0] is not the place where we might find the
496 # original and so on. Autoconf is especially sensitive to this).
497 . "./$as_me.lineno"
498 # Exit status is that of the last command.
499 exit
500 }
501
502 ECHO_C= ECHO_N= ECHO_T=
503 case `echo -n x` in #(((((
504 -n*)
505 case `echo 'xy\c'` in
506 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
507 xy) ECHO_C='\c';;
508 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
509 ECHO_T=' ';;
510 esac;;
511 *)
512 ECHO_N='-n';;
513 esac
514
515 rm -f conf$$ conf$$.exe conf$$.file
516 if test -d conf$$.dir; then
517 rm -f conf$$.dir/conf$$.file
518 else
519 rm -f conf$$.dir
520 mkdir conf$$.dir 2>/dev/null
521 fi
522 if (echo >conf$$.file) 2>/dev/null; then
523 if ln -s conf$$.file conf$$ 2>/dev/null; then
524 as_ln_s='ln -s'
525 # ... but there are two gotchas:
526 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
527 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
528 # In both cases, we have to default to `cp -pR'.
529 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
530 as_ln_s='cp -pR'
531 elif ln conf$$.file conf$$ 2>/dev/null; then
532 as_ln_s=ln
533 else
534 as_ln_s='cp -pR'
535 fi
536 else
537 as_ln_s='cp -pR'
538 fi
539 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
540 rmdir conf$$.dir 2>/dev/null
541
542 if mkdir -p . 2>/dev/null; then
543 as_mkdir_p='mkdir -p "$as_dir"'
544 else
545 test -d ./-p && rmdir ./-p
546 as_mkdir_p=false
547 fi
548
549 as_test_x='test -x'
550 as_executable_p=as_fn_executable_p
551
552 # Sed expression to map a string onto a valid CPP name.
553 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
554
555 # Sed expression to map a string onto a valid variable name.
556 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
557
558 as_awk_strverscmp='
559 # Use only awk features that work with 7th edition Unix awk (1978).
560 # My, what an old awk you have, Mr. Solaris!
561 END {
562 while (length(v1) && length(v2)) {
563 # Set d1 to be the next thing to compare from v1, and likewise for d2.
564 # Normally this is a single character, but if v1 and v2 contain digits,
565 # compare them as integers and fractions as strverscmp does.
566 if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) {
567 # Split v1 and v2 into their leading digit string components d1 and d2,
568 # and advance v1 and v2 past the leading digit strings.
569 for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue
570 for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue
571 d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1)
572 d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1)
573 if (d1 ~ /^0/) {
574 if (d2 ~ /^0/) {
575 # Compare two fractions.
576 while (d1 ~ /^0/ && d2 ~ /^0/) {
577 d1 = substr(d1, 2); len1--
578 d2 = substr(d2, 2); len2--
579 }
580 if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) {
581 # The two components differ in length, and the common prefix
582 # contains only leading zeros. Consider the longer to be less.
583 d1 = -len1
584 d2 = -len2
585 } else {
586 # Otherwise, compare as strings.
587 d1 = "x" d1
588 d2 = "x" d2
589 }
590 } else {
591 # A fraction is less than an integer.
592 exit 1
593 }
594 } else {
595 if (d2 ~ /^0/) {
596 # An integer is greater than a fraction.
597 exit 2
598 } else {
599 # Compare two integers.
600 d1 += 0
601 d2 += 0
602 }
603 }
604 } else {
605 # The normal case, without worrying about digits.
606 d1 = substr(v1, 1, 1); v1 = substr(v1, 2)
607 d2 = substr(v2, 1, 1); v2 = substr(v2, 2)
608 }
609 if (d1 < d2) exit 1
610 if (d1 > d2) exit 2
611 }
612 # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10),
613 # which mishandles some comparisons of empty strings to integers.
614 if (length(v2)) exit 1
615 if (length(v1)) exit 2
616 }
617 '
618
619 test -n "$DJDIR" || exec 7<&0 </dev/null
620 exec 6>&1
621
622 # Name of the host.
623 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
624 # so uname gets run too.
625 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
626
627 #
628 # Initializations.
629 #
630 ac_default_prefix=/usr/local
631 ac_clean_files=
632 ac_config_libobj_dir=.
633 LIBOBJS=
634 cross_compiling=no
635 subdirs=
636 MFLAGS=
637 MAKEFLAGS=
638
639 # Identity of this package.
640 PACKAGE_NAME='ocaml-faad'
641 PACKAGE_TARNAME='ocaml-faad'
642 PACKAGE_VERSION='0.4.0'
643 PACKAGE_STRING='ocaml-faad 0.4.0'
644 PACKAGE_BUGREPORT='savonet-users@lists.sourceforge.net'
645 PACKAGE_URL=''
646
647 # Factoring default headers for most tests.
648 ac_includes_default="\
649 #include <stdio.h>
650 #ifdef HAVE_SYS_TYPES_H
651 # include <sys/types.h>
652 #endif
653 #ifdef HAVE_SYS_STAT_H
654 # include <sys/stat.h>
655 #endif
656 #ifdef STDC_HEADERS
657 # include <stdlib.h>
658 # include <stddef.h>
659 #else
660 # ifdef HAVE_STDLIB_H
661 # include <stdlib.h>
662 # endif
663 #endif
664 #ifdef HAVE_STRING_H
665 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
666 # include <memory.h>
667 # endif
668 # include <string.h>
669 #endif
670 #ifdef HAVE_STRINGS_H
671 # include <strings.h>
672 #endif
673 #ifdef HAVE_INTTYPES_H
674 # include <inttypes.h>
675 #endif
676 #ifdef HAVE_STDINT_H
677 # include <stdint.h>
678 #endif
679 #ifdef HAVE_UNISTD_H
680 # include <unistd.h>
681 #endif"
682
683 ac_subst_vars='LTLIBOBJS
684 LIBOBJS
685 INC
686 VERSION
687 W_BYTES
688 EGREP
689 GREP
690 CPP
691 PIC_FLAGS
692 OCAMLFLAGS
693 CAMLLIBPATH
694 OCAMLNCFLAGS
695 OCAML_STDLIB
696 OCAMLFIND
697 CAMLP4RF
698 CAMLP4R
699 CAMLP4PROF
700 CAMLP4ORF
701 CAMLP4OOF
702 CAMLP4OF
703 CAMLP4O
704 CAMLP4BOOT
705 CAMLP4
706 OCAMLYACC
707 OCAMLLEXDOTOPT
708 OCAMLLEX
709 CAMLIDL
710 OCAMLBUILD
711 OCAMLDOCOPT
712 OCAMLDOC
713 OCAMLMKLIB
714 OCAMLMKTOP
715 OCAMLDEPOPT
716 OCAMLDEP
717 OCAML
718 OCAMLOPTDOTOPT
719 OCAMLCDOTOPT
720 OCAML_DYNLINK
721 OCAMLBEST
722 OCAMLOPT
723 OCAMLLIB
724 OCAMLVERSION
725 OCAML_HAS_FIRST_CLASS_MODULES
726 OCAMLC
727 OCAMLFIND_LDCONF
728 AR
729 INSTALL_DATA
730 INSTALL_SCRIPT
731 INSTALL_PROGRAM
732 AUTOCONF_INSTALL_FILES
733 TARGET_TOOLCHAIN
734 host_os
735 host_vendor
736 host_cpu
737 host
738 build_os
739 build_vendor
740 build_cpu
741 build
742 OBJEXT
743 EXEEXT
744 ac_ct_CC
745 CPPFLAGS
746 LDFLAGS
747 CFLAGS
748 CC
749 target_alias
750 host_alias
751 build_alias
752 LIBS
753 ECHO_T
754 ECHO_N
755 ECHO_C
756 DEFS
757 mandir
758 localedir
759 libdir
760 psdir
761 pdfdir
762 dvidir
763 htmldir
764 infodir
765 docdir
766 oldincludedir
767 includedir
768 runstatedir
769 localstatedir
770 sharedstatedir
771 sysconfdir
772 datadir
773 datarootdir
774 libexecdir
775 sbindir
776 bindir
777 program_transform_name
778 prefix
779 exec_prefix
780 PACKAGE_URL
781 PACKAGE_BUGREPORT
782 PACKAGE_STRING
783 PACKAGE_VERSION
784 PACKAGE_TARNAME
785 PACKAGE_NAME
786 PATH_SEPARATOR
787 SHELL'
788 ac_subst_files=''
789 ac_user_opts='
790 enable_option_checking
791 enable_ldconf
792 enable_camlp4
793 enable_debugging
794 with_ocaml_warnings
795 enable_profiling
796 enable_nativecode
797 enable_custom
798 enable_pic
799 with_bytes_dir
800 enable_bytes_dynamic_plugin
801 '
802 ac_precious_vars='build_alias
803 host_alias
804 target_alias
805 CC
806 CFLAGS
807 LDFLAGS
808 LIBS
809 CPPFLAGS
810 PIC_FLAGS
811 CPP'
812
813
814 # Initialize some variables set by options.
815 ac_init_help=
816 ac_init_version=false
817 ac_unrecognized_opts=
818 ac_unrecognized_sep=
819 # The variables have the same names as the options, with
820 # dashes changed to underlines.
821 cache_file=/dev/null
822 exec_prefix=NONE
823 no_create=
824 no_recursion=
825 prefix=NONE
826 program_prefix=NONE
827 program_suffix=NONE
828 program_transform_name=s,x,x,
829 silent=
830 site=
831 srcdir=
832 verbose=
833 x_includes=NONE
834 x_libraries=NONE
835
836 # Installation directory options.
837 # These are left unexpanded so users can "make install exec_prefix=/foo"
838 # and all the variables that are supposed to be based on exec_prefix
839 # by default will actually change.
840 # Use braces instead of parens because sh, perl, etc. also accept them.
841 # (The list follows the same order as the GNU Coding Standards.)
842 bindir='${exec_prefix}/bin'
843 sbindir='${exec_prefix}/sbin'
844 libexecdir='${exec_prefix}/libexec'
845 datarootdir='${prefix}/share'
846 datadir='${datarootdir}'
847 sysconfdir='${prefix}/etc'
848 sharedstatedir='${prefix}/com'
849 localstatedir='${prefix}/var'
850 runstatedir='${localstatedir}/run'
851 includedir='${prefix}/include'
852 oldincludedir='/usr/include'
853 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
854 infodir='${datarootdir}/info'
855 htmldir='${docdir}'
856 dvidir='${docdir}'
857 pdfdir='${docdir}'
858 psdir='${docdir}'
859 libdir='${exec_prefix}/lib'
860 localedir='${datarootdir}/locale'
861 mandir='${datarootdir}/man'
862
863 ac_prev=
864 ac_dashdash=
865 for ac_option
866 do
867 # If the previous option needs an argument, assign it.
868 if test -n "$ac_prev"; then
869 eval $ac_prev=\$ac_option
870 ac_prev=
871 continue
872 fi
873
874 case $ac_option in
875 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
876 *=) ac_optarg= ;;
877 *) ac_optarg=yes ;;
878 esac
879
880 # Accept the important Cygnus configure options, so we can diagnose typos.
881
882 case $ac_dashdash$ac_option in
883 --)
884 ac_dashdash=yes ;;
885
886 -bindir | --bindir | --bindi | --bind | --bin | --bi)
887 ac_prev=bindir ;;
888 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
889 bindir=$ac_optarg ;;
890
891 -build | --build | --buil | --bui | --bu)
892 ac_prev=build_alias ;;
893 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
894 build_alias=$ac_optarg ;;
895
896 -cache-file | --cache-file | --cache-fil | --cache-fi \
897 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
898 ac_prev=cache_file ;;
899 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
900 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
901 cache_file=$ac_optarg ;;
902
903 --config-cache | -C)
904 cache_file=config.cache ;;
905
906 -datadir | --datadir | --datadi | --datad)
907 ac_prev=datadir ;;
908 -datadir=* | --datadir=* | --datadi=* | --datad=*)
909 datadir=$ac_optarg ;;
910
911 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
912 | --dataroo | --dataro | --datar)
913 ac_prev=datarootdir ;;
914 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
915 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
916 datarootdir=$ac_optarg ;;
917
918 -disable-* | --disable-*)
919 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
920 # Reject names that are not valid shell variable names.
921 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
922 as_fn_error $? "invalid feature name: $ac_useropt"
923 ac_useropt_orig=$ac_useropt
924 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
925 case $ac_user_opts in
926 *"
927 "enable_$ac_useropt"
928 "*) ;;
929 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
930 ac_unrecognized_sep=', ';;
931 esac
932 eval enable_$ac_useropt=no ;;
933
934 -docdir | --docdir | --docdi | --doc | --do)
935 ac_prev=docdir ;;
936 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
937 docdir=$ac_optarg ;;
938
939 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
940 ac_prev=dvidir ;;
941 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
942 dvidir=$ac_optarg ;;
943
944 -enable-* | --enable-*)
945 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
946 # Reject names that are not valid shell variable names.
947 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
948 as_fn_error $? "invalid feature name: $ac_useropt"
949 ac_useropt_orig=$ac_useropt
950 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
951 case $ac_user_opts in
952 *"
953 "enable_$ac_useropt"
954 "*) ;;
955 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
956 ac_unrecognized_sep=', ';;
957 esac
958 eval enable_$ac_useropt=\$ac_optarg ;;
959
960 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
961 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
962 | --exec | --exe | --ex)
963 ac_prev=exec_prefix ;;
964 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
965 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
966 | --exec=* | --exe=* | --ex=*)
967 exec_prefix=$ac_optarg ;;
968
969 -gas | --gas | --ga | --g)
970 # Obsolete; use --with-gas.
971 with_gas=yes ;;
972
973 -help | --help | --hel | --he | -h)
974 ac_init_help=long ;;
975 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
976 ac_init_help=recursive ;;
977 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
978 ac_init_help=short ;;
979
980 -host | --host | --hos | --ho)
981 ac_prev=host_alias ;;
982 -host=* | --host=* | --hos=* | --ho=*)
983 host_alias=$ac_optarg ;;
984
985 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
986 ac_prev=htmldir ;;
987 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
988 | --ht=*)
989 htmldir=$ac_optarg ;;
990
991 -includedir | --includedir | --includedi | --included | --include \
992 | --includ | --inclu | --incl | --inc)
993 ac_prev=includedir ;;
994 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
995 | --includ=* | --inclu=* | --incl=* | --inc=*)
996 includedir=$ac_optarg ;;
997
998 -infodir | --infodir | --infodi | --infod | --info | --inf)
999 ac_prev=infodir ;;
1000 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1001 infodir=$ac_optarg ;;
1002
1003 -libdir | --libdir | --libdi | --libd)
1004 ac_prev=libdir ;;
1005 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1006 libdir=$ac_optarg ;;
1007
1008 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1009 | --libexe | --libex | --libe)
1010 ac_prev=libexecdir ;;
1011 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1012 | --libexe=* | --libex=* | --libe=*)
1013 libexecdir=$ac_optarg ;;
1014
1015 -localedir | --localedir | --localedi | --localed | --locale)
1016 ac_prev=localedir ;;
1017 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1018 localedir=$ac_optarg ;;
1019
1020 -localstatedir | --localstatedir | --localstatedi | --localstated \
1021 | --localstate | --localstat | --localsta | --localst | --locals)
1022 ac_prev=localstatedir ;;
1023 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1024 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1025 localstatedir=$ac_optarg ;;
1026
1027 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1028 ac_prev=mandir ;;
1029 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1030 mandir=$ac_optarg ;;
1031
1032 -nfp | --nfp | --nf)
1033 # Obsolete; use --without-fp.
1034 with_fp=no ;;
1035
1036 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1037 | --no-cr | --no-c | -n)
1038 no_create=yes ;;
1039
1040 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1041 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1042 no_recursion=yes ;;
1043
1044 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1045 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1046 | --oldin | --oldi | --old | --ol | --o)
1047 ac_prev=oldincludedir ;;
1048 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1049 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1050 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1051 oldincludedir=$ac_optarg ;;
1052
1053 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1054 ac_prev=prefix ;;
1055 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1056 prefix=$ac_optarg ;;
1057
1058 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1059 | --program-pre | --program-pr | --program-p)
1060 ac_prev=program_prefix ;;
1061 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1062 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1063 program_prefix=$ac_optarg ;;
1064
1065 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1066 | --program-suf | --program-su | --program-s)
1067 ac_prev=program_suffix ;;
1068 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1069 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1070 program_suffix=$ac_optarg ;;
1071
1072 -program-transform-name | --program-transform-name \
1073 | --program-transform-nam | --program-transform-na \
1074 | --program-transform-n | --program-transform- \
1075 | --program-transform | --program-transfor \
1076 | --program-transfo | --program-transf \
1077 | --program-trans | --program-tran \
1078 | --progr-tra | --program-tr | --program-t)
1079 ac_prev=program_transform_name ;;
1080 -program-transform-name=* | --program-transform-name=* \
1081 | --program-transform-nam=* | --program-transform-na=* \
1082 | --program-transform-n=* | --program-transform-=* \
1083 | --program-transform=* | --program-transfor=* \
1084 | --program-transfo=* | --program-transf=* \
1085 | --program-trans=* | --program-tran=* \
1086 | --progr-tra=* | --program-tr=* | --program-t=*)
1087 program_transform_name=$ac_optarg ;;
1088
1089 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1090 ac_prev=pdfdir ;;
1091 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1092 pdfdir=$ac_optarg ;;
1093
1094 -psdir | --psdir | --psdi | --psd | --ps)
1095 ac_prev=psdir ;;
1096 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1097 psdir=$ac_optarg ;;
1098
1099 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1100 | -silent | --silent | --silen | --sile | --sil)
1101 silent=yes ;;
1102
1103 -runstatedir | --runstatedir | --runstatedi | --runstated \
1104 | --runstate | --runstat | --runsta | --runst | --runs \
1105 | --run | --ru | --r)
1106 ac_prev=runstatedir ;;
1107 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1108 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1109 | --run=* | --ru=* | --r=*)
1110 runstatedir=$ac_optarg ;;
1111
1112 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1113 ac_prev=sbindir ;;
1114 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1115 | --sbi=* | --sb=*)
1116 sbindir=$ac_optarg ;;
1117
1118 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1119 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1120 | --sharedst | --shareds | --shared | --share | --shar \
1121 | --sha | --sh)
1122 ac_prev=sharedstatedir ;;
1123 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1124 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1125 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1126 | --sha=* | --sh=*)
1127 sharedstatedir=$ac_optarg ;;
1128
1129 -site | --site | --sit)
1130 ac_prev=site ;;
1131 -site=* | --site=* | --sit=*)
1132 site=$ac_optarg ;;
1133
1134 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1135 ac_prev=srcdir ;;
1136 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1137 srcdir=$ac_optarg ;;
1138
1139 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1140 | --syscon | --sysco | --sysc | --sys | --sy)
1141 ac_prev=sysconfdir ;;
1142 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1143 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1144 sysconfdir=$ac_optarg ;;
1145
1146 -target | --target | --targe | --targ | --tar | --ta | --t)
1147 ac_prev=target_alias ;;
1148 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1149 target_alias=$ac_optarg ;;
1150
1151 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1152 verbose=yes ;;
1153
1154 -version | --version | --versio | --versi | --vers | -V)
1155 ac_init_version=: ;;
1156
1157 -with-* | --with-*)
1158 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1159 # Reject names that are not valid shell variable names.
1160 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1161 as_fn_error $? "invalid package name: $ac_useropt"
1162 ac_useropt_orig=$ac_useropt
1163 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1164 case $ac_user_opts in
1165 *"
1166 "with_$ac_useropt"
1167 "*) ;;
1168 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1169 ac_unrecognized_sep=', ';;
1170 esac
1171 eval with_$ac_useropt=\$ac_optarg ;;
1172
1173 -without-* | --without-*)
1174 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1175 # Reject names that are not valid shell variable names.
1176 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1177 as_fn_error $? "invalid package name: $ac_useropt"
1178 ac_useropt_orig=$ac_useropt
1179 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1180 case $ac_user_opts in
1181 *"
1182 "with_$ac_useropt"
1183 "*) ;;
1184 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1185 ac_unrecognized_sep=', ';;
1186 esac
1187 eval with_$ac_useropt=no ;;
1188
1189 --x)
1190 # Obsolete; use --with-x.
1191 with_x=yes ;;
1192
1193 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1194 | --x-incl | --x-inc | --x-in | --x-i)
1195 ac_prev=x_includes ;;
1196 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1197 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1198 x_includes=$ac_optarg ;;
1199
1200 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1201 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1202 ac_prev=x_libraries ;;
1203 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1204 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1205 x_libraries=$ac_optarg ;;
1206
1207 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1208 Try \`$0 --help' for more information"
1209 ;;
1210
1211 *=*)
1212 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1213 # Reject names that are not valid shell variable names.
1214 case $ac_envvar in #(
1215 '' | [0-9]* | *[!_$as_cr_alnum]* )
1216 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1217 esac
1218 eval $ac_envvar=\$ac_optarg
1219 export $ac_envvar ;;
1220
1221 *)
1222 # FIXME: should be removed in autoconf 3.0.
1223 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1224 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1225 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1226 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1227 ;;
1228
1229 esac
1230 done
1231
1232 if test -n "$ac_prev"; then
1233 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1234 as_fn_error $? "missing argument to $ac_option"
1235 fi
1236
1237 if test -n "$ac_unrecognized_opts"; then
1238 case $enable_option_checking in
1239 no) ;;
1240 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1241 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1242 esac
1243 fi
1244
1245 # Check all directory arguments for consistency.
1246 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1247 datadir sysconfdir sharedstatedir localstatedir includedir \
1248 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1249 libdir localedir mandir runstatedir
1250 do
1251 eval ac_val=\$$ac_var
1252 # Remove trailing slashes.
1253 case $ac_val in
1254 */ )
1255 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1256 eval $ac_var=\$ac_val;;
1257 esac
1258 # Be sure to have absolute directory names.
1259 case $ac_val in
1260 [\\/$]* | ?:[\\/]* ) continue;;
1261 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1262 esac
1263 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1264 done
1265
1266 # There might be people who depend on the old broken behavior: `$host'
1267 # used to hold the argument of --host etc.
1268 # FIXME: To remove some day.
1269 build=$build_alias
1270 host=$host_alias
1271 target=$target_alias
1272
1273 # FIXME: To remove some day.
1274 if test "x$host_alias" != x; then
1275 if test "x$build_alias" = x; then
1276 cross_compiling=maybe
1277 elif test "x$build_alias" != "x$host_alias"; then
1278 cross_compiling=yes
1279 fi
1280 fi
1281
1282 ac_tool_prefix=
1283 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1284
1285 test "$silent" = yes && exec 6>/dev/null
1286
1287
1288 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1289 ac_ls_di=`ls -di .` &&
1290 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1291 as_fn_error $? "working directory cannot be determined"
1292 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1293 as_fn_error $? "pwd does not report name of working directory"
1294
1295
1296 # Find the source files, if location was not specified.
1297 if test -z "$srcdir"; then
1298 ac_srcdir_defaulted=yes
1299 # Try the directory containing this script, then the parent directory.
1300 ac_confdir=`$as_dirname -- "$as_myself" ||
1301 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1302 X"$as_myself" : 'X\(//\)[^/]' \| \
1303 X"$as_myself" : 'X\(//\)$' \| \
1304 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1305 $as_echo X"$as_myself" |
1306 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1307 s//\1/
1308 q
1309 }
1310 /^X\(\/\/\)[^/].*/{
1311 s//\1/
1312 q
1313 }
1314 /^X\(\/\/\)$/{
1315 s//\1/
1316 q
1317 }
1318 /^X\(\/\).*/{
1319 s//\1/
1320 q
1321 }
1322 s/.*/./; q'`
1323 srcdir=$ac_confdir
1324 if test ! -r "$srcdir/$ac_unique_file"; then
1325 srcdir=..
1326 fi
1327 else
1328 ac_srcdir_defaulted=no
1329 fi
1330 if test ! -r "$srcdir/$ac_unique_file"; then
1331 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1332 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1333 fi
1334 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1335 ac_abs_confdir=`(
1336 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1337 pwd)`
1338 # When building in place, set srcdir=.
1339 if test "$ac_abs_confdir" = "$ac_pwd"; then
1340 srcdir=.
1341 fi
1342 # Remove unnecessary trailing slashes from srcdir.
1343 # Double slashes in file names in object file debugging info
1344 # mess up M-x gdb in Emacs.
1345 case $srcdir in
1346 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1347 esac
1348 for ac_var in $ac_precious_vars; do
1349 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1350 eval ac_env_${ac_var}_value=\$${ac_var}
1351 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1352 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1353 done
1354
1355 #
1356 # Report the --help message.
1357 #
1358 if test "$ac_init_help" = "long"; then
1359 # Omit some internal or obsolete options to make the list less imposing.
1360 # This message is too long to be a string in the A/UX 3.1 sh.
1361 cat <<_ACEOF
1362 \`configure' configures ocaml-faad 0.4.0 to adapt to many kinds of systems.
1363
1364 Usage: $0 [OPTION]... [VAR=VALUE]...
1365
1366 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1367 VAR=VALUE. See below for descriptions of some of the useful variables.
1368
1369 Defaults for the options are specified in brackets.
1370
1371 Configuration:
1372 -h, --help display this help and exit
1373 --help=short display options specific to this package
1374 --help=recursive display the short help of all the included packages
1375 -V, --version display version information and exit
1376 -q, --quiet, --silent do not print \`checking ...' messages
1377 --cache-file=FILE cache test results in FILE [disabled]
1378 -C, --config-cache alias for \`--cache-file=config.cache'
1379 -n, --no-create do not create output files
1380 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1381
1382 Installation directories:
1383 --prefix=PREFIX install architecture-independent files in PREFIX
1384 [$ac_default_prefix]
1385 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1386 [PREFIX]
1387
1388 By default, \`make install' will install all the files in
1389 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1390 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1391 for instance \`--prefix=\$HOME'.
1392
1393 For better control, use the options below.
1394
1395 Fine tuning of the installation directories:
1396 --bindir=DIR user executables [EPREFIX/bin]
1397 --sbindir=DIR system admin executables [EPREFIX/sbin]
1398 --libexecdir=DIR program executables [EPREFIX/libexec]
1399 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1400 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1401 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1402 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1403 --libdir=DIR object code libraries [EPREFIX/lib]
1404 --includedir=DIR C header files [PREFIX/include]
1405 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1406 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1407 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1408 --infodir=DIR info documentation [DATAROOTDIR/info]
1409 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1410 --mandir=DIR man documentation [DATAROOTDIR/man]
1411 --docdir=DIR documentation root [DATAROOTDIR/doc/ocaml-faad]
1412 --htmldir=DIR html documentation [DOCDIR]
1413 --dvidir=DIR dvi documentation [DOCDIR]
1414 --pdfdir=DIR pdf documentation [DOCDIR]
1415 --psdir=DIR ps documentation [DOCDIR]
1416 _ACEOF
1417
1418 cat <<\_ACEOF
1419
1420 System types:
1421 --build=BUILD configure for building on BUILD [guessed]
1422 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1423 _ACEOF
1424 fi
1425
1426 if test -n "$ac_init_help"; then
1427 case $ac_init_help in
1428 short | recursive ) echo "Configuration of ocaml-faad 0.4.0:";;
1429 esac
1430 cat <<\_ACEOF
1431
1432 Optional Features:
1433 --disable-option-checking ignore unrecognized --enable/--with options
1434 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1435 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1436 --disable-ldconf don't modify the dynamic loader configuration file
1437 (default is enable)
1438 --disable-camlp4 disable camlp4 auto-detection.
1439 --disable-debugging disable debugging information (backtrace printing in
1440 particular)
1441 --enable-profiling compile to generate profiling infomation
1442 --disable-nativecode compile in bytecode
1443 --disable-custom disable custom mode for bytecode compilation (use if
1444 you know what you are doing)
1445 --disable-pic compile PIC objects [default=enabled for shared
1446 builds on supported platforms]
1447 --enable-bytes-dynamic-plugin
1448 Compile bytes as an optional dynamic plugin.
1449
1450 Optional Packages:
1451 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1452 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1453 --with-ocaml-warnings=WARNINGS
1454 Enable specific list of ocaml compiler warnings.
1455 --with-bytes-dir=path look for ocaml-bytes library in "path"
1456 (autodetected by default)
1457
1458 Some influential environment variables:
1459 CC C compiler command
1460 CFLAGS C compiler flags
1461 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1462 nonstandard directory <lib dir>
1463 LIBS libraries to pass to the linker, e.g. -l<library>
1464 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1465 you have headers in a nonstandard directory <include dir>
1466 PIC_FLAGS compiler flags for PIC code
1467 CPP C preprocessor
1468
1469 Use these variables to override the choices made by `configure' or to help
1470 it to find libraries and programs with nonstandard names/locations.
1471
1472 Report bugs to <savonet-users@lists.sourceforge.net>.
1473 _ACEOF
1474 ac_status=$?
1475 fi
1476
1477 if test "$ac_init_help" = "recursive"; then
1478 # If there are subdirs, report their specific --help.
1479 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1480 test -d "$ac_dir" ||
1481 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1482 continue
1483 ac_builddir=.
1484
1485 case "$ac_dir" in
1486 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1487 *)
1488 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1489 # A ".." for each directory in $ac_dir_suffix.
1490 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1491 case $ac_top_builddir_sub in
1492 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1493 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1494 esac ;;
1495 esac
1496 ac_abs_top_builddir=$ac_pwd
1497 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1498 # for backward compatibility:
1499 ac_top_builddir=$ac_top_build_prefix
1500
1501 case $srcdir in
1502 .) # We are building in place.
1503 ac_srcdir=.
1504 ac_top_srcdir=$ac_top_builddir_sub
1505 ac_abs_top_srcdir=$ac_pwd ;;
1506 [\\/]* | ?:[\\/]* ) # Absolute name.
1507 ac_srcdir=$srcdir$ac_dir_suffix;
1508 ac_top_srcdir=$srcdir
1509 ac_abs_top_srcdir=$srcdir ;;
1510 *) # Relative name.
1511 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1512 ac_top_srcdir=$ac_top_build_prefix$srcdir
1513 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1514 esac
1515 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1516
1517 cd "$ac_dir" || { ac_status=$?; continue; }
1518 # Check for guested configure.
1519 if test -f "$ac_srcdir/configure.gnu"; then
1520 echo &&
1521 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1522 elif test -f "$ac_srcdir/configure"; then
1523 echo &&
1524 $SHELL "$ac_srcdir/configure" --help=recursive
1525 else
1526 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1527 fi || ac_status=$?
1528 cd "$ac_pwd" || { ac_status=$?; break; }
1529 done
1530 fi
1531
1532 test -n "$ac_init_help" && exit $ac_status
1533 if $ac_init_version; then
1534 cat <<\_ACEOF
1535 ocaml-faad configure 0.4.0
1536 generated by GNU Autoconf 2.69
1537
1538 Copyright (C) 2012 Free Software Foundation, Inc.
1539 This configure script is free software; the Free Software Foundation
1540 gives unlimited permission to copy, distribute and modify it.
1541 _ACEOF
1542 exit
1543 fi
1544
1545 ## ------------------------ ##
1546 ## Autoconf initialization. ##
1547 ## ------------------------ ##
1548
1549 # ac_fn_c_try_compile LINENO
1550 # --------------------------
1551 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1552 ac_fn_c_try_compile ()
1553 {
1554 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1555 rm -f conftest.$ac_objext
1556 if { { ac_try="$ac_compile"
1557 case "(($ac_try" in
1558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1559 *) ac_try_echo=$ac_try;;
1560 esac
1561 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1562 $as_echo "$ac_try_echo"; } >&5
1563 (eval "$ac_compile") 2>conftest.err
1564 ac_status=$?
1565 if test -s conftest.err; then
1566 grep -v '^ *+' conftest.err >conftest.er1
1567 cat conftest.er1 >&5
1568 mv -f conftest.er1 conftest.err
1569 fi
1570 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1571 test $ac_status = 0; } && {
1572 test -z "$ac_c_werror_flag" ||
1573 test ! -s conftest.err
1574 } && test -s conftest.$ac_objext; then :
1575 ac_retval=0
1576 else
1577 $as_echo "$as_me: failed program was:" >&5
1578 sed 's/^/| /' conftest.$ac_ext >&5
1579
1580 ac_retval=1
1581 fi
1582 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1583 as_fn_set_status $ac_retval
1584
1585 } # ac_fn_c_try_compile
1586
1587 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1588 # -------------------------------------------------------
1589 # Tests whether HEADER exists and can be compiled using the include files in
1590 # INCLUDES, setting the cache variable VAR accordingly.
1591 ac_fn_c_check_header_compile ()
1592 {
1593 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1595 $as_echo_n "checking for $2... " >&6; }
1596 if eval \${$3+:} false; then :
1597 $as_echo_n "(cached) " >&6
1598 else
1599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1600 /* end confdefs.h. */
1601 $4
1602 #include <$2>
1603 _ACEOF
1604 if ac_fn_c_try_compile "$LINENO"; then :
1605 eval "$3=yes"
1606 else
1607 eval "$3=no"
1608 fi
1609 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1610 fi
1611 eval ac_res=\$$3
1612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1613 $as_echo "$ac_res" >&6; }
1614 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1615
1616 } # ac_fn_c_check_header_compile
1617
1618 # ac_fn_c_try_cpp LINENO
1619 # ----------------------
1620 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1621 ac_fn_c_try_cpp ()
1622 {
1623 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1624 if { { ac_try="$ac_cpp conftest.$ac_ext"
1625 case "(($ac_try" in
1626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1627 *) ac_try_echo=$ac_try;;
1628 esac
1629 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1630 $as_echo "$ac_try_echo"; } >&5
1631 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1632 ac_status=$?
1633 if test -s conftest.err; then
1634 grep -v '^ *+' conftest.err >conftest.er1
1635 cat conftest.er1 >&5
1636 mv -f conftest.er1 conftest.err
1637 fi
1638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1639 test $ac_status = 0; } > conftest.i && {
1640 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1641 test ! -s conftest.err
1642 }; then :
1643 ac_retval=0
1644 else
1645 $as_echo "$as_me: failed program was:" >&5
1646 sed 's/^/| /' conftest.$ac_ext >&5
1647
1648 ac_retval=1
1649 fi
1650 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1651 as_fn_set_status $ac_retval
1652
1653 } # ac_fn_c_try_cpp
1654
1655 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1656 # -------------------------------------------------------
1657 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1658 # the include files in INCLUDES and setting the cache variable VAR
1659 # accordingly.
1660 ac_fn_c_check_header_mongrel ()
1661 {
1662 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1663 if eval \${$3+:} false; then :
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1665 $as_echo_n "checking for $2... " >&6; }
1666 if eval \${$3+:} false; then :
1667 $as_echo_n "(cached) " >&6
1668 fi
1669 eval ac_res=\$$3
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1671 $as_echo "$ac_res" >&6; }
1672 else
1673 # Is the header compilable?
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1675 $as_echo_n "checking $2 usability... " >&6; }
1676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1677 /* end confdefs.h. */
1678 $4
1679 #include <$2>
1680 _ACEOF
1681 if ac_fn_c_try_compile "$LINENO"; then :
1682 ac_header_compiler=yes
1683 else
1684 ac_header_compiler=no
1685 fi
1686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1688 $as_echo "$ac_header_compiler" >&6; }
1689
1690 # Is the header present?
1691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1692 $as_echo_n "checking $2 presence... " >&6; }
1693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1694 /* end confdefs.h. */
1695 #include <$2>
1696 _ACEOF
1697 if ac_fn_c_try_cpp "$LINENO"; then :
1698 ac_header_preproc=yes
1699 else
1700 ac_header_preproc=no
1701 fi
1702 rm -f conftest.err conftest.i conftest.$ac_ext
1703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1704 $as_echo "$ac_header_preproc" >&6; }
1705
1706 # So? What about this header?
1707 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1708 yes:no: )
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1710 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1712 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1713 ;;
1714 no:yes:* )
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1716 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1718 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1720 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1722 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1724 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1725 ( $as_echo "## -------------------------------------------------- ##
1726 ## Report this to savonet-users@lists.sourceforge.net ##
1727 ## -------------------------------------------------- ##"
1728 ) | sed "s/^/$as_me: WARNING: /" >&2
1729 ;;
1730 esac
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1732 $as_echo_n "checking for $2... " >&6; }
1733 if eval \${$3+:} false; then :
1734 $as_echo_n "(cached) " >&6
1735 else
1736 eval "$3=\$ac_header_compiler"
1737 fi
1738 eval ac_res=\$$3
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1740 $as_echo "$ac_res" >&6; }
1741 fi
1742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1743
1744 } # ac_fn_c_check_header_mongrel
1745
1746 # ac_fn_c_try_run LINENO
1747 # ----------------------
1748 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1749 # that executables *can* be run.
1750 ac_fn_c_try_run ()
1751 {
1752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1753 if { { ac_try="$ac_link"
1754 case "(($ac_try" in
1755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1756 *) ac_try_echo=$ac_try;;
1757 esac
1758 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1759 $as_echo "$ac_try_echo"; } >&5
1760 (eval "$ac_link") 2>&5
1761 ac_status=$?
1762 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1763 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1764 { { case "(($ac_try" in
1765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1766 *) ac_try_echo=$ac_try;;
1767 esac
1768 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1769 $as_echo "$ac_try_echo"; } >&5
1770 (eval "$ac_try") 2>&5
1771 ac_status=$?
1772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1773 test $ac_status = 0; }; }; then :
1774 ac_retval=0
1775 else
1776 $as_echo "$as_me: program exited with status $ac_status" >&5
1777 $as_echo "$as_me: failed program was:" >&5
1778 sed 's/^/| /' conftest.$ac_ext >&5
1779
1780 ac_retval=$ac_status
1781 fi
1782 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1783 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1784 as_fn_set_status $ac_retval
1785
1786 } # ac_fn_c_try_run
1787
1788 # ac_fn_c_try_link LINENO
1789 # -----------------------
1790 # Try to link conftest.$ac_ext, and return whether this succeeded.
1791 ac_fn_c_try_link ()
1792 {
1793 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1794 rm -f conftest.$ac_objext conftest$ac_exeext
1795 if { { ac_try="$ac_link"
1796 case "(($ac_try" in
1797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1798 *) ac_try_echo=$ac_try;;
1799 esac
1800 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1801 $as_echo "$ac_try_echo"; } >&5
1802 (eval "$ac_link") 2>conftest.err
1803 ac_status=$?
1804 if test -s conftest.err; then
1805 grep -v '^ *+' conftest.err >conftest.er1
1806 cat conftest.er1 >&5
1807 mv -f conftest.er1 conftest.err
1808 fi
1809 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1810 test $ac_status = 0; } && {
1811 test -z "$ac_c_werror_flag" ||
1812 test ! -s conftest.err
1813 } && test -s conftest$ac_exeext && {
1814 test "$cross_compiling" = yes ||
1815 test -x conftest$ac_exeext
1816 }; then :
1817 ac_retval=0
1818 else
1819 $as_echo "$as_me: failed program was:" >&5
1820 sed 's/^/| /' conftest.$ac_ext >&5
1821
1822 ac_retval=1
1823 fi
1824 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1825 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1826 # interfere with the next link command; also delete a directory that is
1827 # left behind by Apple's compiler. We do this before executing the actions.
1828 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1829 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1830 as_fn_set_status $ac_retval
1831
1832 } # ac_fn_c_try_link
1833
1834 # ac_fn_c_check_func LINENO FUNC VAR
1835 # ----------------------------------
1836 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1837 ac_fn_c_check_func ()
1838 {
1839 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1841 $as_echo_n "checking for $2... " >&6; }
1842 if eval \${$3+:} false; then :
1843 $as_echo_n "(cached) " >&6
1844 else
1845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1846 /* end confdefs.h. */
1847 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1848 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1849 #define $2 innocuous_$2
1850
1851 /* System header to define __stub macros and hopefully few prototypes,
1852 which can conflict with char $2 (); below.
1853 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1854 <limits.h> exists even on freestanding compilers. */
1855
1856 #ifdef __STDC__
1857 # include <limits.h>
1858 #else
1859 # include <assert.h>
1860 #endif
1861
1862 #undef $2
1863
1864 /* Override any GCC internal prototype to avoid an error.
1865 Use char because int might match the return type of a GCC
1866 builtin and then its argument prototype would still apply. */
1867 #ifdef __cplusplus
1868 extern "C"
1869 #endif
1870 char $2 ();
1871 /* The GNU C library defines this for functions which it implements
1872 to always fail with ENOSYS. Some functions are actually named
1873 something starting with __ and the normal name is an alias. */
1874 #if defined __stub_$2 || defined __stub___$2
1875 choke me
1876 #endif
1877
1878 int
1879 main ()
1880 {
1881 return $2 ();
1882 ;
1883 return 0;
1884 }
1885 _ACEOF
1886 if ac_fn_c_try_link "$LINENO"; then :
1887 eval "$3=yes"
1888 else
1889 eval "$3=no"
1890 fi
1891 rm -f core conftest.err conftest.$ac_objext \
1892 conftest$ac_exeext conftest.$ac_ext
1893 fi
1894 eval ac_res=\$$3
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1896 $as_echo "$ac_res" >&6; }
1897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1898
1899 } # ac_fn_c_check_func
1900 cat >config.log <<_ACEOF
1901 This file contains any messages produced by compilers while
1902 running configure, to aid debugging if configure makes a mistake.
1903
1904 It was created by ocaml-faad $as_me 0.4.0, which was
1905 generated by GNU Autoconf 2.69. Invocation command line was
1906
1907 $ $0 $@
1908
1909 _ACEOF
1910 exec 5>>config.log
1911 {
1912 cat <<_ASUNAME
1913 ## --------- ##
1914 ## Platform. ##
1915 ## --------- ##
1916
1917 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1918 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1919 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1920 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1921 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1922
1923 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1924 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1925
1926 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1927 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1928 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1929 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1930 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1931 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1932 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1933
1934 _ASUNAME
1935
1936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1937 for as_dir in $PATH
1938 do
1939 IFS=$as_save_IFS
1940 test -z "$as_dir" && as_dir=.
1941 $as_echo "PATH: $as_dir"
1942 done
1943 IFS=$as_save_IFS
1944
1945 } >&5
1946
1947 cat >&5 <<_ACEOF
1948
1949
1950 ## ----------- ##
1951 ## Core tests. ##
1952 ## ----------- ##
1953
1954 _ACEOF
1955
1956
1957 # Keep a trace of the command line.
1958 # Strip out --no-create and --no-recursion so they do not pile up.
1959 # Strip out --silent because we don't want to record it for future runs.
1960 # Also quote any args containing shell meta-characters.
1961 # Make two passes to allow for proper duplicate-argument suppression.
1962 ac_configure_args=
1963 ac_configure_args0=
1964 ac_configure_args1=
1965 ac_must_keep_next=false
1966 for ac_pass in 1 2
1967 do
1968 for ac_arg
1969 do
1970 case $ac_arg in
1971 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1972 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1973 | -silent | --silent | --silen | --sile | --sil)
1974 continue ;;
1975 *\'*)
1976 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1977 esac
1978 case $ac_pass in
1979 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1980 2)
1981 as_fn_append ac_configure_args1 " '$ac_arg'"
1982 if test $ac_must_keep_next = true; then
1983 ac_must_keep_next=false # Got value, back to normal.
1984 else
1985 case $ac_arg in
1986 *=* | --config-cache | -C | -disable-* | --disable-* \
1987 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1988 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1989 | -with-* | --with-* | -without-* | --without-* | --x)
1990 case "$ac_configure_args0 " in
1991 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1992 esac
1993 ;;
1994 -* ) ac_must_keep_next=true ;;
1995 esac
1996 fi
1997 as_fn_append ac_configure_args " '$ac_arg'"
1998 ;;
1999 esac
2000 done
2001 done
2002 { ac_configure_args0=; unset ac_configure_args0;}
2003 { ac_configure_args1=; unset ac_configure_args1;}
2004
2005 # When interrupted or exit'd, cleanup temporary files, and complete
2006 # config.log. We remove comments because anyway the quotes in there
2007 # would cause problems or look ugly.
2008 # WARNING: Use '\'' to represent an apostrophe within the trap.
2009 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2010 trap 'exit_status=$?
2011 # Save into config.log some information that might help in debugging.
2012 {
2013 echo
2014
2015 $as_echo "## ---------------- ##
2016 ## Cache variables. ##
2017 ## ---------------- ##"
2018 echo
2019 # The following way of writing the cache mishandles newlines in values,
2020 (
2021 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2022 eval ac_val=\$$ac_var
2023 case $ac_val in #(
2024 *${as_nl}*)
2025 case $ac_var in #(
2026 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2027 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2028 esac
2029 case $ac_var in #(
2030 _ | IFS | as_nl) ;; #(
2031 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2032 *) { eval $ac_var=; unset $ac_var;} ;;
2033 esac ;;
2034 esac
2035 done
2036 (set) 2>&1 |
2037 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2038 *${as_nl}ac_space=\ *)
2039 sed -n \
2040 "s/'\''/'\''\\\\'\'''\''/g;
2041 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2042 ;; #(
2043 *)
2044 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2045 ;;
2046 esac |
2047 sort
2048 )
2049 echo
2050
2051 $as_echo "## ----------------- ##
2052 ## Output variables. ##
2053 ## ----------------- ##"
2054 echo
2055 for ac_var in $ac_subst_vars
2056 do
2057 eval ac_val=\$$ac_var
2058 case $ac_val in
2059 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2060 esac
2061 $as_echo "$ac_var='\''$ac_val'\''"
2062 done | sort
2063 echo
2064
2065 if test -n "$ac_subst_files"; then
2066 $as_echo "## ------------------- ##
2067 ## File substitutions. ##
2068 ## ------------------- ##"
2069 echo
2070 for ac_var in $ac_subst_files
2071 do
2072 eval ac_val=\$$ac_var
2073 case $ac_val in
2074 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2075 esac
2076 $as_echo "$ac_var='\''$ac_val'\''"
2077 done | sort
2078 echo
2079 fi
2080
2081 if test -s confdefs.h; then
2082 $as_echo "## ----------- ##
2083 ## confdefs.h. ##
2084 ## ----------- ##"
2085 echo
2086 cat confdefs.h
2087 echo
2088 fi
2089 test "$ac_signal" != 0 &&
2090 $as_echo "$as_me: caught signal $ac_signal"
2091 $as_echo "$as_me: exit $exit_status"
2092 } >&5
2093 rm -f core *.core core.conftest.* &&
2094 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2095 exit $exit_status
2096 ' 0
2097 for ac_signal in 1 2 13 15; do
2098 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2099 done
2100 ac_signal=0
2101
2102 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2103 rm -f -r conftest* confdefs.h
2104
2105 $as_echo "/* confdefs.h */" > confdefs.h
2106
2107 # Predefined preprocessor variables.
2108
2109 cat >>confdefs.h <<_ACEOF
2110 #define PACKAGE_NAME "$PACKAGE_NAME"
2111 _ACEOF
2112
2113 cat >>confdefs.h <<_ACEOF
2114 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2115 _ACEOF
2116
2117 cat >>confdefs.h <<_ACEOF
2118 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2119 _ACEOF
2120
2121 cat >>confdefs.h <<_ACEOF
2122 #define PACKAGE_STRING "$PACKAGE_STRING"
2123 _ACEOF
2124
2125 cat >>confdefs.h <<_ACEOF
2126 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2127 _ACEOF
2128
2129 cat >>confdefs.h <<_ACEOF
2130 #define PACKAGE_URL "$PACKAGE_URL"
2131 _ACEOF
2132
2133
2134 # Let the site file select an alternate cache file if it wants to.
2135 # Prefer an explicitly selected file to automatically selected ones.
2136 ac_site_file1=NONE
2137 ac_site_file2=NONE
2138 if test -n "$CONFIG_SITE"; then
2139 # We do not want a PATH search for config.site.
2140 case $CONFIG_SITE in #((
2141 -*) ac_site_file1=./$CONFIG_SITE;;
2142 */*) ac_site_file1=$CONFIG_SITE;;
2143 *) ac_site_file1=./$CONFIG_SITE;;
2144 esac
2145 elif test "x$prefix" != xNONE; then
2146 ac_site_file1=$prefix/share/config.site
2147 ac_site_file2=$prefix/etc/config.site
2148 else
2149 ac_site_file1=$ac_default_prefix/share/config.site
2150 ac_site_file2=$ac_default_prefix/etc/config.site
2151 fi
2152 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2153 do
2154 test "x$ac_site_file" = xNONE && continue
2155 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2156 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2157 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2158 sed 's/^/| /' "$ac_site_file" >&5
2159 . "$ac_site_file" \
2160 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2161 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2162 as_fn_error $? "failed to load site script $ac_site_file
2163 See \`config.log' for more details" "$LINENO" 5; }
2164 fi
2165 done
2166
2167 if test -r "$cache_file"; then
2168 # Some versions of bash will fail to source /dev/null (special files
2169 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2170 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2172 $as_echo "$as_me: loading cache $cache_file" >&6;}
2173 case $cache_file in
2174 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2175 *) . "./$cache_file";;
2176 esac
2177 fi
2178 else
2179 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2180 $as_echo "$as_me: creating cache $cache_file" >&6;}
2181 >$cache_file
2182 fi
2183
2184 # Check that the precious variables saved in the cache have kept the same
2185 # value.
2186 ac_cache_corrupted=false
2187 for ac_var in $ac_precious_vars; do
2188 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2189 eval ac_new_set=\$ac_env_${ac_var}_set
2190 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2191 eval ac_new_val=\$ac_env_${ac_var}_value
2192 case $ac_old_set,$ac_new_set in
2193 set,)
2194 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2195 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2196 ac_cache_corrupted=: ;;
2197 ,set)
2198 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2199 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2200 ac_cache_corrupted=: ;;
2201 ,);;
2202 *)
2203 if test "x$ac_old_val" != "x$ac_new_val"; then
2204 # differences in whitespace do not lead to failure.
2205 ac_old_val_w=`echo x $ac_old_val`
2206 ac_new_val_w=`echo x $ac_new_val`
2207 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2208 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2209 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2210 ac_cache_corrupted=:
2211 else
2212 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2213 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2214 eval $ac_var=\$ac_old_val
2215 fi
2216 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2217 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2218 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2219 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2220 fi;;
2221 esac
2222 # Pass precious variables to config.status.
2223 if test "$ac_new_set" = set; then
2224 case $ac_new_val in
2225 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2226 *) ac_arg=$ac_var=$ac_new_val ;;
2227 esac
2228 case " $ac_configure_args " in
2229 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2230 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2231 esac
2232 fi
2233 done
2234 if $ac_cache_corrupted; then
2235 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2236 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2237 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2238 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2239 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2240 fi
2241 ## -------------------- ##
2242 ## Main body of script. ##
2243 ## -------------------- ##
2244
2245 ac_ext=c
2246 ac_cpp='$CPP $CPPFLAGS'
2247 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2248 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2249 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2250
2251
2252
2253 VERSION=$PACKAGE_VERSION
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: configuring $PACKAGE_STRING" >&5
2255 $as_echo "configuring $PACKAGE_STRING" >&6; }
2256
2257 ac_ext=c
2258 ac_cpp='$CPP $CPPFLAGS'
2259 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2260 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2261 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2262 if test -n "$ac_tool_prefix"; then
2263 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2264 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2266 $as_echo_n "checking for $ac_word... " >&6; }
2267 if ${ac_cv_prog_CC+:} false; then :
2268 $as_echo_n "(cached) " >&6
2269 else
2270 if test -n "$CC"; then
2271 ac_cv_prog_CC="$CC" # Let the user override the test.
2272 else
2273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2274 for as_dir in $PATH
2275 do
2276 IFS=$as_save_IFS
2277 test -z "$as_dir" && as_dir=.
2278 for ac_exec_ext in '' $ac_executable_extensions; do
2279 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2280 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2281 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2282 break 2
2283 fi
2284 done
2285 done
2286 IFS=$as_save_IFS
2287
2288 fi
2289 fi
2290 CC=$ac_cv_prog_CC
2291 if test -n "$CC"; then
2292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2293 $as_echo "$CC" >&6; }
2294 else
2295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2296 $as_echo "no" >&6; }
2297 fi
2298
2299
2300 fi
2301 if test -z "$ac_cv_prog_CC"; then
2302 ac_ct_CC=$CC
2303 # Extract the first word of "gcc", so it can be a program name with args.
2304 set dummy gcc; ac_word=$2
2305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2306 $as_echo_n "checking for $ac_word... " >&6; }
2307 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2308 $as_echo_n "(cached) " >&6
2309 else
2310 if test -n "$ac_ct_CC"; then
2311 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2312 else
2313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2314 for as_dir in $PATH
2315 do
2316 IFS=$as_save_IFS
2317 test -z "$as_dir" && as_dir=.
2318 for ac_exec_ext in '' $ac_executable_extensions; do
2319 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2320 ac_cv_prog_ac_ct_CC="gcc"
2321 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2322 break 2
2323 fi
2324 done
2325 done
2326 IFS=$as_save_IFS
2327
2328 fi
2329 fi
2330 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2331 if test -n "$ac_ct_CC"; then
2332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2333 $as_echo "$ac_ct_CC" >&6; }
2334 else
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2336 $as_echo "no" >&6; }
2337 fi
2338
2339 if test "x$ac_ct_CC" = x; then
2340 CC=""
2341 else
2342 case $cross_compiling:$ac_tool_warned in
2343 yes:)
2344 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2345 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2346 ac_tool_warned=yes ;;
2347 esac
2348 CC=$ac_ct_CC
2349 fi
2350 else
2351 CC="$ac_cv_prog_CC"
2352 fi
2353
2354 if test -z "$CC"; then
2355 if test -n "$ac_tool_prefix"; then
2356 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2357 set dummy ${ac_tool_prefix}cc; ac_word=$2
2358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2359 $as_echo_n "checking for $ac_word... " >&6; }
2360 if ${ac_cv_prog_CC+:} false; then :
2361 $as_echo_n "(cached) " >&6
2362 else
2363 if test -n "$CC"; then
2364 ac_cv_prog_CC="$CC" # Let the user override the test.
2365 else
2366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2367 for as_dir in $PATH
2368 do
2369 IFS=$as_save_IFS
2370 test -z "$as_dir" && as_dir=.
2371 for ac_exec_ext in '' $ac_executable_extensions; do
2372 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2373 ac_cv_prog_CC="${ac_tool_prefix}cc"
2374 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2375 break 2
2376 fi
2377 done
2378 done
2379 IFS=$as_save_IFS
2380
2381 fi
2382 fi
2383 CC=$ac_cv_prog_CC
2384 if test -n "$CC"; then
2385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2386 $as_echo "$CC" >&6; }
2387 else
2388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2389 $as_echo "no" >&6; }
2390 fi
2391
2392
2393 fi
2394 fi
2395 if test -z "$CC"; then
2396 # Extract the first word of "cc", so it can be a program name with args.
2397 set dummy cc; ac_word=$2
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2399 $as_echo_n "checking for $ac_word... " >&6; }
2400 if ${ac_cv_prog_CC+:} false; then :
2401 $as_echo_n "(cached) " >&6
2402 else
2403 if test -n "$CC"; then
2404 ac_cv_prog_CC="$CC" # Let the user override the test.
2405 else
2406 ac_prog_rejected=no
2407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2408 for as_dir in $PATH
2409 do
2410 IFS=$as_save_IFS
2411 test -z "$as_dir" && as_dir=.
2412 for ac_exec_ext in '' $ac_executable_extensions; do
2413 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2414 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2415 ac_prog_rejected=yes
2416 continue
2417 fi
2418 ac_cv_prog_CC="cc"
2419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2420 break 2
2421 fi
2422 done
2423 done
2424 IFS=$as_save_IFS
2425
2426 if test $ac_prog_rejected = yes; then
2427 # We found a bogon in the path, so make sure we never use it.
2428 set dummy $ac_cv_prog_CC
2429 shift
2430 if test $# != 0; then
2431 # We chose a different compiler from the bogus one.
2432 # However, it has the same basename, so the bogon will be chosen
2433 # first if we set CC to just the basename; use the full file name.
2434 shift
2435 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2436 fi
2437 fi
2438 fi
2439 fi
2440 CC=$ac_cv_prog_CC
2441 if test -n "$CC"; then
2442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2443 $as_echo "$CC" >&6; }
2444 else
2445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2446 $as_echo "no" >&6; }
2447 fi
2448
2449
2450 fi
2451 if test -z "$CC"; then
2452 if test -n "$ac_tool_prefix"; then
2453 for ac_prog in cl.exe
2454 do
2455 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2456 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2458 $as_echo_n "checking for $ac_word... " >&6; }
2459 if ${ac_cv_prog_CC+:} false; then :
2460 $as_echo_n "(cached) " >&6
2461 else
2462 if test -n "$CC"; then
2463 ac_cv_prog_CC="$CC" # Let the user override the test.
2464 else
2465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2466 for as_dir in $PATH
2467 do
2468 IFS=$as_save_IFS
2469 test -z "$as_dir" && as_dir=.
2470 for ac_exec_ext in '' $ac_executable_extensions; do
2471 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2472 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2474 break 2
2475 fi
2476 done
2477 done
2478 IFS=$as_save_IFS
2479
2480 fi
2481 fi
2482 CC=$ac_cv_prog_CC
2483 if test -n "$CC"; then
2484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2485 $as_echo "$CC" >&6; }
2486 else
2487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2488 $as_echo "no" >&6; }
2489 fi
2490
2491
2492 test -n "$CC" && break
2493 done
2494 fi
2495 if test -z "$CC"; then
2496 ac_ct_CC=$CC
2497 for ac_prog in cl.exe
2498 do
2499 # Extract the first word of "$ac_prog", so it can be a program name with args.
2500 set dummy $ac_prog; ac_word=$2
2501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2502 $as_echo_n "checking for $ac_word... " >&6; }
2503 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2504 $as_echo_n "(cached) " >&6
2505 else
2506 if test -n "$ac_ct_CC"; then
2507 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2508 else
2509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2510 for as_dir in $PATH
2511 do
2512 IFS=$as_save_IFS
2513 test -z "$as_dir" && as_dir=.
2514 for ac_exec_ext in '' $ac_executable_extensions; do
2515 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2516 ac_cv_prog_ac_ct_CC="$ac_prog"
2517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2518 break 2
2519 fi
2520 done
2521 done
2522 IFS=$as_save_IFS
2523
2524 fi
2525 fi
2526 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2527 if test -n "$ac_ct_CC"; then
2528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2529 $as_echo "$ac_ct_CC" >&6; }
2530 else
2531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2532 $as_echo "no" >&6; }
2533 fi
2534
2535
2536 test -n "$ac_ct_CC" && break
2537 done
2538
2539 if test "x$ac_ct_CC" = x; then
2540 CC=""
2541 else
2542 case $cross_compiling:$ac_tool_warned in
2543 yes:)
2544 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2545 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2546 ac_tool_warned=yes ;;
2547 esac
2548 CC=$ac_ct_CC
2549 fi
2550 fi
2551
2552 fi
2553
2554
2555 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2556 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2557 as_fn_error $? "no acceptable C compiler found in \$PATH
2558 See \`config.log' for more details" "$LINENO" 5; }
2559
2560 # Provide some information about the compiler.
2561 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2562 set X $ac_compile
2563 ac_compiler=$2
2564 for ac_option in --version -v -V -qversion; do
2565 { { ac_try="$ac_compiler $ac_option >&5"
2566 case "(($ac_try" in
2567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2568 *) ac_try_echo=$ac_try;;
2569 esac
2570 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2571 $as_echo "$ac_try_echo"; } >&5
2572 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2573 ac_status=$?
2574 if test -s conftest.err; then
2575 sed '10a\
2576 ... rest of stderr output deleted ...
2577 10q' conftest.err >conftest.er1
2578 cat conftest.er1 >&5
2579 fi
2580 rm -f conftest.er1 conftest.err
2581 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2582 test $ac_status = 0; }
2583 done
2584
2585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2586 /* end confdefs.h. */
2587
2588 int
2589 main ()
2590 {
2591
2592 ;
2593 return 0;
2594 }
2595 _ACEOF
2596 ac_clean_files_save=$ac_clean_files
2597 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2598 # Try to create an executable without -o first, disregard a.out.
2599 # It will help us diagnose broken compilers, and finding out an intuition
2600 # of exeext.
2601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2602 $as_echo_n "checking whether the C compiler works... " >&6; }
2603 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2604
2605 # The possible output files:
2606 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2607
2608 ac_rmfiles=
2609 for ac_file in $ac_files
2610 do
2611 case $ac_file in
2612 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2613 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2614 esac
2615 done
2616 rm -f $ac_rmfiles
2617
2618 if { { ac_try="$ac_link_default"
2619 case "(($ac_try" in
2620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2621 *) ac_try_echo=$ac_try;;
2622 esac
2623 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2624 $as_echo "$ac_try_echo"; } >&5
2625 (eval "$ac_link_default") 2>&5
2626 ac_status=$?
2627 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2628 test $ac_status = 0; }; then :
2629 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2630 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2631 # in a Makefile. We should not override ac_cv_exeext if it was cached,
2632 # so that the user can short-circuit this test for compilers unknown to
2633 # Autoconf.
2634 for ac_file in $ac_files ''
2635 do
2636 test -f "$ac_file" || continue
2637 case $ac_file in
2638 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2639 ;;
2640 [ab].out )
2641 # We found the default executable, but exeext='' is most
2642 # certainly right.
2643 break;;
2644 *.* )
2645 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2646 then :; else
2647 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2648 fi
2649 # We set ac_cv_exeext here because the later test for it is not
2650 # safe: cross compilers may not add the suffix if given an `-o'
2651 # argument, so we may need to know it at that point already.
2652 # Even if this section looks crufty: it has the advantage of
2653 # actually working.
2654 break;;
2655 * )
2656 break;;
2657 esac
2658 done
2659 test "$ac_cv_exeext" = no && ac_cv_exeext=
2660
2661 else
2662 ac_file=''
2663 fi
2664 if test -z "$ac_file"; then :
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2666 $as_echo "no" >&6; }
2667 $as_echo "$as_me: failed program was:" >&5
2668 sed 's/^/| /' conftest.$ac_ext >&5
2669
2670 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672 as_fn_error 77 "C compiler cannot create executables
2673 See \`config.log' for more details" "$LINENO" 5; }
2674 else
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2676 $as_echo "yes" >&6; }
2677 fi
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2679 $as_echo_n "checking for C compiler default output file name... " >&6; }
2680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2681 $as_echo "$ac_file" >&6; }
2682 ac_exeext=$ac_cv_exeext
2683
2684 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2685 ac_clean_files=$ac_clean_files_save
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2687 $as_echo_n "checking for suffix of executables... " >&6; }
2688 if { { ac_try="$ac_link"
2689 case "(($ac_try" in
2690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2691 *) ac_try_echo=$ac_try;;
2692 esac
2693 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2694 $as_echo "$ac_try_echo"; } >&5
2695 (eval "$ac_link") 2>&5
2696 ac_status=$?
2697 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2698 test $ac_status = 0; }; then :
2699 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2700 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2701 # work properly (i.e., refer to `conftest.exe'), while it won't with
2702 # `rm'.
2703 for ac_file in conftest.exe conftest conftest.*; do
2704 test -f "$ac_file" || continue
2705 case $ac_file in
2706 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2707 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2708 break;;
2709 * ) break;;
2710 esac
2711 done
2712 else
2713 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2714 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2715 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2716 See \`config.log' for more details" "$LINENO" 5; }
2717 fi
2718 rm -f conftest conftest$ac_cv_exeext
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2720 $as_echo "$ac_cv_exeext" >&6; }
2721
2722 rm -f conftest.$ac_ext
2723 EXEEXT=$ac_cv_exeext
2724 ac_exeext=$EXEEXT
2725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2726 /* end confdefs.h. */
2727 #include <stdio.h>
2728 int
2729 main ()
2730 {
2731 FILE *f = fopen ("conftest.out", "w");
2732 return ferror (f) || fclose (f) != 0;
2733
2734 ;
2735 return 0;
2736 }
2737 _ACEOF
2738 ac_clean_files="$ac_clean_files conftest.out"
2739 # Check that the compiler produces executables we can run. If not, either
2740 # the compiler is broken, or we cross compile.
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
2742 $as_echo_n "checking whether we are cross compiling... " >&6; }
2743 if test "$cross_compiling" != yes; then
2744 { { ac_try="$ac_link"
2745 case "(($ac_try" in
2746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2747 *) ac_try_echo=$ac_try;;
2748 esac
2749 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2750 $as_echo "$ac_try_echo"; } >&5
2751 (eval "$ac_link") 2>&5
2752 ac_status=$?
2753 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2754 test $ac_status = 0; }
2755 if { ac_try='./conftest$ac_cv_exeext'
2756 { { case "(($ac_try" in
2757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2758 *) ac_try_echo=$ac_try;;
2759 esac
2760 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2761 $as_echo "$ac_try_echo"; } >&5
2762 (eval "$ac_try") 2>&5
2763 ac_status=$?
2764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2765 test $ac_status = 0; }; }; then
2766 cross_compiling=no
2767 else
2768 if test "$cross_compiling" = maybe; then
2769 cross_compiling=yes
2770 else
2771 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2772 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2773 as_fn_error $? "cannot run C compiled programs.
2774 If you meant to cross compile, use \`--host'.
2775 See \`config.log' for more details" "$LINENO" 5; }
2776 fi
2777 fi
2778 fi
2779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
2780 $as_echo "$cross_compiling" >&6; }
2781
2782 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
2783 ac_clean_files=$ac_clean_files_save
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
2785 $as_echo_n "checking for suffix of object files... " >&6; }
2786 if ${ac_cv_objext+:} false; then :
2787 $as_echo_n "(cached) " >&6
2788 else
2789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2790 /* end confdefs.h. */
2791
2792 int
2793 main ()
2794 {
2795
2796 ;
2797 return 0;
2798 }
2799 _ACEOF
2800 rm -f conftest.o conftest.obj
2801 if { { ac_try="$ac_compile"
2802 case "(($ac_try" in
2803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2804 *) ac_try_echo=$ac_try;;
2805 esac
2806 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2807 $as_echo "$ac_try_echo"; } >&5
2808 (eval "$ac_compile") 2>&5
2809 ac_status=$?
2810 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2811 test $ac_status = 0; }; then :
2812 for ac_file in conftest.o conftest.obj conftest.*; do
2813 test -f "$ac_file" || continue;
2814 case $ac_file in
2815 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
2816 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2817 break;;
2818 esac
2819 done
2820 else
2821 $as_echo "$as_me: failed program was:" >&5
2822 sed 's/^/| /' conftest.$ac_ext >&5
2823
2824 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2825 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2826 as_fn_error $? "cannot compute suffix of object files: cannot compile
2827 See \`config.log' for more details" "$LINENO" 5; }
2828 fi
2829 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2830 fi
2831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
2832 $as_echo "$ac_cv_objext" >&6; }
2833 OBJEXT=$ac_cv_objext
2834 ac_objext=$OBJEXT
2835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
2836 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
2837 if ${ac_cv_c_compiler_gnu+:} false; then :
2838 $as_echo_n "(cached) " >&6
2839 else
2840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2841 /* end confdefs.h. */
2842
2843 int
2844 main ()
2845 {
2846 #ifndef __GNUC__
2847 choke me
2848 #endif
2849
2850 ;
2851 return 0;
2852 }
2853 _ACEOF
2854 if ac_fn_c_try_compile "$LINENO"; then :
2855 ac_compiler_gnu=yes
2856 else
2857 ac_compiler_gnu=no
2858 fi
2859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2860 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2861
2862 fi
2863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
2864 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
2865 if test $ac_compiler_gnu = yes; then
2866 GCC=yes
2867 else
2868 GCC=
2869 fi
2870 ac_test_CFLAGS=${CFLAGS+set}
2871 ac_save_CFLAGS=$CFLAGS
2872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
2873 $as_echo_n "checking whether $CC accepts -g... " >&6; }
2874 if ${ac_cv_prog_cc_g+:} false; then :
2875 $as_echo_n "(cached) " >&6
2876 else
2877 ac_save_c_werror_flag=$ac_c_werror_flag
2878 ac_c_werror_flag=yes
2879 ac_cv_prog_cc_g=no
2880 CFLAGS="-g"
2881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2882 /* end confdefs.h. */
2883
2884 int
2885 main ()
2886 {
2887
2888 ;
2889 return 0;
2890 }
2891 _ACEOF
2892 if ac_fn_c_try_compile "$LINENO"; then :
2893 ac_cv_prog_cc_g=yes
2894 else
2895 CFLAGS=""
2896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2897 /* end confdefs.h. */
2898
2899 int
2900 main ()
2901 {
2902
2903 ;
2904 return 0;
2905 }
2906 _ACEOF
2907 if ac_fn_c_try_compile "$LINENO"; then :
2908
2909 else
2910 ac_c_werror_flag=$ac_save_c_werror_flag
2911 CFLAGS="-g"
2912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2913 /* end confdefs.h. */
2914
2915 int
2916 main ()
2917 {
2918
2919 ;
2920 return 0;
2921 }
2922 _ACEOF
2923 if ac_fn_c_try_compile "$LINENO"; then :
2924 ac_cv_prog_cc_g=yes
2925 fi
2926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2927 fi
2928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2929 fi
2930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2931 ac_c_werror_flag=$ac_save_c_werror_flag
2932 fi
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
2934 $as_echo "$ac_cv_prog_cc_g" >&6; }
2935 if test "$ac_test_CFLAGS" = set; then
2936 CFLAGS=$ac_save_CFLAGS
2937 elif test $ac_cv_prog_cc_g = yes; then
2938 if test "$GCC" = yes; then
2939 CFLAGS="-g -O2"
2940 else
2941 CFLAGS="-g"
2942 fi
2943 else
2944 if test "$GCC" = yes; then
2945 CFLAGS="-O2"
2946 else
2947 CFLAGS=
2948 fi
2949 fi
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
2951 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
2952 if ${ac_cv_prog_cc_c89+:} false; then :
2953 $as_echo_n "(cached) " >&6
2954 else
2955 ac_cv_prog_cc_c89=no
2956 ac_save_CC=$CC
2957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2958 /* end confdefs.h. */
2959 #include <stdarg.h>
2960 #include <stdio.h>
2961 struct stat;
2962 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2963 struct buf { int x; };
2964 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2965 static char *e (p, i)
2966 char **p;
2967 int i;
2968 {
2969 return p[i];
2970 }
2971 static char *f (char * (*g) (char **, int), char **p, ...)
2972 {
2973 char *s;
2974 va_list v;
2975 va_start (v,p);
2976 s = g (p, va_arg (v,int));
2977 va_end (v);
2978 return s;
2979 }
2980
2981 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2982 function prototypes and stuff, but not '\xHH' hex character constants.
2983 These don't provoke an error unfortunately, instead are silently treated
2984 as 'x'. The following induces an error, until -std is added to get
2985 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2986 array size at least. It's necessary to write '\x00'==0 to get something
2987 that's true only with -std. */
2988 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2989
2990 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2991 inside strings and character constants. */
2992 #define FOO(x) 'x'
2993 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
2994
2995 int test (int i, double x);
2996 struct s1 {int (*f) (int a);};
2997 struct s2 {int (*f) (double a);};
2998 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2999 int argc;
3000 char **argv;
3001 int
3002 main ()
3003 {
3004 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3005 ;
3006 return 0;
3007 }
3008 _ACEOF
3009 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3010 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3011 do
3012 CC="$ac_save_CC $ac_arg"
3013 if ac_fn_c_try_compile "$LINENO"; then :
3014 ac_cv_prog_cc_c89=$ac_arg
3015 fi
3016 rm -f core conftest.err conftest.$ac_objext
3017 test "x$ac_cv_prog_cc_c89" != "xno" && break
3018 done
3019 rm -f conftest.$ac_ext
3020 CC=$ac_save_CC
3021
3022 fi
3023 # AC_CACHE_VAL
3024 case "x$ac_cv_prog_cc_c89" in
3025 x)
3026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3027 $as_echo "none needed" >&6; } ;;
3028 xno)
3029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3030 $as_echo "unsupported" >&6; } ;;
3031 *)
3032 CC="$CC $ac_cv_prog_cc_c89"
3033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3034 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3035 esac
3036 if test "x$ac_cv_prog_cc_c89" != xno; then :
3037
3038 fi
3039
3040 ac_ext=c
3041 ac_cpp='$CPP $CPPFLAGS'
3042 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3043 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3044 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3045
3046 ac_aux_dir=
3047 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3048 if test -f "$ac_dir/install-sh"; then
3049 ac_aux_dir=$ac_dir
3050 ac_install_sh="$ac_aux_dir/install-sh -c"
3051 break
3052 elif test -f "$ac_dir/install.sh"; then
3053 ac_aux_dir=$ac_dir
3054 ac_install_sh="$ac_aux_dir/install.sh -c"
3055 break
3056 elif test -f "$ac_dir/shtool"; then
3057 ac_aux_dir=$ac_dir
3058 ac_install_sh="$ac_aux_dir/shtool install -c"
3059 break
3060 fi
3061 done
3062 if test -z "$ac_aux_dir"; then
3063 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3064 fi
3065
3066 # These three variables are undocumented and unsupported,
3067 # and are intended to be withdrawn in a future Autoconf release.
3068 # They can cause serious problems if a builder's source tree is in a directory
3069 # whose full name contains unusual characters.
3070 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3071 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3072 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3073
3074
3075 # Make sure we can run config.sub.
3076 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3077 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3078
3079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3080 $as_echo_n "checking build system type... " >&6; }
3081 if ${ac_cv_build+:} false; then :
3082 $as_echo_n "(cached) " >&6
3083 else
3084 ac_build_alias=$build_alias
3085 test "x$ac_build_alias" = x &&
3086 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3087 test "x$ac_build_alias" = x &&
3088 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3089 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3090 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3091
3092 fi
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3094 $as_echo "$ac_cv_build" >&6; }
3095 case $ac_cv_build in
3096 *-*-*) ;;
3097 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3098 esac
3099 build=$ac_cv_build
3100 ac_save_IFS=$IFS; IFS='-'
3101 set x $ac_cv_build
3102 shift
3103 build_cpu=$1
3104 build_vendor=$2
3105 shift; shift
3106 # Remember, the first character of IFS is used to create $*,
3107 # except with old shells:
3108 build_os=$*
3109 IFS=$ac_save_IFS
3110 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3111
3112
3113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3114 $as_echo_n "checking host system type... " >&6; }
3115 if ${ac_cv_host+:} false; then :
3116 $as_echo_n "(cached) " >&6
3117 else
3118 if test "x$host_alias" = x; then
3119 ac_cv_host=$ac_cv_build
3120 else
3121 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3122 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3123 fi
3124
3125 fi
3126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3127 $as_echo "$ac_cv_host" >&6; }
3128 case $ac_cv_host in
3129 *-*-*) ;;
3130 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3131 esac
3132 host=$ac_cv_host
3133 ac_save_IFS=$IFS; IFS='-'
3134 set x $ac_cv_host
3135 shift
3136 host_cpu=$1
3137 host_vendor=$2
3138 shift; shift
3139 # Remember, the first character of IFS is used to create $*,
3140 # except with old shells:
3141 host_os=$*
3142 IFS=$ac_save_IFS
3143 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3144
3145
3146 # Find a good install program. We prefer a C program (faster),
3147 # so one script is as good as another. But avoid the broken or
3148 # incompatible versions:
3149 # SysV /etc/install, /usr/sbin/install
3150 # SunOS /usr/etc/install
3151 # IRIX /sbin/install
3152 # AIX /bin/install
3153 # AmigaOS /C/install, which installs bootblocks on floppy discs
3154 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3155 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3156 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3157 # OS/2's system install, which has a completely different semantic
3158 # ./install, which can be erroneously created by make from ./install.sh.
3159 # Reject install programs that cannot install multiple files.
3160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3161 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3162 if test -z "$INSTALL"; then
3163 if ${ac_cv_path_install+:} false; then :
3164 $as_echo_n "(cached) " >&6
3165 else
3166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3167 for as_dir in $PATH
3168 do
3169 IFS=$as_save_IFS
3170 test -z "$as_dir" && as_dir=.
3171 # Account for people who put trailing slashes in PATH elements.
3172 case $as_dir/ in #((
3173 ./ | .// | /[cC]/* | \
3174 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3175 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3176 /usr/ucb/* ) ;;
3177 *)
3178 # OSF1 and SCO ODT 3.0 have their own names for install.
3179 # Don't use installbsd from OSF since it installs stuff as root
3180 # by default.
3181 for ac_prog in ginstall scoinst install; do
3182 for ac_exec_ext in '' $ac_executable_extensions; do
3183 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3184 if test $ac_prog = install &&
3185 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3186 # AIX install. It has an incompatible calling convention.
3187 :
3188 elif test $ac_prog = install &&
3189 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3190 # program-specific install script used by HP pwplus--don't use.
3191 :
3192 else
3193 rm -rf conftest.one conftest.two conftest.dir
3194 echo one > conftest.one
3195 echo two > conftest.two
3196 mkdir conftest.dir
3197 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3198 test -s conftest.one && test -s conftest.two &&
3199 test -s conftest.dir/conftest.one &&
3200 test -s conftest.dir/conftest.two
3201 then
3202 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3203 break 3
3204 fi
3205 fi
3206 fi
3207 done
3208 done
3209 ;;
3210 esac
3211
3212 done
3213 IFS=$as_save_IFS
3214
3215 rm -rf conftest.one conftest.two conftest.dir
3216
3217 fi
3218 if test "${ac_cv_path_install+set}" = set; then
3219 INSTALL=$ac_cv_path_install
3220 else
3221 # As a last resort, use the slow shell script. Don't cache a
3222 # value for INSTALL within a source directory, because that will
3223 # break other packages using the cache if that directory is
3224 # removed, or if the value is a relative name.
3225 INSTALL=$ac_install_sh
3226 fi
3227 fi
3228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3229 $as_echo "$INSTALL" >&6; }
3230
3231 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3232 # It thinks the first close brace ends the variable substitution.
3233 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3234
3235 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3236
3237 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3238
3239
3240
3241
3242
3243
3244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target toolchain" >&5
3245 $as_echo_n "checking target toolchain... " >&6; }
3246 case "${host_os}" in
3247 linux*)
3248 TARGET_TOOLCHAIN="linux"
3249 ;;
3250 mingw*)
3251 TARGET_TOOLCHAIN="mingw"
3252 ;;
3253 cygwin*)
3254 TARGET_TOOLCHAIN="cygwin"
3255 ;;
3256 darwin*)
3257 TARGET_TOOLCHAIN="darwin"
3258 ;;
3259 *)
3260 TARGET_TOOLCHAIN="other"
3261 ;;
3262 esac
3263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_TOOLCHAIN" >&5
3264 $as_echo "$TARGET_TOOLCHAIN" >&6; }
3265
3266
3267 # AC_CANONICAL_HOST needs those files
3268 AUTOCONF_INSTALL_FILES="config.guess config.sub install-sh m4/*.m4"
3269
3270
3271 ac_ext=c
3272 ac_cpp='$CPP $CPPFLAGS'
3273 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3274 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3275 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3276 if test -n "$ac_tool_prefix"; then
3277 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3278 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3280 $as_echo_n "checking for $ac_word... " >&6; }
3281 if ${ac_cv_prog_CC+:} false; then :
3282 $as_echo_n "(cached) " >&6
3283 else
3284 if test -n "$CC"; then
3285 ac_cv_prog_CC="$CC" # Let the user override the test.
3286 else
3287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3288 for as_dir in $PATH
3289 do
3290 IFS=$as_save_IFS
3291 test -z "$as_dir" && as_dir=.
3292 for ac_exec_ext in '' $ac_executable_extensions; do
3293 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3294 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3295 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3296 break 2
3297 fi
3298 done
3299 done
3300 IFS=$as_save_IFS
3301
3302 fi
3303 fi
3304 CC=$ac_cv_prog_CC
3305 if test -n "$CC"; then
3306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3307 $as_echo "$CC" >&6; }
3308 else
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3310 $as_echo "no" >&6; }
3311 fi
3312
3313
3314 fi
3315 if test -z "$ac_cv_prog_CC"; then
3316 ac_ct_CC=$CC
3317 # Extract the first word of "gcc", so it can be a program name with args.
3318 set dummy gcc; ac_word=$2
3319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3320 $as_echo_n "checking for $ac_word... " >&6; }
3321 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3322 $as_echo_n "(cached) " >&6
3323 else
3324 if test -n "$ac_ct_CC"; then
3325 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3326 else
3327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3328 for as_dir in $PATH
3329 do
3330 IFS=$as_save_IFS
3331 test -z "$as_dir" && as_dir=.
3332 for ac_exec_ext in '' $ac_executable_extensions; do
3333 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3334 ac_cv_prog_ac_ct_CC="gcc"
3335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3336 break 2
3337 fi
3338 done
3339 done
3340 IFS=$as_save_IFS
3341
3342 fi
3343 fi
3344 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3345 if test -n "$ac_ct_CC"; then
3346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3347 $as_echo "$ac_ct_CC" >&6; }
3348 else
3349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3350 $as_echo "no" >&6; }
3351 fi
3352
3353 if test "x$ac_ct_CC" = x; then
3354 CC=""
3355 else
3356 case $cross_compiling:$ac_tool_warned in
3357 yes:)
3358 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3359 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3360 ac_tool_warned=yes ;;
3361 esac
3362 CC=$ac_ct_CC
3363 fi
3364 else
3365 CC="$ac_cv_prog_CC"
3366 fi
3367
3368 if test -z "$CC"; then
3369 if test -n "$ac_tool_prefix"; then
3370 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3371 set dummy ${ac_tool_prefix}cc; ac_word=$2
3372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3373 $as_echo_n "checking for $ac_word... " >&6; }
3374 if ${ac_cv_prog_CC+:} false; then :
3375 $as_echo_n "(cached) " >&6
3376 else
3377 if test -n "$CC"; then
3378 ac_cv_prog_CC="$CC" # Let the user override the test.
3379 else
3380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3381 for as_dir in $PATH
3382 do
3383 IFS=$as_save_IFS
3384 test -z "$as_dir" && as_dir=.
3385 for ac_exec_ext in '' $ac_executable_extensions; do
3386 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3387 ac_cv_prog_CC="${ac_tool_prefix}cc"
3388 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3389 break 2
3390 fi
3391 done
3392 done
3393 IFS=$as_save_IFS
3394
3395 fi
3396 fi
3397 CC=$ac_cv_prog_CC
3398 if test -n "$CC"; then
3399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3400 $as_echo "$CC" >&6; }
3401 else
3402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3403 $as_echo "no" >&6; }
3404 fi
3405
3406
3407 fi
3408 fi
3409 if test -z "$CC"; then
3410 # Extract the first word of "cc", so it can be a program name with args.
3411 set dummy cc; ac_word=$2
3412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3413 $as_echo_n "checking for $ac_word... " >&6; }
3414 if ${ac_cv_prog_CC+:} false; then :
3415 $as_echo_n "(cached) " >&6
3416 else
3417 if test -n "$CC"; then
3418 ac_cv_prog_CC="$CC" # Let the user override the test.
3419 else
3420 ac_prog_rejected=no
3421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3422 for as_dir in $PATH
3423 do
3424 IFS=$as_save_IFS
3425 test -z "$as_dir" && as_dir=.
3426 for ac_exec_ext in '' $ac_executable_extensions; do
3427 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3428 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3429 ac_prog_rejected=yes
3430 continue
3431 fi
3432 ac_cv_prog_CC="cc"
3433 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3434 break 2
3435 fi
3436 done
3437 done
3438 IFS=$as_save_IFS
3439
3440 if test $ac_prog_rejected = yes; then
3441 # We found a bogon in the path, so make sure we never use it.
3442 set dummy $ac_cv_prog_CC
3443 shift
3444 if test $# != 0; then
3445 # We chose a different compiler from the bogus one.
3446 # However, it has the same basename, so the bogon will be chosen
3447 # first if we set CC to just the basename; use the full file name.
3448 shift
3449 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3450 fi
3451 fi
3452 fi
3453 fi
3454 CC=$ac_cv_prog_CC
3455 if test -n "$CC"; then
3456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3457 $as_echo "$CC" >&6; }
3458 else
3459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3460 $as_echo "no" >&6; }
3461 fi
3462
3463
3464 fi
3465 if test -z "$CC"; then
3466 if test -n "$ac_tool_prefix"; then
3467 for ac_prog in cl.exe
3468 do
3469 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3470 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3472 $as_echo_n "checking for $ac_word... " >&6; }
3473 if ${ac_cv_prog_CC+:} false; then :
3474 $as_echo_n "(cached) " >&6
3475 else
3476 if test -n "$CC"; then
3477 ac_cv_prog_CC="$CC" # Let the user override the test.
3478 else
3479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3480 for as_dir in $PATH
3481 do
3482 IFS=$as_save_IFS
3483 test -z "$as_dir" && as_dir=.
3484 for ac_exec_ext in '' $ac_executable_extensions; do
3485 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3486 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3487 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3488 break 2
3489 fi
3490 done
3491 done
3492 IFS=$as_save_IFS
3493
3494 fi
3495 fi
3496 CC=$ac_cv_prog_CC
3497 if test -n "$CC"; then
3498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3499 $as_echo "$CC" >&6; }
3500 else
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3502 $as_echo "no" >&6; }
3503 fi
3504
3505
3506 test -n "$CC" && break
3507 done
3508 fi
3509 if test -z "$CC"; then
3510 ac_ct_CC=$CC
3511 for ac_prog in cl.exe
3512 do
3513 # Extract the first word of "$ac_prog", so it can be a program name with args.
3514 set dummy $ac_prog; ac_word=$2
3515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3516 $as_echo_n "checking for $ac_word... " >&6; }
3517 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3518 $as_echo_n "(cached) " >&6
3519 else
3520 if test -n "$ac_ct_CC"; then
3521 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3522 else
3523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3524 for as_dir in $PATH
3525 do
3526 IFS=$as_save_IFS
3527 test -z "$as_dir" && as_dir=.
3528 for ac_exec_ext in '' $ac_executable_extensions; do
3529 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3530 ac_cv_prog_ac_ct_CC="$ac_prog"
3531 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3532 break 2
3533 fi
3534 done
3535 done
3536 IFS=$as_save_IFS
3537
3538 fi
3539 fi
3540 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3541 if test -n "$ac_ct_CC"; then
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3543 $as_echo "$ac_ct_CC" >&6; }
3544 else
3545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3546 $as_echo "no" >&6; }
3547 fi
3548
3549
3550 test -n "$ac_ct_CC" && break
3551 done
3552
3553 if test "x$ac_ct_CC" = x; then
3554 CC=""
3555 else
3556 case $cross_compiling:$ac_tool_warned in
3557 yes:)
3558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3559 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3560 ac_tool_warned=yes ;;
3561 esac
3562 CC=$ac_ct_CC
3563 fi
3564 fi
3565
3566 fi
3567
3568
3569 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3570 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3571 as_fn_error $? "no acceptable C compiler found in \$PATH
3572 See \`config.log' for more details" "$LINENO" 5; }
3573
3574 # Provide some information about the compiler.
3575 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3576 set X $ac_compile
3577 ac_compiler=$2
3578 for ac_option in --version -v -V -qversion; do
3579 { { ac_try="$ac_compiler $ac_option >&5"
3580 case "(($ac_try" in
3581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3582 *) ac_try_echo=$ac_try;;
3583 esac
3584 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3585 $as_echo "$ac_try_echo"; } >&5
3586 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3587 ac_status=$?
3588 if test -s conftest.err; then
3589 sed '10a\
3590 ... rest of stderr output deleted ...
3591 10q' conftest.err >conftest.er1
3592 cat conftest.er1 >&5
3593 fi
3594 rm -f conftest.er1 conftest.err
3595 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3596 test $ac_status = 0; }
3597 done
3598
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3600 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3601 if ${ac_cv_c_compiler_gnu+:} false; then :
3602 $as_echo_n "(cached) " >&6
3603 else
3604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3605 /* end confdefs.h. */
3606
3607 int
3608 main ()
3609 {
3610 #ifndef __GNUC__
3611 choke me
3612 #endif
3613
3614 ;
3615 return 0;
3616 }
3617 _ACEOF
3618 if ac_fn_c_try_compile "$LINENO"; then :
3619 ac_compiler_gnu=yes
3620 else
3621 ac_compiler_gnu=no
3622 fi
3623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3624 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3625
3626 fi
3627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3628 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3629 if test $ac_compiler_gnu = yes; then
3630 GCC=yes
3631 else
3632 GCC=
3633 fi
3634 ac_test_CFLAGS=${CFLAGS+set}
3635 ac_save_CFLAGS=$CFLAGS
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3637 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3638 if ${ac_cv_prog_cc_g+:} false; then :
3639 $as_echo_n "(cached) " >&6
3640 else
3641 ac_save_c_werror_flag=$ac_c_werror_flag
3642 ac_c_werror_flag=yes
3643 ac_cv_prog_cc_g=no
3644 CFLAGS="-g"
3645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3646 /* end confdefs.h. */
3647
3648 int
3649 main ()
3650 {
3651
3652 ;
3653 return 0;
3654 }
3655 _ACEOF
3656 if ac_fn_c_try_compile "$LINENO"; then :
3657 ac_cv_prog_cc_g=yes
3658 else
3659 CFLAGS=""
3660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3661 /* end confdefs.h. */
3662
3663 int
3664 main ()
3665 {
3666
3667 ;
3668 return 0;
3669 }
3670 _ACEOF
3671 if ac_fn_c_try_compile "$LINENO"; then :
3672
3673 else
3674 ac_c_werror_flag=$ac_save_c_werror_flag
3675 CFLAGS="-g"
3676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3677 /* end confdefs.h. */
3678
3679 int
3680 main ()
3681 {
3682
3683 ;
3684 return 0;
3685 }
3686 _ACEOF
3687 if ac_fn_c_try_compile "$LINENO"; then :
3688 ac_cv_prog_cc_g=yes
3689 fi
3690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3691 fi
3692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3693 fi
3694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3695 ac_c_werror_flag=$ac_save_c_werror_flag
3696 fi
3697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3698 $as_echo "$ac_cv_prog_cc_g" >&6; }
3699 if test "$ac_test_CFLAGS" = set; then
3700 CFLAGS=$ac_save_CFLAGS
3701 elif test $ac_cv_prog_cc_g = yes; then
3702 if test "$GCC" = yes; then
3703 CFLAGS="-g -O2"
3704 else
3705 CFLAGS="-g"
3706 fi
3707 else
3708 if test "$GCC" = yes; then
3709 CFLAGS="-O2"
3710 else
3711 CFLAGS=
3712 fi
3713 fi
3714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3715 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3716 if ${ac_cv_prog_cc_c89+:} false; then :
3717 $as_echo_n "(cached) " >&6
3718 else
3719 ac_cv_prog_cc_c89=no
3720 ac_save_CC=$CC
3721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3722 /* end confdefs.h. */
3723 #include <stdarg.h>
3724 #include <stdio.h>
3725 struct stat;
3726 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3727 struct buf { int x; };
3728 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3729 static char *e (p, i)
3730 char **p;
3731 int i;
3732 {
3733 return p[i];
3734 }
3735 static char *f (char * (*g) (char **, int), char **p, ...)
3736 {
3737 char *s;
3738 va_list v;
3739 va_start (v,p);
3740 s = g (p, va_arg (v,int));
3741 va_end (v);
3742 return s;
3743 }
3744
3745 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3746 function prototypes and stuff, but not '\xHH' hex character constants.
3747 These don't provoke an error unfortunately, instead are silently treated
3748 as 'x'. The following induces an error, until -std is added to get
3749 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3750 array size at least. It's necessary to write '\x00'==0 to get something
3751 that's true only with -std. */
3752 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3753
3754 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3755 inside strings and character constants. */
3756 #define FOO(x) 'x'
3757 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3758
3759 int test (int i, double x);
3760 struct s1 {int (*f) (int a);};
3761 struct s2 {int (*f) (double a);};
3762 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3763 int argc;
3764 char **argv;
3765 int
3766 main ()
3767 {
3768 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3769 ;
3770 return 0;
3771 }
3772 _ACEOF
3773 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3774 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3775 do
3776 CC="$ac_save_CC $ac_arg"
3777 if ac_fn_c_try_compile "$LINENO"; then :
3778 ac_cv_prog_cc_c89=$ac_arg
3779 fi
3780 rm -f core conftest.err conftest.$ac_objext
3781 test "x$ac_cv_prog_cc_c89" != "xno" && break
3782 done
3783 rm -f conftest.$ac_ext
3784 CC=$ac_save_CC
3785
3786 fi
3787 # AC_CACHE_VAL
3788 case "x$ac_cv_prog_cc_c89" in
3789 x)
3790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3791 $as_echo "none needed" >&6; } ;;
3792 xno)
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3794 $as_echo "unsupported" >&6; } ;;
3795 *)
3796 CC="$CC $ac_cv_prog_cc_c89"
3797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3798 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3799 esac
3800 if test "x$ac_cv_prog_cc_c89" != xno; then :
3801
3802 fi
3803
3804 ac_ext=c
3805 ac_cpp='$CPP $CPPFLAGS'
3806 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3807 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3808 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3809
3810
3811 if test -n "$ac_tool_prefix"; then
3812 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3813 set dummy ${ac_tool_prefix}ar; ac_word=$2
3814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3815 $as_echo_n "checking for $ac_word... " >&6; }
3816 if ${ac_cv_prog_AR+:} false; then :
3817 $as_echo_n "(cached) " >&6
3818 else
3819 if test -n "$AR"; then
3820 ac_cv_prog_AR="$AR" # Let the user override the test.
3821 else
3822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3823 for as_dir in $PATH
3824 do
3825 IFS=$as_save_IFS
3826 test -z "$as_dir" && as_dir=.
3827 for ac_exec_ext in '' $ac_executable_extensions; do
3828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3829 ac_cv_prog_AR="${ac_tool_prefix}ar"
3830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3831 break 2
3832 fi
3833 done
3834 done
3835 IFS=$as_save_IFS
3836
3837 fi
3838 fi
3839 AR=$ac_cv_prog_AR
3840 if test -n "$AR"; then
3841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
3842 $as_echo "$AR" >&6; }
3843 else
3844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3845 $as_echo "no" >&6; }
3846 fi
3847
3848
3849 fi
3850 if test -z "$ac_cv_prog_AR"; then
3851 ac_ct_AR=$AR
3852 # Extract the first word of "ar", so it can be a program name with args.
3853 set dummy ar; ac_word=$2
3854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3855 $as_echo_n "checking for $ac_word... " >&6; }
3856 if ${ac_cv_prog_ac_ct_AR+:} false; then :
3857 $as_echo_n "(cached) " >&6
3858 else
3859 if test -n "$ac_ct_AR"; then
3860 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3861 else
3862 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3863 for as_dir in $PATH
3864 do
3865 IFS=$as_save_IFS
3866 test -z "$as_dir" && as_dir=.
3867 for ac_exec_ext in '' $ac_executable_extensions; do
3868 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3869 ac_cv_prog_ac_ct_AR="ar"
3870 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3871 break 2
3872 fi
3873 done
3874 done
3875 IFS=$as_save_IFS
3876
3877 fi
3878 fi
3879 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3880 if test -n "$ac_ct_AR"; then
3881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
3882 $as_echo "$ac_ct_AR" >&6; }
3883 else
3884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3885 $as_echo "no" >&6; }
3886 fi
3887
3888 if test "x$ac_ct_AR" = x; then
3889 AR="no"
3890 else
3891 case $cross_compiling:$ac_tool_warned in
3892 yes:)
3893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3894 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3895 ac_tool_warned=yes ;;
3896 esac
3897 AR=$ac_ct_AR
3898 fi
3899 else
3900 AR="$ac_cv_prog_AR"
3901 fi
3902
3903
3904
3905 OCAMLFIND_LDCONF=""
3906 # Check whether --enable-ldconf was given.
3907 if test "${enable_ldconf+set}" = set; then :
3908 enableval=$enable_ldconf; ac_enable_ldconf=$enableval
3909 else
3910 ac_enable_ldconf=$enableval
3911 fi
3912
3913 if test "$ac_enable_ldconf" = no ; then
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabling modification of ld.conf" >&5
3915 $as_echo "disabling modification of ld.conf" >&6; }
3916 OCAMLFIND_LDCONF=dummy
3917 fi
3918
3919
3920 # Check for Ocaml compilers
3921
3922 # checking for ocamlc
3923 if test -n "$ac_tool_prefix"; then
3924 # Extract the first word of "${ac_tool_prefix}ocamlc", so it can be a program name with args.
3925 set dummy ${ac_tool_prefix}ocamlc; ac_word=$2
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3927 $as_echo_n "checking for $ac_word... " >&6; }
3928 if ${ac_cv_prog_OCAMLC+:} false; then :
3929 $as_echo_n "(cached) " >&6
3930 else
3931 if test -n "$OCAMLC"; then
3932 ac_cv_prog_OCAMLC="$OCAMLC" # Let the user override the test.
3933 else
3934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3935 for as_dir in $PATH
3936 do
3937 IFS=$as_save_IFS
3938 test -z "$as_dir" && as_dir=.
3939 for ac_exec_ext in '' $ac_executable_extensions; do
3940 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3941 ac_cv_prog_OCAMLC="${ac_tool_prefix}ocamlc"
3942 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3943 break 2
3944 fi
3945 done
3946 done
3947 IFS=$as_save_IFS
3948
3949 fi
3950 fi
3951 OCAMLC=$ac_cv_prog_OCAMLC
3952 if test -n "$OCAMLC"; then
3953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLC" >&5
3954 $as_echo "$OCAMLC" >&6; }
3955 else
3956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3957 $as_echo "no" >&6; }
3958 fi
3959
3960
3961 fi
3962 if test -z "$ac_cv_prog_OCAMLC"; then
3963 ac_ct_OCAMLC=$OCAMLC
3964 # Extract the first word of "ocamlc", so it can be a program name with args.
3965 set dummy ocamlc; ac_word=$2
3966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3967 $as_echo_n "checking for $ac_word... " >&6; }
3968 if ${ac_cv_prog_ac_ct_OCAMLC+:} false; then :
3969 $as_echo_n "(cached) " >&6
3970 else
3971 if test -n "$ac_ct_OCAMLC"; then
3972 ac_cv_prog_ac_ct_OCAMLC="$ac_ct_OCAMLC" # Let the user override the test.
3973 else
3974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3975 for as_dir in $PATH
3976 do
3977 IFS=$as_save_IFS
3978 test -z "$as_dir" && as_dir=.
3979 for ac_exec_ext in '' $ac_executable_extensions; do
3980 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3981 ac_cv_prog_ac_ct_OCAMLC="ocamlc"
3982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3983 break 2
3984 fi
3985 done
3986 done
3987 IFS=$as_save_IFS
3988
3989 fi
3990 fi
3991 ac_ct_OCAMLC=$ac_cv_prog_ac_ct_OCAMLC
3992 if test -n "$ac_ct_OCAMLC"; then
3993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLC" >&5
3994 $as_echo "$ac_ct_OCAMLC" >&6; }
3995 else
3996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3997 $as_echo "no" >&6; }
3998 fi
3999
4000 if test "x$ac_ct_OCAMLC" = x; then
4001 OCAMLC="no"
4002 else
4003 case $cross_compiling:$ac_tool_warned in
4004 yes:)
4005 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4006 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4007 ac_tool_warned=yes ;;
4008 esac
4009 OCAMLC=$ac_ct_OCAMLC
4010 fi
4011 else
4012 OCAMLC="$ac_cv_prog_OCAMLC"
4013 fi
4014
4015
4016 if test "$OCAMLC" = "no"; then
4017 as_fn_error $? "Cannot find ocamlc." "$LINENO" 5
4018 fi
4019
4020
4021
4022 OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'`
4023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCaml version is $OCAMLVERSION" >&5
4024 $as_echo "OCaml version is $OCAMLVERSION" >&6; }
4025 # Check if version is >= 3.12.0
4026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ocaml compiler supports first-class modules" >&5
4027 $as_echo_n "checking if ocaml compiler supports first-class modules... " >&6; }
4028 as_arg_v1=$OCAMLVERSION
4029 as_arg_v2=3.12.0
4030 awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
4031 case $? in #(
4032 1) :
4033 ;; #(
4034 0) :
4035 OCAML_HAS_FIRST_CLASS_MODULES="yes" ;; #(
4036 2) :
4037 OCAML_HAS_FIRST_CLASS_MODULES="yes" ;; #(
4038 *) :
4039 ;;
4040 esac
4041 if test -n "${OCAML_HAS_FIRST_CLASS_MODULES}"; then
4042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4043 $as_echo "yes" >&6; }
4044 else
4045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4046 $as_echo "no" >&6; }
4047 fi
4048
4049
4050 # If OCAMLLIB is set, use it
4051 if test "$OCAMLLIB" = ""; then
4052 OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4`
4053 else
4054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCAMLLIB previously set; preserving it." >&5
4055 $as_echo "OCAMLLIB previously set; preserving it." >&6; }
4056 fi
4057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCaml library path is $OCAMLLIB" >&5
4058 $as_echo "OCaml library path is $OCAMLLIB" >&6; }
4059
4060
4061
4062
4063 # checking for ocamlopt
4064 # Extract the first word of "${ac_tool_prefix}ocamlopt", so it can be a program name with args.
4065 set dummy ${ac_tool_prefix}ocamlopt; ac_word=$2
4066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4067 $as_echo_n "checking for $ac_word... " >&6; }
4068 if ${ac_cv_prog_OCAMLOPT+:} false; then :
4069 $as_echo_n "(cached) " >&6
4070 else
4071 if test -n "$OCAMLOPT"; then
4072 ac_cv_prog_OCAMLOPT="$OCAMLOPT" # Let the user override the test.
4073 else
4074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4075 for as_dir in $PATH
4076 do
4077 IFS=$as_save_IFS
4078 test -z "$as_dir" && as_dir=.
4079 for ac_exec_ext in '' $ac_executable_extensions; do
4080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4081 ac_cv_prog_OCAMLOPT="${ac_tool_prefix}ocamlopt"
4082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4083 break 2
4084 fi
4085 done
4086 done
4087 IFS=$as_save_IFS
4088
4089 test -z "$ac_cv_prog_OCAMLOPT" && ac_cv_prog_OCAMLOPT="no"
4090 fi
4091 fi
4092 OCAMLOPT=$ac_cv_prog_OCAMLOPT
4093 if test -n "$OCAMLOPT"; then
4094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPT" >&5
4095 $as_echo "$OCAMLOPT" >&6; }
4096 else
4097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4098 $as_echo "no" >&6; }
4099 fi
4100
4101
4102 OCAMLBEST=byte
4103 OCAML_DYNLINK=byte-dyn
4104 if test "$OCAMLOPT" = "no"; then
4105 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find ocamlopt; bytecode compilation only." >&5
4106 $as_echo "$as_me: WARNING: Cannot find ocamlopt; bytecode compilation only." >&2;}
4107 else
4108 TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
4109 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
4110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc; ocamlopt discarded." >&5
4111 $as_echo "versions differs from ocamlc; ocamlopt discarded." >&6; }
4112 OCAMLOPT=no
4113 else
4114 OCAMLBEST="byte opt"
4115 OCAML_DYNLINK="byte-dyn opt-dyn"
4116 fi
4117 fi
4118
4119
4120
4121
4122 # checking for ocamlc.opt
4123 # Extract the first word of "${ac_tool_prefix}ocamlc.opt", so it can be a program name with args.
4124 set dummy ${ac_tool_prefix}ocamlc.opt; ac_word=$2
4125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4126 $as_echo_n "checking for $ac_word... " >&6; }
4127 if ${ac_cv_prog_OCAMLCDOTOPT+:} false; then :
4128 $as_echo_n "(cached) " >&6
4129 else
4130 if test -n "$OCAMLCDOTOPT"; then
4131 ac_cv_prog_OCAMLCDOTOPT="$OCAMLCDOTOPT" # Let the user override the test.
4132 else
4133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4134 for as_dir in $PATH
4135 do
4136 IFS=$as_save_IFS
4137 test -z "$as_dir" && as_dir=.
4138 for ac_exec_ext in '' $ac_executable_extensions; do
4139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4140 ac_cv_prog_OCAMLCDOTOPT="${ac_tool_prefix}ocamlc.opt"
4141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4142 break 2
4143 fi
4144 done
4145 done
4146 IFS=$as_save_IFS
4147
4148 test -z "$ac_cv_prog_OCAMLCDOTOPT" && ac_cv_prog_OCAMLCDOTOPT="no"
4149 fi
4150 fi
4151 OCAMLCDOTOPT=$ac_cv_prog_OCAMLCDOTOPT
4152 if test -n "$OCAMLCDOTOPT"; then
4153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLCDOTOPT" >&5
4154 $as_echo "$OCAMLCDOTOPT" >&6; }
4155 else
4156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4157 $as_echo "no" >&6; }
4158 fi
4159
4160
4161 if test "$OCAMLCDOTOPT" != "no"; then
4162 TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
4163 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
4164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc; ocamlc.opt discarded." >&5
4165 $as_echo "versions differs from ocamlc; ocamlc.opt discarded." >&6; }
4166 else
4167 OCAMLC=$OCAMLCDOTOPT
4168 fi
4169 fi
4170
4171 # checking for ocamlopt.opt
4172 if test "$OCAMLOPT" != "no" ; then
4173 # Extract the first word of "${ac_tool_prefix}ocamlopt.opt", so it can be a program name with args.
4174 set dummy ${ac_tool_prefix}ocamlopt.opt; ac_word=$2
4175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4176 $as_echo_n "checking for $ac_word... " >&6; }
4177 if ${ac_cv_prog_OCAMLOPTDOTOPT+:} false; then :
4178 $as_echo_n "(cached) " >&6
4179 else
4180 if test -n "$OCAMLOPTDOTOPT"; then
4181 ac_cv_prog_OCAMLOPTDOTOPT="$OCAMLOPTDOTOPT" # Let the user override the test.
4182 else
4183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4184 for as_dir in $PATH
4185 do
4186 IFS=$as_save_IFS
4187 test -z "$as_dir" && as_dir=.
4188 for ac_exec_ext in '' $ac_executable_extensions; do
4189 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4190 ac_cv_prog_OCAMLOPTDOTOPT="${ac_tool_prefix}ocamlopt.opt"
4191 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4192 break 2
4193 fi
4194 done
4195 done
4196 IFS=$as_save_IFS
4197
4198 test -z "$ac_cv_prog_OCAMLOPTDOTOPT" && ac_cv_prog_OCAMLOPTDOTOPT="no"
4199 fi
4200 fi
4201 OCAMLOPTDOTOPT=$ac_cv_prog_OCAMLOPTDOTOPT
4202 if test -n "$OCAMLOPTDOTOPT"; then
4203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPTDOTOPT" >&5
4204 $as_echo "$OCAMLOPTDOTOPT" >&6; }
4205 else
4206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4207 $as_echo "no" >&6; }
4208 fi
4209
4210
4211 if test "$OCAMLOPTDOTOPT" != "no"; then
4212 TMPVERSION=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
4213 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
4214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: version differs from ocamlc; ocamlopt.opt discarded." >&5
4215 $as_echo "version differs from ocamlc; ocamlopt.opt discarded." >&6; }
4216 else
4217 OCAMLOPT=$OCAMLOPTDOTOPT
4218 fi
4219 fi
4220 fi
4221
4222
4223
4224 # checking for ocaml toplevel
4225 # Extract the first word of "${ac_tool_prefix}ocaml", so it can be a program name with args.
4226 set dummy ${ac_tool_prefix}ocaml; ac_word=$2
4227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4228 $as_echo_n "checking for $ac_word... " >&6; }
4229 if ${ac_cv_prog_OCAML+:} false; then :
4230 $as_echo_n "(cached) " >&6
4231 else
4232 if test -n "$OCAML"; then
4233 ac_cv_prog_OCAML="$OCAML" # Let the user override the test.
4234 else
4235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4236 for as_dir in $PATH
4237 do
4238 IFS=$as_save_IFS
4239 test -z "$as_dir" && as_dir=.
4240 for ac_exec_ext in '' $ac_executable_extensions; do
4241 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4242 ac_cv_prog_OCAML="${ac_tool_prefix}ocaml"
4243 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4244 break 2
4245 fi
4246 done
4247 done
4248 IFS=$as_save_IFS
4249
4250 test -z "$ac_cv_prog_OCAML" && ac_cv_prog_OCAML="no"
4251 fi
4252 fi
4253 OCAML=$ac_cv_prog_OCAML
4254 if test -n "$OCAML"; then
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAML" >&5
4256 $as_echo "$OCAML" >&6; }
4257 else
4258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4259 $as_echo "no" >&6; }
4260 fi
4261
4262
4263
4264
4265
4266 # checking for ocamldep
4267 # Extract the first word of "${ac_tool_prefix}ocamldep", so it can be a program name with args.
4268 set dummy ${ac_tool_prefix}ocamldep; ac_word=$2
4269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4270 $as_echo_n "checking for $ac_word... " >&6; }
4271 if ${ac_cv_prog_OCAMLDEP+:} false; then :
4272 $as_echo_n "(cached) " >&6
4273 else
4274 if test -n "$OCAMLDEP"; then
4275 ac_cv_prog_OCAMLDEP="$OCAMLDEP" # Let the user override the test.
4276 else
4277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4278 for as_dir in $PATH
4279 do
4280 IFS=$as_save_IFS
4281 test -z "$as_dir" && as_dir=.
4282 for ac_exec_ext in '' $ac_executable_extensions; do
4283 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4284 ac_cv_prog_OCAMLDEP="${ac_tool_prefix}ocamldep"
4285 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4286 break 2
4287 fi
4288 done
4289 done
4290 IFS=$as_save_IFS
4291
4292 test -z "$ac_cv_prog_OCAMLDEP" && ac_cv_prog_OCAMLDEP="no"
4293 fi
4294 fi
4295 OCAMLDEP=$ac_cv_prog_OCAMLDEP
4296 if test -n "$OCAMLDEP"; then
4297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDEP" >&5
4298 $as_echo "$OCAMLDEP" >&6; }
4299 else
4300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4301 $as_echo "no" >&6; }
4302 fi
4303
4304
4305 if test "$OCAMLDEP" = "no"; then
4306 as_fn_error $? "Cannot find ocamlmklib." "$LINENO" 5
4307 else
4308 # Extract the first word of "${ac_tool_prefix}ocamldep.opt", so it can be a program name with args.
4309 set dummy ${ac_tool_prefix}ocamldep.opt; ac_word=$2
4310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4311 $as_echo_n "checking for $ac_word... " >&6; }
4312 if ${ac_cv_prog_OCAMLDEPOPT+:} false; then :
4313 $as_echo_n "(cached) " >&6
4314 else
4315 if test -n "$OCAMLDEPOPT"; then
4316 ac_cv_prog_OCAMLDEPOPT="$OCAMLDEPOPT" # Let the user override the test.
4317 else
4318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4319 for as_dir in $PATH
4320 do
4321 IFS=$as_save_IFS
4322 test -z "$as_dir" && as_dir=.
4323 for ac_exec_ext in '' $ac_executable_extensions; do
4324 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4325 ac_cv_prog_OCAMLDEPOPT="${ac_tool_prefix}ocamldep.opt"
4326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4327 break 2
4328 fi
4329 done
4330 done
4331 IFS=$as_save_IFS
4332
4333 test -z "$ac_cv_prog_OCAMLDEPOPT" && ac_cv_prog_OCAMLDEPOPT="no"
4334 fi
4335 fi
4336 OCAMLDEPOPT=$ac_cv_prog_OCAMLDEPOPT
4337 if test -n "$OCAMLDEPOPT"; then
4338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDEPOPT" >&5
4339 $as_echo "$OCAMLDEPOPT" >&6; }
4340 else
4341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4342 $as_echo "no" >&6; }
4343 fi
4344
4345
4346 if test "$OCAMLDEPOPT" != "no"; then
4347 OCAMLDEP=$OCAMLDEPOPT
4348 fi
4349 fi
4350
4351
4352
4353 # checking for ocamlmktop
4354 # Extract the first word of "${ac_tool_prefix}ocamlmktop", so it can be a program name with args.
4355 set dummy ${ac_tool_prefix}ocamlmktop; ac_word=$2
4356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4357 $as_echo_n "checking for $ac_word... " >&6; }
4358 if ${ac_cv_prog_OCAMLMKTOP+:} false; then :
4359 $as_echo_n "(cached) " >&6
4360 else
4361 if test -n "$OCAMLMKTOP"; then
4362 ac_cv_prog_OCAMLMKTOP="$OCAMLMKTOP" # Let the user override the test.
4363 else
4364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4365 for as_dir in $PATH
4366 do
4367 IFS=$as_save_IFS
4368 test -z "$as_dir" && as_dir=.
4369 for ac_exec_ext in '' $ac_executable_extensions; do
4370 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4371 ac_cv_prog_OCAMLMKTOP="${ac_tool_prefix}ocamlmktop"
4372 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4373 break 2
4374 fi
4375 done
4376 done
4377 IFS=$as_save_IFS
4378
4379 test -z "$ac_cv_prog_OCAMLMKTOP" && ac_cv_prog_OCAMLMKTOP="no"
4380 fi
4381 fi
4382 OCAMLMKTOP=$ac_cv_prog_OCAMLMKTOP
4383 if test -n "$OCAMLMKTOP"; then
4384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLMKTOP" >&5
4385 $as_echo "$OCAMLMKTOP" >&6; }
4386 else
4387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4388 $as_echo "no" >&6; }
4389 fi
4390
4391
4392
4393
4394
4395 # checking for ocamlmklib
4396 # Extract the first word of "${ac_tool_prefix}ocamlmklib", so it can be a program name with args.
4397 set dummy ${ac_tool_prefix}ocamlmklib; ac_word=$2
4398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4399 $as_echo_n "checking for $ac_word... " >&6; }
4400 if ${ac_cv_prog_OCAMLMKLIB+:} false; then :
4401 $as_echo_n "(cached) " >&6
4402 else
4403 if test -n "$OCAMLMKLIB"; then
4404 ac_cv_prog_OCAMLMKLIB="$OCAMLMKLIB" # Let the user override the test.
4405 else
4406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4407 for as_dir in $PATH
4408 do
4409 IFS=$as_save_IFS
4410 test -z "$as_dir" && as_dir=.
4411 for ac_exec_ext in '' $ac_executable_extensions; do
4412 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4413 ac_cv_prog_OCAMLMKLIB="${ac_tool_prefix}ocamlmklib"
4414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4415 break 2
4416 fi
4417 done
4418 done
4419 IFS=$as_save_IFS
4420
4421 test -z "$ac_cv_prog_OCAMLMKLIB" && ac_cv_prog_OCAMLMKLIB="no"
4422 fi
4423 fi
4424 OCAMLMKLIB=$ac_cv_prog_OCAMLMKLIB
4425 if test -n "$OCAMLMKLIB"; then
4426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLMKLIB" >&5
4427 $as_echo "$OCAMLMKLIB" >&6; }
4428 else
4429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4430 $as_echo "no" >&6; }
4431 fi
4432
4433
4434 if test "$OCAMLMKLIB" = "no"; then
4435 as_fn_error $? "Cannot find ocamlmklib." "$LINENO" 5
4436 fi
4437
4438
4439
4440 # checking for ocamldoc
4441 if test -n "$ac_tool_prefix"; then
4442 # Extract the first word of "${ac_tool_prefix}ocamldoc", so it can be a program name with args.
4443 set dummy ${ac_tool_prefix}ocamldoc; ac_word=$2
4444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4445 $as_echo_n "checking for $ac_word... " >&6; }
4446 if ${ac_cv_prog_OCAMLDOC+:} false; then :
4447 $as_echo_n "(cached) " >&6
4448 else
4449 if test -n "$OCAMLDOC"; then
4450 ac_cv_prog_OCAMLDOC="$OCAMLDOC" # Let the user override the test.
4451 else
4452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4453 for as_dir in $PATH
4454 do
4455 IFS=$as_save_IFS
4456 test -z "$as_dir" && as_dir=.
4457 for ac_exec_ext in '' $ac_executable_extensions; do
4458 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4459 ac_cv_prog_OCAMLDOC="${ac_tool_prefix}ocamldoc"
4460 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4461 break 2
4462 fi
4463 done
4464 done
4465 IFS=$as_save_IFS
4466
4467 fi
4468 fi
4469 OCAMLDOC=$ac_cv_prog_OCAMLDOC
4470 if test -n "$OCAMLDOC"; then
4471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDOC" >&5
4472 $as_echo "$OCAMLDOC" >&6; }
4473 else
4474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4475 $as_echo "no" >&6; }
4476 fi
4477
4478
4479 fi
4480 if test -z "$ac_cv_prog_OCAMLDOC"; then
4481 ac_ct_OCAMLDOC=$OCAMLDOC
4482 # Extract the first word of "ocamldoc", so it can be a program name with args.
4483 set dummy ocamldoc; ac_word=$2
4484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4485 $as_echo_n "checking for $ac_word... " >&6; }
4486 if ${ac_cv_prog_ac_ct_OCAMLDOC+:} false; then :
4487 $as_echo_n "(cached) " >&6
4488 else
4489 if test -n "$ac_ct_OCAMLDOC"; then
4490 ac_cv_prog_ac_ct_OCAMLDOC="$ac_ct_OCAMLDOC" # Let the user override the test.
4491 else
4492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4493 for as_dir in $PATH
4494 do
4495 IFS=$as_save_IFS
4496 test -z "$as_dir" && as_dir=.
4497 for ac_exec_ext in '' $ac_executable_extensions; do
4498 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4499 ac_cv_prog_ac_ct_OCAMLDOC="ocamldoc"
4500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4501 break 2
4502 fi
4503 done
4504 done
4505 IFS=$as_save_IFS
4506
4507 fi
4508 fi
4509 ac_ct_OCAMLDOC=$ac_cv_prog_ac_ct_OCAMLDOC
4510 if test -n "$ac_ct_OCAMLDOC"; then
4511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLDOC" >&5
4512 $as_echo "$ac_ct_OCAMLDOC" >&6; }
4513 else
4514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4515 $as_echo "no" >&6; }
4516 fi
4517
4518 if test "x$ac_ct_OCAMLDOC" = x; then
4519 OCAMLDOC="no"
4520 else
4521 case $cross_compiling:$ac_tool_warned in
4522 yes:)
4523 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4524 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4525 ac_tool_warned=yes ;;
4526 esac
4527 OCAMLDOC=$ac_ct_OCAMLDOC
4528 fi
4529 else
4530 OCAMLDOC="$ac_cv_prog_OCAMLDOC"
4531 fi
4532
4533 if test "$OCAMLDOC" != "no"; then
4534 if test -n "$ac_tool_prefix"; then
4535 # Extract the first word of "${ac_tool_prefix}ocamldoc.opt", so it can be a program name with args.
4536 set dummy ${ac_tool_prefix}ocamldoc.opt; ac_word=$2
4537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4538 $as_echo_n "checking for $ac_word... " >&6; }
4539 if ${ac_cv_prog_OCAMLDOCOPT+:} false; then :
4540 $as_echo_n "(cached) " >&6
4541 else
4542 if test -n "$OCAMLDOCOPT"; then
4543 ac_cv_prog_OCAMLDOCOPT="$OCAMLDOCOPT" # Let the user override the test.
4544 else
4545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4546 for as_dir in $PATH
4547 do
4548 IFS=$as_save_IFS
4549 test -z "$as_dir" && as_dir=.
4550 for ac_exec_ext in '' $ac_executable_extensions; do
4551 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4552 ac_cv_prog_OCAMLDOCOPT="${ac_tool_prefix}ocamldoc.opt"
4553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4554 break 2
4555 fi
4556 done
4557 done
4558 IFS=$as_save_IFS
4559
4560 fi
4561 fi
4562 OCAMLDOCOPT=$ac_cv_prog_OCAMLDOCOPT
4563 if test -n "$OCAMLDOCOPT"; then
4564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDOCOPT" >&5
4565 $as_echo "$OCAMLDOCOPT" >&6; }
4566 else
4567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4568 $as_echo "no" >&6; }
4569 fi
4570
4571
4572 fi
4573 if test -z "$ac_cv_prog_OCAMLDOCOPT"; then
4574 ac_ct_OCAMLDOCOPT=$OCAMLDOCOPT
4575 # Extract the first word of "ocamldoc.opt", so it can be a program name with args.
4576 set dummy ocamldoc.opt; ac_word=$2
4577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4578 $as_echo_n "checking for $ac_word... " >&6; }
4579 if ${ac_cv_prog_ac_ct_OCAMLDOCOPT+:} false; then :
4580 $as_echo_n "(cached) " >&6
4581 else
4582 if test -n "$ac_ct_OCAMLDOCOPT"; then
4583 ac_cv_prog_ac_ct_OCAMLDOCOPT="$ac_ct_OCAMLDOCOPT" # Let the user override the test.
4584 else
4585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4586 for as_dir in $PATH
4587 do
4588 IFS=$as_save_IFS
4589 test -z "$as_dir" && as_dir=.
4590 for ac_exec_ext in '' $ac_executable_extensions; do
4591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4592 ac_cv_prog_ac_ct_OCAMLDOCOPT="ocamldoc.opt"
4593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4594 break 2
4595 fi
4596 done
4597 done
4598 IFS=$as_save_IFS
4599
4600 fi
4601 fi
4602 ac_ct_OCAMLDOCOPT=$ac_cv_prog_ac_ct_OCAMLDOCOPT
4603 if test -n "$ac_ct_OCAMLDOCOPT"; then
4604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLDOCOPT" >&5
4605 $as_echo "$ac_ct_OCAMLDOCOPT" >&6; }
4606 else
4607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4608 $as_echo "no" >&6; }
4609 fi
4610
4611 if test "x$ac_ct_OCAMLDOCOPT" = x; then
4612 OCAMLDOCOPT="no"
4613 else
4614 case $cross_compiling:$ac_tool_warned in
4615 yes:)
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4617 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4618 ac_tool_warned=yes ;;
4619 esac
4620 OCAMLDOCOPT=$ac_ct_OCAMLDOCOPT
4621 fi
4622 else
4623 OCAMLDOCOPT="$ac_cv_prog_OCAMLDOCOPT"
4624 fi
4625
4626 if test "$OCAMLDOCOPT" != "no"; then
4627 OCAMLDOC=$OCAMLDOCOPT
4628 fi
4629 fi
4630
4631
4632
4633 # checking for ocamlbuild
4634 if test -n "$ac_tool_prefix"; then
4635 # Extract the first word of "${ac_tool_prefix}ocamlbuild", so it can be a program name with args.
4636 set dummy ${ac_tool_prefix}ocamlbuild; ac_word=$2
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4638 $as_echo_n "checking for $ac_word... " >&6; }
4639 if ${ac_cv_prog_OCAMLBUILD+:} false; then :
4640 $as_echo_n "(cached) " >&6
4641 else
4642 if test -n "$OCAMLBUILD"; then
4643 ac_cv_prog_OCAMLBUILD="$OCAMLBUILD" # Let the user override the test.
4644 else
4645 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4646 for as_dir in $PATH
4647 do
4648 IFS=$as_save_IFS
4649 test -z "$as_dir" && as_dir=.
4650 for ac_exec_ext in '' $ac_executable_extensions; do
4651 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4652 ac_cv_prog_OCAMLBUILD="${ac_tool_prefix}ocamlbuild"
4653 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4654 break 2
4655 fi
4656 done
4657 done
4658 IFS=$as_save_IFS
4659
4660 fi
4661 fi
4662 OCAMLBUILD=$ac_cv_prog_OCAMLBUILD
4663 if test -n "$OCAMLBUILD"; then
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLBUILD" >&5
4665 $as_echo "$OCAMLBUILD" >&6; }
4666 else
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4668 $as_echo "no" >&6; }
4669 fi
4670
4671
4672 fi
4673 if test -z "$ac_cv_prog_OCAMLBUILD"; then
4674 ac_ct_OCAMLBUILD=$OCAMLBUILD
4675 # Extract the first word of "ocamlbuild", so it can be a program name with args.
4676 set dummy ocamlbuild; ac_word=$2
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4678 $as_echo_n "checking for $ac_word... " >&6; }
4679 if ${ac_cv_prog_ac_ct_OCAMLBUILD+:} false; then :
4680 $as_echo_n "(cached) " >&6
4681 else
4682 if test -n "$ac_ct_OCAMLBUILD"; then
4683 ac_cv_prog_ac_ct_OCAMLBUILD="$ac_ct_OCAMLBUILD" # Let the user override the test.
4684 else
4685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4686 for as_dir in $PATH
4687 do
4688 IFS=$as_save_IFS
4689 test -z "$as_dir" && as_dir=.
4690 for ac_exec_ext in '' $ac_executable_extensions; do
4691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4692 ac_cv_prog_ac_ct_OCAMLBUILD="ocamlbuild"
4693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4694 break 2
4695 fi
4696 done
4697 done
4698 IFS=$as_save_IFS
4699
4700 fi
4701 fi
4702 ac_ct_OCAMLBUILD=$ac_cv_prog_ac_ct_OCAMLBUILD
4703 if test -n "$ac_ct_OCAMLBUILD"; then
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLBUILD" >&5
4705 $as_echo "$ac_ct_OCAMLBUILD" >&6; }
4706 else
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708 $as_echo "no" >&6; }
4709 fi
4710
4711 if test "x$ac_ct_OCAMLBUILD" = x; then
4712 OCAMLBUILD="no"
4713 else
4714 case $cross_compiling:$ac_tool_warned in
4715 yes:)
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4717 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4718 ac_tool_warned=yes ;;
4719 esac
4720 OCAMLBUILD=$ac_ct_OCAMLBUILD
4721 fi
4722 else
4723 OCAMLBUILD="$ac_cv_prog_OCAMLBUILD"
4724 fi
4725
4726
4727
4728
4729
4730 if test -n "$ac_tool_prefix"; then
4731 # Extract the first word of "${ac_tool_prefix}camlidl", so it can be a program name with args.
4732 set dummy ${ac_tool_prefix}camlidl; ac_word=$2
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4734 $as_echo_n "checking for $ac_word... " >&6; }
4735 if ${ac_cv_prog_CAMLIDL+:} false; then :
4736 $as_echo_n "(cached) " >&6
4737 else
4738 if test -n "$CAMLIDL"; then
4739 ac_cv_prog_CAMLIDL="$CAMLIDL" # Let the user override the test.
4740 else
4741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4742 for as_dir in $PATH
4743 do
4744 IFS=$as_save_IFS
4745 test -z "$as_dir" && as_dir=.
4746 for ac_exec_ext in '' $ac_executable_extensions; do
4747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4748 ac_cv_prog_CAMLIDL="${ac_tool_prefix}camlidl"
4749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4750 break 2
4751 fi
4752 done
4753 done
4754 IFS=$as_save_IFS
4755
4756 fi
4757 fi
4758 CAMLIDL=$ac_cv_prog_CAMLIDL
4759 if test -n "$CAMLIDL"; then
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLIDL" >&5
4761 $as_echo "$CAMLIDL" >&6; }
4762 else
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4764 $as_echo "no" >&6; }
4765 fi
4766
4767
4768 fi
4769 if test -z "$ac_cv_prog_CAMLIDL"; then
4770 ac_ct_CAMLIDL=$CAMLIDL
4771 # Extract the first word of "camlidl", so it can be a program name with args.
4772 set dummy camlidl; ac_word=$2
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4774 $as_echo_n "checking for $ac_word... " >&6; }
4775 if ${ac_cv_prog_ac_ct_CAMLIDL+:} false; then :
4776 $as_echo_n "(cached) " >&6
4777 else
4778 if test -n "$ac_ct_CAMLIDL"; then
4779 ac_cv_prog_ac_ct_CAMLIDL="$ac_ct_CAMLIDL" # Let the user override the test.
4780 else
4781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4782 for as_dir in $PATH
4783 do
4784 IFS=$as_save_IFS
4785 test -z "$as_dir" && as_dir=.
4786 for ac_exec_ext in '' $ac_executable_extensions; do
4787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4788 ac_cv_prog_ac_ct_CAMLIDL="camlidl"
4789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4790 break 2
4791 fi
4792 done
4793 done
4794 IFS=$as_save_IFS
4795
4796 fi
4797 fi
4798 ac_ct_CAMLIDL=$ac_cv_prog_ac_ct_CAMLIDL
4799 if test -n "$ac_ct_CAMLIDL"; then
4800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CAMLIDL" >&5
4801 $as_echo "$ac_ct_CAMLIDL" >&6; }
4802 else
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4804 $as_echo "no" >&6; }
4805 fi
4806
4807 if test "x$ac_ct_CAMLIDL" = x; then
4808 CAMLIDL="no"
4809 else
4810 case $cross_compiling:$ac_tool_warned in
4811 yes:)
4812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4813 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4814 ac_tool_warned=yes ;;
4815 esac
4816 CAMLIDL=$ac_ct_CAMLIDL
4817 fi
4818 else
4819 CAMLIDL="$ac_cv_prog_CAMLIDL"
4820 fi
4821
4822
4823
4824
4825 # checking for ocamllex
4826 if test -n "$ac_tool_prefix"; then
4827 # Extract the first word of "${ac_tool_prefix}ocamllex", so it can be a program name with args.
4828 set dummy ${ac_tool_prefix}ocamllex; ac_word=$2
4829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4830 $as_echo_n "checking for $ac_word... " >&6; }
4831 if ${ac_cv_prog_OCAMLLEX+:} false; then :
4832 $as_echo_n "(cached) " >&6
4833 else
4834 if test -n "$OCAMLLEX"; then
4835 ac_cv_prog_OCAMLLEX="$OCAMLLEX" # Let the user override the test.
4836 else
4837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838 for as_dir in $PATH
4839 do
4840 IFS=$as_save_IFS
4841 test -z "$as_dir" && as_dir=.
4842 for ac_exec_ext in '' $ac_executable_extensions; do
4843 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4844 ac_cv_prog_OCAMLLEX="${ac_tool_prefix}ocamllex"
4845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4846 break 2
4847 fi
4848 done
4849 done
4850 IFS=$as_save_IFS
4851
4852 fi
4853 fi
4854 OCAMLLEX=$ac_cv_prog_OCAMLLEX
4855 if test -n "$OCAMLLEX"; then
4856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLLEX" >&5
4857 $as_echo "$OCAMLLEX" >&6; }
4858 else
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4860 $as_echo "no" >&6; }
4861 fi
4862
4863
4864 fi
4865 if test -z "$ac_cv_prog_OCAMLLEX"; then
4866 ac_ct_OCAMLLEX=$OCAMLLEX
4867 # Extract the first word of "ocamllex", so it can be a program name with args.
4868 set dummy ocamllex; ac_word=$2
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4870 $as_echo_n "checking for $ac_word... " >&6; }
4871 if ${ac_cv_prog_ac_ct_OCAMLLEX+:} false; then :
4872 $as_echo_n "(cached) " >&6
4873 else
4874 if test -n "$ac_ct_OCAMLLEX"; then
4875 ac_cv_prog_ac_ct_OCAMLLEX="$ac_ct_OCAMLLEX" # Let the user override the test.
4876 else
4877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4878 for as_dir in $PATH
4879 do
4880 IFS=$as_save_IFS
4881 test -z "$as_dir" && as_dir=.
4882 for ac_exec_ext in '' $ac_executable_extensions; do
4883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4884 ac_cv_prog_ac_ct_OCAMLLEX="ocamllex"
4885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4886 break 2
4887 fi
4888 done
4889 done
4890 IFS=$as_save_IFS
4891
4892 fi
4893 fi
4894 ac_ct_OCAMLLEX=$ac_cv_prog_ac_ct_OCAMLLEX
4895 if test -n "$ac_ct_OCAMLLEX"; then
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLLEX" >&5
4897 $as_echo "$ac_ct_OCAMLLEX" >&6; }
4898 else
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4900 $as_echo "no" >&6; }
4901 fi
4902
4903 if test "x$ac_ct_OCAMLLEX" = x; then
4904 OCAMLLEX="no"
4905 else
4906 case $cross_compiling:$ac_tool_warned in
4907 yes:)
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4909 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4910 ac_tool_warned=yes ;;
4911 esac
4912 OCAMLLEX=$ac_ct_OCAMLLEX
4913 fi
4914 else
4915 OCAMLLEX="$ac_cv_prog_OCAMLLEX"
4916 fi
4917
4918 if test "$OCAMLLEX" != "no"; then
4919 if test -n "$ac_tool_prefix"; then
4920 # Extract the first word of "${ac_tool_prefix}ocamllex.opt", so it can be a program name with args.
4921 set dummy ${ac_tool_prefix}ocamllex.opt; ac_word=$2
4922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4923 $as_echo_n "checking for $ac_word... " >&6; }
4924 if ${ac_cv_prog_OCAMLLEXDOTOPT+:} false; then :
4925 $as_echo_n "(cached) " >&6
4926 else
4927 if test -n "$OCAMLLEXDOTOPT"; then
4928 ac_cv_prog_OCAMLLEXDOTOPT="$OCAMLLEXDOTOPT" # Let the user override the test.
4929 else
4930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4931 for as_dir in $PATH
4932 do
4933 IFS=$as_save_IFS
4934 test -z "$as_dir" && as_dir=.
4935 for ac_exec_ext in '' $ac_executable_extensions; do
4936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4937 ac_cv_prog_OCAMLLEXDOTOPT="${ac_tool_prefix}ocamllex.opt"
4938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4939 break 2
4940 fi
4941 done
4942 done
4943 IFS=$as_save_IFS
4944
4945 fi
4946 fi
4947 OCAMLLEXDOTOPT=$ac_cv_prog_OCAMLLEXDOTOPT
4948 if test -n "$OCAMLLEXDOTOPT"; then
4949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLLEXDOTOPT" >&5
4950 $as_echo "$OCAMLLEXDOTOPT" >&6; }
4951 else
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953 $as_echo "no" >&6; }
4954 fi
4955
4956
4957 fi
4958 if test -z "$ac_cv_prog_OCAMLLEXDOTOPT"; then
4959 ac_ct_OCAMLLEXDOTOPT=$OCAMLLEXDOTOPT
4960 # Extract the first word of "ocamllex.opt", so it can be a program name with args.
4961 set dummy ocamllex.opt; ac_word=$2
4962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4963 $as_echo_n "checking for $ac_word... " >&6; }
4964 if ${ac_cv_prog_ac_ct_OCAMLLEXDOTOPT+:} false; then :
4965 $as_echo_n "(cached) " >&6
4966 else
4967 if test -n "$ac_ct_OCAMLLEXDOTOPT"; then
4968 ac_cv_prog_ac_ct_OCAMLLEXDOTOPT="$ac_ct_OCAMLLEXDOTOPT" # Let the user override the test.
4969 else
4970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4971 for as_dir in $PATH
4972 do
4973 IFS=$as_save_IFS
4974 test -z "$as_dir" && as_dir=.
4975 for ac_exec_ext in '' $ac_executable_extensions; do
4976 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4977 ac_cv_prog_ac_ct_OCAMLLEXDOTOPT="ocamllex.opt"
4978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4979 break 2
4980 fi
4981 done
4982 done
4983 IFS=$as_save_IFS
4984
4985 fi
4986 fi
4987 ac_ct_OCAMLLEXDOTOPT=$ac_cv_prog_ac_ct_OCAMLLEXDOTOPT
4988 if test -n "$ac_ct_OCAMLLEXDOTOPT"; then
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLLEXDOTOPT" >&5
4990 $as_echo "$ac_ct_OCAMLLEXDOTOPT" >&6; }
4991 else
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4993 $as_echo "no" >&6; }
4994 fi
4995
4996 if test "x$ac_ct_OCAMLLEXDOTOPT" = x; then
4997 OCAMLLEXDOTOPT="no"
4998 else
4999 case $cross_compiling:$ac_tool_warned in
5000 yes:)
5001 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5002 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5003 ac_tool_warned=yes ;;
5004 esac
5005 OCAMLLEXDOTOPT=$ac_ct_OCAMLLEXDOTOPT
5006 fi
5007 else
5008 OCAMLLEXDOTOPT="$ac_cv_prog_OCAMLLEXDOTOPT"
5009 fi
5010
5011 if test "$OCAMLLEXDOTOPT" != "no"; then
5012 OCAMLLEX=$OCAMLLEXDOTOPT
5013 fi
5014 fi
5015
5016
5017
5018 if test -n "$ac_tool_prefix"; then
5019 # Extract the first word of "${ac_tool_prefix}ocamlyacc", so it can be a program name with args.
5020 set dummy ${ac_tool_prefix}ocamlyacc; ac_word=$2
5021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5022 $as_echo_n "checking for $ac_word... " >&6; }
5023 if ${ac_cv_prog_OCAMLYACC+:} false; then :
5024 $as_echo_n "(cached) " >&6
5025 else
5026 if test -n "$OCAMLYACC"; then
5027 ac_cv_prog_OCAMLYACC="$OCAMLYACC" # Let the user override the test.
5028 else
5029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5030 for as_dir in $PATH
5031 do
5032 IFS=$as_save_IFS
5033 test -z "$as_dir" && as_dir=.
5034 for ac_exec_ext in '' $ac_executable_extensions; do
5035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5036 ac_cv_prog_OCAMLYACC="${ac_tool_prefix}ocamlyacc"
5037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5038 break 2
5039 fi
5040 done
5041 done
5042 IFS=$as_save_IFS
5043
5044 fi
5045 fi
5046 OCAMLYACC=$ac_cv_prog_OCAMLYACC
5047 if test -n "$OCAMLYACC"; then
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLYACC" >&5
5049 $as_echo "$OCAMLYACC" >&6; }
5050 else
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5052 $as_echo "no" >&6; }
5053 fi
5054
5055
5056 fi
5057 if test -z "$ac_cv_prog_OCAMLYACC"; then
5058 ac_ct_OCAMLYACC=$OCAMLYACC
5059 # Extract the first word of "ocamlyacc", so it can be a program name with args.
5060 set dummy ocamlyacc; ac_word=$2
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062 $as_echo_n "checking for $ac_word... " >&6; }
5063 if ${ac_cv_prog_ac_ct_OCAMLYACC+:} false; then :
5064 $as_echo_n "(cached) " >&6
5065 else
5066 if test -n "$ac_ct_OCAMLYACC"; then
5067 ac_cv_prog_ac_ct_OCAMLYACC="$ac_ct_OCAMLYACC" # Let the user override the test.
5068 else
5069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5070 for as_dir in $PATH
5071 do
5072 IFS=$as_save_IFS
5073 test -z "$as_dir" && as_dir=.
5074 for ac_exec_ext in '' $ac_executable_extensions; do
5075 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5076 ac_cv_prog_ac_ct_OCAMLYACC="ocamlyacc"
5077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5078 break 2
5079 fi
5080 done
5081 done
5082 IFS=$as_save_IFS
5083
5084 fi
5085 fi
5086 ac_ct_OCAMLYACC=$ac_cv_prog_ac_ct_OCAMLYACC
5087 if test -n "$ac_ct_OCAMLYACC"; then
5088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLYACC" >&5
5089 $as_echo "$ac_ct_OCAMLYACC" >&6; }
5090 else
5091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5092 $as_echo "no" >&6; }
5093 fi
5094
5095 if test "x$ac_ct_OCAMLYACC" = x; then
5096 OCAMLYACC="no"
5097 else
5098 case $cross_compiling:$ac_tool_warned in
5099 yes:)
5100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5101 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5102 ac_tool_warned=yes ;;
5103 esac
5104 OCAMLYACC=$ac_ct_OCAMLYACC
5105 fi
5106 else
5107 OCAMLYACC="$ac_cv_prog_OCAMLYACC"
5108 fi
5109
5110
5111
5112
5113
5114
5115 # Check whether --enable-camlp4 was given.
5116 if test "${enable_camlp4+set}" = set; then :
5117 enableval=$enable_camlp4;
5118 fi
5119
5120
5121 # checking for camlp4
5122 if test "x$enable_camlp4" != "xno"; then
5123 # Extract the first word of "${ac_tool_prefix}camlp4", so it can be a program name with args.
5124 set dummy ${ac_tool_prefix}camlp4; ac_word=$2
5125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126 $as_echo_n "checking for $ac_word... " >&6; }
5127 if ${ac_cv_prog_CAMLP4+:} false; then :
5128 $as_echo_n "(cached) " >&6
5129 else
5130 if test -n "$CAMLP4"; then
5131 ac_cv_prog_CAMLP4="$CAMLP4" # Let the user override the test.
5132 else
5133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134 for as_dir in $PATH
5135 do
5136 IFS=$as_save_IFS
5137 test -z "$as_dir" && as_dir=.
5138 for ac_exec_ext in '' $ac_executable_extensions; do
5139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5140 ac_cv_prog_CAMLP4="${ac_tool_prefix}camlp4"
5141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142 break 2
5143 fi
5144 done
5145 done
5146 IFS=$as_save_IFS
5147
5148 test -z "$ac_cv_prog_CAMLP4" && ac_cv_prog_CAMLP4="no"
5149 fi
5150 fi
5151 CAMLP4=$ac_cv_prog_CAMLP4
5152 if test -n "$CAMLP4"; then
5153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4" >&5
5154 $as_echo "$CAMLP4" >&6; }
5155 else
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157 $as_echo "no" >&6; }
5158 fi
5159
5160
5161 if test "$CAMLP4" != "no"; then
5162 TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p' | tr -d '\r'`
5163 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
5164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: versions differs from ocamlc" >&5
5165 $as_echo "versions differs from ocamlc" >&6; }
5166 CAMLP4=no
5167 fi
5168 fi
5169
5170
5171 # checking for companion tools
5172 # Extract the first word of "${ac_tool_prefix}camlp4boot", so it can be a program name with args.
5173 set dummy ${ac_tool_prefix}camlp4boot; ac_word=$2
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5175 $as_echo_n "checking for $ac_word... " >&6; }
5176 if ${ac_cv_prog_CAMLP4BOOT+:} false; then :
5177 $as_echo_n "(cached) " >&6
5178 else
5179 if test -n "$CAMLP4BOOT"; then
5180 ac_cv_prog_CAMLP4BOOT="$CAMLP4BOOT" # Let the user override the test.
5181 else
5182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5183 for as_dir in $PATH
5184 do
5185 IFS=$as_save_IFS
5186 test -z "$as_dir" && as_dir=.
5187 for ac_exec_ext in '' $ac_executable_extensions; do
5188 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5189 ac_cv_prog_CAMLP4BOOT="${ac_tool_prefix}camlp4boot"
5190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5191 break 2
5192 fi
5193 done
5194 done
5195 IFS=$as_save_IFS
5196
5197 test -z "$ac_cv_prog_CAMLP4BOOT" && ac_cv_prog_CAMLP4BOOT="no"
5198 fi
5199 fi
5200 CAMLP4BOOT=$ac_cv_prog_CAMLP4BOOT
5201 if test -n "$CAMLP4BOOT"; then
5202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4BOOT" >&5
5203 $as_echo "$CAMLP4BOOT" >&6; }
5204 else
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5206 $as_echo "no" >&6; }
5207 fi
5208
5209
5210 # Extract the first word of "${ac_tool_prefix}camlp4o", so it can be a program name with args.
5211 set dummy ${ac_tool_prefix}camlp4o; ac_word=$2
5212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5213 $as_echo_n "checking for $ac_word... " >&6; }
5214 if ${ac_cv_prog_CAMLP4O+:} false; then :
5215 $as_echo_n "(cached) " >&6
5216 else
5217 if test -n "$CAMLP4O"; then
5218 ac_cv_prog_CAMLP4O="$CAMLP4O" # Let the user override the test.
5219 else
5220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5221 for as_dir in $PATH
5222 do
5223 IFS=$as_save_IFS
5224 test -z "$as_dir" && as_dir=.
5225 for ac_exec_ext in '' $ac_executable_extensions; do
5226 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5227 ac_cv_prog_CAMLP4O="${ac_tool_prefix}camlp4o"
5228 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5229 break 2
5230 fi
5231 done
5232 done
5233 IFS=$as_save_IFS
5234
5235 test -z "$ac_cv_prog_CAMLP4O" && ac_cv_prog_CAMLP4O="no"
5236 fi
5237 fi
5238 CAMLP4O=$ac_cv_prog_CAMLP4O
5239 if test -n "$CAMLP4O"; then
5240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4O" >&5
5241 $as_echo "$CAMLP4O" >&6; }
5242 else
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5244 $as_echo "no" >&6; }
5245 fi
5246
5247
5248 # Extract the first word of "${ac_tool_prefix}camlp4of", so it can be a program name with args.
5249 set dummy ${ac_tool_prefix}camlp4of; ac_word=$2
5250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5251 $as_echo_n "checking for $ac_word... " >&6; }
5252 if ${ac_cv_prog_CAMLP4OF+:} false; then :
5253 $as_echo_n "(cached) " >&6
5254 else
5255 if test -n "$CAMLP4OF"; then
5256 ac_cv_prog_CAMLP4OF="$CAMLP4OF" # Let the user override the test.
5257 else
5258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5259 for as_dir in $PATH
5260 do
5261 IFS=$as_save_IFS
5262 test -z "$as_dir" && as_dir=.
5263 for ac_exec_ext in '' $ac_executable_extensions; do
5264 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5265 ac_cv_prog_CAMLP4OF="${ac_tool_prefix}camlp4of"
5266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5267 break 2
5268 fi
5269 done
5270 done
5271 IFS=$as_save_IFS
5272
5273 test -z "$ac_cv_prog_CAMLP4OF" && ac_cv_prog_CAMLP4OF="no"
5274 fi
5275 fi
5276 CAMLP4OF=$ac_cv_prog_CAMLP4OF
5277 if test -n "$CAMLP4OF"; then
5278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4OF" >&5
5279 $as_echo "$CAMLP4OF" >&6; }
5280 else
5281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5282 $as_echo "no" >&6; }
5283 fi
5284
5285
5286 # Extract the first word of "${ac_tool_prefix}camlp4oof", so it can be a program name with args.
5287 set dummy ${ac_tool_prefix}camlp4oof; ac_word=$2
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5289 $as_echo_n "checking for $ac_word... " >&6; }
5290 if ${ac_cv_prog_CAMLP4OOF+:} false; then :
5291 $as_echo_n "(cached) " >&6
5292 else
5293 if test -n "$CAMLP4OOF"; then
5294 ac_cv_prog_CAMLP4OOF="$CAMLP4OOF" # Let the user override the test.
5295 else
5296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5297 for as_dir in $PATH
5298 do
5299 IFS=$as_save_IFS
5300 test -z "$as_dir" && as_dir=.
5301 for ac_exec_ext in '' $ac_executable_extensions; do
5302 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5303 ac_cv_prog_CAMLP4OOF="${ac_tool_prefix}camlp4oof"
5304 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5305 break 2
5306 fi
5307 done
5308 done
5309 IFS=$as_save_IFS
5310
5311 test -z "$ac_cv_prog_CAMLP4OOF" && ac_cv_prog_CAMLP4OOF="no"
5312 fi
5313 fi
5314 CAMLP4OOF=$ac_cv_prog_CAMLP4OOF
5315 if test -n "$CAMLP4OOF"; then
5316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4OOF" >&5
5317 $as_echo "$CAMLP4OOF" >&6; }
5318 else
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5320 $as_echo "no" >&6; }
5321 fi
5322
5323
5324 # Extract the first word of "${ac_tool_prefix}camlp4orf", so it can be a program name with args.
5325 set dummy ${ac_tool_prefix}camlp4orf; ac_word=$2
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5327 $as_echo_n "checking for $ac_word... " >&6; }
5328 if ${ac_cv_prog_CAMLP4ORF+:} false; then :
5329 $as_echo_n "(cached) " >&6
5330 else
5331 if test -n "$CAMLP4ORF"; then
5332 ac_cv_prog_CAMLP4ORF="$CAMLP4ORF" # Let the user override the test.
5333 else
5334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5335 for as_dir in $PATH
5336 do
5337 IFS=$as_save_IFS
5338 test -z "$as_dir" && as_dir=.
5339 for ac_exec_ext in '' $ac_executable_extensions; do
5340 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5341 ac_cv_prog_CAMLP4ORF="${ac_tool_prefix}camlp4orf"
5342 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5343 break 2
5344 fi
5345 done
5346 done
5347 IFS=$as_save_IFS
5348
5349 test -z "$ac_cv_prog_CAMLP4ORF" && ac_cv_prog_CAMLP4ORF="no"
5350 fi
5351 fi
5352 CAMLP4ORF=$ac_cv_prog_CAMLP4ORF
5353 if test -n "$CAMLP4ORF"; then
5354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4ORF" >&5
5355 $as_echo "$CAMLP4ORF" >&6; }
5356 else
5357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5358 $as_echo "no" >&6; }
5359 fi
5360
5361
5362 # Extract the first word of "${ac_tool_prefix}camlp4prof", so it can be a program name with args.
5363 set dummy ${ac_tool_prefix}camlp4prof; ac_word=$2
5364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5365 $as_echo_n "checking for $ac_word... " >&6; }
5366 if ${ac_cv_prog_CAMLP4PROF+:} false; then :
5367 $as_echo_n "(cached) " >&6
5368 else
5369 if test -n "$CAMLP4PROF"; then
5370 ac_cv_prog_CAMLP4PROF="$CAMLP4PROF" # Let the user override the test.
5371 else
5372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5373 for as_dir in $PATH
5374 do
5375 IFS=$as_save_IFS
5376 test -z "$as_dir" && as_dir=.
5377 for ac_exec_ext in '' $ac_executable_extensions; do
5378 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5379 ac_cv_prog_CAMLP4PROF="${ac_tool_prefix}camlp4prof"
5380 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5381 break 2
5382 fi
5383 done
5384 done
5385 IFS=$as_save_IFS
5386
5387 test -z "$ac_cv_prog_CAMLP4PROF" && ac_cv_prog_CAMLP4PROF="no"
5388 fi
5389 fi
5390 CAMLP4PROF=$ac_cv_prog_CAMLP4PROF
5391 if test -n "$CAMLP4PROF"; then
5392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4PROF" >&5
5393 $as_echo "$CAMLP4PROF" >&6; }
5394 else
5395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5396 $as_echo "no" >&6; }
5397 fi
5398
5399
5400 # Extract the first word of "${ac_tool_prefix}camlp4r", so it can be a program name with args.
5401 set dummy ${ac_tool_prefix}camlp4r; ac_word=$2
5402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5403 $as_echo_n "checking for $ac_word... " >&6; }
5404 if ${ac_cv_prog_CAMLP4R+:} false; then :
5405 $as_echo_n "(cached) " >&6
5406 else
5407 if test -n "$CAMLP4R"; then
5408 ac_cv_prog_CAMLP4R="$CAMLP4R" # Let the user override the test.
5409 else
5410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5411 for as_dir in $PATH
5412 do
5413 IFS=$as_save_IFS
5414 test -z "$as_dir" && as_dir=.
5415 for ac_exec_ext in '' $ac_executable_extensions; do
5416 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5417 ac_cv_prog_CAMLP4R="${ac_tool_prefix}camlp4r"
5418 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5419 break 2
5420 fi
5421 done
5422 done
5423 IFS=$as_save_IFS
5424
5425 test -z "$ac_cv_prog_CAMLP4R" && ac_cv_prog_CAMLP4R="no"
5426 fi
5427 fi
5428 CAMLP4R=$ac_cv_prog_CAMLP4R
5429 if test -n "$CAMLP4R"; then
5430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4R" >&5
5431 $as_echo "$CAMLP4R" >&6; }
5432 else
5433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5434 $as_echo "no" >&6; }
5435 fi
5436
5437
5438 # Extract the first word of "${ac_tool_prefix}camlp4rf", so it can be a program name with args.
5439 set dummy ${ac_tool_prefix}camlp4rf; ac_word=$2
5440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5441 $as_echo_n "checking for $ac_word... " >&6; }
5442 if ${ac_cv_prog_CAMLP4RF+:} false; then :
5443 $as_echo_n "(cached) " >&6
5444 else
5445 if test -n "$CAMLP4RF"; then
5446 ac_cv_prog_CAMLP4RF="$CAMLP4RF" # Let the user override the test.
5447 else
5448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5449 for as_dir in $PATH
5450 do
5451 IFS=$as_save_IFS
5452 test -z "$as_dir" && as_dir=.
5453 for ac_exec_ext in '' $ac_executable_extensions; do
5454 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5455 ac_cv_prog_CAMLP4RF="${ac_tool_prefix}camlp4rf"
5456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5457 break 2
5458 fi
5459 done
5460 done
5461 IFS=$as_save_IFS
5462
5463 test -z "$ac_cv_prog_CAMLP4RF" && ac_cv_prog_CAMLP4RF="no"
5464 fi
5465 fi
5466 CAMLP4RF=$ac_cv_prog_CAMLP4RF
5467 if test -n "$CAMLP4RF"; then
5468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4RF" >&5
5469 $as_echo "$CAMLP4RF" >&6; }
5470 else
5471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5472 $as_echo "no" >&6; }
5473 fi
5474
5475
5476 else
5477 CAMLP4=no
5478 CAMLP4BOOT=no
5479 CAMLP4O=no
5480 CAMLP4OF=no
5481 CAMLP4OOF=no
5482 CAMLP4ORF=no
5483 CAMLP4PROF=no
5484 CAMLP4R=no
5485 CAMLP4RF=no
5486 fi
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499 # checking for ocamlfind
5500 if test -n "$ac_tool_prefix"; then
5501 # Extract the first word of "${ac_tool_prefix}ocamlfind", so it can be a program name with args.
5502 set dummy ${ac_tool_prefix}ocamlfind; ac_word=$2
5503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5504 $as_echo_n "checking for $ac_word... " >&6; }
5505 if ${ac_cv_prog_OCAMLFIND+:} false; then :
5506 $as_echo_n "(cached) " >&6
5507 else
5508 if test -n "$OCAMLFIND"; then
5509 ac_cv_prog_OCAMLFIND="$OCAMLFIND" # Let the user override the test.
5510 else
5511 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5512 for as_dir in $PATH
5513 do
5514 IFS=$as_save_IFS
5515 test -z "$as_dir" && as_dir=.
5516 for ac_exec_ext in '' $ac_executable_extensions; do
5517 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5518 ac_cv_prog_OCAMLFIND="${ac_tool_prefix}ocamlfind"
5519 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5520 break 2
5521 fi
5522 done
5523 done
5524 IFS=$as_save_IFS
5525
5526 fi
5527 fi
5528 OCAMLFIND=$ac_cv_prog_OCAMLFIND
5529 if test -n "$OCAMLFIND"; then
5530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLFIND" >&5
5531 $as_echo "$OCAMLFIND" >&6; }
5532 else
5533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5534 $as_echo "no" >&6; }
5535 fi
5536
5537
5538 fi
5539 if test -z "$ac_cv_prog_OCAMLFIND"; then
5540 ac_ct_OCAMLFIND=$OCAMLFIND
5541 # Extract the first word of "ocamlfind", so it can be a program name with args.
5542 set dummy ocamlfind; ac_word=$2
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5544 $as_echo_n "checking for $ac_word... " >&6; }
5545 if ${ac_cv_prog_ac_ct_OCAMLFIND+:} false; then :
5546 $as_echo_n "(cached) " >&6
5547 else
5548 if test -n "$ac_ct_OCAMLFIND"; then
5549 ac_cv_prog_ac_ct_OCAMLFIND="$ac_ct_OCAMLFIND" # Let the user override the test.
5550 else
5551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5552 for as_dir in $PATH
5553 do
5554 IFS=$as_save_IFS
5555 test -z "$as_dir" && as_dir=.
5556 for ac_exec_ext in '' $ac_executable_extensions; do
5557 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5558 ac_cv_prog_ac_ct_OCAMLFIND="ocamlfind"
5559 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5560 break 2
5561 fi
5562 done
5563 done
5564 IFS=$as_save_IFS
5565
5566 fi
5567 fi
5568 ac_ct_OCAMLFIND=$ac_cv_prog_ac_ct_OCAMLFIND
5569 if test -n "$ac_ct_OCAMLFIND"; then
5570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLFIND" >&5
5571 $as_echo "$ac_ct_OCAMLFIND" >&6; }
5572 else
5573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574 $as_echo "no" >&6; }
5575 fi
5576
5577 if test "x$ac_ct_OCAMLFIND" = x; then
5578 OCAMLFIND="no"
5579 else
5580 case $cross_compiling:$ac_tool_warned in
5581 yes:)
5582 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5583 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5584 ac_tool_warned=yes ;;
5585 esac
5586 OCAMLFIND=$ac_ct_OCAMLFIND
5587 fi
5588 else
5589 OCAMLFIND="$ac_cv_prog_OCAMLFIND"
5590 fi
5591
5592
5593
5594
5595
5596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ocaml standard library path" >&5
5597 $as_echo_n "checking for ocaml standard library path... " >&6; }
5598 OCAML_STDLIB=`$OCAMLFIND printconf stdlib`
5599
5600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAML_STDLIB" >&5
5601 $as_echo "$OCAML_STDLIB" >&6; }
5602
5603
5604 # Check if caml/threads.h is present
5605 old_CFLAGS=$CFLAGS
5606 CFLAGS="$CFLAGS -I${OCAML_STDLIB}"
5607 ac_fn_c_check_header_compile "$LINENO" "caml/threads.h" "ac_cv_header_caml_threads_h" "#include <caml/misc.h>
5608 "
5609 if test "x$ac_cv_header_caml_threads_h" = xyes; then :
5610 CAML_THREADS=yes
5611 fi
5612
5613
5614 CFLAGS=${old_CFLAGS}
5615
5616 # Check whether --enable-debugging was given.
5617 if test "${enable_debugging+set}" = set; then :
5618 enableval=$enable_debugging;
5619 fi
5620
5621
5622 if test "$enable_debugging" \!= "no" ; then
5623 OCAMLFLAGS="$OCAMLFLAGS -g"
5624 fi
5625
5626
5627 # Check whether --with-ocaml-warnings was given.
5628 if test "${with_ocaml_warnings+set}" = set; then :
5629 withval=$with_ocaml_warnings;
5630 fi
5631
5632
5633 if test -n "${with_ocaml_warnings}" ; then
5634 OCAMLFLAGS="$OCAMLFLAGS -w +${with_ocaml_warnings}"
5635 else
5636 OCAMLFLAGS="$OCAMLFLAGS -w +A-4@5-7@8-9@11@12@20-35-44-45-50"
5637 fi
5638
5639 # Check whether --enable-profiling was given.
5640 if test "${enable_profiling+set}" = set; then :
5641 enableval=$enable_profiling;
5642 fi
5643
5644 if test "x$enable_profiling" = "xyes" ; then
5645 OCAMLNCFLAGS="$OCAMLNCFLAGS -p"
5646 fi
5647
5648
5649 # Check whether --enable-nativecode was given.
5650 if test "${enable_nativecode+set}" = set; then :
5651 enableval=$enable_nativecode;
5652 fi
5653
5654
5655 # Check whether --enable-custom was given.
5656 if test "${enable_custom+set}" = set; then :
5657 enableval=$enable_custom;
5658 fi
5659
5660
5661 CAMLLIBPATH=$OCAMLLIB
5662
5663
5664
5665
5666
5667
5668
5669 # Check whether --enable-pic was given.
5670 if test "${enable_pic+set}" = set; then :
5671 enableval=$enable_pic; enable_pic="$enableval"
5672 test "x$enable_pic" = x && enable_pic=auto
5673 else
5674 enable_pic=auto
5675 fi
5676
5677 if test "$enable_pic" = auto && test "$enable_static" = yes; then
5678 enable_pic=no
5679 fi
5680 if test "$enable_pic" != no; then
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to produce PIC" >&5
5682 $as_echo_n "checking for $CC option to produce PIC... " >&6; }
5683 if test "x$PIC_FLAGS" = "x"; then
5684 if test "x$GCC" = "xyes"; then
5685 case "$host_os" in
5686 aix*|beos*|cygwin*|irix5*|irix6*|osf3*|osf4*|osf5*)
5687 ;;
5688 mingw*|os2*|pw32*)
5689 PIC_FLAGS="-DDLL_EXPORT"
5690 ;;
5691 darwin*|rhapsody*)
5692 PIC_FLAGS="-fno-common"
5693 ;;
5694 hpux*)
5695 case $host_cpu in
5696 hppa*64*|ia64*)
5697 ;;
5698 *)
5699 PIC_FLAGS="-fPIC"
5700 ;;
5701 esac
5702 ;;
5703 *)
5704 PIC_FLAGS="-fPIC"
5705 ;;
5706 esac
5707 else case "$host_os" in
5708 hpux9*|hpux10*|hpux11*)
5709 case "$host_cpu" in
5710 hppa*64*|ia64*)
5711 ;;
5712 *)
5713 PIC_FLAGS="+Z"
5714 ;;
5715 esac
5716 ;;
5717 linux*|k*bsd*-gnu)
5718 case `basename "$CC"` in
5719 icc*|ecc*|ifort*)
5720 PIC_FLAGS="-KPIC"
5721 ;;
5722 pgcc*|pgf77*|pgf90*|pgf95*)
5723 PIC_FLAGS="-fpic"
5724 ;;
5725 ccc*)
5726 ;;
5727 xl*)
5728 PIC_FLAGS="-qpic"
5729 ;;
5730 *)
5731 case `$CC -V 2>&1 | sed 5q` in
5732 *Sun\ C*|*Sun\ F*)
5733 PIC_FLAGS="-KPIC"
5734 ;;
5735 esac
5736 esac
5737 ;;
5738 solaris*)
5739 PIC_FLAGS="-KPIC"
5740 ;;
5741 sunos4*)
5742 PIC_FLAGS="-PIC"
5743 ;;
5744 esac
5745 fi
5746 fi
5747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PIC_FLAGS" >&5
5748 $as_echo "$PIC_FLAGS" >&6; }
5749 fi
5750
5751
5752
5753 CXXFLAGS="$CXXFLAGS $PIC_FLAGS"
5754 CPPFLAGS="$CPPFLAGS $PIC_FLAGS"
5755
5756 # Add prefix to compilation variables
5757 # if passed
5758 if test "x$prefix" != "xNONE"; then
5759 CFLAGS="$CFLAGS -I$prefix/include"
5760 LDFLAGS="$LDFLAGS -L$prefix/lib"
5761 CPPFLAGS="$CPPFLAGS -I$prefix/include"
5762 CXXFLAGS="$CXXFLAGS -I$prefix/include"
5763 fi
5764
5765
5766 # Include a config.h
5767 ac_config_headers="$ac_config_headers config.h:config.h.in"
5768
5769 # Include it
5770 CFLAGS="$CFLAGS -I.. -DHAVE_CONFIG_H"
5771
5772 ac_ext=c
5773 ac_cpp='$CPP $CPPFLAGS'
5774 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5775 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5776 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5778 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5779 # On Suns, sometimes $CPP names a directory.
5780 if test -n "$CPP" && test -d "$CPP"; then
5781 CPP=
5782 fi
5783 if test -z "$CPP"; then
5784 if ${ac_cv_prog_CPP+:} false; then :
5785 $as_echo_n "(cached) " >&6
5786 else
5787 # Double quotes because CPP needs to be expanded
5788 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5789 do
5790 ac_preproc_ok=false
5791 for ac_c_preproc_warn_flag in '' yes
5792 do
5793 # Use a header file that comes with gcc, so configuring glibc
5794 # with a fresh cross-compiler works.
5795 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5796 # <limits.h> exists even on freestanding compilers.
5797 # On the NeXT, cc -E runs the code through the compiler's parser,
5798 # not just through cpp. "Syntax error" is here to catch this case.
5799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5800 /* end confdefs.h. */
5801 #ifdef __STDC__
5802 # include <limits.h>
5803 #else
5804 # include <assert.h>
5805 #endif
5806 Syntax error
5807 _ACEOF
5808 if ac_fn_c_try_cpp "$LINENO"; then :
5809
5810 else
5811 # Broken: fails on valid input.
5812 continue
5813 fi
5814 rm -f conftest.err conftest.i conftest.$ac_ext
5815
5816 # OK, works on sane cases. Now check whether nonexistent headers
5817 # can be detected and how.
5818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5819 /* end confdefs.h. */
5820 #include <ac_nonexistent.h>
5821 _ACEOF
5822 if ac_fn_c_try_cpp "$LINENO"; then :
5823 # Broken: success on invalid input.
5824 continue
5825 else
5826 # Passes both tests.
5827 ac_preproc_ok=:
5828 break
5829 fi
5830 rm -f conftest.err conftest.i conftest.$ac_ext
5831
5832 done
5833 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5834 rm -f conftest.i conftest.err conftest.$ac_ext
5835 if $ac_preproc_ok; then :
5836 break
5837 fi
5838
5839 done
5840 ac_cv_prog_CPP=$CPP
5841
5842 fi
5843 CPP=$ac_cv_prog_CPP
5844 else
5845 ac_cv_prog_CPP=$CPP
5846 fi
5847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5848 $as_echo "$CPP" >&6; }
5849 ac_preproc_ok=false
5850 for ac_c_preproc_warn_flag in '' yes
5851 do
5852 # Use a header file that comes with gcc, so configuring glibc
5853 # with a fresh cross-compiler works.
5854 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5855 # <limits.h> exists even on freestanding compilers.
5856 # On the NeXT, cc -E runs the code through the compiler's parser,
5857 # not just through cpp. "Syntax error" is here to catch this case.
5858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5859 /* end confdefs.h. */
5860 #ifdef __STDC__
5861 # include <limits.h>
5862 #else
5863 # include <assert.h>
5864 #endif
5865 Syntax error
5866 _ACEOF
5867 if ac_fn_c_try_cpp "$LINENO"; then :
5868
5869 else
5870 # Broken: fails on valid input.
5871 continue
5872 fi
5873 rm -f conftest.err conftest.i conftest.$ac_ext
5874
5875 # OK, works on sane cases. Now check whether nonexistent headers
5876 # can be detected and how.
5877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5878 /* end confdefs.h. */
5879 #include <ac_nonexistent.h>
5880 _ACEOF
5881 if ac_fn_c_try_cpp "$LINENO"; then :
5882 # Broken: success on invalid input.
5883 continue
5884 else
5885 # Passes both tests.
5886 ac_preproc_ok=:
5887 break
5888 fi
5889 rm -f conftest.err conftest.i conftest.$ac_ext
5890
5891 done
5892 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5893 rm -f conftest.i conftest.err conftest.$ac_ext
5894 if $ac_preproc_ok; then :
5895
5896 else
5897 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5898 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5899 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5900 See \`config.log' for more details" "$LINENO" 5; }
5901 fi
5902
5903 ac_ext=c
5904 ac_cpp='$CPP $CPPFLAGS'
5905 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5906 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5907 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5908
5909
5910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5911 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5912 if ${ac_cv_path_GREP+:} false; then :
5913 $as_echo_n "(cached) " >&6
5914 else
5915 if test -z "$GREP"; then
5916 ac_path_GREP_found=false
5917 # Loop through the user's path and test for each of PROGNAME-LIST
5918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5919 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5920 do
5921 IFS=$as_save_IFS
5922 test -z "$as_dir" && as_dir=.
5923 for ac_prog in grep ggrep; do
5924 for ac_exec_ext in '' $ac_executable_extensions; do
5925 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5926 as_fn_executable_p "$ac_path_GREP" || continue
5927 # Check for GNU ac_path_GREP and select it if it is found.
5928 # Check for GNU $ac_path_GREP
5929 case `"$ac_path_GREP" --version 2>&1` in
5930 *GNU*)
5931 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5932 *)
5933 ac_count=0
5934 $as_echo_n 0123456789 >"conftest.in"
5935 while :
5936 do
5937 cat "conftest.in" "conftest.in" >"conftest.tmp"
5938 mv "conftest.tmp" "conftest.in"
5939 cp "conftest.in" "conftest.nl"
5940 $as_echo 'GREP' >> "conftest.nl"
5941 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5942 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5943 as_fn_arith $ac_count + 1 && ac_count=$as_val
5944 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5945 # Best one so far, save it but keep looking for a better one
5946 ac_cv_path_GREP="$ac_path_GREP"
5947 ac_path_GREP_max=$ac_count
5948 fi
5949 # 10*(2^10) chars as input seems more than enough
5950 test $ac_count -gt 10 && break
5951 done
5952 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5953 esac
5954
5955 $ac_path_GREP_found && break 3
5956 done
5957 done
5958 done
5959 IFS=$as_save_IFS
5960 if test -z "$ac_cv_path_GREP"; then
5961 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5962 fi
5963 else
5964 ac_cv_path_GREP=$GREP
5965 fi
5966
5967 fi
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5969 $as_echo "$ac_cv_path_GREP" >&6; }
5970 GREP="$ac_cv_path_GREP"
5971
5972
5973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5974 $as_echo_n "checking for egrep... " >&6; }
5975 if ${ac_cv_path_EGREP+:} false; then :
5976 $as_echo_n "(cached) " >&6
5977 else
5978 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5979 then ac_cv_path_EGREP="$GREP -E"
5980 else
5981 if test -z "$EGREP"; then
5982 ac_path_EGREP_found=false
5983 # Loop through the user's path and test for each of PROGNAME-LIST
5984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5986 do
5987 IFS=$as_save_IFS
5988 test -z "$as_dir" && as_dir=.
5989 for ac_prog in egrep; do
5990 for ac_exec_ext in '' $ac_executable_extensions; do
5991 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5992 as_fn_executable_p "$ac_path_EGREP" || continue
5993 # Check for GNU ac_path_EGREP and select it if it is found.
5994 # Check for GNU $ac_path_EGREP
5995 case `"$ac_path_EGREP" --version 2>&1` in
5996 *GNU*)
5997 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5998 *)
5999 ac_count=0
6000 $as_echo_n 0123456789 >"conftest.in"
6001 while :
6002 do
6003 cat "conftest.in" "conftest.in" >"conftest.tmp"
6004 mv "conftest.tmp" "conftest.in"
6005 cp "conftest.in" "conftest.nl"
6006 $as_echo 'EGREP' >> "conftest.nl"
6007 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6008 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6009 as_fn_arith $ac_count + 1 && ac_count=$as_val
6010 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6011 # Best one so far, save it but keep looking for a better one
6012 ac_cv_path_EGREP="$ac_path_EGREP"
6013 ac_path_EGREP_max=$ac_count
6014 fi
6015 # 10*(2^10) chars as input seems more than enough
6016 test $ac_count -gt 10 && break
6017 done
6018 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6019 esac
6020
6021 $ac_path_EGREP_found && break 3
6022 done
6023 done
6024 done
6025 IFS=$as_save_IFS
6026 if test -z "$ac_cv_path_EGREP"; then
6027 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6028 fi
6029 else
6030 ac_cv_path_EGREP=$EGREP
6031 fi
6032
6033 fi
6034 fi
6035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6036 $as_echo "$ac_cv_path_EGREP" >&6; }
6037 EGREP="$ac_cv_path_EGREP"
6038
6039
6040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6041 $as_echo_n "checking for ANSI C header files... " >&6; }
6042 if ${ac_cv_header_stdc+:} false; then :
6043 $as_echo_n "(cached) " >&6
6044 else
6045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6046 /* end confdefs.h. */
6047 #include <stdlib.h>
6048 #include <stdarg.h>
6049 #include <string.h>
6050 #include <float.h>
6051
6052 int
6053 main ()
6054 {
6055
6056 ;
6057 return 0;
6058 }
6059 _ACEOF
6060 if ac_fn_c_try_compile "$LINENO"; then :
6061 ac_cv_header_stdc=yes
6062 else
6063 ac_cv_header_stdc=no
6064 fi
6065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6066
6067 if test $ac_cv_header_stdc = yes; then
6068 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6070 /* end confdefs.h. */
6071 #include <string.h>
6072
6073 _ACEOF
6074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6075 $EGREP "memchr" >/dev/null 2>&1; then :
6076
6077 else
6078 ac_cv_header_stdc=no
6079 fi
6080 rm -f conftest*
6081
6082 fi
6083
6084 if test $ac_cv_header_stdc = yes; then
6085 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6087 /* end confdefs.h. */
6088 #include <stdlib.h>
6089
6090 _ACEOF
6091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6092 $EGREP "free" >/dev/null 2>&1; then :
6093
6094 else
6095 ac_cv_header_stdc=no
6096 fi
6097 rm -f conftest*
6098
6099 fi
6100
6101 if test $ac_cv_header_stdc = yes; then
6102 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6103 if test "$cross_compiling" = yes; then :
6104 :
6105 else
6106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6107 /* end confdefs.h. */
6108 #include <ctype.h>
6109 #include <stdlib.h>
6110 #if ((' ' & 0x0FF) == 0x020)
6111 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6112 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6113 #else
6114 # define ISLOWER(c) \
6115 (('a' <= (c) && (c) <= 'i') \
6116 || ('j' <= (c) && (c) <= 'r') \
6117 || ('s' <= (c) && (c) <= 'z'))
6118 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6119 #endif
6120
6121 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6122 int
6123 main ()
6124 {
6125 int i;
6126 for (i = 0; i < 256; i++)
6127 if (XOR (islower (i), ISLOWER (i))
6128 || toupper (i) != TOUPPER (i))
6129 return 2;
6130 return 0;
6131 }
6132 _ACEOF
6133 if ac_fn_c_try_run "$LINENO"; then :
6134
6135 else
6136 ac_cv_header_stdc=no
6137 fi
6138 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6139 conftest.$ac_objext conftest.beam conftest.$ac_ext
6140 fi
6141
6142 fi
6143 fi
6144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6145 $as_echo "$ac_cv_header_stdc" >&6; }
6146 if test $ac_cv_header_stdc = yes; then
6147
6148 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6149
6150 fi
6151
6152 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6153 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6154 inttypes.h stdint.h unistd.h
6155 do :
6156 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6157 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6158 "
6159 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6160 cat >>confdefs.h <<_ACEOF
6161 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6162 _ACEOF
6163
6164 fi
6165
6166 done
6167
6168
6169 for ac_header in errno.h
6170 do :
6171 ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
6172 if test "x$ac_cv_header_errno_h" = xyes; then :
6173 cat >>confdefs.h <<_ACEOF
6174 #define HAVE_ERRNO_H 1
6175 _ACEOF
6176
6177 fi
6178
6179 done
6180
6181
6182 # Check for libfaad
6183 FAAC_LIBS="-lfaad -lm"
6184 FAAC_CFLAGS=""
6185 FAAC_CPPFLAGS=""
6186 ac_save_CPPFLAGS="$CPPFLAGS"
6187 ac_save_CFLAGS="$CFLAGS"
6188 ac_save_LIBS="$LIBS"
6189 CPPFLAGS="$CPPFLAGS $FAAC_CPPFLAGS"
6190 CFLAGS="$CFLAGS $FAAC_CFLAGS"
6191 LIBS="$FAAC_LIBS $LIBS"
6192 for ac_header in neaacdec.h
6193 do :
6194 ac_fn_c_check_header_mongrel "$LINENO" "neaacdec.h" "ac_cv_header_neaacdec_h" "$ac_includes_default"
6195 if test "x$ac_cv_header_neaacdec_h" = xyes; then :
6196 cat >>confdefs.h <<_ACEOF
6197 #define HAVE_NEAACDEC_H 1
6198 _ACEOF
6199
6200 ac_fn_c_check_func "$LINENO" "NeAACDecInit" "ac_cv_func_NeAACDecInit"
6201 if test "x$ac_cv_func_NeAACDecInit" = xyes; then :
6202 ac_have_faad="yes"
6203 fi
6204
6205
6206 fi
6207
6208 done
6209
6210 CPPFLAGS="$ac_save_CPPFLAGS"
6211 CFLAGS="$ac_save_CFLAGS"
6212 LIBS="$ac_save_LIBS"
6213 if test "$ac_have_faad" != "yes"; then
6214 as_fn_error $? "Cannot find libfaad." "$LINENO" 5
6215 fi
6216 CPPFLAGS="$CPPFLAGS $FAAC_CPPFLAGS"
6217 CFLAGS="$CFLAGS $FAAC_CFLAGS"
6218 LIBS="$LIBS $FAAC_LIBS"
6219
6220
6221
6222
6223
6224
6225 if test -n ""; then
6226 BINDING_PKGS=""
6227 else
6228 BINDING_PKGS="bytes"
6229 fi
6230
6231
6232 # Check whether --with-bytes-dir was given.
6233 if test "${with_bytes_dir+set}" = set; then :
6234 withval=$with_bytes_dir;
6235 fi
6236
6237
6238 # Check whether --enable-bytes-dynamic-plugin was given.
6239 if test "${enable_bytes_dynamic_plugin+set}" = set; then :
6240 enableval=$enable_bytes_dynamic_plugin;
6241 fi
6242
6243
6244
6245
6246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ocaml bytes module" >&5
6247 $as_echo_n "checking for ocaml bytes module... " >&6; }
6248
6249 OCAML_CHECK="${OCAMLFIND} query bytes"
6250
6251
6252 if test "x$enable_bytes_dynamic_plugin" = "xyes" ; then
6253 BYTES_SHARED="yes"
6254 PLUGINS="$PLUGINS bytes"
6255 fi
6256
6257
6258 DEPS_CHECK=yes
6259 for i in ; do
6260 eval "dep_check=\$W_$i"
6261 if test -z "${dep_check}"; then
6262 DEPS_CHECK=
6263 break
6264 fi
6265 done
6266 if test -z $DEPS_CHECK; then
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bytes needs " >&5
6268 $as_echo "bytes needs " >&6; }
6269 else
6270 if test -z "${with_bytes_dir}" ; then
6271 if ! ${OCAML_CHECK} > /dev/null 2>&1 ; then
6272 as_fn_error $? "Not found." "$LINENO" 5
6273 else
6274 BYTES_version="`${OCAMLFIND} query -format "%v" bytes 2>/dev/null`"
6275 if test -z "" ; then
6276 VERSION_OK=yes
6277 else
6278 as_arg_v1=${BYTES_version}
6279 as_arg_v2=
6280 awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
6281 case $? in #(
6282 1) :
6283 VERSION_OK= ;; #(
6284 0) :
6285 VERSION_OK=yes ;; #(
6286 2) :
6287 VERSION_OK=yes ;; #(
6288 *) :
6289 ;;
6290 esac
6291 fi
6292 if test -z "${VERSION_OK}"; then
6293 as_fn_error $? "requires version >= found ${BYTES_version}." "$LINENO" 5
6294 else
6295 if test -z "${BYTES_SHARED}"; then
6296 BYTES_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINDING_PKGS 2>/dev/null`"
6297 liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} ${BYTES_PACKAGES}"
6298 W_BYTES=yes
6299 else
6300 bytes_packages="`${OCAMLFIND} query -r -separator " " -format "%p" $BINDING_PKGS 2>/dev/null`"
6301 W_BYTES=bytes
6302 fi
6303 LIBS_VERSIONS="${LIBS_VERSIONS} bytes=$BYTES_version"
6304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
6305 $as_echo "ok" >&6; }
6306 fi
6307 fi
6308 else
6309 BYTES_STOP_CHECK=
6310 BYTES_version="[unknown version]"
6311 BYTES_requires=
6312 if test -r ${with_bytes_dir}/META >/dev/null 2>&1; then
6313 # Grab version
6314 BYTES_version=`cat "${with_bytes_dir}/META" | grep version | cut -d'=' -f 2 | tr -d ' ' | tr -d '"' | head -n 1`
6315 if test -z "" ; then
6316 VERSION_OK=yes
6317 else
6318 as_arg_v1=${BYTES_version}
6319 as_arg_v2=
6320 awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
6321 case $? in #(
6322 1) :
6323 VERSION_OK= ;; #(
6324 0) :
6325 VERSION_OK=yes ;; #(
6326 2) :
6327 VERSION_OK=yes ;; #(
6328 *) :
6329 ;;
6330 esac
6331 fi
6332 if test -z "${VERSION_OK}"; then
6333 as_fn_error $? "requires version >= found ${BYTES_version}." "$LINENO" 5
6334 BYTES_STOP_CHECK=yes
6335 fi
6336 BYTES_requires=`cat "${with_bytes_dir}/META" | grep 'requires' | cut -d '=' -f 2 | tr -d '"'`
6337 BYTES_path="${with_bytes_dir}"
6338 else
6339 BYTES_path=`${OCAMLFIND} -query bytes 2>/dev/null`
6340 if ! test -z ""; then
6341 as_fn_error $? "cannot find version from META file." "$LINENO" 5
6342 BYTES_STOP_CHECK=yes
6343 fi
6344 fi
6345 if test -z "${BYTES_STOP_CHECK}"; then
6346 BYTES_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINGING_PKGS 2>/dev/null`"
6347 echo ${with_bytes_dir} | grep ^/ > /dev/null 2>&1 \
6348 || with_bytes_dir=${PWD}/${with_bytes_dir}
6349 if test -z "${BYTES_SHARED}"; then
6350 liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} -I ${with_bytes_dir} ${BYTES_PACKAGES}"
6351 else
6352 bytes_ocamlcflags="-I ${with_bytes_dir} ${BYTES_PACKAGES}"
6353 fi
6354 # We need to recurse here because
6355 # some package may not be registered using ocamlfind
6356 if test -n ""; then
6357 BYTES_CMA=.${cma}
6358 else
6359 BYTES_CMA=bytes.${cma}
6360 fi
6361 for i in ${BYTES_requires}; do
6362 BYTES_PACKAGES="${BYTES_PACKAGES} `${OCAMLFIND} query -separator " " -format "-package %p" $i 2>/dev/null`"
6363 done
6364 if test -z "${BYTES_SHARED}"; then
6365 liquidsoap_ocamllflags="${liquidsoap_ocamllflags} ${BYTES_PACKAGES} ${BYTES_CMA}"
6366 W_BYTES=yes
6367 else
6368 bytes_ocamllflags="${BYTES_PACKAGES} ${BYTES_CMA}"
6369 W_BYTES=bytes
6370 fi
6371 LIBS_VERSIONS="${LIBS_VERSIONS} bytes=$BYTES_version"
6372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
6373 $as_echo "ok" >&6; }
6374 fi
6375 fi
6376 fi
6377
6378
6379 if test -z "${W_BYTES}" ; then
6380 w_BYTES="no (requires bytes)"
6381 else
6382 if test -z "${BYTES_SHARED}"; then
6383 w_BYTES=yes
6384 else
6385 PLUGINS_DATA="$PLUGINS_DATA
6386 bytes_ocamlcflags=${bytes_ocamlcflags}
6387 bytes_ocamllflags=${bytes_ocamllflags}
6388 bytes_packages=${bytes_packages}"
6389 w_BYTES=plugin
6390 fi
6391 fi
6392 INC="$INC `$OCAMLFIND query bytes`"
6393
6394 # substitutions to perform
6395
6396
6397
6398 # Finally create the Makefile and samples
6399 ac_config_files="$ac_config_files Makefile"
6400
6401 ac_config_files="$ac_config_files src/META"
6402
6403 ac_config_files="$ac_config_files src/Makefile"
6404
6405 cat >confcache <<\_ACEOF
6406 # This file is a shell script that caches the results of configure
6407 # tests run on this system so they can be shared between configure
6408 # scripts and configure runs, see configure's option --config-cache.
6409 # It is not useful on other systems. If it contains results you don't
6410 # want to keep, you may remove or edit it.
6411 #
6412 # config.status only pays attention to the cache file if you give it
6413 # the --recheck option to rerun configure.
6414 #
6415 # `ac_cv_env_foo' variables (set or unset) will be overridden when
6416 # loading this file, other *unset* `ac_cv_foo' will be assigned the
6417 # following values.
6418
6419 _ACEOF
6420
6421 # The following way of writing the cache mishandles newlines in values,
6422 # but we know of no workaround that is simple, portable, and efficient.
6423 # So, we kill variables containing newlines.
6424 # Ultrix sh set writes to stderr and can't be redirected directly,
6425 # and sets the high bit in the cache file unless we assign to the vars.
6426 (
6427 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
6428 eval ac_val=\$$ac_var
6429 case $ac_val in #(
6430 *${as_nl}*)
6431 case $ac_var in #(
6432 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
6433 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
6434 esac
6435 case $ac_var in #(
6436 _ | IFS | as_nl) ;; #(
6437 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
6438 *) { eval $ac_var=; unset $ac_var;} ;;
6439 esac ;;
6440 esac
6441 done
6442
6443 (set) 2>&1 |
6444 case $as_nl`(ac_space=' '; set) 2>&1` in #(
6445 *${as_nl}ac_space=\ *)
6446 # `set' does not quote correctly, so add quotes: double-quote
6447 # substitution turns \\\\ into \\, and sed turns \\ into \.
6448 sed -n \
6449 "s/'/'\\\\''/g;
6450 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
6451 ;; #(
6452 *)
6453 # `set' quotes correctly as required by POSIX, so do not add quotes.
6454 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
6455 ;;
6456 esac |
6457 sort
6458 ) |
6459 sed '
6460 /^ac_cv_env_/b end
6461 t clear
6462 :clear
6463 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
6464 t end
6465 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
6466 :end' >>confcache
6467 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
6468 if test -w "$cache_file"; then
6469 if test "x$cache_file" != "x/dev/null"; then
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
6471 $as_echo "$as_me: updating cache $cache_file" >&6;}
6472 if test ! -f "$cache_file" || test -h "$cache_file"; then
6473 cat confcache >"$cache_file"
6474 else
6475 case $cache_file in #(
6476 */* | ?:*)
6477 mv -f confcache "$cache_file"$$ &&
6478 mv -f "$cache_file"$$ "$cache_file" ;; #(
6479 *)
6480 mv -f confcache "$cache_file" ;;
6481 esac
6482 fi
6483 fi
6484 else
6485 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
6486 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
6487 fi
6488 fi
6489 rm -f confcache
6490
6491 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6492 # Let make expand exec_prefix.
6493 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6494
6495 DEFS=-DHAVE_CONFIG_H
6496
6497 ac_libobjs=
6498 ac_ltlibobjs=
6499 U=
6500 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
6501 # 1. Remove the extension, and $U if already installed.
6502 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
6503 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
6504 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
6505 # will be set to the directory where LIBOBJS objects are built.
6506 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
6507 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
6508 done
6509 LIBOBJS=$ac_libobjs
6510
6511 LTLIBOBJS=$ac_ltlibobjs
6512
6513
6514
6515 : "${CONFIG_STATUS=./config.status}"
6516 ac_write_fail=0
6517 ac_clean_files_save=$ac_clean_files
6518 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
6520 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
6521 as_write_fail=0
6522 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
6523 #! $SHELL
6524 # Generated by $as_me.
6525 # Run this file to recreate the current configuration.
6526 # Compiler output produced by configure, useful for debugging
6527 # configure, is in config.log if it exists.
6528
6529 debug=false
6530 ac_cs_recheck=false
6531 ac_cs_silent=false
6532
6533 SHELL=\${CONFIG_SHELL-$SHELL}
6534 export SHELL
6535 _ASEOF
6536 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
6537 ## -------------------- ##
6538 ## M4sh Initialization. ##
6539 ## -------------------- ##
6540
6541 # Be more Bourne compatible
6542 DUALCASE=1; export DUALCASE # for MKS sh
6543 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
6544 emulate sh
6545 NULLCMD=:
6546 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6547 # is contrary to our usage. Disable this feature.
6548 alias -g '${1+"$@"}'='"$@"'
6549 setopt NO_GLOB_SUBST
6550 else
6551 case `(set -o) 2>/dev/null` in #(
6552 *posix*) :
6553 set -o posix ;; #(
6554 *) :
6555 ;;
6556 esac
6557 fi
6558
6559
6560 as_nl='
6561 '
6562 export as_nl
6563 # Printing a long string crashes Solaris 7 /usr/bin/printf.
6564 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6565 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
6566 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
6567 # Prefer a ksh shell builtin over an external printf program on Solaris,
6568 # but without wasting forks for bash or zsh.
6569 if test -z "$BASH_VERSION$ZSH_VERSION" \
6570 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
6571 as_echo='print -r --'
6572 as_echo_n='print -rn --'
6573 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
6574 as_echo='printf %s\n'
6575 as_echo_n='printf %s'
6576 else
6577 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
6578 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
6579 as_echo_n='/usr/ucb/echo -n'
6580 else
6581 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
6582 as_echo_n_body='eval
6583 arg=$1;
6584 case $arg in #(
6585 *"$as_nl"*)
6586 expr "X$arg" : "X\\(.*\\)$as_nl";
6587 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
6588 esac;
6589 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
6590 '
6591 export as_echo_n_body
6592 as_echo_n='sh -c $as_echo_n_body as_echo'
6593 fi
6594 export as_echo_body
6595 as_echo='sh -c $as_echo_body as_echo'
6596 fi
6597
6598 # The user is always right.
6599 if test "${PATH_SEPARATOR+set}" != set; then
6600 PATH_SEPARATOR=:
6601 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
6602 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
6603 PATH_SEPARATOR=';'
6604 }
6605 fi
6606
6607
6608 # IFS
6609 # We need space, tab and new line, in precisely that order. Quoting is
6610 # there to prevent editors from complaining about space-tab.
6611 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
6612 # splitting by setting IFS to empty value.)
6613 IFS=" "" $as_nl"
6614
6615 # Find who we are. Look in the path if we contain no directory separator.
6616 as_myself=
6617 case $0 in #((
6618 *[\\/]* ) as_myself=$0 ;;
6619 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6620 for as_dir in $PATH
6621 do
6622 IFS=$as_save_IFS
6623 test -z "$as_dir" && as_dir=.
6624 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
6625 done
6626 IFS=$as_save_IFS
6627
6628 ;;
6629 esac
6630 # We did not find ourselves, most probably we were run as `sh COMMAND'
6631 # in which case we are not to be found in the path.
6632 if test "x$as_myself" = x; then
6633 as_myself=$0
6634 fi
6635 if test ! -f "$as_myself"; then
6636 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
6637 exit 1
6638 fi
6639
6640 # Unset variables that we do not need and which cause bugs (e.g. in
6641 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
6642 # suppresses any "Segmentation fault" message there. '((' could
6643 # trigger a bug in pdksh 5.2.14.
6644 for as_var in BASH_ENV ENV MAIL MAILPATH
6645 do eval test x\${$as_var+set} = xset \
6646 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
6647 done
6648 PS1='$ '
6649 PS2='> '
6650 PS4='+ '
6651
6652 # NLS nuisances.
6653 LC_ALL=C
6654 export LC_ALL
6655 LANGUAGE=C
6656 export LANGUAGE
6657
6658 # CDPATH.
6659 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
6660
6661
6662 # as_fn_error STATUS ERROR [LINENO LOG_FD]
6663 # ----------------------------------------
6664 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
6665 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
6666 # script with STATUS, using 1 if that was 0.
6667 as_fn_error ()
6668 {
6669 as_status=$1; test $as_status -eq 0 && as_status=1
6670 if test "$4"; then
6671 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
6672 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
6673 fi
6674 $as_echo "$as_me: error: $2" >&2
6675 as_fn_exit $as_status
6676 } # as_fn_error
6677
6678
6679 # as_fn_set_status STATUS
6680 # -----------------------
6681 # Set $? to STATUS, without forking.
6682 as_fn_set_status ()
6683 {
6684 return $1
6685 } # as_fn_set_status
6686
6687 # as_fn_exit STATUS
6688 # -----------------
6689 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
6690 as_fn_exit ()
6691 {
6692 set +e
6693 as_fn_set_status $1
6694 exit $1
6695 } # as_fn_exit
6696
6697 # as_fn_unset VAR
6698 # ---------------
6699 # Portably unset VAR.
6700 as_fn_unset ()
6701 {
6702 { eval $1=; unset $1;}
6703 }
6704 as_unset=as_fn_unset
6705 # as_fn_append VAR VALUE
6706 # ----------------------
6707 # Append the text in VALUE to the end of the definition contained in VAR. Take
6708 # advantage of any shell optimizations that allow amortized linear growth over
6709 # repeated appends, instead of the typical quadratic growth present in naive
6710 # implementations.
6711 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
6712 eval 'as_fn_append ()
6713 {
6714 eval $1+=\$2
6715 }'
6716 else
6717 as_fn_append ()
6718 {
6719 eval $1=\$$1\$2
6720 }
6721 fi # as_fn_append
6722
6723 # as_fn_arith ARG...
6724 # ------------------
6725 # Perform arithmetic evaluation on the ARGs, and store the result in the
6726 # global $as_val. Take advantage of shells that can avoid forks. The arguments
6727 # must be portable across $(()) and expr.
6728 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
6729 eval 'as_fn_arith ()
6730 {
6731 as_val=$(( $* ))
6732 }'
6733 else
6734 as_fn_arith ()
6735 {
6736 as_val=`expr "$@" || test $? -eq 1`
6737 }
6738 fi # as_fn_arith
6739
6740
6741 if expr a : '\(a\)' >/dev/null 2>&1 &&
6742 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6743 as_expr=expr
6744 else
6745 as_expr=false
6746 fi
6747
6748 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6749 as_basename=basename
6750 else
6751 as_basename=false
6752 fi
6753
6754 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
6755 as_dirname=dirname
6756 else
6757 as_dirname=false
6758 fi
6759
6760 as_me=`$as_basename -- "$0" ||
6761 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
6762 X"$0" : 'X\(//\)$' \| \
6763 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
6764 $as_echo X/"$0" |
6765 sed '/^.*\/\([^/][^/]*\)\/*$/{
6766 s//\1/
6767 q
6768 }
6769 /^X\/\(\/\/\)$/{
6770 s//\1/
6771 q
6772 }
6773 /^X\/\(\/\).*/{
6774 s//\1/
6775 q
6776 }
6777 s/.*/./; q'`
6778
6779 # Avoid depending upon Character Ranges.
6780 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
6781 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
6782 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
6783 as_cr_digits='0123456789'
6784 as_cr_alnum=$as_cr_Letters$as_cr_digits
6785
6786 ECHO_C= ECHO_N= ECHO_T=
6787 case `echo -n x` in #(((((
6788 -n*)
6789 case `echo 'xy\c'` in
6790 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
6791 xy) ECHO_C='\c';;
6792 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
6793 ECHO_T=' ';;
6794 esac;;
6795 *)
6796 ECHO_N='-n';;
6797 esac
6798
6799 rm -f conf$$ conf$$.exe conf$$.file
6800 if test -d conf$$.dir; then
6801 rm -f conf$$.dir/conf$$.file
6802 else
6803 rm -f conf$$.dir
6804 mkdir conf$$.dir 2>/dev/null
6805 fi
6806 if (echo >conf$$.file) 2>/dev/null; then
6807 if ln -s conf$$.file conf$$ 2>/dev/null; then
6808 as_ln_s='ln -s'
6809 # ... but there are two gotchas:
6810 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
6811 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
6812 # In both cases, we have to default to `cp -pR'.
6813 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
6814 as_ln_s='cp -pR'
6815 elif ln conf$$.file conf$$ 2>/dev/null; then
6816 as_ln_s=ln
6817 else
6818 as_ln_s='cp -pR'
6819 fi
6820 else
6821 as_ln_s='cp -pR'
6822 fi
6823 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
6824 rmdir conf$$.dir 2>/dev/null
6825
6826
6827 # as_fn_mkdir_p
6828 # -------------
6829 # Create "$as_dir" as a directory, including parents if necessary.
6830 as_fn_mkdir_p ()
6831 {
6832
6833 case $as_dir in #(
6834 -*) as_dir=./$as_dir;;
6835 esac
6836 test -d "$as_dir" || eval $as_mkdir_p || {
6837 as_dirs=
6838 while :; do
6839 case $as_dir in #(
6840 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
6841 *) as_qdir=$as_dir;;
6842 esac
6843 as_dirs="'$as_qdir' $as_dirs"
6844 as_dir=`$as_dirname -- "$as_dir" ||
6845 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6846 X"$as_dir" : 'X\(//\)[^/]' \| \
6847 X"$as_dir" : 'X\(//\)$' \| \
6848 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6849 $as_echo X"$as_dir" |
6850 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
6851 s//\1/
6852 q
6853 }
6854 /^X\(\/\/\)[^/].*/{
6855 s//\1/
6856 q
6857 }
6858 /^X\(\/\/\)$/{
6859 s//\1/
6860 q
6861 }
6862 /^X\(\/\).*/{
6863 s//\1/
6864 q
6865 }
6866 s/.*/./; q'`
6867 test -d "$as_dir" && break
6868 done
6869 test -z "$as_dirs" || eval "mkdir $as_dirs"
6870 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
6871
6872
6873 } # as_fn_mkdir_p
6874 if mkdir -p . 2>/dev/null; then
6875 as_mkdir_p='mkdir -p "$as_dir"'
6876 else
6877 test -d ./-p && rmdir ./-p
6878 as_mkdir_p=false
6879 fi
6880
6881
6882 # as_fn_executable_p FILE
6883 # -----------------------
6884 # Test if FILE is an executable regular file.
6885 as_fn_executable_p ()
6886 {
6887 test -f "$1" && test -x "$1"
6888 } # as_fn_executable_p
6889 as_test_x='test -x'
6890 as_executable_p=as_fn_executable_p
6891
6892 # Sed expression to map a string onto a valid CPP name.
6893 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
6894
6895 # Sed expression to map a string onto a valid variable name.
6896 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
6897
6898
6899 exec 6>&1
6900 ## ----------------------------------- ##
6901 ## Main body of $CONFIG_STATUS script. ##
6902 ## ----------------------------------- ##
6903 _ASEOF
6904 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
6905
6906 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6907 # Save the log message, to keep $0 and so on meaningful, and to
6908 # report actual input values of CONFIG_FILES etc. instead of their
6909 # values after options handling.
6910 ac_log="
6911 This file was extended by ocaml-faad $as_me 0.4.0, which was
6912 generated by GNU Autoconf 2.69. Invocation command line was
6913
6914 CONFIG_FILES = $CONFIG_FILES
6915 CONFIG_HEADERS = $CONFIG_HEADERS
6916 CONFIG_LINKS = $CONFIG_LINKS
6917 CONFIG_COMMANDS = $CONFIG_COMMANDS
6918 $ $0 $@
6919
6920 on `(hostname || uname -n) 2>/dev/null | sed 1q`
6921 "
6922
6923 _ACEOF
6924
6925 case $ac_config_files in *"
6926 "*) set x $ac_config_files; shift; ac_config_files=$*;;
6927 esac
6928
6929 case $ac_config_headers in *"
6930 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
6931 esac
6932
6933
6934 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
6935 # Files that config.status was made for.
6936 config_files="$ac_config_files"
6937 config_headers="$ac_config_headers"
6938
6939 _ACEOF
6940
6941 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6942 ac_cs_usage="\
6943 \`$as_me' instantiates files and other configuration actions
6944 from templates according to the current configuration. Unless the files
6945 and actions are specified as TAGs, all are instantiated by default.
6946
6947 Usage: $0 [OPTION]... [TAG]...
6948
6949 -h, --help print this help, then exit
6950 -V, --version print version number and configuration settings, then exit
6951 --config print configuration, then exit
6952 -q, --quiet, --silent
6953 do not print progress messages
6954 -d, --debug don't remove temporary files
6955 --recheck update $as_me by reconfiguring in the same conditions
6956 --file=FILE[:TEMPLATE]
6957 instantiate the configuration file FILE
6958 --header=FILE[:TEMPLATE]
6959 instantiate the configuration header FILE
6960
6961 Configuration files:
6962 $config_files
6963
6964 Configuration headers:
6965 $config_headers
6966
6967 Report bugs to <savonet-users@lists.sourceforge.net>."
6968
6969 _ACEOF
6970 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
6971 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
6972 ac_cs_version="\\
6973 ocaml-faad config.status 0.4.0
6974 configured by $0, generated by GNU Autoconf 2.69,
6975 with options \\"\$ac_cs_config\\"
6976
6977 Copyright (C) 2012 Free Software Foundation, Inc.
6978 This config.status script is free software; the Free Software Foundation
6979 gives unlimited permission to copy, distribute and modify it."
6980
6981 ac_pwd='$ac_pwd'
6982 srcdir='$srcdir'
6983 INSTALL='$INSTALL'
6984 test -n "\$AWK" || AWK=awk
6985 _ACEOF
6986
6987 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6988 # The default lists apply if the user does not specify any file.
6989 ac_need_defaults=:
6990 while test $# != 0
6991 do
6992 case $1 in
6993 --*=?*)
6994 ac_option=`expr "X$1" : 'X\([^=]*\)='`
6995 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6996 ac_shift=:
6997 ;;
6998 --*=)
6999 ac_option=`expr "X$1" : 'X\([^=]*\)='`
7000 ac_optarg=
7001 ac_shift=:
7002 ;;
7003 *)
7004 ac_option=$1
7005 ac_optarg=$2
7006 ac_shift=shift
7007 ;;
7008 esac
7009
7010 case $ac_option in
7011 # Handling of the options.
7012 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7013 ac_cs_recheck=: ;;
7014 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
7015 $as_echo "$ac_cs_version"; exit ;;
7016 --config | --confi | --conf | --con | --co | --c )
7017 $as_echo "$ac_cs_config"; exit ;;
7018 --debug | --debu | --deb | --de | --d | -d )
7019 debug=: ;;
7020 --file | --fil | --fi | --f )
7021 $ac_shift
7022 case $ac_optarg in
7023 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
7024 '') as_fn_error $? "missing file argument" ;;
7025 esac
7026 as_fn_append CONFIG_FILES " '$ac_optarg'"
7027 ac_need_defaults=false;;
7028 --header | --heade | --head | --hea )
7029 $ac_shift
7030 case $ac_optarg in
7031 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
7032 esac
7033 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
7034 ac_need_defaults=false;;
7035 --he | --h)
7036 # Conflict between --help and --header
7037 as_fn_error $? "ambiguous option: \`$1'
7038 Try \`$0 --help' for more information.";;
7039 --help | --hel | -h )
7040 $as_echo "$ac_cs_usage"; exit ;;
7041 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
7042 | -silent | --silent | --silen | --sile | --sil | --si | --s)
7043 ac_cs_silent=: ;;
7044
7045 # This is an error.
7046 -*) as_fn_error $? "unrecognized option: \`$1'
7047 Try \`$0 --help' for more information." ;;
7048
7049 *) as_fn_append ac_config_targets " $1"
7050 ac_need_defaults=false ;;
7051
7052 esac
7053 shift
7054 done
7055
7056 ac_configure_extra_args=
7057
7058 if $ac_cs_silent; then
7059 exec 6>/dev/null
7060 ac_configure_extra_args="$ac_configure_extra_args --silent"
7061 fi
7062
7063 _ACEOF
7064 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7065 if \$ac_cs_recheck; then
7066 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
7067 shift
7068 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
7069 CONFIG_SHELL='$SHELL'
7070 export CONFIG_SHELL
7071 exec "\$@"
7072 fi
7073
7074 _ACEOF
7075 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7076 exec 5>>config.log
7077 {
7078 echo
7079 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
7080 ## Running $as_me. ##
7081 _ASBOX
7082 $as_echo "$ac_log"
7083 } >&5
7084
7085 _ACEOF
7086 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7087 _ACEOF
7088
7089 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7090
7091 # Handling of arguments.
7092 for ac_config_target in $ac_config_targets
7093 do
7094 case $ac_config_target in
7095 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.h.in" ;;
7096 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
7097 "src/META") CONFIG_FILES="$CONFIG_FILES src/META" ;;
7098 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
7099
7100 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
7101 esac
7102 done
7103
7104
7105 # If the user did not use the arguments to specify the items to instantiate,
7106 # then the envvar interface is used. Set only those that are not.
7107 # We use the long form for the default assignment because of an extremely
7108 # bizarre bug on SunOS 4.1.3.
7109 if $ac_need_defaults; then
7110 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
7111 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
7112 fi
7113
7114 # Have a temporary directory for convenience. Make it in the build tree
7115 # simply because there is no reason against having it here, and in addition,
7116 # creating and moving files from /tmp can sometimes cause problems.
7117 # Hook for its removal unless debugging.
7118 # Note that there is a small window in which the directory will not be cleaned:
7119 # after its creation but before its name has been assigned to `$tmp'.
7120 $debug ||
7121 {
7122 tmp= ac_tmp=
7123 trap 'exit_status=$?
7124 : "${ac_tmp:=$tmp}"
7125 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
7126 ' 0
7127 trap 'as_fn_exit 1' 1 2 13 15
7128 }
7129 # Create a (secure) tmp directory for tmp files.
7130
7131 {
7132 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
7133 test -d "$tmp"
7134 } ||
7135 {
7136 tmp=./conf$$-$RANDOM
7137 (umask 077 && mkdir "$tmp")
7138 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
7139 ac_tmp=$tmp
7140
7141 # Set up the scripts for CONFIG_FILES section.
7142 # No need to generate them if there are no CONFIG_FILES.
7143 # This happens for instance with `./config.status config.h'.
7144 if test -n "$CONFIG_FILES"; then
7145
7146
7147 ac_cr=`echo X | tr X '\015'`
7148 # On cygwin, bash can eat \r inside `` if the user requested igncr.
7149 # But we know of no other shell where ac_cr would be empty at this
7150 # point, so we can use a bashism as a fallback.
7151 if test "x$ac_cr" = x; then
7152 eval ac_cr=\$\'\\r\'
7153 fi
7154 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
7155 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
7156 ac_cs_awk_cr='\\r'
7157 else
7158 ac_cs_awk_cr=$ac_cr
7159 fi
7160
7161 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
7162 _ACEOF
7163
7164
7165 {
7166 echo "cat >conf$$subs.awk <<_ACEOF" &&
7167 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
7168 echo "_ACEOF"
7169 } >conf$$subs.sh ||
7170 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
7171 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
7172 ac_delim='%!_!# '
7173 for ac_last_try in false false false false false :; do
7174 . ./conf$$subs.sh ||
7175 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
7176
7177 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
7178 if test $ac_delim_n = $ac_delim_num; then
7179 break
7180 elif $ac_last_try; then
7181 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
7182 else
7183 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
7184 fi
7185 done
7186 rm -f conf$$subs.sh
7187
7188 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7189 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
7190 _ACEOF
7191 sed -n '
7192 h
7193 s/^/S["/; s/!.*/"]=/
7194 p
7195 g
7196 s/^[^!]*!//
7197 :repl
7198 t repl
7199 s/'"$ac_delim"'$//
7200 t delim
7201 :nl
7202 h
7203 s/\(.\{148\}\)..*/\1/
7204 t more1
7205 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
7206 p
7207 n
7208 b repl
7209 :more1
7210 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
7211 p
7212 g
7213 s/.\{148\}//
7214 t nl
7215 :delim
7216 h
7217 s/\(.\{148\}\)..*/\1/
7218 t more2
7219 s/["\\]/\\&/g; s/^/"/; s/$/"/
7220 p
7221 b
7222 :more2
7223 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
7224 p
7225 g
7226 s/.\{148\}//
7227 t delim
7228 ' <conf$$subs.awk | sed '
7229 /^[^""]/{
7230 N
7231 s/\n//
7232 }
7233 ' >>$CONFIG_STATUS || ac_write_fail=1
7234 rm -f conf$$subs.awk
7235 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7236 _ACAWK
7237 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
7238 for (key in S) S_is_set[key] = 1
7239 FS = ""
7240
7241 }
7242 {
7243 line = $ 0
7244 nfields = split(line, field, "@")
7245 substed = 0
7246 len = length(field[1])
7247 for (i = 2; i < nfields; i++) {
7248 key = field[i]
7249 keylen = length(key)
7250 if (S_is_set[key]) {
7251 value = S[key]
7252 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
7253 len += length(value) + length(field[++i])
7254 substed = 1
7255 } else
7256 len += 1 + keylen
7257 }
7258
7259 print line
7260 }
7261
7262 _ACAWK
7263 _ACEOF
7264 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7265 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
7266 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
7267 else
7268 cat
7269 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
7270 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
7271 _ACEOF
7272
7273 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
7274 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
7275 # trailing colons and then remove the whole line if VPATH becomes empty
7276 # (actually we leave an empty line to preserve line numbers).
7277 if test "x$srcdir" = x.; then
7278 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
7279 h
7280 s///
7281 s/^/:/
7282 s/[ ]*$/:/
7283 s/:\$(srcdir):/:/g
7284 s/:\${srcdir}:/:/g
7285 s/:@srcdir@:/:/g
7286 s/^:*//
7287 s/:*$//
7288 x
7289 s/\(=[ ]*\).*/\1/
7290 G
7291 s/\n//
7292 s/^[^=]*=[ ]*$//
7293 }'
7294 fi
7295
7296 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7297 fi # test -n "$CONFIG_FILES"
7298
7299 # Set up the scripts for CONFIG_HEADERS section.
7300 # No need to generate them if there are no CONFIG_HEADERS.
7301 # This happens for instance with `./config.status Makefile'.
7302 if test -n "$CONFIG_HEADERS"; then
7303 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
7304 BEGIN {
7305 _ACEOF
7306
7307 # Transform confdefs.h into an awk script `defines.awk', embedded as
7308 # here-document in config.status, that substitutes the proper values into
7309 # config.h.in to produce config.h.
7310
7311 # Create a delimiter string that does not exist in confdefs.h, to ease
7312 # handling of long lines.
7313 ac_delim='%!_!# '
7314 for ac_last_try in false false :; do
7315 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
7316 if test -z "$ac_tt"; then
7317 break
7318 elif $ac_last_try; then
7319 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
7320 else
7321 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
7322 fi
7323 done
7324
7325 # For the awk script, D is an array of macro values keyed by name,
7326 # likewise P contains macro parameters if any. Preserve backslash
7327 # newline sequences.
7328
7329 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
7330 sed -n '
7331 s/.\{148\}/&'"$ac_delim"'/g
7332 t rset
7333 :rset
7334 s/^[ ]*#[ ]*define[ ][ ]*/ /
7335 t def
7336 d
7337 :def
7338 s/\\$//
7339 t bsnl
7340 s/["\\]/\\&/g
7341 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
7342 D["\1"]=" \3"/p
7343 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
7344 d
7345 :bsnl
7346 s/["\\]/\\&/g
7347 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
7348 D["\1"]=" \3\\\\\\n"\\/p
7349 t cont
7350 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
7351 t cont
7352 d
7353 :cont
7354 n
7355 s/.\{148\}/&'"$ac_delim"'/g
7356 t clear
7357 :clear
7358 s/\\$//
7359 t bsnlc
7360 s/["\\]/\\&/g; s/^/"/; s/$/"/p
7361 d
7362 :bsnlc
7363 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
7364 b cont
7365 ' <confdefs.h | sed '
7366 s/'"$ac_delim"'/"\\\
7367 "/g' >>$CONFIG_STATUS || ac_write_fail=1
7368
7369 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7370 for (key in D) D_is_set[key] = 1
7371 FS = ""
7372 }
7373 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
7374 line = \$ 0
7375 split(line, arg, " ")
7376 if (arg[1] == "#") {
7377 defundef = arg[2]
7378 mac1 = arg[3]
7379 } else {
7380 defundef = substr(arg[1], 2)
7381 mac1 = arg[2]
7382 }
7383 split(mac1, mac2, "(") #)
7384 macro = mac2[1]
7385 prefix = substr(line, 1, index(line, defundef) - 1)
7386 if (D_is_set[macro]) {
7387 # Preserve the white space surrounding the "#".
7388 print prefix "define", macro P[macro] D[macro]
7389 next
7390 } else {
7391 # Replace #undef with comments. This is necessary, for example,
7392 # in the case of _POSIX_SOURCE, which is predefined and required
7393 # on some systems where configure will not decide to define it.
7394 if (defundef == "undef") {
7395 print "/*", prefix defundef, macro, "*/"
7396 next
7397 }
7398 }
7399 }
7400 { print }
7401 _ACAWK
7402 _ACEOF
7403 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7404 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
7405 fi # test -n "$CONFIG_HEADERS"
7406
7407
7408 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
7409 shift
7410 for ac_tag
7411 do
7412 case $ac_tag in
7413 :[FHLC]) ac_mode=$ac_tag; continue;;
7414 esac
7415 case $ac_mode$ac_tag in
7416 :[FHL]*:*);;
7417 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
7418 :[FH]-) ac_tag=-:-;;
7419 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
7420 esac
7421 ac_save_IFS=$IFS
7422 IFS=:
7423 set x $ac_tag
7424 IFS=$ac_save_IFS
7425 shift
7426 ac_file=$1
7427 shift
7428
7429 case $ac_mode in
7430 :L) ac_source=$1;;
7431 :[FH])
7432 ac_file_inputs=
7433 for ac_f
7434 do
7435 case $ac_f in
7436 -) ac_f="$ac_tmp/stdin";;
7437 *) # Look for the file first in the build tree, then in the source tree
7438 # (if the path is not absolute). The absolute path cannot be DOS-style,
7439 # because $ac_f cannot contain `:'.
7440 test -f "$ac_f" ||
7441 case $ac_f in
7442 [\\/$]*) false;;
7443 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
7444 esac ||
7445 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
7446 esac
7447 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
7448 as_fn_append ac_file_inputs " '$ac_f'"
7449 done
7450
7451 # Let's still pretend it is `configure' which instantiates (i.e., don't
7452 # use $as_me), people would be surprised to read:
7453 # /* config.h. Generated by config.status. */
7454 configure_input='Generated from '`
7455 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
7456 `' by configure.'
7457 if test x"$ac_file" != x-; then
7458 configure_input="$ac_file. $configure_input"
7459 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
7460 $as_echo "$as_me: creating $ac_file" >&6;}
7461 fi
7462 # Neutralize special characters interpreted by sed in replacement strings.
7463 case $configure_input in #(
7464 *\&* | *\|* | *\\* )
7465 ac_sed_conf_input=`$as_echo "$configure_input" |
7466 sed 's/[\\\\&|]/\\\\&/g'`;; #(
7467 *) ac_sed_conf_input=$configure_input;;
7468 esac
7469
7470 case $ac_tag in
7471 *:-:* | *:-) cat >"$ac_tmp/stdin" \
7472 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
7473 esac
7474 ;;
7475 esac
7476
7477 ac_dir=`$as_dirname -- "$ac_file" ||
7478 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7479 X"$ac_file" : 'X\(//\)[^/]' \| \
7480 X"$ac_file" : 'X\(//\)$' \| \
7481 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
7482 $as_echo X"$ac_file" |
7483 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
7484 s//\1/
7485 q
7486 }
7487 /^X\(\/\/\)[^/].*/{
7488 s//\1/
7489 q
7490 }
7491 /^X\(\/\/\)$/{
7492 s//\1/
7493 q
7494 }
7495 /^X\(\/\).*/{
7496 s//\1/
7497 q
7498 }
7499 s/.*/./; q'`
7500 as_dir="$ac_dir"; as_fn_mkdir_p
7501 ac_builddir=.
7502
7503 case "$ac_dir" in
7504 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
7505 *)
7506 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
7507 # A ".." for each directory in $ac_dir_suffix.
7508 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
7509 case $ac_top_builddir_sub in
7510 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
7511 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
7512 esac ;;
7513 esac
7514 ac_abs_top_builddir=$ac_pwd
7515 ac_abs_builddir=$ac_pwd$ac_dir_suffix
7516 # for backward compatibility:
7517 ac_top_builddir=$ac_top_build_prefix
7518
7519 case $srcdir in
7520 .) # We are building in place.
7521 ac_srcdir=.
7522 ac_top_srcdir=$ac_top_builddir_sub
7523 ac_abs_top_srcdir=$ac_pwd ;;
7524 [\\/]* | ?:[\\/]* ) # Absolute name.
7525 ac_srcdir=$srcdir$ac_dir_suffix;
7526 ac_top_srcdir=$srcdir
7527 ac_abs_top_srcdir=$srcdir ;;
7528 *) # Relative name.
7529 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
7530 ac_top_srcdir=$ac_top_build_prefix$srcdir
7531 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
7532 esac
7533 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
7534
7535
7536 case $ac_mode in
7537 :F)
7538 #
7539 # CONFIG_FILE
7540 #
7541
7542 case $INSTALL in
7543 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
7544 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
7545 esac
7546 _ACEOF
7547
7548 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7549 # If the template does not know about datarootdir, expand it.
7550 # FIXME: This hack should be removed a few years after 2.60.
7551 ac_datarootdir_hack=; ac_datarootdir_seen=
7552 ac_sed_dataroot='
7553 /datarootdir/ {
7554 p
7555 q
7556 }
7557 /@datadir@/p
7558 /@docdir@/p
7559 /@infodir@/p
7560 /@localedir@/p
7561 /@mandir@/p'
7562 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
7563 *datarootdir*) ac_datarootdir_seen=yes;;
7564 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
7566 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
7567 _ACEOF
7568 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7569 ac_datarootdir_hack='
7570 s&@datadir@&$datadir&g
7571 s&@docdir@&$docdir&g
7572 s&@infodir@&$infodir&g
7573 s&@localedir@&$localedir&g
7574 s&@mandir@&$mandir&g
7575 s&\\\${datarootdir}&$datarootdir&g' ;;
7576 esac
7577 _ACEOF
7578
7579 # Neutralize VPATH when `$srcdir' = `.'.
7580 # Shell code in configure.ac might set extrasub.
7581 # FIXME: do we really want to maintain this feature?
7582 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7583 ac_sed_extra="$ac_vpsub
7584 $extrasub
7585 _ACEOF
7586 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7587 :t
7588 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
7589 s|@configure_input@|$ac_sed_conf_input|;t t
7590 s&@top_builddir@&$ac_top_builddir_sub&;t t
7591 s&@top_build_prefix@&$ac_top_build_prefix&;t t
7592 s&@srcdir@&$ac_srcdir&;t t
7593 s&@abs_srcdir@&$ac_abs_srcdir&;t t
7594 s&@top_srcdir@&$ac_top_srcdir&;t t
7595 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
7596 s&@builddir@&$ac_builddir&;t t
7597 s&@abs_builddir@&$ac_abs_builddir&;t t
7598 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
7599 s&@INSTALL@&$ac_INSTALL&;t t
7600 $ac_datarootdir_hack
7601 "
7602 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
7603 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
7604
7605 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
7606 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
7607 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
7608 "$ac_tmp/out"`; test -z "$ac_out"; } &&
7609 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
7610 which seems to be undefined. Please make sure it is defined" >&5
7611 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
7612 which seems to be undefined. Please make sure it is defined" >&2;}
7613
7614 rm -f "$ac_tmp/stdin"
7615 case $ac_file in
7616 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
7617 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
7618 esac \
7619 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
7620 ;;
7621 :H)
7622 #
7623 # CONFIG_HEADER
7624 #
7625 if test x"$ac_file" != x-; then
7626 {
7627 $as_echo "/* $configure_input */" \
7628 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
7629 } >"$ac_tmp/config.h" \
7630 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
7631 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
7633 $as_echo "$as_me: $ac_file is unchanged" >&6;}
7634 else
7635 rm -f "$ac_file"
7636 mv "$ac_tmp/config.h" "$ac_file" \
7637 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
7638 fi
7639 else
7640 $as_echo "/* $configure_input */" \
7641 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
7642 || as_fn_error $? "could not create -" "$LINENO" 5
7643 fi
7644 ;;
7645
7646
7647 esac
7648
7649
7650 case $ac_file$ac_mode in
7651 "Makefile":F) chmod a-w Makefile ;;
7652
7653 esac
7654 done # for ac_tag
7655
7656
7657 as_fn_exit 0
7658 _ACEOF
7659 ac_clean_files=$ac_clean_files_save
7660
7661 test $ac_write_fail = 0 ||
7662 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
7663
7664
7665 # configure is writing to config.log, and then calls config.status.
7666 # config.status does its own redirection, appending to config.log.
7667 # Unfortunately, on DOS this fails, as config.log is still kept open
7668 # by configure, so config.status won't be able to write to it; its
7669 # output is simply discarded. So we exec the FD to /dev/null,
7670 # effectively closing config.log, so it can be properly (re)opened and
7671 # appended to by config.status. When coming back to configure, we
7672 # need to make the FD available again.
7673 if test "$no_create" != yes; then
7674 ac_cs_success=:
7675 ac_config_status_args=
7676 test "$silent" = yes &&
7677 ac_config_status_args="$ac_config_status_args --quiet"
7678 exec 5>/dev/null
7679 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
7680 exec 5>>config.log
7681 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
7682 # would make configure fail if this is the last instruction.
7683 $ac_cs_success || as_fn_exit 1
7684 fi
7685 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
7686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
7687 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
7688 fi
7689
+0
-51
configure.ac less more
0
1 # check for one particular file of the sources
2 AC_INIT([ocaml-faad],[0.4.0],[savonet-users@lists.sourceforge.net])
3
4 VERSION=$PACKAGE_VERSION
5 AC_MSG_RESULT([configuring $PACKAGE_STRING])
6
7 AC_BASE_CHECKS()
8
9 # Include a config.h
10 AC_CONFIG_HEADERS([config.h:config.h.in])
11 # Include it
12 CFLAGS="$CFLAGS -I.. -DHAVE_CONFIG_H"
13
14 AC_CHECK_HEADERS([errno.h])
15
16 # Check for libfaad
17 FAAC_LIBS="-lfaad -lm"
18 FAAC_CFLAGS=""
19 FAAC_CPPFLAGS=""
20 ac_save_CPPFLAGS="$CPPFLAGS"
21 ac_save_CFLAGS="$CFLAGS"
22 ac_save_LIBS="$LIBS"
23 CPPFLAGS="$CPPFLAGS $FAAC_CPPFLAGS"
24 CFLAGS="$CFLAGS $FAAC_CFLAGS"
25 LIBS="$FAAC_LIBS $LIBS"
26 AC_CHECK_HEADERS([neaacdec.h], [
27 AC_CHECK_FUNC([NeAACDecInit], [ac_have_faad="yes"])
28 ])
29 CPPFLAGS="$ac_save_CPPFLAGS"
30 CFLAGS="$ac_save_CFLAGS"
31 LIBS="$ac_save_LIBS"
32 if test "$ac_have_faad" != "yes"; then
33 AC_MSG_ERROR([Cannot find libfaad.])
34 fi
35 CPPFLAGS="$CPPFLAGS $FAAC_CPPFLAGS"
36 CFLAGS="$CFLAGS $FAAC_CFLAGS"
37 LIBS="$LIBS $FAAC_LIBS"
38
39 AC_CHECK_OCAML_BINDING([bytes],[],[],[1])
40 INC="$INC `$OCAMLFIND query bytes`"
41
42 # substitutions to perform
43 AC_SUBST(VERSION)
44 AC_SUBST(INC)
45
46 # Finally create the Makefile and samples
47 AC_CONFIG_FILES([Makefile],[chmod a-w Makefile])
48 AC_CONFIG_FILES([src/META])
49 AC_CONFIG_FILES([src/Makefile])
50 AC_OUTPUT
0 (lang dune 2.0)
1 (version 0.5.0)
2 (name faad)
3 (source (github savonet/ocaml-faad))
4 (license GPL-2.0)
5 (authors "The Savonet Team <savonet-users@lists.sourceforge.net>")
6 (maintainers "Romain Beauxis <toots@rastageeks.org>")
7
8 (generate_opam_files true)
9
10 (package
11 (name faad)
12 (synopsis "Bindings for the faad library which provides functions for decoding AAC audio files")
13 (depends
14 (dune (> 2.0))
15 dune-configurator)
16 )
+0
-9
example/Makefile less more
0 SOURCES = aac2wav.ml
1 RESULT = aac2wav
2 INCDIRS = ../src
3 LIBS = unix faad
4 OCAMLFLAGS = -g
5
6 all: nc
7
8 include OCamlMakefile
+0
-1265
example/OCamlMakefile less more
0 ###########################################################################
1 # OCamlMakefile
2 # Copyright (C) 1999-2007 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 CFLAGS_WIN32 := -mno-cygwin
133 # The default value 'cc' makes 'ocamlc -cc "cc"' raises the error 'The
134 # NTVDM CPU has encountered an illegal instruction'.
135 CC := gcc
136 # The OCaml C header files use this flag:
137 CFLAGS += -D__MINGW32__
138 endif
139 ifdef MSVC
140 export MSVC
141 WIN32 := 1
142 ifndef STATIC
143 CPPFLAGS_WIN32 := -DCAML_DLL
144 endif
145 CFLAGS_WIN32 += -nologo
146 EXT_OBJ := obj
147 EXT_LIB := lib
148 ifeq ($(CC),gcc)
149 # work around GNU Make default value
150 ifdef THREADS
151 CC := cl -MT
152 else
153 CC := cl
154 endif
155 endif
156 ifeq ($(CXX),g++)
157 # work around GNU Make default value
158 CXX := $(CC)
159 endif
160 CFLAG_O := -Fo
161 endif
162 ifdef WIN32
163 EXT_CXX := cpp
164 EXE := .exe
165 endif
166
167 ifndef EXT_OBJ
168 EXT_OBJ := o
169 endif
170 ifndef EXT_LIB
171 EXT_LIB := a
172 endif
173 ifndef EXT_CXX
174 EXT_CXX := cc
175 endif
176 ifndef EXE
177 EXE := # empty
178 endif
179 ifndef CFLAG_O
180 CFLAG_O := -o # do not delete this comment (preserves trailing whitespace)!
181 endif
182
183 export CC
184 export CXX
185 export CFLAGS
186 export CXXFLAGS
187 export LDFLAGS
188 export CPPFLAGS
189
190 ifndef RPATH_FLAG
191 ifdef ELF_RPATH_FLAG
192 RPATH_FLAG := $(ELF_RPATH_FLAG)
193 else
194 RPATH_FLAG := -R
195 endif
196 endif
197 export RPATH_FLAG
198
199 ifndef MSVC
200 ifndef PIC_CFLAGS
201 PIC_CFLAGS := -fPIC
202 endif
203 ifndef PIC_CPPFLAGS
204 PIC_CPPFLAGS := -DPIC
205 endif
206 endif
207
208 export PIC_CFLAGS
209 export PIC_CPPFLAGS
210
211 BCRESULT := $(addsuffix $(BCSUFFIX), $(RESULT))
212 NCRESULT := $(addsuffix $(NCSUFFIX), $(RESULT))
213 TOPRESULT := $(addsuffix $(TOPSUFFIX), $(RESULT))
214
215 ifndef OCAMLFIND
216 OCAMLFIND := ocamlfind
217 endif
218 export OCAMLFIND
219
220 ifndef OCAMLC
221 OCAMLC := ocamlc
222 endif
223 export OCAMLC
224
225 ifndef OCAMLOPT
226 OCAMLOPT := ocamlopt
227 endif
228 export OCAMLOPT
229
230 ifndef OCAMLMKTOP
231 OCAMLMKTOP := ocamlmktop
232 endif
233 export OCAMLMKTOP
234
235 ifndef OCAMLCP
236 OCAMLCP := ocamlcp
237 endif
238 export OCAMLCP
239
240 ifndef OCAMLDEP
241 OCAMLDEP := ocamldep
242 endif
243 export OCAMLDEP
244
245 ifndef OCAMLLEX
246 OCAMLLEX := ocamllex
247 endif
248 export OCAMLLEX
249
250 ifndef OCAMLYACC
251 OCAMLYACC := ocamlyacc
252 endif
253 export OCAMLYACC
254
255 ifndef OCAMLMKLIB
256 OCAMLMKLIB := ocamlmklib
257 endif
258 export OCAMLMKLIB
259
260 ifndef OCAML_GLADECC
261 OCAML_GLADECC := lablgladecc2
262 endif
263 export OCAML_GLADECC
264
265 ifndef OCAML_GLADECC_FLAGS
266 OCAML_GLADECC_FLAGS :=
267 endif
268 export OCAML_GLADECC_FLAGS
269
270 ifndef CAMELEON_REPORT
271 CAMELEON_REPORT := report
272 endif
273 export CAMELEON_REPORT
274
275 ifndef CAMELEON_REPORT_FLAGS
276 CAMELEON_REPORT_FLAGS :=
277 endif
278 export CAMELEON_REPORT_FLAGS
279
280 ifndef CAMELEON_ZOGGY
281 CAMELEON_ZOGGY := camlp4o pa_zog.cma pr_o.cmo
282 endif
283 export CAMELEON_ZOGGY
284
285 ifndef CAMELEON_ZOGGY_FLAGS
286 CAMELEON_ZOGGY_FLAGS :=
287 endif
288 export CAMELEON_ZOGGY_FLAGS
289
290 ifndef OXRIDL
291 OXRIDL := oxridl
292 endif
293 export OXRIDL
294
295 ifndef CAMLIDL
296 CAMLIDL := camlidl
297 endif
298 export CAMLIDL
299
300 ifndef CAMLIDLDLL
301 CAMLIDLDLL := camlidldll
302 endif
303 export CAMLIDLDLL
304
305 ifndef NOIDLHEADER
306 MAYBE_IDL_HEADER := -header
307 endif
308 export NOIDLHEADER
309
310 export NO_CUSTOM
311
312 ifndef CAMLP4
313 CAMLP4 := camlp4
314 endif
315 export CAMLP4
316
317 ifndef REAL_OCAMLFIND
318 ifdef PACKS
319 ifndef CREATE_LIB
320 ifdef THREADS
321 PACKS += threads
322 endif
323 endif
324 empty :=
325 space := $(empty) $(empty)
326 comma := ,
327 ifdef PREDS
328 PRE_OCAML_FIND_PREDICATES := $(subst $(space),$(comma),$(PREDS))
329 PRE_OCAML_FIND_PACKAGES := $(subst $(space),$(comma),$(PACKS))
330 OCAML_FIND_PREDICATES := -predicates $(PRE_OCAML_FIND_PREDICATES)
331 # OCAML_DEP_PREDICATES := -syntax $(PRE_OCAML_FIND_PREDICATES)
332 OCAML_FIND_PACKAGES := $(OCAML_FIND_PREDICATES) -package $(PRE_OCAML_FIND_PACKAGES)
333 OCAML_DEP_PACKAGES := $(OCAML_DEP_PREDICATES) -package $(PRE_OCAML_FIND_PACKAGES)
334 else
335 OCAML_FIND_PACKAGES := -package $(subst $(space),$(comma),$(PACKS))
336 OCAML_DEP_PACKAGES :=
337 endif
338 OCAML_FIND_LINKPKG := -linkpkg
339 REAL_OCAMLFIND := $(OCAMLFIND)
340 endif
341 endif
342
343 export OCAML_FIND_PACKAGES
344 export OCAML_DEP_PACKAGES
345 export OCAML_FIND_LINKPKG
346 export REAL_OCAMLFIND
347
348 ifndef OCAMLDOC
349 OCAMLDOC := ocamldoc
350 endif
351 export OCAMLDOC
352
353 ifndef LATEX
354 LATEX := latex
355 endif
356 export LATEX
357
358 ifndef DVIPS
359 DVIPS := dvips
360 endif
361 export DVIPS
362
363 ifndef PS2PDF
364 PS2PDF := ps2pdf
365 endif
366 export PS2PDF
367
368 ifndef OCAMLMAKEFILE
369 OCAMLMAKEFILE := OCamlMakefile
370 endif
371 export OCAMLMAKEFILE
372
373 ifndef OCAMLLIBPATH
374 OCAMLLIBPATH := \
375 $(shell $(OCAMLC) 2>/dev/null -where || echo /usr/lib/ocaml)
376 endif
377 export OCAMLLIBPATH
378
379 ifndef OCAML_LIB_INSTALL
380 OCAML_LIB_INSTALL := $(OCAMLLIBPATH)/contrib
381 endif
382 export OCAML_LIB_INSTALL
383
384 ###########################################################################
385
386 #################### change following sections only if
387 #################### you know what you are doing!
388
389 # delete target files when a build command fails
390 .PHONY: .DELETE_ON_ERROR
391 .DELETE_ON_ERROR:
392
393 # for pedants using "--warn-undefined-variables"
394 export MAYBE_IDL
395 export REAL_RESULT
396 export CAMLIDLFLAGS
397 export THREAD_FLAG
398 export RES_CLIB
399 export MAKEDLL
400 export ANNOT_FLAG
401 export C_OXRIDL
402 export SUBPROJS
403 export CFLAGS_WIN32
404 export CPPFLAGS_WIN32
405
406 INCFLAGS :=
407
408 SHELL := /bin/sh
409
410 MLDEPDIR := ._d
411 BCDIDIR := ._bcdi
412 NCDIDIR := ._ncdi
413
414 FILTER_EXTNS := %.mli %.ml %.mll %.mly %.idl %.oxridl %.c %.m %.$(EXT_CXX) %.rep %.zog %.glade
415
416 FILTERED := $(filter $(FILTER_EXTNS), $(SOURCES))
417 SOURCE_DIRS := $(filter-out ./, $(sort $(dir $(FILTERED))))
418
419 FILTERED_REP := $(filter %.rep, $(FILTERED))
420 DEP_REP := $(FILTERED_REP:%.rep=$(MLDEPDIR)/%.d)
421 AUTO_REP := $(FILTERED_REP:.rep=.ml)
422
423 FILTERED_ZOG := $(filter %.zog, $(FILTERED))
424 DEP_ZOG := $(FILTERED_ZOG:%.zog=$(MLDEPDIR)/%.d)
425 AUTO_ZOG := $(FILTERED_ZOG:.zog=.ml)
426
427 FILTERED_GLADE := $(filter %.glade, $(FILTERED))
428 DEP_GLADE := $(FILTERED_GLADE:%.glade=$(MLDEPDIR)/%.d)
429 AUTO_GLADE := $(FILTERED_GLADE:.glade=.ml)
430
431 FILTERED_ML := $(filter %.ml, $(FILTERED))
432 DEP_ML := $(FILTERED_ML:%.ml=$(MLDEPDIR)/%.d)
433
434 FILTERED_MLI := $(filter %.mli, $(FILTERED))
435 DEP_MLI := $(FILTERED_MLI:.mli=.di)
436
437 FILTERED_MLL := $(filter %.mll, $(FILTERED))
438 DEP_MLL := $(FILTERED_MLL:%.mll=$(MLDEPDIR)/%.d)
439 AUTO_MLL := $(FILTERED_MLL:.mll=.ml)
440
441 FILTERED_MLY := $(filter %.mly, $(FILTERED))
442 DEP_MLY := $(FILTERED_MLY:%.mly=$(MLDEPDIR)/%.d) $(FILTERED_MLY:.mly=.di)
443 AUTO_MLY := $(FILTERED_MLY:.mly=.mli) $(FILTERED_MLY:.mly=.ml)
444
445 FILTERED_IDL := $(filter %.idl, $(FILTERED))
446 DEP_IDL := $(FILTERED_IDL:%.idl=$(MLDEPDIR)/%.d) $(FILTERED_IDL:.idl=.di)
447 C_IDL := $(FILTERED_IDL:%.idl=%_stubs.c)
448 ifndef NOIDLHEADER
449 C_IDL += $(FILTERED_IDL:.idl=.h)
450 endif
451 OBJ_C_IDL := $(FILTERED_IDL:%.idl=%_stubs.$(EXT_OBJ))
452 AUTO_IDL := $(FILTERED_IDL:.idl=.mli) $(FILTERED_IDL:.idl=.ml) $(C_IDL)
453
454 FILTERED_OXRIDL := $(filter %.oxridl, $(FILTERED))
455 DEP_OXRIDL := $(FILTERED_OXRIDL:%.oxridl=$(MLDEPDIR)/%.d) $(FILTERED_OXRIDL:.oxridl=.di)
456 AUTO_OXRIDL := $(FILTERED_OXRIDL:.oxridl=.mli) $(FILTERED_OXRIDL:.oxridl=.ml) $(C_OXRIDL)
457
458 FILTERED_C_CXX := $(filter %.c %.m %.$(EXT_CXX), $(FILTERED))
459 OBJ_C_CXX := $(FILTERED_C_CXX:.c=.$(EXT_OBJ))
460 OBJ_C_CXX := $(OBJ_C_CXX:.m=.$(EXT_OBJ))
461 OBJ_C_CXX := $(OBJ_C_CXX:.$(EXT_CXX)=.$(EXT_OBJ))
462
463 PRE_TARGETS += $(AUTO_MLL) $(AUTO_MLY) $(AUTO_IDL) $(AUTO_OXRIDL) $(AUTO_ZOG) $(AUTO_REP) $(AUTO_GLADE)
464
465 ALL_DEPS := $(DEP_ML) $(DEP_MLI) $(DEP_MLL) $(DEP_MLY) $(DEP_IDL) $(DEP_OXRIDL) $(DEP_ZOG) $(DEP_REP) $(DEP_GLADE)
466
467 MLDEPS := $(filter %.d, $(ALL_DEPS))
468 MLIDEPS := $(filter %.di, $(ALL_DEPS))
469 BCDEPIS := $(MLIDEPS:%.di=$(BCDIDIR)/%.di)
470 NCDEPIS := $(MLIDEPS:%.di=$(NCDIDIR)/%.di)
471
472 ALLML := $(filter %.mli %.ml %.mll %.mly %.idl %.oxridl %.rep %.zog %.glade, $(FILTERED))
473
474 IMPLO_INTF := $(ALLML:%.mli=%.mli.__)
475 IMPLO_INTF := $(foreach file, $(IMPLO_INTF), \
476 $(basename $(file)).cmi $(basename $(file)).cmo)
477 IMPLO_INTF := $(filter-out %.mli.cmo, $(IMPLO_INTF))
478 IMPLO_INTF := $(IMPLO_INTF:%.mli.cmi=%.cmi)
479
480 IMPLX_INTF := $(IMPLO_INTF:.cmo=.cmx)
481
482 INTF := $(filter %.cmi, $(IMPLO_INTF))
483 IMPL_CMO := $(filter %.cmo, $(IMPLO_INTF))
484 IMPL_CMX := $(IMPL_CMO:.cmo=.cmx)
485 IMPL_ASM := $(IMPL_CMO:.cmo=.asm)
486 IMPL_S := $(IMPL_CMO:.cmo=.s)
487
488 OBJ_LINK := $(OBJ_C_IDL) $(OBJ_C_CXX)
489 OBJ_FILES := $(IMPL_CMO:.cmo=.$(EXT_OBJ)) $(OBJ_LINK)
490
491 EXECS := $(addsuffix $(EXE), \
492 $(sort $(TOPRESULT) $(BCRESULT) $(NCRESULT)))
493 ifdef WIN32
494 EXECS += $(BCRESULT).dll $(NCRESULT).dll
495 endif
496
497 CLIB_BASE := $(RESULT)$(RES_CLIB_SUF)
498 ifneq ($(strip $(OBJ_LINK)),)
499 RES_CLIB := lib$(CLIB_BASE).$(EXT_LIB)
500 endif
501
502 ifdef WIN32
503 DLLSONAME := $(CLIB_BASE).dll
504 else
505 DLLSONAME := dll$(CLIB_BASE).so
506 endif
507
508 NONEXECS := $(INTF) $(IMPL_CMO) $(IMPL_CMX) $(IMPL_ASM) $(IMPL_S) \
509 $(OBJ_FILES) $(PRE_TARGETS) $(BCRESULT).cma $(NCRESULT).cmxa \
510 $(NCRESULT).$(EXT_LIB) $(BCRESULT).cmi $(BCRESULT).cmo \
511 $(NCRESULT).cmi $(NCRESULT).cmx $(NCRESULT).o \
512 $(RES_CLIB) $(IMPL_CMO:.cmo=.annot) \
513 $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo $(LIB_PACK_NAME).cmx $(LIB_PACK_NAME).o
514
515 ifndef STATIC
516 NONEXECS += $(DLLSONAME)
517 endif
518
519 ifndef LIBINSTALL_FILES
520 LIBINSTALL_FILES := $(RESULT).mli $(RESULT).cmi $(RESULT).cma \
521 $(RESULT).cmxa $(RESULT).$(EXT_LIB) $(RES_CLIB)
522 ifndef STATIC
523 ifneq ($(strip $(OBJ_LINK)),)
524 LIBINSTALL_FILES += $(DLLSONAME)
525 endif
526 endif
527 endif
528
529 export LIBINSTALL_FILES
530
531 ifdef WIN32
532 # some extra stuff is created while linking DLLs
533 NONEXECS += $(BCRESULT).$(EXT_LIB) $(BCRESULT).exp $(NCRESULT).exp $(CLIB_BASE).exp $(CLIB_BASE).lib
534 endif
535
536 TARGETS := $(EXECS) $(NONEXECS)
537
538 # If there are IDL-files
539 ifneq ($(strip $(FILTERED_IDL)),)
540 MAYBE_IDL := -cclib -lcamlidl
541 endif
542
543 ifdef USE_CAMLP4
544 CAMLP4PATH := \
545 $(shell $(CAMLP4) -where 2>/dev/null || echo /usr/lib/camlp4)
546 INCFLAGS := -I $(CAMLP4PATH)
547 CINCFLAGS := -I$(CAMLP4PATH)
548 endif
549
550 DINCFLAGS := $(INCFLAGS) $(SOURCE_DIRS:%=-I %) $(OCAML_DEFAULT_DIRS:%=-I %)
551 INCFLAGS := $(DINCFLAGS) $(INCDIRS:%=-I %)
552 CINCFLAGS += $(SOURCE_DIRS:%=-I%) $(INCDIRS:%=-I%) $(OCAML_DEFAULT_DIRS:%=-I%)
553
554 ifndef MSVC
555 CLIBFLAGS += $(SOURCE_DIRS:%=-L%) $(LIBDIRS:%=-L%) \
556 $(EXTLIBDIRS:%=-L%) $(OCAML_DEFAULT_DIRS:%=-L%)
557
558 ifeq ($(ELF_RPATH), yes)
559 CLIBFLAGS += $(EXTLIBDIRS:%=-Wl,$(RPATH_FLAG)%)
560 endif
561 endif
562
563 ifndef PROFILING
564 INTF_OCAMLC := $(OCAMLC)
565 else
566 ifndef THREADS
567 INTF_OCAMLC := $(OCAMLCP) -p $(OCAMLCPFLAGS)
568 else
569 # OCaml does not support profiling byte code
570 # with threads (yet), therefore we force an error.
571 ifndef REAL_OCAMLC
572 $(error Profiling of multithreaded byte code not yet supported by OCaml)
573 endif
574 INTF_OCAMLC := $(OCAMLC)
575 endif
576 endif
577
578 ifndef MSVC
579 COMMON_LDFLAGS := $(LDFLAGS:%=-ccopt %) $(SOURCE_DIRS:%=-ccopt -L%) \
580 $(LIBDIRS:%=-ccopt -L%) $(EXTLIBDIRS:%=-ccopt -L%) \
581 $(EXTLIBDIRS:%=-ccopt -Wl $(OCAML_DEFAULT_DIRS:%=-ccopt -L%))
582
583 ifeq ($(ELF_RPATH),yes)
584 COMMON_LDFLAGS += $(EXTLIBDIRS:%=-ccopt -Wl,$(RPATH_FLAG)%)
585 endif
586 else
587 COMMON_LDFLAGS := -ccopt "/link -NODEFAULTLIB:LIBC $(LDFLAGS:%=%) $(SOURCE_DIRS:%=-LIBPATH:%) \
588 $(LIBDIRS:%=-LIBPATH:%) $(EXTLIBDIRS:%=-LIBPATH:%) \
589 $(OCAML_DEFAULT_DIRS:%=-LIBPATH:%) "
590 endif
591
592 CLIBS_OPTS := $(CLIBS:%=-cclib -l%) $(CFRAMEWORKS:%=-cclib '-framework %')
593 ifdef MSVC
594 ifndef STATIC
595 # MSVC libraries do not have 'lib' prefix
596 CLIBS_OPTS := $(CLIBS:%=-cclib %.lib)
597 endif
598 endif
599
600 ifneq ($(strip $(OBJ_LINK)),)
601 ifdef CREATE_LIB
602 OBJS_LIBS := -cclib -l$(CLIB_BASE) $(CLIBS_OPTS) $(MAYBE_IDL)
603 else
604 OBJS_LIBS := $(OBJ_LINK) $(CLIBS_OPTS) $(MAYBE_IDL)
605 endif
606 else
607 OBJS_LIBS := $(CLIBS_OPTS) $(MAYBE_IDL)
608 endif
609
610 ifdef LIB_PACK_NAME
611 FOR_PACK_NAME := $(shell echo $(LIB_PACK_NAME) | awk '{print toupper(substr($$0,1,1))substr($$0,2)}')
612 endif
613
614 # If we have to make byte-code
615 ifndef REAL_OCAMLC
616 BYTE_OCAML := y
617
618 # EXTRADEPS is added dependencies we have to insert for all
619 # executable files we generate. Ideally it should be all of the
620 # libraries we use, but it's hard to find the ones that get searched on
621 # the path since I don't know the paths built into the compiler, so
622 # just include the ones with slashes in their names.
623 EXTRADEPS := $(addsuffix .cma,$(foreach i,$(LIBS),$(if $(findstring /,$(i)),$(i))))
624
625
626 ifndef LIB_PACK_NAME
627 SPECIAL_OCAMLFLAGS := $(OCAMLBCFLAGS)
628 else
629 SPECIAL_OCAMLFLAGS := -for-pack $(FOR_PACK_NAME) $(OCAMLBCFLAGS)
630 endif
631
632 REAL_OCAMLC := $(INTF_OCAMLC)
633
634 REAL_IMPL := $(IMPL_CMO)
635 REAL_IMPL_INTF := $(IMPLO_INTF)
636 IMPL_SUF := .cmo
637
638 DEPFLAGS :=
639 MAKE_DEPS := $(MLDEPS) $(BCDEPIS)
640
641 ifdef CREATE_LIB
642 override CFLAGS := $(PIC_CFLAGS) $(CFLAGS)
643 override CPPFLAGS := $(PIC_CPPFLAGS) $(CPPFLAGS)
644 ifndef STATIC
645 ifneq ($(strip $(OBJ_LINK)),)
646 MAKEDLL := $(DLLSONAME)
647 ALL_LDFLAGS := -dllib $(DLLSONAME)
648 endif
649 endif
650 endif
651
652 ifndef NO_CUSTOM
653 ifneq "$(strip $(OBJ_LINK) $(THREADS) $(MAYBE_IDL) $(CLIBS) $(CFRAMEWORKS))" ""
654 ALL_LDFLAGS += -custom
655 endif
656 endif
657
658 ALL_LDFLAGS += $(INCFLAGS) $(OCAMLLDFLAGS) $(OCAMLBLDFLAGS) \
659 $(COMMON_LDFLAGS) $(LIBS:%=%.cma)
660 CAMLIDLDLLFLAGS :=
661
662 ifdef THREADS
663 ifdef VMTHREADS
664 THREAD_FLAG := -vmthread
665 else
666 THREAD_FLAG := -thread
667 endif
668 ALL_LDFLAGS := $(THREAD_FLAG) $(ALL_LDFLAGS)
669 ifndef CREATE_LIB
670 ifndef REAL_OCAMLFIND
671 ALL_LDFLAGS := unix.cma threads.cma $(ALL_LDFLAGS)
672 endif
673 endif
674 endif
675
676 # we have to make native-code
677 else
678 EXTRADEPS := $(addsuffix .cmxa,$(foreach i,$(LIBS),$(if $(findstring /,$(i)),$(i))))
679 ifndef PROFILING
680 SPECIAL_OCAMLFLAGS := $(OCAMLNCFLAGS)
681 PLDFLAGS :=
682 else
683 SPECIAL_OCAMLFLAGS := -p $(OCAMLNCFLAGS)
684 PLDFLAGS := -p
685 endif
686
687 ifndef LIB_PACK_NAME
688 SPECIAL_OCAMLFLAGS := $(OCAMLNCFLAGS)
689 else
690 SPECIAL_OCAMLFLAGS := -for-pack $(FOR_PACK_NAME) $(OCAMLNCFLAGS)
691 endif
692 REAL_IMPL := $(IMPL_CMX)
693 REAL_IMPL_INTF := $(IMPLX_INTF)
694 IMPL_SUF := .cmx
695
696 override CPPFLAGS := -DNATIVE_CODE $(CPPFLAGS)
697
698 DEPFLAGS := -native
699 MAKE_DEPS := $(MLDEPS) $(NCDEPIS)
700
701 ALL_LDFLAGS := $(PLDFLAGS) $(INCFLAGS) $(OCAMLLDFLAGS) \
702 $(OCAMLNLDFLAGS) $(COMMON_LDFLAGS)
703 CAMLIDLDLLFLAGS := -opt
704
705 ifndef CREATE_LIB
706 ALL_LDFLAGS += $(LIBS:%=%.cmxa)
707 else
708 override CFLAGS := $(PIC_CFLAGS) $(CFLAGS)
709 override CPPFLAGS := $(PIC_CPPFLAGS) $(CPPFLAGS)
710 endif
711
712 ifdef THREADS
713 THREAD_FLAG := -thread
714 ALL_LDFLAGS := $(THREAD_FLAG) $(ALL_LDFLAGS)
715 ifndef CREATE_LIB
716 ifndef REAL_OCAMLFIND
717 ALL_LDFLAGS := unix.cmxa threads.cmxa $(ALL_LDFLAGS)
718 endif
719 endif
720 endif
721 endif
722
723 export MAKE_DEPS
724
725 ifdef ANNOTATE
726 ANNOT_FLAG := -dtypes
727 else
728 endif
729
730 ALL_OCAMLCFLAGS := $(THREAD_FLAG) $(ANNOT_FLAG) $(OCAMLFLAGS) \
731 $(INCFLAGS) $(SPECIAL_OCAMLFLAGS)
732
733 ifdef make_deps
734 -include $(MAKE_DEPS)
735 PRE_TARGETS :=
736 endif
737
738 ###########################################################################
739 # USER RULES
740
741 # Call "OCamlMakefile QUIET=" to get rid of all of the @'s.
742 QUIET=@
743
744 # generates byte-code (default)
745 byte-code: $(PRE_TARGETS)
746 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT) \
747 REAL_RESULT="$(BCRESULT)" make_deps=yes
748 bc: byte-code
749
750 byte-code-nolink: $(PRE_TARGETS)
751 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
752 REAL_RESULT="$(BCRESULT)" make_deps=yes
753 bcnl: byte-code-nolink
754
755 top: $(PRE_TARGETS)
756 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(TOPRESULT) \
757 REAL_RESULT="$(BCRESULT)" make_deps=yes
758
759 # generates native-code
760
761 native-code: $(PRE_TARGETS)
762 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(NCRESULT) \
763 REAL_RESULT="$(NCRESULT)" \
764 REAL_OCAMLC="$(OCAMLOPT)" \
765 make_deps=yes
766 nc: native-code
767
768 native-code-nolink: $(PRE_TARGETS)
769 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
770 REAL_RESULT="$(NCRESULT)" \
771 REAL_OCAMLC="$(OCAMLOPT)" \
772 make_deps=yes
773 ncnl: native-code-nolink
774
775 # generates byte-code libraries
776 byte-code-library: $(PRE_TARGETS)
777 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
778 $(RES_CLIB) $(BCRESULT).cma \
779 REAL_RESULT="$(BCRESULT)" \
780 CREATE_LIB=yes \
781 make_deps=yes
782 bcl: byte-code-library
783
784 # generates native-code libraries
785 native-code-library: $(PRE_TARGETS)
786 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
787 $(RES_CLIB) $(NCRESULT).cmxa \
788 REAL_RESULT="$(NCRESULT)" \
789 REAL_OCAMLC="$(OCAMLOPT)" \
790 CREATE_LIB=yes \
791 make_deps=yes
792 ncl: native-code-library
793
794 ifdef WIN32
795 # generates byte-code dll
796 byte-code-dll: $(PRE_TARGETS)
797 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
798 $(RES_CLIB) $(BCRESULT).dll \
799 REAL_RESULT="$(BCRESULT)" \
800 make_deps=yes
801 bcd: byte-code-dll
802
803 # generates native-code dll
804 native-code-dll: $(PRE_TARGETS)
805 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
806 $(RES_CLIB) $(NCRESULT).dll \
807 REAL_RESULT="$(NCRESULT)" \
808 REAL_OCAMLC="$(OCAMLOPT)" \
809 make_deps=yes
810 ncd: native-code-dll
811 endif
812
813 # generates byte-code with debugging information
814 debug-code: $(PRE_TARGETS)
815 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT) \
816 REAL_RESULT="$(BCRESULT)" make_deps=yes \
817 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
818 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
819 dc: debug-code
820
821 debug-code-nolink: $(PRE_TARGETS)
822 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
823 REAL_RESULT="$(BCRESULT)" make_deps=yes \
824 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
825 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
826 dcnl: debug-code-nolink
827
828 # generates byte-code with debugging information (native code)
829 debug-native-code: $(PRE_TARGETS)
830 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(NCRESULT) \
831 REAL_RESULT="$(NCRESULT)" make_deps=yes \
832 REAL_OCAMLC="$(OCAMLOPT)" \
833 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
834 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
835 dnc: debug-native-code
836
837 debug-native-code-nolink: $(PRE_TARGETS)
838 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
839 REAL_RESULT="$(NCRESULT)" make_deps=yes \
840 REAL_OCAMLC="$(OCAMLOPT)" \
841 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
842 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
843 dncnl: debug-native-code-nolink
844
845 # generates byte-code libraries with debugging information
846 debug-code-library: $(PRE_TARGETS)
847 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
848 $(RES_CLIB) $(BCRESULT).cma \
849 REAL_RESULT="$(BCRESULT)" make_deps=yes \
850 CREATE_LIB=yes \
851 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
852 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
853 dcl: debug-code-library
854
855 # generates byte-code libraries with debugging information (native code)
856 debug-native-code-library: $(PRE_TARGETS)
857 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
858 $(RES_CLIB) $(NCRESULT).cma \
859 REAL_RESULT="$(NCRESULT)" make_deps=yes \
860 REAL_OCAMLC="$(OCAMLOPT)" \
861 CREATE_LIB=yes \
862 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
863 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
864 dncl: debug-native-code-library
865
866 # generates byte-code for profiling
867 profiling-byte-code: $(PRE_TARGETS)
868 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT) \
869 REAL_RESULT="$(BCRESULT)" PROFILING="y" \
870 make_deps=yes
871 pbc: profiling-byte-code
872
873 # generates native-code
874
875 profiling-native-code: $(PRE_TARGETS)
876 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(NCRESULT) \
877 REAL_RESULT="$(NCRESULT)" \
878 REAL_OCAMLC="$(OCAMLOPT)" \
879 PROFILING="y" \
880 make_deps=yes
881 pnc: profiling-native-code
882
883 # generates byte-code libraries
884 profiling-byte-code-library: $(PRE_TARGETS)
885 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
886 $(RES_CLIB) $(BCRESULT).cma \
887 REAL_RESULT="$(BCRESULT)" PROFILING="y" \
888 CREATE_LIB=yes \
889 make_deps=yes
890 pbcl: profiling-byte-code-library
891
892 # generates native-code libraries
893 profiling-native-code-library: $(PRE_TARGETS)
894 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
895 $(RES_CLIB) $(NCRESULT).cmxa \
896 REAL_RESULT="$(NCRESULT)" PROFILING="y" \
897 REAL_OCAMLC="$(OCAMLOPT)" \
898 CREATE_LIB=yes \
899 make_deps=yes
900 pncl: profiling-native-code-library
901
902 # packs byte-code objects
903 pack-byte-code: $(PRE_TARGETS)
904 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT).cmo \
905 REAL_RESULT="$(BCRESULT)" \
906 PACK_LIB=yes make_deps=yes
907 pabc: pack-byte-code
908
909 # packs native-code objects
910 pack-native-code: $(PRE_TARGETS)
911 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
912 $(NCRESULT).cmx $(NCRESULT).o \
913 REAL_RESULT="$(NCRESULT)" \
914 REAL_OCAMLC="$(OCAMLOPT)" \
915 PACK_LIB=yes make_deps=yes
916 panc: pack-native-code
917
918 # generates HTML-documentation
919 htdoc: $(DOC_DIR)/$(RESULT)/html/index.html
920
921 # generates Latex-documentation
922 ladoc: $(DOC_DIR)/$(RESULT)/latex/doc.tex
923
924 # generates PostScript-documentation
925 psdoc: $(DOC_DIR)/$(RESULT)/latex/doc.ps
926
927 # generates PDF-documentation
928 pdfdoc: $(DOC_DIR)/$(RESULT)/latex/doc.pdf
929
930 # generates all supported forms of documentation
931 doc: htdoc ladoc psdoc pdfdoc
932
933 ###########################################################################
934 # LOW LEVEL RULES
935
936 $(REAL_RESULT): $(REAL_IMPL_INTF) $(OBJ_LINK) $(EXTRADEPS) $(RESULTDEPS)
937 $(REAL_OCAMLFIND) $(REAL_OCAMLC) \
938 $(OCAML_FIND_PACKAGES) $(OCAML_FIND_LINKPKG) \
939 $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@$(EXE) \
940 $(REAL_IMPL)
941
942 nolink: $(REAL_IMPL_INTF) $(OBJ_LINK)
943
944 ifdef WIN32
945 $(REAL_RESULT).dll: $(REAL_IMPL_INTF) $(OBJ_LINK)
946 $(CAMLIDLDLL) $(CAMLIDLDLLFLAGS) $(OBJ_LINK) $(CLIBS) \
947 -o $@ $(REAL_IMPL)
948 endif
949
950 %$(TOPSUFFIX): $(REAL_IMPL_INTF) $(OBJ_LINK) $(EXTRADEPS)
951 $(REAL_OCAMLFIND) $(OCAMLMKTOP) \
952 $(OCAML_FIND_PACKAGES) $(OCAML_FIND_LINKPKG) \
953 $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@$(EXE) \
954 $(REAL_IMPL)
955
956 .SUFFIXES: .mli .ml .cmi .cmo .cmx .cma .cmxa .$(EXT_OBJ) \
957 .mly .di .d .$(EXT_LIB) .idl %.oxridl .c .m .$(EXT_CXX) .h .so \
958 .rep .zog .glade
959
960 ifndef STATIC
961 ifdef MINGW
962 $(DLLSONAME): $(OBJ_LINK)
963 $(CC) $(CFLAGS) $(CFLAGS_WIN32) $(OBJ_LINK) -shared -o $@ \
964 -Wl,--whole-archive $(wildcard $(foreach dir,$(LIBDIRS),$(CLIBS:%=$(dir)/lib%.a))) \
965 '$(OCAMLLIBPATH)/ocamlrun.a' \
966 -Wl,--export-all-symbols \
967 -Wl,--no-whole-archive \
968 -Wl,--allow-multiple-definition \
969 -Wl,--enable-auto-import
970 else
971 ifdef MSVC
972 $(DLLSONAME): $(OBJ_LINK)
973 link /NOLOGO /DLL /OUT:$@ $(OBJ_LINK) \
974 $(wildcard $(foreach dir,$(LIBDIRS),$(CLIBS:%=$(dir)/%.lib))) \
975 '$(OCAMLLIBPATH)/ocamlrun.lib'
976
977 else
978 $(DLLSONAME): $(OBJ_LINK)
979 $(OCAMLMKLIB) $(INCFLAGS) $(CLIBFLAGS) \
980 -o $(CLIB_BASE) $(OBJ_LINK) $(CLIBS:%=-l%) $(CFRAMEWORKS:%=-framework %) \
981 $(OCAMLMKLIB_FLAGS)
982 endif
983 endif
984 endif
985
986 ifndef LIB_PACK_NAME
987 $(RESULT).cma: $(REAL_IMPL_INTF) $(MAKEDLL) $(EXTRADEPS) $(RESULTDEPS)
988 $(REAL_OCAMLFIND) $(REAL_OCAMLC) -a $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@ $(REAL_IMPL)
989
990 $(RESULT).cmxa $(RESULT).$(EXT_LIB): $(REAL_IMPL_INTF) $(EXTRADEPS) $(RESULTDEPS)
991 $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@ $(REAL_IMPL)
992 else
993 # Packing a bytecode library
994 ifdef BYTE_OCAML
995 $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo: $(REAL_IMPL_INTF)
996 $(REAL_OCAMLFIND) $(REAL_OCAMLC) -pack -o $(LIB_PACK_NAME).cmo $(OCAMLLDFLAGS) $(REAL_IMPL)
997 # Packing into a unit which can be transformed into a library
998 # Remember the .ml's must have been compiled with -for-pack $(LIB_PACK_NAME)
999 else
1000 $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmx: $(REAL_IMPL_INTF)
1001 $(REAL_OCAMLFIND) $(OCAMLOPT) -pack -o $(LIB_PACK_NAME).cmx $(OCAMLLDFLAGS) $(REAL_IMPL)
1002 endif
1003
1004 $(RESULT).cma: $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo $(MAKEDLL) $(EXTRADEPS) $(RESULTDEPS)
1005 $(REAL_OCAMLFIND) $(REAL_OCAMLC) -a $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@ $(LIB_PACK_NAME).cmo
1006
1007 $(RESULT).cmxa $(RESULT).$(EXT_LIB): $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmx $(EXTRADEPS) $(RESULTDEPS)
1008 $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(filter-out -custom, $(ALL_LDFLAGS)) $(OBJS_LIBS) -o $@ $(LIB_PACK_NAME).cmx
1009 endif
1010
1011 $(RES_CLIB): $(OBJ_LINK)
1012 ifndef MSVC
1013 ifneq ($(strip $(OBJ_LINK)),)
1014 $(AR) rcs $@ $(OBJ_LINK)
1015 endif
1016 else
1017 ifneq ($(strip $(OBJ_LINK)),)
1018 lib -nologo -debugtype:cv -out:$(RES_CLIB) $(OBJ_LINK)
1019 endif
1020 endif
1021
1022 .mli.cmi: $(EXTRADEPS)
1023 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
1024 if [ -z "$$pp" ]; then \
1025 $(ECHO) $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
1026 -c $(THREAD_FLAG) $(ANNOT_FLAG) \
1027 $(OCAMLFLAGS) $(INCFLAGS) $<; \
1028 $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
1029 -c $(THREAD_FLAG) $(ANNOT_FLAG) \
1030 $(OCAMLFLAGS) $(INCFLAGS) $<; \
1031 else \
1032 $(ECHO) $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
1033 -c -pp \"$$pp $(PPFLAGS)\" $(THREAD_FLAG) $(ANNOT_FLAG) \
1034 $(OCAMLFLAGS) $(INCFLAGS) $<; \
1035 $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
1036 -c -pp "$$pp $(PPFLAGS)" $(THREAD_FLAG) $(ANNOT_FLAG) \
1037 $(OCAMLFLAGS) $(INCFLAGS) $<; \
1038 fi
1039
1040 .ml.cmi .ml.$(EXT_OBJ) .ml.cmx .ml.cmo: $(EXTRADEPS)
1041 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
1042 if [ -z "$$pp" ]; then \
1043 $(ECHO) $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
1044 -c $(ALL_OCAMLCFLAGS) $<; \
1045 $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
1046 -c $(ALL_OCAMLCFLAGS) $<; \
1047 else \
1048 $(ECHO) $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
1049 -c -pp \"$$pp $(PPFLAGS)\" $(ALL_OCAMLCFLAGS) $<; \
1050 $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
1051 -c -pp "$$pp $(PPFLAGS)" $(ALL_OCAMLCFLAGS) $<; \
1052 fi
1053
1054 .PRECIOUS: %.ml
1055 %.ml: %.mll
1056 $(OCAMLLEX) $(LFLAGS) $<
1057
1058 .PRECIOUS: %.ml %.mli
1059 %.ml %.mli: %.mly
1060 $(OCAMLYACC) $(YFLAGS) $<
1061 $(QUIET)pp=`sed -n -e 's/.*(\*pp \([^*]*\) \*).*/\1/p;q' $<`; \
1062 if [ ! -z "$$pp" ]; then \
1063 mv $*.ml $*.ml.temporary; \
1064 echo "(*pp $$pp $(PPFLAGS)*)" > $*.ml; \
1065 cat $*.ml.temporary >> $*.ml; \
1066 rm $*.ml.temporary; \
1067 mv $*.mli $*.mli.temporary; \
1068 echo "(*pp $$pp $(PPFLAGS)*)" > $*.mli; \
1069 cat $*.mli.temporary >> $*.mli; \
1070 rm $*.mli.temporary; \
1071 fi
1072
1073
1074 .PRECIOUS: %.ml
1075 %.ml: %.rep
1076 $(CAMELEON_REPORT) $(CAMELEON_REPORT_FLAGS) -gen $<
1077
1078 .PRECIOUS: %.ml
1079 %.ml: %.zog
1080 $(CAMELEON_ZOGGY) $(CAMELEON_ZOGGY_FLAGS) -impl $< > $@
1081
1082 .PRECIOUS: %.ml
1083 %.ml: %.glade
1084 $(OCAML_GLADECC) $(OCAML_GLADECC_FLAGS) $< > $@
1085
1086 .PRECIOUS: %.ml %.mli
1087 %.ml %.mli: %.oxridl
1088 $(OXRIDL) $<
1089
1090 .PRECIOUS: %.ml %.mli %_stubs.c %.h
1091 %.ml %.mli %_stubs.c %.h: %.idl
1092 $(CAMLIDL) $(MAYBE_IDL_HEADER) $(IDLFLAGS) \
1093 $(CAMLIDLFLAGS) $<
1094 $(QUIET)if [ $(NOIDLHEADER) ]; then touch $*.h; fi
1095
1096 .c.$(EXT_OBJ):
1097 $(OCAMLC) -c -cc "$(CC)" -ccopt "$(CFLAGS) \
1098 $(CPPFLAGS) $(CPPFLAGS_WIN32) \
1099 $(CFLAGS_WIN32) $(CINCFLAGS) $(CFLAG_O)$@ " $<
1100
1101 .m.$(EXT_OBJ):
1102 $(CC) -c $(CFLAGS) $(CINCFLAGS) $(CPPFLAGS) \
1103 -I'$(OCAMLLIBPATH)' \
1104 $< $(CFLAG_O)$@
1105
1106 .$(EXT_CXX).$(EXT_OBJ):
1107 $(CXX) -c $(CXXFLAGS) $(CINCFLAGS) $(CPPFLAGS) \
1108 -I'$(OCAMLLIBPATH)' \
1109 $< $(CFLAG_O)$@
1110
1111 $(MLDEPDIR)/%.d: %.ml
1112 $(QUIET)if [ ! -d $(@D) ]; then mkdir -p $(@D); fi
1113 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
1114 if [ -z "$$pp" ]; then \
1115 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
1116 $(DINCFLAGS) $< \> $@; \
1117 $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
1118 $(DINCFLAGS) $< > $@; \
1119 else \
1120 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
1121 -pp \"$$pp $(PPFLAGS)\" $(DINCFLAGS) $< \> $@; \
1122 $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
1123 -pp "$$pp $(PPFLAGS)" $(DINCFLAGS) $< > $@; \
1124 fi
1125
1126 $(BCDIDIR)/%.di $(NCDIDIR)/%.di: %.mli
1127 $(QUIET)if [ ! -d $(@D) ]; then mkdir -p $(@D); fi
1128 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
1129 if [ -z "$$pp" ]; then \
1130 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) $(DINCFLAGS) $< \> $@; \
1131 $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) $(DINCFLAGS) $< > $@; \
1132 else \
1133 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) \
1134 -pp \"$$pp $(PPFLAGS)\" $(DINCFLAGS) $< \> $@; \
1135 $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) \
1136 -pp "$$pp $(PPFLAGS)" $(DINCFLAGS) $< > $@; \
1137 fi
1138
1139 $(DOC_DIR)/$(RESULT)/html:
1140 mkdir -p $@
1141
1142 $(DOC_DIR)/$(RESULT)/html/index.html: $(DOC_DIR)/$(RESULT)/html $(DOC_FILES)
1143 rm -rf $</*
1144 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $(FIRST_DOC_FILE)`; \
1145 if [ -z "$$pp" ]; then \
1146 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -html -d $< $(OCAMLDOCFLAGS) $(INCFLAGS) $(DOC_FILES); \
1147 $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -html -d $< $(OCAMLDOCFLAGS) $(INCFLAGS) $(DOC_FILES); \
1148 else \
1149 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -pp \"$$pp $(PPFLAGS)\" -html -d $< $(OCAMLDOCFLAGS) \
1150 $(INCFLAGS) $(DOC_FILES); \
1151 $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -pp "$$pp $(PPFLAGS)" -html -d $< $(OCAMLDOCFLAGS) \
1152 $(INCFLAGS) $(DOC_FILES); \
1153 fi
1154
1155 $(DOC_DIR)/$(RESULT)/latex:
1156 mkdir -p $@
1157
1158 $(DOC_DIR)/$(RESULT)/latex/doc.tex: $(DOC_DIR)/$(RESULT)/latex $(DOC_FILES)
1159 rm -rf $</*
1160 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $(FIRST_DOC_FILE)`; \
1161 if [ -z "$$pp" ]; then \
1162 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -latex $(OCAMLDOCFLAGS) $(INCFLAGS) \
1163 $(DOC_FILES) -o $@; \
1164 $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -latex $(OCAMLDOCFLAGS) $(INCFLAGS) $(DOC_FILES) \
1165 -o $@; \
1166 else \
1167 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -pp \"$$pp $(PPFLAGS)\" -latex $(OCAMLDOCFLAGS) \
1168 $(INCFLAGS) $(DOC_FILES) -o $@; \
1169 $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -pp "$$pp $(PPFLAGS)" -latex $(OCAMLDOCFLAGS) \
1170 $(INCFLAGS) $(DOC_FILES) -o $@; \
1171 fi
1172
1173 $(DOC_DIR)/$(RESULT)/latex/doc.ps: $(DOC_DIR)/$(RESULT)/latex/doc.tex
1174 cd $(DOC_DIR)/$(RESULT)/latex && \
1175 $(LATEX) doc.tex && \
1176 $(LATEX) doc.tex && \
1177 $(DVIPS) $(DVIPSFLAGS) doc.dvi -o $(@F)
1178
1179 $(DOC_DIR)/$(RESULT)/latex/doc.pdf: $(DOC_DIR)/$(RESULT)/latex/doc.ps
1180 cd $(DOC_DIR)/$(RESULT)/latex && $(PS2PDF) $(<F)
1181
1182 define make_subproj
1183 .PHONY:
1184 subproj_$(1):
1185 $$(eval $$(call PROJ_$(1)))
1186 $(QUIET)if [ "$(SUBTARGET)" != "all" ]; then \
1187 $(MAKE) -f $(OCAMLMAKEFILE) $(SUBTARGET); \
1188 fi
1189 endef
1190
1191 $(foreach subproj,$(SUBPROJS),$(eval $(call make_subproj,$(subproj))))
1192
1193 .PHONY:
1194 subprojs: $(SUBPROJS:%=subproj_%)
1195
1196 ###########################################################################
1197 # (UN)INSTALL RULES FOR LIBRARIES
1198
1199 .PHONY: libinstall
1200 libinstall: all
1201 $(QUIET)printf "\nInstalling library with ocamlfind\n"
1202 $(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META $(LIBINSTALL_FILES)
1203 $(QUIET)printf "\nInstallation successful.\n"
1204
1205 .PHONY: libinstall-byte-code
1206 libinstall-byte-code: all
1207 $(QUIET)printf "\nInstalling byte-code library with ocamlfind\n"
1208 $(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META \
1209 $(filter-out $(RESULT).$(EXT_LIB) $(RESULT).cmxa, $(LIBINSTALL_FILES))
1210 $(QUIET)printf "\nInstallation successful.\n"
1211
1212 .PHONY: libinstall-native-code
1213 libinstall-native-code: all
1214 $(QUIET)printf "\nInstalling native-code library with ocamlfind\n"
1215 $(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META \
1216 $(filter-out $(DLLSONAME) $(RESULT).cma, $(LIBINSTALL_FILES))
1217 $(QUIET)printf "\nInstallation successful.\n"
1218
1219 .PHONY: libuninstall
1220 libuninstall:
1221 $(QUIET)printf "\nUninstalling library with ocamlfind\n"
1222 $(OCAMLFIND) remove $(OCAMLFIND_INSTFLAGS) $(RESULT)
1223 $(QUIET)printf "\nUninstallation successful.\n"
1224
1225 .PHONY: rawinstall
1226 rawinstall: all
1227 $(QUIET)printf "\nInstalling library to: $(OCAML_LIB_INSTALL)\n"
1228 -install -d $(OCAML_LIB_INSTALL)
1229 for i in $(LIBINSTALL_FILES); do \
1230 if [ -f $$i ]; then \
1231 install -c -m 0644 $$i $(OCAML_LIB_INSTALL); \
1232 fi; \
1233 done
1234 $(QUIET)printf "\nInstallation successful.\n"
1235
1236 .PHONY: rawuninstall
1237 rawuninstall:
1238 $(QUIET)printf "\nUninstalling library from: $(OCAML_LIB_INSTALL)\n"
1239 cd $(OCAML_LIB_INSTALL) && rm $(notdir $(LIBINSTALL_FILES))
1240 $(QUIET)printf "\nUninstallation successful.\n"
1241
1242 ###########################################################################
1243 # MAINTENANCE RULES
1244
1245 .PHONY: clean
1246 clean::
1247 rm -f $(TARGETS) $(TRASH)
1248 rm -rf $(BCDIDIR) $(NCDIDIR) $(MLDEPDIR)
1249
1250 .PHONY: cleanup
1251 cleanup::
1252 rm -f $(NONEXECS) $(TRASH)
1253 rm -rf $(BCDIDIR) $(NCDIDIR) $(MLDEPDIR)
1254
1255 .PHONY: clean-doc
1256 clean-doc::
1257 rm -rf $(DOC_DIR)/$(RESULT)
1258
1259 .PHONY: clean-all
1260 clean-all:: clean clean-doc
1261
1262 .PHONY: nobackup
1263 nobackup:
1264 rm -f *.bak *~ *.dup
2828 let src = ref ""
2929 let dst = ref ""
3030
31 open Unix
32
3331 let output_int chan n =
3432 output_char chan (char_of_int ((n lsr 0) land 0xff));
3533 output_char chan (char_of_int ((n lsr 8) land 0xff));
6058 );
6159
6260 let buflen = 1024 in
63 let buf = String.create buflen in
61 let buf = Bytes.create buflen in
6462 let f = Unix.openfile !src [Unix.O_RDONLY] 0o400 in
6563 let dec = Faad.create () in
6664
7270 for c = 0 to channels - 1 do
7371 let n = a.(c).(i) *. 32767. in
7472 let n = int_of_float n in
75 tmp.[2 * (i * channels + c)] <- char_of_int (n land 0xff);
76 tmp.[2 * (i * channels + c) + 1] <- char_of_int ((n lsr 8) land 0xff)
73 Bytes.set tmp (2 * (i * channels + c)) (char_of_int (n land 0xff));
74 Bytes.set tmp (2 * (i * channels + c) + 1) (char_of_int ((n lsr 8) land 0xff));
7775 done
7876 done;
7977 outbuf := !outbuf ^ (Bytes.to_string tmp)
103101 let offset, samplerate, channels = Faad.init dec buf 0 len in
104102 let buflen = Faad.min_bytes_per_channel * channels in
105103 let consumed = ref buflen in
106 let aacbuf = String.create buflen in
104 let aacbuf = Bytes.create buflen in
107105
108106 let fill_in () =
109107 Bytes.blit aacbuf !consumed aacbuf 0 (buflen - !consumed);
0 (executable
1 (name aac2wav)
2 (libraries unix faad))
0 # This file is generated by dune, edit dune-project instead
1 opam-version: "2.0"
2 version: "0.5.0"
3 synopsis:
4 "Bindings for the faad library which provides functions for decoding AAC audio files"
5 maintainer: ["Romain Beauxis <toots@rastageeks.org>"]
6 authors: ["The Savonet Team <savonet-users@lists.sourceforge.net>"]
7 license: "GPL-2.0"
8 homepage: "https://github.com/savonet/ocaml-faad"
9 bug-reports: "https://github.com/savonet/ocaml-faad/issues"
10 depends: [
11 "dune" {> "2.0"}
12 "dune-configurator"
13 ]
14 build: [
15 ["dune" "subst"] {pinned}
16 [
17 "dune"
18 "build"
19 "-p"
20 name
21 "-j"
22 jobs
23 "@install"
24 "@runtest" {with-test}
25 "@doc" {with-doc}
26 ]
27 ]
28 dev-repo: "git+https://github.com/savonet/ocaml-faad.git"
29 depexts: [
30 ["faad2-dev"] {os-distribution = "alpine"}
31 ["faad2"] {os-distribution = "arch"}
32 ["faad2-devel"] {os-distribution = "centos"}
33 ["faad2-devel"] {os-distribution = "fedora"}
34 ["faad2-devel"] {os-family = "suse"}
35 ["libfaad-dev"] {os-family = "debian"}
36 ["faad2"] {os = "macos" & os-distribution = "homebrew"}
37 ]
0 depexts: [
1 ["faad2-dev"] {os-distribution = "alpine"}
2 ["faad2"] {os-distribution = "arch"}
3 ["faad2-devel"] {os-distribution = "centos"}
4 ["faad2-devel"] {os-distribution = "fedora"}
5 ["faad2-devel"] {os-family = "suse"}
6 ["libfaad-dev"] {os-family = "debian"}
7 ["faad2"] {os = "macos" & os-distribution = "homebrew"}
8 ]
+0
-518
install-sh less more
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2018-03-11.20; # UTC
4
5 # This originates from X11R5 (mit/util/scripts/install.sh), which was
6 # later released in X11R6 (xc/config/util/install.sh) with the
7 # following copyright and license.
8 #
9 # Copyright (C) 1994 X Consortium
10 #
11 # Permission is hereby granted, free of charge, to any person obtaining a copy
12 # of this software and associated documentation files (the "Software"), to
13 # deal in the Software without restriction, including without limitation the
14 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15 # sell copies of the Software, and to permit persons to whom the Software is
16 # furnished to do so, subject to the following conditions:
17 #
18 # The above copyright notice and this permission notice shall be included in
19 # all copies or substantial portions of the Software.
20 #
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
25 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
26 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #
28 # Except as contained in this notice, the name of the X Consortium shall not
29 # be used in advertising or otherwise to promote the sale, use or other deal-
30 # ings in this Software without prior written authorization from the X Consor-
31 # tium.
32 #
33 #
34 # FSF changes to this file are in the public domain.
35 #
36 # Calling this script install-sh is preferred over install.sh, to prevent
37 # 'make' implicit rules from creating a file called install from it
38 # when there is no Makefile.
39 #
40 # This script is compatible with the BSD install script, but was written
41 # from scratch.
42
43 tab=' '
44 nl='
45 '
46 IFS=" $tab$nl"
47
48 # Set DOITPROG to "echo" to test this script.
49
50 doit=${DOITPROG-}
51 doit_exec=${doit:-exec}
52
53 # Put in absolute file names if you don't have them in your path;
54 # or use environment vars.
55
56 chgrpprog=${CHGRPPROG-chgrp}
57 chmodprog=${CHMODPROG-chmod}
58 chownprog=${CHOWNPROG-chown}
59 cmpprog=${CMPPROG-cmp}
60 cpprog=${CPPROG-cp}
61 mkdirprog=${MKDIRPROG-mkdir}
62 mvprog=${MVPROG-mv}
63 rmprog=${RMPROG-rm}
64 stripprog=${STRIPPROG-strip}
65
66 posix_mkdir=
67
68 # Desired mode of installed file.
69 mode=0755
70
71 chgrpcmd=
72 chmodcmd=$chmodprog
73 chowncmd=
74 mvcmd=$mvprog
75 rmcmd="$rmprog -f"
76 stripcmd=
77
78 src=
79 dst=
80 dir_arg=
81 dst_arg=
82
83 copy_on_change=false
84 is_target_a_directory=possibly
85
86 usage="\
87 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
88 or: $0 [OPTION]... SRCFILES... DIRECTORY
89 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
90 or: $0 [OPTION]... -d DIRECTORIES...
91
92 In the 1st form, copy SRCFILE to DSTFILE.
93 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
94 In the 4th, create DIRECTORIES.
95
96 Options:
97 --help display this help and exit.
98 --version display version info and exit.
99
100 -c (ignored)
101 -C install only if different (preserve the last data modification time)
102 -d create directories instead of installing files.
103 -g GROUP $chgrpprog installed files to GROUP.
104 -m MODE $chmodprog installed files to MODE.
105 -o USER $chownprog installed files to USER.
106 -s $stripprog installed files.
107 -t DIRECTORY install into DIRECTORY.
108 -T report an error if DSTFILE is a directory.
109
110 Environment variables override the default commands:
111 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
112 RMPROG STRIPPROG
113 "
114
115 while test $# -ne 0; do
116 case $1 in
117 -c) ;;
118
119 -C) copy_on_change=true;;
120
121 -d) dir_arg=true;;
122
123 -g) chgrpcmd="$chgrpprog $2"
124 shift;;
125
126 --help) echo "$usage"; exit $?;;
127
128 -m) mode=$2
129 case $mode in
130 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
131 echo "$0: invalid mode: $mode" >&2
132 exit 1;;
133 esac
134 shift;;
135
136 -o) chowncmd="$chownprog $2"
137 shift;;
138
139 -s) stripcmd=$stripprog;;
140
141 -t)
142 is_target_a_directory=always
143 dst_arg=$2
144 # Protect names problematic for 'test' and other utilities.
145 case $dst_arg in
146 -* | [=\(\)!]) dst_arg=./$dst_arg;;
147 esac
148 shift;;
149
150 -T) is_target_a_directory=never;;
151
152 --version) echo "$0 $scriptversion"; exit $?;;
153
154 --) shift
155 break;;
156
157 -*) echo "$0: invalid option: $1" >&2
158 exit 1;;
159
160 *) break;;
161 esac
162 shift
163 done
164
165 # We allow the use of options -d and -T together, by making -d
166 # take the precedence; this is for compatibility with GNU install.
167
168 if test -n "$dir_arg"; then
169 if test -n "$dst_arg"; then
170 echo "$0: target directory not allowed when installing a directory." >&2
171 exit 1
172 fi
173 fi
174
175 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
176 # When -d is used, all remaining arguments are directories to create.
177 # When -t is used, the destination is already specified.
178 # Otherwise, the last argument is the destination. Remove it from $@.
179 for arg
180 do
181 if test -n "$dst_arg"; then
182 # $@ is not empty: it contains at least $arg.
183 set fnord "$@" "$dst_arg"
184 shift # fnord
185 fi
186 shift # arg
187 dst_arg=$arg
188 # Protect names problematic for 'test' and other utilities.
189 case $dst_arg in
190 -* | [=\(\)!]) dst_arg=./$dst_arg;;
191 esac
192 done
193 fi
194
195 if test $# -eq 0; then
196 if test -z "$dir_arg"; then
197 echo "$0: no input file specified." >&2
198 exit 1
199 fi
200 # It's OK to call 'install-sh -d' without argument.
201 # This can happen when creating conditional directories.
202 exit 0
203 fi
204
205 if test -z "$dir_arg"; then
206 if test $# -gt 1 || test "$is_target_a_directory" = always; then
207 if test ! -d "$dst_arg"; then
208 echo "$0: $dst_arg: Is not a directory." >&2
209 exit 1
210 fi
211 fi
212 fi
213
214 if test -z "$dir_arg"; then
215 do_exit='(exit $ret); exit $ret'
216 trap "ret=129; $do_exit" 1
217 trap "ret=130; $do_exit" 2
218 trap "ret=141; $do_exit" 13
219 trap "ret=143; $do_exit" 15
220
221 # Set umask so as not to create temps with too-generous modes.
222 # However, 'strip' requires both read and write access to temps.
223 case $mode in
224 # Optimize common cases.
225 *644) cp_umask=133;;
226 *755) cp_umask=22;;
227
228 *[0-7])
229 if test -z "$stripcmd"; then
230 u_plus_rw=
231 else
232 u_plus_rw='% 200'
233 fi
234 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
235 *)
236 if test -z "$stripcmd"; then
237 u_plus_rw=
238 else
239 u_plus_rw=,u+rw
240 fi
241 cp_umask=$mode$u_plus_rw;;
242 esac
243 fi
244
245 for src
246 do
247 # Protect names problematic for 'test' and other utilities.
248 case $src in
249 -* | [=\(\)!]) src=./$src;;
250 esac
251
252 if test -n "$dir_arg"; then
253 dst=$src
254 dstdir=$dst
255 test -d "$dstdir"
256 dstdir_status=$?
257 else
258
259 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
260 # might cause directories to be created, which would be especially bad
261 # if $src (and thus $dsttmp) contains '*'.
262 if test ! -f "$src" && test ! -d "$src"; then
263 echo "$0: $src does not exist." >&2
264 exit 1
265 fi
266
267 if test -z "$dst_arg"; then
268 echo "$0: no destination specified." >&2
269 exit 1
270 fi
271 dst=$dst_arg
272
273 # If destination is a directory, append the input filename.
274 if test -d "$dst"; then
275 if test "$is_target_a_directory" = never; then
276 echo "$0: $dst_arg: Is a directory" >&2
277 exit 1
278 fi
279 dstdir=$dst
280 dstbase=`basename "$src"`
281 case $dst in
282 */) dst=$dst$dstbase;;
283 *) dst=$dst/$dstbase;;
284 esac
285 dstdir_status=0
286 else
287 dstdir=`dirname "$dst"`
288 test -d "$dstdir"
289 dstdir_status=$?
290 fi
291 fi
292
293 case $dstdir in
294 */) dstdirslash=$dstdir;;
295 *) dstdirslash=$dstdir/;;
296 esac
297
298 obsolete_mkdir_used=false
299
300 if test $dstdir_status != 0; then
301 case $posix_mkdir in
302 '')
303 # Create intermediate dirs using mode 755 as modified by the umask.
304 # This is like FreeBSD 'install' as of 1997-10-28.
305 umask=`umask`
306 case $stripcmd.$umask in
307 # Optimize common cases.
308 *[2367][2367]) mkdir_umask=$umask;;
309 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
310
311 *[0-7])
312 mkdir_umask=`expr $umask + 22 \
313 - $umask % 100 % 40 + $umask % 20 \
314 - $umask % 10 % 4 + $umask % 2
315 `;;
316 *) mkdir_umask=$umask,go-w;;
317 esac
318
319 # With -d, create the new directory with the user-specified mode.
320 # Otherwise, rely on $mkdir_umask.
321 if test -n "$dir_arg"; then
322 mkdir_mode=-m$mode
323 else
324 mkdir_mode=
325 fi
326
327 posix_mkdir=false
328 case $umask in
329 *[123567][0-7][0-7])
330 # POSIX mkdir -p sets u+wx bits regardless of umask, which
331 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
332 ;;
333 *)
334 # Note that $RANDOM variable is not portable (e.g. dash); Use it
335 # here however when possible just to lower collision chance.
336 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
337
338 trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
339
340 # Because "mkdir -p" follows existing symlinks and we likely work
341 # directly in world-writeable /tmp, make sure that the '$tmpdir'
342 # directory is successfully created first before we actually test
343 # 'mkdir -p' feature.
344 if (umask $mkdir_umask &&
345 $mkdirprog $mkdir_mode "$tmpdir" &&
346 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
347 then
348 if test -z "$dir_arg" || {
349 # Check for POSIX incompatibilities with -m.
350 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
351 # other-writable bit of parent directory when it shouldn't.
352 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
353 test_tmpdir="$tmpdir/a"
354 ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
355 case $ls_ld_tmpdir in
356 d????-?r-*) different_mode=700;;
357 d????-?--*) different_mode=755;;
358 *) false;;
359 esac &&
360 $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
361 ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
362 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
363 }
364 }
365 then posix_mkdir=:
366 fi
367 rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
368 else
369 # Remove any dirs left behind by ancient mkdir implementations.
370 rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
371 fi
372 trap '' 0;;
373 esac;;
374 esac
375
376 if
377 $posix_mkdir && (
378 umask $mkdir_umask &&
379 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
380 )
381 then :
382 else
383
384 # The umask is ridiculous, or mkdir does not conform to POSIX,
385 # or it failed possibly due to a race condition. Create the
386 # directory the slow way, step by step, checking for races as we go.
387
388 case $dstdir in
389 /*) prefix='/';;
390 [-=\(\)!]*) prefix='./';;
391 *) prefix='';;
392 esac
393
394 oIFS=$IFS
395 IFS=/
396 set -f
397 set fnord $dstdir
398 shift
399 set +f
400 IFS=$oIFS
401
402 prefixes=
403
404 for d
405 do
406 test X"$d" = X && continue
407
408 prefix=$prefix$d
409 if test -d "$prefix"; then
410 prefixes=
411 else
412 if $posix_mkdir; then
413 (umask=$mkdir_umask &&
414 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
415 # Don't fail if two instances are running concurrently.
416 test -d "$prefix" || exit 1
417 else
418 case $prefix in
419 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
420 *) qprefix=$prefix;;
421 esac
422 prefixes="$prefixes '$qprefix'"
423 fi
424 fi
425 prefix=$prefix/
426 done
427
428 if test -n "$prefixes"; then
429 # Don't fail if two instances are running concurrently.
430 (umask $mkdir_umask &&
431 eval "\$doit_exec \$mkdirprog $prefixes") ||
432 test -d "$dstdir" || exit 1
433 obsolete_mkdir_used=true
434 fi
435 fi
436 fi
437
438 if test -n "$dir_arg"; then
439 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
440 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
441 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
442 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
443 else
444
445 # Make a couple of temp file names in the proper directory.
446 dsttmp=${dstdirslash}_inst.$$_
447 rmtmp=${dstdirslash}_rm.$$_
448
449 # Trap to clean up those temp files at exit.
450 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
451
452 # Copy the file name to the temp name.
453 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
454
455 # and set any options; do chmod last to preserve setuid bits.
456 #
457 # If any of these fail, we abort the whole thing. If we want to
458 # ignore errors from any of these, just make sure not to ignore
459 # errors from the above "$doit $cpprog $src $dsttmp" command.
460 #
461 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
462 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
463 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
464 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
465
466 # If -C, don't bother to copy if it wouldn't change the file.
467 if $copy_on_change &&
468 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
469 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
470 set -f &&
471 set X $old && old=:$2:$4:$5:$6 &&
472 set X $new && new=:$2:$4:$5:$6 &&
473 set +f &&
474 test "$old" = "$new" &&
475 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
476 then
477 rm -f "$dsttmp"
478 else
479 # Rename the file to the real destination.
480 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
481
482 # The rename failed, perhaps because mv can't rename something else
483 # to itself, or perhaps because mv is so ancient that it does not
484 # support -f.
485 {
486 # Now remove or move aside any old file at destination location.
487 # We try this two ways since rm can't unlink itself on some
488 # systems and the destination file might be busy for other
489 # reasons. In this case, the final cleanup might fail but the new
490 # file should still install successfully.
491 {
492 test ! -f "$dst" ||
493 $doit $rmcmd -f "$dst" 2>/dev/null ||
494 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
495 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
496 } ||
497 { echo "$0: cannot unlink or rename $dst" >&2
498 (exit 1); exit 1
499 }
500 } &&
501
502 # Now rename the file to the real destination.
503 $doit $mvcmd "$dsttmp" "$dst"
504 }
505 fi || exit 1
506
507 trap '' 0
508 fi
509 done
510
511 # Local variables:
512 # eval: (add-hook 'before-save-hook 'time-stamp)
513 # time-stamp-start: "scriptversion="
514 # time-stamp-format: "%:y-%02m-%02d.%02H"
515 # time-stamp-time-zone: "UTC0"
516 # time-stamp-end: "; # UTC"
517 # End:
+0
-175
m4/base_checks.m4 less more
0 AC_DEFUN([AC_BASE_CHECKS],
1 [AC_REQUIRE([AC_PROG_CC])
2
3 dnl check for base compilers
4 AC_CANONICAL_HOST()
5
6 dnl Detect the target toolchain
7 AC_MSG_CHECKING([target toolchain])
8 case "${host_os}" in
9 linux*)
10 TARGET_TOOLCHAIN="linux"
11 ;;
12 mingw*)
13 TARGET_TOOLCHAIN="mingw"
14 ;;
15 cygwin*)
16 TARGET_TOOLCHAIN="cygwin"
17 ;;
18 darwin*)
19 TARGET_TOOLCHAIN="darwin"
20 ;;
21 *)
22 TARGET_TOOLCHAIN="other"
23 ;;
24 esac
25 AC_MSG_RESULT([$TARGET_TOOLCHAIN])
26 AC_SUBST(TARGET_TOOLCHAIN)
27
28 # AC_CANONICAL_HOST needs those files
29 AUTOCONF_INSTALL_FILES="config.guess config.sub install-sh m4/*.m4"
30 AC_SUBST(AUTOCONF_INSTALL_FILES)
31
32 AC_PROG_CC()
33 AC_PROG_INSTALL()
34 AC_CHECK_TOOL([AR],[ar],no)
35 AC_SUBST(AR)
36 AC_CHECK_OCAML_COMPILERS()
37
38 dnl add some flags
39 AC_DETECT_PIC_FLAGS()
40
41 CXXFLAGS="$CXXFLAGS $PIC_FLAGS"
42 CPPFLAGS="$CPPFLAGS $PIC_FLAGS"
43
44 # Add prefix to compilation variables
45 # if passed
46 if test "x$prefix" != "xNONE"; then
47 CFLAGS="$CFLAGS -I$prefix/include"
48 LDFLAGS="$LDFLAGS -L$prefix/lib"
49 CPPFLAGS="$CPPFLAGS -I$prefix/include"
50 CXXFLAGS="$CXXFLAGS -I$prefix/include"
51 fi
52 ])
53
54 dnl Check for basic stuff
55 dnl The following was stolen from mesa..
56 dnl A few convenience macros for Mesa, mostly to keep all the platform
57 dnl specifics out of configure.ac.
58
59 dnl AC_DETECT_PIC_FLAGS()
60 dnl
61 dnl Find out whether to build PIC code using the option --enable-pic and
62 dnl the configure enable_static/enable_shared settings. If PIC is needed,
63 dnl figure out the necessary flags for the platform and compiler.
64 dnl
65 dnl The platform checks have been shamelessly taken from libtool and
66 dnl stripped down to just what's needed for Mesa. See _LT_COMPILER_PIC in
67 dnl /usr/share/aclocal/libtool.m4 or
68 dnl http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=blob;f=libltdl/m4/libtool.m4;hb=HEAD
69 dnl
70 AC_DEFUN([AC_DETECT_PIC_FLAGS],
71 [AC_ARG_VAR([PIC_FLAGS], [compiler flags for PIC code])
72 AC_ARG_ENABLE([pic],
73 [AS_HELP_STRING([--disable-pic],
74 [compile PIC objects @<:@default=enabled for shared builds
75 on supported platforms@:>@])],
76 [enable_pic="$enableval"
77 test "x$enable_pic" = x && enable_pic=auto],
78 [enable_pic=auto])
79 dnl disable PIC by default for static builds
80 if test "$enable_pic" = auto && test "$enable_static" = yes; then
81 enable_pic=no
82 fi
83 dnl if PIC hasn't been explicitly disabled, try to figure out the flags
84 if test "$enable_pic" != no; then
85 AC_MSG_CHECKING([for $CC option to produce PIC])
86 dnl allow the user's flags to override
87 if test "x$PIC_FLAGS" = "x"; then
88 dnl see if we're using GCC
89 if test "x$GCC" = "xyes"; then
90 case "$host_os" in
91 aix*|beos*|cygwin*|irix5*|irix6*|osf3*|osf4*|osf5*)
92 dnl PIC is the default for these OSes.
93 ;;
94 mingw*|os2*|pw32*)
95 dnl This hack is so that the source file can tell whether
96 dnl it is being built for inclusion in a dll (and should
97 dnl export symbols for example).
98 PIC_FLAGS="-DDLL_EXPORT"
99 ;;
100 darwin*|rhapsody*)
101 dnl PIC is the default on this platform
102 dnl Common symbols not allowed in MH_DYLIB files
103 PIC_FLAGS="-fno-common"
104 ;;
105 hpux*)
106 dnl PIC is the default for IA64 HP-UX and 64-bit HP-UX,
107 dnl but not for PA HP-UX.
108 case $host_cpu in
109 hppa*64*|ia64*)
110 ;;
111 *)
112 PIC_FLAGS="-fPIC"
113 ;;
114 esac
115 ;;
116 *)
117 dnl Everyone else on GCC uses -fPIC
118 PIC_FLAGS="-fPIC"
119 ;;
120 esac
121 else dnl !GCC
122 case "$host_os" in
123 hpux9*|hpux10*|hpux11*)
124 dnl PIC is the default for IA64 HP-UX and 64-bit HP-UX,
125 dnl but not for PA HP-UX.
126 case "$host_cpu" in
127 hppa*64*|ia64*)
128 dnl +Z the default
129 ;;
130 *)
131 PIC_FLAGS="+Z"
132 ;;
133 esac
134 ;;
135 linux*|k*bsd*-gnu)
136 case `basename "$CC"` in
137 icc*|ecc*|ifort*)
138 PIC_FLAGS="-KPIC"
139 ;;
140 pgcc*|pgf77*|pgf90*|pgf95*)
141 dnl Portland Group compilers (*not* the Pentium gcc
142 dnl compiler, which looks to be a dead project)
143 PIC_FLAGS="-fpic"
144 ;;
145 ccc*)
146 dnl All Alpha code is PIC.
147 ;;
148 xl*)
149 dnl IBM XL C 8.0/Fortran 10.1 on PPC
150 PIC_FLAGS="-qpic"
151 ;;
152 *)
153 case `$CC -V 2>&1 | sed 5q` in
154 *Sun\ C*|*Sun\ F*)
155 dnl Sun C 5.9 or Sun Fortran
156 PIC_FLAGS="-KPIC"
157 ;;
158 esac
159 esac
160 ;;
161 solaris*)
162 PIC_FLAGS="-KPIC"
163 ;;
164 sunos4*)
165 PIC_FLAGS="-PIC"
166 ;;
167 esac
168 fi
169 fi
170 AC_MSG_RESULT([$PIC_FLAGS])
171 fi
172 AC_SUBST([PIC_FLAGS])
173 ])dnl PIC_FLAGS
174
+0
-24
m4/cpp_check_class.m4 less more
0 dnl $1: linker lib name
1 dnl $2: included file
2 dnl $3: tested class
3 dnl $4: emitted variable
4 AC_DEFUN([AC_CPP_CHECK_CLASS],
5 [AC_LANG_PUSH([C++])
6 SAVED_LDFLAGS=$LDFLAGS
7 LDFLAGS="$LDFLAGS -l$1"
8 AC_MSG_CHECKING([for class $3 in $1 library])
9 AC_LINK_IFELSE(
10 [AC_LANG_PROGRAM([#include <$2>],
11 [$3 *x = NULL])],
12 [TEST_LIBS="$TEST_LIBS -l$1"] [RESULT=1],
13 [RESULT=])
14 if test -z $RESULT; then
15 AC_MSG_RESULT([not found])
16 else
17 AC_DEFINE([$4], [1], [Defined if class $3 has been found in $1 library])
18 AC_MSG_RESULT([ok])
19 fi
20 $4=$RESULT
21 AC_SUBST([$4])
22 LDFLAGS=$SAVED_LDFLAGS
23 AC_LANG_POP([C++])])
+0
-186
m4/detect_binding.m4 less more
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 dnl $1 = PKG_NAME
41 dnl $2 = PKG_VERSION
42 dnl $3 = PKG_DEPS
43 dnl $4 = PKG_MANDATORY
44 dnl $5 = PKG_USED (for instance sdl.mixer au lieu of sdl. Should only be used for bindings not provided by us..)
45 dnl $6 = DYNAMIC_PLUGIN
46 dnl $7 = PKG_CMA (used for duppy.syntax and flac.ogg when locally compiled..)
47
48 if test -n "$5"; then
49 BINDING_PKGS="$5"
50 else
51 BINDING_PKGS="$1"
52 fi
53
54 AC_ARG_WITH([binding()-dir],
55 AC_HELP_STRING(
56 [--with-binding()-dir=path],
57 [look for ocaml-binding() library in "path" (autodetected by default)]))
58
59 AC_COND_PLUGIN([$6],[$1])
60
61 dnl Version stuff
62 m4_define([VERSION_CHECK],[ifelse([$2],[],[],[ >= $2])])
63
64 AC_MSG_CHECKING([for ocaml $1 module[]VERSION_CHECK()])
65
66 OCAML_CHECK="${OCAMLFIND} query $1"
67
68 dnl This (horrible) macro does the following:
69 dnl Detect optional binding
70 dnl If builtin and provided by ocamlfind,
71 dnl fills liquidsoap_ocamlcflags with "-package deps" for
72 dnl each dependency
73 dnl If builtin and provided by us, fills
74 dnl liquidsoap_ocamlcflags with "-I /path/to/ocaml-foo/src"
75 dnl and liquidsoap_ocamllfflags with "foo.cmxa"
76 dnl If plugin and provided by ocamlfind,
77 dnl fills plugin_packages with "deps"
78 dnl If plugin and provided by us, fills
79 dnl plugin_ocamlcflags with "-I /path/to/ocaml-foo/src"
80 dnl and plugin_ocamllflags with "foo.cmxa"
81 dnl Ultimately, plugin_ocamlcflags and plugin_ocamllflags
82 dnl are added to the global $PLUGINS_DATA variable and
83 dnl $PLUGINS is updated with the name of this plugin.
84 dnl W_plugin is set to "yes" for builtin compilation
85 dnl and "binding" for plugin compilation.
86
87 if test "x$enable_[]binding()_dynamic_plugin" = "xyes" ; then
88 BINDING()_SHARED="yes"
89 PLUGINS="$PLUGINS binding()"
90 fi
91
92 AC_OCAML_CHECK_DEPS([$3])
93 if test -z $DEPS_CHECK; then
94 AC_MSG_RESULT([[]binding() needs $3])
95 else
96 if test -z "${with_[]binding()_dir}" ; then
97 if ! ${OCAML_CHECK} > /dev/null 2>&1 ; then
98 AC_MSG_RESULT_NOT([$4],[Not found.])
99 else
100 BINDING()_version="`${OCAMLFIND} query -format "%v" $1 2>/dev/null`"
101 AC_OCAML_COMPARE_VERSION([${[]BINDING()_version}],[$2])
102 if test -z "${VERSION_OK}"; then
103 AC_MSG_RESULT_NOT([$4],[requires version >= $2 found ${[]BINDING()_version}.])
104 else
105 if test -z "${[]BINDING()_SHARED}"; then
106 BINDING()_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINDING_PKGS 2>/dev/null`"
107 liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} ${[]BINDING()_PACKAGES}"
108 W_[]BINDING()=yes
109 else
110 []binding()_packages="`${OCAMLFIND} query -r -separator " " -format "%p" $BINDING_PKGS 2>/dev/null`"
111 W_[]BINDING()=[]binding()
112 fi
113 LIBS_VERSIONS="${LIBS_VERSIONS} $1=$[]BINDING()_version"
114 AC_MSG_RESULT(ok)
115 fi
116 fi
117 else
118 BINDING()_STOP_CHECK=
119 BINDING()_version=changequote({,})"[unknown version]"changequote([,])
120 BINDING()_requires=
121 if test -r ${with_[]binding()_dir}/META >/dev/null 2>&1; then
122 # Grab version
123 BINDING()_version=`cat "${with_[]binding()_dir}/META" | grep version | cut -d'=' -f 2 | tr -d ' ' | tr -d '"' | head -n 1`
124 AC_OCAML_COMPARE_VERSION([${[]BINDING()_version}],[$2])
125 if test -z "${VERSION_OK}"; then
126 AC_MSG_RESULT_NOT([$4],[requires version >= $2 found ${[]BINDING()_version}.])
127 BINDING()_STOP_CHECK=yes
128 fi
129 BINDING()_requires=`cat "${with_[]binding()_dir}/META" | grep 'requires' | cut -d '=' -f 2 | tr -d '"'`
130 BINDING()_path="${with_[]binding()_dir}"
131 else
132 BINDING()_path=`${OCAMLFIND} -query $1 2>/dev/null`
133 if ! test -z "$2"; then
134 AC_MSG_RESULT_NOT([$4],[cannot find version from META file.])
135 BINDING()_STOP_CHECK=yes
136 fi
137 fi
138 if test -z "${BINDING()_STOP_CHECK}"; then
139 BINDING()_PACKAGES="`${OCAMLFIND} query -separator " " -format "-package %p" $BINGING_PKGS 2>/dev/null`"
140 echo ${with_[]binding()_dir} | grep ^/ > /dev/null 2>&1 \
141 || with_[]binding()_dir=${PWD}/${with_[]binding()_dir}
142 if test -z "${[]BINDING()_SHARED}"; then
143 liquidsoap_ocamlcflags="${liquidsoap_ocamlcflags} -I ${with_[]binding()_dir} ${[]BINDING()_PACKAGES}"
144 else
145 []binding()_ocamlcflags="-I ${with_[]binding()_dir} ${[]BINDING()_PACKAGES}"
146 fi
147 # We need to recurse here because
148 # some package may not be registered using ocamlfind
149 if test -n "$7"; then
150 BINDING()_CMA=$7.${cma}
151 else
152 BINDING()_CMA=$1.${cma}
153 fi
154 for i in ${[]BINDING()_requires}; do
155 BINDING()_PACKAGES="${[]BINDING()_PACKAGES} `${OCAMLFIND} query -separator " " -format "-package %p" $i 2>/dev/null`"
156 done
157 if test -z "${[]BINDING()_SHARED}"; then
158 liquidsoap_ocamllflags="${liquidsoap_ocamllflags} ${[]BINDING()_PACKAGES} ${[]BINDING()_CMA}"
159 W_[]BINDING()=yes
160 else
161 []binding()_ocamllflags="${[]BINDING()_PACKAGES} ${[]BINDING()_CMA}"
162 W_[]BINDING()=[]binding()
163 fi
164 LIBS_VERSIONS="${LIBS_VERSIONS} $1=$[]BINDING()_version"
165 AC_MSG_RESULT(ok)
166 fi
167 fi
168 fi
169
170 AC_SUBST(W_[]BINDING())
171 if test -z "${W_[]BINDING()}" ; then
172 w_[]BINDING()="no (requires $1)"
173 else
174 if test -z "${[]BINDING()_SHARED}"; then
175 w_[]BINDING()=yes
176 else
177 PLUGINS_DATA="$PLUGINS_DATA
178 []binding()_ocamlcflags=${[]binding()_ocamlcflags}
179 []binding()_ocamllflags=${[]binding()_ocamllflags}
180 []binding()_packages=${[]binding()_packages}"
181 w_[]BINDING()=plugin
182 fi
183 fi])
184
185
+0
-329
m4/ocaml.m4 less more
0 dnl autoconf macros for OCaml
1 dnl
2 dnl Copyright © 2009 Richard W.M. Jones
3 dnl Copyright © 2009 Stefano Zacchiroli
4 dnl Copyright © 2000-2005 Olivier Andrieu
5 dnl Copyright © 2000-2005 Jean-Christophe Filliâtre
6 dnl Copyright © 2000-2005 Georges Mariano
7 dnl
8 dnl For documentation, please read the ocaml.m4 man page.
9
10 AC_DEFUN([AC_PROG_OCAML],
11 [dnl
12 # checking for ocamlc
13 AC_CHECK_TOOL([OCAMLC],[ocamlc],[no])
14
15 if test "$OCAMLC" = "no"; then
16 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 else
100 AC_CHECK_TOOL_STRICT([OCAMLDEPOPT],[ocamldep.opt],[no])
101 if test "$OCAMLDEPOPT" != "no"; then
102 OCAMLDEP=$OCAMLDEPOPT
103 fi
104 fi
105
106 AC_SUBST([OCAMLDEP])
107
108 # checking for ocamlmktop
109 AC_CHECK_TOOL_STRICT([OCAMLMKTOP],[ocamlmktop],[no])
110
111 AC_SUBST([OCAMLMKTOP])
112
113 # checking for ocamlmklib
114 AC_CHECK_TOOL_STRICT([OCAMLMKLIB],[ocamlmklib],[no])
115 if test "$OCAMLMKLIB" = "no"; then
116 AC_MSG_ERROR(Cannot find ocamlmklib.)
117 fi
118
119 AC_SUBST([OCAMLMKLIB])
120
121 # checking for ocamldoc
122 AC_CHECK_TOOL([OCAMLDOC],[ocamldoc],[no])
123 if test "$OCAMLDOC" != "no"; then
124 AC_CHECK_TOOL([OCAMLDOCOPT],[ocamldoc.opt],[no])
125 if test "$OCAMLDOCOPT" != "no"; then
126 OCAMLDOC=$OCAMLDOCOPT
127 fi
128 fi
129
130 AC_SUBST([OCAMLDOC])
131
132 # checking for ocamlbuild
133 AC_CHECK_TOOL([OCAMLBUILD],[ocamlbuild],[no])
134
135 AC_SUBST([OCAMLBUILD])
136 ])
137
138
139 AC_DEFUN([AC_PROG_OCAMLLEX],
140 [dnl
141 # checking for ocamllex
142 AC_CHECK_TOOL([OCAMLLEX],[ocamllex],[no])
143 if test "$OCAMLLEX" != "no"; then
144 AC_CHECK_TOOL([OCAMLLEXDOTOPT],[ocamllex.opt],[no])
145 if test "$OCAMLLEXDOTOPT" != "no"; then
146 OCAMLLEX=$OCAMLLEXDOTOPT
147 fi
148 fi
149 AC_SUBST([OCAMLLEX])
150 ])
151
152 AC_DEFUN([AC_PROG_OCAMLYACC],
153 [dnl
154 AC_CHECK_TOOL([OCAMLYACC],[ocamlyacc],[no])
155 AC_SUBST([OCAMLYACC])
156 ])
157
158
159 AC_DEFUN([AC_PROG_CAMLP4],
160 [dnl
161 AC_REQUIRE([AC_PROG_OCAML])dnl
162
163
164 AC_ARG_ENABLE([camlp4],
165 AC_HELP_STRING([--disable-camlp4],
166 [disable camlp4 auto-detection.]))
167
168 # checking for camlp4
169 if test "x$enable_camlp4" != "xno"; then
170 AC_CHECK_TOOL_STRICT([CAMLP4],[camlp4],[no])
171 if test "$CAMLP4" != "no"; then
172 TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p' | tr -d '\r'`
173 if test "$TMPVERSION" != "$OCAMLVERSION" ; then
174 AC_MSG_RESULT([versions differs from ocamlc])
175 CAMLP4=no
176 fi
177 fi
178 AC_SUBST([CAMLP4])
179
180 # checking for companion tools
181 AC_CHECK_TOOL_STRICT([CAMLP4BOOT],[camlp4boot],[no])
182 AC_CHECK_TOOL_STRICT([CAMLP4O],[camlp4o],[no])
183 AC_CHECK_TOOL_STRICT([CAMLP4OF],[camlp4of],[no])
184 AC_CHECK_TOOL_STRICT([CAMLP4OOF],[camlp4oof],[no])
185 AC_CHECK_TOOL_STRICT([CAMLP4ORF],[camlp4orf],[no])
186 AC_CHECK_TOOL_STRICT([CAMLP4PROF],[camlp4prof],[no])
187 AC_CHECK_TOOL_STRICT([CAMLP4R],[camlp4r],[no])
188 AC_CHECK_TOOL_STRICT([CAMLP4RF],[camlp4rf],[no])
189 else
190 CAMLP4=no
191 CAMLP4BOOT=no
192 CAMLP4O=no
193 CAMLP4OF=no
194 CAMLP4OOF=no
195 CAMLP4ORF=no
196 CAMLP4PROF=no
197 CAMLP4R=no
198 CAMLP4RF=no
199 fi
200
201 AC_SUBST([CAMLP4BOOT])
202 AC_SUBST([CAMLP4O])
203 AC_SUBST([CAMLP4OF])
204 AC_SUBST([CAMLP4OOF])
205 AC_SUBST([CAMLP4ORF])
206 AC_SUBST([CAMLP4PROF])
207 AC_SUBST([CAMLP4R])
208 AC_SUBST([CAMLP4RF])
209 ])
210
211 AC_DEFUN([AC_PROG_CAMLIDL],
212 [dnl
213 AC_CHECK_TOOL(CAMLIDL,camlidl,no)
214 AC_SUBST(CAMLIDL)
215 ])
216
217 AC_DEFUN([AC_PROG_FINDLIB],
218 [dnl
219 AC_REQUIRE([AC_PROG_OCAML])dnl
220
221 # checking for ocamlfind
222 AC_CHECK_TOOL([OCAMLFIND],[ocamlfind],[no])
223 AC_SUBST([OCAMLFIND])
224 ])
225
226 AC_DEFUN([AC_CHECK_OCAML_STDLIB],
227 [dnl
228 AC_REQUIRE([AC_PROG_FINDLIB])dnl
229
230 AC_MSG_CHECKING([for ocaml standard library path])
231 OCAML_STDLIB=`$OCAMLFIND printconf stdlib`
232 AC_SUBST(OCAML_STDLIB)
233 AC_MSG_RESULT([$OCAML_STDLIB])
234 ])
235
236 dnl Thanks to Jim Meyering for working this next bit out for us.
237 dnl XXX We should define AS_TR_SH if it's not defined already
238 dnl (eg. for old autoconf).
239 AC_DEFUN([AC_CHECK_OCAML_PKG],
240 [dnl
241 AC_REQUIRE([AC_PROG_FINDLIB])dnl
242
243 AC_ARG_WITH([$1-dir],AC_HELP_STRING([--with-$1-dir=path],
244 [use "path" as the location of ocaml-$1 (autodetected by default)]))
245 AC_MSG_CHECKING([for OCaml library $1])
246
247 unset found
248 unset pkg
249 found=no
250 if test -z "$with_$1_dir"; then
251 for pkg in $1 $2 ; do
252 if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then
253 AC_MSG_RESULT([found])
254 AS_TR_SH([OCAML_PKG_$1])=$pkg
255 AS_TR_SH([OCAML_DIR_$1])=`$OCAMLFIND query $1`
256 found=yes
257 break
258 fi
259 done
260 else
261 echo $with_$1_dir | grep ^/ > /dev/null 2>&1 || with_$1_dir=$PWD/$with_$1_dir
262 AS_TR_SH([OCAML_PKG_$1])=no
263 OCAML_DIR_$1="$with_$1_dir"
264 found=yes
265 fi
266 if test "$found" = "no" ; then
267 AC_MSG_RESULT([not found])
268 AS_TR_SH([OCAML_HAS_$1])=no
269 AS_TR_SH([OCAML_PKG_$1])=no
270 else
271 AS_TR_SH([OCAML_HAS_$1])=yes
272 fi
273
274 AC_SUBST(AS_TR_SH([OCAML_PKG_$1]))
275 ])
276
277
278 AC_DEFUN([AC_CHECK_OCAML_MODULE],
279 [dnl
280 AC_MSG_CHECKING([for OCaml module $2])
281
282 cat > conftest.ml <<EOF
283 open $3
284 EOF
285 unset found
286 for $1 in $$1 $4 ; do
287 if $OCAMLC -c -I "$$1" conftest.ml >&5 2>&5 ; then
288 found=yes
289 break
290 fi
291 done
292
293 if test "$found" ; then
294 AC_MSG_RESULT([$$1])
295 else
296 AC_MSG_RESULT([not found])
297 $1=no
298 fi
299 AC_SUBST([$1])
300 ])
301
302
303 dnl XXX Cross-compiling
304 AC_DEFUN([AC_CHECK_OCAML_WORD_SIZE],
305 [dnl
306 AC_REQUIRE([AC_PROG_OCAML])dnl
307 AC_MSG_CHECKING([for OCaml compiler word size])
308 cat > conftest.ml <<EOF
309 print_endline (string_of_int Sys.word_size)
310 EOF
311 OCAML_WORD_SIZE=`$OCAML conftest.ml`
312 AC_MSG_RESULT([$OCAML_WORD_SIZE])
313 AC_SUBST([OCAML_WORD_SIZE])
314 ])
315
316 AC_DEFUN([AC_CHECK_OCAML_OS_TYPE],
317 [dnl
318 AC_REQUIRE([AC_PROG_OCAML])dnl
319 AC_MSG_CHECKING([OCaml Sys.os_type])
320
321 cat > conftest.ml <<EOF
322 print_string(Sys.os_type);;
323 EOF
324
325 OCAML_OS_TYPE=`$OCAML conftest.ml`
326 AC_MSG_RESULT([$OCAML_OS_TYPE])
327 AC_SUBST([OCAML_OS_TYPE])
328 ])
+0
-76
m4/ocaml_compilers.m4 less more
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_PROG_CAMLIDL()
14
15 AC_PROG_OCAMLLEX()
16
17 AC_PROG_OCAMLYACC()
18
19 AC_PROG_CAMLP4()
20
21 AC_PROG_FINDLIB()
22
23 AC_CHECK_OCAML_STDLIB()
24
25 # Check if caml/threads.h is present
26 old_CFLAGS=$CFLAGS
27 CFLAGS="$CFLAGS -I${OCAML_STDLIB}"
28 AC_CHECK_HEADER([caml/threads.h],[CAML_THREADS=yes],[],[#include <caml/misc.h>])
29 CFLAGS=${old_CFLAGS}
30
31 AC_ARG_ENABLE([debugging],
32 AC_HELP_STRING(
33 [--disable-debugging],
34 [disable debugging information (backtrace printing in particular)]))
35
36 if test "$enable_debugging" \!= "no" ; then
37 OCAMLFLAGS="$OCAMLFLAGS -g"
38 fi
39
40 AC_ARG_WITH([ocaml-warnings],
41 AC_HELP_STRING(
42 [--with-ocaml-warnings=WARNINGS],
43 [Enable specific list of ocaml compiler warnings.]))
44
45 if test -n "${with_ocaml_warnings}" ; then
46 OCAMLFLAGS="$OCAMLFLAGS -w +${with_ocaml_warnings}"
47 else
48 OCAMLFLAGS="$OCAMLFLAGS -w +A-4@5-7@8-9@11@12@20-35-44-45-50"
49 fi
50
51 AC_ARG_ENABLE([profiling],
52 AC_HELP_STRING(
53 [--enable-profiling],
54 [compile to generate profiling infomation]))
55 if test "x$enable_profiling" = "xyes" ; then
56 OCAMLNCFLAGS="$OCAMLNCFLAGS -p"
57 fi
58 AC_SUBST(OCAMLNCFLAGS)
59
60 AC_ARG_ENABLE([nativecode],
61 AC_HELP_STRING(
62 [--disable-nativecode],
63 [compile in bytecode]))
64
65 AC_ARG_ENABLE([custom],
66 AC_HELP_STRING(
67 [--disable-custom],
68 [disable custom mode for bytecode compilation (use if you know what you are doing)]))
69
70 CAMLLIBPATH=$OCAMLLIB
71 AC_SUBST(CAMLLIBPATH)
72
73 AC_SUBST(CAMLIDL)
74 AC_SUBST(OCAMLFLAGS)
75 ])
+0
-76
m4/pkg_config.m4 less more
0 dnl Taken an modified from:
1 dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2 dnl
3 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
4 dnl
5 dnl This program is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 2 of the License, or
8 dnl (at your option) any later version.
9 dnl
10 dnl This program is distributed in the hope that it will be useful, but
11 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 dnl General Public License for more details.
14 dnl
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with this program; if not, write to the Free Software
17 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 dnl
19 dnl As a special exception to the GNU General Public License, if you
20 dnl distribute this file as part of a program that contains a
21 dnl configuration script generated by Autoconf, you may include it under
22 dnl the same distribution terms that you use for the rest of that program.
23
24 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
25 dnl ----------------------------------
26 AC_DEFUN([PKG_PROG_PKG_CONFIG],
27 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
28 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
29 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
30 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
31 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
32 fi
33 if test -n "$PKG_CONFIG"; then
34 _pkg_min_version=m4_default([$1], [0.9.0])
35 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
36 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
37 AC_MSG_RESULT([yes])
38 else
39 AC_MSG_ERROR([no])
40 PKG_CONFIG=""
41 fi
42
43 fi[]dnl
44 ])dnl PKG_PROG_PKG_CONFIG
45
46 AC_ARG_VAR([PKG_CONFIG_OPTIONS], [Additional options passed when invoking pkg-config])
47
48 dnl PKG_CONFIG_CHECK_MODULE([name],[min-version])
49 dnl min-version is optional
50 AC_DEFUN([PKG_CONFIG_CHECK_MODULE],
51 [if test -n "$2"; then
52 PKGCONFIG_CHECK_VERSION=" >= $2"
53 else
54 PKGCONFIG_CHECK_VERSION=""
55 fi
56 AC_MSG_CHECKING([whether pkg-config knows about $1${PKGCONFIG_CHECK_VERSION}])
57 if ! $PKG_CONFIG $PKG_CONFIG_OPTIONS --exists $1; then
58 AC_MSG_ERROR([$1.pc not found.. Do you need to set PKG_CONFIG_PATH?])
59 else
60 if test -n "$2"; then
61 if ! $PKG_CONFIG $PKG_CONFIG_OPTIONS --atleast-version=$2 $1; then
62 $1_VERSION="`$PKG_CONFIG $PKG_CONFIG_OPTIONS --modversion $1`"
63 AC_MSG_ERROR([requires version >= $2, found ${$1_VERSION}])
64 else
65 AC_MSG_RESULT([ok])
66 fi
67 else
68 AC_MSG_RESULT([ok])
69 fi
70 fi
71 CFLAGS="$CFLAGS `$PKG_CONFIG $PKG_CONFIG_OPTIONS --cflags $1`"
72 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG $PKG_CONFIG_OPTIONS --cflags $1`"
73 LIBS="$LIBS `$PKG_CONFIG $PKG_CONFIG_OPTIONS --libs-only-l $1`"
74 LDFLAGS="$LDFLAGS `$PKG_CONFIG $PKG_CONFIG_OPTIONS --libs-only-L $1`"
75 ])
+0
-7
m4/strict_check_tool.m4 less more
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
-6
src/META.in less more
0 name="faad"
1 version="@VERSION@"
2 description="Ocaml bindings to libfaad"
3 requires="bytes"
4 archive(byte) = "faad.cma"
5 archive(native) = "faad.cmxa"
+0
-59
src/Makefile.in less more
0 # Copyright (C) 2005-2006 Savonet team
1 # libfaad bindings for OCaml.
2 #
3 # by Samuel Mimram
4
5 # $Id: Makefile.in 2383 2006-04-09 16:21:04Z smimram $
6
7 OCAMLMAKEFILE = OCamlMakefile
8
9 OCAMLFIND = @OCAMLFIND@
10 OCAMLFIND_LDCONF = @OCAMLFIND_LDCONF@
11 OCAMLC = @OCAMLC@
12 OCAMLOPT = @OCAMLOPT@
13 OCAMLBEST = @OCAMLBEST@
14 OCAMLMKTOP = @OCAMLMKTOP@
15 OCAMLMKLIB = @OCAMLMKLIB@
16 OCAMLCP = @OCAMLCP@
17 OCAMLDEP = @OCAMLDEP@
18 OCAMLLEX = @OCAMLLEX@
19 OCAMLYACC = @OCAMLYACC@
20 OCAMLDOC = @OCAMLDOC@
21 AR = @AR@
22 LATEX = @LATEX@
23 DVIPS = @DVIPS@
24 PS2PDF = @PS2PDF@
25 OCAMLLIBPATH = @CAMLLIBPATH@
26
27 SOURCES = faad.mli faad.ml faad_stubs.c mp4atom.c mp4ff.c mp4meta.c \
28 mp4sample.c mp4tagupdate.c mp4util.c
29 RESULT = faad
30 OCAMLDOCFLAGS = -stars
31 LIBINSTALL_FILES = $(wildcard *.mli *.cmi *.cma *.cmxa *.cmx *.a *.so)
32 INCDIRS = @INC@
33 LDFLAGS = @LDFLAGS@
34 ACLIBS = @LIBS@
35 CLIBS = $(ACLIBS:-l%=%)
36 LIBDIRS = $(LDFLAGS:-L%=%)
37 CC = @CC@
38 CFLAGS = @CFLAGS@ -Wall -DCAML_NAME_SPACE -DUSE_TAGGING
39 CPPFLAGS = @CPPFLAGS@
40 NO_CUSTOM = yes
41 OCAMLFLAGS = @OCAMLFLAGS@
42
43
44 all: $(OCAMLBEST)
45
46 byte: byte-code-library
47
48 opt: native-code-library
49
50 native-code-library: byte-code-library
51
52 install: libinstall
53
54 uninstall: libuninstall
55
56 update: uninstall install
57
58 -include $(OCAMLMAKEFILE)
+0
-1266
src/OCamlMakefile less more
0 ###########################################################################
1 # OCamlMakefile
2 # Copyright (C) 1999-2007 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 CFLAGS_WIN32 := -mno-cygwin
133 # The default value 'cc' makes 'ocamlc -cc "cc"' raises the error 'The
134 # NTVDM CPU has encountered an illegal instruction'.
135 CC := gcc
136 # The OCaml C header files use this flag:
137 CFLAGS += -D__MINGW32__
138 endif
139 ifdef MSVC
140 export MSVC
141 WIN32 := 1
142 ifndef STATIC
143 CPPFLAGS_WIN32 := -DCAML_DLL
144 endif
145 CFLAGS_WIN32 += -nologo
146 EXT_OBJ := obj
147 EXT_LIB := lib
148 ifeq ($(CC),gcc)
149 # work around GNU Make default value
150 ifdef THREADS
151 CC := cl -MT
152 else
153 CC := cl
154 endif
155 endif
156 ifeq ($(CXX),g++)
157 # work around GNU Make default value
158 CXX := $(CC)
159 endif
160 CFLAG_O := -Fo
161 endif
162 ifdef WIN32
163 EXT_CXX := cpp
164 EXE := .exe
165 endif
166
167 ifndef EXT_OBJ
168 EXT_OBJ := o
169 endif
170 ifndef EXT_LIB
171 EXT_LIB := a
172 endif
173 ifndef EXT_CXX
174 EXT_CXX := cc
175 endif
176 ifndef EXE
177 EXE := # empty
178 endif
179 ifndef CFLAG_O
180 CFLAG_O := -o # do not delete this comment (preserves trailing whitespace)!
181 endif
182
183 export CC
184 export CXX
185 export CFLAGS
186 export CXXFLAGS
187 export LDFLAGS
188 export CPPFLAGS
189 export AR
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 := $(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).o \
513 $(RES_CLIB) $(IMPL_CMO:.cmo=.annot) \
514 $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo $(LIB_PACK_NAME).cmx $(LIB_PACK_NAME).o
515
516 ifndef STATIC
517 NONEXECS += $(DLLSONAME)
518 endif
519
520 ifndef LIBINSTALL_FILES
521 LIBINSTALL_FILES := $(RESULT).mli $(RESULT).cmi $(RESULT).cma \
522 $(RESULT).cmxa $(RESULT).$(EXT_LIB) $(RES_CLIB)
523 ifndef STATIC
524 ifneq ($(strip $(OBJ_LINK)),)
525 LIBINSTALL_FILES += $(DLLSONAME)
526 endif
527 endif
528 endif
529
530 export LIBINSTALL_FILES
531
532 ifdef WIN32
533 # some extra stuff is created while linking DLLs
534 NONEXECS += $(BCRESULT).$(EXT_LIB) $(BCRESULT).exp $(NCRESULT).exp $(CLIB_BASE).exp $(CLIB_BASE).lib
535 endif
536
537 TARGETS := $(EXECS) $(NONEXECS)
538
539 # If there are IDL-files
540 ifneq ($(strip $(FILTERED_IDL)),)
541 MAYBE_IDL := -cclib -lcamlidl
542 endif
543
544 ifdef USE_CAMLP4
545 CAMLP4PATH := \
546 $(shell $(CAMLP4) -where 2>/dev/null || echo /usr/lib/camlp4)
547 INCFLAGS := -I $(CAMLP4PATH)
548 CINCFLAGS := -I$(CAMLP4PATH)
549 endif
550
551 DINCFLAGS := $(INCFLAGS) $(SOURCE_DIRS:%=-I %) $(OCAML_DEFAULT_DIRS:%=-I %)
552 INCFLAGS := $(DINCFLAGS) $(INCDIRS:%=-I %)
553 CINCFLAGS += $(SOURCE_DIRS:%=-I%) $(INCDIRS:%=-I%) $(OCAML_DEFAULT_DIRS:%=-I%)
554
555 ifndef MSVC
556 CLIBFLAGS += $(SOURCE_DIRS:%=-L%) $(LIBDIRS:%=-L%) \
557 $(EXTLIBDIRS:%=-L%) $(OCAML_DEFAULT_DIRS:%=-L%)
558
559 ifeq ($(ELF_RPATH), yes)
560 CLIBFLAGS += $(EXTLIBDIRS:%=-Wl,$(RPATH_FLAG)%)
561 endif
562 endif
563
564 ifndef PROFILING
565 INTF_OCAMLC := $(OCAMLC)
566 else
567 ifndef THREADS
568 INTF_OCAMLC := $(OCAMLCP) -p $(OCAMLCPFLAGS)
569 else
570 # OCaml does not support profiling byte code
571 # with threads (yet), therefore we force an error.
572 ifndef REAL_OCAMLC
573 $(error Profiling of multithreaded byte code not yet supported by OCaml)
574 endif
575 INTF_OCAMLC := $(OCAMLC)
576 endif
577 endif
578
579 ifndef MSVC
580 COMMON_LDFLAGS := $(LDFLAGS:%=-ccopt %) $(SOURCE_DIRS:%=-ccopt -L%) \
581 $(LIBDIRS:%=-ccopt -L%) $(EXTLIBDIRS:%=-ccopt -L%) \
582 $(EXTLIBDIRS:%=-ccopt -Wl $(OCAML_DEFAULT_DIRS:%=-ccopt -L%))
583
584 ifeq ($(ELF_RPATH),yes)
585 COMMON_LDFLAGS += $(EXTLIBDIRS:%=-ccopt -Wl,$(RPATH_FLAG)%)
586 endif
587 else
588 COMMON_LDFLAGS := -ccopt "/link -NODEFAULTLIB:LIBC $(LDFLAGS:%=%) $(SOURCE_DIRS:%=-LIBPATH:%) \
589 $(LIBDIRS:%=-LIBPATH:%) $(EXTLIBDIRS:%=-LIBPATH:%) \
590 $(OCAML_DEFAULT_DIRS:%=-LIBPATH:%) "
591 endif
592
593 CLIBS_OPTS := $(CLIBS:%=-cclib -l%) $(CFRAMEWORKS:%=-cclib '-framework %')
594 ifdef MSVC
595 ifndef STATIC
596 # MSVC libraries do not have 'lib' prefix
597 CLIBS_OPTS := $(CLIBS:%=-cclib %.lib)
598 endif
599 endif
600
601 ifneq ($(strip $(OBJ_LINK)),)
602 ifdef CREATE_LIB
603 OBJS_LIBS := -cclib -l$(CLIB_BASE) $(CLIBS_OPTS) $(MAYBE_IDL)
604 else
605 OBJS_LIBS := $(OBJ_LINK) $(CLIBS_OPTS) $(MAYBE_IDL)
606 endif
607 else
608 OBJS_LIBS := $(CLIBS_OPTS) $(MAYBE_IDL)
609 endif
610
611 ifdef LIB_PACK_NAME
612 FOR_PACK_NAME := $(shell echo $(LIB_PACK_NAME) | awk '{print toupper(substr($$0,1,1))substr($$0,2)}')
613 endif
614
615 # If we have to make byte-code
616 ifndef REAL_OCAMLC
617 BYTE_OCAML := y
618
619 # EXTRADEPS is added dependencies we have to insert for all
620 # executable files we generate. Ideally it should be all of the
621 # libraries we use, but it's hard to find the ones that get searched on
622 # the path since I don't know the paths built into the compiler, so
623 # just include the ones with slashes in their names.
624 EXTRADEPS := $(addsuffix .cma,$(foreach i,$(LIBS),$(if $(findstring /,$(i)),$(i))))
625
626
627 ifndef LIB_PACK_NAME
628 SPECIAL_OCAMLFLAGS := $(OCAMLBCFLAGS)
629 else
630 SPECIAL_OCAMLFLAGS := -for-pack $(FOR_PACK_NAME) $(OCAMLBCFLAGS)
631 endif
632
633 REAL_OCAMLC := $(INTF_OCAMLC)
634
635 REAL_IMPL := $(IMPL_CMO)
636 REAL_IMPL_INTF := $(IMPLO_INTF)
637 IMPL_SUF := .cmo
638
639 DEPFLAGS :=
640 MAKE_DEPS := $(MLDEPS) $(BCDEPIS)
641
642 ifdef CREATE_LIB
643 override CFLAGS := $(PIC_CFLAGS) $(CFLAGS)
644 override CPPFLAGS := $(PIC_CPPFLAGS) $(CPPFLAGS)
645 ifndef STATIC
646 ifneq ($(strip $(OBJ_LINK)),)
647 MAKEDLL := $(DLLSONAME)
648 ALL_LDFLAGS := -dllib $(DLLSONAME)
649 endif
650 endif
651 endif
652
653 ifndef NO_CUSTOM
654 ifneq "$(strip $(OBJ_LINK) $(THREADS) $(MAYBE_IDL) $(CLIBS) $(CFRAMEWORKS))" ""
655 ALL_LDFLAGS += -custom
656 endif
657 endif
658
659 ALL_LDFLAGS += $(INCFLAGS) $(OCAMLLDFLAGS) $(OCAMLBLDFLAGS) \
660 $(COMMON_LDFLAGS) $(LIBS:%=%.cma)
661 CAMLIDLDLLFLAGS :=
662
663 ifdef THREADS
664 ifdef VMTHREADS
665 THREAD_FLAG := -vmthread
666 else
667 THREAD_FLAG := -thread
668 endif
669 ALL_LDFLAGS := $(THREAD_FLAG) $(ALL_LDFLAGS)
670 ifndef CREATE_LIB
671 ifndef REAL_OCAMLFIND
672 ALL_LDFLAGS := unix.cma threads.cma $(ALL_LDFLAGS)
673 endif
674 endif
675 endif
676
677 # we have to make native-code
678 else
679 EXTRADEPS := $(addsuffix .cmxa,$(foreach i,$(LIBS),$(if $(findstring /,$(i)),$(i))))
680 ifndef PROFILING
681 SPECIAL_OCAMLFLAGS := $(OCAMLNCFLAGS)
682 PLDFLAGS :=
683 else
684 SPECIAL_OCAMLFLAGS := -p $(OCAMLNCFLAGS)
685 PLDFLAGS := -p
686 endif
687
688 ifndef LIB_PACK_NAME
689 SPECIAL_OCAMLFLAGS := $(OCAMLNCFLAGS)
690 else
691 SPECIAL_OCAMLFLAGS := -for-pack $(FOR_PACK_NAME) $(OCAMLNCFLAGS)
692 endif
693 REAL_IMPL := $(IMPL_CMX)
694 REAL_IMPL_INTF := $(IMPLX_INTF)
695 IMPL_SUF := .cmx
696
697 override CPPFLAGS := -DNATIVE_CODE $(CPPFLAGS)
698
699 DEPFLAGS := -native
700 MAKE_DEPS := $(MLDEPS) $(NCDEPIS)
701
702 ALL_LDFLAGS := $(PLDFLAGS) $(INCFLAGS) $(OCAMLLDFLAGS) \
703 $(OCAMLNLDFLAGS) $(COMMON_LDFLAGS)
704 CAMLIDLDLLFLAGS := -opt
705
706 ifndef CREATE_LIB
707 ALL_LDFLAGS += $(LIBS:%=%.cmxa)
708 else
709 override CFLAGS := $(PIC_CFLAGS) $(CFLAGS)
710 override CPPFLAGS := $(PIC_CPPFLAGS) $(CPPFLAGS)
711 endif
712
713 ifdef THREADS
714 THREAD_FLAG := -thread
715 ALL_LDFLAGS := $(THREAD_FLAG) $(ALL_LDFLAGS)
716 ifndef CREATE_LIB
717 ifndef REAL_OCAMLFIND
718 ALL_LDFLAGS := unix.cmxa threads.cmxa $(ALL_LDFLAGS)
719 endif
720 endif
721 endif
722 endif
723
724 export MAKE_DEPS
725
726 ifdef ANNOTATE
727 ANNOT_FLAG := -dtypes
728 else
729 endif
730
731 ALL_OCAMLCFLAGS := $(THREAD_FLAG) $(ANNOT_FLAG) $(OCAMLFLAGS) \
732 $(INCFLAGS) $(SPECIAL_OCAMLFLAGS)
733
734 ifdef make_deps
735 -include $(MAKE_DEPS)
736 PRE_TARGETS :=
737 endif
738
739 ###########################################################################
740 # USER RULES
741
742 # Call "OCamlMakefile QUIET=" to get rid of all of the @'s.
743 QUIET=@
744
745 # generates byte-code (default)
746 byte-code: $(PRE_TARGETS)
747 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT) \
748 REAL_RESULT="$(BCRESULT)" make_deps=yes
749 bc: byte-code
750
751 byte-code-nolink: $(PRE_TARGETS)
752 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
753 REAL_RESULT="$(BCRESULT)" make_deps=yes
754 bcnl: byte-code-nolink
755
756 top: $(PRE_TARGETS)
757 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(TOPRESULT) \
758 REAL_RESULT="$(BCRESULT)" make_deps=yes
759
760 # generates native-code
761
762 native-code: $(PRE_TARGETS)
763 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(NCRESULT) \
764 REAL_RESULT="$(NCRESULT)" \
765 REAL_OCAMLC="$(OCAMLOPT)" \
766 make_deps=yes
767 nc: native-code
768
769 native-code-nolink: $(PRE_TARGETS)
770 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
771 REAL_RESULT="$(NCRESULT)" \
772 REAL_OCAMLC="$(OCAMLOPT)" \
773 make_deps=yes
774 ncnl: native-code-nolink
775
776 # generates byte-code libraries
777 byte-code-library: $(PRE_TARGETS)
778 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
779 $(RES_CLIB) $(BCRESULT).cma \
780 REAL_RESULT="$(BCRESULT)" \
781 CREATE_LIB=yes \
782 make_deps=yes
783 bcl: byte-code-library
784
785 # generates native-code libraries
786 native-code-library: $(PRE_TARGETS)
787 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
788 $(RES_CLIB) $(NCRESULT).cmxa \
789 REAL_RESULT="$(NCRESULT)" \
790 REAL_OCAMLC="$(OCAMLOPT)" \
791 CREATE_LIB=yes \
792 make_deps=yes
793 ncl: native-code-library
794
795 ifdef WIN32
796 # generates byte-code dll
797 byte-code-dll: $(PRE_TARGETS)
798 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
799 $(RES_CLIB) $(BCRESULT).dll \
800 REAL_RESULT="$(BCRESULT)" \
801 make_deps=yes
802 bcd: byte-code-dll
803
804 # generates native-code dll
805 native-code-dll: $(PRE_TARGETS)
806 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
807 $(RES_CLIB) $(NCRESULT).dll \
808 REAL_RESULT="$(NCRESULT)" \
809 REAL_OCAMLC="$(OCAMLOPT)" \
810 make_deps=yes
811 ncd: native-code-dll
812 endif
813
814 # generates byte-code with debugging information
815 debug-code: $(PRE_TARGETS)
816 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT) \
817 REAL_RESULT="$(BCRESULT)" make_deps=yes \
818 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
819 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
820 dc: debug-code
821
822 debug-code-nolink: $(PRE_TARGETS)
823 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
824 REAL_RESULT="$(BCRESULT)" make_deps=yes \
825 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
826 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
827 dcnl: debug-code-nolink
828
829 # generates byte-code with debugging information (native code)
830 debug-native-code: $(PRE_TARGETS)
831 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(NCRESULT) \
832 REAL_RESULT="$(NCRESULT)" make_deps=yes \
833 REAL_OCAMLC="$(OCAMLOPT)" \
834 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
835 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
836 dnc: debug-native-code
837
838 debug-native-code-nolink: $(PRE_TARGETS)
839 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) nolink \
840 REAL_RESULT="$(NCRESULT)" make_deps=yes \
841 REAL_OCAMLC="$(OCAMLOPT)" \
842 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
843 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
844 dncnl: debug-native-code-nolink
845
846 # generates byte-code libraries with debugging information
847 debug-code-library: $(PRE_TARGETS)
848 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
849 $(RES_CLIB) $(BCRESULT).cma \
850 REAL_RESULT="$(BCRESULT)" make_deps=yes \
851 CREATE_LIB=yes \
852 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
853 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
854 dcl: debug-code-library
855
856 # generates byte-code libraries with debugging information (native code)
857 debug-native-code-library: $(PRE_TARGETS)
858 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
859 $(RES_CLIB) $(NCRESULT).cma \
860 REAL_RESULT="$(NCRESULT)" make_deps=yes \
861 REAL_OCAMLC="$(OCAMLOPT)" \
862 CREATE_LIB=yes \
863 OCAMLFLAGS="-g $(OCAMLFLAGS)" \
864 OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
865 dncl: debug-native-code-library
866
867 # generates byte-code for profiling
868 profiling-byte-code: $(PRE_TARGETS)
869 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT) \
870 REAL_RESULT="$(BCRESULT)" PROFILING="y" \
871 make_deps=yes
872 pbc: profiling-byte-code
873
874 # generates native-code
875
876 profiling-native-code: $(PRE_TARGETS)
877 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(NCRESULT) \
878 REAL_RESULT="$(NCRESULT)" \
879 REAL_OCAMLC="$(OCAMLOPT)" \
880 PROFILING="y" \
881 make_deps=yes
882 pnc: profiling-native-code
883
884 # generates byte-code libraries
885 profiling-byte-code-library: $(PRE_TARGETS)
886 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
887 $(RES_CLIB) $(BCRESULT).cma \
888 REAL_RESULT="$(BCRESULT)" PROFILING="y" \
889 CREATE_LIB=yes \
890 make_deps=yes
891 pbcl: profiling-byte-code-library
892
893 # generates native-code libraries
894 profiling-native-code-library: $(PRE_TARGETS)
895 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
896 $(RES_CLIB) $(NCRESULT).cmxa \
897 REAL_RESULT="$(NCRESULT)" PROFILING="y" \
898 REAL_OCAMLC="$(OCAMLOPT)" \
899 CREATE_LIB=yes \
900 make_deps=yes
901 pncl: profiling-native-code-library
902
903 # packs byte-code objects
904 pack-byte-code: $(PRE_TARGETS)
905 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) $(BCRESULT).cmo \
906 REAL_RESULT="$(BCRESULT)" \
907 PACK_LIB=yes make_deps=yes
908 pabc: pack-byte-code
909
910 # packs native-code objects
911 pack-native-code: $(PRE_TARGETS)
912 $(QUIET)$(MAKE) -r -f $(OCAMLMAKEFILE) \
913 $(NCRESULT).cmx $(NCRESULT).o \
914 REAL_RESULT="$(NCRESULT)" \
915 REAL_OCAMLC="$(OCAMLOPT)" \
916 PACK_LIB=yes make_deps=yes
917 panc: pack-native-code
918
919 # generates HTML-documentation
920 htdoc: $(DOC_DIR)/$(RESULT)/html/index.html
921
922 # generates Latex-documentation
923 ladoc: $(DOC_DIR)/$(RESULT)/latex/doc.tex
924
925 # generates PostScript-documentation
926 psdoc: $(DOC_DIR)/$(RESULT)/latex/doc.ps
927
928 # generates PDF-documentation
929 pdfdoc: $(DOC_DIR)/$(RESULT)/latex/doc.pdf
930
931 # generates all supported forms of documentation
932 doc: htdoc ladoc psdoc pdfdoc
933
934 ###########################################################################
935 # LOW LEVEL RULES
936
937 $(REAL_RESULT): $(REAL_IMPL_INTF) $(OBJ_LINK) $(EXTRADEPS) $(RESULTDEPS)
938 $(REAL_OCAMLFIND) $(REAL_OCAMLC) \
939 $(OCAML_FIND_PACKAGES) $(OCAML_FIND_LINKPKG) \
940 $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@$(EXE) \
941 $(REAL_IMPL)
942
943 nolink: $(REAL_IMPL_INTF) $(OBJ_LINK)
944
945 ifdef WIN32
946 $(REAL_RESULT).dll: $(REAL_IMPL_INTF) $(OBJ_LINK)
947 $(CAMLIDLDLL) $(CAMLIDLDLLFLAGS) $(OBJ_LINK) $(CLIBS) \
948 -o $@ $(REAL_IMPL)
949 endif
950
951 %$(TOPSUFFIX): $(REAL_IMPL_INTF) $(OBJ_LINK) $(EXTRADEPS)
952 $(REAL_OCAMLFIND) $(OCAMLMKTOP) \
953 $(OCAML_FIND_PACKAGES) $(OCAML_FIND_LINKPKG) \
954 $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@$(EXE) \
955 $(REAL_IMPL)
956
957 .SUFFIXES: .mli .ml .cmi .cmo .cmx .cma .cmxa .$(EXT_OBJ) \
958 .mly .di .d .$(EXT_LIB) .idl %.oxridl .c .m .$(EXT_CXX) .h .so \
959 .rep .zog .glade
960
961 ifndef STATIC
962 ifdef MINGW
963 $(DLLSONAME): $(OBJ_LINK)
964 $(CC) $(CFLAGS) $(CFLAGS_WIN32) $(OBJ_LINK) -shared -o $@ \
965 -Wl,--whole-archive $(wildcard $(foreach dir,$(LIBDIRS),$(CLIBS:%=$(dir)/lib%.a))) \
966 '$(OCAMLLIBPATH)/ocamlrun.a' \
967 -Wl,--export-all-symbols \
968 -Wl,--no-whole-archive \
969 -Wl,--allow-multiple-definition \
970 -Wl,--enable-auto-import
971 else
972 ifdef MSVC
973 $(DLLSONAME): $(OBJ_LINK)
974 link /NOLOGO /DLL /OUT:$@ $(OBJ_LINK) \
975 $(wildcard $(foreach dir,$(LIBDIRS),$(CLIBS:%=$(dir)/%.lib))) \
976 '$(OCAMLLIBPATH)/ocamlrun.lib'
977
978 else
979 $(DLLSONAME): $(OBJ_LINK)
980 $(OCAMLMKLIB) $(INCFLAGS) $(CLIBFLAGS) \
981 -o $(CLIB_BASE) $(OBJ_LINK) $(CLIBS:%=-l%) $(CFRAMEWORKS:%=-framework %) \
982 $(OCAMLMKLIB_FLAGS)
983 endif
984 endif
985 endif
986
987 ifndef LIB_PACK_NAME
988 $(RESULT).cma: $(REAL_IMPL_INTF) $(MAKEDLL) $(EXTRADEPS) $(RESULTDEPS)
989 $(REAL_OCAMLFIND) $(REAL_OCAMLC) -a $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@ $(REAL_IMPL)
990
991 $(RESULT).cmxa $(RESULT).$(EXT_LIB): $(REAL_IMPL_INTF) $(EXTRADEPS) $(RESULTDEPS)
992 $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@ $(REAL_IMPL)
993 else
994 # Packing a bytecode library
995 ifdef BYTE_OCAML
996 $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo: $(REAL_IMPL_INTF)
997 $(REAL_OCAMLFIND) $(REAL_OCAMLC) -pack -o $(LIB_PACK_NAME).cmo $(OCAMLLDFLAGS) $(REAL_IMPL)
998 # Packing into a unit which can be transformed into a library
999 # Remember the .ml's must have been compiled with -for-pack $(LIB_PACK_NAME)
1000 else
1001 $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmx: $(REAL_IMPL_INTF)
1002 $(REAL_OCAMLFIND) $(OCAMLOPT) -pack -o $(LIB_PACK_NAME).cmx $(OCAMLLDFLAGS) $(REAL_IMPL)
1003 endif
1004
1005 $(RESULT).cma: $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo $(MAKEDLL) $(EXTRADEPS) $(RESULTDEPS)
1006 $(REAL_OCAMLFIND) $(REAL_OCAMLC) -a $(ALL_LDFLAGS) $(OBJS_LIBS) -o $@ $(LIB_PACK_NAME).cmo
1007
1008 $(RESULT).cmxa $(RESULT).$(EXT_LIB): $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmx $(EXTRADEPS) $(RESULTDEPS)
1009 $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(filter-out -custom, $(ALL_LDFLAGS)) $(OBJS_LIBS) -o $@ $(LIB_PACK_NAME).cmx
1010 endif
1011
1012 $(RES_CLIB): $(OBJ_LINK)
1013 ifndef MSVC
1014 ifneq ($(strip $(OBJ_LINK)),)
1015 $(AR) rcs $@ $(OBJ_LINK)
1016 endif
1017 else
1018 ifneq ($(strip $(OBJ_LINK)),)
1019 lib -nologo -debugtype:cv -out:$(RES_CLIB) $(OBJ_LINK)
1020 endif
1021 endif
1022
1023 .mli.cmi: $(EXTRADEPS)
1024 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
1025 if [ -z "$$pp" ]; then \
1026 $(ECHO) $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
1027 -c $(THREAD_FLAG) $(ANNOT_FLAG) \
1028 $(OCAMLFLAGS) $(INCFLAGS) $<; \
1029 $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
1030 -c $(THREAD_FLAG) $(ANNOT_FLAG) \
1031 $(OCAMLFLAGS) $(INCFLAGS) $<; \
1032 else \
1033 $(ECHO) $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
1034 -c -pp \"$$pp $(PPFLAGS)\" $(THREAD_FLAG) $(ANNOT_FLAG) \
1035 $(OCAMLFLAGS) $(INCFLAGS) $<; \
1036 $(REAL_OCAMLFIND) $(INTF_OCAMLC) $(OCAML_FIND_PACKAGES) \
1037 -c -pp "$$pp $(PPFLAGS)" $(THREAD_FLAG) $(ANNOT_FLAG) \
1038 $(OCAMLFLAGS) $(INCFLAGS) $<; \
1039 fi
1040
1041 .ml.cmi .ml.$(EXT_OBJ) .ml.cmx .ml.cmo: $(EXTRADEPS)
1042 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
1043 if [ -z "$$pp" ]; then \
1044 $(ECHO) $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
1045 -c $(ALL_OCAMLCFLAGS) $<; \
1046 $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
1047 -c $(ALL_OCAMLCFLAGS) $<; \
1048 else \
1049 $(ECHO) $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
1050 -c -pp \"$$pp $(PPFLAGS)\" $(ALL_OCAMLCFLAGS) $<; \
1051 $(REAL_OCAMLFIND) $(REAL_OCAMLC) $(OCAML_FIND_PACKAGES) \
1052 -c -pp "$$pp $(PPFLAGS)" $(ALL_OCAMLCFLAGS) $<; \
1053 fi
1054
1055 .PRECIOUS: %.ml
1056 %.ml: %.mll
1057 $(OCAMLLEX) $(LFLAGS) $<
1058
1059 .PRECIOUS: %.ml %.mli
1060 %.ml %.mli: %.mly
1061 $(OCAMLYACC) $(YFLAGS) $<
1062 $(QUIET)pp=`sed -n -e 's/.*(\*pp \([^*]*\) \*).*/\1/p;q' $<`; \
1063 if [ ! -z "$$pp" ]; then \
1064 mv $*.ml $*.ml.temporary; \
1065 echo "(*pp $$pp $(PPFLAGS)*)" > $*.ml; \
1066 cat $*.ml.temporary >> $*.ml; \
1067 rm $*.ml.temporary; \
1068 mv $*.mli $*.mli.temporary; \
1069 echo "(*pp $$pp $(PPFLAGS)*)" > $*.mli; \
1070 cat $*.mli.temporary >> $*.mli; \
1071 rm $*.mli.temporary; \
1072 fi
1073
1074
1075 .PRECIOUS: %.ml
1076 %.ml: %.rep
1077 $(CAMELEON_REPORT) $(CAMELEON_REPORT_FLAGS) -gen $<
1078
1079 .PRECIOUS: %.ml
1080 %.ml: %.zog
1081 $(CAMELEON_ZOGGY) $(CAMELEON_ZOGGY_FLAGS) -impl $< > $@
1082
1083 .PRECIOUS: %.ml
1084 %.ml: %.glade
1085 $(OCAML_GLADECC) $(OCAML_GLADECC_FLAGS) $< > $@
1086
1087 .PRECIOUS: %.ml %.mli
1088 %.ml %.mli: %.oxridl
1089 $(OXRIDL) $<
1090
1091 .PRECIOUS: %.ml %.mli %_stubs.c %.h
1092 %.ml %.mli %_stubs.c %.h: %.idl
1093 $(CAMLIDL) $(MAYBE_IDL_HEADER) $(IDLFLAGS) \
1094 $(CAMLIDLFLAGS) $<
1095 $(QUIET)if [ $(NOIDLHEADER) ]; then touch $*.h; fi
1096
1097 .c.$(EXT_OBJ):
1098 $(OCAMLC) -c -cc "$(CC)" -ccopt "$(CFLAGS) \
1099 $(CPPFLAGS) $(CPPFLAGS_WIN32) \
1100 $(CFLAGS_WIN32) $(CINCFLAGS) $(CFLAG_O)$@ " $<
1101
1102 .m.$(EXT_OBJ):
1103 $(CC) -c $(CFLAGS) $(CINCFLAGS) $(CPPFLAGS) \
1104 -I'$(OCAMLLIBPATH)' \
1105 $< $(CFLAG_O)$@
1106
1107 .$(EXT_CXX).$(EXT_OBJ):
1108 $(CXX) -c $(CXXFLAGS) $(CINCFLAGS) $(CPPFLAGS) \
1109 -I'$(OCAMLLIBPATH)' \
1110 $< $(CFLAG_O)$@
1111
1112 $(MLDEPDIR)/%.d: %.ml
1113 $(QUIET)if [ ! -d $(@D) ]; then mkdir -p $(@D); fi
1114 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
1115 if [ -z "$$pp" ]; then \
1116 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
1117 $(DINCFLAGS) $< \> $@; \
1118 $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
1119 $(DINCFLAGS) $< > $@; \
1120 else \
1121 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
1122 -pp \"$$pp $(PPFLAGS)\" $(DINCFLAGS) $< \> $@; \
1123 $(REAL_OCAMLFIND) $(OCAMLDEP) $(OCAML_DEP_PACKAGES) \
1124 -pp "$$pp $(PPFLAGS)" $(DINCFLAGS) $< > $@; \
1125 fi
1126
1127 $(BCDIDIR)/%.di $(NCDIDIR)/%.di: %.mli
1128 $(QUIET)if [ ! -d $(@D) ]; then mkdir -p $(@D); fi
1129 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $<`; \
1130 if [ -z "$$pp" ]; then \
1131 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) $(DINCFLAGS) $< \> $@; \
1132 $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) $(DINCFLAGS) $< > $@; \
1133 else \
1134 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) \
1135 -pp \"$$pp $(PPFLAGS)\" $(DINCFLAGS) $< \> $@; \
1136 $(REAL_OCAMLFIND) $(OCAMLDEP) $(DEPFLAGS) \
1137 -pp "$$pp $(PPFLAGS)" $(DINCFLAGS) $< > $@; \
1138 fi
1139
1140 $(DOC_DIR)/$(RESULT)/html:
1141 mkdir -p $@
1142
1143 $(DOC_DIR)/$(RESULT)/html/index.html: $(DOC_DIR)/$(RESULT)/html $(DOC_FILES)
1144 rm -rf $</*
1145 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $(FIRST_DOC_FILE)`; \
1146 if [ -z "$$pp" ]; then \
1147 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -html -d $< $(OCAMLDOCFLAGS) $(INCFLAGS) $(DOC_FILES); \
1148 $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -html -d $< $(OCAMLDOCFLAGS) $(INCFLAGS) $(DOC_FILES); \
1149 else \
1150 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -pp \"$$pp $(PPFLAGS)\" -html -d $< $(OCAMLDOCFLAGS) \
1151 $(INCFLAGS) $(DOC_FILES); \
1152 $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -pp "$$pp $(PPFLAGS)" -html -d $< $(OCAMLDOCFLAGS) \
1153 $(INCFLAGS) $(DOC_FILES); \
1154 fi
1155
1156 $(DOC_DIR)/$(RESULT)/latex:
1157 mkdir -p $@
1158
1159 $(DOC_DIR)/$(RESULT)/latex/doc.tex: $(DOC_DIR)/$(RESULT)/latex $(DOC_FILES)
1160 rm -rf $</*
1161 $(QUIET)pp=`sed -n -e '/^#/d' -e 's/(\*pp \([^*]*\) \*)/\1/p;q' $(FIRST_DOC_FILE)`; \
1162 if [ -z "$$pp" ]; then \
1163 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -latex $(OCAMLDOCFLAGS) $(INCFLAGS) \
1164 $(DOC_FILES) -o $@; \
1165 $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -latex $(OCAMLDOCFLAGS) $(INCFLAGS) $(DOC_FILES) \
1166 -o $@; \
1167 else \
1168 $(ECHO) $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -pp \"$$pp $(PPFLAGS)\" -latex $(OCAMLDOCFLAGS) \
1169 $(INCFLAGS) $(DOC_FILES) -o $@; \
1170 $(REAL_OCAMLFIND) $(OCAMLDOC) $(OCAML_FIND_PACKAGES) -pp "$$pp $(PPFLAGS)" -latex $(OCAMLDOCFLAGS) \
1171 $(INCFLAGS) $(DOC_FILES) -o $@; \
1172 fi
1173
1174 $(DOC_DIR)/$(RESULT)/latex/doc.ps: $(DOC_DIR)/$(RESULT)/latex/doc.tex
1175 cd $(DOC_DIR)/$(RESULT)/latex && \
1176 $(LATEX) doc.tex && \
1177 $(LATEX) doc.tex && \
1178 $(DVIPS) $(DVIPSFLAGS) doc.dvi -o $(@F)
1179
1180 $(DOC_DIR)/$(RESULT)/latex/doc.pdf: $(DOC_DIR)/$(RESULT)/latex/doc.ps
1181 cd $(DOC_DIR)/$(RESULT)/latex && $(PS2PDF) $(<F)
1182
1183 define make_subproj
1184 .PHONY:
1185 subproj_$(1):
1186 $$(eval $$(call PROJ_$(1)))
1187 $(QUIET)if [ "$(SUBTARGET)" != "all" ]; then \
1188 $(MAKE) -f $(OCAMLMAKEFILE) $(SUBTARGET); \
1189 fi
1190 endef
1191
1192 $(foreach subproj,$(SUBPROJS),$(eval $(call make_subproj,$(subproj))))
1193
1194 .PHONY:
1195 subprojs: $(SUBPROJS:%=subproj_%)
1196
1197 ###########################################################################
1198 # (UN)INSTALL RULES FOR LIBRARIES
1199
1200 .PHONY: libinstall
1201 libinstall: all
1202 $(QUIET)printf "\nInstalling library with ocamlfind\n"
1203 $(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META $(LIBINSTALL_FILES)
1204 $(QUIET)printf "\nInstallation successful.\n"
1205
1206 .PHONY: libinstall-byte-code
1207 libinstall-byte-code: all
1208 $(QUIET)printf "\nInstalling byte-code library with ocamlfind\n"
1209 $(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META \
1210 $(filter-out $(RESULT).$(EXT_LIB) $(RESULT).cmxa, $(LIBINSTALL_FILES))
1211 $(QUIET)printf "\nInstallation successful.\n"
1212
1213 .PHONY: libinstall-native-code
1214 libinstall-native-code: all
1215 $(QUIET)printf "\nInstalling native-code library with ocamlfind\n"
1216 $(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META \
1217 $(filter-out $(DLLSONAME) $(RESULT).cma, $(LIBINSTALL_FILES))
1218 $(QUIET)printf "\nInstallation successful.\n"
1219
1220 .PHONY: libuninstall
1221 libuninstall:
1222 $(QUIET)printf "\nUninstalling library with ocamlfind\n"
1223 $(OCAMLFIND) remove $(OCAMLFIND_INSTFLAGS) $(RESULT)
1224 $(QUIET)printf "\nUninstallation successful.\n"
1225
1226 .PHONY: rawinstall
1227 rawinstall: all
1228 $(QUIET)printf "\nInstalling library to: $(OCAML_LIB_INSTALL)\n"
1229 -install -d $(OCAML_LIB_INSTALL)
1230 for i in $(LIBINSTALL_FILES); do \
1231 if [ -f $$i ]; then \
1232 install -c -m 0644 $$i $(OCAML_LIB_INSTALL); \
1233 fi; \
1234 done
1235 $(QUIET)printf "\nInstallation successful.\n"
1236
1237 .PHONY: rawuninstall
1238 rawuninstall:
1239 $(QUIET)printf "\nUninstalling library from: $(OCAML_LIB_INSTALL)\n"
1240 cd $(OCAML_LIB_INSTALL) && rm $(notdir $(LIBINSTALL_FILES))
1241 $(QUIET)printf "\nUninstallation successful.\n"
1242
1243 ###########################################################################
1244 # MAINTENANCE RULES
1245
1246 .PHONY: clean
1247 clean::
1248 rm -f $(TARGETS) $(TRASH)
1249 rm -rf $(BCDIDIR) $(NCDIDIR) $(MLDEPDIR)
1250
1251 .PHONY: cleanup
1252 cleanup::
1253 rm -f $(NONEXECS) $(TRASH)
1254 rm -rf $(BCDIDIR) $(NCDIDIR) $(MLDEPDIR)
1255
1256 .PHONY: clean-doc
1257 clean-doc::
1258 rm -rf $(DOC_DIR)/$(RESULT)
1259
1260 .PHONY: clean-all
1261 clean-all:: clean clean-doc
1262
1263 .PHONY: nobackup
1264 nobackup:
1265 rm -f *.bak *~ *.dup
0 module C = Configurator.V1
1
2 let faad_test_code = {|
3 #include <neaacdec.h>
4
5 int main()
6 {
7 NeAACDecHandle hAac = NeAACDecOpen();
8 unsigned char input[1024];
9 size_t input_size = 0;
10 unsigned long samplerate;
11 unsigned char channels;
12
13 char err = NeAACDecInit(hAac, input, input_size, &samplerate, &channels);
14
15 return 0;
16 }
17 |}
18
19 let () =
20 C.main ~name:"has_faad" (fun c ->
21 let has_faad = C.c_test c faad_test_code ~link_flags:["-lfaad -lm"] in
22
23 C.C_define.gen_header_file c ~fname:"config.h"
24 [ "HAS_FAAD", Switch has_faad ]);
0 (executable
1 (name discover)
2 (libraries dune.configurator))
0 (library
1 (name faad)
2 (public_name faad)
3 (synopsis "Ocaml bindings to libfaad")
4 (foreign_stubs
5 (language c)
6 (extra_deps config.h)
7 (names
8 faad_stubs
9 mp4atom
10 mp4ff
11 mp4meta
12 mp4sample
13 mp4tagupdate
14 mp4util)
15 (flags -DUSE_TAGGING))
16 (c_library_flags "-lfaad -lm"))
17
18 (rule
19 (targets config.h)
20 (action (run ./config/discover.exe)))
6464
6565 type sample = int
6666
67 type read = bytes -> int -> int -> int
68
6769 let is_mp4 s =
6870 assert (String.length s >= 8);
6971 s.[4] = 'f' && s.[5] = 't' && s.[6] = 'y' && s.[7] = 'p'
7072
71 external open_read : bool -> (int -> (Bytes.t * int * int)) -> (Bytes.t -> int) option -> (int -> int) option -> (unit -> int) option -> t = "ocaml_faad_mp4_open_read"
73 external open_read : bool -> read -> (Bytes.t -> int) option -> (int -> int) option -> (unit -> int) option -> t = "ocaml_faad_mp4_open_read"
7274
7375 external open_read_fd : bool -> Unix.file_descr -> t = "ocaml_faad_mp4_open_read_fd"
7476
6868 (** A sample number. *)
6969 type sample = int
7070
71 (** Data read. Same signature as [Unix.read]. *)
72 type read = bytes -> int -> int -> int
73
7174 (** Detect whether the file is an MP4 given at least 8 bytes of its header. *)
7275 val is_mp4 : string -> bool
7376
7477 (** Open an MP4 file. *)
7578 val openfile : ?write:(Bytes.t -> int) ->
7679 ?seek:(int -> int) ->
77 ?trunc:(unit -> int) ->
78 (int -> (Bytes.t * int * int)) -> t
80 ?trunc:(unit -> int) -> read -> t
7981
8082 val openfile_fd : Unix.file_descr -> t
8183
223223 {
224224 mp4_t *mp = (mp4_t*)user_data;
225225 value ans;
226 int ofs, len;
226 int len;
227 value tmp;
227228
228229 if (mp->fd != -1)
229230 return read(mp->fd, buffer, length);
230231 else
231232 {
232233 caml_acquire_runtime_system();
233 ans = caml_callback(mp->read_cb, Val_int(length));
234
235 ofs = Int_val(Field(ans, 1));
236 len = Int_val(Field(ans, 2));
237 ans = Field(ans, 0);
238 memcpy(buffer, String_val(ans)+ofs, len);
234
235 tmp = caml_alloc_string(length);
236 caml_register_generational_global_root(&tmp);
237
238 ans = caml_callback3_exn(mp->read_cb, tmp, Val_int(0), Val_int(length));
239
240 if (Is_exception_result(ans)) {
241 ans = Extract_exception(ans);
242 caml_remove_generational_global_root(&tmp);
243 caml_raise(ans);
244 }
245
246 len = Int_val(ans);
247
248 if (len > 0) memcpy(buffer, String_val(tmp), len);
249
250 caml_remove_generational_global_root(&tmp);
239251
240252 caml_release_runtime_system();
241253
2828 **/
2929
3030 #include <stdlib.h>
31 #ifndef _WIN32
32 #include "config.h"
33 #else
34 #include <tchar.h>
35 #include <windows.h>
31 #include <string.h>
32
33 #ifdef _WIN32
34 # include <tchar.h>
35 # include <windows.h>
3636 #endif
37 #ifdef HAVE_GETPWUID
38 # include <pwd.h>
39 #endif
40 #ifdef HAVE_STRING_H
41 # include <string.h>
42 #endif
37
4338 #include "mp4ffint.h"
4439
4540 #define COPYRIGHT_SYMBOL ((int8_t)0xA9)
124124 #define ATOM_SINF 24
125125 #define ATOM_SCHI 25
126126
127 #ifdef HAVE_CONFIG_H
128 #include "../config.h"
129 #endif
130
131127 #if !(defined(_WIN32) || defined(_WIN32_WCE))
132128 #define stricmp strcasecmp
133129 #else