# \[OPAM\] adding flags to \`./configure\`

**URL:** <https://discuss.ocaml.org/t/opam-adding-flags-to-configure/11832>\
**Category:** Learning\
**Tags:** opam-switch, opam, configuration, build\
**Created:** [March 30, 2023, 3:12am UTC](https://discuss.ocaml.org/t/opam-adding-flags-to-configure/11832 "2023-03-30T03:12:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anzhi0708](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/anzhi0708/32/4299_2.png) [@anzhi0708](https://discuss.ocaml.org/u/anzhi0708)\
**Post date:** [March 30, 2023, 3:12am UTC](https://discuss.ocaml.org/t/opam-adding-flags-to-configure/11832/1 "2023-03-30T03:12:51Z")

</div>

Hello! I’m trying to manually install a develop switch with `git clone` and then `opam switch create . --empty; opam install .` but I have to add `--disable-warn-error` to `configure` so that the switch can be installed. Should I edit `~/.opam/config` or add some environment variable? Sorry, I’m such a noob ;-(

---

<div class="post-metadata">

**Author:** ![Khady](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/khady/32/469_2.png) [@Khady](https://discuss.ocaml.org/u/Khady)\
**Post date:** [March 30, 2023, 6:37am UTC](https://discuss.ocaml.org/t/opam-adding-flags-to-configure/11832/2 "2023-03-30T06:37:14Z")

</div>

I’m guessing you are trying to work on the ocaml compiler. Is that correct?

This is not something that I have done myself. So this might be wrong. But I remember that the HACKING document in the ocaml repo mentioned dealing with opam and configure flags: [ocaml/HACKING.adoc at trunk · ocaml/ocaml · GitHub](https://github.com/ocaml/ocaml/blob/trunk/HACKING.adoc#initial-setup)

---

<div class="post-metadata">

**Author:** ![Chet\_Murthy](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/chet_murthy/32/1501_2.png) [@Chet\_Murthy](https://discuss.ocaml.org/u/Chet_Murthy)\
**Post date:** [March 30, 2023, 6:53am UTC](https://discuss.ocaml.org/t/opam-adding-flags-to-configure/11832/3 "2023-03-30T06:53:12Z")

</div>

I echo @Khady in suggesting looking at the HACKING document – I followed its instructions and they worked flawlessly. But also, if all you want is to add some args to the configure script, just edit it and put a few lines in at the top, eh?
