Bug 14247

Summary: configure fails on OpenBSD
Product: xorg Reporter: Mark Kettenis <kettenis>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: cworth
Version: git   
Hardware: All   
OS: OpenBSD   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 10101    

Description Mark Kettenis 2008-01-25 06:41:29 UTC
configure fails on OpenBSD with the following message:

checking for OPENSSL... Package openssl was not found in the pkg-config search path
configure: error: Package requirements (openssl) were not met:



Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables OPENSSL_CFLAGS
and OPENSSL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


This is a bit silly because OpenSSL is part of the OpenBSD base system.  Furthermore, setting OPENSSL_CFLAGS and OPENSSL_LIBS (to empty strings) doesn't
help.

Is there any reason not to just use AC_CHECK_LIB(crypto, SHA1_Init) or something
similar and fall back on pkg-config if that fails?
Comment 1 Alan Coopersmith 2008-04-24 19:06:59 UTC
Changed it to use PKG_CHECK_EXISTS to see if openssl.pc exists first,
and if not, to just link with -lcrypto.

Fixed in master in git commit b1ae7c79db78cc3b789701f81328669f9f8ed80f
and in server-1.5-branch with 7c05b4c6214a9bbc8968c49a40363f8461f527d5
Comment 2 Carl Worth 2008-06-30 13:39:14 UTC
The (In reply to comment #1)
> Changed it to use PKG_CHECK_EXISTS to see if openssl.pc exists first,
> and if not, to just link with -lcrypto.

The problem with that is that if openssl isn't installed, then there's
no error message at configure-time like there should be.

I just changed it to use AC_CHECK_LIB before PKG_CHECK_MODULES, (as suggested
in the original report), rather than using PKG_CHECK_EXISTS.

This fixes the missing error message for a system with no openssl. Hopefully
it doesn't also break anything.

-Carl

PS. Fix is in 6447f80c17077f924b2d58e07b38d32429edcb9b on master.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.