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

Fix OMEMO autodetection in autotools #1865

Merged
merged 1 commit into from
Jul 11, 2023
Merged

Fix OMEMO autodetection in autotools #1865

merged 1 commit into from
Jul 11, 2023

Conversation

pasis
Copy link
Member

@pasis pasis commented Jul 10, 2023

This commit fixes few issues related to OMEMO autodetection:

  1. Absence of libsignal-protocol-c doesn't turn OMEMO off, just prints a notice message. It should (a) set BUILD_OMEMO=false and (b) terminate with an error on --enable-omemo=yes.
  2. Check for gcrypt continues even if libsignal-protocol-c fails. In this case, LIBS variable can be updated with unneeded -lgcrypt.
  3. Similarly to item 2., if libsignal-protocol-c is present, but gcrypt isn't, variable LIBS is updated with unneeded library.

How to test the functionality

  • step 1 install libgcrypt
  • step 2 remove libsignal-protocol-c
  • step 3 configure and build

@pasis pasis requested a review from jubalh July 10, 2023 21:27
This commit fixes few issues related to OMEMO autodetection:

1. Absence of libsignal-protocol-c doesn't turn OMEMO off, just prints a
   notice message. It should (a) set BUILD_OMEMO=false and (b) terminate
   with an error on --enable-omemo=yes.
2. Check for gcrypt continues even if libsignal-protocol-c fails. In this
   case, LIBS variable can be updated with unneeded -lgcrypt.
3. Similarly to item 2., if libsignal-protocol-c is present, but gcrypt
   isn't, variable LIBS is updated with unneeded library.

To resolve the above issues, use intermediate variable OMEMO_LIBS to
accumulate required libraries and set BUILD_OMEMO only when all checks
are passed.
@jubalh jubalh added this to the next milestone Jul 11, 2023
@jubalh jubalh merged commit 245d69d into master Jul 11, 2023
6 checks passed
@jubalh jubalh deleted the autotools-omemo-fix branch July 11, 2023 02:36
@jubalh
Copy link
Member

jubalh commented Jul 11, 2023

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants