Imported Upstream version 1.2.5
Stephane Glondu
14 years ago
0 | 0 | #! /bin/sh |
1 | # $Id: configure 130 2009-02-16 01:09:27Z gerd $ | |
1 | # $Id: configure 134 2009-09-10 20:00:26Z gerd $ | |
2 | 2 | # ---------------------------------------------------------------------- |
3 | 3 | # |
4 | 4 | |
6 | 6 | |
7 | 7 | #set -x |
8 | 8 | |
9 | version="1.2.4" | |
9 | version="1.2.5" | |
10 | 10 | |
11 | 11 | # Remember the old IFS value: |
12 | 12 | oldifs="$IFS" |
60 | 60 | get_stdlib () { |
61 | 61 | # Older versions of ocamlc do not accept -where, so there is a fallback |
62 | 62 | # method: |
63 | ocamlc -where 2>/dev/null | tr -d '\r' || { | |
63 | ocamlc -where 2>/dev/null | tr -d '\015' || { | |
64 | 64 | ocamlc -v | sed -n -e "/Standard library directory/s/.*: \(.*\)/\1/p"; } |
65 | 65 | } |
66 | 66 | |
202 | 202 | # This may be |
203 | 203 | # - mingw |
204 | 204 | # - win32 |
205 | # - win64 | |
205 | 206 | # - cygwin |
206 | 207 | # - some other string means Unix |
207 | 208 | # - empty means ocamlc does not support -config |
210 | 211 | case "$system" in |
211 | 212 | mingw) use_cygpath=1;; |
212 | 213 | win32) use_cygpath=1;; |
214 | win64) use_cygpath=1;; | |
213 | 215 | esac |
214 | 216 | |
215 | 217 | ###################################################################### |
84 | 84 | List of Changes |
85 | 85 | ============================================================================== |
86 | 86 | |
87 | - 1.2.5: Fix: Again CR deletion... Turns out some OS do not understand '\r' | |
88 | but only '\015' (thanks to Isaiah Weiner) | |
89 | Support for Win64 (untested; thanks to David Allsopp) | |
90 | ocamlfind no longer emits auto-generated -ccopt options. These tend to | |
91 | accumulate, and it is possible that for large projects the maximum command | |
92 | line length is exceeded. Current versions of the O'Caml compilers do not | |
93 | need these extra -ccopt anyway, so this code is completely dropped. | |
94 | ||
87 | 95 | - 1.2.4: Fix: Bigarray needs unix (Thanks to Markus Mottl) |
88 | 96 | Fix: In the version of camlp4 provided by O'Caml 3.11 various libraries do |
89 | 97 | not contain dynlink anymore. Because of this, dynlink becomes a |
80 | 80 | mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)" |
81 | 81 | mkdir -p "$(prefix)$(OCAMLFIND_BIN)" |
82 | 82 | test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)" |
83 | files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi findlib_top.cma findlib.cmxa findlib.a META` && \ | |
83 | files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a META` && \ | |
84 | 84 | cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)" |
85 | 85 | f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \ |
86 | 86 | cp $$f "$(prefix)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)" |
0 | (* $Id: frontend.ml 130 2009-02-16 01:09:27Z gerd $ | |
0 | (* $Id: frontend.ml 133 2009-09-02 18:58:02Z gerd $ | |
1 | 1 | * ---------------------------------------------------------------------- |
2 | 2 | * |
3 | 3 | *) |
313 | 313 | Sys.signal Sys.sigint Sys.Signal_ignore in |
314 | 314 | |
315 | 315 | let need_exe = |
316 | List.mem Findlib_config.system [ "win32"; "mingw" ] in | |
316 | List.mem Findlib_config.system [ "win32"; "win64"; "mingw" ] in | |
317 | 317 | |
318 | 318 | let fixed_cmd = |
319 | 319 | if need_exe then ( |
430 | 430 | let i_format = |
431 | 431 | "-I %d" in |
432 | 432 | let l_format = |
433 | if Findlib_config.system = "win32" then | |
433 | if Findlib_config.system = "win32" || Findlib_config.system = "win64" then | |
434 | 434 | (* Microsoft toolchain *) |
435 | 435 | "-ccopt \"/link /libpath:%d\"" |
436 | 436 | else |
957 | 957 | [] |
958 | 958 | else |
959 | 959 | [ "-I"; slashify pkgdir; |
960 | "-ccopt"; out_path ~prefix:"-I" pkgdir; ]) | |
960 | (* "-ccopt"; out_path ~prefix:"-I" pkgdir; -- see comment *) | |
961 | ]) | |
961 | 962 | eff_packages_dl) in |
962 | ||
963 | (* We no longer emit -ccopt options, because ocamlc/ocamlopt already | |
964 | do that for each -I if the C compiler needs to be invoked | |
965 | (so far I tracked it, ocamlc/ocamlopt have always done this, even | |
966 | back in 1996). | |
967 | *) | |
968 | ||
969 | let l_options = [] in | |
970 | (* Also, no longer -ccopt -L options. Current ocamlc/ocamlopt do that | |
971 | for each -I option passed to them anyway, so we can omit that here. | |
972 | See ocaml change (quite old, but I was not aware of it): | |
973 | http://camlcvs.inria.fr/cgi-bin/cvsweb/ocaml/asmcomp/asmlink.ml.diff?r1=1.38;r2=1.39 | |
974 | *) | |
975 | (* | |
963 | 976 | let l_options = |
964 | 977 | List.flatten |
965 | 978 | (List.map |
968 | 981 | if List.mem npkgdir exclude_list then |
969 | 982 | [] |
970 | 983 | else |
971 | if Findlib_config.system = "win32" then | |
984 | if Findlib_config.system = "win32" || Findlib_config.system = "win64" then | |
972 | 985 | (* Microsoft toolchain *) |
973 | 986 | [ "-ccopt"; out_path ~prefix:"/link /libpath:" pkgdir ] |
974 | 987 | else |
975 | 988 | [ "-ccopt"; out_path ~prefix:"-L" pkgdir; ]) |
976 | 989 | eff_link_dl) in |
990 | *) | |
977 | 991 | |
978 | 992 | let archives = |
979 | 993 | List.flatten |