File: configure.ac

package info (click to toggle)
parmap 1.0~rc4-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 788 kB
  • ctags: 308
  • sloc: ml: 1,254; ansic: 116; makefile: 110; sh: 5
file content (41 lines) | stat: -rw-r--r-- 968 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
AC_INIT(parmap, 1.0-rc4, 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])

t=`$OCAMLBUILD -use-ocamlfind &> /dev/null; echo $?`
if test $t == 0 ; 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