File: discover.ml

package info (click to toggle)
pcre2-ocaml 8.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 376 kB
  • sloc: ml: 2,626; ansic: 562; makefile: 44
file content (14 lines) | stat: -rw-r--r-- 486 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
let () =
  let module C = Configurator.V1 in
  C.main ~name:"pcre2" (fun c ->
      let default : C.Pkg_config.package_conf =
        { libs = [ "-lpcre2-8" ]; cflags = [] }
      in
      let conf =
        match C.Pkg_config.get c with
        | None -> default
        | Some pc ->
            Option.value (C.Pkg_config.query pc ~package:"libpcre2-8") ~default
      in
      C.Flags.write_sexp "c_flags.sexp" conf.cflags;
      C.Flags.write_sexp "c_library_flags.sexp" conf.libs)