postgresql-ocaml icon indicating copy to clipboard operation
postgresql-ocaml copied to clipboard

Port the config discovery script to pkg-config

Open anmonteiro opened this issue 3 years ago • 0 comments

  • PostgreSQL installations also add pkg-config configuration files.
  • In cross-compilation scenarios, calling out to pg_config will list the wrong --libdir
  • This change uses pkg-config to find the C include & library flags for libpq
    • I've kept a fallback to the current pg_config-based implementation to avoid errors in cases that users don't have pkg-config in their $PATH.

also slightly related to https://github.com/ocaml/dune/issues/1492#issuecomment-1236421326

anmonteiro avatar Sep 04 '22 21:09 anmonteiro