package configurator

  1. Overview
  2. Docs
Helper library for gathering system configuration

Install

Dune Dependency

Authors

Maintainers

Sources

configurator-v0.11.0.tar.gz
md5=55511f3ea8e3d66439910b3324701218

Description

Configurator is a small library that helps writing OCaml scripts that test features available on the system, in order to generate config.h files for instance.

Configurator allows one to:

  • test if a C program compiles
  • query pkg-config
  • import #define from OCaml header files
  • generate config.h file

Published: 22 Mar 2018

README

README.org

* Configurator

Configurator is a small library that helps writing OCaml scripts that
test features available on the system, in order to generate config.h
files for instance.

Configurator allows one to:
- test if a C program compiles
- query pkg-config
- import #define from OCaml header files
- generate config.h file

For instance:

#+begin_src ocaml
open Base
module C = Configurator

let clock_gettime_code = {|
#include <time.h>

int main()
{
  struct timespec ts;
  clock_gettime(CLOCK_REALTIME, &ts);
  return 0;
}
|}

let () =
  C.main ~name:"foo" (fun c ->
    let has_clock_gettime = C.c_test c clock_gettime_code ~link_flags:["-lrt"] in

    C.C_define.gen_header_file c ~fname:"config.h"
      [ "HAS_CKOCK_GETTIME", Switch has_ckock_gettime ]);
#+end_src

Dependencies (4)

  1. jbuilder >= "1.0+beta18.1"
  2. stdio >= "v0.11" & < "v0.14"
  3. base >= "v0.11" & < "v0.14"
  4. ocaml >= "4.04.1"

Dev Dependencies

None

Used by (33)

  1. async_ssl = "v0.11.0"
  2. bitcoinml < "0.4.1"
  3. camlimages >= "5.0.0" & < "5.0.3"
  4. core >= "v0.11.0" & < "v0.12.0"
  5. core_kernel >= "v0.11.0" & < "v0.12.0"
  6. crlibm < "0.3"
  7. fftw3 >= "0.8" & < "0.8.2"
  8. freetds = "0.6"
  9. gammu >= "0.9.4"
  10. gobject-introspection
  11. gsl >= "1.20.0" & < "1.24.0"
  12. hidapi < "1.1"
  13. io-page >= "2.0.0" & < "2.1.0"
  14. io-page-unix >= "2.0.0" & != "2.1.0" & < "2.3.0"
  15. io-page-xen >= "2.0.0" & < "2.1.0"
  16. lablqml >= "0.6" & < "0.7"
  17. lacaml >= "10.0.1" & < "11.0.2"
  18. lbfgs = "0.9"
  19. mesh >= "0.8.9" & < "0.9.3"
  20. mesh-display
  21. mesh-easymesh < "0.9.3"
  22. mesh-graphics < "0.9.3"
  23. mesh-triangle < "0.9.5"
  24. mirage-clock-unix >= "1.3.0" & < "2.0.0"
  25. ocaml-r >= "0.1.0" & < "0.3.1"
  26. owl >= "0.3.7" & < "0.5.0"
  27. pcre >= "7.3.0" & < "7.3.5"
  28. postgresql >= "4.1.0" & < "4.4.1"
  29. secp256k1 >= "0.2.5" & < "0.4.1"
  30. sqlite3 >= "4.2.0" & < "4.4.1"
  31. tcpip >= "3.2.0" & < "3.7.6"
  32. yaml = "0.2.1"
  33. zmq = "5.0.0"

Conflicts (1)

  1. jbuilder = "1.0+beta19"