Introduce --disable-gcrypt flag
This commit is contained in:
parent
b48f7645d6
commit
89c27afac1
3 changed files with 22 additions and 46 deletions
|
@ -38,6 +38,7 @@ all: ${PRPL_LIBNAME} $(LOCALE_MOS)
|
|||
PLUGIN_DIR_PURPLE=$(shell ${PKG_CONFIG} --variable=plugindir purple)
|
||||
DATA_ROOT_DIR_PURPLE=$(shell ${PKG_CONFIG} --variable=datarootdir purple)
|
||||
COPY_ICONS=@COPY_ICONS@
|
||||
CRYPTO_FLAG=@CRYPTO_FLAG@
|
||||
|
||||
create_dirs: ${DIR_LIST}
|
||||
|
||||
|
@ -58,7 +59,7 @@ tgl/Makefile.in:
|
|||
@echo "tgl/Makefile.in not found. Maybe you need to 'git submodule update --init --recursive' ?" && exit 1
|
||||
|
||||
tgl/Makefile: tgl/Makefile.in
|
||||
cd tgl && ./configure -q --disable-openssl --disable-extf CFLAGS="@CFLAGS@" LDFLAGS="@LDFLAGS@"
|
||||
cd tgl && ./configure -q ${CRYPTO_FLAG} --disable-extf CFLAGS="@CFLAGS@" LDFLAGS="@LDFLAGS@"
|
||||
|
||||
tgl/libs/libtgl.a: tgl/Makefile
|
||||
+make -C tgl
|
||||
|
|
54
configure
vendored
54
configure
vendored
|
@ -634,6 +634,7 @@ PKG_CONFIG
|
|||
EGREP
|
||||
GREP
|
||||
CPP
|
||||
CRYPTO_FLAG
|
||||
INSTALL_DATA
|
||||
INSTALL_SCRIPT
|
||||
INSTALL_PROGRAM
|
||||
|
@ -685,6 +686,7 @@ SHELL'
|
|||
ac_subst_files=''
|
||||
ac_user_opts='
|
||||
enable_option_checking
|
||||
enable_gcrypt
|
||||
with_zlib
|
||||
enable_libwebp
|
||||
enable_icons
|
||||
|
@ -1313,6 +1315,8 @@ Optional Features:
|
|||
--disable-option-checking ignore unrecognized --enable/--with options
|
||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--disable-gcrypt Disable gcrypt, use OpenSSL instead. DO NOT
|
||||
DISTRIBUTE BINARIES!
|
||||
--disable-libwebp Disable libwebp, stickers won't be displayed in the
|
||||
chat
|
||||
--disable-icons Don't copy the protocol icons for Pidgin. Only
|
||||
|
@ -3316,53 +3320,19 @@ _ACEOF
|
|||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_mpi_snatch in -lgcrypt" >&5
|
||||
$as_echo_n "checking for gcry_mpi_snatch in -lgcrypt... " >&6; }
|
||||
if ${ac_cv_lib_gcrypt_gcry_mpi_snatch+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lgcrypt $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char gcry_mpi_snatch ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return gcry_mpi_snatch ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_gcrypt_gcry_mpi_snatch=yes
|
||||
else
|
||||
ac_cv_lib_gcrypt_gcry_mpi_snatch=no
|
||||
CRYPTO_FLAG=--disable-openssl
|
||||
|
||||
# Check whether --enable-gcrypt was given.
|
||||
if test "${enable_gcrypt+set}" = set; then :
|
||||
enableval=$enable_gcrypt;
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcrypt_gcry_mpi_snatch" >&5
|
||||
$as_echo "$ac_cv_lib_gcrypt_gcry_mpi_snatch" >&6; }
|
||||
if test "x$ac_cv_lib_gcrypt_gcry_mpi_snatch" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBGCRYPT 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lgcrypt $LIBS"
|
||||
if test "x$enable_gcrypt" != "xno"; then :
|
||||
|
||||
else
|
||||
# Let tgl/configure.ac handle OpenSSL- or gcrypt-detection.
|
||||
CRYPTO_FLAG=
|
||||
|
||||
echo "no libgcrypt >= 1.60 found"
|
||||
exit -1
|
||||
|
||||
fi
|
||||
|
||||
|
|
11
configure.ac
11
configure.ac
|
@ -14,10 +14,15 @@ AC_PROG_CC
|
|||
AC_PROG_INSTALL
|
||||
|
||||
AC_CHECK_LIB([rt], [clock_gettime])
|
||||
AC_CHECK_LIB([gcrypt], [gcry_mpi_snatch], [], [
|
||||
echo "no libgcrypt >= 1.60 found"
|
||||
exit -1
|
||||
|
||||
AC_SUBST([CRYPTO_FLAG], [--disable-openssl])
|
||||
AC_ARG_ENABLE([gcrypt],
|
||||
AS_HELP_STRING([--disable-gcrypt], [Disable gcrypt, use OpenSSL instead. DO NOT DISTRIBUTE BINARIES!]))
|
||||
AS_IF([test "x$enable_gcrypt" != "xno"], [
|
||||
# Let tgl/configure.ac handle OpenSSL- or gcrypt-detection.
|
||||
AC_SUBST([CRYPTO_FLAG], [ ])
|
||||
])
|
||||
|
||||
AX_CHECK_ZLIB(, [AC_MSG_ERROR([No zlib found])])
|
||||
|
||||
PKG_CHECK_MODULES([PURPLE], [purple])
|
||||
|
|
Loading…
Add table
Reference in a new issue