arakiken / mlterm

Other
156 stars 14 forks source link

Runtime `posix_openpt()` checks in `configure` fails on some systems #113

Open tsutsui opened 1 month ago

tsutsui commented 1 month ago

https://gnats.netbsd.org/56936

As noted in the above problem report, NetBSD's sandbox build environment is not setup ptys proplery so runtime check in for posix_openpt() in the following configure.in fails and official mlterm binary fails to open ptys: https://github.com/arakiken/mlterm/blob/f3474e1eb6a97239b38869f0fba78ce3e6a8ad87/configure.in#L2165-L2191

I wonder why runtime checks by AC_RUN_IFELSE is necessary here and what could be problems to just use AC_CHECK_FUNC for posix_openpt() as the cross compile case.

Even if the runtime check is necessary, it would be worth to make it possible to override bl_cv_pty via configure args as before.

Thanks,

arakiken commented 3 weeks ago

Thank you. I removed AC_RUN_IFELSE(). -> https://github.com/arakiken/mlterm/commit/5ddae8695f0b4d37ef2d37dac7f7751d752ca118

I don't remember well why I added AC_RUN_IFELSE, but there may have been cases in early NetBSD 3 where posix_openpt (==/dev/ptmx) didn't work correctly.