GNU-make help

ElChino <[email protected]> Wed, 11 Feb 2015 00:42:11 +0100
Newsgroups gmane.comp.gnu.utils
Organization A noiseless patient Spider
Message-ID <[email protected]>
Hello list.

Supposed I want my GNU-make (v4.x) built program to support
and select among these SSL libs:
   OpenSSL, GnuTLS, BoringSSL, Windows SChannel etc.

But only 1 of them. Hence my Makefile checks could be like:

ifeq ($(ENABLE_OPENSSL),1)
   ifeq ($(ENABLE_BORINGSSL),1)
     $(error Cannot have ENABLE_OPENSSL=1 with ENABLE_BORINGSSL=1.)
   endif

   ifeq ($(ENABLE_GNUTLS),1)
     $(error Cannot set ENABLE_GNUTLS=1 with ENABLE_OPENSSL=1.)
   endif
endif
...

As you figure, the permutation of checks could become large.
I figured I could test the concatenation and length of:
   $(ENABLE_OPENSSL)$(ENABLE_GNUSSL)$(ENABLE_OPENSSL)$(ENABLE_SCHANNEL)

for a value with only 1 "bit" set. But how can I do that using
bash or GNU-make 4.x syntax?