Revision 51c6666d8792ce05e0cfac0aa9eba11a78e1e15f authored by Jérémie Courrèges-Anglas on 17 September 2015, 13:24:21 UTC, committed by Roberto Di Cosmo on 17 September 2015, 13:37:17 UTC
Good news: https://forge.ocamlcore.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=ocaml-autoconf/ocaml-autoconf.git;a=commitdiff;h=9e0d03be521283b59e002d91422b7695825195e3 With a fresher ocaml.m4 & ./configure, the following diff allows one to automatically build the .cmxs on OpenBSD/amd64 (native dynlink supported) and to skip it on OpenBSD/sparc64 (non-native).
1 parent 1cc6a04
configure.ac
AC_INIT(parmap, 1.0-rc5, roberto@dicosmo.org)
AC_PROG_OCAML
if test "$OCAMLC" = "no"; then
AC_MSG_ERROR([You must install the OCaml compiler])
fi
AC_PROG_FINDLIB
AC_SUBST(OCAMLFIND)
if test "$OCAMLFIND" = "no"; then
AC_MSG_ERROR([You must install OCaml findlib (the ocamlfind command)])
fi
AC_HEADER_STDC
AC_CHECK_HEADERS([sched.h])
AC_CHECK_DECLS([sched_setaffinity], [], [], [[
#define _GNU_SOURCE 1
#include <sched.h>
]])
AC_CHECK_HEADERS([mach/thread_policy.h])
AC_CHECK_DECLS([thread_policy_set], [], [], [[
#include <mach/mach_init.h>
#include <mach/thread_policy.h>
]])
AC_CONFIG_HEADERS([config.h])
if $OCAMLBUILD -use-ocamlfind >/dev/null 2>&1 ; then
AC_MSG_RESULT(ocaml version $OCAMLVERSION. Use standard Makefile)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
else
AC_MSG_RESULT(ocamlbuild does not exists or it does not support -use-ocamlfind)
AC_CONFIG_FILES([Makefile_3.11])
AC_OUTPUT
mv Makefile_3.11 Makefile
fi
Computing file changes ...