package configurator

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

Install

Dune Dependency

Authors

Maintainers

Sources

configurator-v0.9.0.tar.gz
md5=857aed0fda772fd2c1632affb0d3bcb6

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: 12 May 2017

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 (7)

  1. ocaml-migrate-parsetree >= "0.4" & < "2.0.0"
  2. stdio >= "v0.9" & < "v0.10"
  3. ppx_driver >= "v0.9" & < "v0.10"
  4. ppx_base >= "v0.9" & < "v0.10"
  5. jbuilder >= "1.0+beta7"
  6. base >= "v0.9" & < "v0.10"
  7. ocaml >= "4.03.0"

Dev Dependencies

None

Used by (30)

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

Conflicts

None

OCaml

Innovation. Community. Security.