Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-2315

Use PKG_CHECK_MODULES for detecting libmongoc, libbson, and libmongocrypt

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.17.0
    • Affects Version/s: None
    • Component/s: None
    • None

      In config.m4, we invoke pkg-config directly to detect libmongoc, libbson, and libmongocrypt system libraries. For consistency, we should utilize the PKG_CHECK_MODULES macro that is used for all other dependencies (e.g. TLS, compression libraries).

      We can consider making pkg-config an explicit dependency in config.m4, which may help users diagnose errors when configuring the library. For example, the build process could inform users that pkg-config is required instead of a more cryptic outcome where a library isn't detected at all (see: mongodb/mongo-php-driver#1482). However, that is not done in PHP, which relies entirely on pkg-config for detecting OpenSSL since 7.4 (php/php-src@fe8fdfa).

      Note: this issue has been split out from PHPC-2309, which has since been repurposed to only deal with removal of --with-openssl-dir.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: