3 #########################################################################
7 # Xavier Leroy, projet Cristal, INRIA Rocquencourt #
9 # Copyright 1999 Institut National de Recherche en Informatique et #
10 # en Automatique. All rights reserved. This file is distributed #
11 # under the terms of the GNU Library General Public License, with #
12 # the special exception on linking described in file LICENSE. #
14 #########################################################################
16 # $Id: configure,v 1.228.2.5 2006/03/30 10:00:19 doligez Exp $
18 configure_options
="$*"
43 # Try to turn internationalization off, can cause config.guess to malfunction!
45 unset LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME
47 # Turn off some MacOS X debugging stuff, same reason
48 unset RC_TRACE_ARCHIVES RC_TRACE_DYLIBS RC_TRACE_PREBINDING_DISABLED
50 # Parse command-line arguments
64 mandir
=`echo $2 | sed -e 's|^\(.*\)/man.$|\1|'`
65 manext
=`echo $2 | sed -e 's/^.*\(.\)$/\1/'`;;
74 ccoption
="$2"; shift;;
76 cclibs
="$2 $cclibs"; shift;;
81 -x11include*|
--x11include*)
82 x11_include_dir
=$2; shift;;
84 x11_lib_dir
=$2; shift;;
85 -with-pthread*|
--with-pthread*)
86 ;; # Ignored for backward compatibility
87 -no-pthread*|
--no-pthread*)
95 -tk-no-x11|
--tk-no-x11)
103 *) echo "Unknown option \"$1\"." 1>&2; exit 2;;
112 *) echo "The -prefix directory must be absolute." 1>&2; exit 2;;
117 *) echo "The -bindir directory must be absolute." 1>&2; exit 2;;
122 *) echo "The -libdir directory must be absolute." 1>&2; exit 2;;
127 *) echo "The -mandir directory must be absolute." 1>&2; exit 2;;
133 rm -f s.h m.h Makefile
134 touch s.h m.h Makefile
136 # Write options to Makefile
138 echo "# generated by ./configure $configure_options" >> Makefile
142 echo "PREFIX=$prefix" >> Makefile
144 "") echo 'BINDIR=$(PREFIX)/bin' >> Makefile
145 bindir
="$prefix/bin";;
146 *) echo "BINDIR=$bindir" >> Makefile
;;
149 "") echo 'LIBDIR=$(PREFIX)/lib/ocaml' >> Makefile
150 libdir
="$prefix/lib/ocaml";;
151 *) echo "LIBDIR=$libdir" >> Makefile
;;
153 echo 'STUBLIBDIR=$(LIBDIR)/stublibs' >> Makefile
155 "") echo 'MANDIR=$(PREFIX)/man' >> Makefile
156 mandir
="$prefix/man";;
157 *) echo "MANDIR=$mandir" >> Makefile
;;
159 echo "MANEXT=$manext" >> Makefile
161 # Determine the system type
163 if test "$host_type" = "unknown"; then
164 if host_type
=`../gnu/config.guess`; then :; else
165 echo "Cannot guess host type"
166 echo "You must specify one with the -host option"
170 if host=`../gnu/config.sub $host_type`; then :; else
171 echo "Please specify the correct host type with the -host option"
174 echo "Configuring for a $host ..."
178 if test -z "$ccoption"; then
179 if sh .
/searchpath gcc
; then
189 # Check for buggy versions of GCC
195 case `$cc --version` in
198 WARNING: you are using gcc version 2.7.2.1 on an Intel x86 processor.
199 This version of gcc is known to generate incorrect code for the
200 Objective Caml runtime system on some Intel x86 machines. (The symptom
201 is a crash of boot/ocamlc when compiling stdlib/pervasives.mli.)
202 In particular, the version of gcc 2.7.2.1 that comes with
203 Linux RedHat 4.x / Intel is affected by this problem.
204 Other Linux distributions might also be affected.
205 If you are using one of these configurations, you are strongly advised
206 to use another version of gcc, such as 2.95, which are
207 known to work well with Objective Caml.
209 Press <enter> to proceed or <interrupt> to stop.
214 WARNING: you are using gcc version 2.96 on an Intel x86 processor.
215 Certain patched versions of gcc 2.96 are known to generate incorrect
216 code for the Objective Caml runtime system. (The symptom is a segmentation
217 violation on boot/ocamlc.) Those incorrectly patched versions can be found
218 in RedHat 7.2 and Mandrake 8.0 and 8.1; other Linux distributions
219 might also be affected. (See bug #57760 on bugzilla.redhat.com)
221 Auto-configuration will now select gcc compiler flags that work around
222 the problem. Still, if you observe segmentation faults while running
223 ocamlc or ocamlopt, you are advised to try another version of gcc,
224 such as 2.95.3 or 3.2.
232 # Configure the bytecode compiler
240 case "$bytecc,$host" in
242 # GNU C extensions disabled, but __GNUC__ still defined!
243 bytecccompopts
="-fno-defer-pop $gcc_warnings -U__GNUC__ -posix"
244 bytecclinkopts
="-posix";;
246 # Almost the same as NeXTStep
247 bytecccompopts
="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC"
250 # Almost the same as rhapsody
251 bytecccompopts
="-fno-defer-pop -no-cpp-precomp $gcc_warnings"
254 bytecccompopts
="-fno-defer-pop $gcc_warnings"
258 bytecccompopts
="-fno-defer-pop $gcc_warnings"
259 if cc
="$bytecc" sh .
/hasgot
-mieee; then
260 bytecccompopts
="-mieee $bytecccompopts";
262 # Put code and static data in lower 4GB
263 bytecclinkopts
="-Wl,-T,12000000 -Wl,-D,14000000"
264 # Tell gcc that we can use 32-bit code addresses for threaded code
265 echo "#define ARCH_CODE32" >> m.h
;;
267 bytecccompopts
="-std1 -ieee";;
269 if cc
="$bytecc" sh .
/hasgot
-mieee; then
270 bytecccompopts
="-mieee $bytecccompopts";
273 # Add -n32 flag to ensure compatibility with native-code compiler
274 bytecccompopts
="-n32"
275 # Turn off warning "unused library"
276 bytecclinkopts
="-n32 -Wl,-woff,84";;
278 # (For those who want to force "cc -64")
279 # Turn off warning "unused library"
280 bytecclinkopts
="-Wl,-woff,84";;
283 bytecccompopts
="-DUMK";;
285 # Avoid name-space pollution by requiring Unix98-conformant includes
286 bytecccompopts
="-fno-defer-pop $gcc_warnings -D_XOPEN_SOURCE=500";;
288 bytecccompopts
="-D_XOPEN_SOURCE=500";;
290 bytecccompopts
="-fno-defer-pop $gcc_warnings -U_WIN32"
293 gcc
*,x86_64-
*-linux*)
294 bytecccompopts
="-fno-defer-pop $gcc_warnings"
295 # Tell gcc that we can use 32-bit code addresses for threaded code
296 # unless we are compiled for a shared library (-fPIC option)
297 echo "#ifndef __PIC__" >> m.h
298 echo "# define ARCH_CODE32" >> m.h
299 echo "#endif" >> m.h
;;
301 bytecccompopts
="-fno-defer-pop $gcc_warnings";;
304 # Configure compiler to use in further tests
306 cc
="$bytecc -O $bytecclinkopts"
307 export cc cclibs verbose
313 0) echo "The C compiler is ANSI-compliant.";;
314 1) echo "The C compiler $cc is not ANSI-compliant."
315 echo "You need an ANSI C compiler to build Objective Caml."
317 *) echo "Unable to compile the test program."
318 echo "Make sure the C compiler $cc is properly installed."
322 # Check the sizes of data types
324 echo "Checking the sizes of integers and pointers..."
325 set `sh ./runtest sizes.c`
327 4,4) echo "OK, this is a regular 32 bit architecture."
328 echo "#undef ARCH_SIXTYFOUR" >> m.h
;;
329 *,8) echo "Wow! A 64 bit architecture!"
330 echo "#define ARCH_SIXTYFOUR" >> m.h
;;
331 *,*) echo "This architecture seems to be neither 32 bits nor 64 bits."
332 echo "Objective Caml won't run on this architecture."
334 *) echo "Unable to compile the test program."
335 echo "Make sure the C compiler $cc is properly installed."
338 if test $1 != 4 && test $2 != 4 && test $4 != 4; then
339 echo "Sorry, we can't find a 32-bit integer type"
340 echo "(sizeof(short) = $4, sizeof(int) = $1, sizeof(long) = $2)"
341 echo "Objective Caml won't run on this architecture."
345 echo "#define SIZEOF_INT $1" >> m.h
346 echo "#define SIZEOF_LONG $2" >> m.h
347 echo "#define SIZEOF_PTR $3" >> m.h
348 echo "#define SIZEOF_SHORT $4" >> m.h
351 echo "#define ARCH_INT64_TYPE long" >> m.h
352 echo "#define ARCH_UINT64_TYPE unsigned long" >> m.h
353 echo '#define ARCH_INT64_PRINTF_FORMAT "l"' >> m.h
356 sh .
/runtest longlong.c
358 0) echo "64-bit \"long long\" integer type found (printf with \"%ll\")."
359 echo "#define ARCH_INT64_TYPE long long" >> m.h
360 echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
361 echo '#define ARCH_INT64_PRINTF_FORMAT "ll"' >> m.h
363 1) echo "64-bit \"long long\" integer type found (printf with \"%q\")."
364 echo "#define ARCH_INT64_TYPE long long" >> m.h
365 echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
366 echo '#define ARCH_INT64_PRINTF_FORMAT "q"' >> m.h
368 2) echo "64-bit \"long long\" integer type found (but no printf)."
369 echo "#define ARCH_INT64_TYPE long long" >> m.h
370 echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
371 echo '#undef ARCH_INT64_PRINTF_FORMAT' >> m.h
373 *) echo "No suitable 64-bit integer type found, will use software emulation."
374 echo "#undef ARCH_INT64_TYPE" >> m.h
375 echo "#undef ARCH_UINT64_TYPE" >> m.h
376 echo '#undef ARCH_INT64_PRINTF_FORMAT' >> m.h
381 if test $3 = 8 && test $int64_native = false
; then
382 echo "This architecture has 64-bit pointers but no 64-bit integer type."
383 echo "Objective Caml won't run on this architecture."
387 # Determine endianness
389 sh .
/runtest endian.c
391 0) echo "This is a big-endian architecture."
392 echo "#define ARCH_BIG_ENDIAN" >> m.h
;;
393 1) echo "This is a little-endian architecture."
394 echo "#undef ARCH_BIG_ENDIAN" >> m.h
;;
395 2) echo "This architecture seems to be neither big endian nor little endian."
396 echo "Objective Caml won't run on this architecture."
398 *) echo "Something went wrong during endianness determination."
399 echo "You'll have to figure out endianness yourself"
400 echo "(option ARCH_BIG_ENDIAN in m.h).";;
403 # Determine alignment constraints
406 sparc
*-*-*|hppa
*-*-*)
407 # On Sparc V9 with certain versions of gcc, determination of double
408 # alignment is not reliable (PR#1521), hence force it.
409 # Same goes for hppa.
410 # But there's a knack (PR#2572):
411 # if we're in 64-bit mode (sizeof(long) == 8),
412 # we must not doubleword-align floats...
414 echo "Doubles can be word-aligned."
415 echo "#undef ARCH_ALIGN_DOUBLE" >> m.h
417 echo "Doubles must be doubleword-aligned."
418 echo "#define ARCH_ALIGN_DOUBLE" >> m.h
421 sh .
/runtest dblalign.c
423 0) echo "Doubles can be word-aligned."
424 echo "#undef ARCH_ALIGN_DOUBLE" >> m.h
;;
425 1) echo "Doubles must be doubleword-aligned."
426 echo "#define ARCH_ALIGN_DOUBLE" >> m.h
;;
427 *) echo "Something went wrong during alignment determination for doubles."
428 echo "I'm going to assume this architecture has alignment constraints over doubles."
429 echo "That's a safe bet: Objective Caml will work even if"
430 echo "this architecture has actually no alignment constraints."
431 echo "#define ARCH_ALIGN_DOUBLE" >> m.h
;;
435 if $int64_native; then
437 sparc
*-*-*|hppa
*-*-*)
439 echo "64-bit integers can be word-aligned."
440 echo "#undef ARCH_ALIGN_INT64" >> m.h
442 echo "64-bit integers must be doubleword-aligned."
443 echo "#define ARCH_ALIGN_INT64" >> m.h
446 sh .
/runtest int64align.c
448 0) echo "64-bit integers can be word-aligned."
449 echo "#undef ARCH_ALIGN_INT64" >> m.h
;;
450 1) echo "64-bit integers must be doubleword-aligned."
451 echo "#define ARCH_ALIGN_INT64" >> m.h
;;
452 *) echo "Something went wrong during alignment determination for 64-bit integers."
453 echo "I'm going to assume this architecture has alignment constraints."
454 echo "That's a safe bet: Objective Caml will work even if"
455 echo "this architecture has actually no alignment constraints."
456 echo "#define ARCH_ALIGN_INT64" >> m.h
;;
460 echo "#undef ARCH_ALIGN_INT64" >> m.h
463 # Check semantics of division and modulus
465 sh .
/runtest divmod.c
467 0) echo "Native division and modulus have round-towards-zero semantics, will use them."
468 echo "#undef NONSTANDARD_DIV_MOD" >> m.h
;;
469 1) echo "Native division and modulus do not have round-towards-zero semantics, will use software emulation."
470 echo "#define NONSTANDARD_DIV_MOD" >> m.h
;;
471 *) echo "Something went wrong while checking native division and modulus, please report it."
472 echo "#define NONSTANDARD_DIV_MOD" >> m.h
;;
475 # Shared library support
477 shared_libraries_supported
=false
478 dl_needs_underscore
=false
484 if test $withsharedlibs = "yes"; then
486 *-*-linux-gnu|
*-*-linux|
*-*-freebsd[3-9]*|
*-*-gnu*)
487 sharedcccompopts
="-fPIC"
488 mksharedlib
="$bytecc -shared -o"
489 bytecclinkopts
="$bytecclinkopts -Wl,-E"
490 byteccrpath
="-Wl,-rpath,"
491 mksharedlibrpath
="-Wl,-rpath,"
492 shared_libraries_supported
=true
;;
496 sharedcccompopts
="-fPIC"
497 mksharedlib
="$bytecc -shared -o"
498 byteccrpath
="-Wl,-rpath,"
499 mksharedlibrpath
="-Wl,-rpath,"
500 shared_libraries_supported
=true
;;
503 mksharedlib
="ld -shared -expect_unresolved '*' -o"
504 byteccrpath
="-Wl,-rpath,"
505 mksharedlibrpath
="-rpath "
506 shared_libraries_supported
=true
;;
511 sharedcccompopts
="-fPIC"
512 if sh .
/solaris-ld
; then
513 mksharedlib
="$bytecc -shared -o"
515 mksharedlibrpath
="-R"
517 mksharedlib
="$bytecc -shared -o"
518 bytecclinkopts
="$bytecclinkopts -Wl,-E"
519 byteccrpath
="-Wl,-rpath,"
520 mksharedlibrpath
="-Wl,-rpath,"
522 shared_libraries_supported
=true
;;
524 sharedcccompopts
="-KPIC"
526 mksharedlibrpath
="-R"
527 mksharedlib
="/usr/ccs/bin/ld -G -o"
528 shared_libraries_supported
=true
;;
532 cc
*) sharedcccompopts
="";;
533 gcc
*) sharedcccompopts
="-fPIC";;
535 mksharedlib
="ld -shared -rdata_shared -o"
536 byteccrpath
="-Wl,-rpath,"
537 mksharedlibrpath
="-rpath "
538 shared_libraries_supported
=true
;;
539 powerpc-apple-darwin
*)
540 mksharedlib
="cc -bundle -flat_namespace -undefined suppress -o"
541 bytecccompopts
="$dl_defs $bytecccompopts"
542 #sharedcccompopts="-fnocommon"
543 dl_needs_underscore
=true
544 shared_libraries_supported
=true
;;
548 # Further machine-specific hacks
551 ia64-
*-linux*|alpha
*-*-linux*|x86_64-
*-linux*)
552 echo "Will use mmap() instead of malloc() for allocation of major heap chunks."
553 echo "#define USE_MMAP_INSTEAD_OF_MALLOC" >> s.h
;;
556 # Configure the native-code compiler
563 alpha
*-*-osf*) arch
=alpha
; system
=digital
;;
564 alpha
*-*-linux*) arch
=alpha
; system
=linux
;;
565 alpha
*-*-gnu*) arch
=alpha
; system
=gnu
;;
566 alpha
*-*-freebsd*) arch
=alpha
; system
=freebsd
;;
567 alpha
*-*-netbsd*) arch
=alpha
; system
=netbsd
;;
568 alpha
*-*-openbsd*) arch
=alpha
; system
=openbsd
;;
569 sparc
*-*-sunos4.
*) arch
=sparc
; system
=sunos
;;
570 sparc
*-*-solaris2.
*) arch
=sparc
; system
=solaris
;;
571 sparc
*-*-*bsd
*) arch
=sparc
; system
=bsd
;;
572 sparc
*-*-linux*) arch
=sparc
; system
=linux
;;
573 sparc
*-*-gnu*) arch
=sparc
; system
=gnu
;;
574 i
[3456]86-*-linux*) arch
=i386
; system
=linux_
`sh ./runtest elf.c`;;
575 i
[3456]86-*-*bsd
*) arch
=i386
; system
=bsd_
`sh ./runtest elf.c`;;
576 i
[3456]86-*-nextstep*) arch
=i386
; system
=nextstep
;;
577 i
[3456]86-*-solaris*) arch
=i386
; system
=solaris
;;
578 i
[3456]86-*-beos*) arch
=i386
; system
=beos
;;
579 i
[3456]86-*-cygwin*) arch
=i386
; system
=cygwin
;;
580 i
[3456]86-*-darwin*) arch
=i386
; system
=macosx
;;
581 i
[3456]86-*-gnu*) arch
=i386
; system
=gnu
;;
582 mips-
*-irix6*) arch
=mips
; system
=irix
;;
583 hppa1.1
-*-hpux*) arch
=hppa
; system
=hpux
;;
584 hppa2.0
*-*-hpux*) arch
=hppa
; system
=hpux
;;
585 hppa
*-*-linux*) arch
=hppa
; system
=linux
;;
586 hppa
*-*-gnu*) arch
=hppa
; system
=gnu
;;
587 powerpc-
*-linux*) arch
=power
; model
=ppc
; system
=elf
;;
588 powerpc-
*-netbsd*) arch
=power
; model
=ppc
; system
=bsd
;;
589 powerpc-
*-rhapsody*) arch
=power
; model
=ppc
; system
=rhapsody
;;
590 powerpc-
*-darwin*) arch
=power
; model
=ppc
; system
=rhapsody
;;
591 arm
*-*-linux*) arch
=arm
; system
=linux
;;
592 arm
*-*-gnu*) arch
=arm
; system
=gnu
;;
593 ia64-
*-linux*) arch
=ia64
; system
=linux
;;
594 ia64-
*-gnu*) arch
=ia64
; system
=gnu
;;
595 ia64-
*-freebsd*) arch
=ia64
; system
=freebsd
;;
596 x86_64-
*-linux*) arch
=amd64
; system
=linux
;;
597 x86_64-
*-gnu*) arch
=amd64
; system
=gnu
;;
598 x86_64-
*-freebsd*) arch
=amd64
; system
=freebsd
;;
599 x86_64-
*-openbsd*) arch
=amd64
; system
=openbsd
;;
602 if test -z "$ccoption"; then
603 case "$arch,$system,$cc" in
604 alpha
,digital
,gcc
*) nativecc
=cc
;;
605 mips
,*,gcc
*) nativecc
=cc
;;
606 *) nativecc
="$bytecc";;
614 nativeccrpath
="$byteccrpath"
616 case "$arch,$nativecc,$system,$host_type" in
617 alpha
,cc
*,digital
,*) nativecccompopts
=-std1;;
618 mips
,cc
*,irix
,*) nativecccompopts
=-n32
619 nativecclinkopts
="-n32 -Wl,-woff,84";;
620 *,*,nextstep
,*) nativecccompopts
="$gcc_warnings -U__GNUC__ -posix"
621 nativecclinkopts
="-posix";;
622 *,*,rhapsody
,*darwin
[1-5].
*)
623 nativecccompopts
="$gcc_warnings -DSHRINKED_GNUC";;
625 nativecccompopts
="$gcc_warnings -DDARWIN_VERSION_6 $dl_defs";;
626 *,gcc
*,cygwin
,*) nativecccompopts
="$gcc_warnings -U_WIN32";;
627 *,gcc
*,*,*) nativecccompopts
="$gcc_warnings";;
633 asppprofflags
='-DPROFILING'
635 case "$arch,$model,$system" in
636 alpha
,*,digital
) asflags
='-O2'; asppflags
='-O2 -DSYS_$(SYSTEM)';
637 asppprofflags
='-pg -DPROFILING';;
638 alpha
,*,linux
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
639 alpha
,*,gnu
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
640 alpha
,*,freebsd
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
641 alpha
,*,netbsd
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
642 alpha
,*,openbsd
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
643 mips
,*,irix
) asflags
='-n32 -O2'; asppflags
="$asflags";;
644 sparc
,*,bsd
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
645 sparc
,*,linux
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
646 sparc
,*,gnu
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
647 sparc
,*,*) case "$cc" in
648 gcc
*) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
649 *) asppflags
='-P -DSYS_$(SYSTEM)';;
651 i386
,*,solaris
) aspp
='/usr/ccs/bin/as'; asppflags
='-P -DSYS_$(SYSTEM)';;
652 i386
,*,*) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
653 hppa
,*,*) aspp
="$cc"; asppflags
='-traditional -c -DSYS_$(SYSTEM)';;
654 power
,*,elf
) aspp
='gcc'; asppflags
='-c';;
655 power
,*,bsd
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
657 arm
,*,linux
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
658 arm
,*,gnu
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
659 ia64
,*,*) asflags
=-xexplicit
660 aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM) -Wa,-xexplicit';;
661 amd64
,*,*) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
665 case "$arch,$model,$system" in
666 alpha
,*,digital
) profiling
='prof';;
667 i386
,*,linux_elf
) profiling
='prof';;
668 i386
,*,gnu
) profiling
='prof';;
669 i386
,*,bsd_elf
) profiling
='prof';;
672 case "$nativecc" in gcc
*) ;; *) cc_profile
='-xpg';; esac;;
673 amd64
,*,linux
) profiling
='prof';;
674 amd64
,*,gnu
) profiling
='prof';;
675 *) profiling
='noprof';;
680 if sh .
/searchpath ranlib
; then
682 echo "RANLIB=ranlib" >> Makefile
683 echo "RANLIBCMD=ranlib" >> Makefile
685 echo "ranlib not used"
686 echo "RANLIB=ar rs" >> Makefile
687 echo "RANLIBCMD=" >> Makefile
690 # Do #! scripts work?
692 # BRAVO: check disabled for NixOS
693 # if (SHELL=/bin/sh; export SHELL; (./sharpbang || ./sharpbang2) >/dev/null); then
694 # echo "#! appears to work in shell scripts"
696 *-*-sunos*|
*-*-unicos*)
697 echo "We won't use it, though, because under SunOS and Unicos it breaks"
698 echo "on pathnames longer than 30 characters"
699 echo "SHARPBANGSCRIPTS=false" >> Makefile
;;
701 echo "We won't use it, though, because of conflicts with .exe extension"
703 echo "SHARPBANGSCRIPTS=false" >> Makefile
;;
705 echo "SHARPBANGSCRIPTS=true" >> Makefile
;;
708 # echo "No support for #! in shell scripts"
709 # echo "SHARPBANGSCRIPTS=false" >> Makefile
712 # Write the OS type (Unix or Cygwin)
714 echo "#define OCAML_OS_TYPE \"$ostype\"" >> s.h
715 echo "#define OCAML_STDLIB_DIR \"$libdir\"" >> s.h
717 # Use 64-bit file offset if possible
719 bytecccompopts
="$bytecccompopts -D_FILE_OFFSET_BITS=64"
720 nativecccompopts
="$nativecccompopts -D_FILE_OFFSET_BITS=64"
722 # Check the semantics of signal handlers
724 if sh .
/hasgot sigaction sigprocmask
; then
725 echo "POSIX signal handling found."
726 echo "#define POSIX_SIGNALS" >> s.h
728 if sh .
/runtest signals.c
; then
729 echo "Signals have the BSD semantics."
730 echo "#define BSD_SIGNALS" >> s.h
732 echo "Signals have the System V semantics."
734 if sh .
/hasgot sigsetmask
; then
735 echo "sigsetmask() found"
736 echo "#define HAS_SIGSETMASK" >> s.h
742 if sh .
/hasgot getrusage
; then
743 echo "getrusage() found."
744 echo "#define HAS_GETRUSAGE" >> s.h
747 if sh .
/hasgot
times; then
748 echo "times() found."
749 echo "#define HAS_TIMES" >> s.h
752 # For the terminfo module
754 if test "$withcurses" = "yes"; then
755 for libs
in "" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do
756 if sh .
/hasgot
$libs tgetent tgetstr tgetnum tputs
; then
757 echo "termcap functions found (with libraries '$libs')"
758 echo "#define HAS_TERMCAP" >> s.h
765 # Configuration for the libraries
767 otherlibraries
="unix str num dynlink bigarray"
769 # For the Unix library
772 if sh .
/hasgot socket socketpair
bind listen accept connect
; then
773 echo "You have BSD sockets."
774 echo "#define HAS_SOCKETS" >> s.h
776 elif sh .
/hasgot
-lnsl -lsocket socket socketpair
bind listen accept connect
; then
777 echo "You have BSD sockets (with libraries '-lnsl -lsocket')"
778 cclibs
="$cclibs -lnsl -lsocket"
779 echo "#define HAS_SOCKETS" >> s.h
783 if sh .
/hasgot
-i sys
/socket.h
-t socklen_t
; then
784 echo "socklen_t is defined in <sys/socket.h>"
785 echo "#define HAS_SOCKLEN_T" >> s.h
788 if sh .
/hasgot inet_aton
; then
789 echo "inet_aton() found."
790 echo "#define HAS_INET_ATON" >> s.h
793 if sh .
/hasgot
-i sys
/types.h
-i sys
/socket.h
-i netinet
/in.h \
794 -t 'struct sockaddr_in6' \
795 && sh .
/hasgot getaddrinfo getnameinfo inet_pton inet_ntop
; then
796 echo "IPv6 is supported."
797 echo "#define HAS_IPV6" >> s.h
800 if sh .
/hasgot
-i unistd.h
; then
801 echo "unistd.h found."
802 echo "#define HAS_UNISTD" >> s.h
805 if sh .
/hasgot
-i sys
/types.h
-t off_t
; then
806 echo "off_t is defined in <sys/types.h>"
807 echo "#define HAS_OFF_T" >> s.h
810 if sh .
/hasgot
-i sys
/types.h
-i dirent.h
; then
811 echo "dirent.h found."
812 echo "#define HAS_DIRENT" >> s.h
815 if sh .
/hasgot rewinddir
; then
816 echo "rewinddir() found."
817 echo "#define HAS_REWINDDIR" >> s.h
820 if sh .
/hasgot lockf
; then
821 echo "lockf() found."
822 echo "#define HAS_LOCKF" >> s.h
825 if sh .
/hasgot
mkfifo; then
826 echo "mkfifo() found."
827 echo "#define HAS_MKFIFO" >> s.h
830 if sh .
/hasgot getcwd
; then
831 echo "getcwd() found."
832 echo "#define HAS_GETCWD" >> s.h
835 if sh .
/hasgot getwd
; then
836 echo "getwd() found."
837 echo "#define HAS_GETWD" >> s.h
840 if sh .
/hasgot getpriority setpriority
; then
841 echo "getpriority() found."
842 echo "#define HAS_GETPRIORITY" >> s.h
845 if sh .
/hasgot
-i sys
/types.h
-i utime.h
&& sh .
/hasgot utime
; then
846 echo "utime() found."
847 echo "#define HAS_UTIME" >> s.h
850 if sh .
/hasgot utimes
; then
851 echo "utimes() found."
852 echo "#define HAS_UTIMES" >> s.h
855 if sh .
/hasgot dup2
; then
857 echo "#define HAS_DUP2" >> s.h
860 if sh .
/hasgot fchmod fchown
; then
861 echo "fchmod() found."
862 echo "#define HAS_FCHMOD" >> s.h
865 if sh .
/hasgot truncate ftruncate
; then
866 echo "truncate() found."
867 echo "#define HAS_TRUNCATE" >> s.h
871 if sh .
/hasgot
-i sys
/types.h
-i sys
/select.h
; then
872 echo "sys/select.h found."
873 echo "#define HAS_SYS_SELECT_H" >> s.h
874 select_include
='-i sys/select.h'
878 if sh .
/hasgot
select && \
879 sh .
/hasgot
-i sys
/types.h
$select_include -t fd_set
; then
880 echo "select() found."
881 echo "#define HAS_SELECT" >> s.h
885 if sh .
/hasgot symlink readlink lstat
; then
886 echo "symlink() found."
887 echo "#define HAS_SYMLINK" >> s.h
891 if sh .
/hasgot waitpid
; then
892 echo "waitpid() found."
893 echo "#define HAS_WAITPID" >> s.h
897 if sh .
/hasgot wait4
; then
898 echo "wait4() found."
899 echo "#define HAS_WAIT4" >> s.h
903 if sh .
/hasgot
-i limits.h
&& sh .
/runtest getgroups.c
; then
904 echo "getgroups() found."
905 echo "#define HAS_GETGROUPS" >> s.h
908 if sh .
/hasgot
-i termios.h
&&
909 sh .
/hasgot tcgetattr tcsetattr tcsendbreak tcflush tcflow
; then
910 echo "POSIX termios found."
911 echo "#define HAS_TERMIOS" >> s.h
914 # Async I/O under OSF1 3.x are so buggy that the test program hangs...
916 if test -f /usr
/bin
/uname
; then
917 case "`/usr/bin/uname -s -r`" in
918 "OSF1 V3."*) testasyncio
=false
;;
921 if $testasyncio && sh .
/runtest async_io.c
; then
922 echo "Asynchronous I/O are supported."
923 echo "#define HAS_ASYNC_IO" >> s.h
927 if sh .
/hasgot setitimer
; then
928 echo "setitimer() found."
929 echo "#define HAS_SETITIMER" >> s.h
933 if sh .
/hasgot gethostname
; then
934 echo "gethostname() found."
935 echo "#define HAS_GETHOSTNAME" >> s.h
938 if sh .
/hasgot
-i sys
/utsname.h
&& sh .
/hasgot uname
; then
939 echo "uname() found."
940 echo "#define HAS_UNAME" >> s.h
944 if sh .
/hasgot gettimeofday
; then
945 echo "gettimeofday() found."
946 echo "#define HAS_GETTIMEOFDAY" >> s.h
947 has_gettimeofday
="yes"
950 if sh .
/hasgot mktime
; then
951 echo "mktime() found."
952 echo "#define HAS_MKTIME" >> s.h
956 *-*-cygwin*) ;; # setsid emulation under Cygwin breaks the debugger
957 *) if sh .
/hasgot setsid
; then
958 echo "setsid() found."
959 echo "#define HAS_SETSID" >> s.h
963 if sh .
/hasgot putenv
; then
964 echo "putenv() found."
965 echo "#define HAS_PUTENV" >> s.h
968 if sh .
/hasgot
-i locale.h
&& sh .
/hasgot setlocale
; then
969 echo "setlocale() and <locale.h> found."
970 echo "#define HAS_LOCALE" >> s.h
973 if sh .
/hasgot
-i mach-o
/dyld.h
&& sh .
/hasgot NSLinkModule
; then
974 echo "NSLinkModule() found. Using darwin dynamic loading."
975 echo "#define HAS_NSLINKMODULE" >> s.h
976 elif sh .
/hasgot
$dllib dlopen
; then
977 echo "dlopen() found."
978 elif sh .
/hasgot
$dllib -ldl dlopen
; then
979 echo "dlopen() found in -ldl."
982 shared_libraries_supported
=no
985 if $shared_libraries_supported; then
986 echo "Dynamic loading of shared libraries is supported."
987 echo "#define SUPPORT_DYNAMIC_LINKING" >> s.h
988 if $dl_needs_underscore; then
989 echo '#define DL_NEEDS_UNDERSCORE' >>s.h
993 if sh .
/hasgot
-i sys
/types.h
-i sys
/mman.h
&& sh .
/hasgot mmap munmap
; then
995 echo "#define HAS_MMAP" >> s.h
1000 if sh .
/trycompile
-DNUM_ARGS=${i} gethostbyname.c
; then nargs
=$i; break; fi
1002 if test $nargs != "none"; then
1003 echo "gethostbyname_r() found (with ${nargs} arguments)."
1004 echo "#define HAS_GETHOSTBYNAME_R $nargs" >> s.h
1009 if sh .
/trycompile
-DNUM_ARGS=${i} gethostbyaddr.c
; then nargs
=$i; break; fi
1011 if test $nargs != "none"; then
1012 echo "gethostbyaddr_r() found (with ${nargs} arguments)."
1013 echo "#define HAS_GETHOSTBYADDR_R $nargs" >> s.h
1016 # Determine if the debugger is supported
1018 if test "$has_sockets" = "yes"; then
1019 echo "Replay debugger supported."
1020 debugger
="ocamldebugger"
1022 echo "No replay debugger (missing system calls)"
1027 # Determine if system stack overflows can be detected
1029 case "$arch,$system" in
1030 i386
,linux_elf|amd64
,linux
)
1031 echo "System stack overflow can be detected."
1032 echo "#define HAS_STACK_OVERFLOW_DETECTION" >> s.h
;;
1034 echo "Cannot detect system stack overflow.";;
1037 # Determine the target architecture for the "num" library
1040 alpha
*-*-*) bng_arch
=alpha
; bng_asm_level
=1;;
1041 i
[3456]86-*-*) bng_arch
=ia32
1042 if sh .
/trycompile ia32sse2.c
1043 then bng_asm_level
=2
1044 else bng_asm_level
=1
1046 mips-
*-*) bng_arch
=mips
; bng_asm_level
=1;;
1047 powerpc-
*-*) bng_arch
=ppc
; bng_asm_level
=1;;
1048 sparc
*-*-*) bng_arch
=sparc
; bng_asm_level
=1;;
1049 x86_64-
*-*) bng_arch
=amd64
; bng_asm_level
=1;;
1050 *) bng_arch
=generic
; bng_asm_level
=0;;
1053 echo "BNG_ARCH=$bng_arch" >> Makefile
1054 echo "BNG_ASM_LEVEL=$bng_asm_level" >> Makefile
1056 # Determine if the POSIX threads library is supported
1058 systhread_support
=false
1060 if test "$pthread_wanted" = "yes"; then
1062 *-*-solaris*) pthread_link
="-lpthread -lposix4";;
1063 *-*-freebsd*) pthread_link
="-pthread";;
1064 *-*-openbsd*) pthread_link
="-pthread";;
1065 *) pthread_link
="-lpthread";;
1067 if .
/hasgot
-i pthread.h
$pthread_link pthread_self
; then
1068 echo "POSIX threads library supported."
1069 systhread_support
=true
1070 otherlibraries
="$otherlibraries systhreads"
1071 bytecccompopts
="$bytecccompopts -D_REENTRANT"
1072 nativecccompopts
="$nativecccompopts -D_REENTRANT"
1075 bytecccompopts
="$bytecccompopts -D_THREAD_SAFE"
1076 nativecccompopts
="$nativecccompopts -D_THREAD_SAFE";;
1078 bytecccompopts
="$bytecccompopts -pthread"
1079 asppflags
="$asppflags -pthread"
1080 nativecccompopts
="$nativecccompopts -pthread";;
1082 echo "Options for linking with POSIX threads: $pthread_link"
1083 echo "PTHREAD_LINK=$pthread_link" >> Makefile
1084 if sh .
/hasgot
$pthread_link sigwait
; then
1085 echo "sigwait() found"
1086 echo "#define HAS_SIGWAIT" >> s.h
1089 echo "POSIX threads not found."
1094 # Determine if the bytecode thread library is supported
1096 if test "$has_select" = "yes" \
1097 && test "$has_setitimer" = "yes" \
1098 && test "$has_gettimeofday" = "yes" \
1099 && test "$has_wait" = "yes"; then
1100 echo "Bytecode threads library supported."
1101 otherlibraries
="$otherlibraries threads"
1103 echo "Bytecode threads library not supported (missing system calls)"
1106 # Determine the location of X include files and libraries
1108 x11_include
="not found"
1109 x11_link
="not found"
1115 if test -f $dir/X11
/X.h
; then
1121 if test "$x11_include" = "not found"; then
1124 x11_try_lib_dir
=`echo $x11_include | sed -e 's|include|lib|'`
1132 if test -f $dir/libX11.a || \
1133 test -f $dir/libX11.so || \
1134 test -f $dir/libX11.dll.a || \
1135 test -f $dir/libX11.sa
; then
1136 if test $dir = /usr
/lib
; then
1139 x11_link
="-L$dir -lX11"
1147 if test "$x11_include" = "not found" ||
test "$x11_link" = "not found"
1149 echo "X11 not found, the \"graph\" library will not be supported."
1152 echo "Location of X11 include files: $x11_include/X11"
1153 echo "Options for linking with X11: $x11_link"
1154 otherlibraries
="$otherlibraries graph"
1155 if test "$x11_include" = "/usr/include"; then
1158 x11_include
="-I$x11_include"
1160 echo "X11_INCLUDES=$x11_include" >> Makefile
1161 echo "X11_LINK=$x11_link" >> Makefile
1164 # See if we can compile the dbm library
1166 dbm_include
="not found"
1167 dbm_link
="not found"
1170 for dir
in /usr
/include
/usr
/include
/db1
/usr
/include
/gdbm
; do
1171 if test -f $dir/ndbm.h
; then
1173 if sh .
/hasgot dbm_open
; then
1175 elif sh .
/hasgot
-lndbm dbm_open
; then
1177 elif sh .
/hasgot
-ldb1 dbm_open
; then
1179 elif sh .
/hasgot
-lgdbm dbm_open
; then
1181 elif sh .
/hasgot
-lgdbm_compat -lgdbm dbm_open
; then
1182 dbm_link
="-lgdbm_compat -lgdbm"
1186 if test -f $dir/gdbm-ndbm.h
; then
1189 if sh .
/hasgot
-lgdbm_compat -lgdbm dbm_open
; then
1190 dbm_link
="-lgdbm_compat -lgdbm"
1195 if test "$dbm_include" = "not found" ||
test "$dbm_link" = "not found"; then
1196 echo "NDBM not found, the \"dbm\" library will not be supported."
1198 echo "NDBM found (in $dbm_include)"
1199 if test "$dbm_include" = "/usr/include"; then
1202 dbm_include
="-I$dbm_include"
1204 echo "DBM_INCLUDES=$dbm_include" >> Makefile
1205 echo "DBM_LINK=$dbm_link" >> Makefile
1206 if test "$use_gdbm_ndbm" = "yes"; then
1207 echo "#define DBM_USES_GDBM_NDBM" >> s.h
1209 otherlibraries
="$otherlibraries dbm"
1214 echo "Configuring LablTk..."
1216 if test $tk_wanted = no
; then
1218 elif test $tk_x11 = no
; then
1220 elif test "$x11_include" = "not found" ||
test "$x11_link" = "not found"; then
1221 echo "X11 not found."
1224 tk_x11_include
="$x11_include"
1225 tk_x11_libs
="$x11_libs -lX11"
1229 if test $has_tk = true
; then
1231 tcl_version
=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
1234 do if test -z "$tcl_version"; then
1236 tcl_version
=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
1238 if test -n "$tcl_version" && test "x$tcl_version" != "xnone"; then
1239 echo "tcl.h and tk.h version $tcl_version found with \"$tk_defs\"."
1240 case $tcl_version in
1241 7.5) tclmaj
=7 tclmin
=5 tkmaj
=4 tkmin
=1 ;;
1242 7.6) tclmaj
=7 tclmin
=6 tkmaj
=4 tkmin
=2 ;;
1243 8.0) tclmaj
=8 tclmin
=0 tkmaj
=8 tkmin
=0 ;;
1244 8.1) tclmaj
=8 tclmin
=1 tkmaj
=8 tkmin
=1 ;;
1245 8.2) tclmaj
=8 tclmin
=2 tkmaj
=8 tkmin
=2 ;;
1246 8.3) tclmaj
=8 tclmin
=3 tkmaj
=8 tkmin
=3 ;;
1247 8.4) tclmaj
=8 tclmin
=4 tkmaj
=8 tkmin
=4 ;;
1248 *) echo "This version is not known."; has_tk
=false
;;
1251 echo "tcl.h and/or tk.h not found."
1256 tkauxlibs
="$mathlib $dllib"
1259 if test $has_tk = true
; then
1260 if test -n "$tk_libs" && \
1261 sh .
/hasgot
$tk_libs $tk_x11_libs $tkauxlibs Tcl_DoOneEvent
1262 then tk_libs
="$tk_libs $dllib"
1263 elif sh .
/hasgot
$tk_libs -ltcl$tclmaj.
$tclmin $tkauxlibs Tcl_DoOneEvent
1265 tk_libs
="$tk_libs -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib"
1266 elif sh .
/hasgot
$tk_libs -ltcl$tclmaj$tclmin $tkauxlibs Tcl_DoOneEvent
1268 tk_libs
="$tk_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin $dllib"
1269 elif test -z "$tk_libs" && tk_libs
=-L/usr
/local
/lib
&& \
1270 sh .
/hasgot
$tk_libs -ltcl$tclmaj.
$tclmin $tkauxlibs Tcl_DoOneEvent
1272 tk_libs
="$tk_libs -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib"
1273 elif sh .
/hasgot
$tk_libs -ltcl$tclmaj$tclmin $tkauxlibs Tcl_DoOneEvent
1275 tk_libs
="$tk_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin $dllib"
1276 elif sh .
/hasgot
-L/sw
/lib
$tk_libs -ltcl$tclmaj.
$tclmin $tkauxlibs \
1278 then tk_libs
="-L/sw/lib -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib"
1280 echo "Tcl library not found."
1284 if test $has_tk = true
; then
1285 if sh .
/hasgot
$tk_libs $tk_x11_libs $tkauxlibs Tk_SetGrid
; then
1286 echo "Tcl/Tk libraries found."
1287 elif sh .
/hasgot
-L/sw
/lib
$tk_libs $tk_x11_libs $tkauxlibs Tk_SetGrid
; then
1288 tk_libs
="-L/sw/lib $tk_libs"
1289 echo "Tcl/Tk libraries found."
1291 echo "Tcl library found."
1292 echo "Tk library not found."
1297 if test $has_tk = true
; then
1298 if test $tk_x11 = yes; then
1299 echo "TK_DEFS=$tk_defs "'$(X11_INCLUDES)' >> Makefile
1300 echo "TK_LINK=$tk_libs "'$(X11_LINK)' >> Makefile
1302 echo "TK_DEFS=$tk_defs" >> Makefile
1303 echo "TK_LINK=$tk_libs" >> Makefile
1305 otherlibraries
="$otherlibraries labltk"
1307 echo "Configuration failed, LablTk will not be built."
1312 cd ..
/..
/camlp
4/config
1313 EXE
=$exe .
/configure_batch
-prefix "$prefix" -bindir "$bindir" -libdir "$libdir" -mandir "$mandir" -ocaml-top ..
/..
> /dev
/null
1317 0) echo "Camlp4 correctly configured.";;
1318 *) echo "Warning: Camlp4 configuration terminated with error code $?";;
1322 # Final twiddling of compiler options to work around known bugs
1324 nativeccprofopts
="$nativecccompopts"
1327 bytecccompopts
="$bytecccompopts -fomit-frame-pointer"
1328 nativecccompopts
="$nativecccompopts -fomit-frame-pointer";;
1331 # Finish generated files
1333 cclibs
="$cclibs $mathlib"
1335 echo "BYTECC=$bytecc" >> Makefile
1336 echo "BYTECCCOMPOPTS=$bytecccompopts" >> Makefile
1337 echo "BYTECCLINKOPTS=$bytecclinkopts" >> Makefile
1338 echo "BYTECCLIBS=$cclibs $dllib $curseslibs $pthread_link" >> Makefile
1339 echo "BYTECCRPATH=$byteccrpath" >> Makefile
1340 echo "EXE=$exe" >> Makefile
1341 echo "SUPPORTS_SHARED_LIBRARIES=$shared_libraries_supported" >> Makefile
1342 echo "SHAREDCCCOMPOPTS=$sharedcccompopts" >> Makefile
1343 echo "MKSHAREDLIB=$mksharedlib" >> Makefile
1344 echo "MKSHAREDLIBRPATH=$mksharedlibrpath" >> Makefile
1345 echo "ARCH=$arch" >> Makefile
1346 echo "MODEL=$model" >> Makefile
1347 echo "SYSTEM=$system" >> Makefile
1348 echo "NATIVECC=$nativecc" >> Makefile
1349 echo "NATIVECCCOMPOPTS=$nativecccompopts" >> Makefile
1350 echo "NATIVECCPROFOPTS=$nativeccprofopts" >> Makefile
1351 echo "NATIVECCLINKOPTS=$nativecclinkopts" >> Makefile
1352 echo "NATIVECCRPATH=$nativeccrpath" >> Makefile
1353 echo "NATIVECCLIBS=$cclibs $dllib" >> Makefile
1354 echo "ASFLAGS=$asflags" >> Makefile
1355 echo "ASPP=$aspp" >> Makefile
1356 echo "ASPPFLAGS=$asppflags" >> Makefile
1357 echo "ASPPPROFFLAGS=$asppprofflags" >> Makefile
1358 echo "PROFILING=$profiling" >> Makefile
1359 echo "DYNLINKOPTS=$dllib" >> Makefile
1360 echo "OTHERLIBRARIES=$otherlibraries" >> Makefile
1361 echo "DEBUGGER=$debugger" >> Makefile
1362 echo "CC_PROFILE=$cc_profile" >> Makefile
1363 echo "SYSTHREAD_SUPPORT=$systhread_support" >>Makefile
1366 rm -f ..
/m.h ..
/s.h ..
/Makefile
1367 mv m.h s.h Makefile ..
1372 echo "** Configuration summary **"
1374 echo "Directories where Objective Caml will be installed:"
1375 echo " binaries.................. $bindir"
1376 echo " standard library.......... $libdir"
1377 echo " manual pages.............. $mandir (with extension .$manext)"
1379 echo "Configuration for the bytecode compiler:"
1380 echo " C compiler used........... $bytecc"
1381 echo " options for compiling..... $bytecccompopts"
1382 echo " options for linking....... $bytecclinkopts $cclibs $dllib $curseslibs $pthread_link"
1383 if $shared_libraries_supported; then
1384 echo " shared libraries are supported"
1385 echo " options for compiling..... $sharedcccompopts $bytecccompopts"
1386 echo " command for building...... $mksharedlib lib.so $mksharedlibrpath/a/path objs"
1388 echo " shared libraries not supported"
1391 echo "Configuration for the native-code compiler:"
1392 if test "$arch" = "none"; then
1393 echo " (not supported on this platform)"
1395 if test "$model" = "default"; then
1396 echo " hardware architecture..... $arch"
1398 echo " hardware architecture..... $arch ($model)"
1400 if test "$system" = "unknown"; then : ; else
1401 echo " OS variant................ $system"
1403 echo " C compiler used........... $nativecc"
1404 echo " options for compiling..... $nativecccompopts"
1405 echo " options for linking....... $nativecclinkopts $cclibs"
1406 echo " assembler ................ \$(AS) $asflags"
1407 echo " preprocessed assembler ... $aspp $asppflags"
1408 if test "$profiling" = "prof"; then
1409 echo " profiling with gprof ..... supported"
1411 echo " profiling with gprof ..... not supported"
1415 if test "$debugger" = "ocamldebugger"; then
1416 echo "Source-level replay debugger: supported"
1418 echo "Source-level replay debugger: not supported"
1421 echo "Additional libraries supported:"
1422 echo " $otherlibraries"
1424 echo "Configuration for the \"num\" library:"
1425 echo " target architecture ...... $bng_arch (asm level $bng_asm_level)"
1427 if test "$x11_include" != "not found" && test "$x11_lib" != "not found"; then
1428 echo "Configuration for the \"graph\" library:"
1429 echo " options for compiling .... $x11_include"
1430 echo " options for linking ...... $x11_link"
1433 if test $has_tk = true
; then
1434 echo "Configuration for the \"labltk\" library:"
1435 echo " use tcl/tk version ....... $tcl_version"
1436 echo " options for compiling .... $tk_defs"
1437 echo " options for linking ...... $tk_libs"
1439 echo "The \"labltk\" library: not supported"
1443 echo "** Objective Caml configuration completed successfully **"