mobile-shell / mosh

Mobile Shell
https://mosh.org
GNU General Public License v3.0
12.59k stars 729 forks source link

Portability: restore check for system OpenSSL libraries #1240

Open cgull opened 1 year ago

cgull commented 1 year ago

Some non-Linux systems, most notably FreeBSD and the other BSDs, have OpenSSL as part of the base OS. FreeBSD, at least, does not have a pkg-config .pc file, because it's not actually a package. (All the BSDs also have various OpenSSL versions and its forks available in packages as well. But using them can cause various kinds of pain dealing with multiple versions, and it's better to avoid them if they're not needed.)

There was a check using AX_CHECK_LIBRARY() that got lost in commit bacc0240. This brings it back, and also removes extended GNU Make syntax that I accidentally put in src/include/Makefile.ac that OpenBSD make refused to put up with.

achernya commented 1 year ago

I believe the removal of this AX_CHECK_LIBRARy was intentional. @bbarenblat can you please take a look?

cgull commented 1 year ago

@bbarenblat any comment? We can make that check more specific to avoid what I'm guessing is some Linux or OpenSSL-variant related issue you have with it.

bbarenblat commented 1 year ago

Hey, folks, sorry for the delay. I’m pretty sure I removed that AX_CHECK_LIBRARY simply because I didn’t understand why it was necessary. BSD portability makes total sense. Can you add a configure.ac comment to the effect that PKG_CHECK_MODULES is insufficient because BSD systems ship libcrypto.so without a pkg-config file?