openiked / openiked-portable

Internet Key Exchange version 2 (IKEv2) daemon - portable version of OpenBSD iked
https://openiked.org
ISC License
44 stars 23 forks source link

7.2: please do not use hardcoded yacc #119

Open kloczek opened 1 year ago

kloczek commented 1 year ago

https://github.com/openiked/openiked-portable/blob/81092ec416e0eeb27569b368e8e0d3d5e26c3b05/iked/CMakeLists.txt#L142-L146

This should be implemented using https://cmake.org/cmake/help/latest/module/FindFLEX.html

tobhe commented 1 year ago

Thanks, I wasn't aware of that cmake feature! This looks a lot better than the current hack.

tobhe commented 1 year ago

One problem I am running into is that this cmake module doesn't find the yacc versions shipped in base by most BSD systems.

kloczek commented 1 year ago

What about bison? 🤔

tobhe commented 1 year ago

bison would require installing an external package which I find unfortunate because iked builds fine with what is available in the base installation. Maybe we need a FindYACC and fallback to bison if that isn't there.

kloczek commented 1 year ago

Currently most of the bison generated parses do not need flex static library on linking.

I'm not sure how it is with yacc on *BSD but generally speaking yacc on Linux is way behind GNU bison and everything what theoretically needs yacc always is possible to build bison.