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.215.2.3 2004/07/09 15:08:51 doligez Exp $
18 configure_options
="$*"
44 # Try to turn internationalization off, can cause config.guess to malfunction!
46 unset LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME
48 # Turn off some macOS debugging stuff, same reason
49 unset RC_TRACE_ARCHIVES RC_TRACE_DYLIBS RC_TRACE_PREBINDING_DISABLED
51 # Parse command-line arguments
65 mandir
=`echo $2 | sed -e 's|^\(.*\)/man.$|\1|'`
66 manext
=`echo $2 | sed -e 's/^.*\(.\)$/\1/'`;;
75 ccoption
="$2"; shift;;
77 cclibs
="$2 $cclibs"; shift;;
82 -x11include*|
--x11include*)
83 x11_include_dir
=$2; shift;;
85 x11_lib_dir
=$2; shift;;
86 -with-pthread*|
--with-pthread*)
87 ;; # Ignored for backward compatibility
88 -no-pthread*|
--no-pthread*)
96 -tk-no-x11|
--tk-no-x11)
102 -binutils*|
--binutils*)
103 binutils_dir
=$2; shift;;
106 *) echo "Unknown option \"$1\"." 1>&2; exit 2;;
115 *) echo "The -prefix directory must be absolute." 1>&2; exit 2;;
120 *) echo "The -bindir directory must be absolute." 1>&2; exit 2;;
125 *) echo "The -libdir directory must be absolute." 1>&2; exit 2;;
130 *) echo "The -mandir directory must be absolute." 1>&2; exit 2;;
136 rm -f s.h m.h Makefile
137 touch s.h m.h Makefile
139 # Write options to Makefile
141 echo "# generated by ./configure $configure_options" >> Makefile
145 echo "PREFIX=$prefix" >> Makefile
147 "") echo 'BINDIR=$(PREFIX)/bin' >> Makefile
148 bindir
="$prefix/bin";;
149 *) echo "BINDIR=$bindir" >> Makefile
;;
152 "") echo 'LIBDIR=$(PREFIX)/lib/ocaml' >> Makefile
153 libdir
="$prefix/lib/ocaml";;
154 *) echo "LIBDIR=$libdir" >> Makefile
;;
156 echo 'STUBLIBDIR=$(LIBDIR)/stublibs' >> Makefile
158 "") echo 'MANDIR=$(PREFIX)/man' >> Makefile
159 mandir
="$prefix/man";;
160 *) echo "MANDIR=$mandir" >> Makefile
;;
162 echo "MANEXT=$manext" >> Makefile
164 # Determine the system type
166 if test "$host_type" = "unknown"; then
167 if host_type
=`../gnu/config.guess`; then :; else
168 echo "Cannot guess host type"
169 echo "You must specify one with the -host option"
173 if host=`../gnu/config.sub $host_type`; then :; else
174 echo "Please specify the correct host type with the -host option"
177 echo "Configuring for a $host ..."
181 if test -z "$ccoption"; then
182 if sh .
/searchpath gcc
; then
192 # Check for buggy versions of GCC
198 case `$cc --version` in
201 WARNING: you are using gcc version 2.7.2.1 on an Intel x86 processor.
202 This version of gcc is known to generate incorrect code for the
203 Objective Caml runtime system on some Intel x86 machines. (The symptom
204 is a crash of boot/ocamlc when compiling stdlib/pervasives.mli.)
205 In particular, the version of gcc 2.7.2.1 that comes with
206 Linux RedHat 4.x / Intel is affected by this problem.
207 Other Linux distributions might also be affected.
208 If you are using one of these configurations, you are strongly advised
209 to use another version of gcc, such as 2.95, which are
210 known to work well with Objective Caml.
212 Press <enter> to proceed or <interrupt> to stop.
217 WARNING: you are using gcc version 2.96 on an Intel x86 processor.
218 Certain patched versions of gcc 2.96 are known to generate incorrect
219 code for the Objective Caml runtime system. (The symptom is a segmentation
220 violation on boot/ocamlc.) Those incorrectly patched versions can be found
221 in RedHat 7.2 and Mandrake 8.0 and 8.1; other Linux distributions
222 might also be affected. (See bug #57760 on bugzilla.redhat.com)
224 Auto-configuration will now select gcc compiler flags that work around
225 the problem. Still, if you observe segmentation faults while running
226 ocamlc or ocamlopt, you are advised to try another version of gcc,
227 such as 2.95.3 or 3.2.
235 # Configure the bytecode compiler
243 case "$bytecc,$host" in
245 # GNU C extensions disabled, but __GNUC__ still defined!
246 bytecccompopts
="-fno-defer-pop $gcc_warnings -U__GNUC__ -posix"
247 bytecclinkopts
="-posix";;
249 # Almost the same as NeXTStep
250 bytecccompopts
="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC"
253 # Almost the same as rhapsody
254 bytecccompopts
="-fno-defer-pop -no-cpp-precomp $gcc_warnings"
257 bytecccompopts
="-fno-defer-pop $gcc_warnings"
261 bytecccompopts
="-fno-defer-pop $gcc_warnings"
262 if cc
="$bytecc" sh .
/hasgot
-mieee; then
263 bytecccompopts
="-mieee $bytecccompopts";
265 # Put code and static data in lower 4GB
266 bytecclinkopts
="-Wl,-T,12000000 -Wl,-D,14000000"
267 # Tell gcc that we can use 32-bit code addresses for threaded code
268 echo "#define ARCH_CODE32" >> m.h
;;
270 bytecccompopts
="-std1 -ieee";;
272 if cc
="$bytecc" sh .
/hasgot
-mieee; then
273 bytecccompopts
="-mieee $bytecccompopts";
276 # Add -n32 flag to ensure compatibility with native-code compiler
277 bytecccompopts
="-n32"
278 # Turn off warning "unused library"
279 bytecclinkopts
="-n32 -Wl,-woff,84";;
281 # (For those who want to force "cc -64")
282 # Turn off warning "unused library"
283 bytecclinkopts
="-Wl,-woff,84";;
286 bytecccompopts
="-DUMK";;
287 gcc
*,powerpc-
*-aix4.3
*)
288 # Avoid name-space pollution by requiring Unix98-conformant includes
289 bytecccompopts
="-fno-defer-pop $gcc_warnings -D_XOPEN_SOURCE=500";;
291 bytecccompopts
="-D_XOPEN_SOURCE=500";;
293 bytecccompopts
="-fno-defer-pop $gcc_warnings -U_WIN32"
296 gcc
*,x86_64-
*-linux*)
297 bytecccompopts
="-fno-defer-pop $gcc_warnings"
298 # Tell gcc that we can use 32-bit code addresses for threaded code
299 echo "#define ARCH_CODE32" >> 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,8) echo "Wow! A 64 bit architecture!"
330 echo "#define ARCH_SIXTYFOUR" >> m.h
;;
331 *,8) echo "Wow! A 64 bit architecture!"
332 echo "Unfortunately, Objective Caml cannot work in the case"
333 echo "sizeof(long) != sizeof(long *)."
334 echo "Objective Caml won't run on this architecture."
336 *,*) echo "This architecture seems to be neither 32 bits nor 64 bits."
337 echo "Objective Caml won't run on this architecture."
339 *) echo "Unable to compile the test program."
340 echo "Make sure the C compiler $cc is properly installed."
343 if test $1 != 4 && test $2 != 4 && test $4 != 4; then
344 echo "Sorry, we can't find a 32-bit integer type"
345 echo "(sizeof(short) = $4, sizeof(int) = $1, sizeof(long) = $2)"
346 echo "Objective Caml won't run on this architecture."
350 echo "#define SIZEOF_INT $1" >> m.h
351 echo "#define SIZEOF_LONG $2" >> m.h
352 echo "#define SIZEOF_SHORT $4" >> m.h
355 echo "#define ARCH_INT64_TYPE long" >> m.h
356 echo "#define ARCH_UINT64_TYPE unsigned long" >> m.h
357 echo '#define ARCH_INT64_PRINTF_FORMAT "l"' >> m.h
360 sh .
/runtest longlong.c
362 0) echo "64-bit \"long long\" integer type found (printf with \"%ll\")."
363 echo "#define ARCH_INT64_TYPE long long" >> m.h
364 echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
365 echo '#define ARCH_INT64_PRINTF_FORMAT "ll"' >> m.h
367 1) echo "64-bit \"long long\" integer type found (printf with \"%q\")."
368 echo "#define ARCH_INT64_TYPE long long" >> m.h
369 echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
370 echo '#define ARCH_INT64_PRINTF_FORMAT "q"' >> m.h
372 2) echo "64-bit \"long long\" integer type found (but no printf)."
373 echo "#define ARCH_INT64_TYPE long long" >> m.h
374 echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
375 echo '#undef ARCH_INT64_PRINTF_FORMAT' >> m.h
377 *) echo "No suitable 64-bit integer type found, will use software emulation."
378 echo "#undef ARCH_INT64_TYPE" >> m.h
379 echo "#undef ARCH_UINT64_TYPE" >> m.h
380 echo '#undef ARCH_INT64_PRINTF_FORMAT' >> m.h
385 # Determine endianness
387 sh .
/runtest endian.c
389 0) echo "This is a big-endian architecture."
390 echo "#define ARCH_BIG_ENDIAN" >> m.h
;;
391 1) echo "This is a little-endian architecture."
392 echo "#undef ARCH_BIG_ENDIAN" >> m.h
;;
393 2) echo "This architecture seems to be neither big endian nor little endian."
394 echo "Objective Caml won't run on this architecture."
396 *) echo "Something went wrong during endianness determination."
397 echo "You'll have to figure out endianness yourself"
398 echo "(option ARCH_BIG_ENDIAN in m.h).";;
401 # Determine alignment constraints
405 # On Sparc V9 with certain versions of gcc, determination of double
406 # alignment is not reliable (PR#1521), hence force it.
407 # Same goes for hppa.
408 # But there's a knack (PR#2572):
409 # if we're in 64-bit mode (sizeof(long) == 8),
410 # we must not doubleword-align floats...
412 echo "Doubles can be word-aligned."
413 echo "#undef ARCH_ALIGN_DOUBLE" >> m.h
415 echo "Doubles must be doubleword-aligned."
416 echo "#define ARCH_ALIGN_DOUBLE" >> m.h
419 sh .
/runtest dblalign.c
421 0) echo "Doubles can be word-aligned."
422 echo "#undef ARCH_ALIGN_DOUBLE" >> m.h
;;
423 1) echo "Doubles must be doubleword-aligned."
424 echo "#define ARCH_ALIGN_DOUBLE" >> m.h
;;
425 *) echo "Something went wrong during alignment determination for doubles."
426 echo "I'm going to assume this architecture has alignment constraints over doubles."
427 echo "That's a safe bet: Objective Caml will work even if"
428 echo "this architecture has actually no alignment constraints."
429 echo "#define ARCH_ALIGN_DOUBLE" >> m.h
;;
433 if $int64_native; then
437 echo "64-bit integers can be word-aligned."
438 echo "#undef ARCH_ALIGN_INT64" >> m.h
440 echo "64-bit integers must be doubleword-aligned."
441 echo "#define ARCH_ALIGN_INT64" >> m.h
444 sh .
/runtest int64align.c
446 0) echo "64-bit integers can be word-aligned."
447 echo "#undef ARCH_ALIGN_INT64" >> m.h
;;
448 1) echo "64-bit integers must be doubleword-aligned."
449 echo "#define ARCH_ALIGN_INT64" >> m.h
;;
450 *) echo "Something went wrong during alignment determination for 64-bit integers."
451 echo "I'm going to assume this architecture has alignment constraints."
452 echo "That's a safe bet: Objective Caml will work even if"
453 echo "this architecture has actually no alignment constraints."
454 echo "#define ARCH_ALIGN_INT64" >> m.h
;;
458 echo "#undef ARCH_ALIGN_INT64" >> m.h
461 # Check semantics of division and modulus
463 sh .
/runtest divmod.c
465 0) echo "Native division and modulus have round-towards-zero semantics, will use them."
466 echo "#undef NONSTANDARD_DIV_MOD" >> m.h
;;
467 1) echo "Native division and modulus do not have round-towards-zero semantics, will use software emulation."
468 echo "#define NONSTANDARD_DIV_MOD" >> m.h
;;
469 *) echo "Something went wrong while checking native division and modulus, please report it."
470 echo "#define NONSTANDARD_DIV_MOD" >> m.h
;;
473 # Shared library support
475 shared_libraries_supported
=false
476 dl_needs_underscore
=false
482 if test $withsharedlibs = "yes"; then
484 *-*-linux-gnu|
*-*-linux|
*-*-freebsd[3-9]*)
485 sharedcccompopts
="-fPIC"
486 mksharedlib
="$bytecc -shared -o"
487 bytecclinkopts
="$bytecclinkopts -Wl,-E"
488 byteccrpath
="-Wl,-rpath,"
489 mksharedlibrpath
="-Wl,-rpath,"
490 shared_libraries_supported
=true
;;
494 sharedcccompopts
="-fPIC"
495 mksharedlib
="$bytecc -shared -o"
496 byteccrpath
="-Wl,-rpath,"
497 mksharedlibrpath
="-Wl,-rpath,"
498 shared_libraries_supported
=true
;;
501 mksharedlib
="ld -shared -expect_unresolved '*' -o"
502 byteccrpath
="-Wl,-rpath,"
503 mksharedlibrpath
="-rpath "
504 shared_libraries_supported
=true
;;
509 sharedcccompopts
="-fPIC"
510 if sh .
/solaris-ld
; then
511 mksharedlib
="$bytecc -shared -o"
513 mksharedlibrpath
="-R"
515 mksharedlib
="$bytecc -shared -o"
516 bytecclinkopts
="$bytecclinkopts -Wl,-E"
517 byteccrpath
="-Wl,-rpath,"
518 mksharedlibrpath
="-Wl,-rpath,"
520 shared_libraries_supported
=true
;;
522 sharedcccompopts
="-KPIC"
524 mksharedlibrpath
="-R"
525 mksharedlib
="/usr/ccs/bin/ld -G -o"
526 shared_libraries_supported
=true
;;
530 cc
*) sharedcccompopts
="";;
531 gcc
*) sharedcccompopts
="-fPIC";;
533 mksharedlib
="ld -shared -rdata_shared -o"
534 byteccrpath
="-Wl,-rpath,"
535 mksharedlibrpath
="-rpath "
536 shared_libraries_supported
=true
;;
537 powerpc-apple-darwin
*)
538 mksharedlib
="cc -bundle -flat_namespace -undefined suppress -o"
539 bytecccompopts
="$dl_defs $bytecccompopts"
540 #sharedcccompopts="-fnocommon"
541 dl_needs_underscore
=true
542 shared_libraries_supported
=true
;;
546 # Further machine-specific hacks
549 ia64-
*-linux*|alpha
*-*-linux*|x86_64-
*-linux*)
550 echo "Will use mmap() instead of malloc() for allocation of major heap chunks."
551 echo "#define USE_MMAP_INSTEAD_OF_MALLOC" >> s.h
;;
554 # Configure the native-code compiler
561 alpha
*-*-osf*) arch
=alpha
; system
=digital
;;
562 alpha
*-*-linux*) arch
=alpha
; system
=linux
;;
563 alpha
*-*-freebsd*) arch
=alpha
; system
=freebsd
;;
564 alpha
*-*-netbsd*) arch
=alpha
; system
=netbsd
;;
565 alpha
*-*-openbsd*) arch
=alpha
; system
=openbsd
;;
566 sparc
*-*-sunos4.
*) arch
=sparc
; system
=sunos
;;
567 sparc
*-*-solaris2.
*) arch
=sparc
; system
=solaris
;;
568 sparc
*-*-*bsd
*) arch
=sparc
; system
=bsd
;;
569 sparc
*-*-linux*) arch
=sparc
; system
=linux
;;
570 i
[3456]86-*-linux*) arch
=i386
; system
=linux_
`sh ./runtest elf.c`;;
571 i
[3456]86-*-*bsd
*) arch
=i386
; system
=bsd_
`sh ./runtest elf.c`;;
572 i
[3456]86-*-nextstep*) arch
=i386
; system
=nextstep
;;
573 i
[3456]86-*-solaris*) arch
=i386
; system
=solaris
;;
574 i
[3456]86-*-beos*) arch
=i386
; system
=beos
;;
575 i
[3456]86-*-cygwin*) arch
=i386
; system
=cygwin
;;
576 mips-
*-irix6*) arch
=mips
; system
=irix
;;
577 hppa1.1
-*-hpux*) arch
=hppa
; system
=hpux
;;
578 hppa2.0
*-*-hpux*) arch
=hppa
; system
=hpux
;;
579 hppa
*-*-linux*) arch
=hppa
; system
=linux
;;
580 powerpc-
*-linux*) arch
=power
; model
=ppc
; system
=elf
;;
581 powerpc-
*-netbsd*) arch
=power
; model
=ppc
; system
=bsd
;;
582 powerpc-
*-rhapsody*) arch
=power
; model
=ppc
; system
=rhapsody
;;
583 powerpc-
*-darwin*) arch
=power
; model
=ppc
; system
=rhapsody
;;
584 arm
*-*-linux*) arch
=arm
; system
=linux
;;
585 ia64-
*-linux*) arch
=ia64
; system
=linux
;;
586 ia64-
*-freebsd*) arch
=ia64
; system
=freebsd
;;
587 x86_64-
*-linux*) arch
=amd64
; system
=linux
;;
588 x86_64-
*-freebsd*) arch
=amd64
; system
=freebsd
;;
589 x86_64-
*-openbsd*) arch
=amd64
; system
=openbsd
;;
592 if test -z "$ccoption"; then
593 case "$arch,$system,$cc" in
594 alpha
,digital
,gcc
*) nativecc
=cc
;;
595 mips
,*,gcc
*) nativecc
=cc
;;
596 *) nativecc
="$bytecc";;
604 nativeccrpath
="$byteccrpath"
606 case "$arch,$nativecc,$system,$host_type" in
607 alpha
,cc
*,digital
,*) nativecccompopts
=-std1;;
608 mips
,cc
*,irix
,*) nativecccompopts
=-n32
609 nativecclinkopts
="-n32 -Wl,-woff,84";;
610 *,*,nextstep
,*) nativecccompopts
="$gcc_warnings -U__GNUC__ -posix"
611 nativecclinkopts
="-posix";;
612 *,*,rhapsody
,*darwin
[1-5].
*)
613 nativecccompopts
="$gcc_warnings -DSHRINKED_GNUC";;
615 nativecccompopts
="$gcc_warnings -DDARWIN_VERSION_6 $dl_defs";;
616 *,gcc
*,cygwin
,*) nativecccompopts
="$gcc_warnings -U_WIN32";;
617 *,gcc
*,*,*) nativecccompopts
="$gcc_warnings";;
623 asppprofflags
='-DPROFILING'
625 case "$arch,$model,$system" in
626 alpha
,*,digital
) asflags
='-O2'; asppflags
='-O2 -DSYS_$(SYSTEM)';
627 asppprofflags
='-pg -DPROFILING';;
628 alpha
,*,linux
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
629 alpha
,*,freebsd
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
630 alpha
,*,netbsd
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
631 alpha
,*,openbsd
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
632 mips
,*,irix
) asflags
='-n32 -O2'; asppflags
="$asflags";;
633 sparc
,*,bsd
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
634 sparc
,*,linux
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
635 sparc
,*,*) case "$cc" in
636 gcc
*) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
637 *) asppflags
='-P -DSYS_$(SYSTEM)';;
639 i386
,*,solaris
) aspp
='/usr/ccs/bin/as'; asppflags
='-P -DSYS_$(SYSTEM)';;
640 i386
,*,*) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
641 hppa
,*,*) aspp
="$cc"; asppflags
='-traditional -c -DSYS_$(SYSTEM)';;
642 power
,*,elf
) aspp
='gcc'; asppflags
='-c';;
643 power
,*,bsd
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
645 arm
,*,linux
) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
646 ia64
,*,*) asflags
=-xexplicit
647 aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM) -Wa,-xexplicit';;
648 amd64
,*,*) aspp
='gcc'; asppflags
='-c -DSYS_$(SYSTEM)';;
652 case "$arch,$model,$system" in
653 alpha
,*,digital
) profiling
='prof';;
654 i386
,*,linux_elf
) profiling
='prof';;
655 i386
,*,bsd_elf
) profiling
='prof';;
658 case "$nativecc" in gcc
*) ;; *) cc_profile
='-xpg';; esac;;
659 amd64
,*,linux
) profiling
='prof';;
660 *) profiling
='noprof';;
663 # Where are GNU binutils?
668 if test "$arch" != "none"; then
669 binutils_path
="${binutils_dir}:${PATH}:/usr/libexec/binutils"
672 for d
in ${binutils_path}; do
673 if test -z "$d"; then continue; fi
674 if test -f "$d/objcopy" && test -f "$d/nm"; then
675 echo "objcopy and nm found in $d"
676 if test `$d/objcopy --help | grep -s -c 'redefine-sym'` -eq 0; then
677 echo "$d/objcopy does not support option --redefine-sym, discarded"
680 if test `$d/nm --version | grep -s -c 'GNU nm'` -eq 0; then
681 echo "$d/nm is not from GNU binutils, discarded"
684 binutils_objcopy
="$d/objcopy"
694 if sh .
/searchpath ranlib
; then
696 echo "RANLIB=ranlib" >> Makefile
697 echo "RANLIBCMD=ranlib" >> Makefile
699 echo "ranlib not used"
700 echo "RANLIB=ar rs" >> Makefile
701 echo "RANLIBCMD=" >> Makefile
704 # Do #! scripts work?
706 if (SHELL
=/bin
/sh
; export SHELL
; (.
/sharpbang || .
/sharpbang2
) >/dev
/null
); then
707 echo "#! appears to work in shell scripts"
709 *-*-sunos*|
*-*-unicos*)
710 echo "We won't use it, though, because under SunOS and Unicos it breaks"
711 echo "on pathnames longer than 30 characters"
712 echo "SHARPBANGSCRIPTS=false" >> Makefile
;;
714 echo "We won't use it, though, because of conflicts with .exe extension"
716 echo "SHARPBANGSCRIPTS=false" >> Makefile
;;
718 echo "SHARPBANGSCRIPTS=true" >> Makefile
;;
721 echo "No support for #! in shell scripts"
722 echo "SHARPBANGSCRIPTS=false" >> Makefile
725 # Write the OS type (Unix or Cygwin)
727 echo "#define OCAML_OS_TYPE \"$ostype\"" >> s.h
728 echo "#define OCAML_STDLIB_DIR \"$libdir\"" >> s.h
730 # Use 64-bit file offset if possible
732 bytecccompopts
="$bytecccompopts -D_FILE_OFFSET_BITS=64"
733 nativecccompopts
="$nativecccompopts -D_FILE_OFFSET_BITS=64"
735 # Check the semantics of signal handlers
737 if sh .
/hasgot sigaction sigprocmask
; then
738 echo "POSIX signal handling found."
739 echo "#define POSIX_SIGNALS" >> s.h
741 if sh .
/runtest signals.c
; then
742 echo "Signals have the BSD semantics."
743 echo "#define BSD_SIGNALS" >> s.h
745 echo "Signals have the System V semantics."
747 if sh .
/hasgot sigsetmask
; then
748 echo "sigsetmask() found"
749 echo "#define HAS_SIGSETMASK" >> s.h
755 if sh .
/hasgot
times; then
756 echo "times() found."
757 echo "#define HAS_TIMES" >> s.h
760 # For the terminfo module
762 if test "$withcurses" = "yes"; then
763 for libs
in "" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do
764 if sh .
/hasgot
$libs tgetent tgetstr tgetnum tputs
; then
765 echo "termcap functions found (with libraries '$libs')"
766 echo "#define HAS_TERMCAP" >> s.h
773 # Configuration for the libraries
775 otherlibraries
="unix str num dynlink bigarray"
777 # For the Unix library
780 if sh .
/hasgot socket socketpair
bind listen accept connect
; then
781 echo "You have BSD sockets."
782 echo "#define HAS_SOCKETS" >> s.h
784 elif sh .
/hasgot
-lnsl -lsocket socket socketpair
bind listen accept connect
; then
785 echo "You have BSD sockets (with libraries '-lnsl -lsocket')"
786 cclibs
="$cclibs -lnsl -lsocket"
787 echo "#define HAS_SOCKETS" >> s.h
791 if sh .
/hasgot
-i sys
/socket.h
-t socklen_t
; then
792 echo "socklen_t is defined in <sys/socket.h>"
793 echo "#define HAS_SOCKLEN_T" >> s.h
796 if sh .
/hasgot inet_aton
; then
797 echo "inet_aton() found."
798 echo "#define HAS_INET_ATON" >> s.h
801 if sh .
/hasgot
-i sys
/types.h
-i sys
/socket.h
-i netinet
/in.h \
802 -t 'struct sockaddr_in6' \
803 && sh .
/hasgot getaddrinfo getnameinfo inet_pton inet_ntop
; then
804 echo "IPv6 is supported."
805 echo "#define HAS_IPV6" >> s.h
808 if sh .
/hasgot
-i unistd.h
; then
809 echo "unistd.h found."
810 echo "#define HAS_UNISTD" >> s.h
813 if sh .
/hasgot
-i sys
/types.h
-t off_t
; then
814 echo "off_t is defined in <sys/types.h>"
815 echo "#define HAS_OFF_T" >> s.h
818 if sh .
/hasgot
-i sys
/types.h
-i dirent.h
; then
819 echo "dirent.h found."
820 echo "#define HAS_DIRENT" >> s.h
823 if sh .
/hasgot rewinddir
; then
824 echo "rewinddir() found."
825 echo "#define HAS_REWINDDIR" >> s.h
828 if sh .
/hasgot lockf
; then
829 echo "lockf() found."
830 echo "#define HAS_LOCKF" >> s.h
833 if sh .
/hasgot
mkfifo; then
834 echo "mkfifo() found."
835 echo "#define HAS_MKFIFO" >> s.h
838 if sh .
/hasgot getcwd
; then
839 echo "getcwd() found."
840 echo "#define HAS_GETCWD" >> s.h
843 if sh .
/hasgot getwd
; then
844 echo "getwd() found."
845 echo "#define HAS_GETWD" >> s.h
848 if sh .
/hasgot getpriority setpriority
; then
849 echo "getpriority() found."
850 echo "#define HAS_GETPRIORITY" >> s.h
853 if sh .
/hasgot
-i sys
/types.h
-i utime.h
&& sh .
/hasgot utime
; then
854 echo "utime() found."
855 echo "#define HAS_UTIME" >> s.h
858 if sh .
/hasgot utimes
; then
859 echo "utimes() found."
860 echo "#define HAS_UTIMES" >> s.h
863 if sh .
/hasgot dup2
; then
865 echo "#define HAS_DUP2" >> s.h
868 if sh .
/hasgot fchmod fchown
; then
869 echo "fchmod() found."
870 echo "#define HAS_FCHMOD" >> s.h
873 if sh .
/hasgot truncate ftruncate
; then
874 echo "truncate() found."
875 echo "#define HAS_TRUNCATE" >> s.h
879 if sh .
/hasgot
-i sys
/types.h
-i sys
/select.h
; then
880 echo "sys/select.h found."
881 echo "#define HAS_SYS_SELECT_H" >> s.h
882 select_include
='-i sys/select.h'
886 if sh .
/hasgot
select && \
887 sh .
/hasgot
-i sys
/types.h
$select_include -t fd_set
; then
888 echo "select() found."
889 echo "#define HAS_SELECT" >> s.h
893 if sh .
/hasgot symlink readlink lstat
; then
894 echo "symlink() found."
895 echo "#define HAS_SYMLINK" >> s.h
899 if sh .
/hasgot waitpid
; then
900 echo "waitpid() found."
901 echo "#define HAS_WAITPID" >> s.h
905 if sh .
/hasgot wait4
; then
906 echo "wait4() found."
907 echo "#define HAS_WAIT4" >> s.h
911 if sh .
/hasgot
-i limits.h
&& sh .
/runtest getgroups.c
; then
912 echo "getgroups() found."
913 echo "#define HAS_GETGROUPS" >> s.h
916 if sh .
/hasgot
-i termios.h
&&
917 sh .
/hasgot tcgetattr tcsetattr tcsendbreak tcflush tcflow
; then
918 echo "POSIX termios found."
919 echo "#define HAS_TERMIOS" >> s.h
922 # Async I/O under OSF1 3.x are so buggy that the test program hangs...
924 if test -f /usr
/bin
/uname
; then
925 case "`/usr/bin/uname -s -r`" in
926 "OSF1 V3."*) testasyncio
=false
;;
929 if $testasyncio && sh .
/runtest async_io.c
; then
930 echo "Asynchronous I/O are supported."
931 echo "#define HAS_ASYNC_IO" >> s.h
935 if sh .
/hasgot setitimer
; then
936 echo "setitimer() found."
937 echo "#define HAS_SETITIMER" >> s.h
941 if sh .
/hasgot gethostname
; then
942 echo "gethostname() found."
943 echo "#define HAS_GETHOSTNAME" >> s.h
946 if sh .
/hasgot
-i sys
/utsname.h
&& sh .
/hasgot uname
; then
947 echo "uname() found."
948 echo "#define HAS_UNAME" >> s.h
952 if sh .
/hasgot gettimeofday
; then
953 echo "gettimeofday() found."
954 echo "#define HAS_GETTIMEOFDAY" >> s.h
955 has_gettimeofday
="yes"
958 if sh .
/hasgot mktime
; then
959 echo "mktime() found."
960 echo "#define HAS_MKTIME" >> s.h
964 *-*-cygwin*) ;; # setsid emulation under Cygwin breaks the debugger
965 *) if sh .
/hasgot setsid
; then
966 echo "setsid() found."
967 echo "#define HAS_SETSID" >> s.h
971 if sh .
/hasgot putenv
; then
972 echo "putenv() found."
973 echo "#define HAS_PUTENV" >> s.h
976 if sh .
/hasgot
-i locale.h
&& sh .
/hasgot setlocale
; then
977 echo "setlocale() and <locale.h> found."
978 echo "#define HAS_LOCALE" >> s.h
981 if sh .
/hasgot
-i mach-o
/dyld.h
&& sh .
/hasgot NSLinkModule
; then
982 echo "NSLinkModule() found. Using darwin dynamic loading."
983 echo "#define HAS_NSLINKMODULE" >> s.h
984 elif sh .
/hasgot
$dllib dlopen
; then
985 echo "dlopen() found."
986 elif sh .
/hasgot
$dllib -ldl dlopen
; then
987 echo "dlopen() found in -ldl."
990 shared_libraries_supported
=no
993 if $shared_libraries_supported; then
994 echo "Dynamic loading of shared libraries is supported."
995 echo "#define SUPPORT_DYNAMIC_LINKING" >> s.h
996 if $dl_needs_underscore; then
997 echo '#define DL_NEEDS_UNDERSCORE' >>s.h
1001 if sh .
/hasgot
-i sys
/types.h
-i sys
/mman.h
&& sh .
/hasgot mmap munmap
; then
1002 echo "mmap() found."
1003 echo "#define HAS_MMAP" >> s.h
1008 if sh .
/trycompile
-DNUM_ARGS=${i} gethostbyname.c
; then nargs
=$i; break; fi
1010 if test $nargs != "none"; then
1011 echo "gethostbyname_r() found (with ${nargs} arguments)."
1012 echo "#define HAS_GETHOSTBYNAME_R $nargs" >> s.h
1017 if sh .
/trycompile
-DNUM_ARGS=${i} gethostbyaddr.c
; then nargs
=$i; break; fi
1019 if test $nargs != "none"; then
1020 echo "gethostbyaddr_r() found (with ${nargs} arguments)."
1021 echo "#define HAS_GETHOSTBYADDR_R $nargs" >> s.h
1024 # Determine if the debugger is supported
1026 if test "$has_sockets" = "yes"; then
1027 echo "Replay debugger supported."
1028 debugger
="ocamldebugger"
1030 echo "No replay debugger (missing system calls)"
1035 # Determine if system stack overflows can be detected
1037 case "$arch,$system" in
1039 echo "System stack overflow can be detected."
1040 echo "#define HAS_STACK_OVERFLOW_DETECTION" >> s.h
;;
1042 echo "Cannot detect system stack overflow.";;
1045 # Determine the target architecture for the "num" library
1048 alpha
*-*-*) bng_arch
=alpha
; bng_asm_level
=1;;
1049 i
[3456]86-*-*) bng_arch
=ia32
1050 if sh .
/trycompile ia32sse2.c
1051 then bng_asm_level
=2
1052 else bng_asm_level
=1
1054 mips-
*-*) bng_arch
=mips
; bng_asm_level
=1;;
1055 powerpc-
*-*) bng_arch
=ppc
; bng_asm_level
=1;;
1056 sparc
*-*-*) bng_arch
=sparc
; bng_asm_level
=1;;
1057 x86_64-
*-*) bng_arch
=amd64
; bng_asm_level
=1;;
1058 *) bng_arch
=generic
; bng_asm_level
=0;;
1061 echo "BNG_ARCH=$bng_arch" >> Makefile
1062 echo "BNG_ASM_LEVEL=$bng_asm_level" >> Makefile
1064 # Determine if the POSIX threads library is supported
1066 if test "$pthread_wanted" = "yes"; then
1068 *-*-solaris*) pthread_link
="-lpthread -lposix4";;
1069 *-*-freebsd*) pthread_link
="-pthread";;
1070 *-*-openbsd*) pthread_link
="-pthread";;
1071 *) pthread_link
="-lpthread";;
1073 if .
/hasgot
-i pthread.h
$pthread_link pthread_self
; then
1074 echo "POSIX threads library supported."
1075 otherlibraries
="$otherlibraries systhreads"
1076 bytecccompopts
="$bytecccompopts -D_REENTRANT"
1077 nativecccompopts
="$nativecccompopts -D_REENTRANT"
1080 bytecccompopts
="$bytecccompopts -D_THREAD_SAFE"
1081 nativecccompopts
="$nativecccompopts -D_THREAD_SAFE";;
1083 bytecccompopts
="$bytecccompopts -pthread"
1084 asppflags
="$asppflags -pthread"
1085 nativecccompopts
="$nativecccompopts -pthread";;
1087 echo "Options for linking with POSIX threads: $pthread_link"
1088 echo "PTHREAD_LINK=$pthread_link" >> Makefile
1089 if sh .
/hasgot
$pthread_link sigwait
; then
1090 echo "sigwait() found"
1091 echo "#define HAS_SIGWAIT" >> s.h
1094 echo "POSIX threads not found."
1099 # Determine if the bytecode thread library is supported
1101 if test "$has_select" = "yes" \
1102 && test "$has_setitimer" = "yes" \
1103 && test "$has_gettimeofday" = "yes" \
1104 && test "$has_wait" = "yes"; then
1105 echo "Bytecode threads library supported."
1106 otherlibraries
="$otherlibraries threads"
1108 echo "Bytecode threads library not supported (missing system calls)"
1111 # Determine the location of X include files and libraries
1113 x11_include
="not found"
1114 x11_link
="not found"
1120 if test -f $dir/X11
/X.h
; then
1126 if test "$x11_include" = "not found"; then
1129 x11_try_lib_dir
=`echo $x11_include | sed -e 's|include|lib|'`
1137 if test -f $dir/libX11.a || \
1138 test -f $dir/libX11.so || \
1139 test -f $dir/libX11.dll.a || \
1140 test -f $dir/libX11.sa
; then
1141 if test $dir = /usr
/lib
; then
1144 x11_link
="-L$dir -lX11"
1152 if test "$x11_include" = "not found" ||
test "$x11_link" = "not found"
1154 echo "X11 not found, the \"graph\" library will not be supported."
1157 echo "Location of X11 include files: $x11_include/X11"
1158 echo "Options for linking with X11: $x11_link"
1159 otherlibraries
="$otherlibraries graph"
1160 if test "$x11_include" = "/usr/include"; then
1163 x11_include
="-I$x11_include"
1165 echo "X11_INCLUDES=$x11_include" >> Makefile
1166 echo "X11_LINK=$x11_link" >> Makefile
1169 # See if we can compile the dbm library
1171 dbm_include
="not found"
1172 dbm_link
="not found"
1176 if test -f $dir/ndbm.h
; then
1178 if sh .
/hasgot dbm_open
; then
1180 elif sh .
/hasgot
-lndbm dbm_open
; then
1182 elif sh .
/hasgot
-ldb1 dbm_open
; then
1184 elif sh .
/hasgot
-lgdbm dbm_open
; then
1186 elif sh .
/hasgot
-lgdbm_compat -lgdbm dbm_open
; then
1187 dbm_link
="-lgdbm_compat -lgdbm"
1191 if test -f $dir/gdbm-ndbm.h
; then
1194 if sh .
/hasgot
-lgdbm_compat -lgdbm dbm_open
; then
1195 dbm_link
="-lgdbm_compat -lgdbm"
1200 if test "$dbm_include" = "not found" ||
test "$dbm_link" = "not found"; then
1201 echo "NDBM not found, the \"dbm\" library will not be supported."
1203 echo "NDBM found (in $dbm_include)"
1204 if test "$dbm_include" = "/usr/include"; then
1207 dbm_include
="-I$dbm_include"
1209 echo "DBM_INCLUDES=$dbm_include" >> Makefile
1210 echo "DBM_LINK=$dbm_link" >> Makefile
1211 if test "$use_gdbm_ndbm" = "yes"; then
1212 echo "#define DBM_USES_GDBM_NDBM" >> s.h
1214 otherlibraries
="$otherlibraries dbm"
1219 echo "Configuring LablTk..."
1221 if test $tk_wanted = no
; then
1223 elif test $tk_x11 = no
; then
1225 elif test "$x11_include" = "not found" ||
test "$x11_link" = "not found"; then
1226 echo "X11 not found."
1229 tk_x11_include
="$x11_include"
1230 tk_x11_libs
="$x11_libs -lX11"
1234 if test $has_tk = true
; then
1236 tcl_version
=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
1237 if test -z "$tcl_version" && test -z "$tk_defs"; then
1238 tk_defs
=-I/usr
/local
/include
1239 tcl_version
=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
1241 if test -z "$tcl_version"; then
1242 tk_defs
="-I/usr/local/include/tcl8.2 -I/usr/local/include/tk8.2"
1243 tcl_version
=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
1245 if test -z "$tcl_version"; then
1246 tk_defs
="-I/usr/local/include/tcl8.3 -I/usr/local/include/tk8.3"
1247 tcl_version
=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
1249 if test -z "$tcl_version"; then
1250 tk_defs
="-I/usr/local/include/tcl8.4 -I/usr/local/include/tk8.4"
1251 tcl_version
=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
1253 if test -z "$tcl_version"; then
1254 tk_defs
="-I/usr/include/tcl8.2 -I/usr/include/tk8.2"
1255 tcl_version
=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
1257 if test -z "$tcl_version"; then
1258 tk_defs
="-I/usr/include/tcl8.3 -I/usr/include/tk8.3"
1259 tcl_version
=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
1261 if test -z "$tcl_version"; then
1262 tk_defs
="-I/usr/include/tcl8.4 -I/usr/include/tk8.4"
1263 tcl_version
=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
1265 if test -z "$tcl_version"; then
1266 tk_defs
="-I/sw/include"
1267 tcl_version
=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
1269 if test -n "$tcl_version"; then
1270 echo "tcl.h version $tcl_version found with \"$tk_defs\"."
1271 case $tcl_version in
1272 7.5) tclmaj
=7 tclmin
=5 tkmaj
=4 tkmin
=1 ;;
1273 7.6) tclmaj
=7 tclmin
=6 tkmaj
=4 tkmin
=2 ;;
1274 8.0) tclmaj
=8 tclmin
=0 tkmaj
=8 tkmin
=0 ;;
1275 8.1) tclmaj
=8 tclmin
=1 tkmaj
=8 tkmin
=1 ;;
1276 8.2) tclmaj
=8 tclmin
=2 tkmaj
=8 tkmin
=2 ;;
1277 8.3) tclmaj
=8 tclmin
=3 tkmaj
=8 tkmin
=3 ;;
1278 8.4) tclmaj
=8 tclmin
=4 tkmaj
=8 tkmin
=4 ;;
1279 *) echo "This version is not known."; has_tk
=false
;;
1282 echo "tcl.h not found."
1287 if test $has_tk = true
; then
1288 if sh .
/hasgot
$tk_x11_include $tk_defs -i tk.h
; then
1291 echo "tk.h not found."
1296 tkauxlibs
="$mathlib $dllib"
1299 if test $has_tk = true
; then
1300 if sh .
/hasgot
$tk_libs $tk_x11_libs $tkauxlibs Tcl_DoOneEvent
1301 then tk_libs
="$tk_libs $dllib"
1302 elif sh .
/hasgot
$tk_libs -ltcl$tclmaj.
$tclmin $tkauxlibs Tcl_DoOneEvent
1304 tk_libs
="$tk_libs -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib"
1305 elif sh .
/hasgot
$tk_libs -ltcl$tclmaj$tclmin $tkauxlibs Tcl_DoOneEvent
1307 tk_libs
="$tk_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin $dllib"
1308 elif test -z "$tk_libs" && tk_libs
=-L/usr
/local
/lib
&& \
1309 sh .
/hasgot
$tk_libs -ltcl$tclmaj.
$tclmin $tkauxlibs Tcl_DoOneEvent
1311 tk_libs
="$tk_libs -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib"
1312 elif sh .
/hasgot
$tk_libs -ltcl$tclmaj$tclmin $tkauxlibs Tcl_DoOneEvent
1314 tk_libs
="$tk_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin $dllib"
1315 # elif sh ./hasgot $tk_libs -ltcl $tkauxlibs Tcl_DoOneEvent; then
1316 # tk_libs="$tk_libs -ltk -ltcl"
1317 elif sh .
/hasgot
-L/sw
/lib
$tk_libs -ltcl$tclmaj.
$tclmin $tkauxlibs \
1319 then tk_libs
="-L/sw/lib -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib"
1321 echo "Tcl library not found."
1325 if test $has_tk = true
; then
1326 if sh .
/hasgot
$tk_libs $tk_x11_libs $tkauxlibs Tk_SetGrid
; then
1327 echo "Tcl/Tk libraries found."
1328 elif sh .
/hasgot
-L/sw
/lib
$tk_libs $tk_x11_libs $tkauxlibs Tk_SetGrid
; then
1329 tk_libs
="-L/sw/lib $tk_libs"
1330 echo "Tcl/Tk libraries found."
1332 echo "Tcl library found."
1333 echo "Tk library not found."
1338 if test $has_tk = true
; then
1339 if test $tk_x11 = yes; then
1340 echo "TK_DEFS=$tk_defs "'$(X11_INCLUDES)' >> Makefile
1341 echo "TK_LINK=$tk_libs "'$(X11_LINK)' >> Makefile
1343 echo "TK_DEFS=$tk_defs" >> Makefile
1344 echo "TK_LINK=$tk_libs" >> Makefile
1346 otherlibraries
="$otherlibraries labltk"
1348 echo "Configuration failed, LablTk will not be built."
1354 cd ..
/..
/camlp
4/config
1355 EXE
=$exe .
/configure_batch
-bindir "$bindir" -libdir "$libdir" -mandir "$mandir" -ocaml-top ..
/..
> /dev
/null
1358 # Final twiddling of compiler options to work around known bugs
1360 nativeccprofopts
="$nativecccompopts"
1363 bytecccompopts
="$bytecccompopts -fomit-frame-pointer"
1364 nativecccompopts
="$nativecccompopts -fomit-frame-pointer";;
1367 # Finish generated files
1369 cclibs
="$cclibs $mathlib"
1371 echo "BYTECC=$bytecc" >> Makefile
1372 echo "BYTECCCOMPOPTS=$bytecccompopts" >> Makefile
1373 echo "BYTECCLINKOPTS=$bytecclinkopts" >> Makefile
1374 echo "BYTECCLIBS=$cclibs $dllib $curseslibs $pthread_link" >> Makefile
1375 echo "BYTECCRPATH=$byteccrpath" >> Makefile
1376 echo "EXE=$exe" >> Makefile
1377 echo "SUPPORTS_SHARED_LIBRARIES=$shared_libraries_supported" >> Makefile
1378 echo "SHAREDCCCOMPOPTS=$sharedcccompopts" >> Makefile
1379 echo "MKSHAREDLIB=$mksharedlib" >> Makefile
1380 echo "MKSHAREDLIBRPATH=$mksharedlibrpath" >> Makefile
1381 echo "ARCH=$arch" >> Makefile
1382 echo "MODEL=$model" >> Makefile
1383 echo "SYSTEM=$system" >> Makefile
1384 echo "NATIVECC=$nativecc" >> Makefile
1385 echo "NATIVECCCOMPOPTS=$nativecccompopts" >> Makefile
1386 echo "NATIVECCPROFOPTS=$nativeccprofopts" >> Makefile
1387 echo "NATIVECCLINKOPTS=$nativecclinkopts" >> Makefile
1388 echo "NATIVECCRPATH=$nativeccrpath" >> Makefile
1389 echo "NATIVECCLIBS=$cclibs $dllib" >> Makefile
1390 echo "ASFLAGS=$asflags" >> Makefile
1391 echo "ASPP=$aspp" >> Makefile
1392 echo "ASPPFLAGS=$asppflags" >> Makefile
1393 echo "ASPPPROFFLAGS=$asppprofflags" >> Makefile
1394 echo "PROFILING=$profiling" >> Makefile
1395 echo "BINUTILS_OBJCOPY=$binutils_objcopy" >> Makefile
1396 echo "BINUTILS_NM=$binutils_nm" >> Makefile
1397 echo "DYNLINKOPTS=$dllib" >> Makefile
1398 echo "OTHERLIBRARIES=$otherlibraries" >> Makefile
1399 echo "DEBUGGER=$debugger" >> Makefile
1400 echo "CC_PROFILE=$cc_profile" >> Makefile
1403 rm -f ..
/m.h ..
/s.h ..
/Makefile
1404 mv m.h s.h Makefile ..
1409 echo "** Configuration summary **"
1411 echo "Directories where Objective Caml will be installed:"
1412 echo " binaries.................. $bindir"
1413 echo " standard library.......... $libdir"
1414 echo " manual pages.............. $mandir (with extension .$manext)"
1416 echo "Configuration for the bytecode compiler:"
1417 echo " C compiler used........... $bytecc"
1418 echo " options for compiling..... $bytecccompopts"
1419 echo " options for linking....... $bytecclinkopts $cclibs $dllib $curseslibs $pthread_link"
1420 if $shared_libraries_supported; then
1421 echo " shared libraries are supported"
1422 echo " options for compiling..... $sharedcccompopts $bytecccompopts"
1423 echo " command for building...... $mksharedlib lib.so $mksharedlibrpath/a/path objs"
1425 echo " shared libraries not supported"
1428 echo "Configuration for the native-code compiler:"
1429 if test "$arch" = "none"; then
1430 echo " (not supported on this platform)"
1432 if test "$model" = "default"; then
1433 echo " hardware architecture..... $arch"
1435 echo " hardware architecture..... $arch ($model)"
1437 if test "$system" = "unknown"; then : ; else
1438 echo " OS variant................ $system"
1440 echo " C compiler used........... $nativecc"
1441 echo " options for compiling..... $nativecccompopts"
1442 echo " options for linking....... $nativecclinkopts $cclibs"
1443 echo " assembler ................ \$(AS) $asflags"
1444 echo " preprocessed assembler ... $aspp $asppflags"
1445 if test "$profiling" = "prof"; then
1446 echo " profiling with gprof ..... supported"
1448 echo " profiling with gprof ..... not supported"
1450 if test -n "$binutils_objcopy" && test -n "$binutils_nm"; then
1451 echo " ocamlopt -pack ........... supported"
1453 echo " ocamlopt -pack ........... not supported (no binutils)"
1457 if test "$debugger" = "ocamldebugger"; then
1458 echo "Source-level replay debugger: supported"
1460 echo "Source-level replay debugger: not supported"
1463 echo "Additional libraries supported:"
1464 echo " $otherlibraries"
1466 echo "Configuration for the \"num\" library:"
1467 echo " target architecture ...... $bng_arch (asm level $bng_asm_level)"
1469 if test "$x11_include" != "not found" && test "$x11_lib" != "not found"; then
1470 echo "Configuration for the \"graph\" library:"
1471 echo " options for compiling .... $x11_include"
1472 echo " options for linking ...... $x11_link"
1475 if test $has_tk = true
; then
1476 echo "Configuration for the \"labltk\" library:"
1477 echo " use tcl/tk version ....... $tcl_version"
1478 echo " options for compiling .... $tk_defs"
1479 echo " options for linking ...... $tk_libs"
1481 echo "The \"labltk\" library: not found"