diff options
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 36 | 
1 files changed, 14 insertions, 22 deletions
| @@ -352,7 +352,7 @@ EFLAGS+=$($PKG_CONFIG --libs gnutls) $(libgcrypt-config --libs)  CFLAGS+=$($PKG_CONFIG --cflags gnutls) $(libgcrypt-config --cflags)  EOF  		ssl=gnutls -		if ! pkg-config gnutls --atleast-version=2.8; then +		if ! $PKG_CONFIG gnutls --atleast-version=2.8; then  			echo  			echo 'Warning: With GnuTLS versions <2.8, certificate expire dates are not verified.'  		fi @@ -642,37 +642,29 @@ else  fi  otrprefix="" -for i in / /usr /usr/local; do -	if [ -f ${i}/lib/libotr.a ]; then -		otrprefix=${i} -		break -	fi -done  if [ "$otr" = "auto" ]; then -	if [ -n "$otrprefix" ]; then -		otr=1 -	else -		otr=0 -	fi +	! $PKG_CONFIG --exists libotr +	otr=$? +fi + +if [ "$otr" != 0 ] && ! $PKG_CONFIG --atleast-version=4.0 --print-errors libotr; then +	exit 1  fi +  if [ "$otr" = 1 ]; then  	# BI == built-in  	echo '#define OTR_BI' >> config.h -	echo "EFLAGS+=-L${otrprefix}/lib -lotr -lgcrypt" >> Makefile.settings -	echo "CFLAGS+=-I${otrprefix}/include" >> Makefile.settings +	echo "EFLAGS+=$($PKG_CONFIG --libs libotr)$(libgcrypt-config --libs)" >> Makefile.settings +	echo "CFLAGS+=$($PKG_CONFIG --cflags libotr)$(libgcrypt-config --cflags)" >> Makefile.settings  	echo 'OTR_BI=otr.o' >> Makefile.settings  elif [ "$otr" = "plugin" ]; then +	# for some mysterious reason beyond the comprehension of my mortal mind, +	# the libgcrypt flags aren't needed when building as plugin. add them anyway.  	echo '#define OTR_PI' >> config.h -	echo "OTRFLAGS=-L${otrprefix}/lib -lotr" >> Makefile.settings -	echo "CFLAGS+=-I${otrprefix}/include" >> Makefile.settings +	echo "OTRFLAGS=$($PKG_CONFIG --libs libotr)$(libgcrypt-config --libs)" >> Makefile.settings +	echo "CFLAGS+=$($PKG_CONFIG --cflags libotr)$(libgcrypt-config --cflags)" >> Makefile.settings  	echo 'OTR_PI=otr.so' >> Makefile.settings  fi -if [ "$otr" != 0 ] && ! pkg-config libotr --atleast-version=4.0; then -	echo -	echo 'WARNING: Your libotr seems to be old. BitlBee now needs at least libotr 4.0.' -	# Not hard-failing because the code above doesn't use pkg-config, so who knows -	# what's true at this point... -fi  if [ "$skype" = "1" -o "$skype" = "plugin" ]; then  	if [ "$arch" = "Darwin" ]; then | 
