diff --git a/.depend b/.depend index 5ca83441f7e0..7da87e050484 100644 --- a/.depend +++ b/.depend @@ -68,13 +68,19 @@ utils/config.cmx : \ utils/config.cmi utils/config.cmi : utils/consistbl.cmo : \ + utils/symbol.cmi \ utils/misc.cmi \ + utils/compilation_unit.cmi \ utils/consistbl.cmi utils/consistbl.cmx : \ + utils/symbol.cmx \ utils/misc.cmx \ + utils/compilation_unit.cmx \ utils/consistbl.cmi utils/consistbl.cmi : \ - utils/misc.cmi + utils/symbol.cmi \ + utils/misc.cmi \ + utils/compilation_unit.cmi utils/diffing.cmo : \ utils/misc.cmi \ utils/diffing.cmi @@ -662,7 +668,8 @@ typing/datarepr.cmx : \ typing/datarepr.cmi : \ typing/types.cmi \ typing/path.cmi \ - typing/ident.cmi + typing/ident.cmi \ + utils/compilation_unit.cmi typing/env.cmo : \ utils/warnings.cmi \ typing/types.cmi \ @@ -679,6 +686,7 @@ typing/env.cmo : \ utils/lazy_backtrack.cmi \ typing/ident.cmi \ typing/datarepr.cmi \ + utils/compilation_unit.cmi \ file_formats/cmi_format.cmi \ utils/clflags.cmi \ parsing/builtin_attributes.cmi \ @@ -701,6 +709,7 @@ typing/env.cmx : \ utils/lazy_backtrack.cmx \ typing/ident.cmx \ typing/datarepr.cmx \ + utils/compilation_unit.cmx \ file_formats/cmi_format.cmx \ utils/clflags.cmx \ parsing/builtin_attributes.cmx \ @@ -718,6 +727,7 @@ typing/env.cmi : \ parsing/location.cmi \ utils/load_path.cmi \ typing/ident.cmi \ + utils/compilation_unit.cmi \ file_formats/cmi_format.cmi \ parsing/asttypes.cmi typing/envaux.cmo : \ @@ -1069,6 +1079,7 @@ typing/persistent_env.cmo : \ utils/lazy_backtrack.cmi \ utils/consistbl.cmi \ utils/config.cmi \ + utils/compilation_unit.cmi \ file_formats/cmi_format.cmi \ utils/clflags.cmi \ typing/persistent_env.cmi @@ -1080,6 +1091,7 @@ typing/persistent_env.cmx : \ utils/lazy_backtrack.cmx \ utils/consistbl.cmx \ utils/config.cmx \ + utils/compilation_unit.cmx \ file_formats/cmi_format.cmx \ utils/clflags.cmx \ typing/persistent_env.cmi @@ -1089,6 +1101,7 @@ typing/persistent_env.cmi : \ parsing/location.cmi \ utils/lazy_backtrack.cmi \ utils/consistbl.cmi \ + utils/compilation_unit.cmi \ file_formats/cmi_format.cmi typing/predef.cmo : \ typing/types.cmi \ @@ -1167,6 +1180,7 @@ typing/printtyp.cmo : \ typing/errortrace.cmi \ typing/env.cmi \ typing/ctype.cmi \ + utils/compilation_unit.cmi \ utils/clflags.cmi \ typing/btype.cmi \ parsing/asttypes.cmi \ @@ -1189,6 +1203,7 @@ typing/printtyp.cmx : \ typing/errortrace.cmx \ typing/env.cmx \ typing/ctype.cmx \ + utils/compilation_unit.cmx \ utils/clflags.cmx \ typing/btype.cmx \ parsing/asttypes.cmi \ @@ -1259,17 +1274,20 @@ typing/shape.cmo : \ utils/misc.cmi \ utils/identifiable.cmi \ typing/ident.cmi \ + utils/compilation_unit.cmi \ typing/shape.cmi typing/shape.cmx : \ typing/path.cmx \ utils/misc.cmx \ utils/identifiable.cmx \ typing/ident.cmx \ + utils/compilation_unit.cmx \ typing/shape.cmi typing/shape.cmi : \ typing/path.cmi \ utils/identifiable.cmi \ - typing/ident.cmi + typing/ident.cmi \ + utils/compilation_unit.cmi typing/signature_group.cmo : \ typing/types.cmi \ typing/ident.cmi \ @@ -1777,6 +1795,7 @@ typing/typemod.cmo : \ typing/env.cmi \ typing/ctype.cmi \ utils/config.cmi \ + utils/compilation_unit.cmi \ file_formats/cmt_format.cmi \ typing/cmt2annot.cmo \ file_formats/cmi_format.cmi \ @@ -1813,6 +1832,7 @@ typing/typemod.cmx : \ typing/env.cmx \ typing/ctype.cmx \ utils/config.cmx \ + utils/compilation_unit.cmx \ file_formats/cmt_format.cmx \ typing/cmt2annot.cmx \ file_formats/cmi_format.cmx \ @@ -1834,6 +1854,7 @@ typing/typemod.cmi : \ typing/includemod.cmi \ typing/ident.cmi \ typing/env.cmi \ + utils/compilation_unit.cmi \ file_formats/cmi_format.cmi \ utils/clflags.cmi typing/typeopt.cmo : \ @@ -2010,6 +2031,7 @@ bytecomp/bytegen.cmo : \ typing/env.cmi \ lambda/debuginfo.cmi \ utils/config.cmi \ + utils/compilation_unit.cmi \ utils/clflags.cmi \ parsing/asttypes.cmi \ bytecomp/bytegen.cmi @@ -2026,6 +2048,7 @@ bytecomp/bytegen.cmx : \ typing/env.cmx \ lambda/debuginfo.cmx \ utils/config.cmx \ + utils/compilation_unit.cmx \ utils/clflags.cmx \ parsing/asttypes.cmi \ bytecomp/bytegen.cmi @@ -2094,6 +2117,7 @@ bytecomp/bytelink.cmx : \ bytecomp/bytelink.cmi : \ bytecomp/symtable.cmi \ utils/misc.cmi \ + utils/compilation_unit.cmi \ file_formats/cmo_format.cmi bytecomp/bytepackager.cmo : \ typing/typemod.cmi \ @@ -2139,7 +2163,8 @@ bytecomp/bytepackager.cmx : \ bytecomp/bytepackager.cmi bytecomp/bytepackager.cmi : \ typing/ident.cmi \ - typing/env.cmi + typing/env.cmi \ + utils/compilation_unit.cmi bytecomp/bytesections.cmo : \ utils/config.cmi \ bytecomp/bytesections.cmi @@ -2172,7 +2197,6 @@ bytecomp/emitcode.cmo : \ parsing/location.cmi \ lambda/lambda.cmi \ bytecomp/instruct.cmi \ - typing/ident.cmi \ typing/env.cmi \ utils/config.cmi \ utils/compilation_unit.cmi \ @@ -2190,7 +2214,6 @@ bytecomp/emitcode.cmx : \ parsing/location.cmx \ lambda/lambda.cmx \ bytecomp/instruct.cmx \ - typing/ident.cmx \ typing/env.cmx \ utils/config.cmx \ utils/compilation_unit.cmx \ @@ -2203,7 +2226,7 @@ bytecomp/emitcode.cmx : \ bytecomp/emitcode.cmi : \ utils/misc.cmi \ bytecomp/instruct.cmi \ - typing/ident.cmi \ + utils/compilation_unit.cmi \ file_formats/cmo_format.cmi bytecomp/instruct.cmo : \ typing/types.cmi \ @@ -2367,7 +2390,6 @@ asmcomp/asmgen.cmo : \ lambda/lambda.cmi \ asmcomp/interval.cmi \ asmcomp/interf.cmi \ - typing/ident.cmi \ asmcomp/emitaux.cmi \ asmcomp/emit.cmi \ asmcomp/deadcode.cmi \ @@ -2411,7 +2433,6 @@ asmcomp/asmgen.cmx : \ lambda/lambda.cmx \ asmcomp/interval.cmx \ asmcomp/interf.cmx \ - typing/ident.cmx \ asmcomp/emitaux.cmx \ asmcomp/emit.cmx \ asmcomp/deadcode.cmx \ @@ -2470,7 +2491,6 @@ asmcomp/asmlink.cmo : \ utils/misc.cmi \ parsing/location.cmi \ utils/load_path.cmi \ - utils/linkage_name.cmi \ asmcomp/emitaux.cmi \ asmcomp/emit.cmi \ utils/consistbl.cmi \ @@ -2491,7 +2511,6 @@ asmcomp/asmlink.cmx : \ utils/misc.cmx \ parsing/location.cmx \ utils/load_path.cmx \ - utils/linkage_name.cmx \ asmcomp/emitaux.cmx \ asmcomp/emit.cmx \ utils/consistbl.cmx \ @@ -2507,7 +2526,6 @@ asmcomp/asmlink.cmx : \ asmcomp/asmlink.cmi asmcomp/asmlink.cmi : \ utils/misc.cmi \ - utils/linkage_name.cmi \ utils/compilation_unit.cmi \ file_formats/cmx_format.cmi asmcomp/asmpackager.cmo : \ @@ -2521,9 +2539,7 @@ asmcomp/asmpackager.cmo : \ utils/load_path.cmi \ utils/linkage_name.cmi \ lambda/lambda.cmi \ - typing/ident.cmi \ middle_end/flambda/flambda_middle_end.cmi \ - middle_end/flambda/export_info_for_pack.cmi \ middle_end/flambda/export_info.cmi \ typing/env.cmi \ utils/config.cmi \ @@ -2547,9 +2563,7 @@ asmcomp/asmpackager.cmx : \ utils/load_path.cmx \ utils/linkage_name.cmx \ lambda/lambda.cmx \ - typing/ident.cmx \ middle_end/flambda/flambda_middle_end.cmx \ - middle_end/flambda/export_info_for_pack.cmx \ middle_end/flambda/export_info.cmx \ typing/env.cmx \ utils/config.cmx \ @@ -2812,6 +2826,7 @@ asmcomp/emit.cmo : \ asmcomp/x86_ast.cmi \ asmcomp/reg.cmi \ asmcomp/proc.cmi \ + asmcomp/printmach.cmi \ utils/numbers.cmi \ utils/misc.cmi \ asmcomp/mach.cmi \ @@ -2820,6 +2835,7 @@ asmcomp/emit.cmo : \ asmcomp/emitenv.cmi \ asmcomp/emitaux.cmi \ utils/domainstate.cmi \ + lambda/debuginfo.cmi \ utils/config.cmi \ asmcomp/cmm_helpers.cmi \ asmcomp/cmm.cmi \ @@ -2835,6 +2851,7 @@ asmcomp/emit.cmx : \ asmcomp/x86_ast.cmi \ asmcomp/reg.cmx \ asmcomp/proc.cmx \ + asmcomp/printmach.cmx \ utils/numbers.cmx \ utils/misc.cmx \ asmcomp/mach.cmx \ @@ -2843,6 +2860,7 @@ asmcomp/emit.cmx : \ asmcomp/emitenv.cmi \ asmcomp/emitaux.cmx \ utils/domainstate.cmx \ + lambda/debuginfo.cmx \ utils/config.cmx \ asmcomp/cmm_helpers.cmx \ asmcomp/cmm.cmx \ @@ -3340,9 +3358,7 @@ asmcomp/x86_proc.cmi : \ asmcomp/x86_ast.cmi middle_end/backend_intf.cmi : \ utils/symbol.cmi \ - middle_end/flambda/simple_value_approx.cmi \ - typing/ident.cmi \ - utils/compilation_unit.cmi + middle_end/flambda/simple_value_approx.cmi middle_end/backend_var.cmo : \ typing/path.cmi \ typing/ident.cmi \ @@ -3438,12 +3454,9 @@ middle_end/compilenv.cmx : \ middle_end/clambda.cmx \ middle_end/compilenv.cmi middle_end/compilenv.cmi : \ - utils/symbol.cmi \ middle_end/flambda/simple_value_approx.cmi \ middle_end/flambda/base_types/set_of_closures_id.cmi \ - utils/linkage_name.cmi \ lambda/lambda.cmi \ - typing/ident.cmi \ middle_end/flambda/export_info.cmi \ utils/compilation_unit.cmi \ file_formats/cmx_format.cmi \ @@ -3563,17 +3576,20 @@ lambda/debuginfo.cmo : \ parsing/location.cmi \ utils/int_replace_polymorphic_compare.cmi \ typing/ident.cmi \ + utils/compilation_unit.cmi \ parsing/asttypes.cmi \ lambda/debuginfo.cmi lambda/debuginfo.cmx : \ parsing/location.cmx \ utils/int_replace_polymorphic_compare.cmx \ typing/ident.cmx \ + utils/compilation_unit.cmx \ parsing/asttypes.cmi \ lambda/debuginfo.cmi lambda/debuginfo.cmi : \ parsing/location.cmi \ typing/ident.cmi \ + utils/compilation_unit.cmi \ parsing/asttypes.cmi lambda/lambda.cmo : \ typing/types.cmi \ @@ -3585,6 +3601,7 @@ lambda/lambda.cmo : \ typing/env.cmi \ lambda/debuginfo.cmi \ utils/config.cmi \ + utils/compilation_unit.cmi \ utils/clflags.cmi \ parsing/asttypes.cmi \ lambda/lambda.cmi @@ -3598,6 +3615,7 @@ lambda/lambda.cmx : \ typing/env.cmx \ lambda/debuginfo.cmx \ utils/config.cmx \ + utils/compilation_unit.cmx \ utils/clflags.cmx \ parsing/asttypes.cmi \ lambda/lambda.cmi @@ -3608,6 +3626,7 @@ lambda/lambda.cmi : \ typing/ident.cmi \ typing/env.cmi \ lambda/debuginfo.cmi \ + utils/compilation_unit.cmi \ parsing/asttypes.cmi lambda/matching.cmo : \ typing/types.cmi \ @@ -3667,6 +3686,7 @@ lambda/printlambda.cmo : \ lambda/lambda.cmi \ typing/ident.cmi \ lambda/debuginfo.cmi \ + utils/compilation_unit.cmi \ utils/clflags.cmi \ parsing/asttypes.cmi \ lambda/printlambda.cmi @@ -3678,6 +3698,7 @@ lambda/printlambda.cmx : \ lambda/lambda.cmx \ typing/ident.cmx \ lambda/debuginfo.cmx \ + utils/compilation_unit.cmx \ utils/clflags.cmx \ parsing/asttypes.cmi \ lambda/printlambda.cmi @@ -3840,6 +3861,7 @@ lambda/translcore.cmo : \ typing/printtyp.cmi \ typing/primitive.cmi \ typing/predef.cmi \ + parsing/pprintast.cmi \ typing/path.cmi \ parsing/parsetree.cmi \ typing/parmatch.cmi \ @@ -3870,6 +3892,7 @@ lambda/translcore.cmx : \ typing/printtyp.cmx \ typing/primitive.cmx \ typing/predef.cmx \ + parsing/pprintast.cmx \ typing/path.cmx \ parsing/parsetree.cmi \ typing/parmatch.cmx \ @@ -3890,7 +3913,7 @@ lambda/translcore.cmx : \ lambda/translcore.cmi : \ typing/types.cmi \ typing/typedtree.cmi \ - typing/path.cmi \ + parsing/longident.cmi \ parsing/location.cmi \ lambda/lambda.cmi \ typing/ident.cmi \ @@ -3910,12 +3933,14 @@ lambda/translmod.cmo : \ typing/path.cmi \ typing/mtype.cmi \ utils/misc.cmi \ + parsing/longident.cmi \ parsing/location.cmi \ lambda/lambda.cmi \ typing/ident.cmi \ typing/env.cmi \ lambda/debuginfo.cmi \ typing/ctype.cmi \ + utils/compilation_unit.cmi \ utils/clflags.cmi \ parsing/asttypes.cmi \ lambda/translmod.cmi @@ -3932,12 +3957,14 @@ lambda/translmod.cmx : \ typing/path.cmx \ typing/mtype.cmx \ utils/misc.cmx \ + parsing/longident.cmx \ parsing/location.cmx \ lambda/lambda.cmx \ typing/ident.cmx \ typing/env.cmx \ lambda/debuginfo.cmx \ typing/ctype.cmx \ + utils/compilation_unit.cmx \ utils/clflags.cmx \ parsing/asttypes.cmi \ lambda/translmod.cmi @@ -3946,7 +3973,8 @@ lambda/translmod.cmi : \ typing/primitive.cmi \ parsing/location.cmi \ lambda/lambda.cmi \ - typing/ident.cmi + typing/ident.cmi \ + utils/compilation_unit.cmi lambda/translobj.cmo : \ typing/primitive.cmi \ utils/misc.cmi \ @@ -3974,7 +4002,8 @@ lambda/translobj.cmx : \ lambda/translobj.cmi : \ lambda/lambda.cmi \ typing/ident.cmi \ - typing/env.cmi + typing/env.cmi \ + utils/compilation_unit.cmi lambda/translprim.cmo : \ typing/types.cmi \ typing/typeopt.cmi \ @@ -3989,6 +4018,7 @@ lambda/translprim.cmo : \ typing/env.cmi \ lambda/debuginfo.cmi \ utils/config.cmi \ + utils/compilation_unit.cmi \ utils/clflags.cmi \ parsing/asttypes.cmi \ lambda/translprim.cmi @@ -4006,6 +4036,7 @@ lambda/translprim.cmx : \ typing/env.cmx \ lambda/debuginfo.cmx \ utils/config.cmx \ + utils/compilation_unit.cmx \ utils/clflags.cmx \ parsing/asttypes.cmi \ lambda/translprim.cmi @@ -4017,24 +4048,27 @@ lambda/translprim.cmi : \ parsing/location.cmi \ lambda/lambda.cmi \ typing/ident.cmi \ - typing/env.cmi + typing/env.cmi \ + utils/compilation_unit.cmi file_formats/cmi_format.cmo : \ typing/types.cmi \ utils/misc.cmi \ parsing/location.cmi \ utils/config.cmi \ + utils/compilation_unit.cmi \ file_formats/cmi_format.cmi file_formats/cmi_format.cmx : \ typing/types.cmx \ utils/misc.cmx \ parsing/location.cmx \ utils/config.cmx \ + utils/compilation_unit.cmx \ file_formats/cmi_format.cmi file_formats/cmi_format.cmi : \ typing/types.cmi \ - utils/misc.cmi -file_formats/cmo_format.cmi : \ utils/misc.cmi \ + utils/compilation_unit.cmi +file_formats/cmo_format.cmi : \ lambda/lambda.cmi \ typing/ident.cmi \ utils/compilation_unit.cmi @@ -4049,6 +4083,7 @@ file_formats/cmt_format.cmo : \ parsing/lexer.cmi \ typing/env.cmi \ utils/config.cmi \ + utils/compilation_unit.cmi \ file_formats/cmi_format.cmi \ utils/clflags.cmi \ file_formats/cmt_format.cmi @@ -4063,6 +4098,7 @@ file_formats/cmt_format.cmx : \ parsing/lexer.cmx \ typing/env.cmx \ utils/config.cmx \ + utils/compilation_unit.cmx \ file_formats/cmi_format.cmx \ utils/clflags.cmx \ file_formats/cmt_format.cmi @@ -4070,18 +4106,16 @@ file_formats/cmt_format.cmi : \ typing/types.cmi \ typing/typedtree.cmi \ typing/shape.cmi \ - utils/misc.cmi \ parsing/location.cmi \ typing/env.cmi \ + utils/compilation_unit.cmi \ file_formats/cmi_format.cmi file_formats/cmx_format.cmi : \ - utils/misc.cmi \ lambda/lambda.cmi \ middle_end/flambda/export_info.cmi \ utils/compilation_unit.cmi \ middle_end/clambda.cmi file_formats/cmxs_format.cmi : \ - utils/misc.cmi \ utils/compilation_unit.cmi file_formats/linear_format.cmo : \ utils/misc.cmi \ @@ -4165,6 +4199,7 @@ middle_end/closure/closure_middle_end.cmo : \ typing/path.cmi \ utils/linkage_name.cmi \ lambda/lambda.cmi \ + typing/ident.cmi \ middle_end/compilenv.cmi \ utils/compilation_unit.cmi \ middle_end/closure/closure.cmi \ @@ -4177,6 +4212,7 @@ middle_end/closure/closure_middle_end.cmx : \ typing/path.cmx \ utils/linkage_name.cmx \ lambda/lambda.cmx \ + typing/ident.cmx \ middle_end/compilenv.cmx \ utils/compilation_unit.cmx \ middle_end/closure/closure.cmx \ @@ -4378,8 +4414,8 @@ middle_end/flambda/closure_conversion.cmx : \ middle_end/flambda/closure_conversion.cmi middle_end/flambda/closure_conversion.cmi : \ lambda/lambda.cmi \ - typing/ident.cmi \ middle_end/flambda/flambda.cmi \ + utils/compilation_unit.cmi \ middle_end/backend_intf.cmi middle_end/flambda/closure_conversion_aux.cmo : \ middle_end/variable.cmi \ @@ -4491,8 +4527,7 @@ middle_end/flambda/export_info_for_pack.cmo : \ middle_end/flambda/export_info.cmi \ middle_end/flambda/base_types/export_id.cmi \ utils/compilation_unit.cmi \ - middle_end/flambda/base_types/closure_id.cmi \ - middle_end/flambda/export_info_for_pack.cmi + middle_end/flambda/base_types/closure_id.cmi middle_end/flambda/export_info_for_pack.cmx : \ middle_end/variable.cmx \ middle_end/flambda/base_types/var_within_closure.cmx \ @@ -4505,11 +4540,7 @@ middle_end/flambda/export_info_for_pack.cmx : \ middle_end/flambda/export_info.cmx \ middle_end/flambda/base_types/export_id.cmx \ utils/compilation_unit.cmx \ - middle_end/flambda/base_types/closure_id.cmx \ - middle_end/flambda/export_info_for_pack.cmi -middle_end/flambda/export_info_for_pack.cmi : \ - middle_end/flambda/export_info.cmi \ - utils/compilation_unit.cmi + middle_end/flambda/base_types/closure_id.cmx middle_end/flambda/extract_projections.cmo : \ middle_end/variable.cmi \ middle_end/flambda/base_types/var_within_closure.cmi \ @@ -6090,6 +6121,7 @@ driver/compile.cmo : \ lambda/lambda.cmi \ bytecomp/emitcode.cmi \ driver/compile_common.cmi \ + utils/compilation_unit.cmi \ utils/clflags.cmi \ bytecomp/bytegen.cmi \ driver/compile.cmi @@ -6104,14 +6136,15 @@ driver/compile.cmx : \ lambda/lambda.cmx \ bytecomp/emitcode.cmx \ driver/compile_common.cmx \ + utils/compilation_unit.cmx \ utils/clflags.cmx \ bytecomp/bytegen.cmx \ driver/compile.cmi driver/compile.cmi : \ typing/typedtree.cmi \ bytecomp/instruct.cmi \ - typing/ident.cmi \ driver/compile_common.cmi \ + utils/compilation_unit.cmi \ utils/clflags.cmi driver/compile_common.cmo : \ utils/warnings.cmi \ @@ -6130,6 +6163,7 @@ driver/compile_common.cmo : \ typing/env.cmi \ utils/config.cmi \ driver/compmisc.cmi \ + utils/compilation_unit.cmi \ driver/compenv.cmi \ utils/clflags.cmi \ parsing/builtin_attributes.cmi \ @@ -6151,6 +6185,7 @@ driver/compile_common.cmx : \ typing/env.cmx \ utils/config.cmx \ driver/compmisc.cmx \ + utils/compilation_unit.cmx \ driver/compenv.cmx \ utils/clflags.cmx \ parsing/builtin_attributes.cmx \ @@ -6158,7 +6193,8 @@ driver/compile_common.cmx : \ driver/compile_common.cmi : \ typing/typedtree.cmi \ parsing/parsetree.cmi \ - typing/env.cmi + typing/env.cmi \ + utils/compilation_unit.cmi driver/compmisc.cmo : \ utils/warnings.cmi \ typing/types.cmi \ @@ -6288,7 +6324,6 @@ driver/optcompile.cmo : \ utils/config.cmi \ middle_end/compilenv.cmi \ driver/compile_common.cmi \ - utils/compilation_unit.cmi \ middle_end/closure/closure_middle_end.cmi \ utils/clflags.cmi \ asmcomp/asmgen.cmi \ @@ -6305,7 +6340,6 @@ driver/optcompile.cmx : \ utils/config.cmx \ middle_end/compilenv.cmx \ driver/compile_common.cmx \ - utils/compilation_unit.cmx \ middle_end/closure/closure_middle_end.cmx \ utils/clflags.cmx \ asmcomp/asmgen.cmx \ @@ -6337,7 +6371,6 @@ driver/optmaindriver.cmo : \ middle_end/flambda/import_approx.cmi \ utils/config.cmi \ driver/compmisc.cmi \ - middle_end/compilenv.cmi \ driver/compenv.cmi \ utils/clflags.cmi \ middle_end/backend_intf.cmi \ @@ -6357,7 +6390,6 @@ driver/optmaindriver.cmx : \ middle_end/flambda/import_approx.cmx \ utils/config.cmx \ driver/compmisc.cmx \ - middle_end/compilenv.cmx \ driver/compenv.cmx \ utils/clflags.cmx \ middle_end/backend_intf.cmi \ @@ -6400,12 +6432,16 @@ toplevel/expunge.cmo : \ lambda/runtimedef.cmi \ utils/misc.cmi \ typing/ident.cmi \ + utils/compilation_unit.cmi \ + file_formats/cmo_format.cmi \ bytecomp/bytesections.cmi toplevel/expunge.cmx : \ bytecomp/symtable.cmx \ lambda/runtimedef.cmx \ utils/misc.cmx \ typing/ident.cmx \ + utils/compilation_unit.cmx \ + file_formats/cmo_format.cmi \ bytecomp/bytesections.cmx toplevel/genprintval.cmo : \ typing/types.cmi \ @@ -6470,6 +6506,7 @@ toplevel/topcommon.cmo : \ bytecomp/dll.cmi \ utils/config.cmi \ driver/compmisc.cmi \ + utils/compilation_unit.cmi \ driver/compenv.cmi \ utils/clflags.cmi \ parsing/asttypes.cmi \ @@ -6497,6 +6534,7 @@ toplevel/topcommon.cmx : \ bytecomp/dll.cmx \ utils/config.cmx \ driver/compmisc.cmx \ + utils/compilation_unit.cmx \ driver/compenv.cmx \ utils/clflags.cmx \ parsing/asttypes.cmi \ @@ -6513,7 +6551,8 @@ toplevel/topcommon.cmi : \ parsing/location.cmi \ typing/ident.cmi \ toplevel/genprintval.cmi \ - typing/env.cmi + typing/env.cmi \ + utils/compilation_unit.cmi toplevel/topdirs.cmo : \ utils/warnings.cmi \ typing/types.cmi \ @@ -6649,6 +6688,7 @@ toplevel/byte/topeval.cmo : \ bytecomp/dll.cmi \ utils/config.cmi \ driver/compmisc.cmi \ + utils/compilation_unit.cmi \ file_formats/cmo_format.cmi \ utils/clflags.cmi \ bytecomp/bytegen.cmi \ @@ -6684,6 +6724,7 @@ toplevel/byte/topeval.cmx : \ bytecomp/dll.cmx \ utils/config.cmx \ driver/compmisc.cmx \ + utils/compilation_unit.cmx \ file_formats/cmo_format.cmi \ utils/clflags.cmx \ bytecomp/bytegen.cmx \ @@ -6768,6 +6809,7 @@ toplevel/native/topeval.cmo : \ lambda/translmod.cmi \ toplevel/native/tophooks.cmi \ toplevel/topcommon.cmi \ + utils/symbol.cmi \ lambda/simplif.cmi \ typing/shape.cmi \ typing/printtyped.cmi \ @@ -6800,6 +6842,7 @@ toplevel/native/topeval.cmx : \ lambda/translmod.cmx \ toplevel/native/tophooks.cmx \ toplevel/topcommon.cmx \ + utils/symbol.cmx \ lambda/simplif.cmx \ typing/shape.cmx \ typing/printtyped.cmx \ @@ -6834,7 +6877,6 @@ toplevel/native/tophooks.cmo : \ middle_end/flambda/import_approx.cmi \ middle_end/flambda/flambda_middle_end.cmi \ utils/config.cmi \ - middle_end/compilenv.cmi \ middle_end/closure/closure_middle_end.cmi \ utils/clflags.cmi \ middle_end/backend_intf.cmi \ @@ -6850,7 +6892,6 @@ toplevel/native/tophooks.cmx : \ middle_end/flambda/import_approx.cmx \ middle_end/flambda/flambda_middle_end.cmx \ utils/config.cmx \ - middle_end/compilenv.cmx \ middle_end/closure/closure_middle_end.cmx \ utils/clflags.cmx \ middle_end/backend_intf.cmi \ diff --git a/Makefile.common-jst b/Makefile.common-jst index 7d0cc0fdbcc2..db63bafa22fc 100644 --- a/Makefile.common-jst +++ b/Makefile.common-jst @@ -178,6 +178,9 @@ install_for_test: _install # replace backend-specific testsuite/tools with their new versions rm _runtest/testsuite/tools/* cp -a testsuite/tools/* _runtest/testsuite/tools/ + # replace backend-specific testsuite/tests/asmcomp with their new versions + rm _runtest/testsuite/tests/asmcomp/* + cp -a testsuite/tests/asmcomp/* _runtest/testsuite/tests/asmcomp/ # replace backend-specific testsuite/tests/asmgen with their new versions rm _runtest/testsuite/tests/asmgen/* cp -a testsuite/tests/asmgen/* _runtest/testsuite/tests/asmgen/ diff --git a/Makefile.config.in b/Makefile.config.in index a4cb245fcb3a..c8c649a438e6 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -252,6 +252,7 @@ STDLIB_MANPAGES=@stdlib_manpages@ NAKED_POINTERS=@naked_pointers@ INTEL_JCC_BUG_CFLAGS=@intel_jcc_bug_cflags@ STACK_ALLOCATION=@stack_allocation@ +POLL_INSERTION=@poll_insertion@ DUNE=@dune@ ### Native command to build ocamlrun.exe diff --git a/asmcomp/asmgen.ml b/asmcomp/asmgen.ml index 7e3d18bc504a..dc348d6a18e3 100644 --- a/asmcomp/asmgen.ml +++ b/asmcomp/asmgen.ml @@ -65,7 +65,7 @@ let linear_unit_info = let reset () = start_from_emit := false; if should_save_before_emit () then begin - linear_unit_info.unit <- Compilation_unit.get_current_exn (); + linear_unit_info.unit <- Compilation_unit.get_current_or_dummy (); linear_unit_info.items <- []; end @@ -272,7 +272,8 @@ let compile_implementation ?toplevel ~backend ~prefixname ~middle_end ~asm_filename:(asm_filename prefixname) ~keep_asm:!keep_asm_file ~obj_filename:(prefixname ^ ext_obj) (fun () -> - Ident.Set.iter Compilenv.require_global program.required_globals; + Compilation_unit.Set.iter Compilenv.require_global + program.required_globals; let clambda_with_constants = middle_end ~backend ~prefixname ~ppf_dump program in diff --git a/asmcomp/asmlink.ml b/asmcomp/asmlink.ml index 3817897278d0..4db3a0d6bf27 100644 --- a/asmcomp/asmlink.ml +++ b/asmcomp/asmlink.ml @@ -25,40 +25,40 @@ module CU = Compilation_unit type error = | File_not_found of filepath | Not_an_object_file of filepath - | Missing_implementations of (Linkage_name.t * string list) list + | Missing_implementations of (CU.t * string list) list | Inconsistent_interface of CU.Name.t * filepath * filepath - | Inconsistent_implementation of CU.Name.t * filepath * filepath + | Inconsistent_implementation of CU.t * filepath * filepath | Assembler_error of filepath | Linking_error of int | Multiple_definition of CU.Name.t * filepath * filepath - | Missing_cmx of filepath * CU.Name.t + | Missing_cmx of filepath * CU.t exception Error of error (* Consistency check between interfaces and implementations *) -module Cmi_consistbl = Consistbl.Make (CU.Name) +module Cmi_consistbl = Consistbl.Make (CU.Name) (CU) let crc_interfaces = Cmi_consistbl.create () let interfaces = ref ([] : CU.Name.t list) -module Cmx_consistbl = Consistbl.Make (CU.Name) +module Cmx_consistbl = Consistbl.Make (CU) (Unit) let crc_implementations = Cmx_consistbl.create () -let implementations = ref ([] : CU.Name.t list) -let implementations_defined = ref ([] : (CU.Name.t * string) list) -let cmx_required = ref ([] : CU.Name.t list) +let implementations = ref ([] : CU.t list) +let implementations_defined = ref ([] : (CU.t * string) list) +let cmx_required = ref ([] : CU.t list) let check_consistency file_name unit crc = begin try List.iter (fun (name, crco) -> - let name = CU.Name.of_string name in interfaces := name :: !interfaces; match crco with None -> () - | Some crc -> + | Some (full_name, crc) -> if CU.Name.equal name (CU.name unit.ui_unit) - then Cmi_consistbl.set crc_interfaces name crc file_name - else Cmi_consistbl.check crc_interfaces name crc file_name) + then Cmi_consistbl.set crc_interfaces name full_name crc file_name + else + Cmi_consistbl.check crc_interfaces name full_name crc file_name) unit.ui_imports_cmi with Cmi_consistbl.Inconsistency { unit_name = name; @@ -70,14 +70,13 @@ let check_consistency file_name unit crc = begin try List.iter (fun (name, crco) -> - let name = name |> CU.Name.of_string in implementations := name :: !implementations; match crco with None -> if List.mem name !cmx_required then raise(Error(Missing_cmx(file_name, name))) | Some crc -> - Cmx_consistbl.check crc_implementations name crc file_name) + Cmx_consistbl.check crc_implementations name () crc file_name) unit.ui_imports_cmx with Cmx_consistbl.Inconsistency { unit_name = name; @@ -88,25 +87,22 @@ let check_consistency file_name unit crc = end; let ui_name = CU.name unit.ui_unit in begin try - let source = List.assoc ui_name !implementations_defined in - raise (Error(Multiple_definition(CU.name unit.ui_unit, file_name, source))) + let source = List.assoc unit.ui_unit !implementations_defined in + raise (Error(Multiple_definition(ui_name, file_name, source))) with Not_found -> () end; - implementations := ui_name :: !implementations; - Cmx_consistbl.set crc_implementations ui_name crc file_name; + implementations := unit.ui_unit :: !implementations; + Cmx_consistbl.set crc_implementations unit.ui_unit () crc file_name; implementations_defined := - (ui_name, file_name) :: !implementations_defined; + (unit.ui_unit, file_name) :: !implementations_defined; if CU.is_packed unit.ui_unit then - cmx_required := ui_name :: !cmx_required + cmx_required := unit.ui_unit :: !cmx_required -let extract_crc_interfaces0 () = - Cmi_consistbl.extract !interfaces crc_interfaces let extract_crc_interfaces () = - extract_crc_interfaces0 () - |> List.map (fun (name, crc) -> (name |> CU.Name.to_string, crc)) + Cmi_consistbl.extract !interfaces crc_interfaces let extract_crc_implementations () = Cmx_consistbl.extract !implementations crc_implementations - |> List.map (fun (name, crc) -> (name |> CU.Name.to_string, crc)) + |> List.map (fun (name, crco) -> name, Option.map snd crco) (* Add C objects and options and "custom" info from a library descriptor. See bytecomp/bytelink.ml for comments on the order of C objects. *) @@ -135,7 +131,7 @@ let runtime_lib () = let missing_globals = (Hashtbl.create 17 : - (Linkage_name.t, string list ref) Hashtbl.t) + (CU.t, string list ref) Hashtbl.t) let is_required name = try ignore (Hashtbl.find missing_globals name); true @@ -193,26 +189,17 @@ let read_file obj_name = end else raise(Error(Not_an_object_file file_name)) -let linkage_name_of_modname modname = +let assume_no_prefix modname = (* We're the linker, so we assume that everything's already been packed, so no module needs its prefix considered. *) - modname |> Linkage_name.of_string + CU.create CU.Prefix.empty modname let scan_file file tolink = match file with | Unit (file_name,info,crc) -> (* This is a .cmx file. It must be linked in any case. *) - let linkage_name = - info.ui_unit - |> Compilation_unit.name - |> Compilation_unit.Name.to_string - |> linkage_name_of_modname - in - remove_required linkage_name; - List.iter (fun (name, crc) -> - let name = name |> linkage_name_of_modname in - add_required file_name (name, crc)) - info.ui_imports_cmx; + remove_required info.ui_unit; + List.iter (add_required file_name) info.ui_imports_cmx; (info, file_name, crc) :: tolink | Library (file_name,infos) -> (* This is an archive file. Each unit contained in it will be linked @@ -221,20 +208,15 @@ let scan_file file tolink = List.fold_right (fun (info, crc) reqd -> let ui_name = CU.name info.ui_unit in - let linkage_name = - ui_name |> CU.Name.to_string |> linkage_name_of_modname - in if info.ui_force_link || !Clflags.link_everything - || is_required linkage_name + || is_required info.ui_unit then begin - remove_required linkage_name; + remove_required info.ui_unit; let req_by = Printf.sprintf "%s(%s)" file_name (ui_name |> CU.Name.to_string) in - info.ui_imports_cmx |> List.iter (fun (modname, digest) -> - let linkage_name = modname |> Linkage_name.of_string in - add_required req_by (linkage_name, digest)); + List.iter (add_required req_by) info.ui_imports_cmx; (info, file_name, crc) :: reqd end else reqd) @@ -254,22 +236,24 @@ let make_globals_map units_list ~crc_interfaces = let defined = List.map (fun (unit, _, impl_crc) -> let name = CU.name unit.ui_unit in - let intf_crc = CU.Name.Tbl.find crc_interfaces name in + let intf_crc = + CU.Name.Tbl.find crc_interfaces name + |> Option.map (fun (_unit, crc) -> crc) + in CU.Name.Tbl.remove crc_interfaces name; let syms = List.map Symbol.for_compilation_unit unit.ui_defines in - (name, intf_crc, Some impl_crc, syms)) + (unit.ui_unit, intf_crc, Some impl_crc, syms)) units_list in CU.Name.Tbl.fold (fun name intf acc -> - (name, intf, None, []) :: acc) + let intf = Option.map (fun (_unit, crc) -> crc) intf in + (assume_no_prefix name, intf, None, []) :: acc) crc_interfaces defined let make_startup_file ~ppf_dump units_list ~crc_interfaces = let compile_phrase p = Asmgen.compile_phrase ~ppf_dump p in Location.input_name := "caml_startup"; (* set name of "current" input *) - let startup_comp_unit = - CU.create CU.Prefix.empty (CU.Name.of_string "_startup") - in + let startup_comp_unit = CU.of_string "_startup" in Compilenv.reset startup_comp_unit; Emit.begin_assembly (); let name_list = @@ -390,8 +374,6 @@ let link ~ppf_dump objfiles output_name = else stdlib :: (objfiles @ [stdexit]) in let obj_infos = List.map read_file objfiles in let units_tolink = List.fold_right scan_file obj_infos [] in - Array.iter (fun name -> remove_required (name |> Linkage_name.of_string)) - Runtimedef.builtin_exceptions; begin match extract_missing_globals() with [] -> () | mg -> raise(Error(Missing_implementations mg)) @@ -399,7 +381,7 @@ let link ~ppf_dump objfiles output_name = List.iter (fun (info, file_name, crc) -> check_consistency file_name info crc) units_tolink; - let crc_interfaces = extract_crc_interfaces0 () in + let crc_interfaces = extract_crc_interfaces () in Clflags.ccobjs := !Clflags.ccobjs @ !lib_ccobjs; Clflags.all_ccopts := !lib_ccopts @ !Clflags.all_ccopts; (* put user's opts first *) @@ -439,7 +421,7 @@ let report_error ppf = function List.iter (fun (md, rq) -> fprintf ppf "@ @[%a referenced from %a@]" - Linkage_name.print md + Compilation_unit.print md print_references rq) in fprintf ppf "@[No implementations provided for the following modules:%a@]" @@ -457,7 +439,7 @@ let report_error ppf = function over implementation %a@]" Location.print_filename file1 Location.print_filename file2 - CU.Name.print intf + CU.print intf | Assembler_error file -> fprintf ppf "Error while assembling %a" Location.print_filename file | Linking_error exitcode -> @@ -476,9 +458,9 @@ let report_error ppf = function Please recompile %a@ with the correct `-I' option@ \ so that %a.cmx@ is found.@]" Location.print_filename filename - CU.Name.print name + CU.print name Location.print_filename filename - CU.Name.print name + CU.Name.print (CU.name name) let () = Location.register_error_of_exn diff --git a/asmcomp/asmlink.mli b/asmcomp/asmlink.mli index 3d31acab22b0..2338442bef59 100644 --- a/asmcomp/asmlink.mli +++ b/asmcomp/asmlink.mli @@ -26,19 +26,19 @@ val call_linker_shared: string list -> string -> unit val reset : unit -> unit val check_consistency: filepath -> Cmx_format.unit_infos -> Digest.t -> unit -val extract_crc_interfaces: unit -> crcs -val extract_crc_implementations: unit -> crcs +val extract_crc_interfaces: unit -> Cmx_format.import_info_cmi list +val extract_crc_implementations: unit -> Cmx_format.import_info_cmx list type error = | File_not_found of filepath | Not_an_object_file of filepath - | Missing_implementations of (Linkage_name.t * string list) list + | Missing_implementations of (Compilation_unit.t * string list) list | Inconsistent_interface of Compilation_unit.Name.t * filepath * filepath - | Inconsistent_implementation of Compilation_unit.Name.t * filepath * filepath + | Inconsistent_implementation of Compilation_unit.t * filepath * filepath | Assembler_error of filepath | Linking_error of int | Multiple_definition of Compilation_unit.Name.t * filepath * filepath - | Missing_cmx of filepath * Compilation_unit.Name.t + | Missing_cmx of filepath * Compilation_unit.t exception Error of error diff --git a/asmcomp/asmpackager.ml b/asmcomp/asmpackager.ml index 6e84ef2f72ff..95cb25c39c61 100644 --- a/asmcomp/asmpackager.ml +++ b/asmcomp/asmpackager.ml @@ -23,7 +23,7 @@ module CU = Compilation_unit type error = Illegal_renaming of CU.Name.t * string * CU.Name.t - | Forward_reference of string * string + | Forward_reference of string * CU.Name.t | Wrong_for_pack of string * CU.t | Linking_error | Assembler_error of string @@ -72,8 +72,9 @@ let check_units members = | PM_impl infos -> List.iter (fun (unit, _) -> - if List.mem (unit |> Compilation_unit.Name.of_string) forbidden - then raise(Error(Forward_reference(mb.pm_file, unit)))) + let name = CU.name unit in + if List.mem name forbidden + then raise(Error(Forward_reference(mb.pm_file, name)))) infos.ui_imports_cmx end; check (list_remove mb.pm_name forbidden) tl in @@ -102,11 +103,13 @@ let make_package_object ~ppf_dump members targetobj targetname coercion (fun m -> match m.pm_kind with | PM_intf -> None - | PM_impl _ -> Some(CU.Name.persistent_ident m.pm_name)) + | PM_impl _ -> Some(CU.create_child (CU.get_current_exn ()) m.pm_name)) members in - let module_ident = Ident.create_persistent targetname in + let for_pack_prefix = CU.Prefix.from_clflags () in + let modname = targetname |> CU.Name.of_string in + let compilation_unit = CU.create for_pack_prefix modname in let prefixname = Filename.remove_extension objtemp in - let required_globals = Ident.Set.empty in + let required_globals = CU.Set.empty in let program, middle_end = if Config.flambda then let main_module_block_size, code = @@ -117,7 +120,7 @@ let make_package_object ~ppf_dump members targetobj targetname coercion { Lambda. code; main_module_block_size; - module_ident; + compilation_unit; required_globals; } in @@ -125,14 +128,14 @@ let make_package_object ~ppf_dump members targetobj targetname coercion else let main_module_block_size, code = Translmod.transl_store_package components - (Ident.create_persistent targetname) coercion + compilation_unit coercion in let code = Simplif.simplify_lambda code in let program = { Lambda. code; main_module_block_size; - module_ident; + compilation_unit; required_globals; } in @@ -171,9 +174,9 @@ let get_approx ui = let build_package_cmx members cmxfile = let unit_names = List.map (fun m -> m.pm_name) members in - let filter lst = + let filter ~get_name lst = List.filter (fun (name, _crc) -> - not (List.mem (name |> CU.Name.of_string) unit_names)) lst in + not (List.mem (get_name name) unit_names)) lst in let union lst = List.fold_left (List.fold_left @@ -184,39 +187,12 @@ let build_package_cmx members cmxfile = (fun m accu -> match m.pm_kind with PM_intf -> accu | PM_impl info -> info :: accu) members [] in - let pack_units = - List.map (fun info -> info.ui_unit) units - |> Compilation_unit.Set.of_list - in let ui = Compilenv.current_unit_infos() in - let pack = - (* CR-soon lmaurer: This is horrific, but the whole [import_for_pack] - business is about to go away. *) - Compilation_unit.Prefix.parse_for_pack - (Some (Compilation_unit.full_path_as_string ui.ui_unit)) - in - let units = - if Config.flambda then - List.map (fun info -> - { info with - ui_export_info = - Flambda - (Export_info_for_pack.import_for_pack ~pack_units - ~pack - (get_export_info info)); - }) - units - else - units - in let ui_export_info = if Config.flambda then let ui_export_info = List.fold_left (fun acc info -> - Export_info.merge acc - (Export_info_for_pack.import_for_pack ~pack_units - ~pack - (get_export_info info))) + Export_info.merge acc (get_export_info info)) (get_export_info ui) units in @@ -224,18 +200,17 @@ let build_package_cmx members cmxfile = else Clambda (get_approx ui) in - Export_info_for_pack.clear_import_state (); - let ui_unit_as_string = CU.Name.to_string (CU.name ui.ui_unit) in + let modname = Compilation_unit.name ui.ui_unit in let pkg_infos = { ui_unit = ui.ui_unit; ui_defines = List.flatten (List.map (fun info -> info.ui_defines) units) @ [ui.ui_unit]; ui_imports_cmi = - (ui_unit_as_string, Some (Env.crc_of_unit ui_unit_as_string)) :: - filter(Asmlink.extract_crc_interfaces()); + (modname, Some (ui.ui_unit, Env.crc_of_unit modname)) :: + filter(Asmlink.extract_crc_interfaces()) ~get_name:(fun name -> name); ui_imports_cmx = - filter(Asmlink.extract_crc_implementations()); + filter(Asmlink.extract_crc_implementations()) ~get_name:CU.name; ui_curry_fun = union(List.map (fun info -> info.ui_curry_fun) units); ui_apply_fun = @@ -285,7 +260,7 @@ let package_files ~ppf_dump initial_env files targetcmx ~backend = Compilenv.reset comp_unit; Misc.try_finally (fun () -> let coercion = - Typemod.package_units initial_env files targetcmi targetname in + Typemod.package_units initial_env files targetcmi comp_unit in package_object_files ~ppf_dump files targetcmx targetobj targetname coercion ~backend ) @@ -301,7 +276,7 @@ let report_error ppf = function @ %a when %a was expected" Location.print_filename file CU.Name.print name CU.Name.print id | Forward_reference(file, ident) -> - fprintf ppf "Forward reference to %s in file %a" ident + fprintf ppf "Forward reference to %a in file %a" CU.Name.print ident Location.print_filename file | Wrong_for_pack(file, path) -> fprintf ppf "File %a@ was not compiled with the `-for-pack %a' option" diff --git a/asmcomp/asmpackager.mli b/asmcomp/asmpackager.mli index c3bfdcd98801..9b3e8984eead 100644 --- a/asmcomp/asmpackager.mli +++ b/asmcomp/asmpackager.mli @@ -26,7 +26,7 @@ val package_files type error = Illegal_renaming of Compilation_unit.Name.t * string * Compilation_unit.Name.t - | Forward_reference of string * string + | Forward_reference of string * Compilation_unit.Name.t | Wrong_for_pack of string * Compilation_unit.t | Linking_error | Assembler_error of string diff --git a/asmcomp/cmm_helpers.ml b/asmcomp/cmm_helpers.ml index d2a3df7fefaa..f0fb7855cac6 100644 --- a/asmcomp/cmm_helpers.ml +++ b/asmcomp/cmm_helpers.ml @@ -80,17 +80,20 @@ let caml_int64_ops = "caml_int64_ops" let pos_arity_in_closinfo = 8 * size_addr - 8 (* arity = the top 8 bits of the closinfo word *) -let closure_info ~arity ~startenv = +let closure_info ~arity ~startenv ~is_last = let arity = match arity with | Lambda.Tupled, n -> -n | Lambda.Curried _, n -> n in assert (-128 <= arity && arity <= 127); - assert (0 <= startenv && startenv < 1 lsl (pos_arity_in_closinfo - 1)); + assert (0 <= startenv && startenv < 1 lsl (pos_arity_in_closinfo - 2)); Nativeint.(add (shift_left (of_int arity) pos_arity_in_closinfo) - (add (shift_left (of_int startenv) 1) - 1n)) + (add + (shift_left + (Bool.to_int is_last |> Nativeint.of_int) + (pos_arity_in_closinfo - 1)) + (add (shift_left (of_int startenv) 1) 1n))) let alloc_float_header mode dbg = match mode with @@ -102,8 +105,8 @@ let alloc_closure_header ~mode sz dbg = | Alloc_heap -> Cconst_natint (white_closure_header sz, dbg) | Alloc_local -> Cconst_natint (local_closure_header sz, dbg) let alloc_infix_header ofs dbg = Cconst_natint (infix_header ofs, dbg) -let alloc_closure_info ~arity ~startenv dbg = - Cconst_natint (closure_info ~arity ~startenv, dbg) +let alloc_closure_info ~arity ~startenv ~is_last dbg = + Cconst_natint (closure_info ~arity ~startenv ~is_last, dbg) let alloc_boxedint32_header mode dbg = match mode with | Lambda.Alloc_heap -> Cconst_natint (boxedint32_header, dbg) @@ -2161,7 +2164,7 @@ let rec intermediate_curry_functions ~nlocal ~arity num = [alloc_closure_header ~mode 5 (dbg ()); Cconst_symbol(name1 ^ "_" ^ Int.to_string (num+1), dbg ()); alloc_closure_info ~arity:(curried (arity - num - 1)) - ~startenv:3 (dbg ()); + ~startenv:3 ~is_last:true (dbg ()); Cconst_symbol(name1 ^ "_" ^ Int.to_string (num+1) ^ "_app", dbg ()); Cvar arg; Cvar clos], @@ -2170,7 +2173,8 @@ let rec intermediate_curry_functions ~nlocal ~arity num = Cop(Calloc mode, [alloc_closure_header ~mode 4 (dbg ()); Cconst_symbol(name1 ^ "_" ^ Int.to_string (num+1), dbg ()); - alloc_closure_info ~arity:(curried 1) ~startenv:2 (dbg ()); + alloc_closure_info ~arity:(curried 1) ~startenv:2 + ~is_last:true (dbg ()); Cvar arg; Cvar clos], dbg ()); fun_codegen_options = []; @@ -2862,9 +2866,8 @@ let predef_exception i name = (* Header for a plugin *) let plugin_header units = - let module CU = Compilation_unit in let mk ((ui : Cmx_format.unit_infos),crc) : Cmxs_format.dynunit = - { dynu_name = CU.name ui.ui_unit; + { dynu_name = ui.ui_unit; dynu_crc = crc; dynu_imports_cmi = ui.ui_imports_cmi; dynu_imports_cmx = ui.ui_imports_cmx; @@ -2916,20 +2919,22 @@ let emit_constant_closure ((_, global_symb) as symb) fundecls clos_vars cont = let rec emit_others pos = function [] -> clos_vars @ cont | (f2 : Clambda.ufunction) :: rem -> + let is_last = match rem with [] -> true | _ :: _ -> false in match f2.arity with | Curried _, (0|1) as arity -> Cint(infix_header pos) :: (closure_symbol f2) @ Csymbol_address f2.label :: - Cint(closure_info ~arity ~startenv:(startenv - pos)) :: + Cint(closure_info ~arity ~startenv:(startenv - pos) ~is_last) :: emit_others (pos + 3) rem | arity -> Cint(infix_header pos) :: (closure_symbol f2) @ Csymbol_address(curry_function_sym f2.arity) :: - Cint(closure_info ~arity ~startenv:(startenv - pos)) :: + Cint(closure_info ~arity ~startenv:(startenv - pos) ~is_last) :: Csymbol_address f2.label :: emit_others (pos + 4) rem in + let is_last = match remainder with [] -> true | _ :: _ -> false in Cint(black_closure_header (fundecls_size fundecls + List.length clos_vars)) :: cdefine_symbol symb @ @@ -2937,11 +2942,11 @@ let emit_constant_closure ((_, global_symb) as symb) fundecls clos_vars cont = match f1.arity with | Curried _, (0|1) as arity -> Csymbol_address f1.label :: - Cint(closure_info ~arity ~startenv) :: + Cint(closure_info ~arity ~startenv ~is_last) :: emit_others 3 remainder | arity -> Csymbol_address(curry_function_sym f1.arity) :: - Cint(closure_info ~arity ~startenv) :: + Cint(closure_info ~arity ~startenv ~is_last) :: Csymbol_address f1.label :: emit_others 4 remainder diff --git a/asmcomp/cmm_helpers.mli b/asmcomp/cmm_helpers.mli index e3de31112837..35e4d53e17da 100644 --- a/asmcomp/cmm_helpers.mli +++ b/asmcomp/cmm_helpers.mli @@ -59,12 +59,13 @@ val boxedint64_header : nativeint val boxedintnat_header : nativeint (** Closure info for a closure of given arity and distance to environment *) -val closure_info : arity:Clambda.arity -> startenv:int -> nativeint +val closure_info : arity:Clambda.arity -> startenv:int -> is_last:bool + -> nativeint (** Wrappers *) val alloc_infix_header : int -> Debuginfo.t -> expression val alloc_closure_info : - arity:(Lambda.function_kind * int) -> startenv:int -> + arity:(Lambda.function_kind * int) -> startenv:int -> is_last:bool -> Debuginfo.t -> expression (** Integers *) @@ -595,7 +596,7 @@ val reference_symbols: string list -> phrase The runtime representation of the type here must match that of [type global_map] in the natdynlink code. *) val globals_map: - (Compilation_unit.Name.t * Digest.t option * Digest.t option * Symbol.t list) + (Compilation_unit.t * Digest.t option * Digest.t option * Symbol.t list) list -> phrase diff --git a/asmcomp/cmmgen.ml b/asmcomp/cmmgen.ml index c7183cb4a0f1..a9c8d486f5a2 100644 --- a/asmcomp/cmmgen.ml +++ b/asmcomp/cmmgen.ml @@ -395,6 +395,7 @@ let rec transl env e = [] -> List.map (transl env) clos_vars | f :: rem -> + let is_last = match rem with [] -> true | _::_ -> false in Cmmgen_state.add_function f; let dbg = f.dbg in let without_header = @@ -402,12 +403,12 @@ let rec transl env e = | Curried _, (1|0) as arity -> Cconst_symbol (f.label, dbg) :: alloc_closure_info ~arity - ~startenv:(startenv - pos) dbg :: + ~startenv:(startenv - pos) ~is_last dbg :: transl_fundecls (pos + 3) rem | arity -> Cconst_symbol (curry_function_sym f.arity, dbg) :: alloc_closure_info ~arity - ~startenv:(startenv - pos) dbg :: + ~startenv:(startenv - pos) ~is_last dbg :: Cconst_symbol (f.label, dbg) :: transl_fundecls (pos + 4) rem in diff --git a/bytecomp/bytegen.ml b/bytecomp/bytegen.ml index f34882407423..7953a15456fe 100644 --- a/bytecomp/bytegen.ml +++ b/bytecomp/bytegen.ml @@ -112,7 +112,8 @@ let preserve_tailcall_for_prim = function Popaque | Psequor | Psequand | Pobj_magic -> true - | Pbytes_to_string | Pbytes_of_string | Pignore | Pgetglobal _ | Psetglobal _ + | Pbytes_to_string | Pbytes_of_string | Pignore + | Pgetglobal _ | Psetglobal _ | Pgetpredef _ | Pmakeblock _ | Pmakefloatblock _ | Pfield _ | Pfield_computed _ | Psetfield _ | Psetfield_computed _ | Pfloatfield _ | Psetfloatfield _ | Pduprecord _ @@ -390,8 +391,11 @@ let comp_bint_primitive bi suff args = let comp_primitive p args = match p with - Pgetglobal id -> Kgetglobal id - | Psetglobal id -> Ksetglobal id + Pgetglobal cu -> + Kgetglobal (cu |> Compilation_unit.to_global_ident_for_bytecode) + | Psetglobal cu -> + Ksetglobal (cu |> Compilation_unit.to_global_ident_for_bytecode) + | Pgetpredef id -> Kgetglobal id | Pintcomp cmp -> Kintcomp cmp | Pcompare_ints -> Kccall("caml_int_compare", 2) | Pcompare_floats -> Kccall("caml_float_compare", 2) diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml index 85f9f28dfbe9..275f9f398aa5 100644 --- a/bytecomp/bytelink.ml +++ b/bytecomp/bytelink.ml @@ -26,13 +26,13 @@ type error = | Not_an_object_file of filepath | Wrong_object_name of filepath | Symbol_error of filepath * Symtable.error - | Inconsistent_import of modname * filepath * filepath + | Inconsistent_import of Compilation_unit.Name.t * filepath * filepath | Custom_runtime | File_exists of filepath | Cannot_open_dll of filepath - | Required_module_unavailable of modname * modname + | Required_module_unavailable of string * Compilation_unit.t | Camlheader of string * filepath - | Wrong_link_order of (modname * modname) list + | Wrong_link_order of (string * string) list exception Error of error @@ -102,14 +102,17 @@ let is_required (rel, _pos) = let add_required compunit = let add id = if Ident.Set.mem id !provided_globals then begin - let cu_name = CU.Name.to_string compunit.cu_name in + let cu_name = CU.full_path_as_string compunit.cu_name in badly_ordered_dependencies := ((Ident.name id), cu_name) :: !badly_ordered_dependencies; end; missing_globals := Ident.Map.add id compunit.cu_name !missing_globals in + let add_unit unit = + add (unit |> Compilation_unit.to_global_ident_for_bytecode) + in List.iter add (Symtable.required_globals compunit.cu_reloc); - List.iter add compunit.cu_required_globals + List.iter add_unit compunit.cu_required_globals let remove_required (rel, _pos) = match rel with @@ -171,11 +174,11 @@ let scan_file obj_name tolink = (* Consistency check between interfaces *) -module Consistbl = Consistbl.Make (Misc.Stdlib.String) +module Consistbl = Consistbl.Make (CU.Name) (Compilation_unit) let crc_interfaces = Consistbl.create () -let interfaces = ref ([] : string list) -let implementations_defined = ref ([] : (string * string) list) +let interfaces = ref ([] : CU.Name.t list) +let implementations_defined = ref ([] : (CU.Name.t * string) list) let check_consistency file_name cu = begin try @@ -184,10 +187,10 @@ let check_consistency file_name cu = interfaces := name :: !interfaces; match crco with None -> () - | Some crc -> - if CU.Name.equal (CU.Name.of_string name) cu.cu_name - then Consistbl.set crc_interfaces name crc file_name - else Consistbl.check crc_interfaces name crc file_name) + | Some (full_name, crc) -> + if CU.Name.equal name (CU.name cu.cu_name) + then Consistbl.set crc_interfaces name full_name crc file_name + else Consistbl.check crc_interfaces name full_name crc file_name) cu.cu_imports with Consistbl.Inconsistency { unit_name = name; @@ -196,17 +199,16 @@ let check_consistency file_name cu = } -> raise(Error(Inconsistent_import(name, user, auth))) end; - let cu_name = CU.Name.to_string cu.cu_name in begin try - let source = List.assoc cu_name !implementations_defined in + let source = List.assoc (CU.name cu.cu_name) !implementations_defined in Location.prerr_warning (Location.in_file file_name) - (Warnings.Module_linked_twice(cu_name, + (Warnings.Module_linked_twice(cu.cu_name |> CU.full_path_as_string, Location.show_filename file_name, Location.show_filename source)) with Not_found -> () end; implementations_defined := - (cu_name, file_name) :: !implementations_defined + (CU.name cu.cu_name, file_name) :: !implementations_defined let extract_crc_interfaces () = Consistbl.extract !interfaces crc_interfaces @@ -261,7 +263,7 @@ let link_archive output_fun currpos_fun file_name units_required = try List.iter (fun cu -> - let name = file_name ^ "(" ^ (CU.Name.to_string cu.cu_name) ^ ")" in + let name = file_name ^ "(" ^ (CU.full_path_as_string cu.cu_name) ^ ")" in try link_compunit output_fun currpos_fun inchan name cu with Symtable.Error msg -> @@ -637,7 +639,6 @@ let link objfiles output_name = match Ident.Map.bindings missing_modules with | [] -> () | (id, cu_name) :: _ -> - let cu_name = CU.Name.to_string cu_name in match !badly_ordered_dependencies with | [] -> raise (Error (Required_module_unavailable (Ident.name id, cu_name))) @@ -762,10 +763,10 @@ let report_error ppf = function | Inconsistent_import(intf, file1, file2) -> fprintf ppf "@[Files %a@ and %a@ \ - make inconsistent assumptions over interface %s@]" + make inconsistent assumptions over interface %a@]" Location.print_filename file1 Location.print_filename file2 - intf + CU.Name.print intf | Custom_runtime -> fprintf ppf "Error while building custom runtime system" | File_exists file -> @@ -775,7 +776,9 @@ let report_error ppf = function fprintf ppf "Error on dynamically loaded library: %a" Location.print_filename file | Required_module_unavailable (s, m) -> - fprintf ppf "Module `%s' is unavailable (required by `%s')" s m + fprintf ppf "Module `%s' is unavailable (required by `%a')" + s + Compilation_unit.print m | Camlheader (msg, header) -> fprintf ppf "System error while copying file %s: %s" header msg | Wrong_link_order l -> diff --git a/bytecomp/bytelink.mli b/bytecomp/bytelink.mli index 8616170a229b..3a57ac3d711b 100644 --- a/bytecomp/bytelink.mli +++ b/bytecomp/bytelink.mli @@ -22,20 +22,20 @@ val reset : unit -> unit val check_consistency: filepath -> Cmo_format.compilation_unit_descr -> unit -val extract_crc_interfaces: unit -> crcs +val extract_crc_interfaces: unit -> Cmo_format.import_info list type error = | File_not_found of filepath | Not_an_object_file of filepath | Wrong_object_name of filepath | Symbol_error of filepath * Symtable.error - | Inconsistent_import of modname * filepath * filepath + | Inconsistent_import of Compilation_unit.Name.t * filepath * filepath | Custom_runtime | File_exists of filepath | Cannot_open_dll of filepath - | Required_module_unavailable of modname * modname + | Required_module_unavailable of string * Compilation_unit.t | Camlheader of string * filepath - | Wrong_link_order of (modname * modname) list + | Wrong_link_order of (string * string) list exception Error of error diff --git a/bytecomp/bytepackager.ml b/bytecomp/bytepackager.ml index aeb843b6c493..adc99dfaa48b 100644 --- a/bytecomp/bytepackager.ml +++ b/bytecomp/bytepackager.ml @@ -27,7 +27,7 @@ type error = Forward_reference of string * Ident.t | Multiple_definition of string * Ident.t | Not_an_object_file of string - | Illegal_renaming of string * string * string + | Illegal_renaming of Compilation_unit.Name.t * string * string | File_not_found of string exception Error of error @@ -40,52 +40,15 @@ let debug_dirs = ref String.Set.empty let primitives = ref ([] : string list) let force_link = ref false -(* Record a relocation. Update its offset, and rename GETGLOBAL and - SETGLOBAL relocations that correspond to one of the units being - consolidated. *) +(* Record a relocation, updating its offset. *) -let rename_relocation packagename objfile mapping defined base (rel, ofs) = - let rel' = - match rel with - Reloc_getglobal id -> - begin try - let id' = List.assoc id mapping in - if List.mem id defined - then Reloc_getglobal id' - else raise(Error(Forward_reference(objfile, id))) - with Not_found -> - (* PR#5276: unique-ize dotted global names, which appear - if one of the units being consolidated is itself a packed - module. *) - let name = Ident.name id in - if String.contains name '.' then - Reloc_getglobal (Ident.create_persistent (packagename ^ "." ^ name)) - else - rel - end - | Reloc_setglobal id -> - begin try - let id' = List.assoc id mapping in - if List.mem id defined - then raise(Error(Multiple_definition(objfile, id))) - else Reloc_setglobal id' - with Not_found -> - (* PR#5276, as above *) - let name = Ident.name id in - if String.contains name '.' then - Reloc_setglobal (Ident.create_persistent (packagename ^ "." ^ name)) - else - rel - end - | _ -> - rel in - relocs := (rel', base + ofs) :: !relocs +let record_relocation base (rel, ofs) = + relocs := (rel, base + ofs) :: !relocs -(* Record and relocate a debugging event *) +(* Record and update a debugging event *) -let relocate_debug base prefix subst ev = +let record_debug base subst ev = let ev' = { ev with ev_pos = base + ev.ev_pos; - ev_module = prefix ^ "." ^ ev.ev_module; ev_typsubst = Subst.compose ev.ev_typsubst subst } in events := ev' :: !events @@ -95,12 +58,13 @@ type pack_member_kind = PM_intf | PM_impl of compilation_unit_descr type pack_member = { pm_file: string; - pm_name: string; + pm_name: Compilation_unit.Name.t; pm_kind: pack_member_kind } let read_member_info file = ( let name = - String.capitalize_ascii(Filename.basename(chop_extensions file)) in + String.capitalize_ascii(Filename.basename(chop_extensions file)) + |> Compilation_unit.Name.of_string in let kind = (* PR#7479: make sure it is either a .cmi or a .cmo *) if Filename.check_suffix file ".cmi" then @@ -116,9 +80,9 @@ let read_member_info file = ( let compunit_pos = input_binary_int ic in seek_in ic compunit_pos; let compunit = (input_value ic : compilation_unit_descr) in - if not (CU.Name.equal compunit.cu_name (CU.Name.of_string name)) + if not (CU.Name.equal (CU.name compunit.cu_name) name) then raise(Error(Illegal_renaming(name, file, - CU.Name.to_string compunit.cu_name))); + CU.name_as_string compunit.cu_name))); close_in ic; PM_impl compunit with x -> @@ -130,25 +94,21 @@ let read_member_info file = ( (* Read the bytecode from a .cmo file. Write bytecode to channel [oc]. - Rename globals as indicated by [mapping] in reloc info. Accumulate relocs, debug info, etc. Return size of bytecode. *) -let rename_append_bytecode packagename oc mapping defined ofs prefix subst - objfile compunit = +let append_bytecode oc ofs subst objfile compunit = let ic = open_in_bin objfile in try Bytelink.check_consistency objfile compunit; - List.iter - (rename_relocation packagename objfile mapping defined ofs) - compunit.cu_reloc; + List.iter (record_relocation ofs) compunit.cu_reloc; primitives := compunit.cu_primitives @ !primitives; if compunit.cu_force_link then force_link := true; seek_in ic compunit.cu_pos; Misc.copy_file_chunk ic oc compunit.cu_codesize; if !Clflags.debug && compunit.cu_debug > 0 then begin seek_in ic compunit.cu_debug; - List.iter (relocate_debug ofs prefix subst) (input_value ic); + List.iter (record_debug ofs subst) (input_value ic); debug_dirs := List.fold_left (fun s e -> String.Set.add e s) !debug_dirs @@ -163,41 +123,47 @@ let rename_append_bytecode packagename oc mapping defined ofs prefix subst (* Same, for a list of .cmo and .cmi files. Return total size of bytecode. *) -let rec rename_append_bytecode_list packagename oc mapping defined ofs - prefix subst = +let rec append_bytecode_list oc ofs prefix subst = function [] -> ofs | m :: rem -> match m.pm_kind with | PM_intf -> - rename_append_bytecode_list packagename oc mapping defined ofs - prefix subst rem + append_bytecode_list oc ofs prefix subst rem | PM_impl compunit -> let size = - rename_append_bytecode packagename oc mapping defined ofs - prefix subst m.pm_file compunit in - let id = Ident.create_persistent m.pm_name in + append_bytecode oc ofs subst m.pm_file compunit + in + let id = + Ident.create_persistent + (m.pm_name |> Compilation_unit.Name.to_string) + in let root = Path.Pident (Ident.create_persistent prefix) in - rename_append_bytecode_list packagename oc mapping (id :: defined) - (ofs + size) prefix + append_bytecode_list oc (ofs + size) prefix (Subst.add_module id (Path.Pdot (root, Ident.name id)) subst) rem (* Generate the code that builds the tuple representing the package module *) -let build_global_target ~ppf_dump oc target_name members mapping pos coercion = +let build_global_target ~ppf_dump oc target_name members pos coercion = + let for_pack_prefix = Compilation_unit.Prefix.from_clflags () in + let compilation_unit = + Compilation_unit.create for_pack_prefix + (target_name |> Compilation_unit.Name.of_string) + in + let unit_of_name name = Compilation_unit.create_child compilation_unit name in let components = - List.map2 - (fun m (_id1, id2) -> + List.map + (fun m -> match m.pm_kind with | PM_intf -> None - | PM_impl _ -> Some id2) - members mapping in - let lam = - Translmod.transl_package - components (Ident.create_persistent target_name) coercion in + | PM_impl _ -> Some (m.pm_name |> unit_of_name)) + members in + let lam = Translmod.transl_package components compilation_unit coercion in + if !Clflags.dump_rawlambda then + Format.fprintf ppf_dump "%a@." Printlambda.lambda lam; let lam = Simplif.simplify_lambda lam in if !Clflags.dump_lambda then Format.fprintf ppf_dump "%a@." Printlambda.lambda lam; @@ -217,36 +183,36 @@ let package_object_files ~ppf_dump files targetfile targetname coercion = | { pm_kind = PM_intf } -> required_globals | { pm_kind = PM_impl { cu_required_globals; cu_reloc } } -> - let remove_required (rel, _pos) required_globals = + let ids_to_remove (rel, _pos) = match rel with - Reloc_setglobal id -> - Ident.Set.remove id required_globals - | _ -> - required_globals + Reloc_setglobal id -> [id] + | _ -> [] + in + let ids_to_remove = + List.concat_map ids_to_remove cu_reloc + |> Ident.Set.of_list in let required_globals = - List.fold_right remove_required cu_reloc required_globals + let keep cu = + not (Ident.Set.mem (cu |> CU.to_global_ident_for_bytecode) + ids_to_remove) + in + Compilation_unit.Set.filter keep required_globals in - List.fold_right Ident.Set.add cu_required_globals required_globals) - members Ident.Set.empty + List.fold_right Compilation_unit.Set.add cu_required_globals + required_globals) + members Compilation_unit.Set.empty in let unit_names = List.map (fun m -> m.pm_name) members in - let mapping = - List.map - (fun name -> - (Ident.create_persistent name, - Ident.create_persistent(targetname ^ "." ^ name))) - unit_names in let oc = open_out_bin targetfile in try output_string oc Config.cmo_magic_number; let pos_depl = pos_out oc in output_binary_int oc 0; let pos_code = pos_out oc in - let ofs = rename_append_bytecode_list targetname oc mapping [] 0 - targetname Subst.identity members in - build_global_target ~ppf_dump oc targetname members mapping ofs coercion; + let ofs = append_bytecode_list oc 0 targetname Subst.identity members in + build_global_target ~ppf_dump oc targetname members ofs coercion; let pos_debug = pos_out oc in if !Clflags.debug && !events <> [] then begin output_value oc (List.rev !events); @@ -257,15 +223,18 @@ let package_object_files ~ppf_dump files targetfile targetname coercion = List.filter (fun (name, _crc) -> not (List.mem name unit_names)) (Bytelink.extract_crc_interfaces()) in + let for_pack_prefix = CU.Prefix.from_clflags () in + let modname = targetname |> CU.Name.of_string in + let cu_name = CU.create for_pack_prefix modname in let compunit = - { cu_name = CU.Name.of_string targetname; + { cu_name; cu_pos = pos_code; cu_codesize = pos_debug - pos_code; cu_reloc = List.rev !relocs; cu_imports = - (targetname, Some (Env.crc_of_unit targetname)) :: imports; + (modname, Some (cu_name, Env.crc_of_unit modname)) :: imports; cu_primitives = !primitives; - cu_required_globals = Ident.Set.elements required_globals; + cu_required_globals = Compilation_unit.Set.elements required_globals; cu_force_link = !force_link; cu_debug = if pos_final > pos_debug then pos_debug else 0; cu_debugsize = pos_final - pos_debug } in @@ -291,9 +260,13 @@ let package_files ~ppf_dump initial_env files targetfile = let prefix = chop_extensions targetfile in let targetcmi = prefix ^ ".cmi" in let targetname = String.capitalize_ascii(Filename.basename prefix) in + let comp_unit = + Compilation_unit.create (Compilation_unit.Prefix.from_clflags ()) + (targetname |> Compilation_unit.Name.of_string) + in Misc.try_finally (fun () -> let coercion = - Typemod.package_units initial_env files targetcmi targetname in + Typemod.package_units initial_env files targetcmi comp_unit in package_object_files ~ppf_dump files targetfile targetname coercion ) ~exceptionally:(fun () -> remove_file targetfile) @@ -315,8 +288,10 @@ let report_error ppf = function Location.print_filename file | Illegal_renaming(name, file, id) -> fprintf ppf "Wrong file naming: %a@ contains the code for\ - @ %s when %s was expected" - Location.print_filename file name id + @ %a when %s was expected" + Location.print_filename file + Compilation_unit.Name.print name + id | File_not_found file -> fprintf ppf "File %s not found" file diff --git a/bytecomp/bytepackager.mli b/bytecomp/bytepackager.mli index 95177716b342..07b692716b54 100644 --- a/bytecomp/bytepackager.mli +++ b/bytecomp/bytepackager.mli @@ -23,7 +23,7 @@ type error = Forward_reference of string * Ident.t | Multiple_definition of string * Ident.t | Not_an_object_file of string - | Illegal_renaming of string * string * string + | Illegal_renaming of Compilation_unit.Name.t * string * string | File_not_found of string exception Error of error diff --git a/bytecomp/emitcode.ml b/bytecomp/emitcode.ml index ea185b3775f3..f5ebca5b12b2 100644 --- a/bytecomp/emitcode.ml +++ b/bytecomp/emitcode.ml @@ -408,14 +408,14 @@ let to_file outchan unit_name objfile ~required_globals code = end else (0, 0) in let compunit = - { cu_name = Compilation_unit.Name.of_string unit_name; + { cu_name = unit_name; cu_pos = pos_code; cu_codesize = !out_position; cu_reloc = List.rev !reloc_info; cu_imports = Env.imports(); cu_primitives = List.map Primitive.byte_name !Translmod.primitive_declarations; - cu_required_globals = Ident.Set.elements required_globals; + cu_required_globals = Compilation_unit.Set.elements required_globals; cu_force_link = !Clflags.link_everything; cu_debug = pos_debug; cu_debugsize = size_debug } in diff --git a/bytecomp/emitcode.mli b/bytecomp/emitcode.mli index 95da242e3083..eada12345971 100644 --- a/bytecomp/emitcode.mli +++ b/bytecomp/emitcode.mli @@ -18,8 +18,8 @@ open Cmo_format open Instruct -val to_file: out_channel -> string -> string -> - required_globals:Ident.Set.t -> instruction list -> unit +val to_file: out_channel -> Compilation_unit.t -> string -> + required_globals:Compilation_unit.Set.t -> instruction list -> unit (* Arguments: channel on output file name of compilation unit implemented diff --git a/bytecomp/symtable.ml b/bytecomp/symtable.ml index da36358cb967..f8d44b686724 100644 --- a/bytecomp/symtable.ml +++ b/bytecomp/symtable.ml @@ -316,7 +316,7 @@ let init_toplevel () = (* Recover CRC infos for interfaces *) let crcintfs = try - (Obj.magic (sect.read_struct "CRCS") : (string * Digest.t option) list) + (Obj.magic (sect.read_struct "CRCS") : Cmo_format.import_info list) with Not_found -> [] in (* Done *) sect.close_reader(); diff --git a/bytecomp/symtable.mli b/bytecomp/symtable.mli index 782a6086709b..78d210e550d0 100644 --- a/bytecomp/symtable.mli +++ b/bytecomp/symtable.mli @@ -32,7 +32,7 @@ val transl_const: Lambda.structured_constant -> Obj.t (* Functions for the toplevel *) -val init_toplevel: unit -> (string * Digest.t option) list +val init_toplevel: unit -> Cmo_format.import_info list val update_global_table: unit -> unit val get_global_value: Ident.t -> Obj.t val is_global_defined: Ident.t -> bool diff --git a/compilerlibs/Makefile.compilerlibs b/compilerlibs/Makefile.compilerlibs index 2a69c383b0b1..531c419a2f99 100644 --- a/compilerlibs/Makefile.compilerlibs +++ b/compilerlibs/Makefile.compilerlibs @@ -338,7 +338,6 @@ MIDDLE_END = \ middle_end/flambda/inlining_cost.cmo \ middle_end/flambda/simple_value_approx.cmo \ middle_end/flambda/export_info.cmo \ - middle_end/flambda/export_info_for_pack.cmo \ middle_end/compilenv.cmo \ $(MIDDLE_END_CLOSURE) \ $(MIDDLE_END_FLAMBDA) diff --git a/configure b/configure index 5168b7aecc5a..179aa5a4242c 100755 --- a/configure +++ b/configure @@ -1,12 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for OCaml 4.14.0+jst. +# Generated by GNU Autoconf 2.69 for OCaml 4.14.0+jst. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -17,16 +16,14 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -36,46 +33,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -84,6 +81,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -92,12 +96,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -109,10 +109,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -134,22 +154,20 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop +else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -169,15 +187,12 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -else \$as_nop +else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO @@ -192,38 +207,30 @@ test -x / || exit 1" test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null -then : + if (eval "$as_required") 2>/dev/null; then : as_have_required=yes -else $as_nop +else as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -else $as_nop +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base + as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi @@ -231,21 +238,14 @@ fi esac as_found=false done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi +fi; } +IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x -then : + if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -263,19 +263,18 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and caml-list@inria.fr + $as_echo "$0: Please tell bug-autoconf@gnu.org and caml-list@inria.fr $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do @@ -303,7 +302,6 @@ as_fn_unset () } as_unset=as_fn_unset - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -321,14 +319,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -343,7 +333,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -352,7 +342,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -391,13 +381,12 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -409,27 +398,18 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -441,9 +421,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -470,7 +450,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -514,7 +494,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -528,10 +508,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -545,13 +521,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -629,36 +598,40 @@ PACKAGE_URL='http://www.ocaml.org' ac_unique_file="runtime/interp.c" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include +#include +#ifdef HAVE_SYS_TYPES_H +# include #endif -#ifdef HAVE_STDLIB_H +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif #ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif #ifdef HAVE_UNISTD_H # include #endif" -ac_header_c_list= ac_subst_vars='LTLIBOBJS LIBOBJS PTHREAD_CFLAGS @@ -671,9 +644,9 @@ INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM flexlink -CPP ac_ct_DEP_CC DEP_CC +CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL @@ -720,6 +693,7 @@ build_vendor build_cpu build dune +poll_insertion stack_allocation intel_jcc_bug_cflags naked_pointers_checker @@ -840,7 +814,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -901,6 +874,7 @@ enable_flat_float_array enable_function_sections with_afl enable_stack_allocation +enable_poll_insertion with_flexdll enable_shared enable_static @@ -965,7 +939,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -995,6 +968,8 @@ do *) ac_optarg=yes ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1035,9 +1010,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1061,9 +1036,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1216,15 +1191,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1274,9 +1240,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1290,9 +1256,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1336,9 +1302,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1354,7 +1320,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1362,7 +1328,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1418,7 +1384,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1515,7 +1481,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1601,6 +1566,7 @@ Optional Features: do not emit each function in a separate section --enable-stack-allocation enable stack allocation of local values + --enable-poll-insertion enable insertion of poll points --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1666,9 +1632,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1696,8 +1662,7 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. + # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1705,7 +1670,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1715,9 +1680,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF OCaml configure 4.14.0+jst -generated by GNU Autoconf 2.71 +generated by GNU Autoconf 2.69 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1734,14 +1699,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1749,15 +1714,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1773,14 +1737,14 @@ fi ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1788,18 +1752,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1821,94 +1784,30 @@ fi ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ - -#include -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main (void) -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -1921,7 +1820,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1929,15 +1828,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1949,8 +1847,8 @@ fi # ac_fn_c_try_run LINENO # ---------------------- -# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that -# executables *can* be run. +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack @@ -1960,26 +1858,25 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status @@ -1990,6 +1887,164 @@ fi } # ac_fn_c_try_run +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## --------------------------------- ## +## Report this to caml-list@inria.fr ## +## --------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache @@ -1997,18 +2052,17 @@ fi ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof ($2)) return 0; @@ -2016,13 +2070,12 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof (($2))) return 0; @@ -2030,19 +2083,18 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2061,7 +2113,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; @@ -2071,15 +2123,14 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; @@ -2089,10 +2140,9 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break -else $as_nop +else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= @@ -2100,14 +2150,14 @@ else $as_nop fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; @@ -2117,15 +2167,14 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; @@ -2135,10 +2184,9 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break -else $as_nop +else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= @@ -2146,14 +2194,14 @@ else $as_nop fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done -else $as_nop +else ac_lo= ac_hi= fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val @@ -2161,7 +2209,7 @@ while test "x$ac_lo" != "x$ac_hi"; do /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; @@ -2171,13 +2219,12 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid -else $as_nop +else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; @@ -2187,12 +2234,12 @@ esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 -static long int longval (void) { return $2; } -static unsigned long int ulongval (void) { return $2; } +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } #include #include int -main (void) +main () { FILE *f = fopen ("conftest.val", "w"); @@ -2220,10 +2267,9 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 -printf %s "checking whether $as_decl_name is declared... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - eval ac_save_FLAGS=\$$6 - as_fn_append $6 " $5" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { #ifndef $as_decl_name #ifdef __cplusplus @@ -2271,22 +2314,19 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - eval $6=\$ac_save_FLAGS - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_check_decl +} # ac_fn_c_check_decl # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES # ---------------------------------------------------- @@ -2295,17 +2335,16 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -printf %s "checking for $2.$3... " >&6; } -if eval test \${$4+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main (void) +main () { static $2 ac_aggr; if (ac_aggr.$3) @@ -2314,15 +2353,14 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main (void) +main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) @@ -2331,50 +2369,29 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" -else $as_nop +else eval "$4=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done - -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac - cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by OCaml $as_me 4.14.0+jst, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was - $ $0$ac_configure_args_raw + $ $0 $@ _ACEOF exec 5>>config.log @@ -2407,12 +2424,8 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -2447,7 +2460,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2482,13 +2495,11 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - printf "%s\n" "## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2499,8 +2510,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2524,7 +2535,7 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ) echo - printf "%s\n" "## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2532,14 +2543,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2547,15 +2558,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - printf "%s\n" "## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2563,8 +2574,8 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} echo fi test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2578,48 +2589,63 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -printf "%s\n" "/* confdefs.h */" > confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - -for ac_site_file in $ac_site_files +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2629,434 +2655,19 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif - -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' - -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' - -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" -as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" - -# Auxiliary files required by this configure script. -ac_aux_files="install-sh ltmain.sh config.guess config.sub" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}/build-aux" - -# Search for a directory containing all of the required auxiliary files, -# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. -# If we don't find one directory that contains all the files we need, -# we report the set of missing files from the *first* directory in -# $ac_aux_dir_candidates and give up. -ac_missing_aux_files="" -ac_first_candidate=: -printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in $ac_aux_dir_candidates -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - - printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 - ac_aux_dir_found=yes - ac_install_sh= - for ac_aux in $ac_aux_files - do - # As a special case, if "install-sh" is required, that requirement - # can be satisfied by any of "install-sh", "install.sh", or "shtool", - # and $ac_install_sh is set appropriately for whichever one is found. - if test x"$ac_aux" = x"install-sh" - then - if test -f "${as_dir}install-sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 - ac_install_sh="${as_dir}install-sh -c" - elif test -f "${as_dir}install.sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 - ac_install_sh="${as_dir}install.sh -c" - elif test -f "${as_dir}shtool"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 - ac_install_sh="${as_dir}shtool install -c" - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} install-sh" - else - break - fi - fi - else - if test -f "${as_dir}${ac_aux}"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" - else - break - fi - fi - fi - done - if test "$ac_aux_dir_found" = yes; then - ac_aux_dir="$as_dir" - break - fi - ac_first_candidate=false - - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 -fi - - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -if test -f "${ac_aux_dir}config.guess"; then - ac_config_guess="$SHELL ${ac_aux_dir}config.guess" -fi -if test -f "${ac_aux_dir}config.sub"; then - ac_config_sub="$SHELL ${ac_aux_dir}config.sub" -fi -if test -f "$ac_aux_dir/configure"; then - ac_configure="$SHELL ${ac_aux_dir}configure" -fi - # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -3067,12 +2678,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -3081,24 +2692,24 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -3108,12 +2719,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' - and start over" "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -3127,8 +2737,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Configuring OCaml version 4.14.0+jst" >&5 -printf "%s\n" "$as_me: Configuring OCaml version 4.14.0+jst" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring OCaml version 4.14.0+jst" >&5 +$as_echo "$as_me: Configuring OCaml version 4.14.0+jst" >&6;} # Configuration variables @@ -3170,6 +2780,34 @@ bootstrapping_flexdll=false ## Directory containing auxiliary scripts used during build +ac_aux_dir= +for ac_dir in build-aux "$srcdir"/build-aux; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + ## Output variables @@ -3286,6 +2924,7 @@ OCAML_VERSION_SHORT=4.14 + ## Generated files @@ -3310,47 +2949,43 @@ ac_config_headers="$ac_config_headers runtime/caml/version.h" # Definitions related to the version of OCaml -printf "%s\n" "#define OCAML_VERSION_MAJOR 4" >>confdefs.h +$as_echo "#define OCAML_VERSION_MAJOR 4" >>confdefs.h -printf "%s\n" "#define OCAML_VERSION_MINOR 14" >>confdefs.h +$as_echo "#define OCAML_VERSION_MINOR 14" >>confdefs.h -printf "%s\n" "#define OCAML_VERSION_PATCHLEVEL 0" >>confdefs.h +$as_echo "#define OCAML_VERSION_PATCHLEVEL 0" >>confdefs.h -printf "%s\n" "#define OCAML_VERSION_ADDITIONAL \"jst\"" >>confdefs.h +$as_echo "#define OCAML_VERSION_ADDITIONAL \"jst\"" >>confdefs.h - printf "%s\n" "#define OCAML_VERSION_EXTRA \"jst\"" >>confdefs.h + $as_echo "#define OCAML_VERSION_EXTRA \"jst\"" >>confdefs.h -printf "%s\n" "#define OCAML_VERSION 41400" >>confdefs.h +$as_echo "#define OCAML_VERSION 41400" >>confdefs.h -printf "%s\n" "#define OCAML_VERSION_STRING \"4.14.0+jst\"" >>confdefs.h +$as_echo "#define OCAML_VERSION_STRING \"4.14.0+jst\"" >>confdefs.h # Checks for system types +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - - - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -3369,22 +3004,21 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -3403,22 +3037,21 @@ IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 -printf %s "checking target system type... " >&6; } -if test ${ac_cv_target+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if ${ac_cv_target+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else - ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5 + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -printf "%s\n" "$ac_cv_target" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; @@ -3474,12 +3107,11 @@ esac # Extract the first word of "dune", so it can be a program name with args. set dummy dune; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_dune+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_dune+:} false; then : + $as_echo_n "(cached) " >&6 +else case $dune in [\\/]* | ?:[\\/]*) ac_cv_path_dune="$dune" # Let the user override the test with a path. @@ -3489,15 +3121,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_dune="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_dune="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3509,43 +3137,39 @@ esac fi dune=$ac_cv_path_dune if test -n "$dune"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dune" >&5 -printf "%s\n" "$dune" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dune" >&5 +$as_echo "$dune" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Check whether --with-dune was given. -if test ${with_dune+y} -then : +if test "${with_dune+set}" = set; then : withval=$with_dune; dune=$with_dune fi # Check whether --enable-debug-runtime was given. -if test ${enable_debug_runtime+y} -then : +if test "${enable_debug_runtime+set}" = set; then : enableval=$enable_debug_runtime; fi # Check whether --enable-debugger was given. -if test ${enable_debugger+y} -then : +if test "${enable_debugger+set}" = set; then : enableval=$enable_debugger; -else $as_nop +else enable_debugger=auto fi # Check whether --enable-dependency-generation was given. -if test ${enable_dependency_generation+y} -then : +if test "${enable_dependency_generation+set}" = set; then : enableval=$enable_dependency_generation; -else $as_nop +else enable_dependency_generation=auto fi @@ -3553,32 +3177,28 @@ fi # Check whether --enable-instrumented-runtime was given. -if test ${enable_instrumented_runtime+y} -then : +if test "${enable_instrumented_runtime+set}" = set; then : enableval=$enable_instrumented_runtime; -else $as_nop +else enable_instrumented_runtime=auto fi # Check whether --enable-vmthreads was given. -if test ${enable_vmthreads+y} -then : +if test "${enable_vmthreads+set}" = set; then : enableval=$enable_vmthreads; as_fn_error $? "The vmthreads library is no longer available. \ It was deleted in OCaml 4.09." "$LINENO" 5 fi # Check whether --enable-systhreads was given. -if test ${enable_systhreads+y} -then : +if test "${enable_systhreads+set}" = set; then : enableval=$enable_systhreads; fi # Check whether --enable-graph-lib was given. -if test ${enable_graph_lib+y} -then : +if test "${enable_graph_lib+set}" = set; then : enableval=$enable_graph_lib; as_fn_error $? "The graphics library is no longer distributed with OCaml \ since version 4.09. It is now distributed as a separate \"graphics\" package: \ https://github.com/ocaml/graphics" "$LINENO" 5 @@ -3586,166 +3206,143 @@ fi # Check whether --enable-str-lib was given. -if test ${enable_str_lib+y} -then : +if test "${enable_str_lib+set}" = set; then : enableval=$enable_str_lib; fi # Check whether --enable-unix-lib was given. -if test ${enable_unix_lib+y} -then : +if test "${enable_unix_lib+set}" = set; then : enableval=$enable_unix_lib; fi # Check whether --enable-bigarray-lib was given. -if test ${enable_bigarray_lib+y} -then : +if test "${enable_bigarray_lib+set}" = set; then : enableval=$enable_bigarray_lib; fi # Check whether --enable-ocamldoc was given. -if test ${enable_ocamldoc+y} -then : +if test "${enable_ocamldoc+set}" = set; then : enableval=$enable_ocamldoc; -else $as_nop +else ocamldoc=auto fi # Check whether --with-odoc was given. -if test ${with_odoc+y} -then : +if test "${with_odoc+set}" = set; then : withval=$with_odoc; fi # Check whether --enable-ocamltest was given. -if test ${enable_ocamltest+y} -then : +if test "${enable_ocamltest+set}" = set; then : enableval=$enable_ocamltest; fi # Check whether --enable-native-toplevel was given. -if test ${enable_native_toplevel+y} -then : +if test "${enable_native_toplevel+set}" = set; then : enableval=$enable_native_toplevel; fi # Check whether --enable-frame-pointers was given. -if test ${enable_frame_pointers+y} -then : +if test "${enable_frame_pointers+set}" = set; then : enableval=$enable_frame_pointers; fi # Check whether --enable-cpp-mangling was given. -if test ${enable_cpp_mangling+y} -then : +if test "${enable_cpp_mangling+set}" = set; then : enableval=$enable_cpp_mangling; fi # Check whether --enable-naked-pointers was given. -if test ${enable_naked_pointers+y} -then : +if test "${enable_naked_pointers+set}" = set; then : enableval=$enable_naked_pointers; fi # Check whether --enable-naked-pointers-checker was given. -if test ${enable_naked_pointers_checker+y} -then : +if test "${enable_naked_pointers_checker+set}" = set; then : enableval=$enable_naked_pointers_checker; fi # Check whether --enable-spacetime was given. -if test ${enable_spacetime+y} -then : +if test "${enable_spacetime+set}" = set; then : enableval=$enable_spacetime; as_fn_error $? "spacetime profiling was deleted in OCaml 4.12." "$LINENO" 5 fi # Check whether --enable-cfi was given. -if test ${enable_cfi+y} -then : +if test "${enable_cfi+set}" = set; then : enableval=$enable_cfi; fi # Check whether --enable-imprecise-c99-float-ops was given. -if test ${enable_imprecise_c99_float_ops+y} -then : +if test "${enable_imprecise_c99_float_ops+set}" = set; then : enableval=$enable_imprecise_c99_float_ops; fi # Check whether --enable-installing-source-artifacts was given. -if test ${enable_installing_source_artifacts+y} -then : +if test "${enable_installing_source_artifacts+set}" = set; then : enableval=$enable_installing_source_artifacts; fi # Check whether --enable-installing-bytecode-programs was given. -if test ${enable_installing_bytecode_programs+y} -then : +if test "${enable_installing_bytecode_programs+set}" = set; then : enableval=$enable_installing_bytecode_programs; fi # Check whether --enable-native-compiler was given. -if test ${enable_native_compiler+y} -then : +if test "${enable_native_compiler+set}" = set; then : enableval=$enable_native_compiler; fi # Check whether --enable-flambda was given. -if test ${enable_flambda+y} -then : +if test "${enable_flambda+set}" = set; then : enableval=$enable_flambda; fi # Check whether --enable-flambda-invariants was given. -if test ${enable_flambda_invariants+y} -then : +if test "${enable_flambda_invariants+set}" = set; then : enableval=$enable_flambda_invariants; fi # Check whether --enable-flambda2 was given. -if test ${enable_flambda2+y} -then : +if test "${enable_flambda2+set}" = set; then : enableval=$enable_flambda2; fi # Check whether --enable-cmm-invariants was given. -if test ${enable_cmm_invariants+y} -then : +if test "${enable_cmm_invariants+set}" = set; then : enableval=$enable_cmm_invariants; fi # Check whether --with-target-bindir was given. -if test ${with_target_bindir+y} -then : +if test "${with_target_bindir+set}" = set; then : withval=$with_target_bindir; fi # Check whether --enable-reserved-header-bits was given. -if test ${enable_reserved_header_bits+y} -then : +if test "${enable_reserved_header_bits+set}" = set; then : enableval=$enable_reserved_header_bits; case $enable_reserved_header_bits in #( 0) : with_profinfo=false @@ -3760,15 +3357,13 @@ fi # Check whether --enable-stdlib-manpages was given. -if test ${enable_stdlib_manpages+y} -then : +if test "${enable_stdlib_manpages+set}" = set; then : enableval=$enable_stdlib_manpages; fi # Check whether --enable-warn-error was given. -if test ${enable_warn_error+y} -then : +if test "${enable_warn_error+set}" = set; then : enableval=$enable_warn_error; fi @@ -3801,8 +3396,7 @@ fi # to be removed in the future. # Check whether --enable-force-safe-string was given. -if test ${enable_force_safe_string+y} -then : +if test "${enable_force_safe_string+set}" = set; then : enableval=$enable_force_safe_string; fi @@ -3810,71 +3404,66 @@ fi # Check whether --enable-flat-float-array was given. -if test ${enable_flat_float_array+y} -then : +if test "${enable_flat_float_array+set}" = set; then : enableval=$enable_flat_float_array; fi # Check whether --enable-function-sections was given. -if test ${enable_function_sections+y} -then : +if test "${enable_function_sections+set}" = set; then : enableval=$enable_function_sections; -else $as_nop +else enable_function_sections=auto fi # Check whether --with-afl was given. -if test ${with_afl+y} -then : +if test "${with_afl+set}" = set; then : withval=$with_afl; fi # Check whether --enable-stack-allocation was given. -if test ${enable_stack_allocation+y} -then : +if test "${enable_stack_allocation+set}" = set; then : enableval=$enable_stack_allocation; fi +# Check whether --enable-poll-insertion was given. +if test "${enable_poll_insertion+set}" = set; then : + enableval=$enable_poll_insertion; +fi + + # Check whether --with-flexdll was given. -if test ${with_flexdll+y} -then : - withval=$with_flexdll; if test x"$withval" = 'xyes' -then : +if test "${with_flexdll+set}" = set; then : + withval=$with_flexdll; if test x"$withval" = 'xyes'; then : with_flexdll=flexdll fi fi -if test x"$enable_unix_lib" = "xno" -then : - if test x"$enable_debugger" = "xyes" -then : +if test x"$enable_unix_lib" = "xno"; then : + if test x"$enable_debugger" = "xyes"; then : as_fn_error $? "replay debugger requires the unix library" "$LINENO" 5 -else $as_nop +else enable_debugger="no" fi - if test x"$enable_bigarray_lib" = "xyes" -then : + if test x"$enable_bigarray_lib" = "xyes"; then : as_fn_error $? "legacy bigarray library requires the unix library" "$LINENO" 5 fi fi -if test x"$enable_unix_lib" = "xno" -o x"$enable_str_lib" = "xno" -then : - if test x"$enable_ocamldoc" = "xyes" -then : +if test x"$enable_unix_lib" = "xno" -o x"$enable_str_lib" = "xno"; then : + if test x"$enable_ocamldoc" = "xyes"; then : as_fn_error $? "ocamldoc requires the unix and str libraries" "$LINENO" 5 -else $as_nop +else enable_ocamldoc="no" with_camltex="" fi -else $as_nop +else with_camltex="true" fi @@ -3886,12 +3475,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$LD"; then ac_cv_prog_LD="$LD" # Let the user override the test. else @@ -3899,15 +3487,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LD="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3918,11 +3502,11 @@ fi fi LD=$ac_cv_prog_LD if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -printf "%s\n" "$LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3935,12 +3519,11 @@ if test -z "$LD"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_LD"; then ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test. else @@ -3948,15 +3531,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LD="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3967,11 +3546,11 @@ fi fi ac_ct_LD=$ac_cv_prog_ac_ct_LD if test -n "$ac_ct_LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5 -printf "%s\n" "$ac_ct_LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5 +$as_echo "$ac_ct_LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3983,8 +3562,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LD=$ac_ct_LD @@ -3996,16 +3575,14 @@ fi # alters the CFLAGS variable, so we save its value before calling the macro # and restore it after the call old_host_os=$host_os -if test x"$host_os" = "xwindows" -then : +if test x"$host_os" = "xwindows"; then : host_os=mingw fi saved_CFLAGS="$CFLAGS" - case `pwd` in *\ * | *\ *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac @@ -4025,7 +3602,6 @@ macro_revision='2.4.6' - ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within @@ -4049,8 +3625,8 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -printf %s "checking how to print strings... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -4076,12 +3652,12 @@ func_echo_all () } case $ECHO in - printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -printf "%s\n" "printf" >&6; } ;; - print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -printf "%s\n" "print -r" >&6; } ;; - *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -printf "%s\n" "cat" >&6; } ;; + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; esac @@ -4094,15 +3670,6 @@ esac - - - - - - - - - @@ -4114,12 +3681,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4127,15 +3693,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4146,11 +3708,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4159,12 +3721,11 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4172,15 +3733,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4191,11 +3748,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -4203,8 +3760,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4217,12 +3774,11 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4230,15 +3786,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4249,11 +3801,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4262,12 +3814,11 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4276,19 +3827,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4304,18 +3851,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4326,12 +3873,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4339,15 +3885,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4358,11 +3900,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4375,12 +3917,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4388,15 +3929,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4407,11 +3944,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4423,138 +3960,34 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi -else - CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4564,7 +3997,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -4572,7 +4005,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4584,9 +4017,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -4607,12 +4040,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -4629,7 +4061,7 @@ do # certainly right. break;; *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -4645,46 +4077,44 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop +else ac_file='' fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -4698,15 +4128,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -4715,7 +4145,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -4727,8 +4157,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -4736,10 +4166,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -4747,40 +4177,39 @@ printf "%s\n" "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4794,12 +4223,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -4808,32 +4236,31 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -4843,33 +4270,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -4878,60 +4301,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4946,144 +4366,94 @@ else CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=c @@ -5092,12 +4462,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -printf %s "checking for a sed that does not truncate output... " >&6; } -if test ${ac_cv_path_SED+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" @@ -5111,15 +4480,10 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in sed gsed - do + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED @@ -5128,13 +4492,13 @@ case `"$ac_path_SED" --version 2>&1` in ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" '' >> "conftest.nl" + $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5162,8 +4526,8 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -printf "%s\n" "$ac_cv_path_SED" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -5180,12 +4544,11 @@ Xsed="$SED -e 1s/^X//" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -printf %s "checking for grep that handles long lines and -e... " >&6; } -if test ${ac_cv_path_GREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -5193,15 +4556,10 @@ else $as_nop for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in grep ggrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP @@ -5210,13 +4568,13 @@ case `"$ac_path_GREP" --version 2>&1` in ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5244,17 +4602,16 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -printf "%s\n" "$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else @@ -5265,15 +4622,10 @@ else $as_nop for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP @@ -5282,13 +4634,13 @@ case `"$ac_path_EGREP" --version 2>&1` in ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5317,17 +4669,16 @@ fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -printf %s "checking for fgrep... " >&6; } -if test ${ac_cv_path_FGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else @@ -5338,15 +4689,10 @@ else $as_nop for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in fgrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP @@ -5355,13 +4701,13 @@ case `"$ac_path_FGREP" --version 2>&1` in ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'FGREP' >> "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5390,8 +4736,8 @@ fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -printf "%s\n" "$ac_cv_path_FGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -5416,18 +4762,17 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else $as_nop +else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw @@ -5456,16 +4801,15 @@ printf %s "checking for ld used by $CC... " >&6; } ;; esac elif test yes = "$with_gnu_ld"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi -if test ${lt_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -5494,19 +4838,18 @@ fi LD=$lt_cv_path_LD if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -printf "%s\n" "$LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${lt_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 -printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -5529,12 +4872,11 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test ${lt_cv_path_NM+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM @@ -5584,8 +4926,8 @@ else : ${lt_cv_path_NM=no} fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -printf "%s\n" "$lt_cv_path_NM" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else @@ -5598,12 +4940,11 @@ else do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else @@ -5611,15 +4952,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5630,11 +4967,11 @@ fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -printf "%s\n" "$DUMPBIN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5647,12 +4984,11 @@ if test -z "$DUMPBIN"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else @@ -5660,15 +4996,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5679,11 +5011,11 @@ fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -printf "%s\n" "$ac_ct_DUMPBIN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5695,8 +5027,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN @@ -5724,12 +5056,11 @@ test -z "$NM" && NM=nm -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -printf %s "checking the name lister ($NM) interface... " >&6; } -if test ${lt_cv_nm_interface+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) @@ -5745,27 +5076,26 @@ else $as_nop fi rm -f conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -printf "%s\n" "$lt_cv_nm_interface" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -printf %s "checking whether ln -s works... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -printf "%s\n" "no, using $LN_S" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -printf %s "checking the maximum length of command line arguments... " >&6; } -if test ${lt_cv_sys_max_cmd_len+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else i=0 teststring=ABCD @@ -5892,11 +5222,11 @@ else $as_nop fi if test -n "$lt_cv_sys_max_cmd_len"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -5940,12 +5270,11 @@ esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -printf %s "checking how to convert $build file names to $host format... " >&6; } -if test ${lt_cv_to_host_file_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else case $host in *-*-mingw* ) case $build in @@ -5981,19 +5310,18 @@ esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -printf %s "checking how to convert $build file names to toolchain format... " >&6; } -if test ${lt_cv_to_tool_file_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in @@ -6009,23 +5337,22 @@ esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -printf %s "checking for $LD option to reload object files... " >&6; } -if test ${lt_cv_ld_reload_flag+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ld_reload_flag='-r' fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; @@ -6058,12 +5385,11 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else @@ -6071,15 +5397,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6090,11 +5412,11 @@ fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -printf "%s\n" "$OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6103,12 +5425,11 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else @@ -6116,15 +5437,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6135,11 +5452,11 @@ fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -printf "%s\n" "$ac_ct_OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -6147,8 +5464,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -6167,12 +5484,11 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -printf %s "checking how to recognize dependent libraries... " >&6; } -if test ${lt_cv_deplibs_check_method+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' @@ -6368,8 +5684,8 @@ os2*) esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no @@ -6413,12 +5729,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else @@ -6426,15 +5741,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6445,11 +5756,11 @@ fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -printf "%s\n" "$DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6458,12 +5769,11 @@ if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else @@ -6471,15 +5781,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6490,11 +5796,11 @@ fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -printf "%s\n" "$ac_ct_DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then @@ -6502,8 +5808,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -6523,12 +5829,11 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -printf %s "checking how to associate runtime and link libraries... " >&6; } -if test ${lt_cv_sharedlib_from_linklib_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in @@ -6551,8 +5856,8 @@ cygwin* | mingw* | pw32* | cegcc*) esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -6568,12 +5873,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6581,15 +5885,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6600,11 +5900,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6617,12 +5917,11 @@ if test -z "$AR"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -6630,15 +5929,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6649,11 +5944,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6665,8 +5960,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -6686,32 +5981,30 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -printf %s "checking for archiver @FILE support... " >&6; } -if test ${lt_cv_ar_at_file+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. @@ -6719,7 +6012,7 @@ then : { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ @@ -6728,11 +6021,11 @@ then : rm -f conftest.* libconftest.a fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -printf "%s\n" "$lt_cv_ar_at_file" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= @@ -6749,12 +6042,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -6762,15 +6054,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6781,11 +6069,11 @@ fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6794,12 +6082,11 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -6807,15 +6094,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6826,11 +6109,11 @@ fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -6838,8 +6121,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -6858,12 +6141,11 @@ test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -6871,15 +6153,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6890,11 +6168,11 @@ fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -printf "%s\n" "$RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6903,12 +6181,11 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -6916,15 +6193,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6935,11 +6208,11 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -printf "%s\n" "$ac_ct_RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -6947,8 +6220,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -7012,12 +6285,11 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AWK+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else @@ -7025,15 +6297,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7044,11 +6312,11 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -printf "%s\n" "$AWK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7084,12 +6352,11 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -printf %s "checking command to parse $NM output from $compiler object... " >&6; } -if test ${lt_cv_sys_global_symbol_pipe+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] @@ -7241,14 +6508,14 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then @@ -7317,7 +6584,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi @@ -7352,11 +6619,11 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -printf "%s\n" "ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi # Response file support. @@ -7402,14 +6669,13 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -printf %s "checking for sysroot... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. -if test ${with_sysroot+y} -then : +if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; -else $as_nop +else with_sysroot=no fi @@ -7427,25 +6693,24 @@ case $with_sysroot in #( no|'') ;; #( *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -printf "%s\n" "$with_sysroot" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -printf "%s\n" "${lt_sysroot:-no}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -printf %s "checking for a working dd... " >&6; } -if test ${ac_cv_path_lt_DD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} @@ -7456,15 +6721,10 @@ if test -z "$lt_DD"; then for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in dd - do + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ @@ -7484,16 +6744,15 @@ fi rm -f conftest.i conftest2.i conftest.out fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -printf "%s\n" "$ac_cv_path_lt_DD" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -printf %s "checking how to truncate binary pipes... " >&6; } -if test ${lt_cv_truncate_bin+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= @@ -7504,8 +6763,8 @@ fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -printf "%s\n" "$lt_cv_truncate_bin" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } @@ -7528,8 +6787,7 @@ func_cc_basename () } # Check whether --enable-libtool-lock was given. -if test ${enable_libtool_lock+y} -then : +if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi @@ -7545,7 +6803,7 @@ ia64-*-hpux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) @@ -7565,7 +6823,7 @@ ia64-*-hpux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in @@ -7603,7 +6861,7 @@ mips64*-*linux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in @@ -7644,7 +6902,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) @@ -7707,12 +6965,11 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -printf %s "checking whether the C compiler needs -belf... " >&6; } -if test ${lt_cv_cc_needs_belf+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7723,20 +6980,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes -else $as_nop +else lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7745,8 +7001,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS @@ -7759,7 +7015,7 @@ printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) @@ -7796,12 +7052,11 @@ need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else @@ -7809,15 +7064,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7828,11 +7079,11 @@ fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -printf "%s\n" "$MANIFEST_TOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7841,12 +7092,11 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else @@ -7854,15 +7104,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7873,11 +7119,11 @@ fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then @@ -7885,8 +7131,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL @@ -7896,12 +7142,11 @@ else fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if test ${lt_cv_path_mainfest_tool+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out @@ -7911,8 +7156,8 @@ else $as_nop fi rm -f conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -7927,12 +7172,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else @@ -7940,15 +7184,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7959,11 +7199,11 @@ fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -printf "%s\n" "$DSYMUTIL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7972,12 +7212,11 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else @@ -7985,15 +7224,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8004,11 +7239,11 @@ fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then @@ -8016,8 +7251,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL @@ -8029,12 +7264,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else @@ -8042,15 +7276,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8061,11 +7291,11 @@ fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -printf "%s\n" "$NMEDIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8074,12 +7304,11 @@ if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else @@ -8087,15 +7316,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8106,11 +7331,11 @@ fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -printf "%s\n" "$ac_ct_NMEDIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then @@ -8118,8 +7343,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT @@ -8131,12 +7356,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_LIPO+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else @@ -8144,15 +7368,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8163,11 +7383,11 @@ fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -printf "%s\n" "$LIPO" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8176,12 +7396,11 @@ if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_LIPO+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else @@ -8189,15 +7408,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8208,11 +7423,11 @@ fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -printf "%s\n" "$ac_ct_LIPO" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then @@ -8220,8 +7435,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO @@ -8233,12 +7448,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else @@ -8246,15 +7460,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8265,11 +7475,11 @@ fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -printf "%s\n" "$OTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8278,12 +7488,11 @@ if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else @@ -8291,15 +7500,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8310,11 +7515,11 @@ fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -printf "%s\n" "$ac_ct_OTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then @@ -8322,8 +7527,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL @@ -8335,12 +7540,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else @@ -8348,15 +7552,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8367,11 +7567,11 @@ fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -printf "%s\n" "$OTOOL64" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8380,12 +7580,11 @@ if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else @@ -8393,15 +7592,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8412,11 +7607,11 @@ fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -printf "%s\n" "$ac_ct_OTOOL64" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then @@ -8424,8 +7619,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 @@ -8460,12 +7655,11 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -printf %s "checking for -single_module linker flag... " >&6; } -if test ${lt_cv_apple_cc_single_mod+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override @@ -8494,15 +7688,14 @@ else $as_nop rm -f conftest.* fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -printf %s "checking for -exported_symbols_list linker flag... " >&6; } -if test ${lt_cv_ld_exported_symbols_list+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym @@ -8511,33 +7704,31 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes -else $as_nop +else lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -printf %s "checking for -force_load linker flag... " >&6; } -if test ${lt_cv_ld_force_load+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} @@ -8565,8 +7756,8 @@ _LT_EOF rm -rf conftest.dSYM fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -printf "%s\n" "$lt_cv_ld_force_load" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; @@ -8637,43 +7828,286 @@ func_munge_path_list () esac } -ac_header= ac_cache= -for ac_item in $ac_header_c_list +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then +$as_echo "#define STDC_HEADERS 1" >>confdefs.h +fi +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : +done -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = xyes -then : - printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF fi +done + @@ -8689,8 +8123,7 @@ fi # Check whether --enable-shared was given. -if test ${enable_shared+y} -then : +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -8708,7 +8141,7 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop +else enable_shared=yes fi @@ -8721,8 +8154,7 @@ fi # Check whether --enable-static was given. -if test ${enable_static+y} -then : +if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -8740,7 +8172,7 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop +else enable_static=yes fi @@ -8754,8 +8186,7 @@ fi # Check whether --with-pic was given. -if test ${with_pic+y} -then : +if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; @@ -8772,7 +8203,7 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop +else pic_mode=default fi @@ -8784,8 +8215,7 @@ fi # Check whether --enable-fast-install was given. -if test ${enable_fast_install+y} -then : +if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -8803,7 +8233,7 @@ then : IFS=$lt_save_ifs ;; esac -else $as_nop +else enable_fast_install=yes fi @@ -8817,12 +8247,11 @@ fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -printf %s "checking which variant of shared library versioning to provide... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. -if test ${with_aix_soname+y} -then : +if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; @@ -8831,19 +8260,18 @@ then : ;; esac lt_cv_with_aix_soname=$with_aix_soname -else $as_nop - if test ${lt_cv_with_aix_soname+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -printf "%s\n" "$with_aix_soname" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', @@ -8925,12 +8353,11 @@ if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -printf %s "checking for objdir... " >&6; } -if test ${lt_cv_objdir+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then @@ -8941,15 +8368,17 @@ else fi rmdir .libs 2>/dev/null fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -printf "%s\n" "$lt_cv_objdir" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir -printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF @@ -8995,12 +8424,11 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -printf %s "checking for ${ac_tool_prefix}file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9049,11 +8477,11 @@ fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9062,12 +8490,11 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -printf %s "checking for file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9116,11 +8543,11 @@ fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9205,12 +8632,11 @@ if test yes = "$GCC"; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test ${lt_cv_prog_compiler_rtti_exceptions+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -9241,8 +8667,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -9599,28 +9025,26 @@ case $host_os in ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -9651,8 +9075,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in @@ -9680,12 +9104,11 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -9709,8 +9132,8 @@ else $as_nop LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : @@ -9724,12 +9147,11 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -9772,20 +9194,19 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -9828,8 +9249,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -9837,19 +9258,19 @@ printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -9861,8 +9282,8 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= @@ -10420,23 +9841,21 @@ _LT_EOF if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10451,7 +9870,7 @@ then : lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -10475,23 +9894,21 @@ fi if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10506,7 +9923,7 @@ then : lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -10757,12 +10174,11 @@ fi # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -printf %s "checking if $CC understands -b... " >&6; } -if test ${lt_cv_prog_compiler__b+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" @@ -10786,8 +10202,8 @@ else $as_nop LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -10827,30 +10243,28 @@ fi # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test ${lt_cv_irix_exported_symbol+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes -else $as_nop +else lt_cv_irix_exported_symbol=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi @@ -11131,8 +10545,8 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -printf "%s\n" "$ld_shlibs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -11168,19 +10582,18 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -11198,7 +10611,7 @@ else $as_nop if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no @@ -11212,8 +10625,8 @@ else $as_nop $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac @@ -11372,8 +10785,8 @@ esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in @@ -11934,10 +11347,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -11947,21 +11359,19 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -12205,8 +11615,8 @@ uts4*) dynamic_linker=no ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -12327,8 +11737,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || @@ -12352,8 +11762,8 @@ else # directories. hardcode_action=unsupported fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -printf "%s\n" "$hardcode_action" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then @@ -12397,12 +11807,11 @@ else darwin*) # if libdl is installed we need to link against it - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12411,31 +11820,32 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop +else lt_cv_dlopen=dyld lt_cv_dlopen_libs= @@ -12455,16 +11865,14 @@ fi *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes -then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -printf %s "checking for shl_load in -ldld... " >&6; } -if test ${ac_cv_lib_dld_shl_load+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12473,42 +11881,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char shl_load (); int -main (void) +main () { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes -else $as_nop +else ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else $as_nop +else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes -then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12517,37 +11924,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -printf %s "checking for dlopen in -lsvld... " >&6; } -if test ${ac_cv_lib_svld_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12556,37 +11963,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes -else $as_nop +else ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -printf %s "checking for dld_link in -ldld... " >&6; } -if test ${ac_cv_lib_dld_dld_link+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12595,29 +12002,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dld_link (); int -main (void) +main () { return dld_link (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes -else $as_nop +else ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -12656,12 +12064,11 @@ fi save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -printf %s "checking whether a program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else @@ -12740,7 +12147,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -12758,17 +12165,16 @@ rm -fr conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -printf "%s\n" "$lt_cv_dlopen_self" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -printf %s "checking whether a statically linked program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self_static+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else @@ -12847,7 +12253,7 @@ _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -12865,8 +12271,8 @@ rm -fr conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS @@ -12904,13 +12310,13 @@ fi striplib= old_striplib= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -printf %s "checking whether stripping libraries is possible... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in @@ -12918,16 +12324,16 @@ else if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; esac fi @@ -12944,13 +12350,13 @@ fi # Report what library types will actually be built - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -printf %s "checking if libtool supports shared libraries... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -printf "%s\n" "$can_build_shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -printf %s "checking whether to build shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -12974,15 +12380,15 @@ printf %s "checking whether to build shared libraries... " >&6; } fi ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -printf "%s\n" "$enable_shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -printf %s "checking whether to build static libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -printf "%s\n" "$enable_static" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } @@ -13030,12 +12436,11 @@ case $host in #( do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DEP_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DEP_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DEP_CC"; then ac_cv_prog_DEP_CC="$DEP_CC" # Let the user override the test. else @@ -13043,15 +12448,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DEP_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13062,11 +12463,11 @@ fi fi DEP_CC=$ac_cv_prog_DEP_CC if test -n "$DEP_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEP_CC" >&5 -printf "%s\n" "$DEP_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEP_CC" >&5 +$as_echo "$DEP_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -13079,12 +12480,11 @@ if test -z "$DEP_CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DEP_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DEP_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DEP_CC"; then ac_cv_prog_ac_ct_DEP_CC="$ac_ct_DEP_CC" # Let the user override the test. else @@ -13092,15 +12492,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DEP_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13111,11 +12507,11 @@ fi fi ac_ct_DEP_CC=$ac_cv_prog_ac_ct_DEP_CC if test -n "$ac_ct_DEP_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DEP_CC" >&5 -printf "%s\n" "$ac_ct_DEP_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DEP_CC" >&5 +$as_echo "$ac_ct_DEP_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -13127,8 +12523,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DEP_CC=$ac_ct_DEP_CC @@ -13141,24 +12537,21 @@ esac case $enable_dependency_generation in #( yes) : - if test "$DEP_CC" = "false" -then : + if test "$DEP_CC" = "false"; then : as_fn_error $? "The MSVC ports cannot generate dependency information. Install gcc (or another CC-like compiler)" "$LINENO" 5 -else $as_nop +else compute_deps=true fi ;; #( no) : compute_deps=false ;; #( *) : - if test -e .git -then : - if test "$DEP_CC" = "false" -then : + if test -e .git; then : + if test "$DEP_CC" = "false"; then : compute_deps=false -else $as_nop +else compute_deps=true fi -else $as_nop +else compute_deps=false fi ;; esac @@ -13174,10 +12567,9 @@ case $host in #( libext=lib AR="" - if test "$host_cpu" = "x86_64" -then : + if test "$host_cpu" = "x86_64" ; then : machine="-machine:AMD64 " -else $as_nop +else machine="" fi mklib="link -lib -nologo $machine /out:\$(1) \$(2)" @@ -13189,144 +12581,11 @@ fi esac ## Find vendor of the C compiler -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -printf %s "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test ${ac_cv_prog_CPP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -printf "%s\n" "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking C compiler vendor" >&5 -printf %s "checking C compiler vendor... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking C compiler vendor" >&5 +$as_echo_n "checking C compiler vendor... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13347,52 +12606,48 @@ unknown #endif _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - if test ${ocaml_cv_cc_vendor+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ac_fn_c_try_cpp "$LINENO"; then : + if ${ocaml_cv_cc_vendor+:} false; then : + $as_echo_n "(cached) " >&6 +else ocaml_cv_cc_vendor=`grep '^[a-z]' conftest.i | tr -s ' ' '-' \ | tr -d '\r'` fi -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "unexpected preprocessor failure See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.err conftest.i conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_cc_vendor" >&5 -printf "%s\n" "$ocaml_cv_cc_vendor" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_cc_vendor" >&5 +$as_echo "$ocaml_cv_cc_vendor" >&6; } ## In cross-compilation mode, can we run executables produced? # At the moment, it's required, but the fact is used in C99 function detection - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host executables can be run in the build" >&5 -printf %s "checking whether host executables can be run in the build... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host executables can be run in the build" >&5 +$as_echo_n "checking whether host executables can be run in the build... " >&6; } old_cross_compiling="$cross_compiling" cross_compiling='no' - if test "$cross_compiling" = yes -then : + if test "$cross_compiling" = yes; then : # autoconf displays a warning if this parameter is missing, but # cross-compilation mode was disabled above. assert=false -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) {return 0;} _ACEOF -if ac_fn_c_try_run "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } host_runnable=true -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } host_runnable=false fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -13445,18 +12700,15 @@ case $host in #( esac otherlibraries="dynlink" -if test x"$enable_unix_lib" != "xno" -then : +if test x"$enable_unix_lib" != "xno"; then : enable_unix_lib=yes - if test x"$enable_bigarray_lib" != "xno" -then : + if test x"$enable_bigarray_lib" != "xno"; then : otherlibraries="$otherlibraries $unixlib bigarray" -else $as_nop +else otherlibraries="$otherlibraries $unixlib" fi fi -if test x"$enable_str_lib" != "xno" -then : +if test x"$enable_str_lib" != "xno"; then : otherlibraries="$otherlibraries str" fi @@ -13464,12 +12716,11 @@ fi ## Test whether #! scripts are supported ## TODO: have two values, one for host and one for target -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5 -printf %s "checking whether #! works in shell scripts... " >&6; } -if test ${ac_cv_sys_interpreter+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5 +$as_echo_n "checking whether #! works in shell scripts... " >&6; } +if ${ac_cv_sys_interpreter+:} false; then : + $as_echo_n "(cached) " >&6 +else echo '#! /bin/cat exit 69 ' >conftest @@ -13482,46 +12733,42 @@ else fi rm -f conftest fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5 -printf "%s\n" "$ac_cv_sys_interpreter" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5 +$as_echo "$ac_cv_sys_interpreter" >&6; } interpval=$ac_cv_sys_interpreter long_shebang=false -if test "x$interpval" = "xyes" -then : +if test "x$interpval" = "xyes"; then : case $host in #( *-cygwin|*-*-mingw32|*-pc-windows) : shebangscripts=false ;; #( *) : shebangscripts=true prev_exec_prefix="$exec_prefix" - if test "x$exec_prefix" = "xNONE" -then : + if test "x$exec_prefix" = "xNONE"; then : exec_prefix="$prefix" fi eval "expanded_bindir=\"$bindir\"" exec_prefix="$prev_exec_prefix" # Assume maximum shebang is 128 chars; less #!, /ocamlrun, an optional # 1 char suffix and the \0 leaving 115 characters - if test "${#expanded_bindir}" -gt 115 -then : + if test "${#expanded_bindir}" -gt 115; then : long_shebang=true fi ;; esac -else $as_nop +else shebangscripts=false fi # Are we building a cross-compiler -if test x"$host" = x"$target" -then : +if test x"$host" = x"$target"; then : cross_compiler=false -else $as_nop +else cross_compiler=true fi @@ -13603,10 +12850,10 @@ esac ;; #( gcc-3-*|gcc-4-[01]) : # No -fwrapv option before GCC 3.4. # Known problems with -fwrapv fixed in 4.2 only. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This version of GCC is rather old. Reducing optimization level.\"" >&5 -printf "%s\n" "$as_me: WARNING: This version of GCC is rather old. Reducing optimization level.\"" >&2;}; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Consider using GCC version 4.2 or above." >&5 -printf "%s\n" "$as_me: WARNING: Consider using GCC version 4.2 or above." >&2;}; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This version of GCC is rather old. Reducing optimization level.\"" >&5 +$as_echo "$as_me: WARNING: This version of GCC is rather old. Reducing optimization level.\"" >&2;}; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Consider using GCC version 4.2 or above." >&5 +$as_echo "$as_me: WARNING: Consider using GCC version 4.2 or above." >&2;}; common_cflags="-std=gnu99 -O"; internal_cflags="$cc_warnings" ;; #( gcc-4-[234]) : @@ -13627,29 +12874,27 @@ printf "%s\n" "$as_me: WARNING: Consider using GCC version 4.2 or above." >&2;}; common_cppflags="-D_CRT_SECURE_NO_DEPRECATE" internal_cppflags='-DUNICODE -D_UNICODE' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports -d2VolatileMetadata-" >&5 -printf %s "checking whether the C compiler supports -d2VolatileMetadata-... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports -d2VolatileMetadata-" >&5 +$as_echo_n "checking whether the C compiler supports -d2VolatileMetadata-... " >&6; } saved_CFLAGS="$CFLAGS" CFLAGS="-d2VolatileMetadata- $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : cl_has_volatile_metadata=true - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else cl_has_volatile_metadata=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_CFLAGS" - if test "x$cl_has_volatile_metadata" = "xtrue" -then : + if test "x$cl_has_volatile_metadata" = "xtrue"; then : internal_cflags='-d2VolatileMetadata-' fi internal_cppflags="$internal_cppflags -DWINDOWS_UNICODE=" @@ -13695,8 +12940,7 @@ esac # [*-pc-windows], # [enable_shared=yes]) -if test x"$enable_shared" = "xno" -then : +if test x"$enable_shared" = "xno"; then : supports_shared_libraries=false case $host in #( *-pc-windows|*-w64-mingw32) : @@ -13704,7 +12948,7 @@ then : *) : ;; esac -else $as_nop +else supports_shared_libraries=true fi @@ -13734,66 +12978,58 @@ case $host in #( ;; esac -if test x"$supports_shared_libraries" != 'xfalse' -then : +if test x"$supports_shared_libraries" != 'xfalse'; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexdll sources" >&5 -printf %s "checking for flexdll sources... " >&6; } - if test x"$with_flexdll" = "xno" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexdll sources" >&5 +$as_echo_n "checking for flexdll sources... " >&6; } + if test x"$with_flexdll" = "xno"; then : flexdir='' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -printf "%s\n" "disabled" >&6; } -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } +else flexmsg='' case $target in #( *-*-cygwin*|*-w64-mingw32|*-pc-windows) : - if test x"$with_flexdll" = 'x' -o x"$with_flexdll" = 'xflexdll' -then : - if test -f 'flexdll/flexdll.h' -then : + if test x"$with_flexdll" = 'x' -o x"$with_flexdll" = 'xflexdll'; then : + if test -f 'flexdll/flexdll.h'; then : flexdir=flexdll iflexdir='$(ROOTDIR)/flexdll' with_flexdll="$iflexdir" -else $as_nop - if test x"$with_flexdll" != 'x' -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not available" >&5 -printf "%s\n" "requested but not available" >&6; } +else + if test x"$with_flexdll" != 'x'; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: requested but not available" >&5 +$as_echo "requested but not available" >&6; } as_fn_error $? "exiting" "$LINENO" 5 fi fi -else $as_nop +else rm -rf flexdll-sources - if test -f "$with_flexdll/flexdll.h" -then : + if test -f "$with_flexdll/flexdll.h"; then : mkdir -p flexdll-sources cp -r "$with_flexdll"/* flexdll-sources/ flexdir='flexdll-sources' iflexdir='$(ROOTDIR)/flexdll-sources' flexmsg=" (from $with_flexdll)" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not available" >&5 -printf "%s\n" "requested but not available" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: requested but not available" >&5 +$as_echo "requested but not available" >&6; } as_fn_error $? "exiting" "$LINENO" 5 fi fi - if test x"$flexdir" = 'x' -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $iflexdir$flexmsg" >&5 -printf "%s\n" "$iflexdir$flexmsg" >&6; } + if test x"$flexdir" = 'x'; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $iflexdir$flexmsg" >&5 +$as_echo "$iflexdir$flexmsg" >&6; } bootstrapping_flexdll=true # The submodule should be searched *before* any other -I paths internal_cppflags="-I $iflexdir $internal_cppflags" fi ;; #( *) : - if test x"$with_flexdll" != 'x' -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not supported" >&5 -printf "%s\n" "requested but not supported" >&6; } + if test x"$with_flexdll" != 'x'; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: requested but not supported" >&5 +$as_echo "requested but not supported" >&6; } as_fn_error $? "exiting" "$LINENO" 5 fi ;; esac @@ -13801,12 +13037,11 @@ fi # Extract the first word of "flexlink", so it can be a program name with args. set dummy flexlink; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_flexlink+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_flexlink+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$flexlink"; then ac_cv_prog_flexlink="$flexlink" # Let the user override the test. else @@ -13814,15 +13049,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_flexlink="flexlink" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13833,17 +13064,16 @@ fi fi flexlink=$ac_cv_prog_flexlink if test -n "$flexlink"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $flexlink" >&5 -printf "%s\n" "$flexlink" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flexlink" >&5 +$as_echo "$flexlink" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - if test -n "$flexlink" -a -z "$flexdir" -then : + if test -n "$flexlink" -a -z "$flexdir"; then : @@ -13859,15 +13089,14 @@ then : touch confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $flexlink works" >&5 -printf %s "checking whether $flexlink works... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $flexlink works" >&5 +$as_echo_n "checking whether $flexlink works... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int answer = 42; _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : # Create conftest1.$ac_objext as a symlink on Cygwin to ensure that native # flexlink can cope. The reverse test is unnecessary (a Cygwin-compiled # flexlink can read anything). @@ -13887,23 +13116,22 @@ esac /* end confdefs.h. */ int main() { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? "$flexlink does not work" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unexpected compile error" >&5 -printf "%s\n" "unexpected compile error" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unexpected compile error" >&5 +$as_echo "unexpected compile error" >&6; } as_fn_error $? "error calling the C compiler" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Restore the content of confdefs.h @@ -13920,8 +13148,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext case $host in #( *-w64-mingw32|*-pc-windows) : flexlink_where="$(cmd /c "$flexlink" -where 2>/dev/null)" - if test -z "$flexlink_where" -then : + if test -z "$flexlink_where"; then : as_fn_error $? "$flexlink is not executable from a native Win32 process" "$LINENO" 5 fi ;; #( @@ -13945,23 +13172,20 @@ fi touch confdefs.h - if test -n "$flexdir" -then : + if test -n "$flexdir"; then : CPPFLAGS="-I $flexdir $CPPFLAGS" fi have_flexdll_h=no - ac_fn_c_check_header_compile "$LINENO" "flexdll.h" "ac_cv_header_flexdll_h" "$ac_includes_default" -if test "x$ac_cv_header_flexdll_h" = xyes -then : + ac_fn_c_check_header_mongrel "$LINENO" "flexdll.h" "ac_cv_header_flexdll_h" "$ac_includes_default" +if test "x$ac_cv_header_flexdll_h" = xyes; then : have_flexdll_h=yes -else $as_nop +else have_flexdll_h=no fi - if test x"$have_flexdll_h" = 'xno' -then : - if test -n "$flexdir" -then : + + if test x"$have_flexdll_h" = 'xno'; then : + if test -n "$flexdir"; then : as_fn_error $? "$flexdir/flexdll.h appears unusable" "$LINENO" 5 fi fi @@ -13978,8 +13202,7 @@ fi - if test -n "$flexlink" -a x"$have_flexdll_h" = 'xno' -then : + if test -n "$flexlink" -a x"$have_flexdll_h" = 'xno'; then : saved_CC="$CC" @@ -13994,8 +13217,8 @@ then : touch confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if \"$flexlink -where\" includes flexdll.h" >&5 -printf %s "checking if \"$flexlink -where\" includes flexdll.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if \"$flexlink -where\" includes flexdll.h" >&5 +$as_echo_n "checking if \"$flexlink -where\" includes flexdll.h... " >&6; } flexlink_where="$($flexlink -where | tr -d '\r')" CPPFLAGS="$CPPFLAGS -I \"$flexlink_where\"" cat > conftest.c <<"EOF" @@ -14006,14 +13229,13 @@ EOF all: $CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS EOF - if make -f conftest.Makefile >/dev/null 2>/dev/null -then : + if make -f conftest.Makefile >/dev/null 2>/dev/null; then : have_flexdll_h=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -14027,8 +13249,7 @@ fi LIBS="$saved_LIBS" - if test "x$have_flexdll_h" = 'xyes' -then : + if test "x$have_flexdll_h" = 'xyes'; then : internal_cppflags="$internal_cppflags -I \"$flexlink_where\"" fi @@ -14039,8 +13260,8 @@ fi case $have_flexdll_h,$supports_shared_libraries,$host in #( no,true,*-*-cygwin*) : supports_shared_libraries=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: flexdll.h not found: shared library support disabled." >&5 -printf "%s\n" "$as_me: WARNING: flexdll.h not found: shared library support disabled." >&2;} ;; #( + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: flexdll.h not found: shared library support disabled." >&5 +$as_echo "$as_me: WARNING: flexdll.h not found: shared library support disabled." >&2;} ;; #( no,*,*-w64-mingw32|no,*,*-pc-windows) : as_fn_error $? "flexdll.h is required for native Win32" "$LINENO" 5 ;; #( *) : @@ -14050,8 +13271,8 @@ esac case $flexdir,$supports_shared_libraries,$flexlink,$host in #( ,true,,*-*-cygwin*) : supports_shared_libraries=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: flexlink not found: shared library support disabled." >&5 -printf "%s\n" "$as_me: WARNING: flexlink not found: shared library support disabled." >&2;} ;; #( + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: flexlink not found: shared library support disabled." >&5 +$as_echo "$as_me: WARNING: flexlink not found: shared library support disabled." >&2;} ;; #( ,*,,*-w64-mingw32|,*,,*-pc-windows) : as_fn_error $? "flexlink is required for native Win32" "$LINENO" 5 ;; #( *) : @@ -14061,17 +13282,16 @@ esac case $cc_basename,$host in #( *,*-*-darwin*) : mkexe="$mkexe -Wl,-no_compact_unwind"; - printf "%s\n" "#define HAS_ARCH_CODE32 1" >>confdefs.h + $as_echo "#define HAS_ARCH_CODE32 1" >>confdefs.h ;; #( *,*-*-haiku*) : mathlib="" ;; #( *,*-*-cygwin*) : common_cppflags="$common_cppflags -U_WIN32" - if $supports_shared_libraries -then : + if $supports_shared_libraries; then : mkexe='$(FLEXLINK) -exe $(if $(OC_LDFLAGS),-link "$(OC_LDFLAGS)")' mkexedebugflag="-link -g" -else $as_nop +else mkexe="$mkexe -Wl,--stack,16777216" oc_ldflags="-Wl,--stack,16777216" @@ -14097,12 +13317,12 @@ esac oc_ldflags='/ENTRY:wmainCRTStartup' mkexedebugflag='' ;; #( *,x86_64-*-linux*) : - printf "%s\n" "#define HAS_ARCH_CODE32 1" >>confdefs.h + $as_echo "#define HAS_ARCH_CODE32 1" >>confdefs.h ;; #( xlc*,powerpc-ibm-aix*) : mkexe="$mkexe " oc_ldflags="-brtl -bexpfull" - printf "%s\n" "#define HAS_ARCH_CODE32 1" >>confdefs.h + $as_echo "#define HAS_ARCH_CODE32 1" >>confdefs.h ;; #( gcc*,powerpc-*-linux*) : oc_ldflags="-mbss-plt" ;; #( @@ -14112,8 +13332,7 @@ esac ## Program to use to install files - - # Find a good install program. We prefer a C program (faster), +# Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install @@ -14127,25 +13346,20 @@ esac # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -printf %s "checking for a BSD-compatible install... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test ${ac_cv_path_install+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - # Account for fact that we put trailing slashes in our PATH walk. -case $as_dir in #(( - ./ | /[cC]/* | \ + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; @@ -14155,13 +13369,13 @@ case $as_dir in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && - grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && - grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else @@ -14169,12 +13383,12 @@ case $as_dir in #(( echo one > conftest.one echo two > conftest.two mkdir conftest.dir - if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then - ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -14190,7 +13404,7 @@ IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi - if test ${ac_cv_path_install+y}; then + if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a @@ -14200,8 +13414,8 @@ fi INSTALL=$ac_install_sh fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -printf "%s\n" "$INSTALL" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -14215,12 +13429,11 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Checks for libraries ## Mathematical library -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -printf %s "checking for cos in -lm... " >&6; } -if test ${ac_cv_lib_m_cos+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14229,97 +13442,102 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char cos (); int -main (void) +main () { return cos (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes -else $as_nop +else ac_cv_lib_m_cos=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -printf "%s\n" "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes -then : - printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF LIBS="-lm $LIBS" fi -if test "x$ac_cv_lib_m_cos" = xyes -then : +if test "x$ac_cv_lib_m_cos" = xyes ; then : mathlib="-lm" -else $as_nop +else mathlib="" fi # Checks for header files -ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default" -if test "x$ac_cv_header_math_h" = xyes -then : +ac_fn_c_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default" +if test "x$ac_cv_header_math_h" = xyes; then : fi - for ac_header in unistd.h + +for ac_header in unistd.h do : - ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" -if test "x$ac_cv_header_unistd_h" = xyes -then : - printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h - printf "%s\n" "#define HAS_UNISTD 1" >>confdefs.h + ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UNISTD_H 1 +_ACEOF + $as_echo "#define HAS_UNISTD 1" >>confdefs.h fi done -ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = xyes -then : - printf "%s\n" "#define HAS_STDINT_H 1" >>confdefs.h + +ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes; then : + $as_echo "#define HAS_STDINT_H 1" >>confdefs.h fi + ac_fn_c_check_header_compile "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "#include " -if test "x$ac_cv_header_dirent_h" = xyes -then : - printf "%s\n" "#define HAS_DIRENT 1" >>confdefs.h +if test "x$ac_cv_header_dirent_h" = xyes; then : + $as_echo "#define HAS_DIRENT 1" >>confdefs.h fi + ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "#include " -if test "x$ac_cv_header_sys_select_h" = xyes -then : - printf "%s\n" "#define HAS_SYS_SELECT_H 1" >>confdefs.h +if test "x$ac_cv_header_sys_select_h" = xyes; then : + $as_echo "#define HAS_SYS_SELECT_H 1" >>confdefs.h fi + # Checks for types ## off_t ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = xyes -then : +if test "x$ac_cv_type_off_t" = xyes; then : -else $as_nop +else -printf "%s\n" "#define off_t long int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF fi @@ -14332,19 +13550,17 @@ fi # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -printf %s "checking size of int... " >&6; } -if test ${ac_cv_sizeof_int+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if ${ac_cv_sizeof_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : + +else if test "$ac_cv_type_int" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else @@ -14353,31 +13569,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -printf "%s\n" "$ac_cv_sizeof_int" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } -printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -printf %s "checking size of long... " >&6; } -if test ${ac_cv_sizeof_long+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + +else if test "$ac_cv_type_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else @@ -14386,31 +13602,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -printf "%s\n" "$ac_cv_sizeof_long" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } -printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long *" >&5 -printf %s "checking size of long *... " >&6; } -if test ${ac_cv_sizeof_long_p+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long *))" "ac_cv_sizeof_long_p" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long *" >&5 +$as_echo_n "checking size of long *... " >&6; } +if ${ac_cv_sizeof_long_p+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long *))" "ac_cv_sizeof_long_p" "$ac_includes_default"; then : + +else if test "$ac_cv_type_long_p" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long *) See \`config.log' for more details" "$LINENO" 5; } else @@ -14419,31 +13635,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_p" >&5 -printf "%s\n" "$ac_cv_sizeof_long_p" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_p" >&5 +$as_echo "$ac_cv_sizeof_long_p" >&6; } -printf "%s\n" "#define SIZEOF_LONG_P $ac_cv_sizeof_long_p" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_P $ac_cv_sizeof_long_p +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 -printf %s "checking size of short... " >&6; } -if test ${ac_cv_sizeof_short+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if ${ac_cv_sizeof_short+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : + +else if test "$ac_cv_type_short" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) See \`config.log' for more details" "$LINENO" 5; } else @@ -14452,31 +13668,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 -printf "%s\n" "$ac_cv_sizeof_short" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } -printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 -printf %s "checking size of long long... " >&6; } -if test ${ac_cv_sizeof_long_long+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if ${ac_cv_sizeof_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : + +else if test "$ac_cv_type_long_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) See \`config.log' for more details" "$LINENO" 5; } else @@ -14485,56 +13701,57 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 -printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } -printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +_ACEOF -if test "x$ac_cv_sizeof_long_p" = "x4" -then : +if test "x$ac_cv_sizeof_long_p" = "x4" ; then : bits=32; arch64=false -elif test "x$ac_cv_sizeof_long_p" = "x8" -then : +elif test "x$ac_cv_sizeof_long_p" = "x8" ; then : bits=64; arch64=true - printf "%s\n" "#define ARCH_SIXTYFOUR 1" >>confdefs.h + $as_echo "#define ARCH_SIXTYFOUR 1" >>confdefs.h -else $as_nop +else as_fn_error $? "Neither 32 nor 64 bits architecture." "$LINENO" 5 fi if test "x$ac_cv_sizeof_int" != "x4" && test "x$ac_cv_sizeof_long" != "x4" \ - && test "x$ac_cv_sizeof_short" != "x4" -then : + && test "x$ac_cv_sizeof_short" != "x4"; then : as_fn_error $? "Sorry, we can't find a 32-bit integer type." "$LINENO" 5 fi if test "x$ac_cv_sizeof_long" != "x8" && - test "x$ac_cv_sizeof_long_long" != "x8" -then : + test "x$ac_cv_sizeof_long_long" != "x8"; then : as_fn_error $? "Sorry, we can't find a 64-bit integer type." "$LINENO" 5 fi -printf "%s\n" "#define SIZEOF_PTR $ac_cv_sizeof_long_p" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_PTR $ac_cv_sizeof_long_p +_ACEOF -printf "%s\n" "#define SIZEOF_LONGLONG $ac_cv_sizeof_long_long" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONGLONG $ac_cv_sizeof_long_long +_ACEOF -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Target is a $bits bits architecture" >&5 -printf "%s\n" "$as_me: Target is a $bits bits architecture" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: Target is a $bits bits architecture" >&5 +$as_echo "$as_me: Target is a $bits bits architecture" >&6;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -printf %s "checking whether byte ordering is bigendian... " >&6; } -if test ${ac_cv_c_bigendian+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14545,8 +13762,7 @@ else $as_nop typedef int dummy; _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. @@ -14570,7 +13786,7 @@ then : fi done fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14579,7 +13795,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #include int -main (void) +main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ @@ -14591,8 +13807,7 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14600,7 +13815,7 @@ then : #include int -main (void) +main () { #if BYTE_ORDER != BIG_ENDIAN not big endian @@ -14610,15 +13825,14 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes -else $as_nop +else ac_cv_c_bigendian=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). @@ -14627,7 +13841,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #include int -main (void) +main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros @@ -14637,15 +13851,14 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef _BIG_ENDIAN not big endian @@ -14655,33 +13868,31 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes -else $as_nop +else ac_cv_c_bigendian=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. - if test "$cross_compiling" = yes -then : + if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -unsigned short int ascii_mm[] = +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - unsigned short int ascii_ii[] = + short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } - unsigned short int ebcdic_ii[] = + short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - unsigned short int ebcdic_mm[] = + short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; @@ -14689,15 +13900,14 @@ unsigned short int ascii_mm[] = extern int foo; int -main (void) +main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi @@ -14710,13 +13920,13 @@ then : fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -else $as_nop +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main (void) +main () { /* Are we little or big endian? From Harbison&Steele. */ @@ -14732,10 +13942,9 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no -else $as_nop +else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -14744,12 +13953,12 @@ fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -printf "%s\n" "$ac_cv_c_bigendian" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) - printf "%s\n" "#define ARCH_BIG_ENDIAN 1" >>confdefs.h + $as_echo "#define ARCH_BIG_ENDIAN 1" >>confdefs.h endianness="be" ;; #( @@ -14766,20 +13975,21 @@ printf "%s\n" "$ac_cv_c_bigendian" >&6; } # The cast to long int works around a bug in the HP C Compiler, # see AC_CHECK_SIZEOF for more information. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5 -printf %s "checking alignment of double... " >&6; } -if test ${ac_cv_alignof_double+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5 +$as_echo_n "checking alignment of double... " >&6; } +if ${ac_cv_alignof_double+:} false; then : + $as_echo_n "(cached) " >&6 +else if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default -typedef struct { char x; double y; } ac__type_alignof_;" -then : +#ifndef offsetof +# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0) +#endif +typedef struct { char x; double y; } ac__type_alignof_;"; then : -else $as_nop +else if test "$ac_cv_type_double" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute alignment of double See \`config.log' for more details" "$LINENO" 5; } else @@ -14788,30 +13998,33 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5 -printf "%s\n" "$ac_cv_alignof_double" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5 +$as_echo "$ac_cv_alignof_double" >&6; } -printf "%s\n" "#define ALIGNOF_DOUBLE $ac_cv_alignof_double" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ALIGNOF_DOUBLE $ac_cv_alignof_double +_ACEOF # The cast to long int works around a bug in the HP C Compiler, # see AC_CHECK_SIZEOF for more information. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5 -printf %s "checking alignment of long... " >&6; } -if test ${ac_cv_alignof_long+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5 +$as_echo_n "checking alignment of long... " >&6; } +if ${ac_cv_alignof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default -typedef struct { char x; long y; } ac__type_alignof_;" -then : +#ifndef offsetof +# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0) +#endif +typedef struct { char x; long y; } ac__type_alignof_;"; then : -else $as_nop +else if test "$ac_cv_type_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute alignment of long See \`config.log' for more details" "$LINENO" 5; } else @@ -14820,30 +14033,33 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5 -printf "%s\n" "$ac_cv_alignof_long" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5 +$as_echo "$ac_cv_alignof_long" >&6; } -printf "%s\n" "#define ALIGNOF_LONG $ac_cv_alignof_long" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ALIGNOF_LONG $ac_cv_alignof_long +_ACEOF # The cast to long int works around a bug in the HP C Compiler, # see AC_CHECK_SIZEOF for more information. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of long long" >&5 -printf %s "checking alignment of long long... " >&6; } -if test ${ac_cv_alignof_long_long+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long" >&5 +$as_echo_n "checking alignment of long long... " >&6; } +if ${ac_cv_alignof_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long" "$ac_includes_default -typedef struct { char x; long long y; } ac__type_alignof_;" -then : +#ifndef offsetof +# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0) +#endif +typedef struct { char x; long long y; } ac__type_alignof_;"; then : -else $as_nop +else if test "$ac_cv_type_long_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute alignment of long long See \`config.log' for more details" "$LINENO" 5; } else @@ -14852,36 +14068,34 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long" >&5 -printf "%s\n" "$ac_cv_alignof_long_long" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long" >&5 +$as_echo "$ac_cv_alignof_long_long" >&6; } -printf "%s\n" "#define ALIGNOF_LONG_LONG $ac_cv_alignof_long_long" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ALIGNOF_LONG_LONG $ac_cv_alignof_long_long +_ACEOF -if ! $arch64 -then : +if ! $arch64; then : case $target_cpu in #( i686) : ;; #( *) : - if test "$ac_cv_alignof_double" -gt 4 -then : - printf "%s\n" "#define ARCH_ALIGN_DOUBLE 1" >>confdefs.h + if test "$ac_cv_alignof_double" -gt 4; then : + $as_echo "#define ARCH_ALIGN_DOUBLE 1" >>confdefs.h fi if test "x$ac_cv_sizeof_long" = "x8" && - test "$ac_cv_alignof_long" -gt 4 -then : - printf "%s\n" "#define ARCH_ALIGN_INT64 1" >>confdefs.h + test "$ac_cv_alignof_long" -gt 4; then : + $as_echo "#define ARCH_ALIGN_INT64 1" >>confdefs.h -else $as_nop +else if test "x$ac_cv_sizeof_long_long" = "x8" && - test "$ac_cv_alignof_long_long" -gt 4 -then : - printf "%s\n" "#define ARCH_ALIGN_INT64 1" >>confdefs.h + test "$ac_cv_alignof_long_long" -gt 4; then : + $as_echo "#define ARCH_ALIGN_INT64 1" >>confdefs.h fi fi @@ -14897,8 +14111,7 @@ rpath='' mksharedlibrpath='' natdynlinkopts="" -if test x"$enable_shared" != "xno" -then : +if test x"$enable_shared" != "xno"; then : case $host in #( *-apple-darwin*) : mksharedlib="$CC -shared \ @@ -14908,8 +14121,7 @@ then : *-*-mingw32) : mksharedlib='$(FLEXLINK)' mkmaindll='$(FLEXLINK) -maindll' - if test -n "$oc_dll_ldflags" -then : + if test -n "$oc_dll_ldflags"; then : mksharedlib="$mksharedlib -link \"$oc_dll_ldflags\"" mkmaindll="$mkmaindll -link \"$oc_dll_ldflags\"" @@ -14957,8 +14169,7 @@ esac esac fi -if test -z "$mkmaindll" -then : +if test -z "$mkmaindll"; then : mkmaindll=$mksharedlib fi @@ -14966,8 +14177,7 @@ fi natdynlink=false -if test x"$supports_shared_libraries" = 'xtrue' -then : +if test x"$supports_shared_libraries" = 'xtrue'; then : case "$host" in #( *-*-cygwin*) : natdynlink=true ;; #( @@ -15047,29 +14257,27 @@ esac case "$cc_basename,$host" in #( *gcc*,x86_64-*|*gcc*,i686-*) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports -fno-tree-vrp" >&5 -printf %s "checking whether the C compiler supports -fno-tree-vrp... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports -fno-tree-vrp" >&5 +$as_echo_n "checking whether the C compiler supports -fno-tree-vrp... " >&6; } saved_CFLAGS="$CFLAGS" CFLAGS="-Werror -fno-tree-vrp $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : cc_has_fno_tree_vrp=true - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else cc_has_fno_tree_vrp=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_CFLAGS" - if $cc_has_fno_tree_vrp -then : + if $cc_has_fno_tree_vrp; then : internal_cflags="$internal_cflags -fno-tree-vrp" fi ;; #( *) : @@ -15077,28 +14285,27 @@ fi ;; #( esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports __attribute__((aligned(n)))" >&5 -printf %s "checking whether the C compiler supports __attribute__((aligned(n)))... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports __attribute__((aligned(n)))" >&5 +$as_echo_n "checking whether the C compiler supports __attribute__((aligned(n)))... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef struct {__attribute__((aligned(8))) int t;} t; _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - printf "%s\n" "#define SUPPORTS_ALIGNED_ATTRIBUTE 1" >>confdefs.h +if ac_fn_c_try_compile "$LINENO"; then : + $as_echo "#define SUPPORTS_ALIGNED_ATTRIBUTE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ## Check whether __attribute__((optimize("tree-vectorize")))) is supported - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports __attribute__((optimize(\"tree-vectorize\")))" >&5 -printf %s "checking whether the C compiler supports __attribute__((optimize(\"tree-vectorize\")))... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports __attribute__((optimize(\"tree-vectorize\")))" >&5 +$as_echo_n "checking whether the C compiler supports __attribute__((optimize(\"tree-vectorize\")))... " >&6; } saved_CFLAGS="$CFLAGS" CFLAGS="-Werror $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15108,17 +14315,16 @@ printf %s "checking whether the C compiler supports __attribute__((optimize(\"tr int main() { f(); return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - printf "%s\n" "#define SUPPORTS_TREE_VECTORIZE 1" >>confdefs.h +if ac_fn_c_try_compile "$LINENO"; then : + $as_echo "#define SUPPORTS_TREE_VECTORIZE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_CFLAGS" @@ -15148,10 +14354,9 @@ case $host in #( powerpc64le*-*-linux*) : arch=power; model=ppc64le; system=elf ;; #( powerpc*-*-linux*) : - arch=power; if $arch64 -then : + arch=power; if $arch64; then : model=ppc64 -else $as_nop +else model=ppc fi; system=elf ;; #( s390x*-*-linux*) : @@ -15228,39 +14433,37 @@ fi; system=elf ;; #( ;; esac -if test x"$enable_native_compiler" = "xno" -then : +if test x"$enable_native_compiler" = "xno"; then : native_compiler=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: the native compiler is disabled" >&5 -printf "%s\n" "$as_me: the native compiler is disabled" >&6;} -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: the native compiler is disabled" >&5 +$as_echo "$as_me: the native compiler is disabled" >&6;} +else native_compiler=true fi -if ! $native_compiler -then : +if ! $native_compiler; then : natdynlink=false fi -if $natdynlink -then : +if $natdynlink; then : cmxs="cmxs" -else $as_nop +else cmxs="cmx" fi -printf "%s\n" "#define OCAML_OS_TYPE \"$ostype\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define OCAML_OS_TYPE "$ostype" +_ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. set dummy ${ac_tool_prefix}ld; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DIRECT_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DIRECT_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DIRECT_LD"; then ac_cv_prog_DIRECT_LD="$DIRECT_LD" # Let the user override the test. else @@ -15268,15 +14471,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DIRECT_LD="${ac_tool_prefix}ld" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -15287,11 +14486,11 @@ fi fi DIRECT_LD=$ac_cv_prog_DIRECT_LD if test -n "$DIRECT_LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DIRECT_LD" >&5 -printf "%s\n" "$DIRECT_LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRECT_LD" >&5 +$as_echo "$DIRECT_LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -15300,12 +14499,11 @@ if test -z "$ac_cv_prog_DIRECT_LD"; then ac_ct_DIRECT_LD=$DIRECT_LD # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DIRECT_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DIRECT_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DIRECT_LD"; then ac_cv_prog_ac_ct_DIRECT_LD="$ac_ct_DIRECT_LD" # Let the user override the test. else @@ -15313,15 +14511,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DIRECT_LD="ld" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -15332,11 +14526,11 @@ fi fi ac_ct_DIRECT_LD=$ac_cv_prog_ac_ct_DIRECT_LD if test -n "$ac_ct_DIRECT_LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DIRECT_LD" >&5 -printf "%s\n" "$ac_ct_DIRECT_LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DIRECT_LD" >&5 +$as_echo "$ac_ct_DIRECT_LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_DIRECT_LD" = x; then @@ -15344,8 +14538,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DIRECT_LD=$ac_ct_DIRECT_LD @@ -15354,8 +14548,7 @@ else DIRECT_LD="$ac_cv_prog_DIRECT_LD" fi -if test -z "$PARTIALLD" -then : +if test -z "$PARTIALLD"; then : case "$arch,$cc_basename,$system,$model" in #( amd64,*gcc*,macosx,*) : PACKLD_FLAGS=' -arch x86_64' ;; #( @@ -15372,15 +14565,14 @@ esac # output filename. Don't assume that all C compilers understand GNU -ofoo # form, so ensure that the definition includes a space at the end (which is # achieved using the $(EMPTY) expansion trick). - if test x"$cc_basename" = "xcl" -then : + if test x"$cc_basename" = "xcl"; then : # For the Microsoft C compiler there must be no space at the end of the # string. PACKLD="link -lib -nologo $machine -out:" -else $as_nop +else PACKLD="$DIRECT_LD -r$PACKLD_FLAGS -o \$(EMPTY)" fi -else $as_nop +else PACKLD="$PARTIALLD -o \$(EMPTY)" fi @@ -15417,12 +14609,11 @@ esac intel_jcc_bug_cflags='' case $arch in #( amd64) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wa,-mbranches-within-32B-boundaries" >&5 -printf %s "checking whether C compiler accepts -Wa,-mbranches-within-32B-boundaries... " >&6; } -if test ${ax_cv_check_cflags___Wa__mbranches_within_32B_boundaries+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wa,-mbranches-within-32B-boundaries" >&5 +$as_echo_n "checking whether C compiler accepts -Wa,-mbranches-within-32B-boundaries... " >&6; } +if ${ax_cv_check_cflags___Wa__mbranches_within_32B_boundaries+:} false; then : + $as_echo_n "(cached) " >&6 +else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -Wa,-mbranches-within-32B-boundaries" @@ -15430,28 +14621,26 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___Wa__mbranches_within_32B_boundaries=yes -else $as_nop +else ax_cv_check_cflags___Wa__mbranches_within_32B_boundaries=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wa__mbranches_within_32B_boundaries" >&5 -printf "%s\n" "$ax_cv_check_cflags___Wa__mbranches_within_32B_boundaries" >&6; } -if test "x$ax_cv_check_cflags___Wa__mbranches_within_32B_boundaries" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wa__mbranches_within_32B_boundaries" >&5 +$as_echo "$ax_cv_check_cflags___Wa__mbranches_within_32B_boundaries" >&6; } +if test "x$ax_cv_check_cflags___Wa__mbranches_within_32B_boundaries" = xyes; then : intel_jcc_bug_cflags=-Wa,-mbranches-within-32B-boundaries -else $as_nop +else : fi ;; #( @@ -15461,18 +14650,16 @@ esac # Assembler -if test -n "$target_alias" -then : +if test -n "$target_alias"; then : toolpref="${target_alias}-" as_target="$target" as_cpu="$target_cpu" -else $as_nop - if test -n "$host_alias" -then : +else + if test -n "$host_alias"; then : toolpref="${host_alias}-" as_target="$host" as_cpu="$host_cpu" -else $as_nop +else toolpref="" as_target="$build" as_cpu="$build_cpu" @@ -15513,36 +14700,32 @@ esac ;; #( ;; esac -if test "$with_pic" -then : +if test "$with_pic"; then : fpic=true - printf "%s\n" "#define CAML_WITH_FPIC 1" >>confdefs.h + $as_echo "#define CAML_WITH_FPIC 1" >>confdefs.h internal_cflags="$internal_cflags $sharedlib_cflags" default_aspp="$default_aspp $sharedlib_cflags" -else $as_nop +else fpic=false fi -if test -z "$AS" -then : +if test -z "$AS"; then : AS="$default_as" fi -if test -z "$ASPP" -then : +if test -z "$ASPP"; then : ASPP="$default_aspp" fi # Utilities # Extract the first word of "rlwrap", so it can be a program name with args. set dummy rlwrap; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_rlwrap+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_rlwrap+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$rlwrap"; then ac_cv_prog_rlwrap="$rlwrap" # Let the user override the test. else @@ -15550,15 +14733,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_rlwrap="rlwrap" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -15569,18 +14748,18 @@ fi fi rlwrap=$ac_cv_prog_rlwrap if test -n "$rlwrap"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rlwrap" >&5 -printf "%s\n" "$rlwrap" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rlwrap" >&5 +$as_echo "$rlwrap" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi case $rlwrap,$system in #( rlwrap,win*|rlwrap,mingw*) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: rlwrap doesn't work with native win32 - disabling" >&5 -printf "%s\n" "$as_me: rlwrap doesn't work with native win32 - disabling" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: rlwrap doesn't work with native win32 - disabling" >&5 +$as_echo "$as_me: rlwrap doesn't work with native win32 - disabling" >&6;} rlwrap='' ;; #( *) : ;; @@ -15590,33 +14769,30 @@ esac ## Check the semantics of signal handlers - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking semantics of signal handlers" >&5 -printf "%s\n" "$as_me: checking semantics of signal handlers" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking semantics of signal handlers" >&5 +$as_echo "$as_me: checking semantics of signal handlers" >&6;} ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction" -if test "x$ac_cv_func_sigaction" = xyes -then : +if test "x$ac_cv_func_sigaction" = xyes; then : has_sigaction=true -else $as_nop +else has_sigaction=false fi ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" -if test "x$ac_cv_func_sigprocmask" = xyes -then : +if test "x$ac_cv_func_sigprocmask" = xyes; then : has_sigprocmask=true -else $as_nop +else has_sigprocmask=false fi - if $has_sigaction && $has_sigprocmask -then : - printf "%s\n" "#define POSIX_SIGNALS 1" >>confdefs.h + if $has_sigaction && $has_sigprocmask; then : + $as_echo "#define POSIX_SIGNALS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: POSIX signal handling found." >&5 -printf "%s\n" "$as_me: POSIX signal handling found." >&6;} -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: assuming signals have the System V semantics." >&5 -printf "%s\n" "$as_me: assuming signals have the System V semantics." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: POSIX signal handling found." >&5 +$as_echo "$as_me: POSIX signal handling found." >&6;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: assuming signals have the System V semantics." >&5 +$as_echo "$as_me: assuming signals have the System V semantics." >&6;} fi @@ -15625,50 +14801,45 @@ fi ## Check for C99 float ops has_c99_float_ops=true - - for ac_func in expm1 log1p hypot fma exp2 log2 cbrt acosh asinh atanh erf erfc trunc round copysign +for ac_func in expm1 log1p hypot fma exp2 log2 cbrt acosh asinh atanh erf erfc trunc round copysign do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes" -then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -else $as_nop +else has_c99_float_ops=false fi - done -if $has_c99_float_ops -then : - printf "%s\n" "#define HAS_C99_FLOAT_OPS 1" >>confdefs.h + +if $has_c99_float_ops; then : + $as_echo "#define HAS_C99_FLOAT_OPS 1" >>confdefs.h # Check whether round works (known bug in mingw-w64) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether round works" >&5 -printf %s "checking whether round works... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether round works" >&5 +$as_echo_n "checking whether round works... " >&6; } old_cross_compiling="$cross_compiling" - if test "x$host_runnable" = 'xtrue' -then : + if test "x$host_runnable" = 'xtrue'; then : cross_compiling='no' fi - if test "$cross_compiling" = yes -then : + if test "$cross_compiling" = yes; then : case $target in #( x86_64-w64-mingw32) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume not" >&5 -printf "%s\n" "cross-compiling; assume not" >&6; } ;; #( + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume not" >&5 +$as_echo "cross-compiling; assume not" >&6; } ;; #( *) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume yes" >&5 -printf "%s\n" "cross-compiling; assume yes" >&6; } - printf "%s\n" "#define HAS_WORKING_ROUND 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume yes" >&5 +$as_echo "cross-compiling; assume yes" >&6; } + $as_echo "#define HAS_WORKING_ROUND 1" >>confdefs.h ;; esac -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15679,15 +14850,14 @@ int main (void) { } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - printf "%s\n" "#define HAS_WORKING_ROUND 1" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAS_WORKING_ROUND 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } case $enable_imprecise_c99_float_ops,$target in #( no,*) : hard_error=true ;; #( @@ -15698,12 +14868,11 @@ printf "%s\n" "no" >&6; } *) : hard_error=true ;; esac - if test x"$hard_error" = "xtrue" -then : + if test x"$hard_error" = "xtrue"; then : as_fn_error $? "round does not work, enable emulation with --enable-imprecise-c99-float-ops" "$LINENO" 5 -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: round does not work; emulation enabled" >&5 -printf "%s\n" "$as_me: WARNING: round does not work; emulation enabled" >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: round does not work; emulation enabled" >&5 +$as_echo "$as_me: WARNING: round does not work; emulation enabled" >&2;} fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -15716,27 +14885,25 @@ fi # Check whether fma works (regressed in mingw-w64 8.0.0; present, but broken, # in VS2013-2017 and present but unimplemented in Cygwin64) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fma works" >&5 -printf %s "checking whether fma works... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fma works" >&5 +$as_echo_n "checking whether fma works... " >&6; } old_cross_compiling="$cross_compiling" - if test "x$host_runnable" = 'xtrue' -then : + if test "x$host_runnable" = 'xtrue'; then : cross_compiling='no' fi - if test "$cross_compiling" = yes -then : + if test "$cross_compiling" = yes; then : case $target in #( x86_64-w64-mingw32|x86_64-*-cygwin*) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume not" >&5 -printf "%s\n" "cross-compiling; assume not" >&6; } ;; #( + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume not" >&5 +$as_echo "cross-compiling; assume not" >&6; } ;; #( *) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume yes" >&5 -printf "%s\n" "cross-compiling; assume yes" >&6; } - printf "%s\n" "#define HAS_WORKING_FMA 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume yes" >&5 +$as_echo "cross-compiling; assume yes" >&6; } + $as_echo "#define HAS_WORKING_FMA 1" >>confdefs.h ;; esac -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15769,15 +14936,14 @@ int main (void) { } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - printf "%s\n" "#define HAS_WORKING_FMA 1" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAS_WORKING_FMA 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } case $enable_imprecise_c99_float_ops,$target in #( no,*) : hard_error=true ;; #( @@ -15788,22 +14954,20 @@ printf "%s\n" "no" >&6; } *) : case $ocaml_cv_cc_vendor in #( msvc-*) : - if test "${ocaml_cv_cc_vendor#msvc-}" -lt 1920 -then : + if test "${ocaml_cv_cc_vendor#msvc-}" -lt 1920 ; then : hard_error=false -else $as_nop +else hard_error=true fi ;; #( *) : hard_error=true ;; esac ;; esac - if test x"$hard_error" = "xtrue" -then : + if test x"$hard_error" = "xtrue"; then : as_fn_error $? "fma does not work, enable emulation with --enable-imprecise-c99-float-ops" "$LINENO" 5 -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: fma does not work; emulation enabled" >&5 -printf "%s\n" "$as_me: WARNING: fma does not work; emulation enabled" >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fma does not work; emulation enabled" >&5 +$as_echo "$as_me: WARNING: fma does not work; emulation enabled" >&2;} fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -15813,46 +14977,41 @@ fi cross_compiling="$old_cross_compiling" -else $as_nop - if test x"$enable_imprecise_c99_float_ops" != "xyes" -then : +else + if test x"$enable_imprecise_c99_float_ops" != "xyes" ; then : case $enable_imprecise_c99_float_ops,$ocaml_cv_cc_vendor in #( no,*) : hard_error=true ;; #( ,msvc-*) : - if test "${ocaml_cv_cc_vendor#msvc-}" -lt 1800 -then : + if test "${ocaml_cv_cc_vendor#msvc-}" -lt 1800 ; then : hard_error=false -else $as_nop +else hard_error=true fi ;; #( *) : hard_error=true ;; esac - if test x"$hard_error" = 'xtrue' -then : + if test x"$hard_error" = 'xtrue'; then : as_fn_error $? "C99 float ops unavailable, enable replacements with --enable-imprecise-c99-float-ops" "$LINENO" 5 -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: C99 float ops unavailable, replacements enabled (ancient Visual Studio)" >&5 -printf "%s\n" "$as_me: WARNING: C99 float ops unavailable, replacements enabled (ancient Visual Studio)" >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C99 float ops unavailable, replacements enabled (ancient Visual Studio)" >&5 +$as_echo "$as_me: WARNING: C99 float ops unavailable, replacements enabled (ancient Visual Studio)" >&2;} fi fi fi ## getrusage ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage" -if test "x$ac_cv_func_getrusage" = xyes -then : - printf "%s\n" "#define HAS_GETRUSAGE 1" >>confdefs.h +if test "x$ac_cv_func_getrusage" = xyes; then : + $as_echo "#define HAS_GETRUSAGE 1" >>confdefs.h fi ## times ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times" -if test "x$ac_cv_func_times" = xyes -then : - printf "%s\n" "#define HAS_TIMES 1" >>confdefs.h +if test "x$ac_cv_func_times" = xyes; then : + $as_echo "#define HAS_TIMES 1" >>confdefs.h fi @@ -15863,15 +15022,13 @@ saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" ac_fn_c_check_func "$LINENO" "secure_getenv" "ac_cv_func_secure_getenv" -if test "x$ac_cv_func_secure_getenv" = xyes -then : - printf "%s\n" "#define HAS_SECURE_GETENV 1" >>confdefs.h +if test "x$ac_cv_func_secure_getenv" = xyes; then : + $as_echo "#define HAS_SECURE_GETENV 1" >>confdefs.h -else $as_nop +else ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv" -if test "x$ac_cv_func___secure_getenv" = xyes -then : - printf "%s\n" "#define HAS___SECURE_GETENV 1" >>confdefs.h +if test "x$ac_cv_func___secure_getenv" = xyes; then : + $as_echo "#define HAS___SECURE_GETENV 1" >>confdefs.h fi @@ -15883,9 +15040,8 @@ CPPFLAGS="$saved_CPPFLAGS" ## issetugid ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid" -if test "x$ac_cv_func_issetugid" = xyes -then : - printf "%s\n" "#define HAS_ISSETUGID 1" >>confdefs.h +if test "x$ac_cv_func_issetugid" = xyes; then : + $as_echo "#define HAS_ISSETUGID 1" >>confdefs.h fi @@ -15902,26 +15058,24 @@ case $host in #( has_monotonic_clock=true ;; #( *-apple-darwin*) : - - for ac_func in mach_timebase_info mach_absolute_time + for ac_func in mach_timebase_info mach_absolute_time do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes" -then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF has_monotonic_clock=true - printf "%s\n" "#define HAS_MACH_ABSOLUTE_TIME 1" >>confdefs.h + $as_echo "#define HAS_MACH_ABSOLUTE_TIME 1" >>confdefs.h -else $as_nop +else has_monotonic_clock=false fi - -done ;; #( +done + ;; #( *) : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15938,17 +15092,16 @@ done ;; #( } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : has_monotonic_clock=true - printf "%s\n" "#define HAS_POSIX_MONOTONIC_CLOCK 1" >>confdefs.h + $as_echo "#define HAS_POSIX_MONOTONIC_CLOCK 1" >>confdefs.h -else $as_nop +else has_monotonic_clock=false fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac @@ -15957,8 +15110,7 @@ esac # if the proper clock source is found. # If asked via --enable-instrumented-runtime, configuration fails if the proper # clock source is missing. -if test "x$enable_instrumented_runtime" != "xno" -then : +if test "x$enable_instrumented_runtime" != "xno" ; then : case $host in #( sparc-sun-solaris*) : @@ -15982,12 +15134,11 @@ but no proper monotonic clock source was found." "$LINENO" 5 ;; esac ;; #( *) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 -printf %s "checking for library containing clock_gettime... " >&6; } -if test ${ac_cv_search_clock_gettime+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 +$as_echo_n "checking for library containing clock_gettime... " >&6; } +if ${ac_cv_search_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15995,51 +15146,49 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char clock_gettime (); int -main (void) +main () { return clock_gettime (); ; return 0; } _ACEOF -for ac_lib in '' rt -do +for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_clock_gettime+y} -then : + if ${ac_cv_search_clock_gettime+:} false; then : break fi done -if test ${ac_cv_search_clock_gettime+y} -then : +if ${ac_cv_search_clock_gettime+:} false; then : -else $as_nop +else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 -printf "%s\n" "$ac_cv_search_clock_gettime" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 +$as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_clock_gettime=true -else $as_nop +else has_clock_gettime=false fi @@ -16051,10 +15200,9 @@ fi *,true,true) : instrumented_runtime=true - if test "x$ac_cv_search_clock_gettime" = "xnone required" -then : + if test "x$ac_cv_search_clock_gettime" = "xnone required"; then : instrumented_runtime_libs="" -else $as_nop +else instrumented_runtime_libs=$ac_cv_search_clock_gettime fi @@ -16087,12 +15235,11 @@ sockets=true case $host in #( *-*-mingw32|*-pc-windows) : cclibs="$cclibs -lws2_32" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 -printf %s "checking for library containing socket... " >&6; } -if test ${ac_cv_search_socket+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } +if ${ac_cv_search_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16100,67 +15247,63 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char socket (); int -main (void) +main () { return socket (); ; return 0; } _ACEOF -for ac_lib in '' ws2_32 -do +for ac_lib in '' ws2_32; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_socket+y} -then : + if ${ac_cv_search_socket+:} false; then : break fi done -if test ${ac_cv_search_socket+y} -then : +if ${ac_cv_search_socket+:} false; then : -else $as_nop +else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 -printf "%s\n" "$ac_cv_search_socket" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair" -if test "x$ac_cv_func_socketpair" = xyes -then : - printf "%s\n" "#define HAS_SOCKETPAIR 1" >>confdefs.h +if test "x$ac_cv_func_socketpair" = xyes; then : + $as_echo "#define HAS_SOCKETPAIR 1" >>confdefs.h fi ;; #( *-*-haiku) : cclibs="$cclibs -lnetwork" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 -printf %s "checking for library containing socket... " >&6; } -if test ${ac_cv_search_socket+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } +if ${ac_cv_search_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16168,60 +15311,57 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char socket (); int -main (void) +main () { return socket (); ; return 0; } _ACEOF -for ac_lib in '' network -do +for ac_lib in '' network; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_socket+y} -then : + if ${ac_cv_search_socket+:} false; then : break fi done -if test ${ac_cv_search_socket+y} -then : +if ${ac_cv_search_socket+:} false; then : -else $as_nop +else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 -printf "%s\n" "$ac_cv_search_socket" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi ;; #( *-*-solaris*) : cclibs="$cclibs -lsocket -lnsl" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 -printf %s "checking for library containing socket... " >&6; } -if test ${ac_cv_search_socket+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } +if ${ac_cv_search_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16229,58 +15369,55 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char socket (); int -main (void) +main () { return socket (); ; return 0; } _ACEOF -for ac_lib in '' socket -do +for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_socket+y} -then : + if ${ac_cv_search_socket+:} false; then : break fi done -if test ${ac_cv_search_socket+y} -then : +if ${ac_cv_search_socket+:} false; then : -else $as_nop +else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 -printf "%s\n" "$ac_cv_search_socket" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5 -printf %s "checking for library containing inet_ntop... " >&6; } -if test ${ac_cv_search_inet_ntop+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5 +$as_echo_n "checking for library containing inet_ntop... " >&6; } +if ${ac_cv_search_inet_ntop+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16288,77 +15425,72 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char inet_ntop (); int -main (void) +main () { return inet_ntop (); ; return 0; } _ACEOF -for ac_lib in '' nsl -do +for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_inet_ntop=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_inet_ntop+y} -then : + if ${ac_cv_search_inet_ntop+:} false; then : break fi done -if test ${ac_cv_search_inet_ntop+y} -then : +if ${ac_cv_search_inet_ntop+:} false; then : -else $as_nop +else ac_cv_search_inet_ntop=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5 -printf "%s\n" "$ac_cv_search_inet_ntop" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5 +$as_echo "$ac_cv_search_inet_ntop" >&6; } ac_res=$ac_cv_search_inet_ntop -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi ;; #( *) : - - for ac_func in socket socketpair bind listen accept connect + for ac_func in socket socketpair bind listen accept connect do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes" -then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -else $as_nop +else sockets=false fi - done + ;; esac -if $sockets -then : - printf "%s\n" "#define HAS_SOCKETS 1" >>confdefs.h +if $sockets; then : + $as_echo "#define HAS_SOCKETS 1" >>confdefs.h fi @@ -16368,27 +15500,24 @@ case $host in #( *-*-mingw32|*-pc-windows) : ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include " -if test "x$ac_cv_type_socklen_t" = xyes -then : - printf "%s\n" "#define HAS_SOCKLEN_T 1" >>confdefs.h +if test "x$ac_cv_type_socklen_t" = xyes; then : + $as_echo "#define HAS_SOCKLEN_T 1" >>confdefs.h fi ;; #( *) : ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include " -if test "x$ac_cv_type_socklen_t" = xyes -then : - printf "%s\n" "#define HAS_SOCKLEN_T 1" >>confdefs.h +if test "x$ac_cv_type_socklen_t" = xyes; then : + $as_echo "#define HAS_SOCKLEN_T 1" >>confdefs.h fi ;; esac ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton" -if test "x$ac_cv_func_inet_aton" = xyes -then : - printf "%s\n" "#define HAS_INET_ATON 1" >>confdefs.h +if test "x$ac_cv_func_inet_aton" = xyes; then : + $as_echo "#define HAS_INET_ATON 1" >>confdefs.h fi @@ -16397,18 +15526,20 @@ fi case $host in #( *-*-mingw32|*-pc-windows) : - for ac_header in afunix.h + for ac_header in afunix.h do : ac_fn_c_check_header_compile "$LINENO" "afunix.h" "ac_cv_header_afunix_h" "#include " -if test "x$ac_cv_header_afunix_h" = xyes -then : - printf "%s\n" "#define HAVE_AFUNIX_H 1" >>confdefs.h - printf "%s\n" "#define HAS_AFUNIX_H 1" >>confdefs.h +if test "x$ac_cv_header_afunix_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_AFUNIX_H 1 +_ACEOF + $as_echo "#define HAS_AFUNIX_H 1" >>confdefs.h fi -done ;; #( +done + ;; #( *) : ;; esac @@ -16421,10 +15552,9 @@ case $host in #( *-*-mingw32|*-pc-windows) : ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "#include " -if test "x$ac_cv_type_struct_sockaddr_in6" = xyes -then : +if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then : -else $as_nop +else ipv6=false fi ;; #( @@ -16436,182 +15566,89 @@ fi " -if test "x$ac_cv_type_struct_sockaddr_in6" = xyes -then : +if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then : -else $as_nop +else ipv6=false fi ;; esac -if $ipv6 -then : +if $ipv6; then : ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" -if test "x$ac_cv_func_getaddrinfo" = xyes -then : +if test "x$ac_cv_func_getaddrinfo" = xyes; then : -else $as_nop +else ipv6=false fi fi -if $ipv6 -then : +if $ipv6; then : ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" -if test "x$ac_cv_func_getnameinfo" = xyes -then : +if test "x$ac_cv_func_getnameinfo" = xyes; then : -else $as_nop +else ipv6=false fi fi -if $ipv6 -then : +if $ipv6; then : ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton" -if test "x$ac_cv_func_inet_pton" = xyes -then : +if test "x$ac_cv_func_inet_pton" = xyes; then : -else $as_nop +else ipv6=false fi fi -if $ipv6 -then : +if $ipv6; then : ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" -if test "x$ac_cv_func_inet_ntop" = xyes -then : - printf "%s\n" "#define HAS_IPV6 1" >>confdefs.h +if test "x$ac_cv_func_inet_ntop" = xyes; then : + $as_echo "#define HAS_IPV6 1" >>confdefs.h fi fi ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir" -if test "x$ac_cv_func_rewinddir" = xyes -then : - printf "%s\n" "#define HAS_REWINDDIR 1" >>confdefs.h +if test "x$ac_cv_func_rewinddir" = xyes; then : + $as_echo "#define HAS_REWINDDIR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "lockf" "ac_cv_func_lockf" -if test "x$ac_cv_func_lockf" = xyes -then : - printf "%s\n" "#define HAS_LOCKF 1" >>confdefs.h +if test "x$ac_cv_func_lockf" = xyes; then : + $as_echo "#define HAS_LOCKF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo" -if test "x$ac_cv_func_mkfifo" = xyes -then : - printf "%s\n" "#define HAS_MKFIFO 1" >>confdefs.h +if test "x$ac_cv_func_mkfifo" = xyes; then : + $as_echo "#define HAS_MKFIFO 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" -if test "x$ac_cv_func_getcwd" = xyes -then : - printf "%s\n" "#define HAS_GETCWD 1" >>confdefs.h +if test "x$ac_cv_func_getcwd" = xyes; then : + $as_echo "#define HAS_GETCWD 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 -printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } -if test ${ac_cv_c_undeclared_builtin_options+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_save_CFLAGS=$CFLAGS - ac_cv_c_undeclared_builtin_options='cannot detect' - for ac_arg in '' -fno-builtin; do - CFLAGS="$ac_save_CFLAGS $ac_arg" - # This test program should *not* compile successfully. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -(void) strchr; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - -else $as_nop - # This test program should compile successfully. - # No library function is consistently available on - # freestanding implementations, so test against a dummy - # declaration. Include always-available headers on the - # off chance that they somehow elicit warnings. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -extern void ac_decl (int, char *); - -int -main (void) -{ -(void) ac_decl (0, (char *) 0); - (void) ac_decl; +ac_fn_c_check_decl "$LINENO" "system" "ac_cv_have_decl_system" "#include +" +if test "x$ac_cv_have_decl_system" = xyes; then : + $as_echo "#define HAS_SYSTEM 1" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if test x"$ac_arg" = x -then : - ac_cv_c_undeclared_builtin_options='none needed' -else $as_nop - ac_cv_c_undeclared_builtin_options=$ac_arg -fi - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - done - CFLAGS=$ac_save_CFLAGS - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 -printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } - case $ac_cv_c_undeclared_builtin_options in #( - 'cannot detect') : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot make $CC report undeclared builtins -See \`config.log' for more details" "$LINENO" 5; } ;; #( - 'none needed') : - ac_c_undeclared_builtin_options='' ;; #( - *) : - ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; -esac - -ac_fn_check_decl "$LINENO" "system" "ac_cv_have_decl_system" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_system" = xyes -then : - printf "%s\n" "#define HAS_SYSTEM 1" >>confdefs.h -fi ## utime ## Note: this was defined in config/s-nt.h but the autoconf macros do not @@ -16619,43 +15656,39 @@ fi # of HAS_UTIME on Windows but this will probably need to be clarified case $host in #( *-*-mingw32|*-pc-windows) : - printf "%s\n" "#define HAS_UTIME 1" >>confdefs.h + $as_echo "#define HAS_UTIME 1" >>confdefs.h ;; #( *) : - ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_types_h" = xyes -then : - ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default" -if test "x$ac_cv_header_utime_h" = xyes -then : + ac_fn_c_check_header_mongrel "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_types_h" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default" +if test "x$ac_cv_header_utime_h" = xyes; then : ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime" -if test "x$ac_cv_func_utime" = xyes -then : - printf "%s\n" "#define HAS_UTIME 1" >>confdefs.h +if test "x$ac_cv_func_utime" = xyes; then : + $as_echo "#define HAS_UTIME 1" >>confdefs.h fi fi + fi + ;; esac ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes" -if test "x$ac_cv_func_utimes" = xyes -then : - printf "%s\n" "#define HAS_UTIMES 1" >>confdefs.h +if test "x$ac_cv_func_utimes" = xyes; then : + $as_echo "#define HAS_UTIMES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod" -if test "x$ac_cv_func_fchmod" = xyes -then : +if test "x$ac_cv_func_fchmod" = xyes; then : ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown" -if test "x$ac_cv_func_fchown" = xyes -then : - printf "%s\n" "#define HAS_FCHMOD 1" >>confdefs.h +if test "x$ac_cv_func_fchown" = xyes; then : + $as_echo "#define HAS_FCHMOD 1" >>confdefs.h fi @@ -16663,12 +15696,10 @@ fi ac_fn_c_check_func "$LINENO" "truncate" "ac_cv_func_truncate" -if test "x$ac_cv_func_truncate" = xyes -then : +if test "x$ac_cv_func_truncate" = xyes; then : ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate" -if test "x$ac_cv_func_ftruncate" = xyes -then : - printf "%s\n" "#define HAS_TRUNCATE 1" >>confdefs.h +if test "x$ac_cv_func_ftruncate" = xyes; then : + $as_echo "#define HAS_TRUNCATE 1" >>confdefs.h fi @@ -16677,19 +15708,17 @@ fi ## select ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" -if test "x$ac_cv_func_select" = xyes -then : +if test "x$ac_cv_func_select" = xyes; then : ac_fn_c_check_type "$LINENO" "fd_set" "ac_cv_type_fd_set" " #include #include " -if test "x$ac_cv_type_fd_set" = xyes -then : - printf "%s\n" "#define HAS_SELECT 1" >>confdefs.h +if test "x$ac_cv_type_fd_set" = xyes; then : + $as_echo "#define HAS_SELECT 1" >>confdefs.h select=true -else $as_nop +else select=false fi @@ -16697,23 +15726,19 @@ fi ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" -if test "x$ac_cv_func_nanosleep" = xyes -then : - printf "%s\n" "#define HAS_NANOSLEEP 1" >>confdefs.h +if test "x$ac_cv_func_nanosleep" = xyes; then : + $as_echo "#define HAS_NANOSLEEP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "symlink" "ac_cv_func_symlink" -if test "x$ac_cv_func_symlink" = xyes -then : +if test "x$ac_cv_func_symlink" = xyes; then : ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink" -if test "x$ac_cv_func_readlink" = xyes -then : +if test "x$ac_cv_func_readlink" = xyes; then : ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat" -if test "x$ac_cv_func_lstat" = xyes -then : - printf "%s\n" "#define HAS_SYMLINK 1" >>confdefs.h +if test "x$ac_cv_func_lstat" = xyes; then : + $as_echo "#define HAS_SYMLINK 1" >>confdefs.h fi @@ -16723,33 +15748,30 @@ fi ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath" -if test "x$ac_cv_func_realpath" = xyes -then : - printf "%s\n" "#define HAS_REALPATH 1" >>confdefs.h +if test "x$ac_cv_func_realpath" = xyes; then : + $as_echo "#define HAS_REALPATH 1" >>confdefs.h fi # wait ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid" -if test "x$ac_cv_func_waitpid" = xyes -then : +if test "x$ac_cv_func_waitpid" = xyes; then : wait=true - printf "%s\n" "#define HAS_WAITPID 1" >>confdefs.h + $as_echo "#define HAS_WAITPID 1" >>confdefs.h -else $as_nop +else wait=false fi ac_fn_c_check_func "$LINENO" "wait4" "ac_cv_func_wait4" -if test "x$ac_cv_func_wait4" = xyes -then : +if test "x$ac_cv_func_wait4" = xyes; then : has_wait=true - printf "%s\n" "#define HAS_WAIT4 1" >>confdefs.h + $as_echo "#define HAS_WAIT4 1" >>confdefs.h fi @@ -16757,52 +15779,43 @@ fi ## getgroups ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" -if test "x$ac_cv_func_getgroups" = xyes -then : - printf "%s\n" "#define HAS_GETGROUPS 1" >>confdefs.h +if test "x$ac_cv_func_getgroups" = xyes; then : + $as_echo "#define HAS_GETGROUPS 1" >>confdefs.h fi ## setgroups ac_fn_c_check_func "$LINENO" "setgroups" "ac_cv_func_setgroups" -if test "x$ac_cv_func_setgroups" = xyes -then : - printf "%s\n" "#define HAS_SETGROUPS 1" >>confdefs.h +if test "x$ac_cv_func_setgroups" = xyes; then : + $as_echo "#define HAS_SETGROUPS 1" >>confdefs.h fi ## initgroups ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups" -if test "x$ac_cv_func_initgroups" = xyes -then : - printf "%s\n" "#define HAS_INITGROUPS 1" >>confdefs.h +if test "x$ac_cv_func_initgroups" = xyes; then : + $as_echo "#define HAS_INITGROUPS 1" >>confdefs.h fi ## termios -ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default" -if test "x$ac_cv_header_termios_h" = xyes -then : +ac_fn_c_check_header_mongrel "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default" +if test "x$ac_cv_header_termios_h" = xyes; then : ac_fn_c_check_func "$LINENO" "tcgetattr" "ac_cv_func_tcgetattr" -if test "x$ac_cv_func_tcgetattr" = xyes -then : +if test "x$ac_cv_func_tcgetattr" = xyes; then : ac_fn_c_check_func "$LINENO" "tcsetattr" "ac_cv_func_tcsetattr" -if test "x$ac_cv_func_tcsetattr" = xyes -then : +if test "x$ac_cv_func_tcsetattr" = xyes; then : ac_fn_c_check_func "$LINENO" "tcsendbreak" "ac_cv_func_tcsendbreak" -if test "x$ac_cv_func_tcsendbreak" = xyes -then : +if test "x$ac_cv_func_tcsendbreak" = xyes; then : ac_fn_c_check_func "$LINENO" "tcflush" "ac_cv_func_tcflush" -if test "x$ac_cv_func_tcflush" = xyes -then : +if test "x$ac_cv_func_tcflush" = xyes; then : ac_fn_c_check_func "$LINENO" "tcflow" "ac_cv_func_tcflow" -if test "x$ac_cv_func_tcflow" = xyes -then : - printf "%s\n" "#define HAS_TERMIOS 1" >>confdefs.h +if test "x$ac_cv_func_tcflow" = xyes; then : + $as_echo "#define HAS_TERMIOS 1" >>confdefs.h fi @@ -16817,17 +15830,17 @@ fi fi + ## setitimer ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer" -if test "x$ac_cv_func_setitimer" = xyes -then : +if test "x$ac_cv_func_setitimer" = xyes; then : setitimer=true - printf "%s\n" "#define HAS_SETITIMER 1" >>confdefs.h + $as_echo "#define HAS_SETITIMER 1" >>confdefs.h -else $as_nop +else setitimer=false fi @@ -16837,13 +15850,12 @@ fi # (should be debugged later) case $host in #( *-*-mingw32|*-pc-windows) : - printf "%s\n" "#define HAS_GETHOSTNAME 1" >>confdefs.h + $as_echo "#define HAS_GETHOSTNAME 1" >>confdefs.h ;; #( *) : ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" -if test "x$ac_cv_func_gethostname" = xyes -then : - printf "%s\n" "#define HAS_GETHOSTNAME 1" >>confdefs.h +if test "x$ac_cv_func_gethostname" = xyes; then : + $as_echo "#define HAS_GETHOSTNAME 1" >>confdefs.h fi ;; @@ -16851,30 +15863,28 @@ esac ## uname -ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_utsname_h" = xyes -then : +ac_fn_c_check_header_mongrel "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_utsname_h" = xyes; then : ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" -if test "x$ac_cv_func_uname" = xyes -then : - printf "%s\n" "#define HAS_UNAME 1" >>confdefs.h +if test "x$ac_cv_func_uname" = xyes; then : + $as_echo "#define HAS_UNAME 1" >>confdefs.h fi fi + ## gettimeofday ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = xyes -then : +if test "x$ac_cv_func_gettimeofday" = xyes; then : gettimeofday=true - printf "%s\n" "#define HAS_GETTIMEOFDAY 1" >>confdefs.h + $as_echo "#define HAS_GETTIMEOFDAY 1" >>confdefs.h -else $as_nop +else gettimeofday=false fi @@ -16882,9 +15892,8 @@ fi ## mktime ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime" -if test "x$ac_cv_func_mktime" = xyes -then : - printf "%s\n" "#define HAS_MKTIME 1" >>confdefs.h +if test "x$ac_cv_func_mktime" = xyes; then : + $as_echo "#define HAS_MKTIME 1" >>confdefs.h fi @@ -16896,9 +15905,8 @@ case $host in #( ;; #( *) : ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid" -if test "x$ac_cv_func_setsid" = xyes -then : - printf "%s\n" "#define HAS_SETSID 1" >>confdefs.h +if test "x$ac_cv_func_setsid" = xyes; then : + $as_echo "#define HAS_SETSID 1" >>confdefs.h fi ;; @@ -16907,9 +15915,8 @@ esac ## putenv ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv" -if test "x$ac_cv_func_putenv" = xyes -then : - printf "%s\n" "#define HAS_PUTENV 1" >>confdefs.h +if test "x$ac_cv_func_putenv" = xyes; then : + $as_echo "#define HAS_PUTENV 1" >>confdefs.h fi @@ -16917,12 +15924,10 @@ fi ## setenv and unsetenv ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" -if test "x$ac_cv_func_setenv" = xyes -then : +if test "x$ac_cv_func_setenv" = xyes; then : ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" -if test "x$ac_cv_func_unsetenv" = xyes -then : - printf "%s\n" "#define HAS_SETENV_UNSETENV 1" >>confdefs.h +if test "x$ac_cv_func_unsetenv" = xyes; then : + $as_echo "#define HAS_SETENV_UNSETENV 1" >>confdefs.h fi @@ -16934,22 +15939,18 @@ fi # (should be debugged later) case $host in #( *-pc-windows) : - printf "%s\n" "#define HAS_LOCALE_H 1" >>confdefs.h + $as_echo "#define HAS_LOCALE_H 1" >>confdefs.h ;; #( *) : - ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" -if test "x$ac_cv_header_locale_h" = xyes -then : + ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" +if test "x$ac_cv_header_locale_h" = xyes; then : ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale" -if test "x$ac_cv_func_newlocale" = xyes -then : +if test "x$ac_cv_func_newlocale" = xyes; then : ac_fn_c_check_func "$LINENO" "freelocale" "ac_cv_func_freelocale" -if test "x$ac_cv_func_freelocale" = xyes -then : +if test "x$ac_cv_func_freelocale" = xyes; then : ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale" -if test "x$ac_cv_func_uselocale" = xyes -then : - printf "%s\n" "#define HAS_LOCALE_H 1" >>confdefs.h +if test "x$ac_cv_func_uselocale" = xyes; then : + $as_echo "#define HAS_LOCALE_H 1" >>confdefs.h fi @@ -16958,22 +15959,19 @@ fi fi fi + ;; esac -ac_fn_c_check_header_compile "$LINENO" "xlocale.h" "ac_cv_header_xlocale_h" "$ac_includes_default" -if test "x$ac_cv_header_xlocale_h" = xyes -then : +ac_fn_c_check_header_mongrel "$LINENO" "xlocale.h" "ac_cv_header_xlocale_h" "$ac_includes_default" +if test "x$ac_cv_header_xlocale_h" = xyes; then : ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale" -if test "x$ac_cv_func_newlocale" = xyes -then : +if test "x$ac_cv_func_newlocale" = xyes; then : ac_fn_c_check_func "$LINENO" "freelocale" "ac_cv_func_freelocale" -if test "x$ac_cv_func_freelocale" = xyes -then : +if test "x$ac_cv_func_freelocale" = xyes; then : ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale" -if test "x$ac_cv_func_uselocale" = xyes -then : - printf "%s\n" "#define HAS_XLOCALE_H 1" >>confdefs.h +if test "x$ac_cv_func_uselocale" = xyes; then : + $as_echo "#define HAS_XLOCALE_H 1" >>confdefs.h fi @@ -16984,41 +15982,38 @@ fi fi + ## strtod_l # Note: not detected on MSVC so hardcoding the result # (should be debugged later) case $host in #( *-pc-windows) : - printf "%s\n" "#define HAS_STRTOD_L 1" >>confdefs.h + $as_echo "#define HAS_STRTOD_L 1" >>confdefs.h ;; #( *) : ac_fn_c_check_func "$LINENO" "strtod_l" "ac_cv_func_strtod_l" -if test "x$ac_cv_func_strtod_l" = xyes -then : - printf "%s\n" "#define HAS_STRTOD_L 1" >>confdefs.h +if test "x$ac_cv_func_strtod_l" = xyes; then : + $as_echo "#define HAS_STRTOD_L 1" >>confdefs.h fi ;; esac ## shared library support -if $supports_shared_libraries -then : +if $supports_shared_libraries; then : case $host in #( *-*-mingw32|*-pc-windows|*-*-cygwin*) : DLLIBS="" ;; #( *) : ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes -then : +if test "x$ac_cv_func_dlopen" = xyes; then : supports_shared_libraries=true DLLIBS="" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17027,64 +16022,61 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : supports_shared_libraries=true DLLIBS="-ldl $DLLIBS" -else $as_nop +else supports_shared_libraries=false fi fi ;; esac -else $as_nop +else supports_shared_libraries=false fi -if $supports_shared_libraries -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Dynamic loading of shared libraries is supported." >&5 -printf "%s\n" "$as_me: Dynamic loading of shared libraries is supported." >&6;} - printf "%s\n" "#define SUPPORT_DYNAMIC_LINKING 1" >>confdefs.h +if $supports_shared_libraries; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: Dynamic loading of shared libraries is supported." >&5 +$as_echo "$as_me: Dynamic loading of shared libraries is supported." >&6;} + $as_echo "#define SUPPORT_DYNAMIC_LINKING 1" >>confdefs.h -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Dynamic loading of shared libraries is not supported." >&5 -printf "%s\n" "$as_me: Dynamic loading of shared libraries is not supported." >&6;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: Dynamic loading of shared libraries is not supported." >&5 +$as_echo "$as_me: Dynamic loading of shared libraries is not supported." >&6;} fi ## mmap -ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mman_h" = xyes -then : +ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mman_h" = xyes; then : ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = xyes -then : +if test "x$ac_cv_func_mmap" = xyes; then : ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap" -if test "x$ac_cv_func_munmap" = xyes -then : - printf "%s\n" "#define HAS_MMAP 1" >>confdefs.h +if test "x$ac_cv_func_munmap" = xyes; then : + $as_echo "#define HAS_MMAP 1" >>confdefs.h fi @@ -17093,12 +16085,12 @@ fi fi + ## pwrite ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite" -if test "x$ac_cv_func_pwrite" = xyes -then : - printf "%s\n" "#define HAS_PWRITE 1" >>confdefs.h +if test "x$ac_cv_func_pwrite" = xyes; then : + $as_echo "#define HAS_PWRITE 1" >>confdefs.h fi @@ -17115,25 +16107,24 @@ case $ocaml_cv_cc_vendor,$host in #( cc_has_debug_prefix_map=false ;; #( *) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports -fdebug-prefix-map" >&5 -printf %s "checking whether the C compiler supports -fdebug-prefix-map... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports -fdebug-prefix-map" >&5 +$as_echo_n "checking whether the C compiler supports -fdebug-prefix-map... " >&6; } saved_CFLAGS="$CFLAGS" CFLAGS="-fdebug-prefix-map=old=new $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : cc_has_debug_prefix_map=true - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else cc_has_debug_prefix_map=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_CFLAGS" ;; esac @@ -17145,54 +16136,48 @@ ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_str #include " -if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes -then : +if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then : stat_has_ns_precision=true - printf "%s\n" "#define HAS_NANOSECOND_STAT 1" >>confdefs.h + $as_echo "#define HAS_NANOSECOND_STAT 1" >>confdefs.h fi -if ! $stat_has_ns_precision -then : +if ! $stat_has_ns_precision; then : ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" " $ac_includes_default #include " -if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes -then : +if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then : stat_has_ns_precision=true - printf "%s\n" "#define HAS_NANOSECOND_STAT 2" >>confdefs.h + $as_echo "#define HAS_NANOSECOND_STAT 2" >>confdefs.h fi fi -if ! $stat_has_ns_precision -then : +if ! $stat_has_ns_precision; then : ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" " $ac_includes_default #include " -if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes -then : +if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then : stat_has_ns_precision=true - printf "%s\n" "#define HAS_NANOSECOND_STAT 3" >>confdefs.h + $as_echo "#define HAS_NANOSECOND_STAT 3" >>confdefs.h fi fi -if $stat_has_ns_precision -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: stat supports nanosecond precision" >&5 -printf "%s\n" "$as_me: stat supports nanosecond precision" >&6;} -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: stat does not support nanosecond precision" >&5 -printf "%s\n" "$as_me: stat does not support nanosecond precision" >&6;} +if $stat_has_ns_precision; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: stat supports nanosecond precision" >&5 +$as_echo "$as_me: stat supports nanosecond precision" >&6;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: stat does not support nanosecond precision" >&5 +$as_echo "$as_me: stat does not support nanosecond precision" >&6;} fi # Number of arguments of gethostbyname_r @@ -17205,13 +16190,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how many arguments gethostbyname_r() takes" >&5 -printf %s "checking how many arguments gethostbyname_r() takes... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how many arguments gethostbyname_r() takes" >&5 +$as_echo_n "checking how many arguments gethostbyname_r() takes... " >&6; } - if test ${ac_cv_func_which_gethostbyname_r+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_func_which_gethostbyname_r+:} false; then : + $as_echo_n "(cached) " >&6 +else ################################################################ @@ -17231,7 +16215,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { char *name = "www.gnu.org"; @@ -17241,11 +16225,10 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_which_gethostbyname_r=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # # SIX ARGUMENTS @@ -17258,7 +16241,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { char *name = "www.gnu.org"; @@ -17272,11 +16255,10 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_which_gethostbyname_r=six fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -17291,7 +16273,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { char *name = "www.gnu.org"; @@ -17305,11 +16287,10 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_which_gethostbyname_r=five fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -17324,7 +16305,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { char *name = "www.gnu.org"; @@ -17336,11 +16317,10 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_which_gethostbyname_r=three fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -17352,44 +16332,44 @@ fi case "$ac_cv_func_which_gethostbyname_r" in three|five|six) -printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h +$as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h ;; esac case "$ac_cv_func_which_gethostbyname_r" in three) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: three" >&5 -printf "%s\n" "three" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: three" >&5 +$as_echo "three" >&6; } -printf "%s\n" "#define HAVE_FUNC_GETHOSTBYNAME_R_3 1" >>confdefs.h +$as_echo "#define HAVE_FUNC_GETHOSTBYNAME_R_3 1" >>confdefs.h ;; five) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: five" >&5 -printf "%s\n" "five" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: five" >&5 +$as_echo "five" >&6; } -printf "%s\n" "#define HAVE_FUNC_GETHOSTBYNAME_R_5 1" >>confdefs.h +$as_echo "#define HAVE_FUNC_GETHOSTBYNAME_R_5 1" >>confdefs.h ;; six) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: six" >&5 -printf "%s\n" "six" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: six" >&5 +$as_echo "six" >&6; } -printf "%s\n" "#define HAVE_FUNC_GETHOSTBYNAME_R_6 1" >>confdefs.h +$as_echo "#define HAVE_FUNC_GETHOSTBYNAME_R_6 1" >>confdefs.h ;; no) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot find function declaration in netdb.h" >&5 -printf "%s\n" "cannot find function declaration in netdb.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find function declaration in netdb.h" >&5 +$as_echo "cannot find function declaration in netdb.h" >&6; } ;; unknown) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't tell" >&5 -printf "%s\n" "can't tell" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't tell" >&5 +$as_echo "can't tell" >&6; } ;; *) @@ -17408,14 +16388,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu case $ac_cv_func_which_gethostbyname_r in #( six) : - printf "%s\n" "#define HAS_GETHOSTBYNAME_R 6" >>confdefs.h + $as_echo "#define HAS_GETHOSTBYNAME_R 6" >>confdefs.h ;; #( five) : - printf "%s\n" "#define HAS_GETHOSTBYNAME_R 5" >>confdefs.h + $as_echo "#define HAS_GETHOSTBYNAME_R 5" >>confdefs.h ;; #( three) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: OCaml does not support this variant" >&5 -printf "%s\n" "$as_me: WARNING: OCaml does not support this variant" >&2;} ;; #( + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OCaml does not support this variant" >&5 +$as_echo "$as_me: WARNING: OCaml does not support this variant" >&2;} ;; #( *) : ;; esac @@ -17430,13 +16410,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how many arguments gethostbyaddr_r() takes" >&5 -printf %s "checking how many arguments gethostbyaddr_r() takes... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how many arguments gethostbyaddr_r() takes" >&5 +$as_echo_n "checking how many arguments gethostbyaddr_r() takes... " >&6; } - if test ${ac_cv_func_which_gethostbyaddr_r+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_func_which_gethostbyaddr_r+:} false; then : + $as_echo_n "(cached) " >&6 +else ################################################################ @@ -17456,7 +16435,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { char *addr = "192.168.1.1"; @@ -17466,11 +16445,10 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_which_gethostbyaddr_r=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # # EIGHT ARGUMENTS @@ -17483,7 +16461,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { char *addr = "192.168.1.1"; @@ -17498,11 +16476,10 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_which_gethostbyaddr_r=eight fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -17517,7 +16494,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { char *addr = "192.168.1.1"; @@ -17532,11 +16509,10 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_which_gethostbyaddr_r=seven fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -17548,36 +16524,36 @@ fi case "$ac_cv_func_which_gethostbyaddr_r" in seven|eight) -printf "%s\n" "#define HAVE_GETHOSTBYADDR_R 1" >>confdefs.h +$as_echo "#define HAVE_GETHOSTBYADDR_R 1" >>confdefs.h ;; esac case "$ac_cv_func_which_gethostbyaddr_r" in eight) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: eight" >&5 -printf "%s\n" "eight" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: eight" >&5 +$as_echo "eight" >&6; } -printf "%s\n" "#define HAVE_FUNC_GETHOSTBYADDR_R_8 1" >>confdefs.h +$as_echo "#define HAVE_FUNC_GETHOSTBYADDR_R_8 1" >>confdefs.h ;; seven) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: seven" >&5 -printf "%s\n" "seven" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: seven" >&5 +$as_echo "seven" >&6; } -printf "%s\n" "#define HAVE_FUNC_GETHOSTBYADDR_R_7 1" >>confdefs.h +$as_echo "#define HAVE_FUNC_GETHOSTBYADDR_R_7 1" >>confdefs.h ;; no) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot find function declaration in netdb.h" >&5 -printf "%s\n" "cannot find function declaration in netdb.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find function declaration in netdb.h" >&5 +$as_echo "cannot find function declaration in netdb.h" >&6; } ;; unknown) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't tell" >&5 -printf "%s\n" "can't tell" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't tell" >&5 +$as_echo "can't tell" >&6; } ;; *) @@ -17596,10 +16572,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu case $ac_cv_func_which_gethostbyaddr_r in #( eight) : - printf "%s\n" "#define HAS_GETHOSTBYADDR_R 8" >>confdefs.h + $as_echo "#define HAS_GETHOSTBYADDR_R 8" >>confdefs.h ;; #( seven) : - printf "%s\n" "#define HAS_GETHOSTBYADDR_R 7" >>confdefs.h + $as_echo "#define HAS_GETHOSTBYADDR_R 7" >>confdefs.h ;; #( *) : ;; @@ -17608,9 +16584,8 @@ esac ## mkstemp ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" -if test "x$ac_cv_func_mkstemp" = xyes -then : - printf "%s\n" "#define HAS_MKSTEMP 1" >>confdefs.h +if test "x$ac_cv_func_mkstemp" = xyes; then : + $as_echo "#define HAS_MKSTEMP 1" >>confdefs.h fi @@ -17618,9 +16593,8 @@ fi ## nice ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice" -if test "x$ac_cv_func_nice" = xyes -then : - printf "%s\n" "#define HAS_NICE 1" >>confdefs.h +if test "x$ac_cv_func_nice" = xyes; then : + $as_echo "#define HAS_NICE 1" >>confdefs.h fi @@ -17628,9 +16602,8 @@ fi ## dup3 ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" -if test "x$ac_cv_func_dup3" = xyes -then : - printf "%s\n" "#define HAS_DUP3 1" >>confdefs.h +if test "x$ac_cv_func_dup3" = xyes; then : + $as_echo "#define HAS_DUP3 1" >>confdefs.h fi @@ -17638,9 +16611,8 @@ fi ## pipe2 ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" -if test "x$ac_cv_func_pipe2" = xyes -then : - printf "%s\n" "#define HAS_PIPE2 1" >>confdefs.h +if test "x$ac_cv_func_pipe2" = xyes; then : + $as_echo "#define HAS_PIPE2 1" >>confdefs.h fi @@ -17648,9 +16620,8 @@ fi ## accept4 ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4" -if test "x$ac_cv_func_accept4" = xyes -then : - printf "%s\n" "#define HAS_ACCEPT4 1" >>confdefs.h +if test "x$ac_cv_func_accept4" = xyes; then : + $as_echo "#define HAS_ACCEPT4 1" >>confdefs.h fi @@ -17658,24 +16629,21 @@ fi ## getauxval ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval" -if test "x$ac_cv_func_getauxval" = xyes -then : - printf "%s\n" "#define HAS_GETAUXVAL 1" >>confdefs.h +if test "x$ac_cv_func_getauxval" = xyes; then : + $as_echo "#define HAS_GETAUXVAL 1" >>confdefs.h fi ## shmat -ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_shm_h" = xyes -then : +ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_shm_h" = xyes; then : - printf "%s\n" "#define HAS_SYS_SHM_H 1" >>confdefs.h + $as_echo "#define HAS_SYS_SHM_H 1" >>confdefs.h ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" -if test "x$ac_cv_func_shmat" = xyes -then : - printf "%s\n" "#define HAS_SHMAT 1" >>confdefs.h +if test "x$ac_cv_func_shmat" = xyes; then : + $as_echo "#define HAS_SHMAT 1" >>confdefs.h fi @@ -17683,28 +16651,25 @@ fi fi + ## execvpe ac_fn_c_check_func "$LINENO" "execvpe" "ac_cv_func_execvpe" -if test "x$ac_cv_func_execvpe" = xyes -then : - printf "%s\n" "#define HAS_EXECVPE 1" >>confdefs.h +if test "x$ac_cv_func_execvpe" = xyes; then : + $as_echo "#define HAS_EXECVPE 1" >>confdefs.h fi ## posix_spawn -ac_fn_c_check_header_compile "$LINENO" "spawn.h" "ac_cv_header_spawn_h" "$ac_includes_default" -if test "x$ac_cv_header_spawn_h" = xyes -then : +ac_fn_c_check_header_mongrel "$LINENO" "spawn.h" "ac_cv_header_spawn_h" "$ac_includes_default" +if test "x$ac_cv_header_spawn_h" = xyes; then : ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn" -if test "x$ac_cv_func_posix_spawn" = xyes -then : +if test "x$ac_cv_func_posix_spawn" = xyes; then : ac_fn_c_check_func "$LINENO" "posix_spawnp" "ac_cv_func_posix_spawnp" -if test "x$ac_cv_func_posix_spawnp" = xyes -then : - printf "%s\n" "#define HAS_POSIX_SPAWN 1" >>confdefs.h +if test "x$ac_cv_func_posix_spawnp" = xyes; then : + $as_echo "#define HAS_POSIX_SPAWN 1" >>confdefs.h fi @@ -17713,19 +16678,18 @@ fi fi + ## ffs or _BitScanForward ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs" -if test "x$ac_cv_func_ffs" = xyes -then : - printf "%s\n" "#define HAS_FFS 1" >>confdefs.h +if test "x$ac_cv_func_ffs" = xyes; then : + $as_echo "#define HAS_FFS 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "_BitScanForward" "ac_cv_func__BitScanForward" -if test "x$ac_cv_func__BitScanForward" = xyes -then : - printf "%s\n" "#define HAS_BITSCANFORWARD 1" >>confdefs.h +if test "x$ac_cv_func__BitScanForward" = xyes; then : + $as_echo "#define HAS_BITSCANFORWARD 1" >>confdefs.h fi @@ -17735,18 +16699,17 @@ fi case $enable_debugger in #( no) : with_debugger="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: replay debugger disabled" >&5 -printf "%s\n" "$as_me: replay debugger disabled" >&6;} ;; #( + { $as_echo "$as_me:${as_lineno-$LINENO}: replay debugger disabled" >&5 +$as_echo "$as_me: replay debugger disabled" >&6;} ;; #( *) : - if $sockets -then : + if $sockets; then : with_debugger="ocamldebugger" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: replay debugger supported" >&5 -printf "%s\n" "$as_me: replay debugger supported" >&6;} -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: replay debugger supported" >&5 +$as_echo "$as_me: replay debugger supported" >&6;} +else with_debugger="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: replay debugger not supported" >&5 -printf "%s\n" "$as_me: replay debugger not supported" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: replay debugger not supported" >&5 +$as_echo "$as_me: replay debugger not supported" >&6;} fi ;; esac @@ -17761,19 +16724,19 @@ esac ## Determine if system stack overflows can be detected -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stack overflows can be detected" >&5 -printf %s "checking whether stack overflows can be detected... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stack overflows can be detected" >&5 +$as_echo_n "checking whether stack overflows can be detected... " >&6; } case $arch,$system in #( i386,linux_elf|amd64,linux|amd64,macosx \ |amd64,openbsd|i386,bsd_elf|arm64,linux|arm64,macosx) : - printf "%s\n" "#define HAS_STACK_OVERFLOW_DETECTION 1" >>confdefs.h + $as_echo "#define HAS_STACK_OVERFLOW_DETECTION 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ;; #( + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ;; #( *) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; esac ## Determine if the POSIX threads library is supported @@ -17784,15 +16747,15 @@ case $enable_systhreads,$enable_unix_lib in #( as_fn_error $? "the Win32/POSIX threads library requires the unix library" "$LINENO" 5 ;; #( no,*|*,no) : systhread_support=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: the Win32/POSIX threads library is disabled" >&5 -printf "%s\n" "$as_me: the Win32/POSIX threads library is disabled" >&6;} ;; #( + { $as_echo "$as_me:${as_lineno-$LINENO}: the Win32/POSIX threads library is disabled" >&5 +$as_echo "$as_me: the Win32/POSIX threads library is disabled" >&6;} ;; #( *) : case $host in #( *-*-mingw32|*-pc-windows) : systhread_support=true otherlibraries="$otherlibraries systhreads" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: the Win32 threads library is supported" >&5 -printf "%s\n" "$as_me: the Win32 threads library is supported" >&6;} ;; #( + { $as_echo "$as_me:${as_lineno-$LINENO}: the Win32 threads library is supported" >&5 +$as_echo "$as_me: the Win32 threads library is supported" >&6;} ;; #( *) : @@ -17817,37 +16780,38 @@ if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then ax_pthread_save_CC="$CC" ax_pthread_save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS" - if test "x$PTHREAD_CC" != "x" -then : + if test "x$PTHREAD_CC" != "x"; then : CC="$PTHREAD_CC" fi CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 -printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 +$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char pthread_join (); int -main (void) +main () { return pthread_join (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ax_pthread_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -printf "%s\n" "$ax_pthread_ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } if test "x$ax_pthread_ok" = "xno"; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" @@ -17925,12 +16889,11 @@ case $host_os in _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1 -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 -printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} + $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 +$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} fi -rm -rf conftest* +rm -f conftest* ;; @@ -17950,12 +16913,11 @@ esac # Are we compiling with Clang? -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 -printf %s "checking whether $CC is Clang... " >&6; } -if test ${ax_cv_PTHREAD_CLANG+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 +$as_echo_n "checking whether $CC is Clang... " >&6; } +if ${ax_cv_PTHREAD_CLANG+:} false; then : + $as_echo_n "(cached) " >&6 +else ax_cv_PTHREAD_CLANG=no # Note that Autoconf sets GCC=yes for Clang as well as GCC if test "x$GCC" = "xyes"; then @@ -17968,17 +16930,16 @@ else $as_nop _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1 -then : + $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : ax_cv_PTHREAD_CLANG=yes fi -rm -rf conftest* +rm -f conftest* fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 -printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 +$as_echo "$ax_cv_PTHREAD_CLANG" >&6; } ax_pthread_clang="$ax_cv_PTHREAD_CLANG" @@ -17992,15 +16953,13 @@ ax_pthread_clang="$ax_cv_PTHREAD_CLANG" # [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 # To solve this, first try -pthread together with -lpthread for GCC -if test "x$GCC" = "xyes" -then : +if test "x$GCC" = "xyes"; then : ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags" fi # Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first -if test "x$ax_pthread_clang" = "xyes" -then : +if test "x$ax_pthread_clang" = "xyes"; then : ax_pthread_flags="-pthread,-lpthread -pthread" fi @@ -18022,10 +16981,9 @@ case $host_os in ax_pthread_check_macro="--" ;; esac -if test "x$ax_pthread_check_macro" = "x--" -then : +if test "x$ax_pthread_check_macro" = "x--"; then : ax_pthread_check_cond=0 -else $as_nop +else ax_pthread_check_cond="!defined($ax_pthread_check_macro)" fi @@ -18035,32 +16993,31 @@ for ax_pthread_try_flag in $ax_pthread_flags; do case $ax_pthread_try_flag in none) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 -printf %s "checking whether pthreads work without any flags... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 +$as_echo_n "checking whether pthreads work without any flags... " >&6; } ;; *,*) PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5 -printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5 +$as_echo_n "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; } ;; -*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 -printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 +$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } PTHREAD_CFLAGS="$ax_pthread_try_flag" ;; pthread-config) # Extract the first word of "pthread-config", so it can be a program name with args. set dummy pthread-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ax_pthread_config+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ax_pthread_config+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ax_pthread_config"; then ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. else @@ -18068,15 +17025,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ax_pthread_config="yes" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -18088,16 +17041,15 @@ fi fi ax_pthread_config=$ac_cv_prog_ax_pthread_config if test -n "$ax_pthread_config"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 -printf "%s\n" "$ax_pthread_config" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 +$as_echo "$ax_pthread_config" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - if test "x$ax_pthread_config" = "xno" -then : + if test "x$ax_pthread_config" = "xno"; then : continue fi PTHREAD_CFLAGS="`pthread-config --cflags`" @@ -18105,8 +17057,8 @@ fi ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 -printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 +$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } PTHREAD_LIBS="-l$ax_pthread_try_flag" ;; esac @@ -18141,7 +17093,7 @@ printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } } static void *start_routine(void *a) { return a; } int -main (void) +main () { pthread_t th; pthread_attr_t attr; pthread_create(&th, 0, start_routine, 0); @@ -18153,20 +17105,18 @@ pthread_t th; pthread_attr_t attr; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ax_pthread_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ax_pthread_save_CFLAGS" LIBS="$ax_pthread_save_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 -printf "%s\n" "$ax_pthread_ok" >&6; } - if test "x$ax_pthread_ok" = "xyes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = "xyes"; then : break fi @@ -18212,12 +17162,11 @@ if test "x$ax_pthread_clang" = "xyes"; then # that build with -Werror. So if the active version of Clang has # this misfeature, we search for an option to squash it. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 -printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } -if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 +$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } +if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : + $as_echo_n "(cached) " >&6 +else ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown # Create an alternate version of $ac_link that compiles and # links in two steps (.c -> .o, .o -> exe) instead of one @@ -18229,8 +17178,7 @@ else $as_nop ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" ax_pthread_save_CFLAGS="$CFLAGS" for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do - if test "x$ax_pthread_try" = "xunknown" -then : + if test "x$ax_pthread_try" = "xunknown"; then : break fi CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" @@ -18239,35 +17187,32 @@ fi /* end confdefs.h. */ int main(void){return 0;} _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_link="$ax_pthread_2step_ac_link" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done ac_link="$ax_pthread_save_ac_link" CFLAGS="$ax_pthread_save_CFLAGS" - if test "x$ax_pthread_try" = "x" -then : + if test "x$ax_pthread_try" = "x"; then : ax_pthread_try=no fi ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 -printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 +$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in no | unknown) ;; @@ -18286,53 +17231,51 @@ if test "x$ax_pthread_ok" = "xyes"; then LIBS="$PTHREAD_LIBS $LIBS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 -printf %s "checking for joinable pthread attribute... " >&6; } -if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 +$as_echo_n "checking for joinable pthread attribute... " >&6; } +if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : + $as_echo_n "(cached) " >&6 +else ax_cv_PTHREAD_JOINABLE_ATTR=unknown for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { int attr = $ax_pthread_attr; return attr /* ; */ ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 -printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 +$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ - test "x$ax_pthread_joinable_attr_defined" != "xyes" -then : + test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : -printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR +_ACEOF ax_pthread_joinable_attr_defined=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 -printf %s "checking whether more special flags are required for pthreads... " >&6; } -if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 +$as_echo_n "checking whether more special flags are required for pthreads... " >&6; } +if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : + $as_echo_n "(cached) " >&6 +else ax_cv_PTHREAD_SPECIAL_FLAGS=no case $host_os in solaris*) @@ -18341,26 +17284,24 @@ else $as_nop esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 -printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 +$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ - test "x$ax_pthread_special_flags_added" != "xyes" -then : + test "x$ax_pthread_special_flags_added" != "xyes"; then : PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" ax_pthread_special_flags_added=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 -printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; } -if test ${ax_cv_PTHREAD_PRIO_INHERIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 +$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } +if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { int i = PTHREAD_PRIO_INHERIT; return i; @@ -18368,23 +17309,21 @@ int i = PTHREAD_PRIO_INHERIT; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ax_cv_PTHREAD_PRIO_INHERIT=yes -else $as_nop +else ax_cv_PTHREAD_PRIO_INHERIT=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 -printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 +$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ - test "x$ax_pthread_prio_inherit_defined" != "xyes" -then : + test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : -printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h +$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h ax_pthread_prio_inherit_defined=yes @@ -18402,8 +17341,7 @@ fi #handle absolute path differently from PATH based program lookup case "x$CC" in #( x/*) : - if as_fn_executable_p ${CC}_r -then : + if as_fn_executable_p ${CC}_r; then : PTHREAD_CC="${CC}_r" fi ;; #( *) : @@ -18411,12 +17349,11 @@ fi ;; #( do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_PTHREAD_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PTHREAD_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else @@ -18424,15 +17361,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -18443,11 +17376,11 @@ fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 -printf "%s\n" "$PTHREAD_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 +$as_echo "$PTHREAD_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -18475,16 +17408,15 @@ if test "x$ax_pthread_ok" = "xyes"; then systhread_support=true otherlibraries="$otherlibraries systhreads" common_cflags="$common_cflags $PTHREAD_CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: the POSIX threads library is supported" >&5 -printf "%s\n" "$as_me: the POSIX threads library is supported" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: the POSIX threads library is supported" >&5 +$as_echo "$as_me: the POSIX threads library is supported" >&6;} saved_CFLAGS="$CFLAGS" saved_LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$LIBS $PTHREAD_LIBS" ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait" -if test "x$ac_cv_func_sigwait" = xyes -then : - printf "%s\n" "#define HAS_SIGWAIT 1" >>confdefs.h +if test "x$ac_cv_func_sigwait" = xyes; then : + $as_echo "#define HAS_SIGWAIT 1" >>confdefs.h fi @@ -18493,13 +17425,12 @@ fi : else ax_pthread_ok=no - if test x"$enable_systhreads" = "xyes" -then : + if test x"$enable_systhreads" = "xyes"; then : as_fn_error $? "the POSIX thread library is not available" "$LINENO" 5 -else $as_nop +else systhread_support=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: the POSIX threads library is not supported" >&5 -printf "%s\n" "$as_me: the POSIX threads library is not supported" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: the POSIX threads library is not supported" >&5 +$as_echo "$as_me: the POSIX threads library is not supported" >&6;} fi fi ac_ext=c @@ -18515,15 +17446,14 @@ esac ## Does the assembler support debug prefix map and CFI directives as_has_debug_prefix_map=false asm_cfi_supported=false -if $native_compiler -then : +if $native_compiler; then : case $host in #( *-*-mingw32|*-pc-windows) : ;; #( *) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the assembler supports --debug-prefix-map" >&5 -printf %s "checking whether the assembler supports --debug-prefix-map... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the assembler supports --debug-prefix-map" >&5 +$as_echo_n "checking whether the assembler supports --debug-prefix-map... " >&6; } saved_CC="$CC" @@ -18553,17 +17483,16 @@ camlPervasives__loop_1128: .loc 1 193 _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : as_has_debug_prefix_map=true - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else ashas_debug_prefix_map=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Restore the content of confdefs.h @@ -18577,14 +17506,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the assembler supports CFI directives" >&5 -printf %s "checking whether the assembler supports CFI directives... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the assembler supports CFI directives" >&5 +$as_echo_n "checking whether the assembler supports CFI directives... " >&6; } - if test x"$enable_cfi" = "xno" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -printf "%s\n" "disabled" >&6; } -else $as_nop + if test x"$enable_cfi" = "xno"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 +$as_echo "disabled" >&6; } +else saved_CC="$CC" saved_CFLAGS="$CFLAGS" @@ -18616,18 +17544,16 @@ camlPervasives__loop_1128: .cfi_endproc _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : aspp_ok=true -else $as_nop +else aspp_ok=false fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$AS" = "$ASPP" -then : + if test "$AS" = "$ASPP"; then : as_ok="$aspp_ok" -else $as_nop +else CC="$AS" ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18641,13 +17567,12 @@ camlPervasives__loop_1128: .cfi_endproc _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : as_ok=true -else $as_nop +else as_ok=false fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -18661,24 +17586,22 @@ fi LIBS="$saved_LIBS" - if $aspp_ok && $as_ok -then : + if $aspp_ok && $as_ok; then : asm_cfi_supported=true - printf "%s\n" "#define ASM_CFI_SUPPORTED 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - if test x"$enable_cfi" = "xyes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not available + $as_echo "#define ASM_CFI_SUPPORTED 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + if test x"$enable_cfi" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: requested but not available as_fn_error $? "exiting" "$LINENO" 5" >&5 -printf "%s\n" "requested but not available +$as_echo "requested but not available as_fn_error $? "exiting" "$LINENO" 5" >&6; } -else $as_nop +else asm_cfi_supported=false - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi @@ -18688,52 +17611,47 @@ fi ## Frame pointers -if test x"$enable_frame_pointers" = "xyes" -then : +if test x"$enable_frame_pointers" = "xyes"; then : case "$host,$cc_basename" in #( x86_64-*-linux*,gcc*|x86_64-*-linux*,clang*) : common_cflags="$common_cflags -g -fno-omit-frame-pointer" frame_pointers=true - printf "%s\n" "#define WITH_FRAME_POINTERS 1" >>confdefs.h + $as_echo "#define WITH_FRAME_POINTERS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using frame pointers" >&5 -printf "%s\n" "$as_me: using frame pointers" >&6;} ;; #( + { $as_echo "$as_me:${as_lineno-$LINENO}: using frame pointers" >&5 +$as_echo "$as_me: using frame pointers" >&6;} ;; #( *) : as_fn_error $? "frame pointers not supported on this platform" "$LINENO" 5 ;; esac -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not using frame pointers" >&5 -printf "%s\n" "$as_me: not using frame pointers" >&6;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: not using frame pointers" >&5 +$as_echo "$as_me: not using frame pointers" >&6;} frame_pointers=false fi ## CPP mangling -if test x"$enable_cpp_mangling" = "xyes" -then : +if test x"$enable_cpp_mangling" = "xyes"; then : cpp_mangling=true - printf "%s\n" "#define WITH_CPP_MANGLING 1" >>confdefs.h + $as_echo "#define WITH_CPP_MANGLING 1" >>confdefs.h -else $as_nop +else cpp_mangling=false fi ## No naked pointers -if test x"$enable_naked_pointers" = "xno" -then : +if test x"$enable_naked_pointers" = "xno" ; then : naked_pointers=false - printf "%s\n" "#define NO_NAKED_POINTERS 1" >>confdefs.h + $as_echo "#define NO_NAKED_POINTERS 1" >>confdefs.h -else $as_nop +else naked_pointers=true fi -if test x"$enable_naked_pointers_checker" = "xyes" -then : - if test x"$enable_naked_pointers" = "xno" -then : +if test x"$enable_naked_pointers_checker" = "xyes" ; then : + if test x"$enable_naked_pointers" = "xno" ; then : as_fn_error $? "--enable-naked-pointers-checker and --disable-naked-pointers are incompatible" "$LINENO" 5 fi case "$arch","$system" in #( @@ -18742,7 +17660,7 @@ fi |amd64,freebsd|amd64,solaris \ |arm64,linux|arm64,macosx) : naked_pointers_checker=true - printf "%s\n" "#define NAKED_POINTERS_CHECKER 1" >>confdefs.h + $as_echo "#define NAKED_POINTERS_CHECKER 1" >>confdefs.h ;; #( *) : as_fn_error $? "naked pointers checker not supported on this platform" "$LINENO" 5 @@ -18750,19 +17668,18 @@ fi *) : ;; esac -else $as_nop +else naked_pointers_checker=false fi ## Check for mmap support for huge pages and contiguous heap - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mmap supports huge pages" >&5 -printf %s "checking whether mmap supports huge pages... " >&6; } - if test "$cross_compiling" = yes -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no assumed" >&5 -printf "%s\n" "no assumed" >&6; } -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap supports huge pages" >&5 +$as_echo_n "checking whether mmap supports huge pages... " >&6; } + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no assumed" >&5 +$as_echo "no assumed" >&6; } +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18804,17 +17721,18 @@ int main (int argc, char *argv[]){ } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : - printf "%s\n" "#define HAS_HUGE_PAGES 1" >>confdefs.h +if ac_fn_c_try_run "$LINENO"; then : + $as_echo "#define HAS_HUGE_PAGES 1" >>confdefs.h - printf "%s\n" "#define HUGE_PAGE_SIZE (4 * 1024 * 1024)" >>confdefs.h + cat >>confdefs.h <<_ACEOF +#define HUGE_PAGE_SIZE (4 * 1024 * 1024) +_ACEOF - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -18822,40 +17740,37 @@ fi -printf "%s\n" "#define PROFINFO_WIDTH $profinfo_width" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PROFINFO_WIDTH $profinfo_width +_ACEOF -if $profinfo -then : - printf "%s\n" "#define WITH_PROFINFO 1" >>confdefs.h +if $profinfo; then : + $as_echo "#define WITH_PROFINFO 1" >>confdefs.h fi -if test x"$enable_installing_bytecode_programs" = "xno" -then : +if test x"$enable_installing_bytecode_programs" = "xno"; then : install_bytecode_programs=false -else $as_nop +else install_bytecode_programs=true fi -if test x"$enable_installing_source_artifacts" = "xno" -then : +if test x"$enable_installing_source_artifacts" = "xno"; then : install_source_artifacts=false -else $as_nop +else install_source_artifacts=true fi -if test x"$enable_ocamldoc" = "xno" -then : +if test x"$enable_ocamldoc" = "xno"; then : ocamldoc="" -else $as_nop +else ocamldoc=ocamldoc fi documentation_tool_cmd='' # Check whether --with-odoc was given. -if test ${with_odoc+y} -then : +if test "${with_odoc+set}" = set; then : withval=$with_odoc; case $withval in #( yes) : documentation_tool='odoc' ;; #( @@ -18865,13 +17780,12 @@ then : documentation_tool_cmd="$withval" documentation_tool='odoc' ;; esac -else $as_nop +else documentation_tool='ocamldoc' fi if test "x$documentation_tool_cmd" = 'x' - documentation_tool_cmd="$documentation_tool" -then : + documentation_tool_cmd="$documentation_tool"; then : fi @@ -18884,92 +17798,84 @@ case $enable_ocamltest,true in #( ocamltest='' ;; esac -if test x"$enable_flambda" = "xyes" -then : +if test x"$enable_flambda" = "xyes"; then : flambda=true flambda2=false - if test x"$enable_flambda2" = "xyes" -then : + if test x"$enable_flambda2" = "xyes"; then : as_fn_error $? "please enable only one of Flambda 1 and Flambda 2" "$LINENO" 5 fi -else $as_nop +else flambda=false fi -if test x"$enable_flambda2" = "xyes" -then : +if test x"$enable_flambda2" = "xyes"; then : flambda2=true flambda=false -else $as_nop +else flambda2=false fi -if test x"$enable_flambda_invariants" = "xyes" -then : +if test x"$enable_flambda_invariants" = "xyes"; then : flambda_invariants=true -else $as_nop +else flambda_invariants=false fi -if test x"$enable_cmm_invariants" = "xyes" -then : +if test x"$enable_cmm_invariants" = "xyes"; then : cmm_invariants=true -else $as_nop +else cmm_invariants=false fi -if test x"$enable_cmm_invariants" = "xyes" -then : +if test x"$enable_cmm_invariants" = "xyes"; then : cmm_invariants=true -else $as_nop +else cmm_invariants=false fi -if test x"$enable_flat_float_array" = "xno" -then : +if test x"$enable_flat_float_array" = "xno"; then : flat_float_array=false -else $as_nop - printf "%s\n" "#define FLAT_FLOAT_ARRAY 1" >>confdefs.h +else + $as_echo "#define FLAT_FLOAT_ARRAY 1" >>confdefs.h flat_float_array=true fi -if test x"$enable_function_sections" = "xno" -then : +if test x"$enable_function_sections" = "xno"; then : function_sections=false -else $as_nop +else case $arch in #( amd64|i386|arm64) : # not supported on arm32, see issue #9124. case $target in #( *-cygwin*|*-mingw*|*-windows|*-apple-darwin*) : function_sections=false; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No support for function sections on $target." >&5 -printf "%s\n" "$as_me: No support for function sections on $target." >&6;} ;; #( + { $as_echo "$as_me:${as_lineno-$LINENO}: No support for function sections on $target." >&5 +$as_echo "$as_me: No support for function sections on $target." >&6;} ;; #( *) : case $ocaml_cv_cc_vendor in #( gcc-0123-*|gcc-4-01234567) : function_sections=false; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Function sections are not + { $as_echo "$as_me:${as_lineno-$LINENO}: Function sections are not supported in GCC prior to version 4.8." >&5 -printf "%s\n" "$as_me: Function sections are not +$as_echo "$as_me: Function sections are not supported in GCC prior to version 4.8." >&6;} ;; #( clang-012-*|clang-3-01234) : function_sections=false; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Function sections are not supported + { $as_echo "$as_me:${as_lineno-$LINENO}: Function sections are not supported in Clang prior to version 3.5." >&5 -printf "%s\n" "$as_me: Function sections are not supported +$as_echo "$as_me: Function sections are not supported in Clang prior to version 3.5." >&6;} ;; #( gcc-*|clang-*) : function_sections=true; internal_cflags="$internal_cflags -ffunction-sections"; - printf "%s\n" "#define FUNCTION_SECTIONS 1" >>confdefs.h + $as_echo "#define FUNCTION_SECTIONS 1" >>confdefs.h ;; #( *) : function_sections=false; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Function sections are not supported by + { $as_echo "$as_me:${as_lineno-$LINENO}: Function sections are not supported by $ocaml_cv_cc_vendor." >&5 -printf "%s\n" "$as_me: Function sections are not supported by +$as_echo "$as_me: Function sections are not supported by $ocaml_cv_cc_vendor." >&6;} ;; #( *) : ;; @@ -18980,14 +17886,12 @@ esac ;; #( *) : function_sections=false ;; esac; - if test x"$function_sections" = "xfalse" -then : - if test x"$enable_function_sections" = "xyes" -then : + if test x"$function_sections" = "xfalse"; then : + if test x"$enable_function_sections" = "xyes"; then : as_fn_error $? "Function sections are not supported." "$LINENO" 5 -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling function sections." >&5 -printf "%s\n" "$as_me: Disabling function sections." >&6;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling function sections." >&5 +$as_echo "$as_me: Disabling function sections." >&6;} fi fi fi @@ -19008,42 +17912,45 @@ esac ;; #( ;; esac -if test x"$probes" = "xfalse" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling tracing probes: no support on $target." >&5 -printf "%s\n" "$as_me: Disabling tracing probes: no support on $target." >&6;} +if test x"$probes" = "xfalse"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling tracing probes: no support on $target." >&5 +$as_echo "$as_me: Disabling tracing probes: no support on $target." >&6;} fi -if test x"$with_afl" = "xyes" -then : +if test x"$with_afl" = "xyes"; then : afl=true -else $as_nop +else afl=false fi -if test x"$enable_force_safe_string" = "xno" -then : +if test x"$enable_force_safe_string" = "xno"; then : force_safe_string=false -else $as_nop - printf "%s\n" "#define CAML_SAFE_STRING 1" >>confdefs.h +else + $as_echo "#define CAML_SAFE_STRING 1" >>confdefs.h force_safe_string=true fi -if test x"$DEFAULT_STRING" = "xunsafe" -then : +if test x"$DEFAULT_STRING" = "xunsafe"; then : default_safe_string=false -else $as_nop +else default_safe_string=true fi -if test x"$enable_stack_allocation" = "xyes" -then : - printf "%s\n" "#define STACK_ALLOCATION 1" >>confdefs.h +if test x"$enable_stack_allocation" = "xno"; then : + stack_allocation=false +else + $as_echo "#define STACK_ALLOCATION 1" >>confdefs.h stack_allocation=true -else $as_nop - stack_allocation=false +fi + +if test x"$enable_poll_insertion" = "xyes"; then : + $as_echo "#define POLL_INSERTION 1" >>confdefs.h + + poll_insertion=true +else + poll_insertion=false fi oc_cflags="$common_cflags $internal_cflags" @@ -19064,13 +17971,11 @@ case $host in #( nativecclibs="$cclibs $DLLIBS" ;; esac -if test x"$libdir" = x'${exec_prefix}/lib' -then : +if test x"$libdir" = x'${exec_prefix}/lib'; then : libdir="$libdir"/ocaml fi -if test x"$mandir" = x'${datarootdir}/man' -then : +if test x"$mandir" = x'${datarootdir}/man'; then : mandir='${prefix}/man' fi @@ -19089,8 +17994,7 @@ esac ;; #( esac # Define default prefix correctly for the different Windows ports -if test x"$prefix" = "xNONE" -then : +if test x"$prefix" = "xNONE"; then : case $host in #( i686-w64-mingw32) : prefix='C:/ocamlmgw' ;; #( @@ -19103,10 +18007,9 @@ then : *) : ;; esac -else $as_nop +else if test x"$unix_or_win32" = "xwin32" \ - && test "$host_vendor-$host_os" != "$build_vendor-$build_os" -then : + && test "$host_vendor-$host_os" != "$build_vendor-$build_os" ; then : case $build in #( *-pc-cygwin) : prefix="$(LC_ALL=C.UTF-8 cygpath -m "$prefix")" ;; #( @@ -19121,36 +18024,35 @@ fi # (all this should be understood and fixed) case $host in #( *-*-mingw32) : - printf "%s\n" "#define HAS_BROKEN_PRINTF 1" >>confdefs.h + $as_echo "#define HAS_BROKEN_PRINTF 1" >>confdefs.h - printf "%s\n" "#define HAS_STRERROR 1" >>confdefs.h + $as_echo "#define HAS_STRERROR 1" >>confdefs.h - printf "%s\n" "#define HAS_IPV6 1" >>confdefs.h + $as_echo "#define HAS_IPV6 1" >>confdefs.h - printf "%s\n" "#define HAS_NICE 1" >>confdefs.h + $as_echo "#define HAS_NICE 1" >>confdefs.h ;; #( *-pc-windows) : - printf "%s\n" "#define HAS_BROKEN_PRINTF 1" >>confdefs.h + $as_echo "#define HAS_BROKEN_PRINTF 1" >>confdefs.h - printf "%s\n" "#define HAS_STRERROR 1" >>confdefs.h + $as_echo "#define HAS_STRERROR 1" >>confdefs.h - printf "%s\n" "#define HAS_IPV6 1" >>confdefs.h + $as_echo "#define HAS_IPV6 1" >>confdefs.h - printf "%s\n" "#define HAS_NICE 1" >>confdefs.h + $as_echo "#define HAS_NICE 1" >>confdefs.h ;; #( *-*-solaris*) : # This is required as otherwise floats are printed # as "Infinity" and "Inf" instead of the expected "inf" - printf "%s\n" "#define HAS_BROKEN_PRINTF 1" >>confdefs.h + $as_echo "#define HAS_BROKEN_PRINTF 1" >>confdefs.h ;; #( *) : ;; esac -if test x"$enable_stdlib_manpages" != "xno" -then : +if test x"$enable_stdlib_manpages" != "xno"; then : stdlib_manpages=true -else $as_nop +else stdlib_manpages=false fi @@ -19184,8 +18086,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -19215,15 +18117,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -19237,8 +18139,8 @@ printf "%s\n" "$as_me: updating cache $cache_file" >&6;} fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -19255,7 +18157,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -19271,8 +18173,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -19295,16 +18197,14 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -19314,46 +18214,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -19362,6 +18262,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -19370,12 +18277,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -19387,10 +18290,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -19403,14 +18326,13 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -19437,20 +18359,18 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset - # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -19462,13 +18382,12 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -19499,7 +18418,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -19521,10 +18440,6 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -19538,12 +18453,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -19585,7 +18494,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -19594,7 +18503,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -19657,7 +18566,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by OCaml $as_me 4.14.0+jst, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19720,16 +18629,14 @@ Report bugs to . OCaml home page: ." _ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ OCaml config.status 4.14.0+jst -configured by $0, generated by GNU Autoconf 2.71, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -19768,15 +18675,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -19784,7 +18691,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -19793,7 +18700,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -19821,7 +18728,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -19835,7 +18742,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - printf "%s\n" "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF @@ -20156,9 +19063,9 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers - test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -20494,7 +19401,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -20502,17 +19409,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | + ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -20529,7 +19436,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -20553,9 +19460,9 @@ printf "%s\n" X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -20612,8 +19519,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -20656,9 +19563,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -20674,27 +19581,27 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; - :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -printf "%s\n" "$as_me: executing $ac_file commands" >&6;} + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -21227,7 +20134,6 @@ _LT_EOF esac - ltmain=$ac_aux_dir/ltmain.sh @@ -21277,8 +20183,7 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi - diff --git a/configure.ac b/configure.ac index 56ae332ee38f..d09d05b2a417 100644 --- a/configure.ac +++ b/configure.ac @@ -173,6 +173,7 @@ AC_SUBST([naked_pointers]) AC_SUBST([naked_pointers_checker]) AC_SUBST([intel_jcc_bug_cflags]) AC_SUBST([stack_allocation]) +AC_SUBST([poll_insertion]) AC_SUBST([dune]) ## Generated files @@ -439,6 +440,10 @@ AC_ARG_ENABLE([stack-allocation], [AS_HELP_STRING([--enable-stack-allocation], [enable stack allocation of local values])]) +AC_ARG_ENABLE([poll-insertion], + [AS_HELP_STRING([--enable-poll-insertion], + [enable insertion of poll points])]) + AC_ARG_WITH([flexdll], [AS_HELP_STRING([--with-flexdll], [bootstrap FlexDLL from the given sources])], @@ -2030,10 +2035,15 @@ AS_IF([test x"$DEFAULT_STRING" = "xunsafe"], [default_safe_string=false], [default_safe_string=true]) -AS_IF([test x"$enable_stack_allocation" = "xyes"], +AS_IF([test x"$enable_stack_allocation" = "xno"], + [stack_allocation=false], [AC_DEFINE([STACK_ALLOCATION]) - stack_allocation=true], - [stack_allocation=false]) + stack_allocation=true]) + +AS_IF([test x"$enable_poll_insertion" = "xyes"], + [AC_DEFINE([POLL_INSERTION]) + poll_insertion=true], + [poll_insertion=false]) oc_cflags="$common_cflags $internal_cflags" oc_cppflags="$common_cppflags $internal_cppflags" diff --git a/debugger/.depend b/debugger/.depend index b02d1d2460c1..5bcb8ac45929 100644 --- a/debugger/.depend +++ b/debugger/.depend @@ -180,6 +180,7 @@ eval.cmo : \ ../typing/env.cmi \ debugcom.cmi \ ../typing/ctype.cmi \ + ../utils/compilation_unit.cmi \ ../typing/btype.cmi \ eval.cmi eval.cmx : \ @@ -200,6 +201,7 @@ eval.cmx : \ ../typing/env.cmx \ debugcom.cmx \ ../typing/ctype.cmx \ + ../utils/compilation_unit.cmx \ ../typing/btype.cmx \ eval.cmi eval.cmi : \ @@ -286,6 +288,7 @@ loadprinter.cmo : \ ../typing/env.cmi \ ../otherlibs/dynlink/dynlink.cmi \ ../typing/ctype.cmi \ + ../utils/compilation_unit.cmi \ loadprinter.cmi loadprinter.cmx : \ ../typing/types.cmx \ @@ -301,6 +304,7 @@ loadprinter.cmx : \ ../typing/env.cmx \ ../otherlibs/dynlink/dynlink.cmx \ ../typing/ctype.cmx \ + ../utils/compilation_unit.cmx \ loadprinter.cmi loadprinter.cmi : \ ../parsing/longident.cmi \ @@ -419,6 +423,7 @@ printval.cmo : \ ../toplevel/genprintval.cmi \ ../typing/env.cmi \ debugcom.cmi \ + ../utils/compilation_unit.cmi \ printval.cmi printval.cmx : \ ../typing/types.cmx \ @@ -430,6 +435,7 @@ printval.cmx : \ ../toplevel/genprintval.cmx \ ../typing/env.cmx \ debugcom.cmx \ + ../utils/compilation_unit.cmx \ printval.cmi printval.cmi : \ ../typing/types.cmi \ diff --git a/debugger/eval.ml b/debugger/eval.ml index 9ba8e7ea1917..7ae3464b4eca 100644 --- a/debugger/eval.ml +++ b/debugger/eval.ml @@ -40,12 +40,16 @@ exception Error of error let abstract_type = Btype.newgenty (Tconstr (Pident (Ident.create_local ""), [], ref Mnil)) +let get_global_or_predef id = + try + Debugcom.Remote_value.global (Symtable.get_global_position id) + with Symtable.Error _ -> raise(Error(Unbound_identifier id)) + let rec address path event = function - | Env.Aident id -> - if Ident.is_global_or_predef id then - try - Debugcom.Remote_value.global (Symtable.get_global_position id) - with Symtable.Error _ -> raise(Error(Unbound_identifier id)) + | Env.Aunit cu -> + get_global_or_predef (cu |> Compilation_unit.to_global_ident_for_bytecode) + | Env.Alocal id -> + if Ident.is_predef id then get_global_or_predef id else begin match event with Some {ev_ev = ev} -> diff --git a/debugger/loadprinter.ml b/debugger/loadprinter.ml index 696ce3cd1e96..7eb6bfebe0f4 100644 --- a/debugger/loadprinter.ml +++ b/debugger/loadprinter.ml @@ -72,14 +72,16 @@ let loadfile ppf name = the debuggee. *) let rec eval_address = function - | Env.Aident id -> - assert (Ident.is_global id); - let bytecode_or_asm_symbol = Ident.name id in + | Env.Aunit cu -> + let bytecode_or_asm_symbol = + Ident.name (cu |> Compilation_unit.to_global_ident_for_bytecode) + in begin match Dynlink.unsafe_get_global_value ~bytecode_or_asm_symbol with | None -> raise (Symtable.Error (Symtable.Undefined_global bytecode_or_asm_symbol)) | Some obj -> obj end + | Env.Alocal _ -> assert false | Env.Adot(addr, pos) -> Obj.field (eval_address addr) pos let eval_value_path env path = @@ -95,7 +97,8 @@ let eval_value_path env path = let init () = let topdirs = Filename.concat !Parameters.topdirs_path "topdirs.cmi" in - ignore (Env.read_signature "Topdirs" topdirs) + let topdirs_unit = "Topdirs" |> Compilation_unit.of_string in + ignore (Env.read_signature topdirs_unit topdirs) let match_printer_type desc typename = let printer_type = diff --git a/debugger/printval.ml b/debugger/printval.ml index 6e634ad17741..ef9978471c7c 100644 --- a/debugger/printval.ml +++ b/debugger/printval.ml @@ -49,13 +49,16 @@ module EvalPath = struct type valu = Debugcom.Remote_value.t exception Error + + let eval_id id = + try + Debugcom.Remote_value.global (Symtable.get_global_position id) + with Symtable.Error _ -> + raise Error + let rec eval_address = function - | Env.Aident id -> - begin try - Debugcom.Remote_value.global (Symtable.get_global_position id) - with Symtable.Error _ -> - raise Error - end + | Env.Aunit cu -> eval_id (cu |> Compilation_unit.to_global_ident_for_bytecode) + | Env.Alocal id -> eval_id id | Env.Adot(root, pos) -> let v = eval_address root in if not (Debugcom.Remote_value.is_block v) diff --git a/driver/compile.ml b/driver/compile.ml index 7c45095f0de2..bb6ba05bcb0a 100644 --- a/driver/compile.ml +++ b/driver/compile.ml @@ -40,7 +40,8 @@ let to_bytecode i Typedtree.{structure; coercion; _} = |> print_if i.ppf_dump Clflags.dump_rawlambda Printlambda.lambda |> Simplif.simplify_lambda |> print_if i.ppf_dump Clflags.dump_lambda Printlambda.lambda - |> Bytegen.compile_implementation i.module_name + |> Bytegen.compile_implementation + (i.module_name |> Compilation_unit.name_as_string) |> print_if i.ppf_dump Clflags.dump_instr Printinstr.instrlist |> fun bytecode -> bytecode, required_globals ) diff --git a/driver/compile.mli b/driver/compile.mli index 34d72d21b31a..7dc804e25485 100644 --- a/driver/compile.mli +++ b/driver/compile.mli @@ -26,11 +26,12 @@ val implementation: val to_bytecode : Compile_common.info -> Typedtree.implementation -> - Instruct.instruction list * Ident.Set.t + Instruct.instruction list * Compilation_unit.Set.t (** [to_bytecode info typed] takes a typechecked implementation and returns its bytecode. *) val emit_bytecode : - Compile_common.info -> Instruct.instruction list * Ident.Set.t -> unit + Compile_common.info -> Instruct.instruction list * Compilation_unit.Set.t -> + unit (** [emit_bytecode bytecode] output the bytecode executable. *) diff --git a/driver/compile_common.ml b/driver/compile_common.ml index b0f364b8bab6..bdd89f0019e9 100644 --- a/driver/compile_common.ml +++ b/driver/compile_common.ml @@ -17,7 +17,7 @@ open Misc type info = { source_file : string; - module_name : string; + module_name : Compilation_unit.t; output_prefix : string; env : Env.t; ppf_dump : Format.formatter; @@ -33,19 +33,24 @@ let annot i = i.output_prefix ^ ".annot" let with_info ~native ~tool_name ~source_file ~output_prefix ~dump_ext k = Compmisc.init_path (); let module_name = Compenv.module_of_filename source_file output_prefix in - Env.set_unit_name module_name; + let for_pack_prefix = Compilation_unit.Prefix.from_clflags () in + let compilation_unit = + Compilation_unit.create for_pack_prefix + (module_name |> Compilation_unit.Name.of_string) + in + Compilation_unit.set_current (Some compilation_unit); let env = Compmisc.initial_env() in let dump_file = String.concat "." [output_prefix; dump_ext] in - Compmisc.with_ppf_dump ~file_prefix:dump_file @@ fun ppf_dump -> + Compmisc.with_ppf_dump ~file_prefix:dump_file (fun ppf_dump -> k { - module_name; + module_name = compilation_unit; output_prefix; env; source_file; ppf_dump; tool_name; native; - } + }) (** Compile a .mli file *) diff --git a/driver/compile_common.mli b/driver/compile_common.mli index ac6d5610b6a7..f160629eb828 100644 --- a/driver/compile_common.mli +++ b/driver/compile_common.mli @@ -18,7 +18,7 @@ type info = { source_file : string; - module_name : string; + module_name : Compilation_unit.t; output_prefix : string; env : Env.t; ppf_dump : Format.formatter; diff --git a/driver/compmisc.ml b/driver/compmisc.ml index 830fb7c59c59..e62effaaa531 100644 --- a/driver/compmisc.ml +++ b/driver/compmisc.ml @@ -83,7 +83,7 @@ let rec make_directory dir = Sys.mkdir dir 0o777 end -let with_ppf_dump ~file_prefix f = +let with_ppf_dump ?stdout ~file_prefix f = let with_ch ch = let ppf = Format.formatter_of_out_channel ch in ppf, @@ -93,7 +93,12 @@ let with_ppf_dump ~file_prefix f = in let ppf_dump, finally = match !Clflags.dump_dir, !Clflags.dump_into_file with - | None, false -> Format.err_formatter, ignore + | None, false -> + let formatter = + if Option.is_some stdout then Format.std_formatter + else Format.err_formatter + in + formatter, ignore | None, true -> with_ch (open_out (file_prefix ^ ".dump")) | Some d, _ -> let () = make_directory Filename.(dirname @@ concat d @@ file_prefix) in diff --git a/driver/compmisc.mli b/driver/compmisc.mli index bb4c292b4f1e..04c67b11a4a4 100644 --- a/driver/compmisc.mli +++ b/driver/compmisc.mli @@ -20,4 +20,5 @@ val initial_env : unit -> Env.t val set_from_env : 'a option ref -> 'a Clflags.env_reader -> unit val read_clflags_from_env : unit -> unit -val with_ppf_dump : file_prefix:string -> (Format.formatter -> 'a) -> 'a +val with_ppf_dump : ?stdout:unit -> + file_prefix:string -> (Format.formatter -> 'a) -> 'a diff --git a/driver/main_args.ml b/driver/main_args.ml index b7c652855c19..623e44593afb 100644 --- a/driver/main_args.ml +++ b/driver/main_args.ml @@ -944,9 +944,6 @@ let mk_afl_inst_ratio f = \ (advanced, see afl-fuzz docs for AFL_INST_RATIO)" ;; -let mk_alloc_check f = - "-alloc-check", Arg.Unit f, "" - let mk__ f = "-", Arg.String f, " Treat as a file name (even if it starts with `-')" @@ -1180,7 +1177,6 @@ module type Optcomp_options = sig val _save_ir_after : string -> unit val _probes : unit -> unit val _no_probes : unit -> unit - val _alloc_check : unit -> unit end;; module type Opttop_options = sig @@ -1552,7 +1548,6 @@ struct mk_dump_into_file F._dump_into_file; mk_dump_dir F._dump_dir; mk_dump_pass F._dump_pass; - mk_alloc_check F._alloc_check; mk_args F._args; mk_args0 F._args0; @@ -2039,7 +2034,6 @@ module Default = struct let _v () = Compenv.print_version_and_library "native-code compiler" let _no_probes = clear probes let _probes = set probes - let _alloc_check () = () end module Odoc_args = struct diff --git a/driver/main_args.mli b/driver/main_args.mli index c3f3cf0d12fc..b903e30a8457 100644 --- a/driver/main_args.mli +++ b/driver/main_args.mli @@ -244,7 +244,6 @@ module type Optcomp_options = sig val _save_ir_after : string -> unit val _probes : unit -> unit val _no_probes : unit -> unit - val _alloc_check : unit -> unit end;; module type Opttop_options = sig diff --git a/driver/maindriver.ml b/driver/maindriver.ml index a6cf1a7b1bdb..b89b01c11c8b 100644 --- a/driver/maindriver.ml +++ b/driver/maindriver.ml @@ -111,6 +111,6 @@ let main argv ppf = Location.report_exception ppf x; 2 | () -> - Compmisc.with_ppf_dump ~file_prefix:"profile" + Compmisc.with_ppf_dump ~stdout:() ~file_prefix:"profile" (fun ppf -> Profile.print ppf !Clflags.profile_columns ~timings_precision:!Clflags.timings_precision); 0 diff --git a/driver/makedepend.ml b/driver/makedepend.ml index e8339cf5c06f..33cd80c9ad54 100644 --- a/driver/makedepend.ml +++ b/driver/makedepend.ml @@ -38,6 +38,7 @@ let allow_approximation = ref false let map_files = ref [] let module_map = ref String.Map.empty let debug = ref false +let strict = ref false module Error_occurred : sig val set : unit -> unit @@ -327,7 +328,7 @@ let read_parse_and_extract parse_function extract_function def ast_kind end with x -> begin print_exception x; - if not !allow_approximation then begin + if !strict || not !allow_approximation then begin Error_occurred.set (); (String.Set.empty, def) end else @@ -415,7 +416,9 @@ let process_file_as process_fun def source_file = )); Location.input_name := source_file; try - if Sys.file_exists source_file then process_fun source_file else def + if !strict || Sys.file_exists source_file + then process_fun source_file + else def with x -> report_err x; def let process_file source_file ~ml_file ~mli_file ~def = @@ -643,6 +646,8 @@ let run_main argv = " (Windows) Use forward slash / instead of backslash \\ in file paths"; "-sort", Arg.Set sort_files, " Sort files according to their dependencies"; + "-strict", Arg.Set strict, + " Fail if an input file does not exist"; "-version", Arg.Unit print_version, " Print version and exit"; "-vnum", Arg.Unit print_version_num, diff --git a/driver/optcompile.ml b/driver/optcompile.ml index 69dbb9cb1175..bdfc686bf116 100644 --- a/driver/optcompile.ml +++ b/driver/optcompile.ml @@ -39,16 +39,16 @@ let flambda i backend Typedtree.{structure; coercion; _} = |> Profile.(record transl) (Translmod.transl_implementation_flambda i.module_name) |> Profile.(record generate) - (fun {Lambda.module_ident; main_module_block_size; + (fun {Lambda.compilation_unit; main_module_block_size; required_globals; code } -> - ((module_ident, main_module_block_size), code) + ((compilation_unit, main_module_block_size), code) |>> print_if i.ppf_dump Clflags.dump_rawlambda Printlambda.lambda |>> Simplif.simplify_lambda |>> print_if i.ppf_dump Clflags.dump_lambda Printlambda.lambda - |> (fun ((module_ident, main_module_block_size), code) -> + |> (fun ((compilation_unit, main_module_block_size), code) -> let program : Lambda.program = { Lambda. - module_ident; + compilation_unit; main_module_block_size; required_globals; code; @@ -80,23 +80,15 @@ let clambda i backend Typedtree.{structure; coercion; _} = ~ppf_dump:i.ppf_dump; Compilenv.save_unit_info (cmx i)) -let reset_compilenv ~module_name = - let for_pack_prefix = Compilation_unit.Prefix.from_clflags () in - let comp_unit = - Compilation_unit.create for_pack_prefix - (Compilation_unit.Name.of_string module_name) - in - Compilenv.reset comp_unit - (* Emit assembly directly from Linear IR *) let emit i = - reset_compilenv ~module_name:i.module_name; + Compilenv.reset i.module_name; Asmgen.compile_implementation_linear i.output_prefix ~progname:i.source_file let implementation ~backend ~start_from ~source_file ~output_prefix ~keep_symbol_tables:_ = let backend info typed = - reset_compilenv ~module_name:info.module_name; + Compilenv.reset info.module_name; if Config.flambda then flambda info backend typed else clambda info backend typed diff --git a/driver/optmaindriver.ml b/driver/optmaindriver.ml index c990b2c8fab2..35cb5b2d5dc2 100644 --- a/driver/optmaindriver.ml +++ b/driver/optmaindriver.ml @@ -18,9 +18,6 @@ open Clflags module Backend = struct (* See backend_intf.mli. *) - let pack_prefix_for_global_ident id = - Compilenv.pack_prefix_for_global_ident id - let really_import_approx = Import_approx.really_import_approx let import_symbol = Import_approx.import_symbol @@ -137,6 +134,6 @@ let main argv ppf = Location.report_exception ppf x; 2 | () -> - Compmisc.with_ppf_dump ~file_prefix:"profile" + Compmisc.with_ppf_dump ~stdout:() ~file_prefix:"profile" (fun ppf -> Profile.print ppf !Clflags.profile_columns ~timings_precision:!Clflags.timings_precision); 0 diff --git a/file_formats/cmi_format.ml b/file_formats/cmi_format.ml index eadf676e0883..888d654b2d2f 100644 --- a/file_formats/cmi_format.ml +++ b/file_formats/cmi_format.ml @@ -32,11 +32,14 @@ exception Error of error they are used to provide consistency across input_value and output_value usage. *) type signature = Types.signature_item list +type import_info = + Compilation_unit.Name.t * (Compilation_unit.t * Digest.t) option +type crcs = import_info list type flags = pers_flags list -type header = modname * signature +type header = Compilation_unit.t * signature type cmi_infos = { - cmi_name : modname; + cmi_name : Compilation_unit.t; cmi_sign : signature; cmi_crcs : crcs; cmi_flags : flags; @@ -88,7 +91,10 @@ let output_cmi filename oc cmi = output_value oc ((cmi.cmi_name, cmi.cmi_sign) : header); flush oc; let crc = Digest.file filename in - let crcs = (cmi.cmi_name, Some crc) :: cmi.cmi_crcs in + let crcs = + (Compilation_unit.name cmi.cmi_name, Some (cmi.cmi_name, crc)) + :: cmi.cmi_crcs + in output_value oc (crcs : crcs); output_value oc (cmi.cmi_flags : flags); crc diff --git a/file_formats/cmi_format.mli b/file_formats/cmi_format.mli index d4d665fdf5f7..6e5b0c4ecd9e 100644 --- a/file_formats/cmi_format.mli +++ b/file_formats/cmi_format.mli @@ -21,10 +21,13 @@ type pers_flags = | Opaque | Unsafe_string +type import_info = + Compilation_unit.Name.t * (Compilation_unit.t * Digest.t) option + type cmi_infos = { - cmi_name : modname; + cmi_name : Compilation_unit.t; cmi_sign : Types.signature_item list; - cmi_crcs : crcs; + cmi_crcs : import_info list; cmi_flags : pers_flags list; } diff --git a/file_formats/cmo_format.mli b/file_formats/cmo_format.mli index 64c5ad098e10..2a2a686348c3 100644 --- a/file_formats/cmo_format.mli +++ b/file_formats/cmo_format.mli @@ -15,8 +15,6 @@ (* Symbol table information for .cmo and .cma files *) -open Misc - (* Relocation information *) type reloc_info = @@ -27,13 +25,17 @@ type reloc_info = (* Descriptor for compilation units *) +type import_info = + Compilation_unit.Name.t * (Compilation_unit.t * Digest.t) option + type compilation_unit_descr = - { cu_name: Compilation_unit.Name.t; (* Name of compilation unit *) + { cu_name: Compilation_unit.t; (* Name of compilation unit *) mutable cu_pos: int; (* Absolute position in file *) cu_codesize: int; (* Size of code block *) cu_reloc: (reloc_info * int) list; (* Relocation information *) - cu_imports: crcs; (* Names and CRC of intfs imported *) - cu_required_globals: Ident.t list; (* Compilation units whose + cu_imports: import_info list; (* Names and CRC of intfs imported *) + cu_required_globals: Compilation_unit.t list; + (* Compilation units whose initialization side effects must occur before this one. *) cu_primitives: string list; (* Primitives declared inside *) diff --git a/file_formats/cmt_format.ml b/file_formats/cmt_format.ml index a493780e5a79..bf187a4e8683 100644 --- a/file_formats/cmt_format.ml +++ b/file_formats/cmt_format.ml @@ -45,8 +45,11 @@ and binary_part = | Partial_signature_item of signature_item | Partial_module_type of module_type +type import_info = + (Compilation_unit.Name.t * (Compilation_unit.t * Digest.t) option) + type cmt_infos = { - cmt_modname : string; + cmt_modname : Compilation_unit.t; cmt_annots : binary_annots; cmt_value_dependencies : (Types.value_description * Types.value_description) list; @@ -57,7 +60,7 @@ type cmt_infos = { cmt_loadpath : string list; cmt_source_digest : Digest.t option; cmt_initial_env : Env.t; - cmt_imports : (string * Digest.t option) list; + cmt_imports : import_info list; cmt_interface_digest : Digest.t option; cmt_use_summaries : bool; cmt_uid_to_loc : Location.t Shape.Uid.Tbl.t; @@ -175,6 +178,9 @@ let save_cmt filename modname binary_annots sourcefile initial_env cmi shape = | Some cmi -> Some (output_cmi temp_file_name oc cmi) in let source_digest = Option.map Digest.file sourcefile in + let compare_imports (modname1, _crc1) (modname2, _crc2) = + Compilation_unit.Name.compare modname1 modname2 + in let cmt = { cmt_modname = modname; cmt_annots = clear_env binary_annots; @@ -187,7 +193,7 @@ let save_cmt filename modname binary_annots sourcefile initial_env cmi shape = cmt_source_digest = source_digest; cmt_initial_env = if need_to_clear_env then keep_only_summary initial_env else initial_env; - cmt_imports = List.sort compare (Env.imports ()); + cmt_imports = List.sort compare_imports (Env.imports ()); cmt_interface_digest = this_crc; cmt_use_summaries = need_to_clear_env; cmt_uid_to_loc = Env.get_uid_to_loc_tbl (); diff --git a/file_formats/cmt_format.mli b/file_formats/cmt_format.mli index 43e09f123647..1a62f7c791c2 100644 --- a/file_formats/cmt_format.mli +++ b/file_formats/cmt_format.mli @@ -15,8 +15,6 @@ (** cmt and cmti files format. *) -open Misc - (** The layout of a cmt file is as follows: := \{\} \{cmt infos\} \{\} where is the cmi file format: @@ -50,8 +48,11 @@ and binary_part = | Partial_signature_item of signature_item | Partial_module_type of module_type +type import_info = + (Compilation_unit.Name.t * (Compilation_unit.t * Digest.t) option) + type cmt_infos = { - cmt_modname : modname; + cmt_modname : Compilation_unit.t; cmt_annots : binary_annots; cmt_value_dependencies : (Types.value_description * Types.value_description) list; @@ -62,7 +63,7 @@ type cmt_infos = { cmt_loadpath : string list; cmt_source_digest : string option; cmt_initial_env : Env.t; - cmt_imports : crcs; + cmt_imports : import_info list; cmt_interface_digest : Digest.t option; cmt_use_summaries : bool; cmt_uid_to_loc : Location.t Shape.Uid.Tbl.t; @@ -91,7 +92,7 @@ val read_cmi : string -> Cmi_format.cmi_infos writes a cmt(i) file. *) val save_cmt : string -> (* filename.cmt to generate *) - string -> (* module name *) + Compilation_unit.t -> (* module name *) binary_annots -> string option -> (* source file *) Env.t -> (* initial env *) diff --git a/file_formats/cmx_format.mli b/file_formats/cmx_format.mli index 840695b4eaf7..4b5b321fb0c0 100644 --- a/file_formats/cmx_format.mli +++ b/file_formats/cmx_format.mli @@ -19,7 +19,10 @@ (* Format of .cmx, .cmxa and .cmxs files *) -open Misc +type import_info_cmi = + Compilation_unit.Name.t * (Compilation_unit.t * Digest.t) option +type import_info_cmx = + Compilation_unit.t * Digest.t option (* Each .o file has a matching .cmx file that provides the following infos on the compilation unit: @@ -37,15 +40,15 @@ type export_info = type apply_fn := int * Lambda.alloc_mode type unit_infos = - (* CR lmaurer: Consider renaming [ui_name], say to [ui_unit]. Code like - [Compilation_unit.name ui_name] makes me wonder what a name's name is. *) { mutable ui_unit: Compilation_unit.t; (* Compilation unit implemented *) mutable ui_defines: Compilation_unit.t list; (* All compilation units in the .cmx file (i.e. [ui_name] and any produced via [Asmpackager]) *) - mutable ui_imports_cmi: crcs; (* Interfaces imported *) - mutable ui_imports_cmx: crcs; (* Infos imported *) + mutable ui_imports_cmi: import_info_cmi list; + (* Interfaces imported *) + mutable ui_imports_cmx: import_info_cmx list; + (* Infos imported *) mutable ui_curry_fun: Clambda.arity list; (* Currying functions needed *) mutable ui_apply_fun: apply_fn list; (* Apply functions needed *) mutable ui_send_fun: apply_fn list; (* Send functions needed *) diff --git a/file_formats/cmxs_format.mli b/file_formats/cmxs_format.mli index f375a341ef41..6e3f703997c7 100644 --- a/file_formats/cmxs_format.mli +++ b/file_formats/cmxs_format.mli @@ -15,17 +15,16 @@ (* Format of .cmxs files *) -open Misc - (* Each .cmxs dynamically-loaded plugin contains a symbol "caml_plugin_header" containing the following info (as an externed record) *) type dynunit = { - dynu_name: Compilation_unit.Name.t; + dynu_name: Compilation_unit.t; dynu_crc: Digest.t; - dynu_imports_cmi: crcs; - dynu_imports_cmx: crcs; + dynu_imports_cmi: + (Compilation_unit.Name.t * (Compilation_unit.t * Digest.t) option) list; + dynu_imports_cmx: (Compilation_unit.t * Digest.t option) list; dynu_defines: Compilation_unit.t list; } diff --git a/jst.dune b/jst.dune index f5cfca3e38e7..8947ecc8cfda 100644 --- a/jst.dune +++ b/jst.dune @@ -63,7 +63,7 @@ ;; middle_end/flambda/ alias_analysis allocated_const augment_specialised_args build_export_info closure_conversion closure_conversion_aux closure_offsets effect_analysis - export_info export_info_for_pack extract_projections find_recursive_functions + export_info extract_projections find_recursive_functions flambda flambda_invariants flambda_iterators flambda_middle_end flambda_to_clambda flambda_utils freshening import_approx inconstant_idents initialize_symbol_to_let_symbol inline_and_simplify inline_and_simplify_aux diff --git a/lambda/debuginfo.ml b/lambda/debuginfo.ml index 4f0b7bc5b3b5..435f28fae673 100644 --- a/lambda/debuginfo.ml +++ b/lambda/debuginfo.ml @@ -68,6 +68,10 @@ module Scoped_location = struct let enter_value_definition ~scopes id = cons scopes Sc_value_definition (dot scopes (Ident.name id)) (Ident.name id) + let enter_compilation_unit ~scopes cu = + let name = Compilation_unit.name_as_string cu in + cons scopes Sc_module_definition (dot scopes name) name + let enter_module_definition ~scopes id = cons scopes Sc_module_definition (dot scopes (Ident.name id)) (Ident.name id) diff --git a/lambda/debuginfo.mli b/lambda/debuginfo.mli index da5be7b75093..c811b901a970 100644 --- a/lambda/debuginfo.mli +++ b/lambda/debuginfo.mli @@ -14,12 +14,25 @@ (**************************************************************************) module Scoped_location : sig - type scopes + type scope_item = private + | Sc_anonymous_function + | Sc_value_definition + | Sc_module_definition + | Sc_class_definition + | Sc_method_definition + | Sc_partial_or_eta_wrapper + | Sc_lazy + + type scopes = private + | Empty + | Cons of {item: scope_item; str: string; str_fun: string; name : string; prev: scopes} + val string_of_scopes : scopes -> string val empty_scopes : scopes val enter_anonymous_function : scopes:scopes -> scopes val enter_value_definition : scopes:scopes -> Ident.t -> scopes + val enter_compilation_unit : scopes:scopes -> Compilation_unit.t -> scopes val enter_module_definition : scopes:scopes -> Ident.t -> scopes val enter_class_definition : scopes:scopes -> Ident.t -> scopes val enter_method_definition : scopes:scopes -> Asttypes.label -> scopes diff --git a/lambda/lambda.ml b/lambda/lambda.ml index ae50ca780b2d..9ee7cffc92f5 100644 --- a/lambda/lambda.ml +++ b/lambda/lambda.ml @@ -107,8 +107,9 @@ type primitive = | Pbytes_of_string | Pignore (* Globals *) - | Pgetglobal of Ident.t - | Psetglobal of Ident.t + | Pgetglobal of Compilation_unit.t + | Psetglobal of Compilation_unit.t + | Pgetpredef of Ident.t (* Operations on heap blocks *) | Pmakeblock of int * mutable_flag * block_shape * alloc_mode | Pmakefloatblock of mutable_flag * alloc_mode @@ -375,6 +376,11 @@ type check_attribute = | Assert of property | Assume of property +type loop_attribute = + | Always_loop (* [@loop] or [@loop always] *) + | Never_loop (* [@loop never] *) + | Default_loop (* no [@loop] attribute *) + type function_kind = Curried of {nlocal: int} | Tupled type let_kind = Strict | Alias | StrictOpt @@ -396,6 +402,7 @@ type function_attribute = { local: local_attribute; check : check_attribute; poll: poll_attribute; + loop: loop_attribute; is_a_functor: bool; stub: bool; tmc_candidate: bool; @@ -490,9 +497,9 @@ and lambda_event_kind = | Lev_module_definition of Ident.t type program = - { module_ident : Ident.t; + { compilation_unit : Compilation_unit.t; main_module_block_size : int; - required_globals : Ident.Set.t; + required_globals : Compilation_unit.Set.t; code : lambda } let const_int n = Const_base (Const_int n) @@ -537,6 +544,7 @@ let default_function_attribute = { local = Default_local; check = Default_check ; poll = Default_poll; + loop = Default_loop; is_a_functor = false; stub = false; tmc_candidate = false; @@ -831,9 +839,10 @@ let rec patch_guarded patch = function (* Translate an access path *) let rec transl_address loc = function - | Env.Aident id -> - if Ident.is_global_or_predef id - then Lprim(Pgetglobal id, [], loc) + | Env.Aunit cu -> Lprim(Pgetglobal cu, [], loc) + | Env.Alocal id -> + if Ident.is_predef id + then Lprim (Pgetpredef id, [], loc) else Lvar id | Env.Adot(addr, pos) -> Lprim(Pfield (pos, Reads_agree), [transl_address loc addr], loc) @@ -1203,7 +1212,7 @@ let mod_setfield pos = let primitive_may_allocate : primitive -> alloc_mode option = function | Pbytes_to_string | Pbytes_of_string | Pignore -> None - | Pgetglobal _ | Psetglobal _ -> None + | Pgetglobal _ | Psetglobal _ | Pgetpredef _ -> None | Pmakeblock (_, _, _, m) -> Some m | Pmakefloatblock (_, m) -> Some m | Pfield _ | Pfield_computed _ | Psetfield _ | Psetfield_computed _ -> None diff --git a/lambda/lambda.mli b/lambda/lambda.mli index 3ab9328af3a9..c1377f132b7b 100644 --- a/lambda/lambda.mli +++ b/lambda/lambda.mli @@ -74,8 +74,9 @@ type primitive = | Pbytes_of_string | Pignore (* Globals *) - | Pgetglobal of Ident.t - | Psetglobal of Ident.t + | Pgetglobal of Compilation_unit.t + | Psetglobal of Compilation_unit.t + | Pgetpredef of Ident.t (* Operations on heap blocks *) | Pmakeblock of int * mutable_flag * block_shape * alloc_mode | Pmakefloatblock of mutable_flag * alloc_mode @@ -295,6 +296,11 @@ type check_attribute = | Assert of property | Assume of property +type loop_attribute = + | Always_loop (* [@loop] or [@loop always] *) + | Never_loop (* [@loop never] *) + | Default_loop (* no [@loop] attribute *) + type function_kind = Curried of {nlocal: int} | Tupled (* [nlocal] determines how many arguments may be partially applied before the resulting closure must be locally allocated. @@ -323,6 +329,7 @@ type function_attribute = { local: local_attribute; check : check_attribute; poll: poll_attribute; + loop: loop_attribute; is_a_functor: bool; stub: bool; tmc_candidate: bool; @@ -425,15 +432,16 @@ and lambda_event_kind = | Lev_module_definition of Ident.t type program = - { module_ident : Ident.t; + { compilation_unit : Compilation_unit.t; main_module_block_size : int; - required_globals : Ident.Set.t; (* Modules whose initializer side effects - must occur before [code]. *) + required_globals : Compilation_unit.Set.t; + (* Modules whose initializer side effects + must occur before [code]. *) code : lambda } (* Lambda code for the middle-end. * In the closure case the code is a sequence of assignments to a preallocated block of size [main_module_block_size] using - (Setfield(Getglobal(module_ident))). The size is used to preallocate + (Setfield(Getpredef(compilation_unit))). The size is used to preallocate the block. * In the flambda case the code is an expression returning a block value of size [main_module_block_size]. The size is used to build diff --git a/lambda/printlambda.ml b/lambda/printlambda.ml index 79e7d714ab98..a0fa4f6dbf10 100644 --- a/lambda/printlambda.ml +++ b/lambda/printlambda.ml @@ -217,8 +217,9 @@ let primitive ppf = function | Pbytes_to_string -> fprintf ppf "bytes_to_string" | Pbytes_of_string -> fprintf ppf "bytes_of_string" | Pignore -> fprintf ppf "ignore" - | Pgetglobal id -> fprintf ppf "global %a" Ident.print id - | Psetglobal id -> fprintf ppf "setglobal %a" Ident.print id + | Pgetglobal cu -> fprintf ppf "global %a!" Compilation_unit.print cu + | Psetglobal cu -> fprintf ppf "setglobal %a!" Compilation_unit.print cu + | Pgetpredef id -> fprintf ppf "getpredef %a!" Ident.print id | Pmakeblock(tag, Immutable, shape, mode) -> fprintf ppf "make%sblock %i%a" (alloc_mode mode) tag block_shape shape @@ -445,6 +446,7 @@ let name_of_primitive = function | Pignore -> "Pignore" | Pgetglobal _ -> "Pgetglobal" | Psetglobal _ -> "Psetglobal" + | Pgetpredef _ -> "Pgetpredef" | Pmakeblock _ -> "Pmakeblock" | Pmakefloatblock _ -> "Pmakefloatblock" | Pfield _ -> "Pfield" @@ -580,6 +582,11 @@ let function_attribute ppf t = check_attribute ppf t.check; if t.tmc_candidate then fprintf ppf "tail_mod_cons@ "; + begin match t.loop with + | Default_loop -> () + | Always_loop -> fprintf ppf "always_loop@ " + | Never_loop -> fprintf ppf "never_loop@ " + end; begin match t.poll with | Default_poll -> () | Error_poll -> fprintf ppf "error_poll@ " diff --git a/lambda/simplif.ml b/lambda/simplif.ml index 1abb1d6ab3c9..b6a80fecc525 100644 --- a/lambda/simplif.ml +++ b/lambda/simplif.ml @@ -740,22 +740,7 @@ let split_default_wrapper ~id:fun_id ~kind ~params ~return ~body | Llet(Strict, k, id, (Lifthenelse(Lprim (Pisint _, [Lvar optparam], _), _, _, _) as def), rest) when - (not (Clflags.is_flambda2 ())) - && Ident.name optparam = "*opt*" && List.mem_assoc optparam params - && not (List.mem_assoc optparam map) - -> - let wrapper_body, inner = aux ((optparam, id) :: map) add_region rest in - Llet(Strict, k, id, def, wrapper_body), inner - | Llet(Strict, k, id, - (Lswitch(Lvar optparam, - {sw_numconsts = 1; - sw_consts = [_]; - sw_numblocks = 1; - sw_blocks = [_]; - sw_failaction = None}, _dbg, _) - as def), rest) when - Clflags.is_flambda2 () - && Ident.name optparam = "*opt*" && List.mem_assoc optparam params + Ident.name optparam = "*opt*" && List.mem_assoc optparam params && not (List.mem_assoc optparam map) -> let wrapper_body, inner = aux ((optparam, id) :: map) add_region rest in diff --git a/lambda/tmc.ml b/lambda/tmc.ml index 720cf6ed9f89..d79ec5de8343 100644 --- a/lambda/tmc.ml +++ b/lambda/tmc.ml @@ -858,7 +858,7 @@ let rec choice ctx t = (* in common cases we just return *) | Pbytes_to_string | Pbytes_of_string - | Pgetglobal _ | Psetglobal _ + | Pgetglobal _ | Psetglobal _ | Pgetpredef _ | Pfield _ | Pfield_computed _ | Psetfield _ | Psetfield_computed _ | Pfloatfield _ | Psetfloatfield _ diff --git a/lambda/translattribute.ml b/lambda/translattribute.ml index 1b312d6d13df..2f10f518eb15 100644 --- a/lambda/translattribute.ml +++ b/lambda/translattribute.ml @@ -47,6 +47,9 @@ let is_tmc_attribute = let is_poll_attribute = [ ["poll"; "ocaml.poll"], true ] +let is_loop_attribute = + [ ["loop"; "ocaml.loop"], true ] + let find_attribute p attributes = let inline_attribute = Builtin_attributes.filter_attributes p attributes in let attr = @@ -228,6 +231,19 @@ let parse_poll_attribute attr = ] payload +let parse_loop_attribute attr = + match attr with + | None -> Default_loop + | Some {Parsetree.attr_name = {txt; loc}; attr_payload = payload} -> + parse_id_payload txt loc + ~default:Default_loop + ~empty:Always_loop + [ + "never", Never_loop; + "always", Always_loop; + ] + payload + let get_inline_attribute l = let attr = find_attribute is_inline_attribute l in parse_inline_attribute attr @@ -255,6 +271,10 @@ let get_poll_attribute l = let attr = find_attribute is_poll_attribute l in parse_poll_attribute attr +let get_loop_attribute l = + let attr = find_attribute is_loop_attribute l in + parse_loop_attribute attr + let check_local_inline loc attr = match attr.local, attr.inline with | Always_local, (Always_inline | Available_inline | Unroll _) -> @@ -371,6 +391,23 @@ let add_check_attribute expr loc attributes = (Printf.sprintf "%s/%s"(to_string a) (to_string b))); expr +let add_loop_attribute expr loc attributes = + match expr with + | Lfunction({ attr = { stub = false } as attr } as funct) -> + begin match get_loop_attribute attributes with + | Default_loop -> expr + | (Always_loop | Never_loop) as loop -> + begin match attr.loop with + | Default_loop -> () + | Always_loop | Never_loop -> + Location.prerr_warning loc + (Warnings.Duplicated_attribute "loop") + end; + let attr = { attr with loop } in + lfunction_with_attr ~attr funct + end + | _ -> expr + let add_tmc_attribute expr loc attributes = match expr with | Lfunction funct -> @@ -459,6 +496,9 @@ let add_function_attributes lam loc attr = let lam = add_check_attribute lam loc attr in + let lam = + add_loop_attribute lam loc attr + in let lam = add_tmc_attribute lam loc attr in diff --git a/lambda/translcore.ml b/lambda/translcore.ml index b7b01e11d276..3a292ec3261a 100644 --- a/lambda/translcore.ml +++ b/lambda/translcore.ml @@ -36,7 +36,7 @@ let use_dup_for_constant_arrays_bigger_than = 4 (* Forward declaration -- to be filled in by Translmod.transl_module *) let transl_module = ref((fun ~scopes:_ _cc _rootpath _modl -> assert false) : - scopes:scopes -> module_coercion -> Path.t option -> + scopes:scopes -> module_coercion -> Longident.t option -> module_expr -> lambda) let transl_object = @@ -61,13 +61,12 @@ let prim_fresh_oo_id = let transl_extension_constructor ~scopes env path ext = let path = Printtyp.wrap_printing_env env ~error:true (fun () -> - Option.map (Printtyp.rewrite_double_underscore_paths env) path) + Option.map (Printtyp.rewrite_double_underscore_longidents env) path) in let name = - match path, !Clflags.for_package with - None, _ -> Ident.name ext.ext_id - | Some p, None -> Path.name p - | Some p, Some pack -> Printf.sprintf "%s.%s" pack (Path.name p) + match path with + | None -> Ident.name ext.ext_id + | Some path -> Format.asprintf "%a" Pprintast.longident path in let loc = of_location ~scopes ext.ext_loc in match ext.ext_kind with @@ -183,6 +182,8 @@ let rec trivial_pat pat = match pat.pat_desc with Tpat_var _ | Tpat_any -> true + | Tpat_alias (p, _, _) -> + trivial_pat p | Tpat_construct (_, cd, [], _) -> not cd.cstr_generalized && cd.cstr_consts = 1 && cd.cstr_nonconsts = 0 | Tpat_tuple patl -> @@ -826,6 +827,7 @@ and transl_exp0 ~in_new_scope ~scopes e = specialise = Always_specialise; local = Never_local; check = Default_check; + loop = Never_loop; is_a_functor = false; stub = false; poll = Default_poll; diff --git a/lambda/translcore.mli b/lambda/translcore.mli index 77981e11e571..72901a70fd70 100644 --- a/lambda/translcore.mli +++ b/lambda/translcore.mli @@ -38,7 +38,7 @@ val transl_let: scopes:scopes -> ?in_structure:bool -> rec_flag -> value_binding list -> value_kind -> lambda -> lambda val transl_extension_constructor: scopes:scopes -> - Env.t -> Path.t option -> + Env.t -> Longident.t option -> extension_constructor -> lambda val transl_scoped_exp : scopes:scopes -> expression -> lambda @@ -57,7 +57,7 @@ val report_error: formatter -> error -> unit (* Forward declaration -- to be filled in by Translmod.transl_module *) val transl_module : - (scopes:scopes -> module_coercion -> Path.t option -> + (scopes:scopes -> module_coercion -> Longident.t option -> module_expr -> lambda) ref val transl_object : (scopes:scopes -> Ident.t -> string list -> diff --git a/lambda/translmod.ml b/lambda/translmod.ml index 7a4e43141698..db6602023d29 100644 --- a/lambda/translmod.ml +++ b/lambda/translmod.ml @@ -18,7 +18,6 @@ open Misc open Asttypes -open Path open Types open Typedtree open Lambda @@ -50,15 +49,29 @@ let cons_opt x_opt xs = (* Keep track of the root path (from the root of the namespace to the currently compiled module expression). Useful for naming extensions. *) -let global_path glob = Some(Pident glob) +let longident_of_comp_unit cu = + let rec of_names names_rev = + match names_rev with + | [] -> fatal_error "empty sequence of names" + | [name] -> Longident.Lident name + | name :: names_rev -> Longident.Ldot (of_names names_rev, name) + in + let names_rev = + Compilation_unit.full_path cu + |> List.rev_map Compilation_unit.Name.to_string + in + of_names names_rev + +let global_path cu = + Some(longident_of_comp_unit cu) let functor_path path param = match path with None -> None - | Some p -> Some(Papply(p, Pident param)) + | Some p -> Some(Longident.Lapply(p, Lident (Ident.name param))) let field_path path field = match path with None -> None - | Some p -> Some(Pdot(p, Ident.name field)) + | Some p -> Some(Longident.Ldot(p, Ident.name field)) (* Compile type extensions *) @@ -535,6 +548,7 @@ let rec compile_functor ~scopes mexp coercion root_path loc = local = Default_local; check = Default_check; poll = Default_poll; + loop = Never_loop; is_a_functor = true; stub = false; tmc_candidate = false; @@ -858,29 +872,29 @@ let _ = (* Introduce dependencies on modules referenced only by "external". *) let scan_used_globals lam = - let globals = ref Ident.Set.empty in + let globals = ref Compilation_unit.Set.empty in let rec scan lam = Lambda.iter_head_constructor scan lam; match lam with - Lprim ((Pgetglobal id | Psetglobal id), _, _) -> - globals := Ident.Set.add id !globals + Lprim ((Pgetglobal cu | Psetglobal cu), _, _) -> + globals := Compilation_unit.Set.add cu !globals | _ -> () in scan lam; !globals let required_globals ~flambda body = let globals = scan_used_globals body in - let add_global id req = - if not flambda && Ident.Set.mem id globals then + let add_global comp_unit req = + if not flambda && Compilation_unit.Set.mem comp_unit globals then req else - Ident.Set.add id req + Compilation_unit.Set.add comp_unit req in let required = List.fold_left - (fun acc path -> add_global (Path.head path) acc) - (if flambda then globals else Ident.Set.empty) - (Translprim.get_used_primitives ()) + (fun acc cu -> add_global cu acc) + (if flambda then globals else Compilation_unit.Set.empty) + (Translprim.get_units_with_used_primitives ()) in let required = List.fold_right add_global (Env.get_required_globals ()) required @@ -891,21 +905,20 @@ let required_globals ~flambda body = (* Compile an implementation *) -let transl_implementation_flambda module_name (str, cc) = +let transl_implementation_flambda compilation_unit (str, cc) = reset_labels (); primitive_declarations := []; Translprim.clear_used_primitives (); Translcore.clear_probe_handlers (); - let module_id = Ident.create_persistent module_name in - let scopes = enter_module_definition ~scopes:empty_scopes module_id in + let scopes = enter_compilation_unit ~scopes:empty_scopes compilation_unit in let body, size = Translobj.transl_label_init (fun () -> let body, size = transl_struct ~scopes Loc_unknown [] cc - (global_path module_id) str in + (global_path compilation_unit) str in Translcore.declare_probe_handlers body, size) in - { module_ident = module_id; + { compilation_unit; main_module_block_size = size; required_globals = required_globals ~flambda:true body; code = body } @@ -915,7 +928,7 @@ let transl_implementation module_name (str, cc) = transl_implementation_flambda module_name (str, cc) in let code = - Lprim (Psetglobal implementation.module_ident, [implementation.code], + Lprim (Psetglobal implementation.compilation_unit, [implementation.code], Loc_unknown) in { implementation with code } @@ -1481,7 +1494,6 @@ let transl_store_gen ~scopes module_name ({ str_items = str }, restr) topl = primitive_declarations := []; Translcore.clear_probe_handlers (); Translprim.clear_used_primitives (); - let module_id = Ident.create_persistent module_name in let (map, prims, aliases, size) = build_ident_map restr (defined_idents str) (more_idents str) in let f str = @@ -1491,37 +1503,36 @@ let transl_store_gen ~scopes module_name ({ str_items = str }, restr) topl = assert (size = 0); Lambda.subst (fun _ _ env -> env) !transl_store_subst (transl_exp ~scopes expr) - | str -> transl_store_structure ~scopes module_id map prims aliases str + | str -> + transl_store_structure ~scopes module_name map prims aliases str in Translcore.declare_probe_handlers expr in - transl_store_label_init module_id size f str + transl_store_label_init module_name size f str (*size, transl_label_init (transl_store_structure module_id map prims str)*) let transl_store_phrases module_name str = let scopes = - enter_module_definition ~scopes:empty_scopes - (Ident.create_persistent module_name) + enter_compilation_unit ~scopes:empty_scopes module_name in transl_store_gen ~scopes module_name (str,Tcoerce_none) true -let transl_store_implementation module_name (str, restr) = +let transl_store_implementation compilation_unit (str, restr) = let s = !transl_store_subst in transl_store_subst := Ident.Map.empty; - let module_ident = Ident.create_persistent module_name in - let scopes = enter_module_definition ~scopes:empty_scopes module_ident in - let (i, code) = transl_store_gen ~scopes module_name (str, restr) false in + let scopes = enter_compilation_unit ~scopes:empty_scopes compilation_unit in + let i, code = transl_store_gen ~scopes compilation_unit (str, restr) false in transl_store_subst := s; { Lambda.main_module_block_size = i; code; - (* module_ident is not used by closure, but this allow to share + (* compilation_unit is not used by closure, but this allow to share the type with the flambda version *) - module_ident; + compilation_unit; required_globals = required_globals ~flambda:true code } (* Compile a toplevel phrase *) -let toploop_ident = Ident.create_persistent "Toploop" +let toploop_unit = Compilation_unit.of_string "Toploop" let toploop_getvalue_pos = 0 (* position of getvalue in module Toploop *) let toploop_setvalue_pos = 1 (* position of setvalue in module Toploop *) @@ -1539,7 +1550,7 @@ let toploop_getvalue id = Lapply{ ap_loc=Loc_unknown; ap_func=Lprim(mod_field toploop_getvalue_pos, - [Lprim(Pgetglobal toploop_ident, [], Loc_unknown)], + [Lprim(Pgetglobal toploop_unit, [], Loc_unknown)], Loc_unknown); ap_args=[Lconst(Const_base( Const_string (toplevel_name id, Location.none, None)))]; @@ -1555,7 +1566,7 @@ let toploop_setvalue id lam = Lapply{ ap_loc=Loc_unknown; ap_func=Lprim(mod_field toploop_setvalue_pos, - [Lprim(Pgetglobal toploop_ident, [], Loc_unknown)], + [Lprim(Pgetglobal toploop_unit, [], Loc_unknown)], Loc_unknown); ap_args= [Lconst(Const_base( @@ -1613,7 +1624,7 @@ let transl_toplevel_item ~scopes item = set_toplevel_unique_name id; let lam = transl_module ~scopes:(enter_module_definition ~scopes id) - Tcoerce_none (Some(Pident id)) modl in + Tcoerce_none (Some(Lident (Ident.name id))) modl in toploop_setvalue id lam | Tstr_recmodule bindings -> let idents = List.filter_map (fun mb -> mb.mb_id) bindings in @@ -1625,7 +1636,7 @@ let transl_toplevel_item ~scopes item = | Some id -> transl_module ~scopes:(enter_module_definition ~scopes id) - Tcoerce_none (Some (Pident id)) modl) + Tcoerce_none (Some (Lident (Ident.name id))) modl) bindings (make_sequence toploop_setvalue_id idents) | Tstr_class cl_list -> diff --git a/lambda/translmod.mli b/lambda/translmod.mli index af042d6a539b..926ca2aa30ec 100644 --- a/lambda/translmod.mli +++ b/lambda/translmod.mli @@ -20,25 +20,27 @@ open Typedtree open Lambda val transl_implementation: - string -> structure * module_coercion -> Lambda.program -val transl_store_phrases: string -> structure -> int * lambda + Compilation_unit.t -> structure * module_coercion -> Lambda.program +val transl_store_phrases: Compilation_unit.t -> structure -> int * lambda val transl_store_implementation: - string -> structure * module_coercion -> Lambda.program + Compilation_unit.t -> structure * module_coercion -> Lambda.program val transl_implementation_flambda: - string -> structure * module_coercion -> Lambda.program + Compilation_unit.t -> structure * module_coercion -> Lambda.program val transl_toplevel_definition: structure -> lambda val transl_package: - Ident.t option list -> Ident.t -> module_coercion -> lambda + Compilation_unit.t option list -> Compilation_unit.t -> module_coercion + -> lambda val transl_store_package: - Ident.t option list -> Ident.t -> module_coercion -> int * lambda + Compilation_unit.t option list -> Compilation_unit.t -> module_coercion + -> int * lambda val transl_package_flambda: - Ident.t option list -> module_coercion -> int * lambda + Compilation_unit.t option list -> module_coercion -> int * lambda val toplevel_name: Ident.t -> string -val nat_toplevel_name: Ident.t -> Ident.t * int +val nat_toplevel_name: Ident.t -> Compilation_unit.t * int val primitive_declarations: Primitive.description list ref diff --git a/lambda/translobj.mli b/lambda/translobj.mli index c27053e96111..cbe9ac811197 100644 --- a/lambda/translobj.mli +++ b/lambda/translobj.mli @@ -23,7 +23,7 @@ val meth: lambda -> string -> lambda * lambda list val reset_labels: unit -> unit val transl_label_init: (unit -> lambda * 'a) -> lambda * 'a val transl_store_label_init: - Ident.t -> int -> ('a -> lambda) -> 'a -> int * lambda + Compilation_unit.t -> int -> ('a -> lambda) -> 'a -> int * lambda val method_ids: Ident.Set.t ref (* reset when starting a new wrapper *) diff --git a/lambda/translprim.ml b/lambda/translprim.ml index 744248786be1..a023b5567cec 100644 --- a/lambda/translprim.ml +++ b/lambda/translprim.ml @@ -93,20 +93,22 @@ type prim = | Apply of Lambda.region_close | Revapply of Lambda.region_close -let used_primitives = Hashtbl.create 7 +let units_with_used_primitives = Hashtbl.create 7 let add_used_primitive loc env path = match path with - Some (Path.Pdot _ as path) -> - let path = Env.normalize_path_prefix (Some loc) env path in - let unit = Path.head path in - if Ident.is_global_or_predef unit - && not (Hashtbl.mem used_primitives path) - then Hashtbl.add used_primitives path loc + Some (Path.Pdot (path, _)) -> + let address = Env.find_module_address path env in + begin match Env.address_head address with + | AHunit cu -> + if not (Hashtbl.mem units_with_used_primitives cu) + then Hashtbl.add units_with_used_primitives cu loc + | AHlocal _ -> () + end | _ -> () -let clear_used_primitives () = Hashtbl.clear used_primitives -let get_used_primitives () = - Hashtbl.fold (fun path _ acc -> path :: acc) used_primitives [] +let clear_used_primitives () = Hashtbl.clear units_with_used_primitives +let get_units_with_used_primitives () = + Hashtbl.fold (fun path _ acc -> path :: acc) units_with_used_primitives [] let gen_array_kind = if Config.flat_float_array then Pgenarray else Paddrarray @@ -642,8 +644,13 @@ let lambda_of_loc kind sloc = | Loc_FILE -> Lconst (Const_immstring file) | Loc_MODULE -> let filename = Filename.basename file in - let name = Env.get_unit_name () in - let module_name = if name = "" then "//"^filename^"//" else name in + let name = Compilation_unit.get_current () in + let module_name = + match name with + | None -> "//"^filename^"//" + | Some comp_unit -> + Compilation_unit.name_as_string comp_unit + in Lconst (Const_immstring module_name) | Loc_LOC -> let loc = Printf.sprintf "File %S, line %d, characters %d-%d" @@ -846,7 +853,7 @@ let lambda_primitive_needs_event_after = function | Pbbswap _ | Pobj_dup -> true | Pbytes_to_string | Pbytes_of_string | Pignore | Psetglobal _ - | Pgetglobal _ | Pmakeblock _ | Pmakefloatblock _ + | Pgetglobal _ | Pgetpredef _ | Pmakeblock _ | Pmakefloatblock _ | Pfield _ | Pfield_computed _ | Psetfield _ | Psetfield_computed _ | Pfloatfield _ | Psetfloatfield _ | Praise _ | Psequor | Psequand | Pnot | Pnegint | Paddint | Psubint | Pmulint diff --git a/lambda/translprim.mli b/lambda/translprim.mli index f35c0bb3af37..5f3c1cb8020a 100644 --- a/lambda/translprim.mli +++ b/lambda/translprim.mli @@ -27,7 +27,7 @@ val add_exception_ident : Ident.t -> unit val remove_exception_ident : Ident.t -> unit val clear_used_primitives : unit -> unit -val get_used_primitives: unit -> Path.t list +val get_units_with_used_primitives: unit -> Compilation_unit.t list val check_primitive_arity : Location.t -> Primitive.description -> unit diff --git a/middle_end/backend_intf.mli b/middle_end/backend_intf.mli index ee5257387e2b..3d2fcba9b971 100644 --- a/middle_end/backend_intf.mli +++ b/middle_end/backend_intf.mli @@ -19,10 +19,6 @@ (** Knowledge that the middle end needs about the backend. *) module type S = sig - (** Compute the pack prefix for the given identifier. *) - (* CR mshinwell: rename to pack_prefix_for_global_ident *) - val pack_prefix_for_global_ident : (Ident.t -> Compilation_unit.Prefix.t) - (** If the given approximation is that of a symbol (Value_symbol) or an external (Value_extern), attempt to find a more informative approximation from a previously-written compilation artifact. In the diff --git a/middle_end/closure/closure.ml b/middle_end/closure/closure.ml index 285bb8ebf773..667fd51b53e2 100644 --- a/middle_end/closure/closure.ml +++ b/middle_end/closure/closure.ml @@ -62,10 +62,16 @@ let rec build_closure_env env_param pos = function and no longer in Cmmgen so that approximations stored in .cmx files contain the right names if the -for-pack option is active. *) -let getglobal dbg id = - let symbol = Compilenv.symbol_for_global id |> Linkage_name.to_string in +let getsymbol dbg symbol = + let symbol = Symbol.linkage_name symbol |> Linkage_name.to_string in Uprim (P.Pread_symbol symbol, [], dbg) +let getglobal dbg cu = + getsymbol dbg (Symbol.for_compilation_unit cu) + +let getpredef dbg id = + getsymbol dbg (Symbol.for_predef_ident id) + let region ulam = let is_trivial = match ulam with @@ -1218,22 +1224,25 @@ let rec close ({ backend; fenv; cenv ; mutable_vars } as env) lam = | Lprim((Pbytes_to_string | Pbytes_of_string | Pobj_magic), [arg], _loc) -> close env arg - | Lprim(Pgetglobal id, [], loc) -> + | Lprim(Pgetglobal cu, [], loc) -> + let dbg = Debuginfo.from_location loc in + check_constant_result (getglobal dbg cu) + (Compilenv.global_approx cu) + | Lprim(Pgetpredef id, [], loc) -> let dbg = Debuginfo.from_location loc in - check_constant_result (getglobal dbg id) - (Compilenv.global_approx id) + getpredef dbg id, Value_unknown | Lprim(Pfield (n, _), [lam], loc) -> let (ulam, approx) = close env lam in let dbg = Debuginfo.from_location loc in check_constant_result (Uprim(P.Pfield n, [ulam], dbg)) (field_approx n approx) | Lprim(Psetfield(n, is_ptr, init), - [Lprim(Pgetglobal id, [], _); lam], loc) -> + [Lprim(Pgetglobal cu, [], _); lam], loc) -> let (ulam, approx) = close env lam in if approx <> Value_unknown then (!global_approx).(n) <- approx; let dbg = Debuginfo.from_location loc in - (Uprim(P.Psetfield(n, is_ptr, init), [getglobal dbg id; ulam], dbg), + (Uprim(P.Psetfield(n, is_ptr, init), [getglobal dbg cu; ulam], dbg), Value_unknown) | Lprim(Praise k, [arg], loc) -> let (ulam, _approx) = close env arg in @@ -1657,8 +1666,7 @@ let intro ~backend ~size lam = let opaque = !Clflags.opaque || Env.is_imported_opaque - (Compilation_unit.get_current_exn () - |> Compilation_unit.full_path_as_string) + (Compilation_unit.name (Compilation_unit.get_current_exn ())) in if opaque then Compilenv.set_global_approx(Value_unknown) diff --git a/middle_end/closure/closure_middle_end.ml b/middle_end/closure/closure_middle_end.ml index 1ba1795034e0..230d96f8e28b 100644 --- a/middle_end/closure/closure_middle_end.ml +++ b/middle_end/closure/closure_middle_end.ml @@ -38,7 +38,8 @@ let lambda_to_clambda ~backend ~prefixname:_ ~ppf_dump let current_unit_ident = Compilation_unit.get_current_exn () |> Compilation_unit.name - |> Compilation_unit.Name.persistent_ident + |> Compilation_unit.Name.to_string + |> Ident.create_persistent in { original_idents = []; module_path = Path.Pident current_unit_ident; diff --git a/middle_end/compilenv.ml b/middle_end/compilenv.ml index 01dae651ca05..f126fdc45df0 100644 --- a/middle_end/compilenv.ml +++ b/middle_end/compilenv.ml @@ -29,7 +29,7 @@ module CU = Compilation_unit type error = Not_a_unit_info of string | Corrupted_unit_info of string - | Illegal_renaming of CU.Name.t * CU.Name.t * string + | Illegal_renaming of CU.t * CU.t * string exception Error of error @@ -92,7 +92,7 @@ let current_unit = let reset compilation_unit = CU.Name.Tbl.clear global_infos_table; Set_of_closures_id.Tbl.clear imported_sets_of_closures_table; - CU.set_current compilation_unit; + CU.set_current (Some compilation_unit); current_unit.ui_unit <- compilation_unit; current_unit.ui_defines <- [compilation_unit]; current_unit.ui_imports_cmi <- []; @@ -137,44 +137,44 @@ let read_library_info filename = (* Read and cache info on global identifiers *) -let get_unit_info modname = - if CU.Name.equal modname (CU.name current_unit.ui_unit) +let get_unit_info comp_unit ~cmx_name = + if CU.Name.equal cmx_name (CU.name current_unit.ui_unit) then Some current_unit else begin try - CU.Name.Tbl.find global_infos_table modname + CU.Name.Tbl.find global_infos_table cmx_name with Not_found -> let (infos, crc) = - if Env.is_imported_opaque (modname |> CU.Name.to_string) - then (None, None) + if Env.is_imported_opaque cmx_name then (None, None) else begin try let filename = - Load_path.find_uncap ((modname |> CU.Name.to_string) ^ ".cmx") in + Load_path.find_uncap ((cmx_name |> CU.Name.to_string) ^ ".cmx") in let (ui, crc) = read_unit_info filename in - if not (CU.Name.equal (CU.name ui.ui_unit) modname) - then - raise(Error(Illegal_renaming(modname, CU.name ui.ui_unit, filename))); + if not (CU.equal ui.ui_unit comp_unit) then + raise(Error(Illegal_renaming(comp_unit, ui.ui_unit, filename))); (Some ui, Some crc) with Not_found -> - let warn = Warnings.No_cmx_file (modname |> CU.Name.to_string) in + let warn = Warnings.No_cmx_file (cmx_name |> CU.Name.to_string) in Location.prerr_warning Location.none warn; (None, None) end in current_unit.ui_imports_cmx <- - (modname |> CU.Name.to_string, crc) :: current_unit.ui_imports_cmx; - CU.Name.Tbl.add global_infos_table modname infos; + (comp_unit, crc) :: current_unit.ui_imports_cmx; + CU.Name.Tbl.add global_infos_table cmx_name infos; infos end +let which_cmx_file desired_comp_unit = + CU.which_cmx_file desired_comp_unit ~accessed_by:(CU.get_current_exn ()) + let get_global_info global_ident = - assert (Ident.is_global global_ident); - get_unit_info (global_ident |> Ident.name |> CU.Name.of_string) + get_unit_info global_ident ~cmx_name:(which_cmx_file global_ident) let cache_unit_info ui = - CU.Name.Tbl.add global_infos_table (CU.name ui.ui_unit) (Some ui) + CU.Name.Tbl.add global_infos_table (which_cmx_file ui.ui_unit) (Some ui) (* Return the approximation of a global identifier *) @@ -185,49 +185,20 @@ let get_clambda_approx ui = | Clambda approx -> approx let toplevel_approx : - (string, Clambda.value_approximation) Hashtbl.t = Hashtbl.create 16 + (CU.t, Clambda.value_approximation) Hashtbl.t = Hashtbl.create 16 let record_global_approx_toplevel () = Hashtbl.add toplevel_approx - (CU.Name.to_string (CU.name current_unit.ui_unit)) + current_unit.ui_unit (get_clambda_approx current_unit) let global_approx id = - if Ident.is_predef id then Clambda.Value_unknown - else try Hashtbl.find toplevel_approx (Ident.name id) + try Hashtbl.find toplevel_approx id with Not_found -> match get_global_info id with | None -> Clambda.Value_unknown | Some ui -> get_clambda_approx ui -(* Determination of pack prefixes for units and identifiers *) - -let pack_prefix_for_current_unit () = - CU.for_pack_prefix current_unit.ui_unit - -let pack_prefix_for_global_ident id = - if not (Ident.is_global id) then - Misc.fatal_errorf "Identifier %a is not global" Ident.print id - else if Hashtbl.mem toplevel_approx (Ident.name id) then - CU.for_pack_prefix (CU.get_current_exn ()) - else - match get_global_info id with - | Some ui -> CU.for_pack_prefix ui.ui_unit - | None -> - (* If the .cmx file is missing, the prefix is assumed to be empty. *) - CU.Prefix.empty - -let symbol_for_global' id = - assert (Ident.is_global_or_predef id); - let pack_prefix = - if Ident.is_global id then pack_prefix_for_global_ident id - else CU.Prefix.empty - in - Symbol.for_global_or_predef_ident pack_prefix id - -let symbol_for_global id = - symbol_for_global' id |> Symbol.linkage_name - (* Register the approximation of the module being compiled *) let set_global_approx approx = @@ -246,67 +217,18 @@ let set_export_info export_info = assert(Config.flambda); current_unit.ui_export_info <- Flambda export_info -(* Determine which .cmx file to load for a given compilation unit. - This is tricky in the case of packs. It can be done by lining up the - desired compilation unit's full path (i.e. pack prefix then unit name) - against the current unit's full path and observing when/if they diverge. *) -let which_cmx_file desired_comp_unit = - let desired_prefix = CU.for_pack_prefix desired_comp_unit in - if CU.Prefix.is_empty desired_prefix then - (* If the unit we're looking for is not in a pack, then the correct .cmx - file is the one with the same name as the unit, irrespective of any - current pack. *) - CU.name desired_comp_unit - else - let current_comp_unit = Compilation_unit.get_current_exn () in - (* This lines up the full paths as described above. *) - let rec match_components ~current ~desired = - match current, desired with - | current_name::current, desired_name::desired -> - if CU.Name.equal current_name desired_name then - (* The full paths are equal up to the current point; keep going. *) - match_components ~current ~desired - else - (* The paths have diverged. The next component of the desired - path is the .cmx file to load. *) - desired_name - | [], desired_name::_desired -> - (* The whole of the current unit's full path (including the name of - the unit itself) is now known to be a prefix of the desired unit's - pack *prefix*. This means we must be making a pack. The .cmx - file to load is named after the next component of the desired - unit's path (which may in turn be a pack). *) - desired_name - | [], [] -> - (* The paths were equal, so the desired compilation unit is just the - current one. *) - CU.name desired_comp_unit - | _::_, [] -> - (* The current path is longer than the desired unit's path, which - means we're attempting to go back up the pack hierarchy. This is - an error. *) - Misc.fatal_errorf "Compilation unit@ %a@ is inaccessible when \ - compiling compilation unit@ %a" - CU.print desired_comp_unit - CU.print current_comp_unit - in - match_components ~current:(CU.full_path current_comp_unit) - ~desired:(CU.full_path desired_comp_unit) - let approx_for_global comp_unit = if CU.equal comp_unit CU.predef_exn then invalid_arg "approx_for_global with predef_exn compilation unit"; - let comp_unit_name = which_cmx_file comp_unit in - let id = Ident.create_persistent (comp_unit_name |> CU.Name.to_string) in - let modname = Ident.name id |> CU.Name.of_string in - match CU.Name.Tbl.find export_infos_table modname with + let cmx_name = which_cmx_file comp_unit in + match CU.Name.Tbl.find export_infos_table cmx_name with | otherwise -> Some otherwise | exception Not_found -> - match get_global_info id with + match get_unit_info comp_unit ~cmx_name with | None -> None | Some ui -> let exported = get_flambda_export_info ui in - CU.Name.Tbl.add export_infos_table modname exported; + CU.Name.Tbl.add export_infos_table cmx_name exported; merged_environment := Export_info.merge !merged_environment exported; Some exported @@ -402,8 +324,7 @@ let structured_constants () = }) let require_global global_ident = - if not (Ident.is_predef global_ident) then - ignore (get_global_info global_ident : Cmx_format.unit_infos option) + ignore (get_global_info global_ident : Cmx_format.unit_infos option) (* Error report *) @@ -420,8 +341,8 @@ let report_error ppf = function fprintf ppf "%a@ contains the description for unit\ @ %a when %a was expected" Location.print_filename filename - CU.Name.print name - CU.Name.print modname + CU.print name + CU.print modname let () = Location.register_error_of_exn diff --git a/middle_end/compilenv.mli b/middle_end/compilenv.mli index df4b60b530b8..70cb09b95e47 100644 --- a/middle_end/compilenv.mli +++ b/middle_end/compilenv.mli @@ -36,19 +36,7 @@ val reset : Compilation_unit.t -> unit val current_unit_infos: unit -> unit_infos (* Return the infos for the unit being compiled *) -val pack_prefix_for_current_unit : unit -> Compilation_unit.Prefix.t - (* Return the pack prefix for the unit being compiled *) - -val pack_prefix_for_global_ident : Ident.t -> Compilation_unit.Prefix.t - (* Find the pack prefix for an identifier by reading the .cmx file. - The identifier must be [Global]. *) - -val symbol_for_global: Ident.t -> Linkage_name.t - (* Return the asm symbol that refers to the given global identifier - flambda-only *) -val symbol_for_global': Ident.t -> Symbol.t - (* flambda-only *) -val global_approx: Ident.t -> Clambda.value_approximation +val global_approx: Compilation_unit.t -> Clambda.value_approximation (* Return the approximation for the given global identifier clambda-only *) val set_global_approx: Clambda.value_approximation -> unit @@ -107,7 +95,7 @@ val cache_unit_info: unit_infos -> unit honored by [symbol_for_global] and [global_approx] without looking at the corresponding .cmx file. *) -val require_global: Ident.t -> unit +val require_global: Compilation_unit.t -> unit (* Enforce a link dependency of the current compilation unit to the required module *) @@ -116,8 +104,7 @@ val read_library_info: string -> library_infos type error = Not_a_unit_info of string | Corrupted_unit_info of string - | Illegal_renaming of - Compilation_unit.Name.t * Compilation_unit.Name.t * string + | Illegal_renaming of Compilation_unit.t * Compilation_unit.t * string exception Error of error diff --git a/middle_end/convert_primitives.ml b/middle_end/convert_primitives.ml index fa8e12298ba4..d1af3acaa028 100644 --- a/middle_end/convert_primitives.ml +++ b/middle_end/convert_primitives.ml @@ -161,6 +161,7 @@ let convert (prim : Lambda.primitive) : Clambda_primitives.primitive = | Pignore | Pgetglobal _ | Psetglobal _ + | Pgetpredef _ -> Misc.fatal_errorf "lambda primitive %a can't be converted to \ clambda primitive" diff --git a/middle_end/flambda/closure_conversion.ml b/middle_end/flambda/closure_conversion.ml index 8bea3b07fcf4..2be7a810c4b1 100644 --- a/middle_end/flambda/closure_conversion.ml +++ b/middle_end/flambda/closure_conversion.ml @@ -26,16 +26,12 @@ let name_expr = Flambda_utils.name_expr let name_expr_from_var = Flambda_utils.name_expr_from_var type t = { - current_unit_id : Ident.t; + current_unit : Compilation_unit.t; backend : (module Backend_intf.S); mutable imported_symbols : Symbol.Set.t; mutable declared_symbols : (Symbol.t * Flambda.constant_defining_value) list; } -let pack_prefix_for_global_ident t = - let module B = (val t.backend : Backend_intf.S) in - B.pack_prefix_for_global_ident - let add_default_argument_wrappers lam = let defs_are_all_functions (defs : (_ * Lambda.lambda) list) = List.for_all (function (_, Lambda.Lfunction _) -> true | _ -> false) defs @@ -457,22 +453,21 @@ let rec close t env (lam : Lambda.lambda) : Flambda.t = close t env (Lambda.Llet(Strict, Pgenval, Ident.create_local "dummy", arg, Lconst const)) - | Lprim (Pfield _, [Lprim (Pgetglobal id, [],_)], _) - when Ident.same id t.current_unit_id -> + | Lprim (Pfield _, [Lprim (Pgetglobal cu, [],_)], _) + when Compilation_unit.equal cu t.current_unit -> Misc.fatal_errorf "[Pfield (Pgetglobal ...)] for the current compilation \ unit is forbidden upon entry to the middle end" | Lprim (Psetfield (_, _, _), [Lprim (Pgetglobal _, [], _); _], _) -> Misc.fatal_errorf "[Psetfield (Pgetglobal ...)] is \ forbidden upon entry to the middle end" - | Lprim (Pgetglobal id, [], _) when Ident.is_predef id -> + | Lprim (Pgetpredef id, [], _) -> + assert (Ident.is_predef id); let symbol = Symbol.for_predef_ident id in t.imported_symbols <- Symbol.Set.add symbol t.imported_symbols; name_expr (Symbol symbol) ~name:Names.predef_exn - | Lprim (Pgetglobal id, [], _) -> - assert (not (Ident.same id t.current_unit_id)); - let symbol = - Symbol.for_global_or_predef_ident ((pack_prefix_for_global_ident t) id) id - in + | Lprim (Pgetglobal cu, [], _) -> + assert (not (Compilation_unit.equal cu t.current_unit)); + let symbol = Symbol.for_compilation_unit cu in t.imported_symbols <- Symbol.Set.add symbol t.imported_symbols; name_expr (Symbol symbol) ~name:Names.pgetglobal | Lprim (lambda_p, args, loc) -> @@ -703,26 +698,18 @@ and close_let_bound_expression t ?let_rec_ident let_bound_var env ~var:let_bound_var)) | lam -> Expr (close t env lam) -let lambda_to_flambda ~backend ~module_ident ~size lam +let lambda_to_flambda ~backend ~compilation_unit ~size lam : Flambda.program = let lam = add_default_argument_wrappers lam in - let compilation_unit = Compilation_unit.get_current_exn () in - let current_unit_id = - Compilation_unit.name compilation_unit - |> Compilation_unit.Name.to_string - |> Ident.create_persistent - in + let current_unit = Compilation_unit.get_current_exn () in let t = - { current_unit_id; + { current_unit; backend; imported_symbols = Symbol.Set.empty; declared_symbols = []; } in - let module_symbol = - let pack_prefix = Compilation_unit.Prefix.from_clflags () in - Symbol.for_global_or_predef_ident pack_prefix module_ident - in + let module_symbol = Symbol.for_compilation_unit compilation_unit in let block_symbol = let var = Variable.create Internal_variable_names.module_as_block in Symbol_utils.Flambda.for_variable var diff --git a/middle_end/flambda/closure_conversion.mli b/middle_end/flambda/closure_conversion.mli index 67b57145fe64..1125ffeac4e0 100644 --- a/middle_end/flambda/closure_conversion.mli +++ b/middle_end/flambda/closure_conversion.mli @@ -46,7 +46,7 @@ *) val lambda_to_flambda : backend:(module Backend_intf.S) - -> module_ident:Ident.t + -> compilation_unit:Compilation_unit.t -> size:int -> Lambda.lambda -> Flambda.program diff --git a/middle_end/flambda/export_info_for_pack.mli b/middle_end/flambda/export_info_for_pack.mli deleted file mode 100644 index c1dbfb7015f6..000000000000 --- a/middle_end/flambda/export_info_for_pack.mli +++ /dev/null @@ -1,34 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Pierre Chambart, OCamlPro *) -(* Mark Shinwell and Leo White, Jane Street Europe *) -(* *) -(* Copyright 2013--2016 OCamlPro SAS *) -(* Copyright 2014--2016 Jane Street Group LLC *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -[@@@ocaml.warning "+a-4-9-30-40-41-42"] - -(** Transformations on export information that are only used for the - building of packs. *) - -(** Transform the information from [exported] to be - suitable to be reexported as the information for a pack named [pack] - containing units [pack_units]. - It mainly changes symbols of units [pack_units] to refer to - [pack] instead. *) -val import_for_pack - : pack_units:Compilation_unit.Set.t - -> pack:Compilation_unit.Prefix.t - -> Export_info.t - -> Export_info.t - -(** Drops the state after importing several units in the same pack. *) -val clear_import_state : unit -> unit diff --git a/middle_end/flambda/flambda_middle_end.ml b/middle_end/flambda/flambda_middle_end.ml index f9372ba2d8dc..8454db00f25d 100644 --- a/middle_end/flambda/flambda_middle_end.ml +++ b/middle_end/flambda/flambda_middle_end.ml @@ -31,7 +31,7 @@ let _dump_function_sizes flam = set_of_closures.function_decls.funs) let lambda_to_flambda ~ppf_dump ~prefixname ~backend ~size - ~module_ident ~module_initializer = + ~compilation_unit ~module_initializer = Profile.record_call "flambda" (fun () -> let previous_warning_reporter = !Location.warning_reporter in let module WarningSet = @@ -82,7 +82,7 @@ let lambda_to_flambda ~ppf_dump ~prefixname ~backend ~size (fun () -> module_initializer |> Closure_conversion.lambda_to_flambda ~backend - ~module_ident ~size) + ~compilation_unit ~size) in if !Clflags.dump_rawflambda then @@ -216,7 +216,7 @@ let lambda_to_clambda ~backend ~prefixname ~ppf_dump let program = lambda_to_flambda ~ppf_dump ~prefixname ~backend ~size:program.main_module_block_size - ~module_ident:program.module_ident + ~compilation_unit:program.compilation_unit ~module_initializer:program.code in let export = Build_export_info.build_transient program in diff --git a/middle_end/internal_variable_names.ml b/middle_end/internal_variable_names.ml index d8f126991300..8b17c9877cbb 100644 --- a/middle_end/internal_variable_names.ml +++ b/middle_end/internal_variable_names.ml @@ -118,6 +118,7 @@ let pfloatcomp = "Pfloatcomp" let pfloatfield = "Pfloatfield" let pfloatofint = "Pfloatofint" let pgetglobal = "Pgetglobal" +let pgetpredef = "Pgetpredef" let pignore = "Pignore" let pint_as_pointer = "Pint_as_pointer" let pintcomp = "Pintcomp" @@ -221,6 +222,7 @@ let pfloatcomp_arg = "Pfloatcomp_arg" let pfloatfield_arg = "Pfloatfield_arg" let pfloatofint_arg = "Pfloatofint_arg" let pgetglobal_arg = "Pgetglobal_arg" +let pgetpredef_arg = "Pgetpredef_arg" let pobj_dup_arg = "Pobj_dup_arg" let pobj_magic_arg = "Pobj_magic_arg" let pignore_arg = "Pignore_arg" @@ -318,6 +320,7 @@ let of_primitive : Lambda.primitive -> string = function | Pignore -> pignore | Pgetglobal _ -> pgetglobal | Psetglobal _ -> psetglobal + | Pgetpredef _ -> pgetpredef | Pmakeblock _ -> pmakeblock | Pmakefloatblock _ -> pmakefloatblock | Pfield _ -> pfield @@ -425,6 +428,7 @@ let of_primitive_arg : Lambda.primitive -> string = function | Pignore -> pignore_arg | Pgetglobal _ -> pgetglobal_arg | Psetglobal _ -> psetglobal_arg + | Pgetpredef _ -> pgetpredef_arg | Pmakeblock _ -> pmakeblock_arg | Pmakefloatblock _ -> pmakefloatblock_arg | Pfield _ -> pfield_arg diff --git a/ocamldoc/.depend b/ocamldoc/.depend index 3ec61c60c210..64f6ff697055 100644 --- a/ocamldoc/.depend +++ b/ocamldoc/.depend @@ -40,6 +40,7 @@ odoc_analyse.cmo : \ ../typing/env.cmi \ ../utils/config.cmi \ ../driver/compmisc.cmi \ + ../utils/compilation_unit.cmi \ ../utils/clflags.cmi \ odoc_analyse.cmi odoc_analyse.cmx : \ @@ -68,6 +69,7 @@ odoc_analyse.cmx : \ ../typing/env.cmx \ ../utils/config.cmx \ ../driver/compmisc.cmx \ + ../utils/compilation_unit.cmx \ ../utils/clflags.cmx \ odoc_analyse.cmi odoc_analyse.cmi : \ diff --git a/ocamldoc/odoc_analyse.ml b/ocamldoc/odoc_analyse.ml index f9ec3cb69cb8..9751b476df01 100644 --- a/ocamldoc/odoc_analyse.ml +++ b/ocamldoc/odoc_analyse.ml @@ -28,7 +28,11 @@ let init_path () = Compmisc.init_path () (** Return the initial environment in which compilation proceeds. *) let initial_env () = - let current = Env.get_unit_name () in + let current = + match Env.get_unit_name () with + | Some cu -> cu |> Compilation_unit.full_path_as_string + | None -> "" + in let initial = !Odoc_global.initially_opened_module in let initially_opened_module = if initial = current then @@ -71,7 +75,11 @@ let process_implementation_file sourcefile = init_path (); let prefixname = Filename.chop_extension sourcefile in let modulename = String.capitalize_ascii(Filename.basename prefixname) in - Env.set_unit_name modulename; + let compilation_unit = + Compilation_unit.create (Compilation_unit.Prefix.from_clflags ()) + (modulename |> Compilation_unit.Name.of_string) + in + Env.set_unit_name (Some compilation_unit); let inputfile = preprocess sourcefile in let env = initial_env () in try @@ -81,7 +89,7 @@ let process_implementation_file sourcefile = in let typedtree = Typemod.type_implementation - sourcefile prefixname modulename env parsetree + sourcefile prefixname compilation_unit env parsetree in (Some (parsetree, typedtree), inputfile) with @@ -105,7 +113,11 @@ let process_interface_file sourcefile = init_path (); let prefixname = Filename.chop_extension sourcefile in let modulename = String.capitalize_ascii(Filename.basename prefixname) in - Env.set_unit_name modulename; + let compilation_unit = + Compilation_unit.create (Compilation_unit.Prefix.from_clflags ()) + (modulename |> Compilation_unit.Name.of_string) + in + Env.set_unit_name (Some compilation_unit); let inputfile = preprocess sourcefile in let ast = Pparse.file ~tool_name inputfile diff --git a/ocamltest/Makefile b/ocamltest/Makefile index 411f27b61475..cb12063233b2 100644 --- a/ocamltest/Makefile +++ b/ocamltest/Makefile @@ -249,6 +249,7 @@ ocamltest_config.ml: ocamltest_config.ml.in Makefile ../Makefile.config $(call SUBST_STRING,CPP) \ $(call SUBST_STRING,ocamlsrcdir) \ $(call SUBST,FLAMBDA) \ + $(call SUBST,FLAMBDA2) \ $(call SUBST,FORCE_SAFE_STRING) \ $(call SUBST,FLAT_FLOAT_ARRAY) \ $(call SUBST,WITH_OCAMLDOC) \ @@ -276,6 +277,7 @@ ocamltest_config.ml: ocamltest_config.ml.in Makefile ../Makefile.config $(call SUBST,NAKED_POINTERS) \ $(call SUBST,PROBES) \ $(call SUBST,STACK_ALLOCATION) \ + $(call SUBST,POLL_INSERTION) \ $< > $@ # Manual diff --git a/ocamltest/ocaml_actions.ml b/ocamltest/ocaml_actions.ml index e81a209f1b5a..6218c91b7925 100644 --- a/ocamltest/ocaml_actions.ml +++ b/ocamltest/ocaml_actions.ml @@ -1129,13 +1129,15 @@ let no_flat_float_array = make let flambda = Actions.make "flambda" - (Actions_helpers.pass_or_skip Ocamltest_config.flambda + (Actions_helpers.pass_or_skip + (Ocamltest_config.flambda || Ocamltest_config.flambda2) "support for flambda enabled" "support for flambda disabled") let no_flambda = make "no-flambda" - (Actions_helpers.pass_or_skip (not Ocamltest_config.flambda) + (Actions_helpers.pass_or_skip + (not (Ocamltest_config.flambda || Ocamltest_config.flambda2)) "support for flambda disabled" "support for flambda enabled") @@ -1211,6 +1213,18 @@ let no_stack_allocation = Actions.make "Stack allocation disabled" "Stack allocation enabled") +let poll_insertion = Actions.make + "poll-insertion" + (Actions_helpers.pass_or_skip Ocamltest_config.poll_insertion + "Poll insertion enabled" + "Poll insertion disabled") + +let no_poll_insertion = Actions.make + "no-poll-insertion" + (Actions_helpers.pass_or_skip (not Ocamltest_config.poll_insertion) + "Stack allocation disabled" + "Stack allocation enabled") + let ocamldoc = Ocaml_tools.ocamldoc let ocamldoc_output_file env prefix = @@ -1408,6 +1422,8 @@ let _ = no_afl_instrument; stack_allocation; no_stack_allocation; + poll_insertion; + no_poll_insertion; setup_ocamldoc_build_env; run_ocamldoc; check_ocamldoc_output; diff --git a/ocamltest/ocamltest_config.ml.in b/ocamltest/ocamltest_config.ml.in index d33d9edf00a9..2664ffeb8199 100644 --- a/ocamltest/ocamltest_config.ml.in +++ b/ocamltest/ocamltest_config.ml.in @@ -49,6 +49,8 @@ let ocamlsrcdir = "%%ocamlsrcdir%%" let flambda = %%FLAMBDA%% +let flambda2 = %%FLAMBDA2%% + let ocamlc_default_flags = "" let ocamlopt_default_flags = "" @@ -92,3 +94,5 @@ let naked_pointers = %%NAKED_POINTERS%% let probes = %%PROBES%% let stack_allocation = %%STACK_ALLOCATION%% + +let poll_insertion = %%POLL_INSERTION%% diff --git a/ocamltest/ocamltest_config.mli b/ocamltest/ocamltest_config.mli index bcfceca95a4a..3d10cfc2be26 100644 --- a/ocamltest/ocamltest_config.mli +++ b/ocamltest/ocamltest_config.mli @@ -73,6 +73,9 @@ val ocamlsrcdir : string val flambda : bool (** Whether flambda has been enabled at configure time *) +val flambda2 : bool +(** Whether flambda2 has been enabled at configure time *) + val safe_string : bool (** Whether the compiler was configured with -safe-string *) @@ -130,3 +133,6 @@ val probes : bool val stack_allocation : bool (** Whether stack allocation is enabled *) + +val poll_insertion : bool +(** Whether poll insertion is enabled *) diff --git a/otherlibs/dynlink/dune b/otherlibs/dynlink/dune index 1bdaabef1aa8..a112821c40d6 100644 --- a/otherlibs/dynlink/dune +++ b/otherlibs/dynlink/dune @@ -228,13 +228,15 @@ (rule (targets dynlink.cma) - (deps dynlink_internal.cma) (action (run %{ocamlc} -g -a -ccopt %{read:natdynlinkops} -o dynlink.cma + %{deps})) + (deps ; NOTE: Be sure to keep these arguments in dependency order! + .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Int_replace_polymorphic_compare.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Binutils.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Local_store.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Build_path_prefix_map.cmo @@ -250,12 +252,14 @@ .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Location.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Ident.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Longident.cmo + .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Compilation_unit.cmo + .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Linkage_name.cmo + .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Symbol.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Path.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Types.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Syntaxerr.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Bytesections.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Cmi_format.cmo - .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Int_replace_polymorphic_compare.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Debuginfo.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Btype.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Consistbl.cmo @@ -281,26 +285,24 @@ .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Runtimedef.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Symtable.cmo .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Opcodes.cmo - .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Compilation_unit.cmo - .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Linkage_name.cmo - .dynlink_compilerlibs.objs/byte/dynlink_compilerlibs__Symbol.cmo .dynlink_internal.objs/byte/dynlink_types.cmo .dynlink_internal.objs/byte/dynlink_platform_intf.cmo .dynlink_internal.objs/byte/dynlink_common.cmo .dynlink_internal.objs/byte/dynlink.cmo ) - ) ) (rule (targets dynlink.cmxa dynlink.a) - (deps dynlink_internal.cmxa) (action (run %{ocamlopt} -g -a -ccopt %{read:natdynlinkops} -o dynlink.cmxa + %{deps})) + (deps ; NOTE: Be sure to keep these arguments in dependency order! + .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Int_replace_polymorphic_compare.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Binutils.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Local_store.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Build_path_prefix_map.cmx @@ -316,12 +318,14 @@ .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Location.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Ident.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Longident.cmx + .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Compilation_unit.cmx + .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Linkage_name.cmx + .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Symbol.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Path.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Types.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Syntaxerr.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Bytesections.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Cmi_format.cmx - .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Int_replace_polymorphic_compare.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Debuginfo.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Btype.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Consistbl.cmx @@ -347,15 +351,11 @@ .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Runtimedef.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Symtable.cmx .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Opcodes.cmx - .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Compilation_unit.cmx - .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Linkage_name.cmx - .dynlink_compilerlibs.objs/native/dynlink_compilerlibs__Symbol.cmx .dynlink_internal.objs/native/dynlink_types.cmx .dynlink_internal.objs/native/dynlink_platform_intf.cmx .dynlink_internal.objs/native/dynlink_common.cmx .dynlink_internal.objs/native/dynlink.cmx ) - ) ) (executable diff --git a/otherlibs/dynlink/dynlink.ml b/otherlibs/dynlink/dynlink.ml index 78e27b7e4f5e..a74e5b19d7ac 100644 --- a/otherlibs/dynlink/dynlink.ml +++ b/otherlibs/dynlink/dynlink.ml @@ -1,4 +1,4 @@ -#3 "otherlibs/dynlink/dynlink.ml" +#2 "otherlibs/dynlink/dynlink.ml" (**************************************************************************) (* *) (* OCaml *) @@ -23,19 +23,29 @@ open! Dynlink_compilerlibs module DC = Dynlink_common module DT = Dynlink_types +let convert_cmi_import (name, data) = + (name |> Compilation_unit.Name.to_string), + Option.map (fun (_unit, crc) -> crc) data + module Bytecode = struct type filename = string module Unit_header = struct type t = Cmo_format.compilation_unit_descr - let name (t : t) = Compilation_unit.Name.to_string t.cu_name + let name (t : t) = Compilation_unit.full_path_as_string t.cu_name let crc _t = None - let interface_imports (t : t) = t.cu_imports + let interface_imports (t : t) = + List.map convert_cmi_import t.cu_imports + let implementation_imports (t : t) = - let required = + let required_from_unit = t.cu_required_globals + |> List.map Compilation_unit.to_global_ident_for_bytecode + in + let required = + required_from_unit @ Symtable.required_globals t.cu_reloc in let required = @@ -75,20 +85,30 @@ module Bytecode = struct let num_globals_inited () = Misc.fatal_error "Should never be called for bytecode dynlink" + let assume_no_prefix modname = + Compilation_unit.create Compilation_unit.Prefix.empty modname + let fold_initial_units ~init ~f = - List.fold_left (fun acc (comp_unit, interface) -> - let id = Ident.create_persistent comp_unit in + List.fold_left (fun acc (modname, interface) -> + let id = + Compilation_unit.to_global_ident_for_bytecode + (assume_no_prefix modname) + in let defined = Symtable.is_defined_in_global_map !default_global_map id in + let interface = + Option.map (fun (_unit, crc) -> crc) interface + in let implementation = if defined then Some (None, DT.Loaded) else None in let defined_symbols = - if defined then [comp_unit] + if defined then [Ident.name id] else [] in + let comp_unit = modname |> Compilation_unit.Name.to_string in f acc ~comp_unit ~interface ~implementation ~defined_symbols) init !default_crcs @@ -126,7 +146,7 @@ module Bytecode = struct fragments. *) let digest = Digest.string - (file_digest ^ Compilation_unit.Name.to_string compunit.cu_name) + (file_digest ^ Compilation_unit.full_path_as_string compunit.cu_name) in let events = if compunit.cu_debug = 0 then [| |] @@ -189,7 +209,7 @@ end module B = DC.Make (Bytecode) type global_map = { - name : Compilation_unit.Name.t; + name : Compilation_unit.t; crc_intf : Digest.t option; crc_impl : Digest.t option; syms : Symbol.t list; @@ -213,11 +233,16 @@ module Native = struct module Unit_header = struct type t = Cmxs_format.dynunit - let name (t : t) = t.dynu_name |> Compilation_unit.Name.to_string + let name (t : t) = t.dynu_name |> Compilation_unit.name_as_string let crc (t : t) = Some t.dynu_crc - let interface_imports (t : t) = t.dynu_imports_cmi - let implementation_imports (t : t) = t.dynu_imports_cmx + let convert_cmx_import (name, crc) = + (name |> Compilation_unit.name_as_string), crc + + let interface_imports (t : t) = + List.map convert_cmi_import t.dynu_imports_cmi + let implementation_imports (t : t) = + List.map convert_cmx_import t.dynu_imports_cmx let defined_symbols (t : t) = List.map (fun comp_unit -> @@ -239,7 +264,7 @@ module Native = struct let fold_initial_units ~init ~f = let rank = ref 0 in List.fold_left (fun acc { name; crc_intf; crc_impl; syms; } -> - let name = Compilation_unit.Name.to_string name in + let name = Compilation_unit.full_path_as_string name in let syms = List.map (fun sym -> Symbol.linkage_name sym |> Linkage_name.to_string) @@ -279,7 +304,7 @@ module Native = struct (Printexc.get_raw_backtrace ()) let run_shared_startup handle ~filename ~priv = - ndl_run handle "_shared_startup" ~filename ~priv + ndl_run handle "caml_shared_startup" ~filename ~priv let run handle ~filename ~unit_header ~priv = List.iter (fun cu -> ndl_run handle cu ~filename ~priv) diff --git a/otherlibs/dynlink/extract_crc.ml b/otherlibs/dynlink/extract_crc.ml index 49c483942f89..3864e73eaef3 100644 --- a/otherlibs/dynlink/extract_crc.ml +++ b/otherlibs/dynlink/extract_crc.ml @@ -44,7 +44,7 @@ let digest_interface unit loadpath = close_in ic; let crc = match cmi.Cmi_format.cmi_crcs with - (_, Some crc) :: _ -> crc + (_, Some (_unit, crc)) :: _ -> crc | _ -> raise Corrupted_interface in crc diff --git a/otherlibs/unix/unlink.c b/otherlibs/unix/unlink.c index f4cd9bae846e..567f9d6639f8 100644 --- a/otherlibs/unix/unlink.c +++ b/otherlibs/unix/unlink.c @@ -29,7 +29,8 @@ CAMLprim value unix_unlink(value path) caml_unix_check_path(path, "unlink"); p = caml_stat_strdup_to_os(String_val(path)); caml_enter_blocking_section(); - ret = caml_unlink(p); + /* CR mshinwell: caml_unlink causes a compiler error on macOS */ + ret = unlink(p); caml_leave_blocking_section(); caml_stat_free(p); if (ret == -1) uerror("unlink", path); diff --git a/parsing/builtin_attributes.ml b/parsing/builtin_attributes.ml index cead3bc94605..b5b335888298 100644 --- a/parsing/builtin_attributes.ml +++ b/parsing/builtin_attributes.ml @@ -82,6 +82,7 @@ let builtin_attrs = ; "noalloc"; "ocaml.noalloc" ; "untagged"; "ocaml.untagged" ; "poll"; "ocaml.poll" + ; "loop"; "ocaml.loop" ] let builtin_attrs = diff --git a/runtime/alloc.c b/runtime/alloc.c index 21fcc5e4dae5..71900ec7e703 100644 --- a/runtime/alloc.c +++ b/runtime/alloc.c @@ -229,7 +229,7 @@ CAMLprim value caml_alloc_dummy_infix(value vsize, value voffset) block contains no pointers into the heap. However, the block cannot be marshaled or hashed, because not all closinfo fields and infix header fields are correctly initialized. */ - Closinfo_val(v) = Make_closinfo(0, wosize); + Closinfo_val(v) = Make_closinfo(0, wosize, 1); if (offset > 0) { v += Bsize_wsize(offset); Hd_val(v) = Make_header(offset, Infix_tag, Caml_white); diff --git a/runtime/amd64.S b/runtime/amd64.S index ca1d18b09390..ab2cfa969663 100644 --- a/runtime/amd64.S +++ b/runtime/amd64.S @@ -768,9 +768,6 @@ G(caml_system__frametable): .value -1 /* negative frame size => use callback link */ .value 0 /* no roots here */ .align EIGHT_ALIGN - .quad 16 - .quad 0 - .string "amd64.S" #if defined(SYS_macosx) .literal16 diff --git a/runtime/backtrace_nat.c b/runtime/backtrace_nat.c index 61228311ad5c..d48ff7b5dc77 100644 --- a/runtime/backtrace_nat.c +++ b/runtime/backtrace_nat.c @@ -47,7 +47,7 @@ frame_descr * caml_next_frame_descriptor(uintnat * pc, char ** sp) /* Skip to next frame */ if (d->frame_size != 0xFFFF) { /* Regular frame, update sp/pc and return the frame descriptor */ - *sp += (d->frame_size & 0xFFFC); + *sp += (get_frame_size(d) & 0xFFFFFFFC); *pc = Saved_return_address(*sp); #ifdef Mask_already_scanned *pc = Mask_already_scanned(*pc); @@ -164,17 +164,19 @@ static debuginfo debuginfo_extract(frame_descr* d, int alloc_idx) { unsigned char* infoptr; uint32_t debuginfo_offset; + uint32_t frame_size; /* The special frames marking the top of an ML stack chunk are never returned by caml_next_frame_descriptor, so should never reach here. */ - CAMLassert(d->frame_size != 0xffff); + CAMLassert(d->frame_size != 0xFFFF); + frame_size = get_frame_size(d); - if ((d->frame_size & 1) == 0) { + if ((frame_size & 1) == 0) { return NULL; } /* Recover debugging info */ - infoptr = (unsigned char*)&d->live_ofs[d->num_live]; - if (d->frame_size & 2) { + infoptr = get_end_of_live_ofs(d); + if (frame_size & 2) { CAMLassert(alloc_idx == -1 || (0 <= alloc_idx && alloc_idx < *infoptr)); /* skip alloc_lengths */ infoptr += *infoptr + 1; diff --git a/runtime/caml/mlvalues.h b/runtime/caml/mlvalues.h index 677e44e183a5..139f3fd842d6 100644 --- a/runtime/caml/mlvalues.h +++ b/runtime/caml/mlvalues.h @@ -245,20 +245,29 @@ CAMLextern value caml_get_public_method (value obj, value tag); #define Code_val(val) (((code_t *) (val)) [0]) /* Also an l-value. */ #define Closinfo_val(val) Field((val), 1) /* Arity and start env */ /* In the closure info field, the top 8 bits are the arity (signed). + The next least significant bit is set iff the current closure is the + last one to occur in the block. (This is used in the compactor.) The low bit is set to one, to look like an integer. - The remaining bits are the field number for the first word of the - environment, or, in other words, the offset (in words) from the closure - to the environment part. */ + The remaining bits are the field number for the first word of the scannable + part of the environment, or, in other words, the offset (in words) from the + closure to the scannable part of the environment. + The non-scannable part of the environment lives between the end of the + last closure and the start of the scannable environment within the block. */ +/* CR ncourant: it might be cleaner to use a packed struct here */ #ifdef ARCH_SIXTYFOUR #define Arity_closinfo(info) ((intnat)(info) >> 56) -#define Start_env_closinfo(info) (((uintnat)(info) << 8) >> 9) -#define Make_closinfo(arity,delta) \ - (((uintnat)(arity) << 56) + ((uintnat)(delta) << 1) + 1) +#define Start_env_closinfo(info) (((uintnat)(info) << 9) >> 10) +#define Is_last_closinfo(info) (((uintnat)(info) << 8) >> 63) +#define Make_closinfo(arity,delta,is_last) \ + (((uintnat)(arity) << 56) + ((uintnat)(is_last) << 55) \ + + ((uintnat)(delta) << 1) + 1) #else #define Arity_closinfo(info) ((intnat)(info) >> 24) -#define Start_env_closinfo(info) (((uintnat)(info) << 8) >> 9) -#define Make_closinfo(arity,delta) \ - (((uintnat)(arity) << 24) + ((uintnat)(delta) << 1) + 1) +#define Start_env_closinfo(info) (((uintnat)(info) << 9) >> 10) +#define Is_last_closinfo(info) (((uintnat)(info) << 8) >> 31) +#define Make_closinfo(arity,delta,is_last) \ + (((uintnat)(arity) << 24) + ((uintnat)(is_last) << 23) \ + + ((uintnat)(delta) << 1) + 1) #endif /* This tag is used (with Forward_tag) to implement lazy values. diff --git a/runtime/caml/stack.h b/runtime/caml/stack.h index 4dab8186cb51..370271018465 100644 --- a/runtime/caml/stack.h +++ b/runtime/caml/stack.h @@ -86,7 +86,6 @@ struct caml_context { }; /* Structure of frame descriptors */ - typedef struct { uintnat retaddr; unsigned short frame_size; @@ -104,6 +103,29 @@ typedef struct { num_debug is num_alloc if frame_size & 2, otherwise 1. */ } frame_descr; +typedef struct { + uintnat retaddr; + unsigned short marker; /* LONG_FRAME_MARKER */ + unsigned short _pad; /* Ensure frame_size is 4-byte aligned */ + uint32_t frame_size; + uint32_t num_live; + uint32_t live_ofs[1 /* num_live */]; + /* + If frame_size & 2, then allocation info follows: + unsigned char num_allocs; + unsigned char alloc_lengths[num_alloc]; + + If frame_size & 1, then debug info follows: + uint32_t debug_info_offset[num_debug]; + + Debug info is stored as relative offsets to debuginfo structures. + num_debug is num_alloc if frame_size & 2, otherwise 1. */ +} frame_descr_long; + +/* Helpers for long frames */ +uint32_t get_frame_size(frame_descr *); +unsigned char * get_end_of_live_ofs (frame_descr *d); + /* Allocation lengths are encoded as 0-255, giving sizes 1-256 */ #define Wosize_encoded_alloc_len(n) ((uintnat)(n) + 1) diff --git a/runtime/compact.c b/runtime/compact.c index 8ba168e4d2bc..a181be0ee45e 100644 --- a/runtime/compact.c +++ b/runtime/compact.c @@ -261,16 +261,18 @@ static void do_compaction (intnat new_allocation_policy) if (t == Closure_tag){ /* Revert the infix pointers to this block. */ - mlsize_t i, startenv; + mlsize_t i; value v; v = Val_hp (p); - startenv = Start_env_closinfo (Closinfo_val (v)); i = 0; while (1){ - int arity = Arity_closinfo (Field (v, i+1)); + int arity; + uintnat closinfo = Field (v, i+1); + if (Is_last_closinfo (closinfo)) break; + arity = Arity_closinfo (closinfo); i += 2 + (arity != 0 && arity != 1); - if (i >= startenv) break; + CAMLassert (i < Start_env_closinfo (Closinfo_val (v))); /* Revert the inverted list for infix header at offset [i]. */ q = Field (v, i); diff --git a/runtime/interp.c b/runtime/interp.c index 20b92748d197..7c80153af44f 100644 --- a/runtime/interp.c +++ b/runtime/interp.c @@ -568,7 +568,7 @@ value caml_interprete(code_t prog, asize_t prog_size) Field(accu, 2) = env; for (i = 0; i < num_args; i++) Field(accu, i + 3) = sp[i]; Code_val(accu) = pc - 3; /* Point to the preceding RESTART instr. */ - Closinfo_val(accu) = Make_closinfo(0, 2); + Closinfo_val(accu) = Make_closinfo(0, 2, 1); sp += num_args; pc = (code_t)(sp[0]); env = sp[1]; @@ -596,7 +596,7 @@ value caml_interprete(code_t prog, asize_t prog_size) /* The code pointer is not in the heap, so no need to go through caml_initialize. */ Code_val(accu) = pc + *pc; - Closinfo_val(accu) = Make_closinfo(0, 2); + Closinfo_val(accu) = Make_closinfo(0, 2, 1); pc++; sp += nvars; Next; @@ -628,13 +628,14 @@ value caml_interprete(code_t prog, asize_t prog_size) *--sp = accu; p = &Field(accu, 0); *p++ = (value) (pc + pc[0]); - *p++ = Make_closinfo(0, envofs); + *p++ = Make_closinfo(0, envofs, nfuncs < 2); for (i = 1; i < nfuncs; i++) { *p++ = Make_header(i * 3, Infix_tag, Caml_white); /* color irrelevant */ *--sp = (value) p; *p++ = (value) (pc + pc[i]); envofs -= 3; - *p++ = Make_closinfo(0, envofs); + CAMLassert(i <= nfuncs - 1); + *p++ = Make_closinfo(0, envofs, i == nfuncs - 1); } pc += nfuncs; Next; diff --git a/runtime/meta.c b/runtime/meta.c index cbacc9a03d87..618f2a8553d7 100644 --- a/runtime/meta.c +++ b/runtime/meta.c @@ -126,7 +126,7 @@ CAMLprim value caml_reify_bytecode(value ls_prog, clos = caml_alloc_small (2, Closure_tag); Code_val(clos) = (code_t) prog; - Closinfo_val(clos) = Make_closinfo(0, 2); + Closinfo_val(clos) = Make_closinfo(0, 2, 1); bytecode = caml_alloc_small (2, Abstract_tag); Bytecode_val(bytecode)->prog = prog; Bytecode_val(bytecode)->len = len; diff --git a/runtime/obj.c b/runtime/obj.c index 31012443ef52..479b340e5a6a 100644 --- a/runtime/obj.c +++ b/runtime/obj.c @@ -108,7 +108,7 @@ CAMLprim value caml_obj_block(value tag, value size) /* Closinfo_val is the second field, so we need size at least 2 */ if (sz < 2) caml_invalid_argument ("Obj.new_block"); res = caml_alloc(sz, tg); - Closinfo_val(res) = Make_closinfo(0, 2); /* does not allocate */ + Closinfo_val(res) = Make_closinfo(0, 2, 1); /* does not allocate */ break; } case String_tag: { diff --git a/runtime/roots_nat.c b/runtime/roots_nat.c index 0f788f644e44..43576d66a4dd 100644 --- a/runtime/roots_nat.c +++ b/runtime/roots_nat.c @@ -80,25 +80,63 @@ static link* frametables_list_tail(link *list) { return tail; } +/* Special marker instead of frame_size for frame_descr in long format */ +static uint32_t LONG_FRAME_MARKER = 0x7FFF; + +uint32_t get_frame_size(frame_descr *d) { + CAMLassert(d && d->frame_size != 0xFFFF); + if (d->frame_size == LONG_FRAME_MARKER) { + /* Handle long frames */ + frame_descr_long *dl = (frame_descr_long *)d; + return (dl->frame_size); + } else { + return (d->frame_size); + } +} + +/* Skip to end of live_ofs */ +unsigned char * get_end_of_live_ofs (frame_descr *d) { + CAMLassert(d && d->frame_size != 0xFFFF); + if (d->frame_size == LONG_FRAME_MARKER) { + /* Handle long frames */ + frame_descr_long *dl = (frame_descr_long *)d; + return ((unsigned char*)&dl->live_ofs[dl->num_live]); + } else { + return ((unsigned char*)&d->live_ofs[d->num_live]); + } +} + static frame_descr * next_frame_descr(frame_descr * d) { unsigned char num_allocs = 0, *p; + uint32_t frame_size; CAMLassert(d->retaddr >= 4096); - /* Skip to end of live_ofs */ - p = (unsigned char*)&d->live_ofs[d->num_live]; - /* Skip alloc_lengths if present */ - if (d->frame_size & 2) { - num_allocs = *p; - p += num_allocs + 1; - } - /* Skip debug info if present */ - if (d->frame_size & 1) { - /* Align to 32 bits */ - p = Align_to(p, uint32_t); - p += sizeof(uint32_t) * (d->frame_size & 2 ? num_allocs : 1); + if (d->frame_size != 0xFFFF) { + frame_size = get_frame_size(d); + p = get_end_of_live_ofs(d); + /* Skip alloc_lengths if present */ + if (frame_size & 2) { + num_allocs = *p; + p += num_allocs + 1; + } + /* Skip debug info if present */ + if (frame_size & 1) { + /* Align to 32 bits */ + p = Align_to(p, uint32_t); + p += sizeof(uint32_t) * (frame_size & 2 ? num_allocs : 1); + } + /* Align to word size */ + p = Align_to(p, void*); + return ((frame_descr*) p); + } else { + /* This marks the top of an ML stack chunk. Skip over empty + * frame descriptor */ + /* Skip to address of zero-sized live_ofs */ + CAMLassert(d->num_live == 0); + p = (unsigned char*)&d->live_ofs[0]; + /* Align to word size */ + p = Align_to(p, void*); + return ((frame_descr*) p); } - /* Align to word size */ - p = Align_to(p, void*); - return ((frame_descr*) p); } static void fill_hashtable(link *frametables) { @@ -624,17 +662,33 @@ void caml_do_local_roots_nat(scanning_action maj, scanning_action min, } if (d->frame_size != 0xFFFF) { /* Scan the roots in this frame */ - for (p = d->live_ofs, n = d->num_live; n > 0; n--, p++) { - ofs = *p; - if (ofs & 1) { - root = regs + (ofs >> 1); - } else { - root = (value *)(sp + ofs); + if (d->frame_size == LONG_FRAME_MARKER) { + /* Handle long frames */ + frame_descr_long *dl = (frame_descr_long *)d; + uint32_t * p; + uint32_t n; + for (p = dl->live_ofs, n = dl->num_live; n > 0; n--, p++) { + uint32_t ofs = *p; + if (ofs & 1) { + root = regs + (ofs >> 1); + } else { + root = (value *)(sp + ofs); + } + visit(maj, min, root); + } + } else { + for (p = d->live_ofs, n = d->num_live; n > 0; n--, p++) { + ofs = *p; + if (ofs & 1) { + root = regs + (ofs >> 1); + } else { + root = (value *)(sp + ofs); + } + visit(maj, min, root); } - visit(maj, min, root); } /* Move to next frame */ - sp += (d->frame_size & 0xFFFC); + sp += (get_frame_size(d) & 0xFFFFFFFC); retaddr = Saved_return_address(sp); #ifdef Mask_already_scanned retaddr = Mask_already_scanned(retaddr); diff --git a/runtime/signals_nat.c b/runtime/signals_nat.c index 1dd8289c12e3..4a5828084eed 100644 --- a/runtime/signals_nat.c +++ b/runtime/signals_nat.c @@ -72,12 +72,13 @@ void caml_garbage_collection(void) h = (h + 1) & caml_frame_descriptors_mask; } /* Must be an allocation frame */ - CAMLassert(d && d->frame_size != 0xFFFF && (d->frame_size & 2)); + CAMLassert(d && d->frame_size != 0xFFFF && + (get_frame_size(d) & 2)); } /* Compute the total allocation size at this point, including allocations combined by Comballoc */ - alloc_len = (unsigned char*)(&d->live_ofs[d->num_live]); + alloc_len = get_end_of_live_ofs(d); nallocs = *alloc_len++; if (nallocs == 0) { diff --git a/testsuite/tests/asmcomp/poll_attr_both.ml b/testsuite/tests/asmcomp/poll_attr_both.ml index d67d2fd9734d..0bef1f20463f 100644 --- a/testsuite/tests/asmcomp/poll_attr_both.ml +++ b/testsuite/tests/asmcomp/poll_attr_both.ml @@ -1,13 +1,14 @@ (* TEST - * setup-ocamlopt.byte-build-env - ** ocamlopt.byte + * poll-insertion + ** setup-ocamlopt.byte-build-env + *** ocamlopt.byte ocamlopt_byte_exit_status = "2" - *** check-ocamlopt.byte-output + **** check-ocamlopt.byte-output - * setup-ocamlopt.opt-build-env - ** ocamlopt.opt + ** setup-ocamlopt.opt-build-env + *** ocamlopt.opt ocamlopt_opt_exit_status = "2" - *** check-ocamlopt.opt-output + **** check-ocamlopt.opt-output *) let[@inline never][@local never] v x = x + 1 diff --git a/testsuite/tests/asmcomp/poll_attr_inserted.ml b/testsuite/tests/asmcomp/poll_attr_inserted.ml index 0ea17755b795..ea090f3e61d4 100644 --- a/testsuite/tests/asmcomp/poll_attr_inserted.ml +++ b/testsuite/tests/asmcomp/poll_attr_inserted.ml @@ -1,13 +1,14 @@ (* TEST - * setup-ocamlopt.byte-build-env - ** ocamlopt.byte + * poll-insertion + ** setup-ocamlopt.byte-build-env + *** ocamlopt.byte ocamlopt_byte_exit_status = "2" - *** check-ocamlopt.byte-output + **** check-ocamlopt.byte-output - * setup-ocamlopt.opt-build-env - ** ocamlopt.opt + ** setup-ocamlopt.opt-build-env + *** ocamlopt.opt ocamlopt_opt_exit_status = "2" - *** check-ocamlopt.opt-output + **** check-ocamlopt.opt-output *) let[@poll error] c x = diff --git a/testsuite/tests/asmcomp/poll_attr_prologue.ml b/testsuite/tests/asmcomp/poll_attr_prologue.ml index 41b3f6b92f9c..091c7702560a 100644 --- a/testsuite/tests/asmcomp/poll_attr_prologue.ml +++ b/testsuite/tests/asmcomp/poll_attr_prologue.ml @@ -1,13 +1,14 @@ (* TEST - * setup-ocamlopt.byte-build-env - ** ocamlopt.byte + * poll-insertion + ** setup-ocamlopt.byte-build-env + *** ocamlopt.byte ocamlopt_byte_exit_status = "2" - *** check-ocamlopt.byte-output + **** check-ocamlopt.byte-output - * setup-ocamlopt.opt-build-env - ** ocamlopt.opt + ** setup-ocamlopt.opt-build-env + *** ocamlopt.opt ocamlopt_opt_exit_status = "2" - *** check-ocamlopt.opt-output + **** check-ocamlopt.opt-output *) let[@poll error] rec c x l = diff --git a/testsuite/tests/asmcomp/poll_attr_user.ml b/testsuite/tests/asmcomp/poll_attr_user.ml index e807bd60d4cd..b48709a51a63 100644 --- a/testsuite/tests/asmcomp/poll_attr_user.ml +++ b/testsuite/tests/asmcomp/poll_attr_user.ml @@ -1,13 +1,14 @@ (* TEST - * setup-ocamlopt.byte-build-env - ** ocamlopt.byte + * poll-insertion + ** setup-ocamlopt.byte-build-env + *** ocamlopt.byte ocamlopt_byte_exit_status = "2" - *** check-ocamlopt.byte-output + **** check-ocamlopt.byte-output - * setup-ocamlopt.opt-build-env - ** ocamlopt.opt + ** setup-ocamlopt.opt-build-env + *** ocamlopt.opt ocamlopt_opt_exit_status = "2" - *** check-ocamlopt.opt-output + **** check-ocamlopt.opt-output *) let[@inline never][@local never] v x = x + 1 diff --git a/testsuite/tests/asmcomp/polling_insertion.ml b/testsuite/tests/asmcomp/polling_insertion.ml index b32df82f68b6..edbb11573ee0 100644 --- a/testsuite/tests/asmcomp/polling_insertion.ml +++ b/testsuite/tests/asmcomp/polling_insertion.ml @@ -1,8 +1,9 @@ (* TEST modules = "polling.c" compare_programs = "false" - * arch64 - ** native + * poll-insertion + ** arch64 + *** native *) (* This set of tests examine poll insertion behaviour. We do this by requesting diff --git a/testsuite/tests/asmgen/catch-rec-deadhandler.run b/testsuite/tests/asmgen/catch-rec-deadhandler.run index bad9f117cd32..cd7b1635ef33 100755 --- a/testsuite/tests/asmgen/catch-rec-deadhandler.run +++ b/testsuite/tests/asmgen/catch-rec-deadhandler.run @@ -2,4 +2,7 @@ exec > "${output}" 2>&1 -grep -E "catch |with\(|and\(|exit\(" "${compiler_output}" +if [ "${REGISTER_ALLOCATOR}" = "irc" ] +then cat "${reference}" +else grep -E "catch |with\(|and\(|exit\(" "${compiler_output}" +fi diff --git a/testsuite/tests/basic-more/pr10338.ml b/testsuite/tests/basic-more/pr10338.ml index 9eeb4d3da4e4..7697f377f805 100644 --- a/testsuite/tests/basic-more/pr10338.ml +++ b/testsuite/tests/basic-more/pr10338.ml @@ -19,3 +19,8 @@ let f ?(y=1) : empty -> int = function _ -> .;; module type E = sig exception Ex end;; let f ((module M) : (module E)) (M.Ex | _) = "42";; print_endline (f (module struct exception Ex end) Exit);; + +(* push_defaults should push past the module pattern *) +let f ?(x = assert false) ((module M) : (module E)) () = 1;; +(* so partial application of the module doesn't raise *) +let partial = f (module struct exception Ex end);; diff --git a/testsuite/tests/functors/functors.compilers.reference b/testsuite/tests/functors/functors.compilers.reference index 58284f72e0b1..65f3181c77c7 100644 --- a/testsuite/tests/functors/functors.compilers.reference +++ b/testsuite/tests/functors/functors.compilers.reference @@ -2,14 +2,14 @@ (let (O = (module-defn(O) Functors functors.ml(12):184-279 - (function X is_a_functor always_inline + (function X is_a_functor always_inline never_loop (let (cow = (function x[int] : int (apply (field 0 X) x)) sheep = (function x[int] : int (+ 1 (apply cow x)))) (makeblock 0 cow sheep)))) F = (module-defn(F) Functors functors.ml(17):281-392 - (function X Y is_a_functor always_inline + (function X Y is_a_functor always_inline never_loop (let (cow = (function x[int] : int @@ -18,7 +18,7 @@ (makeblock 0 cow sheep)))) F1 = (module-defn(F1) Functors functors.ml(31):516-632 - (function X Y is_a_functor always_inline + (function X Y is_a_functor always_inline never_loop (let (cow = (function x[int] : int @@ -27,7 +27,7 @@ (makeblock 0 sheep)))) F2 = (module-defn(F2) Functors functors.ml(36):634-784 - (function X Y is_a_functor always_inline + (function X Y is_a_functor always_inline never_loop (let (X =a (makeblock 0 (field 1 X)) Y =a (makeblock 0 (field 1 Y)) @@ -41,7 +41,7 @@ (let (F = (module-defn(F) Functors.M functors.ml(44):849-966 - (function X Y is_a_functor always_inline + (function X Y is_a_functor always_inline never_loop (let (cow = (function x[int] : int diff --git a/testsuite/tests/lib-dynlink-initializers/test10_main.byte.reference b/testsuite/tests/lib-dynlink-initializers/test10_main.byte.reference index d5efe697e95e..f8b2d961439e 100755 --- a/testsuite/tests/lib-dynlink-initializers/test10_main.byte.reference +++ b/testsuite/tests/lib-dynlink-initializers/test10_main.byte.reference @@ -3,8 +3,8 @@ Raised at Stdlib.failwith in file "stdlib.ml", line 32, characters 17-33 Called from Test10_plugin.g in file "test10_plugin.ml", line 3, characters 2-21 Called from Test10_plugin.f in file "test10_plugin.ml", line 6, characters 2-6 Called from Test10_plugin in file "test10_plugin.ml", line 10, characters 2-6 -Called from Dynlink.Bytecode.run in file "otherlibs/dynlink/dynlink.ml", line 140, characters 16-25 -Re-raised at Dynlink.Bytecode.run in file "otherlibs/dynlink/dynlink.ml", line 142, characters 6-137 +Called from Dynlink.Bytecode.run in file "otherlibs/dynlink/dynlink.ml", line 159, characters 16-25 +Re-raised at Dynlink.Bytecode.run in file "otherlibs/dynlink/dynlink.ml", line 161, characters 6-137 Called from Dynlink_common.Make.load.(fun) in file "otherlibs/dynlink/dynlink_common.ml", line 337, characters 13-54 Called from Stdlib__List.iter in file "list.ml", line 114, characters 12-15 Called from Dynlink_common.Make.load in file "otherlibs/dynlink/dynlink_common.ml", line 335, characters 8-250 diff --git a/testsuite/tests/lib-dynlink-initializers/test10_main.native.reference b/testsuite/tests/lib-dynlink-initializers/test10_main.native.reference index 9a06a1525c5c..49e82b6e5f96 100755 --- a/testsuite/tests/lib-dynlink-initializers/test10_main.native.reference +++ b/testsuite/tests/lib-dynlink-initializers/test10_main.native.reference @@ -3,9 +3,9 @@ Raised at Stdlib.failwith in file "stdlib.ml", line 32, characters 17-33 Called from Test10_plugin.g in file "test10_plugin.ml" (inlined), line 2, characters 15-38 Called from Test10_plugin.f in file "test10_plugin.ml", line 6, characters 2-6 Called from Test10_plugin in file "test10_plugin.ml", line 10, characters 2-6 -Called from Dynlink.Native.ndl_run in file "otherlibs/dynlink/dynlink.ml", line 266, characters 8-25 -Called from Dynlink.Native.ndl_run in file "otherlibs/dynlink/dynlink.ml", line 266, characters 8-25 -Re-raised at Dynlink.Native.ndl_run in file "otherlibs/dynlink/dynlink.ml", line 278, characters 6-137 +Called from Dynlink.Native.ndl_run in file "otherlibs/dynlink/dynlink.ml", line 290, characters 8-25 +Called from Dynlink.Native.ndl_run in file "otherlibs/dynlink/dynlink.ml", line 290, characters 8-25 +Re-raised at Dynlink.Native.ndl_run in file "otherlibs/dynlink/dynlink.ml", line 302, characters 6-137 Called from Stdlib__List.iter in file "list.ml", line 114, characters 12-15 Called from Dynlink_common.Make.load.(fun) in file "otherlibs/dynlink/dynlink_common.ml", line 337, characters 13-54 Called from Stdlib__List.iter in file "list.ml", line 114, characters 12-15 diff --git a/testsuite/tests/lib-dynlink-native/main.ml b/testsuite/tests/lib-dynlink-native/main.ml index d2eb8a7db73d..5e246a471720 100644 --- a/testsuite/tests/lib-dynlink-native/main.ml +++ b/testsuite/tests/lib-dynlink-native/main.ml @@ -94,7 +94,7 @@ program = "packed1.so" flags = "-shared" all_modules = "packed1.cmx" **************************** ocamlopt.opt -flags = "" +flags = "-for-pack Mypack" module = "packed1_client.ml" ***************************** ocamlopt.opt module = "" diff --git a/testsuite/tests/lib-dynlink-native/main.reference b/testsuite/tests/lib-dynlink-native/main.reference index e9e4ee45dd41..e6d6be749a69 100644 --- a/testsuite/tests/lib-dynlink-native/main.reference +++ b/testsuite/tests/lib-dynlink-native/main.reference @@ -7,6 +7,9 @@ Registering module Plugin2 2 6 1 +Raised by primitive operation at Plugin2.foo in file "plugin2.ml", line 4, characters 38-64 +Called from Plugin2.test_frametable in file "plugin2.ml", line 10, characters 2-72 +Called from Plugin2 in file "plugin2.ml", line 19, characters 2-20 XXX Loading plugin_thread.so Registering module Plugin_thread diff --git a/testsuite/tests/lib-dynlink-native/plugin2.ml b/testsuite/tests/lib-dynlink-native/plugin2.ml index 109c129d1a89..84342bf49d04 100644 --- a/testsuite/tests/lib-dynlink-native/plugin2.ml +++ b/testsuite/tests/lib-dynlink-native/plugin2.ml @@ -1,8 +1,20 @@ (*external ex: int -> int = "caml_ex"*) +let foo a1 a2 a3 a4 a5 a6 a7 a8 a9 = + Printexc.print_raw_backtrace stdout (Printexc.get_callstack 4); + fun a10 a11 a12 a13 a14 a15 a16 a17 a18 -> () + +(* Ensure that the frametable is set up correctly so that a [caml_curry_18] + frame can be traversed *) +let[@inline never] test_frametable () = + (Sys.opaque_identity foo) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; + (* force non-tail call *) + Sys.opaque_identity () + let () = Api.reg_mod "Plugin2"; Api.add_cb (fun () -> print_endline "Callback from plugin2"); (* let i = ex 3 in*) List.iter (fun i -> Printf.printf "%i\n" i) Plugin.facts; + test_frametable (); Printf.printf "XXX\n" diff --git a/testsuite/tests/packs/basic/main.ml b/testsuite/tests/packs/basic/main.ml new file mode 100644 index 000000000000..3f785af3c6eb --- /dev/null +++ b/testsuite/tests/packs/basic/main.ml @@ -0,0 +1,54 @@ +(* TEST + +readonly_files = "main.ml member.ml" + +* setup-ocamlc.byte-build-env +** ocamlc.byte +flags = "-for-pack Pack" +module = "member.ml" +*** ocamlc.byte +module = "" +flags = "-pack" +program = "pack.cmo" +all_modules = "member.cmo" +**** ocamlc.byte +flags = "" +module = "main.ml" +***** ocamlc.byte +module = "" +program = "${test_build_directory}/main.byte" +all_modules = "pack.cmo main.cmo" +****** run +exit_status = "0" +******* check-program-output + +* setup-ocamlopt.byte-build-env +** ocamlopt.byte +flags = "-for-pack Pack" +module = "member.ml" +*** ocamlopt.byte +module = "" +flags = "-pack" +program = "pack.cmx" +all_modules = "member.cmx" +**** ocamlopt.byte +flags = "" +module = "main.ml" +***** ocamlopt.byte +module = "" +program = "${test_build_directory}/main.exe" +all_modules = "pack.cmx main.cmx" +****** run +exit_status = "0" +******* check-program-output +*) + +let say_hello () = + Pack.Member.say_hello () + +let () = + say_hello (); + + let ctor = Obj.Extension_constructor.of_val Pack.Member.A in + print_endline (Obj.Extension_constructor.name ctor) + diff --git a/testsuite/tests/packs/basic/main.reference b/testsuite/tests/packs/basic/main.reference new file mode 100644 index 000000000000..49783581a992 --- /dev/null +++ b/testsuite/tests/packs/basic/main.reference @@ -0,0 +1,2 @@ +Hello! +Pack.Member.A diff --git a/testsuite/tests/packs/basic/member.ml b/testsuite/tests/packs/basic/member.ml new file mode 100644 index 000000000000..e02ba60c4340 --- /dev/null +++ b/testsuite/tests/packs/basic/member.ml @@ -0,0 +1,5 @@ +type t = .. + +type t += A + +let [@inline always] say_hello () = print_endline "Hello!" diff --git a/testsuite/tests/packs/inconsistent/main.compilers.reference b/testsuite/tests/packs/inconsistent/main.compilers.reference new file mode 100644 index 000000000000..ed3cf5ec86fc --- /dev/null +++ b/testsuite/tests/packs/inconsistent/main.compilers.reference @@ -0,0 +1,3 @@ +File "main.ml", line 1: +Error: The file subdir/use_member_directly.cmi + is imported both as Pack.Member and as Member. diff --git a/testsuite/tests/packs/inconsistent/main.ml b/testsuite/tests/packs/inconsistent/main.ml new file mode 100644 index 000000000000..c8a459e83507 --- /dev/null +++ b/testsuite/tests/packs/inconsistent/main.ml @@ -0,0 +1,30 @@ +(* TEST + +readonly_files = "member.ml member2.ml use_member_directly.ml" + +* setup-ocamlopt.byte-build-env +** ocamlopt.byte +flags = "-for-pack Pack" +module = "member.ml" +*** script +script = "mkdir subdir/" +**** script +script = "cp use_member_directly.ml member.ml subdir/" +***** cd +cwd = "subdir" +****** ocamlopt.byte +flags = "" +module = "member.ml" +******* ocamlopt.byte +module = "use_member_directly.ml" +******** cd +cwd = ".." +********* ocamlopt.byte +flags = "-for-pack Pack -I subdir" +module = "main.ml" +ocamlopt_byte_exit_status = "2" +********** check-ocamlopt.byte-output +*) + +module _ = Member +module _ = Use_member_directly diff --git a/testsuite/tests/packs/inconsistent/member.ml b/testsuite/tests/packs/inconsistent/member.ml new file mode 100644 index 000000000000..dd2f672b3edc --- /dev/null +++ b/testsuite/tests/packs/inconsistent/member.ml @@ -0,0 +1 @@ +let () = print_endline "Hello!" diff --git a/testsuite/tests/packs/inconsistent/use_member_directly.ml b/testsuite/tests/packs/inconsistent/use_member_directly.ml new file mode 100644 index 000000000000..3b2e0f231aba --- /dev/null +++ b/testsuite/tests/packs/inconsistent/use_member_directly.ml @@ -0,0 +1 @@ +module _ = Member diff --git a/testsuite/tests/self-contained-toplevel/main.ml b/testsuite/tests/self-contained-toplevel/main.ml index 51d44e09cd1d..557220af3ea7 100644 --- a/testsuite/tests/self-contained-toplevel/main.ml +++ b/testsuite/tests/self-contained-toplevel/main.ml @@ -24,7 +24,7 @@ let () = let module Persistent_signature = Persistent_env.Persistent_signature in let old_loader = !Persistent_signature.load in Persistent_signature.load := (fun ~unit_name -> - match unit_name with + match unit_name |> Compilation_unit.Name.to_string with | "Foo" -> Some { Persistent_signature. filename = Sys.executable_name diff --git a/testsuite/tests/tool-toplevel/pr6468.compilers.reference b/testsuite/tests/tool-toplevel/pr6468.compilers.reference index 07267b3bc16e..ada52ad007a2 100644 --- a/testsuite/tests/tool-toplevel/pr6468.compilers.reference +++ b/testsuite/tests/tool-toplevel/pr6468.compilers.reference @@ -10,5 +10,5 @@ Raised at f in file "//toplevel//", line 2, characters 11-26 Called from g in file "//toplevel//", line 1, characters 11-15 Called from Stdlib__Fun.protect in file "fun.ml", line 37, characters 8-15 Re-raised at Stdlib__Fun.protect in file "fun.ml", line 42, characters 6-52 -Called from Topeval.load_lambda in file "toplevel/byte/topeval.ml", line 89, characters 4-150 +Called from Topeval.load_lambda in file "ocaml/toplevel/byte/topeval.ml", line 90, characters 4-150 diff --git a/testsuite/tests/typing-local/loop_regions.ml b/testsuite/tests/typing-local/loop_regions.ml index 497fc4341b79..b346d100a09d 100644 --- a/testsuite/tests/typing-local/loop_regions.ml +++ b/testsuite/tests/typing-local/loop_regions.ml @@ -8,6 +8,7 @@ *) external local_stack_offset : unit -> int = "caml_local_stack_offset" +let local_stack_offset () = local_stack_offset () / (Sys.word_size / 8) external opaque_local : ('a[@local_opt]) -> ('a[@local_opt]) = "%opaque" let print_offsets (name,allocs) = diff --git a/testsuite/tests/typing-local/loop_regions.stack.reference b/testsuite/tests/typing-local/loop_regions.stack.reference index 14aa447d5451..0a56053d5d4e 100644 --- a/testsuite/tests/typing-local/loop_regions.stack.reference +++ b/testsuite/tests/typing-local/loop_regions.stack.reference @@ -1,6 +1,6 @@ - local for: [0; 16; 16] - non-local for: [0; 16; 0] - local while body: [0; 16; 16] - nonlocal while body: [0; 16; 0] - local while cond: [0; 16; 16] - nonlocal while cond: [0; 16; 0] + local for: [0; 2; 2] + non-local for: [0; 2; 0] + local while body: [0; 2; 2] + nonlocal while body: [0; 2; 0] + local while cond: [0; 2; 2] + nonlocal while cond: [0; 2; 0] diff --git a/testsuite/tests/typing-local/pr902.ml b/testsuite/tests/typing-local/pr902.ml new file mode 100644 index 000000000000..aeb74c9dd331 --- /dev/null +++ b/testsuite/tests/typing-local/pr902.ml @@ -0,0 +1,32 @@ +(* TEST + * stack-allocation + ** native +*) + +(* PR902 (return mode on second application expression in a split + overapplication) *) + +external local_stack_offset : unit -> int = "caml_local_stack_offset" +external opaque_identity : ('a[@local_opt]) -> ('a[@local_opt]) = "%opaque" +external is_local : local_ 'a -> bool = "caml_obj_is_local" + +let f2 p () = p + +let f1 () x : (unit -> local_ (int * int)) = + (* This local allocation should end up in the caller's region, because + we should have got here via one of the caml_applyL functions. If the + return mode of the second application in the expansion of the + overapplication below is wrongly Heap, then caml_apply will be used + instead, which will open its own region for this allocation. *) + let p = local_ (x, x) in + local_ ((opaque_identity f2) p) [@nontail] + +let[@inline never] to_be_overapplied () () = Sys.opaque_identity f1 + +let () = + let start_offset = local_stack_offset () in + let p = to_be_overapplied () () () 42 () in + let end_offset = local_stack_offset () in + assert (is_local p); + let ok = end_offset - start_offset = Sys.word_size (* eight words *) in + Printf.printf "PR902: %s\n" (if ok then "ok" else "FAIL") diff --git a/testsuite/tests/typing-local/pr902.reference b/testsuite/tests/typing-local/pr902.reference new file mode 100644 index 000000000000..fd5f1bd02c4e --- /dev/null +++ b/testsuite/tests/typing-local/pr902.reference @@ -0,0 +1 @@ +PR902: ok diff --git a/testsuite/tests/typing-local/regions.ml b/testsuite/tests/typing-local/regions.ml index 44c73f23b68c..57ceccb331c0 100644 --- a/testsuite/tests/typing-local/regions.ml +++ b/testsuite/tests/typing-local/regions.ml @@ -114,6 +114,13 @@ let () = check_empty "toplevel rec binding" ());; let () = check_empty "toplevel eval" +let () = + let f x b g = + let local_ p = x, x in + if b then () else (g p; ()) + in f 0 true (fun _ -> ()) +let () = check_empty "constant switch arm" + module type T = sig val x : int end let _ = let module M : T = diff --git a/testsuite/tests/typing-local/regions.reference b/testsuite/tests/typing-local/regions.reference index bea73d31191d..d5ea082ec107 100644 --- a/testsuite/tests/typing-local/regions.reference +++ b/testsuite/tests/typing-local/regions.reference @@ -13,6 +13,7 @@ toplevel binding: OK toplevel rec binding: OK toplevel eval: OK + constant switch arm: OK first class mod: OK class d definition: OK class definitions: OK diff --git a/testsuite/tests/typing-modules/functors.ml b/testsuite/tests/typing-modules/functors.ml index b3f4226b2f25..02aa1cd72f4e 100644 --- a/testsuite/tests/typing-modules/functors.ml +++ b/testsuite/tests/typing-modules/functors.ml @@ -1701,3 +1701,47 @@ Error: The functor application Bar(A)(FiveArgsExt)(TY)(TY)(TY)(TY)(TY) is ill-ty 8. Module TY matches the expected module type ty 9. Module TY matches the expected module type ty |}] + +module Shape_arg = struct + module M1 (Arg1 : sig end) = struct + module type S1 = sig + type t + end + end + + module type S2 = sig + module Make (Arg2 : sig end) : M1(Arg2).S1 + end + + module M2 : S2 = struct + module Make (Arg3 : sig end) = struct + type t = T + end + end + + module M3 (Arg4 : sig end) = struct + module type S3 = sig + type t = M2.Make(Arg4).t + end + end + + module M4 (Arg5 : sig end) : M3(Arg5).S3 = struct + module M5 = M2.Make (Arg5) + + type t = M5.t + end +end +[%%expect{| +module Shape_arg : + sig + module M1 : + functor (Arg1 : sig end) -> sig module type S1 = sig type t end end + module type S2 = + sig module Make : functor (Arg2 : sig end) -> M1(Arg2).S1 end + module M2 : S2 + module M3 : + functor (Arg4 : sig end) -> + sig module type S3 = sig type t = M2.Make(Arg4).t end end + module M4 : functor (Arg5 : sig end) -> M3(Arg5).S3 + end +|}] diff --git a/testsuite/tests/typing-modules/include_functor.ml b/testsuite/tests/typing-modules/include_functor.ml index 1a0f11405456..49f66ef3a7c2 100644 --- a/testsuite/tests/typing-modules/include_functor.ml +++ b/testsuite/tests/typing-modules/include_functor.ml @@ -675,3 +675,25 @@ Line 20, characters 16-17: Error: This expression has type int but an expression was expected of type string |}];; + +(* Test 21: Check that scraping of result type happens in environment expanded + with parameter type. *) +module M21 = struct + module F (_ : sig end) = struct + module type S = sig end + end + + module P = struct + module Make (M : sig end) : F(M).S = struct end + end + + include functor P.Make +end;; +[%%expect{| +module M21 : + sig + module F : sig end -> sig module type S = sig end end + module P : sig module Make : functor (M : sig end) -> F(M).S end + end +|}];; + diff --git a/testsuite/tests/typing-modules/packed_module_levels.ml b/testsuite/tests/typing-modules/packed_module_levels.ml new file mode 100644 index 000000000000..a4883d00deb5 --- /dev/null +++ b/testsuite/tests/typing-modules/packed_module_levels.ml @@ -0,0 +1,42 @@ +(* TEST + * expect +*) +type (_, _) equ = Refl : ('q, 'q) equ + +module type Ty = sig type t end +type 'a modu = (module Ty with type t = 'a) + +type 'q1 packed = + P : 'q0 modu * ('q0, 'q1) equ -> 'q1 packed + +(* Adds a module M to the environment where M.t equals an existential *) +let repack (type q) (x : q packed) : q modu = + match x with + | P (p, eq) -> + let module M = (val p) in + let Refl = eq in + (module M) + +[%%expect{| +type (_, _) equ = Refl : ('q, 'q) equ +module type Ty = sig type t end +type 'a modu = (module Ty with type t = 'a) +type 'q1 packed = P : 'q0 modu * ('q0, 'q1) equ -> 'q1 packed +val repack : 'q packed -> 'q modu = +|}] + +(* Same, using a polymorphic function rather than an existential *) + +let mkmod (type a) () : a modu = + (module struct type t = a end) + +let f (type foo) (intish : (foo, int) equ) = + let module M = (val (mkmod () : foo modu)) in + let Refl = intish in + let module C : sig type t = int end = M in + () + +[%%expect{| +val mkmod : unit -> 'a modu = +val f : ('foo, int) equ -> unit = +|}] diff --git a/tools/.depend b/tools/.depend index f2095bfb9757..68308ca2204f 100644 --- a/tools/.depend +++ b/tools/.depend @@ -126,6 +126,7 @@ ocamlcmt.cmo : \ ../utils/load_path.cmi \ ../typing/envaux.cmi \ ../driver/compmisc.cmi \ + ../utils/compilation_unit.cmi \ ../file_formats/cmt_format.cmi \ ../typing/cmt2annot.cmo \ ../utils/clflags.cmi \ @@ -138,6 +139,7 @@ ocamlcmt.cmx : \ ../utils/load_path.cmx \ ../typing/envaux.cmx \ ../driver/compmisc.cmx \ + ../utils/compilation_unit.cmx \ ../file_formats/cmt_format.cmx \ ../typing/cmt2annot.cmx \ ../utils/clflags.cmx \ diff --git a/tools/objinfo.ml b/tools/objinfo.ml index af8464412acb..6dfc32f465df 100644 --- a/tools/objinfo.ml +++ b/tools/objinfo.ml @@ -56,7 +56,14 @@ let print_name_crc (name, crco) = None -> dummy_crc | Some crc -> string_of_crc crc in - printf "\t%s\t%s\n" crc name + printf "\t%s\t%a\n" crc Compilation_unit.Name.output name + +let print_intf_import (name, data) = + let crco = data |> Option.map (fun (_unit, crc) -> crc) in + print_name_crc (name, crco) + +let print_impl_import (unit, crco) = + print_name_crc (Compilation_unit.name unit, crco) let print_line name = printf "\t%s\n" name @@ -65,12 +72,12 @@ let print_name_line cu = printf "\t%a\n" Compilation_unit.Name.output (Compilation_unit.name cu) let print_required_global id = - printf "\t%s\n" (Ident.name id) + printf "\t%a\n" Compilation_unit.output id let print_cmo_infos cu = - printf "Unit name: %a\n" Compilation_unit.Name.output cu.cu_name; + printf "Unit name: %a\n" Compilation_unit.output cu.cu_name; print_string "Interfaces imported:\n"; - List.iter print_name_crc cu.cu_imports; + List.iter print_intf_import cu.cu_imports; print_string "Required globals:\n"; List.iter print_required_global cu.cu_required_globals; printf "Uses unsafe features: "; @@ -99,15 +106,15 @@ let print_cma_infos (lib : Cmo_format.library) = List.iter print_cmo_infos lib.lib_units let print_cmi_infos name crcs = - printf "Unit name: %s\n" name; + printf "Unit name: %a\n" Compilation_unit.output name; printf "Interfaces imported:\n"; - List.iter print_name_crc crcs + List.iter print_intf_import crcs let print_cmt_infos cmt = let open Cmt_format in - printf "Cmt unit name: %s\n" cmt.cmt_modname; + printf "Cmt unit name: %a\n" Compilation_unit.output cmt.cmt_modname; print_string "Cmt interfaces imported:\n"; - List.iter print_name_crc cmt.cmt_imports; + List.iter print_intf_import cmt.cmt_imports; printf "Source file: %s\n" (match cmt.cmt_sourcefile with None -> "(none)" | Some f -> f); printf "Compilation flags:"; @@ -136,9 +143,9 @@ let print_general_infos name crc defines cmi cmx = printf "Globals defined:\n"; List.iter print_line (List.map linkage_name defines); printf "Interfaces imported:\n"; - List.iter print_name_crc cmi; + List.iter print_intf_import cmi; printf "Implementations imported:\n"; - List.iter print_name_crc cmx + List.iter print_impl_import cmx let print_global_table table = printf "Globals defined:\n"; @@ -172,7 +179,7 @@ let print_cmx_infos (ui, crc) = else printf "Flambda unit\n"; if not !no_approx then begin - Compilation_unit.set_current ui.ui_unit; + Compilation_unit.set_current (Some ui.ui_unit); let root_symbols = List.map Symbol.for_compilation_unit ui.ui_defines in Format.printf "approximations@ %a@.@." Export_info.print_approx (export, root_symbols) @@ -205,7 +212,7 @@ let print_cmxs_infos header = List.iter (fun ui -> print_general_infos - (ui.dynu_name |> Compilation_unit.Name.to_string) + (ui.dynu_name |> Compilation_unit.full_path_as_string) ui.dynu_crc ui.dynu_defines ui.dynu_imports_cmi @@ -214,12 +221,6 @@ let print_cmxs_infos header = let p_title title = printf "%s:\n" title -let p_section title = function - | [] -> () - | l -> - p_title title; - List.iter print_name_crc l - let p_list title print = function | [] -> () | l -> @@ -236,9 +237,10 @@ let dump_byte ic = let len = Bytesections.seek_section ic section in if len > 0 then match section with | "CRCS" -> - p_section + p_list "Imported units" - (input_value ic : (string * Digest.t option) list) + print_intf_import + (input_value ic : Cmo_format.import_info list) | "DLLS" -> p_list "Used DLLs" diff --git a/tools/ocamlcmt.ml b/tools/ocamlcmt.ml index 73057bd3fa4c..8d5c116bf775 100644 --- a/tools/ocamlcmt.ml +++ b/tools/ocamlcmt.ml @@ -51,7 +51,7 @@ let print_info cmt = | Some filename -> open_out filename in let open Cmt_format in - Printf.fprintf oc "module name: %s\n" cmt.cmt_modname; + Printf.fprintf oc "module name: %a\n" Compilation_unit.output cmt.cmt_modname; begin match cmt.cmt_annots with Packed (_, list) -> Printf.fprintf oc "pack: %s\n" (String.concat " " list) @@ -82,14 +82,17 @@ let print_info cmt = | Some digest -> Printf.fprintf oc "interface digest: %s\n" (Digest.to_hex digest); end; + let compare_imports (name1, _crco1) (name2, _crco2) = + Compilation_unit.Name.compare name1 name2 + in List.iter (fun (name, crco) -> let crc = match crco with None -> dummy_crc - | Some crc -> Digest.to_hex crc + | Some (_unit, crc) -> Digest.to_hex crc in - Printf.fprintf oc "import: %s %s\n" name crc; - ) (List.sort compare cmt.cmt_imports); + Printf.fprintf oc "import: %a %s\n" Compilation_unit.Name.output name crc; + ) (List.sort compare_imports cmt.cmt_imports); Printf.fprintf oc "%!"; begin match !target_filename with | None -> () diff --git a/toplevel/byte/topeval.ml b/toplevel/byte/topeval.ml index 87e6d03e8e4e..73ea933a6baf 100644 --- a/toplevel/byte/topeval.ml +++ b/toplevel/byte/topeval.ml @@ -15,6 +15,8 @@ (* The interactive toplevel loop *) +#18 "ocaml/toplevel/byte/topeval.ml" + open Format open Misc open Parsetree @@ -43,19 +45,19 @@ let implementation_label = "" module EvalBase = struct + let eval_compilation_unit cu = + try + Symtable.get_global_value + (cu |> Compilation_unit.to_global_ident_for_bytecode) + with Symtable.Error (Undefined_global name) -> + raise (Undefined_global name) + let eval_ident id = - if Ident.is_global_or_predef id then begin - try - Symtable.get_global_value id - with Symtable.Error (Undefined_global name) -> - raise (Undefined_global name) - end else begin - let name = Translmod.toplevel_name id in - try - String.Map.find name !toplevel_value_bindings - with Not_found -> - raise (Undefined_global name) - end + let name = Translmod.toplevel_name id in + try + String.Map.find name !toplevel_value_bindings + with Not_found -> + raise (Undefined_global name) end @@ -199,8 +201,8 @@ let check_consistency ppf filename cu = original_source = auth; } -> fprintf ppf "@[The files %s@ and %s@ \ - disagree over interface %s@]@." - user auth name; + disagree over interface %a@]@." + user auth Compilation_unit.Name.print name; raise Load_failed (* This is basically Dynlink.Bytecode.run with no digest *) diff --git a/toplevel/expunge.ml b/toplevel/expunge.ml index 22eb46f67377..268ec8521dce 100644 --- a/toplevel/expunge.ml +++ b/toplevel/expunge.ml @@ -36,7 +36,9 @@ let expunge_map tbl = Symtable.filter_global_map (fun id -> keep (Ident.name id)) tbl let expunge_crcs tbl = - List.filter (fun (unit, _crc) -> keep unit) tbl + List.filter + (fun (unit, _crc) -> keep (unit |> Compilation_unit.Name.to_string)) + tbl let main () = let input_name = Sys.argv.(1) in @@ -63,7 +65,7 @@ let main () = let global_map = (input_value ic : Symtable.global_map) in output_value oc (expunge_map global_map) | "CRCS" -> - let crcs = (input_value ic : (string * Digest.t option) list) in + let crcs = (input_value ic : Cmo_format.import_info list) in output_value oc (expunge_crcs crcs) | _ -> copy_file_chunk ic oc len diff --git a/toplevel/native/dune b/toplevel/native/dune index 90f675ceeb2d..40e6dea42d48 100644 --- a/toplevel/native/dune +++ b/toplevel/native/dune @@ -12,30 +12,30 @@ ;* * ;************************************************************************** -(copy_files# ../*.ml*) - -(library - (name ocamltoplevel_native) - (wrapped false) - (modes native) - (flags (:standard -principal)) - (libraries ocamlcommon ocamloptcomp dynlink_internal) - (modules :standard \ topstart expunge)) - -(executable - (name topstart) - (modes native) - (flags (:standard -principal)) - (modules topstart) - (libraries ocamltoplevel_native)) - -(install - (files - (topstart.exe as ocamlnat) - ) - (section bin) - (package ocaml)) - +; (copy_files# ../*.ml*) +; +; (library +; (name ocamltoplevel_native) +; (wrapped false) +; (modes native) +; (flags (:standard -principal)) +; (libraries ocamlcommon ocamloptcomp dynlink_internal) +; (modules :standard \ topstart expunge)) +; +; (executable +; (name topstart) +; (modes native) +; (flags (:standard -principal)) +; (modules topstart) +; (libraries ocamltoplevel_native)) +; +; (install +; (files +; (topstart.exe as ocamlnat) +; ) +; (section bin) +; (package ocaml)) +; ; ; (install ; (files diff --git a/toplevel/native/topeval.ml b/toplevel/native/topeval.ml index 3334ce20fbda..56071bd004ff 100644 --- a/toplevel/native/topeval.ml +++ b/toplevel/native/topeval.ml @@ -25,11 +25,16 @@ open Topcommon let implementation_label = "native toplevel" -let global_symbol id = - let sym = Compilenv.symbol_for_global id |> Linkage_name.to_string in +let global_symbol comp_unit = + let sym = + Symbol.for_compilation_unit comp_unit + |> Symbol.linkage_name + |> Linkage_name.to_string + in match Tophooks.lookup sym with | None -> - fatal_error ("Toploop.global_symbol " ^ (Ident.unique_name id)) + fatal_error ("Toploop.global_symbol " ^ + (Compilation_unit.full_path_as_string comp_unit)) | Some obj -> obj let remembered = ref Ident.empty @@ -70,11 +75,13 @@ let toplevel_value id = module EvalBase = struct + let eval_compilation_unit cu = + try global_symbol cu + with _ -> + raise (Undefined_global (cu |> Compilation_unit.full_path_as_string)) + let eval_ident id = - try - if Ident.is_global_or_predef id - then global_symbol id - else toplevel_value id + try toplevel_value id with _ -> raise (Undefined_global (Ident.name id)) @@ -86,7 +93,7 @@ include Topcommon.MakeEvalPrinter(EvalBase) let may_trace = ref false (* Global lock on tracing *) -let load_lambda ppf ~module_ident ~required_globals phrase_name lam size = +let load_lambda ppf ~compilation_unit ~required_globals phrase_name lam size = if !Clflags.dump_rawlambda then fprintf ppf "%a@." Printlambda.lambda lam; let slam = Simplif.simplify_lambda lam in if !Clflags.dump_lambda then fprintf ppf "%a@." Printlambda.lambda slam; @@ -95,7 +102,7 @@ let load_lambda ppf ~module_ident ~required_globals phrase_name lam size = { Lambda. code = slam; main_module_block_size = size; - module_ident; + compilation_unit; required_globals; } in @@ -196,32 +203,33 @@ let execute_phrase print_outcome ppf phr = str, sg', true | None -> str, sg', false in - let module_ident, res, required_globals, size = + let compilation_unit, res, required_globals, size = if Config.flambda then - let { Lambda.module_ident; main_module_block_size = size; + let { Lambda.compilation_unit; main_module_block_size = size; required_globals; code = res } = - Translmod.transl_implementation_flambda phrase_name + Translmod.transl_implementation_flambda phrase_comp_unit (str, Tcoerce_none) in - remember module_ident 0 sg'; - module_ident, close_phrase res, required_globals, size + remember compilation_unit 0 sg'; + compilation_unit, close_phrase res, required_globals, size else - let size, res = Translmod.transl_store_phrases phrase_name str in - Ident.create_persistent phrase_name, res, Ident.Set.empty, size + let size, res = Translmod.transl_store_phrases phrase_comp_unit str in + phrase_comp_unit, res, Compilation_unit.Set.empty, size in Warnings.check_fatal (); begin try toplevel_env := newenv; toplevel_sig := List.rev_append sg' oldsig; let res = - load_lambda ppf ~required_globals ~module_ident phrase_name res size + load_lambda ppf ~required_globals ~compilation_unit phrase_name res size in let out_phr = match res with | Result _ -> if Config.flambda then (* CR-someday trefis: *) - Env.register_import_as_opaque (Ident.name module_ident) + Env.register_import_as_opaque + (Compilation_unit.name compilation_unit) else Compilenv.record_global_approx_toplevel (); if print_outcome then diff --git a/toplevel/native/tophooks.ml b/toplevel/native/tophooks.ml index 572cd92b0427..fcfcbef1accc 100644 --- a/toplevel/native/tophooks.ml +++ b/toplevel/native/tophooks.ml @@ -46,8 +46,6 @@ let dll_run dll entry = module Backend = struct (* See backend_intf.mli. *) - let pack_prefix_for_global_ident = Compilenv.pack_prefix_for_global_ident - let really_import_approx = Import_approx.really_import_approx let import_symbol = Import_approx.import_symbol diff --git a/toplevel/topcommon.ml b/toplevel/topcommon.ml index 34632e540f4a..3ff2b4c339fb 100644 --- a/toplevel/topcommon.ml +++ b/toplevel/topcommon.ml @@ -90,16 +90,18 @@ exception Undefined_global of string module type EVAL_BASE = sig + val eval_compilation_unit: Compilation_unit.t -> Obj.t + (* Return the value referred to by a base ident. @raise [Undefined_global] if not found *) val eval_ident: Ident.t -> Obj.t - end module MakeEvalPrinter (E: EVAL_BASE) = struct let rec eval_address = function - | Env.Aident id -> E.eval_ident id + | Env.Aunit cu -> E.eval_compilation_unit cu + | Env.Alocal id -> E.eval_ident id | Env.Adot(p, pos) -> Obj.field (eval_address p) pos let eval_path find env path = diff --git a/toplevel/topcommon.mli b/toplevel/topcommon.mli index a30369cc7359..257a20cf6abd 100644 --- a/toplevel/topcommon.mli +++ b/toplevel/topcommon.mli @@ -76,6 +76,8 @@ exception Undefined_global of string module type EVAL_BASE = sig + val eval_compilation_unit: Compilation_unit.t -> Obj.t + (* Return the value referred to by a base ident @raise [Undefined_global] if not found *) val eval_ident: Ident.t -> Obj.t diff --git a/toplevel/toploop.ml b/toplevel/toploop.ml index 715609a78c95..028bed28635e 100644 --- a/toplevel/toploop.ml +++ b/toplevel/toploop.ml @@ -1,4 +1,4 @@ -# 1 "toplevel/toploop.ml" +# 2 "toplevel/toploop.ml" (**************************************************************************) (* *) (* OCaml *) diff --git a/typing/datarepr.mli b/typing/datarepr.mli index 38f05f74f08a..67b32a4c3cb6 100644 --- a/typing/datarepr.mli +++ b/typing/datarepr.mli @@ -19,14 +19,14 @@ open Types val extension_descr: - current_unit:string -> Path.t -> extension_constructor -> + current_unit:Compilation_unit.t option -> Path.t -> extension_constructor -> constructor_description val labels_of_type: Path.t -> type_declaration -> (Ident.t * label_description) list val constructors_of_type: - current_unit:string -> Path.t -> type_declaration -> + current_unit:Compilation_unit.t option -> Path.t -> type_declaration -> (Ident.t * constructor_description) list diff --git a/typing/env.ml b/typing/env.ml index 96d0f5e31140..85d482fcd790 100644 --- a/typing/env.ml +++ b/typing/env.ml @@ -181,7 +181,8 @@ let map_summary f = function | Env_module_unbound (s, u, r) -> Env_module_unbound (f s, u, r) type address = - | Aident of Ident.t + | Aunit of Compilation_unit.t + | Alocal of Ident.t | Adot of address * int module TycompTbl = @@ -811,26 +812,38 @@ let md md_type = (* Print addresses *) let rec print_address ppf = function - | Aident id -> Format.fprintf ppf "%s" (Ident.name id) + | Aunit cu -> Format.fprintf ppf "%s" (Compilation_unit.full_path_as_string cu) + | Alocal id -> Format.fprintf ppf "%s" (Ident.name id) | Adot(a, pos) -> Format.fprintf ppf "%a.[%i]" print_address a pos -(* The name of the compilation unit currently compiled. - "" if outside a compilation unit. *) +type address_head = + | AHunit of Compilation_unit.t + | AHlocal of Ident.t + +let rec address_head = function + | Aunit cu -> AHunit cu + | Alocal id -> AHlocal id + | Adot (a, _) -> address_head a + +(* The name of the compilation unit currently compiled. *) module Current_unit_name : sig - val get : unit -> modname - val set : modname -> unit - val is : modname -> bool + val get : unit -> Compilation_unit.t option + val set : Compilation_unit.t option -> unit + val is : string -> bool val is_ident : Ident.t -> bool val is_path : Path.t -> bool end = struct - let current_unit = - ref "" let get () = - !current_unit - let set name = - current_unit := name + Compilation_unit.get_current () + let set comp_unit = + Compilation_unit.set_current comp_unit + let get_name () = + Option.map Compilation_unit.name (get ()) let is name = - !current_unit = name + let current_name_string = + Option.map Compilation_unit.Name.to_string (get_name ()) + in + Option.equal String.equal current_name_string (Some name) let is_ident id = Ident.is_global id && is (Ident.name id) let is_path = function @@ -904,7 +917,7 @@ let sign_of_cmi ~freshen { Persistent_env.Persistent_signature.cmi; _ } = let name = cmi.cmi_name in let sign = cmi.cmi_sign in let flags = cmi.cmi_flags in - let id = Ident.create_persistent name in + let id = Ident.create_persistent (Compilation_unit.name_as_string name) in let path = Pident id in let alerts = List.fold_left (fun acc -> function Alerts s -> s | _ -> acc) @@ -915,14 +928,16 @@ let sign_of_cmi ~freshen { Persistent_env.Persistent_signature.cmi; _ } = { md_type = Mty_signature sign; md_loc = Location.none; md_attributes = []; - md_uid = Uid.of_compilation_unit_id id; + md_uid = Uid.of_compilation_unit_id name; } in - let mda_address = Lazy_backtrack.create_forced (Aident id) in + let mda_address = Lazy_backtrack.create_forced (Aunit name) in let mda_declaration = Subst.(Lazy.module_decl Make_local identity (Lazy.of_module_decl md)) in - let mda_shape = Shape.for_persistent_unit name in + let mda_shape = + Shape.for_persistent_unit (name |> Compilation_unit.full_path_as_string) + in let mda_components = let mty = Subst.Lazy.of_modtype (Mty_signature sign) in let mty = @@ -985,7 +1000,7 @@ let reset_declaration_caches () = () let reset_cache ~preserve_persistent_env = - Current_unit_name.set ""; + Compilation_unit.set_current None; if not preserve_persistent_env then Persistent_env.clear !persistent_env; reset_declaration_caches (); @@ -1043,13 +1058,15 @@ let check_functor_appl ~arg_path ~arg_mty ~param_mty env +let modname_of_ident id = Ident.name id |> Compilation_unit.Name.of_string + (* Lookup by identifier *) let find_ident_module id env = match find_same_module id env.modules with | Mod_local data -> data | Mod_unbound _ -> raise Not_found - | Mod_persistent -> find_pers_mod (Ident.name id) + | Mod_persistent -> find_pers_mod (id |> modname_of_ident) let rec find_module_components path env = match path with @@ -1239,12 +1256,15 @@ let find_type_descrs p env = let rec find_module_address path env = match path with - | Pident id -> get_address (find_ident_module id env).mda_address + | Pident id -> find_ident_module_address id env | Pdot(p, s) -> let c = find_structure_components p env in get_address (NameMap.find s c.comp_modules).mda_address | Papply _ -> raise Not_found +and find_ident_module_address id env = + get_address (find_ident_module id env).mda_address + and force_address = function | Projection { parent; pos } -> Adot(get_address parent, pos) | ModAlias { env; path } -> find_module_address path env @@ -1342,10 +1362,17 @@ let shape_or_leaf uid = function let required_globals = s_ref [] let reset_required_globals () = required_globals := [] let get_required_globals () = !required_globals -let add_required_global id = - if Ident.is_global_or_predef id && not !Clflags.transparent_modules - && not (List.exists (Ident.same id) !required_globals) - then required_globals := id :: !required_globals +let add_required_unit cu = + if not (List.exists (Compilation_unit.equal cu) !required_globals) + then required_globals := cu :: !required_globals +let add_required_ident id env = + if not !Clflags.transparent_modules && Ident.is_global id then + let address = find_ident_module_address id env in + match address_head address with + | AHlocal _ -> () + | AHunit cu -> add_required_unit cu +let add_required_global path env = + add_required_ident (Path.head path) env let rec normalize_module_path lax env = function | Pident id as path when lax && Ident.is_global id -> @@ -1366,10 +1393,11 @@ and expand_module_path lax env path = try match find_module_lazy ~alias:true path env with {mdl_type=MtyL_alias path1} -> let path' = normalize_module_path lax env path1 in - if lax || !Clflags.transparent_modules then path' else - let id = Path.head path in - if Ident.is_global_or_predef id && not (Ident.same id (Path.head path')) - then add_required_global id; + if not (lax || !Clflags.transparent_modules) then begin + let id = Path.head path in + if Ident.is_global_or_predef id && not (Ident.same id (Path.head path')) + then add_required_global (Pident id) env + end; path' | _ -> path with Not_found when lax @@ -1516,7 +1544,7 @@ let rec scrape_alias_for_visit env mty = match path with | Pident id when Ident.is_global id - && not (Persistent_env.looked_up !persistent_env (Ident.name id)) -> + && not (Persistent_env.looked_up !persistent_env (id |> modname_of_ident)) -> false | path -> (* PR#6600: find_module may raise Not_found *) try @@ -1556,7 +1584,7 @@ let iter_env wrap proj1 proj2 f env () = | Mod_local data -> iter_components (Pident id) path data.mda_components | Mod_persistent -> - let modname = Ident.name id in + let modname = modname_of_ident id in match Persistent_env.find_in_cache !persistent_env modname with | None -> () | Some data -> @@ -1579,8 +1607,8 @@ let same_types env1 env2 = let used_persistent () = Persistent_env.fold !persistent_env - (fun s _m r -> String.Set.add s r) - String.Set.empty + (fun s _m r -> Compilation_unit.Name.Set.add s r) + Compilation_unit.Name.Set.empty let find_all_comps wrap proj s (p, mda) = match get_components mda.mda_components with @@ -1708,16 +1736,19 @@ let add_to_tbl id decl tbl = let decls = try NameMap.find id tbl with Not_found -> [] in NameMap.add id (decl :: decls) tbl +let primitive_address_error = + Invalid_argument "Primitives don't have addresses" + let value_declaration_address (_ : t) id decl = match decl.val_kind with - | Val_prim _ -> Lazy_backtrack.create_failed Not_found - | _ -> Lazy_backtrack.create_forced (Aident id) + | Val_prim _ -> Lazy_backtrack.create_failed primitive_address_error + | _ -> Lazy_backtrack.create_forced (Alocal id) let extension_declaration_address (_ : t) id (_ : extension_constructor) = - Lazy_backtrack.create_forced (Aident id) + Lazy_backtrack.create_forced (Alocal id) let class_declaration_address (_ : t) id (_ : class_declaration) = - Lazy_backtrack.create_forced (Aident id) + Lazy_backtrack.create_forced (Alocal id) let module_declaration_address env id presence md = match presence with @@ -1728,7 +1759,7 @@ let module_declaration_address env id presence md = | _ -> assert false end | Mp_present -> - Lazy_backtrack.create_forced (Aident id) + Lazy_backtrack.create_forced (Alocal id) let is_identchar c = (* This should be kept in sync with the [identchar_latin1] character class @@ -1770,7 +1801,7 @@ let rec components_of_module_maker let decl' = Subst.value_description sub decl in let addr = match decl.val_kind with - | Val_prim _ -> Lazy_backtrack.create_failed Not_found + | Val_prim _ -> Lazy_backtrack.create_failed primitive_address_error | _ -> next_address () in let vda_shape = Shape.proj cm_shape (Shape.Item.value id) in @@ -2280,6 +2311,14 @@ and add_cltype ?shape id ty env = let shape = shape_or_leaf ty.clty_uid shape in store_cltype id ty shape env +let add_module_lazy ~update_summary id presence mty env = + let md = Subst.Lazy.{mdl_type = mty; + mdl_attributes = []; + mdl_loc = Location.none; + mdl_uid = Uid.internal_not_actually_unique} + in + add_module_declaration_lazy ~update_summary id presence md env + let add_module ?arg ?shape id presence mty env = add_module_declaration ~check:false ?arg ?shape id presence (md mty) env @@ -2569,7 +2608,7 @@ let open_signature (* Read a signature from a file *) let read_signature modname filename = - let mda = read_pers_mod modname filename in + let mda = read_pers_mod (Compilation_unit.name modname) filename in let md = Subst.Lazy.force_module_decl mda.mda_declaration in match md.md_type with | Mty_signature sg -> sg @@ -2830,12 +2869,13 @@ let lookup_ident_module (type a) (load : a load) ~errors ~use ~loc s env = | Mod_unbound reason -> report_module_unbound ~errors ~loc env reason | Mod_persistent -> begin + let name = s |> Compilation_unit.Name.of_string in match load with | Don't_load -> - check_pers_mod ~loc s; + check_pers_mod ~loc name; path, (() : a) | Load -> begin - match find_pers_mod s with + match find_pers_mod name with | mda -> use_module ~use ~loc path mda; path, (mda : a) @@ -3341,7 +3381,7 @@ let bound_module name env = | exception Not_found -> if Current_unit_name.is name then false else begin - match find_pers_mod name with + match find_pers_mod (name |> Compilation_unit.Name.of_string) with | _ -> true | exception Not_found -> false end @@ -3424,7 +3464,8 @@ let fold_modules f lid env acc = in f name p md acc | Mod_persistent -> - match Persistent_env.find_in_cache !persistent_env name with + let modname = name |> Compilation_unit.Name.of_string in + match Persistent_env.find_in_cache !persistent_env modname with | None -> acc | Some mda -> let md = @@ -3488,7 +3529,8 @@ let filter_non_loaded_persistent f env = | Mod_local _ -> acc | Mod_unbound _ -> acc | Mod_persistent -> - match Persistent_env.find_in_cache !persistent_env name with + let modname = name |> Compilation_unit.Name.of_string in + match Persistent_env.find_in_cache !persistent_env modname with | Some _ -> acc | None -> if f (Ident.create_persistent name) then diff --git a/typing/env.mli b/typing/env.mli index 1fc2ac3fc635..ffdd514b1dd5 100644 --- a/typing/env.mli +++ b/typing/env.mli @@ -51,7 +51,8 @@ type summary = | Env_module_unbound of summary * string * module_unbound_reason type address = - | Aident of Ident.t + | Aunit of Compilation_unit.t + | Alocal of Ident.t | Adot of address * int type t @@ -74,7 +75,7 @@ val iter_types: t -> iter_cont val run_iter_cont: iter_cont list -> (Path.t * iter_cont) list val same_types: t -> t -> bool -val used_persistent: unit -> Stdlib.String.Set.t +val used_persistent: unit -> Compilation_unit.Name.Set.t val find_shadowed_types: Path.t -> t -> Path.t list val without_cmis: ('a -> 'b) -> 'a -> 'b (* [without_cmis f arg] applies [f] to [arg], but does not @@ -136,8 +137,8 @@ val normalize_modtype_path: t -> Path.t -> Path.t (* Normalize a module type path *) val reset_required_globals: unit -> unit -val get_required_globals: unit -> Ident.t list -val add_required_global: Ident.t -> unit +val get_required_globals: unit -> Compilation_unit.t list +val add_required_global: Path.t -> t -> unit val reset_probes: unit -> unit val add_probe: string -> unit @@ -301,6 +302,8 @@ val add_extension: check:bool -> rebind:bool -> Ident.t -> extension_constructor -> t -> t val add_module: ?arg:bool -> ?shape:Shape.t -> Ident.t -> module_presence -> module_type -> t -> t +val add_module_lazy: update_summary:bool -> + Ident.t -> module_presence -> Subst.Lazy.modtype -> t -> t val add_module_declaration: ?arg:bool -> ?shape:Shape.t -> check:bool -> Ident.t -> module_presence -> module_declaration -> t -> t val add_module_declaration_lazy: update_summary:bool -> @@ -396,36 +399,37 @@ val reset_cache: preserve_persistent_env:bool -> unit val reset_cache_toplevel: unit -> unit (* Remember the name of the current compilation unit. *) -val set_unit_name: string -> unit -val get_unit_name: unit -> string +val set_unit_name: Compilation_unit.t option -> unit +val get_unit_name: unit -> Compilation_unit.t option (* Read, save a signature to/from a file *) -val read_signature: modname -> filepath -> signature +val read_signature: Compilation_unit.t -> filepath -> signature (* Arguments: module name, file name. Results: signature. *) val save_signature: - alerts:alerts -> signature -> modname -> filepath + alerts:alerts -> signature -> Compilation_unit.t -> filepath -> Cmi_format.cmi_infos (* Arguments: signature, module name, file name. *) val save_signature_with_imports: - alerts:alerts -> signature -> modname -> filepath -> crcs + alerts:alerts -> signature -> Compilation_unit.t -> filepath + -> Cmi_format.import_info list -> Cmi_format.cmi_infos (* Arguments: signature, module name, file name, imported units with their CRCs. *) (* Return the CRC of the interface of the given compilation unit *) -val crc_of_unit: modname -> Digest.t +val crc_of_unit: Compilation_unit.Name.t -> Digest.t (* Return the set of compilation units imported, with their CRC *) -val imports: unit -> crcs +val imports: unit -> Cmi_format.import_info list (* may raise Persistent_env.Consistbl.Inconsistency *) -val import_crcs: source:string -> crcs -> unit +val import_crcs: source:string -> Cmi_format.import_info list -> unit (* [is_imported_opaque md] returns true if [md] is an opaque imported module *) -val is_imported_opaque: modname -> bool +val is_imported_opaque: Compilation_unit.Name.t -> bool (* [register_import_as_opaque md] registers [md] as an opaque imported module *) -val register_import_as_opaque: modname -> unit +val register_import_as_opaque: Compilation_unit.Name.t -> unit (* Summaries -- compact representation of an environment, to be exported in debugging information. *) @@ -524,3 +528,9 @@ val scrape_alias: t -> module_type -> module_type val check_value_name: string -> Location.t -> unit val print_address : Format.formatter -> address -> unit + +type address_head = + | AHunit of Compilation_unit.t + | AHlocal of Ident.t + +val address_head : address -> address_head diff --git a/typing/mtype.ml b/typing/mtype.ml index f57c9a22a9ec..7145f871ce53 100644 --- a/typing/mtype.ml +++ b/typing/mtype.ml @@ -46,6 +46,9 @@ let rec strengthen_lazy ~aliasable env mty p = MtyL_signature(strengthen_lazy_sig ~aliasable env sg p) | MtyL_functor(Named (Some param, arg), res) when !Clflags.applicative_functors -> + let env = + Env.add_module_lazy ~update_summary:false param Mp_present arg env + in MtyL_functor(Named (Some param, arg), strengthen_lazy ~aliasable:false env res (Papply(p, Pident param))) | MtyL_functor(Named (None, arg), res) diff --git a/typing/persistent_env.ml b/typing/persistent_env.ml index 65f6066376b2..2a4aae4f39bb 100644 --- a/typing/persistent_env.ml +++ b/typing/persistent_env.ml @@ -19,15 +19,20 @@ open Misc open Cmi_format -module Consistbl = Consistbl.Make (Misc.Stdlib.String) +module Consistbl = Consistbl.Make (Compilation_unit.Name) (Compilation_unit) let add_delayed_check_forward = ref (fun _ -> assert false) type error = - | Illegal_renaming of modname * modname * filepath - | Inconsistent_import of modname * filepath * filepath - | Need_recursive_types of modname - | Depend_on_unsafe_string_unit of modname + | Illegal_renaming of Compilation_unit.Name.t * Compilation_unit.Name.t * filepath + | Inconsistent_import of Compilation_unit.Name.t * filepath * filepath + | Need_recursive_types of Compilation_unit.t + | Depend_on_unsafe_string_unit of Compilation_unit.t + | Inconsistent_package_declaration of Compilation_unit.t * filepath + | Inconsistent_package_declaration_between_imports of + filepath * Compilation_unit.t * Compilation_unit.t + | Direct_reference_from_wrong_package of + Compilation_unit.t * filepath * Compilation_unit.Prefix.t exception Error of error let error err = raise (Error err) @@ -38,6 +43,7 @@ module Persistent_signature = struct cmi : Cmi_format.cmi_infos } let load = ref (fun ~unit_name -> + let unit_name = Compilation_unit.Name.to_string unit_name in match Load_path.find_uncap (unit_name ^ ".cmi") with | filename -> Some { filename; cmi = read_cmi filename } | exception Not_found -> None) @@ -48,14 +54,12 @@ type can_load_cmis = | Cannot_load_cmis of Lazy_backtrack.log type pers_struct = { - ps_name: string; - ps_crcs: (string * Digest.t option) list; + ps_name: Compilation_unit.t; + ps_crcs: Cmi_format.import_info list; ps_filename: string; ps_flags: pers_flags list; } -module String = Misc.Stdlib.String - (* If a .cmi file is missing (or invalid), we store it as Missing in the cache. *) type 'a pers_struct_info = @@ -63,17 +67,18 @@ type 'a pers_struct_info = | Found of pers_struct * 'a type 'a t = { - persistent_structures : (string, 'a pers_struct_info) Hashtbl.t; - imported_units: String.Set.t ref; - imported_opaque_units: String.Set.t ref; + persistent_structures : + (Compilation_unit.Name.t, 'a pers_struct_info) Hashtbl.t; + imported_units: Compilation_unit.Name.Set.t ref; + imported_opaque_units: Compilation_unit.Name.Set.t ref; crc_units: Consistbl.t; can_load_cmis: can_load_cmis ref; } let empty () = { persistent_structures = Hashtbl.create 17; - imported_units = ref String.Set.empty; - imported_opaque_units = ref String.Set.empty; + imported_units = ref Compilation_unit.Name.Set.empty; + imported_opaque_units = ref Compilation_unit.Name.Set.empty; crc_units = Consistbl.create (); can_load_cmis = ref Can_load_cmis; } @@ -87,8 +92,8 @@ let clear penv = can_load_cmis; } = penv in Hashtbl.clear persistent_structures; - imported_units := String.Set.empty; - imported_opaque_units := String.Set.empty; + imported_units := Compilation_unit.Name.Set.empty; + imported_opaque_units := Compilation_unit.Name.Set.empty; Consistbl.clear crc_units; can_load_cmis := Can_load_cmis; () @@ -102,10 +107,10 @@ let clear_missing {persistent_structures; _} = List.iter (Hashtbl.remove persistent_structures) missing_entries let add_import {imported_units; _} s = - imported_units := String.Set.add s !imported_units + imported_units := Compilation_unit.Name.Set.add s !imported_units let register_import_as_opaque {imported_opaque_units; _} s = - imported_opaque_units := String.Set.add s !imported_opaque_units + imported_opaque_units := Compilation_unit.Name.Set.add s !imported_opaque_units let find_in_cache {persistent_structures; _} s = match Hashtbl.find persistent_structures s with @@ -118,9 +123,9 @@ let import_crcs penv ~source crcs = let import_crc (name, crco) = match crco with | None -> () - | Some crc -> + | Some (unit, crc) -> add_import penv name; - Consistbl.check crc_units name crc source + Consistbl.check crc_units name unit crc source in List.iter import_crc crcs let check_consistency penv ps = @@ -129,8 +134,13 @@ let check_consistency penv ps = unit_name = name; inconsistent_source = source; original_source = auth; + inconsistent_data = source_unit; + original_data = auth_unit; } -> - error (Inconsistent_import(name, auth, source)) + if Compilation_unit.equal source_unit auth_unit + then error (Inconsistent_import(name, auth, source)) + else error (Inconsistent_package_declaration_between_imports( + ps.ps_filename, auth_unit, source_unit)) let can_load_cmis penv = !(penv.can_load_cmis) @@ -157,7 +167,7 @@ let fold {persistent_structures; _} f x = let save_pers_struct penv crc ps pm = let {persistent_structures; crc_units; _} = penv in - let modname = ps.ps_name in + let modname = Compilation_unit.name ps.ps_name in Hashtbl.add persistent_structures modname (Found (ps, pm)); List.iter (function @@ -166,7 +176,7 @@ let save_pers_struct penv crc ps pm = | Unsafe_string -> () | Opaque -> register_import_as_opaque penv modname) ps.ps_flags; - Consistbl.set crc_units modname crc ps.ps_filename; + Consistbl.set crc_units modname ps.ps_name crc ps.ps_filename; add_import penv modname let acknowledge_pers_struct penv check modname pers_sig pm = @@ -179,8 +189,9 @@ let acknowledge_pers_struct penv check modname pers_sig pm = ps_filename = filename; ps_flags = flags; } in - if ps.ps_name <> modname then - error (Illegal_renaming(modname, ps.ps_name, filename)); + let found_name = Compilation_unit.name name in + if not (Compilation_unit.Name.equal modname found_name) then + error (Illegal_renaming(modname, found_name, filename)); List.iter (function | Rectypes -> @@ -193,6 +204,16 @@ let acknowledge_pers_struct penv check modname pers_sig pm = | Opaque -> register_import_as_opaque penv modname) ps.ps_flags; if check then check_consistency penv ps; + begin match Compilation_unit.get_current () with + | Some current_unit -> + let access_allowed = + Compilation_unit.can_access_by_name name ~accessed_by:current_unit + in + if not access_allowed then + let prefix = Compilation_unit.for_pack_prefix current_unit in + error (Direct_reference_from_wrong_package (name, filename, prefix)); + | None -> () + end; let {persistent_structures; _} = penv in Hashtbl.add persistent_structures modname (Found (ps, pm)); ps @@ -207,7 +228,7 @@ let read_pers_struct penv val_of_pers_sig check modname filename = let find_pers_struct penv val_of_pers_sig check name = let {persistent_structures; _} = penv in - if name = "*predef*" then raise Not_found; + if Compilation_unit.Name.equal name Compilation_unit.Name.predef_exn then raise Not_found; match Hashtbl.find persistent_structures name with | Found (ps, pm) -> (ps, pm) | Missing -> raise Not_found @@ -227,17 +248,24 @@ let find_pers_struct penv val_of_pers_sig check name = let ps = acknowledge_pers_struct penv check name psig pm in (ps, pm) +let describe_prefix ppf prefix = + if Compilation_unit.Prefix.is_empty prefix then + Format.fprintf ppf "outside of any package" + else + Format.fprintf ppf "package %a" Compilation_unit.Prefix.print prefix + (* Emits a warning if there is no valid cmi for name *) let check_pers_struct penv f ~loc name = + let name_as_string = Compilation_unit.Name.to_string name in try ignore (find_pers_struct penv f false name) with | Not_found -> - let warn = Warnings.No_cmi_file(name, None) in + let warn = Warnings.No_cmi_file(name_as_string, None) in Location.prerr_warning loc warn | Cmi_format.Error err -> let msg = Format.asprintf "%a" Cmi_format.report_error err in - let warn = Warnings.No_cmi_file(name, Some msg) in + let warn = Warnings.No_cmi_file(name_as_string, Some msg) in Location.prerr_warning loc warn | Error err -> let msg = @@ -245,18 +273,26 @@ let check_pers_struct penv f ~loc name = | Illegal_renaming(name, ps_name, filename) -> Format.asprintf " %a@ contains the compiled interface for @ \ - %s when %s was expected" - Location.print_filename filename ps_name name + %a when %a was expected" + Location.print_filename filename + Compilation_unit.Name.print ps_name + Compilation_unit.Name.print name | Inconsistent_import _ -> assert false | Need_recursive_types name -> - Format.sprintf - "%s uses recursive types" - name + Format.asprintf + "%a uses recursive types" + Compilation_unit.print name | Depend_on_unsafe_string_unit name -> - Printf.sprintf "%s uses -unsafe-string" - name + Format.asprintf "%a uses -unsafe-string" + Compilation_unit.print name + | Inconsistent_package_declaration _ -> assert false + | Inconsistent_package_declaration_between_imports _ -> assert false + | Direct_reference_from_wrong_package (unit, _filename, prefix) -> + Format.asprintf "%a is inaccessible from %a" + Compilation_unit.print unit + describe_prefix prefix in - let warn = Warnings.No_cmi_file(name, Some msg) in + let warn = Warnings.No_cmi_file(name_as_string, Some msg) in Location.prerr_warning loc warn let read penv f modname filename = @@ -287,19 +323,20 @@ let crc_of_unit penv f name = in match crco with None -> assert false - | Some crc -> crc + | Some (_, crc) -> crc let imports {imported_units; crc_units; _} = - Consistbl.extract (String.Set.elements !imported_units) crc_units + Consistbl.extract (Compilation_unit.Name.Set.elements !imported_units) + crc_units let looked_up {persistent_structures; _} modname = Hashtbl.mem persistent_structures modname let is_imported {imported_units; _} s = - String.Set.mem s !imported_units + Compilation_unit.Name.Set.mem s !imported_units let is_imported_opaque {imported_opaque_units; _} s = - String.Set.mem s !imported_opaque_units + Compilation_unit.Name.Set.mem s !imported_opaque_units let make_cmi penv modname sign alerts = let flags = @@ -335,7 +372,9 @@ let save_cmi penv psig pm = will also return its crc *) let ps = { ps_name = modname; - ps_crcs = (cmi.cmi_name, Some crc) :: imports; + ps_crcs = + (Compilation_unit.name cmi.cmi_name, Some (cmi.cmi_name, crc)) + :: imports; ps_filename = filename; ps_flags = flags; } in @@ -348,21 +387,44 @@ let report_error ppf = function | Illegal_renaming(modname, ps_name, filename) -> fprintf ppf "Wrong file naming: %a@ contains the compiled interface for@ \ - %s when %s was expected" - Location.print_filename filename ps_name modname + %a when %a was expected" + Location.print_filename filename + Compilation_unit.Name.print ps_name + Compilation_unit.Name.print modname | Inconsistent_import(name, source1, source2) -> fprintf ppf "@[The files %a@ and %a@ \ - make inconsistent assumptions@ over interface %s@]" - Location.print_filename source1 Location.print_filename source2 name + make inconsistent assumptions@ over interface %a@]" + Location.print_filename source1 Location.print_filename source2 + Compilation_unit.Name.print name | Need_recursive_types(import) -> fprintf ppf - "@[Invalid import of %s, which uses recursive types.@ %s@]" - import "The compilation flag -rectypes is required" + "@[Invalid import of %a, which uses recursive types.@ %s@]" + Compilation_unit.print import + "The compilation flag -rectypes is required" | Depend_on_unsafe_string_unit(import) -> fprintf ppf - "@[Invalid import of %s, compiled with -unsafe-string.@ %s@]" - import "This compiler has been configured in strict \ - safe-string mode (-force-safe-string)" + "@[Invalid import of %a, compiled with -unsafe-string.@ %s@]" + Compilation_unit.print import + "This compiler has been configured in strict \ + safe-string mode (-force-safe-string)" + | Inconsistent_package_declaration(intf_package, intf_filename) -> + fprintf ppf + "@[The interface %a@ is compiled for package %s.@ %s@]" + Compilation_unit.print intf_package intf_filename + "The compilation flag -for-pack with the same package is required" + | Inconsistent_package_declaration_between_imports (filename, unit1, unit2) -> + fprintf ppf + "@[The file %s@ is imported both as %a@ and as %a.@]" + filename + Compilation_unit.print unit1 + Compilation_unit.print unit2 + | Direct_reference_from_wrong_package(unit, filename, prefix) -> + fprintf ppf + "@[Invalid reference to %a (in file %s) from %a.@ %s]" + Compilation_unit.print unit + filename + describe_prefix prefix + "Can only access members of this library's package or a containing package" let () = Location.register_error_of_exn diff --git a/typing/persistent_env.mli b/typing/persistent_env.mli index b2e139312db5..3f4cf4e1cb2d 100644 --- a/typing/persistent_env.mli +++ b/typing/persistent_env.mli @@ -17,14 +17,19 @@ open Misc module Consistbl : module type of struct - include Consistbl.Make (Misc.Stdlib.String) + include Consistbl.Make (Compilation_unit.Name) (Compilation_unit) end type error = - | Illegal_renaming of modname * modname * filepath - | Inconsistent_import of modname * filepath * filepath - | Need_recursive_types of modname - | Depend_on_unsafe_string_unit of modname + | Illegal_renaming of Compilation_unit.Name.t * Compilation_unit.Name.t * filepath + | Inconsistent_import of Compilation_unit.Name.t * filepath * filepath + | Need_recursive_types of Compilation_unit.t + | Depend_on_unsafe_string_unit of Compilation_unit.t + | Inconsistent_package_declaration of Compilation_unit.t * filepath + | Inconsistent_package_declaration_between_imports of + filepath * Compilation_unit.t * Compilation_unit.t + | Direct_reference_from_wrong_package of + Compilation_unit.t * filepath * Compilation_unit.Prefix.t exception Error of error @@ -38,7 +43,7 @@ module Persistent_signature : sig (** Function used to load a persistent signature. The default is to look for the .cmi file in the load path. This function can be overridden to load it from memory, for instance to build a self-contained toplevel. *) - val load : (unit_name:string -> t option) ref + val load : (unit_name:Compilation_unit.Name.t -> t option) ref end type can_load_cmis = @@ -52,36 +57,36 @@ val empty : unit -> 'a t val clear : 'a t -> unit val clear_missing : 'a t -> unit -val fold : 'a t -> (modname -> 'a -> 'b -> 'b) -> 'b -> 'b +val fold : 'a t -> (Compilation_unit.Name.t -> 'a -> 'b -> 'b) -> 'b -> 'b val read : 'a t -> (Persistent_signature.t -> 'a) - -> modname -> filepath -> 'a + -> Compilation_unit.Name.t -> filepath -> 'a val find : 'a t -> (Persistent_signature.t -> 'a) - -> modname -> 'a + -> Compilation_unit.Name.t -> 'a -val find_in_cache : 'a t -> modname -> 'a option +val find_in_cache : 'a t -> Compilation_unit.Name.t -> 'a option val check : 'a t -> (Persistent_signature.t -> 'a) - -> loc:Location.t -> modname -> unit + -> loc:Location.t -> Compilation_unit.Name.t -> unit (* [looked_up penv md] checks if one has already tried to read the signature for [md] in the environment [penv] (it may have failed) *) -val looked_up : 'a t -> modname -> bool +val looked_up : 'a t -> Compilation_unit.Name.t -> bool (* [is_imported penv md] checks if [md] has been successfully imported in the environment [penv] *) -val is_imported : 'a t -> modname -> bool +val is_imported : 'a t -> Compilation_unit.Name.t -> bool (* [is_imported_opaque penv md] checks if [md] has been imported in [penv] as an opaque module *) -val is_imported_opaque : 'a t -> modname -> bool +val is_imported_opaque : 'a t -> Compilation_unit.Name.t -> bool (* [register_import_as_opaque penv md] registers [md] in [penv] as an opaque module *) -val register_import_as_opaque : 'a t -> modname -> unit +val register_import_as_opaque : 'a t -> Compilation_unit.Name.t -> unit -val make_cmi : 'a t -> modname -> Types.signature -> alerts +val make_cmi : 'a t -> Compilation_unit.t -> Types.signature -> alerts -> Cmi_format.cmi_infos val save_cmi : 'a t -> Persistent_signature.t -> 'a -> unit @@ -93,13 +98,14 @@ val without_cmis : 'a t -> ('b -> 'c) -> 'b -> 'c allow [penv] to openi cmis during its execution *) (* may raise Consistbl.Inconsistency *) -val import_crcs : 'a t -> source:filepath -> crcs -> unit +val import_crcs : 'a t -> source:filepath -> Cmi_format.import_info list -> unit (* Return the set of compilation units imported, with their CRC *) -val imports : 'a t -> crcs +val imports : 'a t -> Cmi_format.import_info list (* Return the CRC of the interface of the given compilation unit *) -val crc_of_unit: 'a t -> (Persistent_signature.t -> 'a) -> modname -> Digest.t +val crc_of_unit: 'a t -> (Persistent_signature.t -> 'a) + -> Compilation_unit.Name.t -> Digest.t (* Forward declaration to break mutual recursion with Typecore. *) val add_delayed_check_forward: ((unit -> unit) -> unit) ref diff --git a/typing/printtyp.ml b/typing/printtyp.ml index bbc93b6053cd..119c292f53f0 100644 --- a/typing/printtyp.ml +++ b/typing/printtyp.ml @@ -380,6 +380,16 @@ let rec module_path_is_an_alias_of env path ~alias_of = | _ -> false | exception Not_found -> false +let expand_longident_head name = + match find_double_underscore name with + | None -> None + | Some i -> + Some + (Ldot + (Lident (String.sub name 0 i), + String.capitalize_ascii + (String.sub name (i + 2) (String.length name - i - 2)))) + (* Simple heuristic to print Foo__bar.* as Foo.Bar.* when Foo.Bar is an alias for Foo__bar. This pattern is used by the stdlib. *) let rec rewrite_double_underscore_paths env p = @@ -391,15 +401,9 @@ let rec rewrite_double_underscore_paths env p = rewrite_double_underscore_paths env b) | Pident id -> let name = Ident.name id in - match find_double_underscore name with + match expand_longident_head name with | None -> p - | Some i -> - let better_lid = - Ldot - (Lident (String.sub name 0 i), - String.capitalize_ascii - (String.sub name (i + 2) (String.length name - i - 2))) - in + | Some better_lid -> match Env.find_module_by_name better_lid env with | exception Not_found -> p | p', _ -> @@ -414,6 +418,25 @@ let rewrite_double_underscore_paths env p = else rewrite_double_underscore_paths env p +let rec rewrite_double_underscore_longidents env (l : Longident.t) = + match l with + | Ldot (l, s) -> + Ldot (rewrite_double_underscore_longidents env l, s) + | Lapply (a, b) -> + Lapply (rewrite_double_underscore_longidents env a, + rewrite_double_underscore_longidents env b) + | Lident name -> + match expand_longident_head name with + | None -> l + | Some l' -> + match Env.find_module_by_name l env, Env.find_module_by_name l' env with + | exception Not_found -> l + | (p, _), (p', _) -> + if module_path_is_an_alias_of env p' ~alias_of:p then + l' + else + l + let rec tree_of_path namespace = function | Pident id -> Oide_ident (ident_name namespace id) @@ -607,7 +630,7 @@ type best_path = Paths of Path.t list | Best of Path.t cache for short-paths *) let printing_old = ref Env.empty -let printing_pers = ref String.Set.empty +let printing_pers = ref Compilation_unit.Name.Set.empty (** {!printing_old} and {!printing_pers} are the keys of the one-slot cache *) let printing_depth = ref 0 @@ -671,7 +694,8 @@ let rec path_size = function let same_printing_env env = let used_pers = Env.used_persistent () in - Env.same_types !printing_old env && String.Set.equal !printing_pers used_pers + Env.same_types !printing_old env + && Compilation_unit.Name.Set.equal !printing_pers used_pers let set_printing_env env = printing_env := env; diff --git a/typing/printtyp.mli b/typing/printtyp.mli index 13b2ed95e872..8d7a33a38b24 100644 --- a/typing/printtyp.mli +++ b/typing/printtyp.mli @@ -236,6 +236,8 @@ val print_items: (Env.t -> signature_item -> 'a option) -> for Foo__bar. This pattern is used by the stdlib. *) val rewrite_double_underscore_paths: Env.t -> Path.t -> Path.t +val rewrite_double_underscore_longidents: Env.t -> Longident.t -> Longident.t + (** [printed_signature sourcefile ppf sg] print the signature [sg] of [sourcefile] with potential warnings for name collisions *) val printed_signature: string -> formatter -> signature -> unit diff --git a/typing/shape.ml b/typing/shape.ml index 27b8dbb5ca70..73a39e203f6e 100644 --- a/typing/shape.ml +++ b/typing/shape.ml @@ -44,12 +44,15 @@ module Uid = struct let mk ~current_unit = incr id; - Item { comp_unit = current_unit; id = !id } + let comp_unit = + match current_unit with + | Some cu -> cu |> Compilation_unit.full_path_as_string + | None -> "" + in + Item { comp_unit; id = !id } let of_compilation_unit_id id = - if not (Ident.is_global id) then - Misc.fatal_errorf "Types.Uid.of_compilation_unit_id %S" (Ident.name id); - Compilation_unit (Ident.name id) + Compilation_unit (id |> Compilation_unit.full_path_as_string) let of_predef_id id = if not (Ident.is_predef id) then @@ -464,7 +467,7 @@ let of_path ~find_shape ~namespace = aux namespace let for_persistent_unit s = - { uid = Some (Uid.of_compilation_unit_id (Ident.create_persistent s)); + { uid = Some (Compilation_unit s); desc = Comp_unit s } let leaf_for_unpack = { uid = None; desc = Leaf } diff --git a/typing/shape.mli b/typing/shape.mli index 8a5aaca4fbbf..e1dc6bed331c 100644 --- a/typing/shape.mli +++ b/typing/shape.mli @@ -22,8 +22,8 @@ module Uid : sig val reinit : unit -> unit - val mk : current_unit:string -> t - val of_compilation_unit_id : Ident.t -> t + val mk : current_unit:Compilation_unit.t option -> t + val of_compilation_unit_id : Compilation_unit.t -> t val of_predef_id : Ident.t -> t val internal_not_actually_unique : t @@ -91,6 +91,7 @@ val leaf : Uid.t -> t val decompose_abs : t -> (var * t) option +(* CR lmaurer: Should really take a [Compilation_unit.t] *) val for_persistent_unit : string -> t val leaf_for_unpack : t diff --git a/typing/typemod.ml b/typing/typemod.ml index d7224bb383f1..ac7df1fe229f 100644 --- a/typing/typemod.ml +++ b/typing/typemod.ml @@ -131,38 +131,42 @@ let extract_sig_functor_open funct_body env loc mty sig_acc = with Includemod.Error msg -> raise (Error(loc, env, Not_included_functor msg)) in + (* We must scrape the result type in an environment expanded with the + parameter type (to avoid `Not_found` exceptions when it is referenced). + Because we don't have an actual parameter, we create definitions for + the parameter's types with [sig_make_manifest]. References to this + fake parameter are eliminated later. *) + let extended_env = + match param with + | None -> env + | Some id -> + let sg_param = Mtype.sig_make_manifest sig_acc in + Env.add_module ~arg:true id Mp_present (Mty_signature sg_param) env + in let incl_kind, sg_result = (* Accept functor types of the forms: sig..end -> sig..end and sig..end -> () -> sig..end *) - match Mtype.scrape env mty_result with + match Mtype.scrape extended_env mty_result with | Mty_signature sg_result -> Tincl_functor coercion, sg_result | Mty_functor (Unit,_) when funct_body && Mtype.contains_type env mty -> raise (Error (loc, env, Not_includable_in_functor_body)) | Mty_functor (Unit,mty_result) -> begin - match Mtype.scrape env mty_result with + match Mtype.scrape extended_env mty_result with | Mty_signature sg_result -> Tincl_gen_functor coercion, sg_result | sg -> raise (Error (loc,env,Signature_result_expected (Mty_functor (Unit,sg)))) end | sg -> raise (Error (loc,env,Signature_result_expected sg)) in - (* Like the [Pmod_apply] case, we want to use [nondep_supertype] to - eliminate references to the functor's parameter in its result type. - Unlike that case, we don't have an actual parameter, just the previous - contents of the module currently being checked. So we create - definitions for the parameter's types with [sig_make_manifest] before - the call to [nondep_sig]. *) + (* Here we eliminate references to the non-existent parameter module using + [nondep_sig]. *) let sg = match param with | None -> sg_result | Some id -> - let sg_param = Mtype.sig_make_manifest sig_acc in - let env = - Env.add_module ~arg:true id Mp_present (Mty_signature sg_param) env - in - try Mtype.nondep_sig env [id] sg_result + try Mtype.nondep_sig extended_env [id] sg_result with Ctype.Nondep_cannot_erase _ -> raise(Error(loc, env, Cannot_eliminate_dependency (Functor_included, mty_func))) @@ -2134,8 +2138,10 @@ and package_constraints env loc mty constrs = end let modtype_of_package env loc p fl = + (* We call Ctype.correct_levels to ensure that the types being added to the + module type are at generic_level. *) package_constraints env loc (Mty_ident p) - (List.map (fun (n, t) -> (Longident.flatten n, t)) fl) + (List.map (fun (n, t) -> Longident.flatten n, Ctype.correct_levels t) fl) let package_subtype env p1 fl1 p2 fl2 = let mkmty p fl = @@ -2223,7 +2229,7 @@ and type_module_aux ~alias sttn funct_body anchor env smod = in let md = if alias && aliasable then - (Env.add_required_global (Path.head path); md) + (Env.add_required_global path env; md) else begin let mty = if sttn then @@ -3125,7 +3131,7 @@ let type_implementation sourcefile outputprefix modulename initial_env ast = type_structure initial_env ast in let shape = Shape.set_uid_if_none shape - (Uid.of_compilation_unit_id (Ident.create_persistent modulename)) + (Uid.of_compilation_unit_id modulename) in let simple_sg = Signature_names.simplify finalenv names sg in if !Clflags.print_types then begin @@ -3147,9 +3153,10 @@ let type_implementation sourcefile outputprefix modulename initial_env ast = let sourceintf = Filename.remove_extension sourcefile ^ !Config.interface_suffix in if Sys.file_exists sourceintf then begin + let basename = modulename |> Compilation_unit.name_as_string in let intf_file = try - Load_path.find_uncap (modulename ^ ".cmi") + Load_path.find_uncap (basename ^ ".cmi") with Not_found -> raise(Error(Location.in_file sourcefile, Env.empty, Interface_not_compiled sourceintf)) in @@ -3232,6 +3239,7 @@ let package_signatures units = let units_with_ids = List.map (fun (name, sg) -> + let name = name |> Compilation_unit.Name.to_string in let oldid = Ident.create_persistent name in let newid = Ident.create_local name in (oldid, newid, sg)) @@ -3264,22 +3272,30 @@ let package_units initial_env objfiles cmifile modulename = List.map (fun f -> let pref = chop_extensions f in - let modname = String.capitalize_ascii(Filename.basename pref) in + let unit = + pref + |> Filename.basename + |> String.capitalize_ascii + |> Compilation_unit.Name.of_string + in + let modname = Compilation_unit.create_child modulename unit in let sg = Env.read_signature modname (pref ^ ".cmi") in if Filename.check_suffix f ".cmi" && not(Mtype.no_code_needed_sig Env.initial_safe_string sg) then raise(Error(Location.none, Env.empty, Implementation_is_required f)); - (modname, Env.read_signature modname (pref ^ ".cmi"))) + Compilation_unit.name modname, + Env.read_signature modname (pref ^ ".cmi")) objfiles in (* Compute signature of packaged unit *) Ident.reinit(); let sg = package_signatures units in (* Compute the shape of the package *) let prefix = Filename.remove_extension cmifile in - let pack_uid = Uid.of_compilation_unit_id (Ident.create_persistent prefix) in + let pack_uid = Uid.of_compilation_unit_id modulename in let shape = List.fold_left (fun map (name, _sg) -> + let name = Compilation_unit.Name.to_string name in let id = Ident.create_persistent name in Shape.Map.add_module map id (Shape.for_persistent_unit name) ) Shape.Map.empty units diff --git a/typing/typemod.mli b/typing/typemod.mli index 5933c8e5875b..6c74a038a302 100644 --- a/typing/typemod.mli +++ b/typing/typemod.mli @@ -39,7 +39,7 @@ val type_toplevel_phrase: Typedtree.structure * Types.signature * Signature_names.t * Shape.t * Env.t val type_implementation: - string -> string -> string -> Env.t -> + string -> string -> Compilation_unit.t -> Env.t -> Parsetree.structure -> Typedtree.implementation val type_interface: Env.t -> Parsetree.signature -> Typedtree.signature @@ -60,11 +60,11 @@ val modtype_of_package: val path_of_module : Typedtree.module_expr -> Path.t option val save_signature: - string -> Typedtree.signature -> string -> string -> + Compilation_unit.t -> Typedtree.signature -> string -> string -> Env.t -> Cmi_format.cmi_infos -> unit val package_units: - Env.t -> string list -> string -> string -> Typedtree.module_coercion + Env.t -> string list -> string -> Compilation_unit.t -> Typedtree.module_coercion (* Should be in Envaux, but it breaks the build of the debugger *) val initial_env: diff --git a/utils/Makefile b/utils/Makefile index 591d8a2de0bc..92338486a441 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -99,6 +99,7 @@ config.ml: config.mlp $(ROOTDIR)/Makefile.config Makefile $(call SUBST,CC_HAS_DEBUG_PREFIX_MAP) \ $(call SUBST,AS_HAS_DEBUG_PREFIX_MAP) \ $(call SUBST,STACK_ALLOCATION) \ + $(call SUBST,POLL_INSERTION) \ $< > $@ # Test for the substitution functions above diff --git a/utils/compilation_unit.ml b/utils/compilation_unit.ml index 49e29068da02..34f3bf59a086 100644 --- a/utils/compilation_unit.ml +++ b/utils/compilation_unit.ml @@ -22,7 +22,7 @@ module List = Misc.Stdlib.List module String = Misc.Stdlib.String type error = - | Invalid_character of char + | Invalid_character of char * string | Bad_compilation_unit_name of string exception Error of error @@ -43,9 +43,9 @@ module Name : sig type t include Identifiable.S with type t := t val dummy : t + val predef_exn : t val of_string : string -> t val to_string : t -> string - val persistent_ident : t -> Ident.t val check_as_path_component : t -> unit end = struct (* Be VERY careful changing this. Anything not equivalent to [string] will @@ -84,16 +84,17 @@ end = struct let dummy = "*dummy*" - let to_string t = t + let predef_exn = "*predef*" - let persistent_ident t = Ident.create_persistent t + let to_string t = t end module Prefix : sig type t include Identifiable.S with type t := t - val parse_for_pack : string option -> t + val parse_for_pack : string -> t val from_clflags : unit -> t + val of_list : Name.t list -> t val to_list : t -> Name.t list val to_string : t -> string val empty : t @@ -130,20 +131,19 @@ end = struct || code >= 65 && code <= 90 (* [A-Z] *) || code >= 97 && code <= 122 (* [a-z] *) - let parse pack = + let parse_for_pack pack = let prefix = String.split_on_char '.' pack in ListLabels.iter prefix ~f:(fun module_name -> String.iteri (fun i c -> if not (is_valid_character (i=0) c) then - raise (Error (Invalid_character c))) + raise (Error (Invalid_character (c, module_name)))) module_name); ListLabels.map prefix ~f:Name.of_string - let parse_for_pack = function + let from_clflags () = + match !Clflags.for_package with | None -> [] - | Some pack -> parse pack - - let from_clflags () = parse_for_pack !Clflags.for_package + | Some pack -> parse_for_pack pack let to_string p = Format.asprintf "%a" print p @@ -155,6 +155,8 @@ end = struct | [] -> true | _::_ -> false + let of_list t = t + let to_list t = t end @@ -176,6 +178,13 @@ let create for_pack_prefix name = hash = Hashtbl.hash (name, for_pack_prefix) } +let create_child parent name = + let prefix = + (parent.for_pack_prefix |> Prefix.to_list) @ [ parent.name ] + |> Prefix.of_list + in + create prefix name + let of_string str = let for_pack_prefix, name = match String.rindex_opt str '.' with @@ -184,18 +193,19 @@ let of_string str = (* See [Name.check_as_path_component]; this allows ".cinaps" as a compilation unit *) Prefix.empty, Name.of_string str - | Some pos -> - Prefix.parse_for_pack (Some (String.sub str 0 (pos+1))), - Name.of_string (String.sub str (pos+1) (String.length str - pos - 1)) + | Some _ -> + Misc.fatal_errorf "[of_string] does not parse qualified names" in create for_pack_prefix name let dummy = create Prefix.empty (Name.of_string "*none*") -let predef_exn = create Prefix.empty (Name.of_string "*predef*") +let predef_exn = create Prefix.empty Name.predef_exn let name t = t.name +let name_as_string t = name t |> Name.to_string + let for_pack_prefix t = t.for_pack_prefix let with_for_pack_prefix t for_pack_prefix = { t with for_pack_prefix; } @@ -242,12 +252,75 @@ let full_path t = let is_parent t ~child = List.equal Name.equal (full_path t) (Prefix.to_list child.for_pack_prefix) +let is_strict_prefix list1 ~of_:list2 ~equal = + not (List.equal equal list1 list2) && List.is_prefix list1 ~of_:list2 ~equal + +let can_access_by_name t ~accessed_by:me = + let my_path = full_path me in + (* Criterion 1 in .mli *) + let t's_prefix_is_my_ancestor = + List.is_prefix + (t.for_pack_prefix |> Prefix.to_list) + ~of_:my_path + ~equal:Name.equal + in + (* Criterion 2 *) + let t_is_not_my_strict_ancestor = + not (is_strict_prefix (full_path t) ~of_:my_path ~equal:Name.equal) + in + t's_prefix_is_my_ancestor && t_is_not_my_strict_ancestor + +let which_cmx_file desired_comp_unit ~accessed_by : Name.t = + let desired_prefix = for_pack_prefix desired_comp_unit in + if Prefix.is_empty desired_prefix then + (* If the unit we're looking for is not in a pack, then the correct .cmx + file is the one with the same name as the unit, irrespective of any + current pack. *) + name desired_comp_unit + else + (* This lines up the full paths as described above. *) + let rec match_components ~current ~desired = + match current, desired with + | current_name::current, desired_name::desired -> + if Name.equal current_name desired_name then + (* The full paths are equal up to the current point; keep going. *) + match_components ~current ~desired + else + (* The paths have diverged. The next component of the desired + path is the .cmx file to load. *) + desired_name + | [], desired_name::_desired -> + (* The whole of the current unit's full path (including the name of + the unit itself) is now known to be a prefix of the desired unit's + pack *prefix*. This means we must be making a pack. The .cmx + file to load is named after the next component of the desired + unit's path (which may in turn be a pack). *) + desired_name + | [], [] -> + (* The paths were equal, so the desired compilation unit is just the + current one. *) + name desired_comp_unit + | _::_, [] -> + (* The current path is longer than the desired unit's path, which + means we're attempting to go back up the pack hierarchy. This is + an error. *) + Misc.fatal_errorf "Compilation unit@ %a@ is inaccessible when \ + compiling compilation unit@ %a" + print desired_comp_unit + print accessed_by + in + match_components ~current:(full_path accessed_by) + ~desired:(full_path desired_comp_unit) + let print_name ppf t = Format.fprintf ppf "%a" Name.print t.name let full_path_as_string t = Format.asprintf "%a" print t +let to_global_ident_for_bytecode t = + Ident.create_persistent (full_path_as_string t) + let print_debug ppf { for_pack_prefix; hash = _; name } = if Prefix.is_empty for_pack_prefix then Format.fprintf ppf "@[(\ @@ -262,11 +335,13 @@ let print_debug ppf { for_pack_prefix; hash = _; name } = let current = ref None -let set_current t = - current := Some t +let set_current t_opt = + current := t_opt let get_current () = !current +let get_current_or_dummy () = Option.value !current ~default:dummy + let get_current_exn () = match !current with | Some t -> t diff --git a/utils/compilation_unit.mli b/utils/compilation_unit.mli index 72215ab9a147..f347891b4aff 100644 --- a/utils/compilation_unit.mli +++ b/utils/compilation_unit.mli @@ -43,7 +43,8 @@ module Name : sig val to_string : t -> string - val persistent_ident : t -> Ident.t + (** The name of the distinguished compilation unit for predefined exceptions. *) + val predef_exn : t end module Prefix : sig @@ -56,10 +57,12 @@ module Prefix : sig val empty : t - (** [parse_for_pack p] returns the list of nested packed modules from a - "-for-pack" argument. *) - val parse_for_pack : string option -> t + (** [parse_for_pack p] returns the list of nested packed modules, as expressed + in the syntax of the "-for-pack" argument. *) + val parse_for_pack : string -> t + (** Return the prefix specified to "-for-pack". Returns the empty prefix if + no "-for-pack" was passed. *) val from_clflags : unit -> t (** Return the list of names comprising the prefix, outermost first. *) @@ -89,14 +92,63 @@ val print_debug : Format.formatter -> t -> unit mangled in any way). *) val create : Prefix.t -> Name.t -> t -(** Create a compilation unit from the given [name]. The "-for-pack" of - prefix is extracted if there is any. *) +(** Create a compilation unit contained by another. Effectively uses the + parent compilation unit as the prefix. *) +val create_child : t -> Name.t -> t + +(** Create a compilation unit from the given [name]. No prefix is allowed; + throws a fatal error if there is a "." in the name. (As a special case, + a "." is allowed as the first character, to handle compilation units + which take their names from hidden files.) *) val of_string : string -> t +(** Create a global [Ident.t] representing this compilation unit. Only intended + for use in bytecode; most uses of [Ident.t]s that are known to be global + should simply use [t] instead. *) +val to_global_ident_for_bytecode : t -> Ident.t + (** Find whether one compilation unit has another as a child. That is, whether the other unit has this one as its path prefix. *) val is_parent : t -> child:t -> bool +(** Find whether one compilation unit can access another directly, without going + through a pack. Equivalently, find whether one unit's .cmx file is visible + while compiling another. Access to a packed unit is allowed only "from + inside the pack," which is to say, a unit can only access its own members + and those of its ancestors, though not the ancestors themselves. Thought of + as a node in a tree, this means a module can access its own children, its + own siblings, and its ancestors' siblings. + + In terms of paths, in order for [X] to access [Y], + + (1) [Y]'s prefix must be equal to or a prefix of [X]'s full path, and + (2) [Y] itself must not be (strictly) a prefix of [X] (though [X] and [Y] may + be equal). + + For example: + + * [A.B.C] _can_ access [A.Q] because [A.Q] is a member of [A] and [A] is + an ancestor of [A.B.C]. In other words, [A.Q]'s prefix is [A] and [A] is a + prefix of [A.B.C]. + * [A.Q] _cannot_ access [A.B.C] because [A.B] is not a prefix of [A.Q]. + * [A.Q] _can_ however access [A.B], because [A] _is_ a prefix of [A.Q]. + * [A.Q] _can_ also access its own member, [A.Q.R], because [A.Q.R]'s prefix + is exactly [A.Q]. + * [A.Q] _cannot_ access [A.Q.R.S], because [A.Q.R] is not a prefix of [A.Q]. + * [A.Q] _can_ access [F], since [F]'s prefix is the empty path, which is + trivially a prefix of [A.Q]. + * [A.Q] _cannot_ access [F.G] (by criterion 1) or [A] (by criterion 2). *) +val can_access_by_name : t -> accessed_by:t -> bool + +(** Determine which .cmx file to load for a given compilation unit. + This is tricky in the case of packs. It can be done by lining up the + desired compilation unit's full path (i.e. pack prefix then unit name) + against the accessing unit's full path and observing when/if they + diverge. + + This is only used for native code compilation. *) +val which_cmx_file : t -> accessed_by:t -> Name.t + (** A distinguished compilation unit for initialisation of mutable state. *) val dummy : t @@ -106,6 +158,13 @@ val predef_exn : t (** The name of the compilation unit, excluding any [for_pack_prefix]. *) val name : t -> Name.t +(** The name of the compilation unit, excluding any [for_pack_prefix], as + as a string. *) + +(* CR mshinwell: Try to delete this as soon as the functor packs work is + finished. *) +val name_as_string : t -> string + (** The "-for-pack" prefix associated with the given compilation unit. *) val for_pack_prefix : t -> Prefix.t @@ -125,13 +184,14 @@ val full_path : t -> Name.t list val full_path_as_string : t -> string type error = private - | Invalid_character of char + | Invalid_character of char * string | Bad_compilation_unit_name of string (** The exception raised by conversion functions in this module. *) exception Error of error -val set_current : t -> unit +val set_current : t option -> unit val get_current : unit -> t option +val get_current_or_dummy : unit -> t val get_current_exn : unit -> t val is_current : t -> bool diff --git a/utils/config.mli b/utils/config.mli index c31f05bfbd4c..5c17c0854817 100644 --- a/utils/config.mli +++ b/utils/config.mli @@ -273,6 +273,9 @@ val afl_instrument : bool val stack_allocation : bool (** Whether to stack allocate local values *) +val poll_insertion : bool +(** Whether to insert poll points *) + (** Access to configuration values *) val print_config : out_channel -> unit diff --git a/utils/config.mlp b/utils/config.mlp index c0f963e1ff99..5f1bb19ab331 100644 --- a/utils/config.mlp +++ b/utils/config.mlp @@ -94,6 +94,7 @@ let probes = %%PROBES%% let afl_instrument = %%AFL_INSTRUMENT%% let stack_allocation = %%STACK_ALLOCATION%% +let poll_insertion = %%POLL_INSERTION%% (* When artifacts are incompatible with upstream OCaml, ocaml-jst uses magic numbers ending in 5xx. (The AST and bytecode executables remain @@ -230,6 +231,7 @@ let configuration_variables = p_bool "flambda_backend" flambda_backend; p_bool "probes" probes; + p_bool "stack_allocation" stack_allocation; ] let print_config_value oc = function diff --git a/utils/consistbl.ml b/utils/consistbl.ml index 311c0e413ab5..5fd05939b3bf 100644 --- a/utils/consistbl.ml +++ b/utils/consistbl.ml @@ -23,8 +23,10 @@ module Make (Module_name : sig module Map : Map.S with type key = t module Tbl : Hashtbl.S with type key = t val compare : t -> t -> int +end) (Data : sig + type t end) = struct - type t = (Digest.t * filepath) Module_name.Tbl.t + type t = (Data.t * Digest.t * filepath) Module_name.Tbl.t let create () = Module_name.Tbl.create 13 @@ -34,36 +36,41 @@ end) = struct unit_name : Module_name.t; inconsistent_source : string; original_source : string; + inconsistent_data : Data.t; + original_data : Data.t; } exception Not_available of Module_name.t - let check_ tbl name crc source = - let (old_crc, old_source) = Module_name.Tbl.find tbl name in - if crc <> old_crc then raise(Inconsistency { + let check_ tbl name data crc source = + let (old_data, old_crc, old_source) = Module_name.Tbl.find tbl name in + if not (Digest.equal crc old_crc) + then raise(Inconsistency { unit_name = name; inconsistent_source = source; original_source = old_source; + inconsistent_data = data; + original_data = old_data; }) - let check tbl name crc source = - try check_ tbl name crc source + let check tbl name data crc source = + try check_ tbl name data crc source with Not_found -> - Module_name.Tbl.add tbl name (crc, source) + Module_name.Tbl.add tbl name (data, crc, source) - let check_noadd tbl name crc source = - try check_ tbl name crc source + let check_noadd tbl name data crc source = + try check_ tbl name data crc source with Not_found -> raise (Not_available name) - let set tbl name crc source = Module_name.Tbl.add tbl name (crc, source) + let set tbl name data crc source = Module_name.Tbl.add tbl name (data, crc, source) - let source tbl name = snd (Module_name.Tbl.find tbl name) + let source tbl name = thd3 (Module_name.Tbl.find tbl name) let find t name = match Module_name.Tbl.find t name with | exception Not_found -> None - | (crc, _) -> Some crc + | (data, crc, _) -> Some (data, crc) let extract l tbl = let l = List.sort_uniq Module_name.compare l in diff --git a/utils/consistbl.mli b/utils/consistbl.mli index 6ca571bd8916..8deb715aa401 100644 --- a/utils/consistbl.mli +++ b/utils/consistbl.mli @@ -28,6 +28,8 @@ module Make (Module_name : sig module Map : Map.S with type key = t module Tbl : Hashtbl.S with type key = t val compare : t -> t -> int +end) (Data : sig + type t end) : sig type t @@ -35,21 +37,21 @@ end) : sig val clear: t -> unit - val check: t -> Module_name.t -> Digest.t -> filepath -> unit - (* [check tbl name crc source] + val check: t -> Module_name.t -> Data.t -> Digest.t -> filepath -> unit + (* [check tbl name data crc source] checks consistency of ([name], [crc]) with infos previously stored in [tbl]. If no CRC was previously associated with - [name], record ([name], [crc]) in [tbl]. + [name], record ([name], [data], [crc]) in [tbl]. [source] is the name of the file from which the information comes from. This is used for error reporting. *) - val check_noadd: t -> Module_name.t -> Digest.t -> filepath -> unit + val check_noadd: t -> Module_name.t -> Data.t -> Digest.t -> filepath -> unit (* Same as [check], but raise [Not_available] if no CRC was previously associated with [name]. *) - val set: t -> Module_name.t -> Digest.t -> filepath -> unit - (* [set tbl name crc source] forcefully associates [name] with - [crc] in [tbl], even if [name] already had a different CRC + val set: t -> Module_name.t -> Data.t -> Digest.t -> filepath -> unit + (* [set tbl name data crc source] forcefully associates [name] with + ([data], [crc]) in [tbl], even if [name] already had a different CRC associated with [name] in [tbl]. *) val source: t -> Module_name.t -> filepath @@ -57,14 +59,16 @@ end) : sig if the latter has an associated CRC in [tbl]. Raise [Not_found] otherwise. *) - val find: t -> Module_name.t -> Digest.t option + val find: t -> Module_name.t -> (Data.t * Digest.t) option - val extract: Module_name.t list -> t -> (Module_name.t * Digest.t option) list + val extract: + Module_name.t list -> t -> (Module_name.t * (Data.t * Digest.t) option) list (* [extract tbl names] returns an associative list mapping each string - in [names] to the CRC associated with it in [tbl]. If no CRC is - associated with a name then it is mapped to [None]. *) + in [names] to the data and CRC associated with it in [tbl]. If no CRC + is associated with a name then it is mapped to [None]. *) - val extract_map : Module_name.Set.t -> t -> Digest.t option Module_name.Map.t + val extract_map : + Module_name.Set.t -> t -> (Data.t * Digest.t) option Module_name.Map.t (* Like [extract] but with a more sophisticated type. *) val filter: (Module_name.t -> bool) -> t -> unit @@ -75,6 +79,8 @@ end) : sig unit_name : Module_name.t; inconsistent_source : string; original_source : string; + inconsistent_data : Data.t; + original_data : Data.t; } (* Raised by [check] when a CRC mismatch is detected. *) diff --git a/utils/misc.ml b/utils/misc.ml index db98ce1bc749..36b7cadd4f18 100644 --- a/utils/misc.ml +++ b/utils/misc.ml @@ -944,8 +944,6 @@ let print_if ppf flag printer arg = type filepath = string -type modname = string -type crcs = (modname * Digest.t option) list type alerts = string Stdlib.String.Map.t diff --git a/utils/misc.mli b/utils/misc.mli index a4aeea84f76e..2b2250e381a1 100644 --- a/utils/misc.mli +++ b/utils/misc.mli @@ -489,11 +489,6 @@ val print_if : type filepath = string -(* CR-someday lmaurer: Retire [modname] in favor of [Compilation_unit.Name.t] - and alter [crcs] accordingly (move it into [Compilation_unit] somewhere?). *) -type modname = string -type crcs = (modname * Digest.t option) list - type alerts = string Stdlib.String.Map.t module Bitmap : sig diff --git a/utils/symbol.ml b/utils/symbol.ml index b0f993a5d28c..f3e03ee8ec1a 100644 --- a/utils/symbol.ml +++ b/utils/symbol.ml @@ -81,26 +81,15 @@ let linkage_name_for_compilation_unit comp_unit = caml_symbol_prefix ^ suffix |> Linkage_name.of_string -let for_global_or_predef_ident pack_prefix id = - assert (Ident.is_global_or_predef id); - let linkage_name, compilation_unit = - if Ident.is_predef id then - "caml_exn_" ^ Ident.name id |> Linkage_name.of_string, CU.predef_exn - else - let compilation_unit = - Compilation_unit.create pack_prefix - (Ident.name id |> Compilation_unit.Name.of_string) - in - linkage_name_for_compilation_unit compilation_unit, compilation_unit - in +let for_predef_ident id = + assert (Ident.is_predef id); + let linkage_name = "caml_exn_" ^ Ident.name id |> Linkage_name.of_string in + let compilation_unit = CU.predef_exn in { compilation_unit; linkage_name; hash = Hashtbl.hash linkage_name; } -let for_predef_ident id = - for_global_or_predef_ident Compilation_unit.Prefix.empty id - let unsafe_create compilation_unit linkage_name = { compilation_unit; linkage_name; diff --git a/utils/symbol.mli b/utils/symbol.mli index a5d4a7e97be8..3984ef03822d 100644 --- a/utils/symbol.mli +++ b/utils/symbol.mli @@ -20,12 +20,9 @@ type t +(* For predefined exception identifiers. *) val for_predef_ident : Ident.t -> t -(* CR mshinwell: Insist on -for-pack for .mli files; then this function - will not need to take a pack prefix. *) -val for_global_or_predef_ident : Compilation_unit.Prefix.t -> Ident.t -> t - (** It is assumed that the provided [Ident.t] is in the current unit. *) val for_local_ident : Ident.t -> t