Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pkg-config #557

Open
gildor478 opened this issue Oct 24, 2020 · 1 comment
Open

Use pkg-config #557

gildor478 opened this issue Oct 24, 2020 · 1 comment

Comments

@gildor478
Copy link
Member

This feature request has been migrated from artifact #522 on forge.ocamlcore.org. It was assigned to user102.

user102 posted on 2010-02-03 13:49:25:

For C libraries, we should use pkg-config, just as ocamlfind.

user102 replied on 2011-01-11 09:42:46:

See the discussion with Anastasia Gornostaeva:
https://sympa-roc.inria.fr/wws/arc/caml-list/2010-11/msg00356.html

user102 replied on 2011-01-11 09:48:55:

Discussion about ocsigen libev.

There are possible solution customizing setup.ml/_tags/myocamlbuild.ml. Basically, what you need to do:

  • add your own detection code in setup.ml to be run at configure. Just run pkg-config and save cflags/libs in ev_cflags/ev_libs (it will go to setup.data
  • add a use_libev in _tags to the matching files/libraries in _tags
  • load ev_cflags/ev_libs and apply them to flag[use_libev;...] & ... in myocamlbuild.ml

user144 replied on 2011-05-04 07:08:25:

For an example of this (using a post-configure script), you can have a look to https://forge.ocamlcore.org/scm/viewvc.php/trunk/?root=ml-gammu

user144 replied on 2011-05-15 14:37:35:

Another example, using a modified setup.ml to pass variables to myocamlbuild.ml (and special tags as indicated earlier to associate flags to files).
https://forge.ocamlcore.org/scm/viewvc.php/cairo/myocamlbuild.ml?view=markup&revision=242&root=archimedes

user102 replied on 2013-08-15 22:43:01:

See zlib-includ-libdir.patch attached for an example of implementation with configure flags --zlib-include and --zlib-libdir.

@gildor478
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant