forked from wolfSSL/wolfssl
Deprecate some configure flags
1. Add C_EXTRA_FLAGS and C_FLAGS to CFLAGS. 2. Remove the cached copied of C_EXTRA_FLAGS and C_FLAGS. 3. The option.h is set only on CFLAGS, CPPFLAGS, and the AM_ versions.
This commit is contained in:
50
configure.ac
50
configure.ac
@ -10,8 +10,8 @@ AC_PREREQ([2.63])
|
|||||||
AC_INIT([wolfssl],[4.3.0],[https://github.com/wolfssl/wolfssl/issues],[wolfssl],[https://www.wolfssl.com])
|
AC_INIT([wolfssl],[4.3.0],[https://github.com/wolfssl/wolfssl/issues],[wolfssl],[https://www.wolfssl.com])
|
||||||
AC_CONFIG_AUX_DIR([build-aux])
|
AC_CONFIG_AUX_DIR([build-aux])
|
||||||
|
|
||||||
# The following sets CFLAGS and CXXFLAGS to empty if unset on command line.
|
# The following sets CFLAGS to empty if unset on command line. We do not
|
||||||
# We do not want the default "-g -O2" that AC_PROG_CC sets automatically.
|
# want the default "-g -O2" that AC_PROG_CC sets automatically.
|
||||||
: ${CFLAGS=""}
|
: ${CFLAGS=""}
|
||||||
|
|
||||||
# Test ar for the "U" option. Should be checked before the libtool macros.
|
# Test ar for the "U" option. Should be checked before the libtool macros.
|
||||||
@ -48,15 +48,14 @@ WOLFSSL_LIBRARY_VERSION=24:0:0
|
|||||||
# +- increment if interfaces have been added, removed or changed
|
# +- increment if interfaces have been added, removed or changed
|
||||||
AC_SUBST([WOLFSSL_LIBRARY_VERSION])
|
AC_SUBST([WOLFSSL_LIBRARY_VERSION])
|
||||||
|
|
||||||
# capture user C_EXTRA_FLAGS from ./configure line, CFLAGS may hold -g -O2 even
|
# Capture user C_EXTRA_FLAGS from configure line.
|
||||||
# if user doesn't override, no way to tell
|
# Use of C_EXTRA_FLAGS is deprecated because CFLAGS was fixed but someone
|
||||||
USER_C_EXTRA_FLAGS="$C_EXTRA_FLAGS"
|
# might still be using it.
|
||||||
USER_CFLAGS="$CFLAGS"
|
CFLAGS="$CFLAGS $C_EXTRA_FLAGS $C_FLAGS"
|
||||||
|
|
||||||
gl_VISIBILITY
|
gl_VISIBILITY
|
||||||
AS_IF([ test -n "$CFLAG_VISIBILITY" ], [
|
AS_IF([ test -n "$CFLAG_VISIBILITY" ], [
|
||||||
AM_CPPFLAGS="$AM_CPPFLAGS $CFLAG_VISIBILITY"
|
AM_CFLAGS="$AM_CPPFLAGS $CFLAG_VISIBILITY"
|
||||||
CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY"
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
@ -4683,22 +4682,7 @@ AC_ARG_ENABLE([optflags],
|
|||||||
|
|
||||||
# check if should run the trusted peer certs test
|
# check if should run the trusted peer certs test
|
||||||
# (for now checking both C_FLAGS and C_EXTRA_FLAGS)
|
# (for now checking both C_FLAGS and C_EXTRA_FLAGS)
|
||||||
case $C_EXTRA_FLAGS in
|
AS_CASE(["$CFLAGS $CPPFLAGS"],[*'WOLFSSL_TRUST_PEER_CERT'*],[ENABLED_TRUSTED_PEER_CERT=yes])
|
||||||
*WOLFSSL_TRUST_PEER_CERT*)
|
|
||||||
have_tp=yes
|
|
||||||
break;;
|
|
||||||
*)
|
|
||||||
have_tp=no ;;
|
|
||||||
esac
|
|
||||||
if test "$have_tp" = "no"; then
|
|
||||||
case $C_FLAGS in
|
|
||||||
*WOLFSSL_TRUST_PEER_CERT*)
|
|
||||||
have_tp=yes
|
|
||||||
break;;
|
|
||||||
*)
|
|
||||||
have_tp=no ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# dertermine if we have key validation mechanism
|
# dertermine if we have key validation mechanism
|
||||||
@ -4980,15 +4964,6 @@ case $host_os in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
# add user C_EXTRA_FLAGS back
|
|
||||||
# For distro disable custom build options that interfere with symbol generation
|
|
||||||
if test "$ENABLED_DISTRO" = "no"
|
|
||||||
then
|
|
||||||
CFLAGS="$CFLAGS $USER_C_EXTRA_FLAGS"
|
|
||||||
fi
|
|
||||||
OPTION_FLAGS="$USER_CFLAGS $USER_C_EXTRA_FLAGS $CPPFLAGS $AM_CPPFLAGS $CFLAGS $AM_CFLAGS"
|
|
||||||
|
|
||||||
|
|
||||||
# The following AM_CONDITIONAL statements set flags for use in the Makefiles.
|
# The following AM_CONDITIONAL statements set flags for use in the Makefiles.
|
||||||
# Some of these affect build targets and objects, some trigger different
|
# Some of these affect build targets and objects, some trigger different
|
||||||
# test scripts for make check.
|
# test scripts for make check.
|
||||||
@ -5095,7 +5070,7 @@ AM_CONDITIONAL([BUILD_ASYNCCRYPT],[test "x$ENABLED_ASYNCCRYPT" = "xyes"])
|
|||||||
AM_CONDITIONAL([BUILD_WOLFEVENT],[test "x$ENABLED_ASYNCCRYPT" = "xyes"])
|
AM_CONDITIONAL([BUILD_WOLFEVENT],[test "x$ENABLED_ASYNCCRYPT" = "xyes"])
|
||||||
AM_CONDITIONAL([BUILD_CRYPTOCB],[test "x$ENABLED_CRYPTOCB" = "xyes"])
|
AM_CONDITIONAL([BUILD_CRYPTOCB],[test "x$ENABLED_CRYPTOCB" = "xyes"])
|
||||||
AM_CONDITIONAL([BUILD_PSK],[test "x$ENABLED_PSK" = "xyes"])
|
AM_CONDITIONAL([BUILD_PSK],[test "x$ENABLED_PSK" = "xyes"])
|
||||||
AM_CONDITIONAL([BUILD_TRUST_PEER_CERT],[test "x$have_tp" = "xyes"])
|
AM_CONDITIONAL([BUILD_TRUST_PEER_CERT],[test "x$ENABLED_TRUSTED_PEER_CERT" = "xyes"])
|
||||||
AM_CONDITIONAL([BUILD_PKI],[test "x$ENABLED_PKI" = "xyes"])
|
AM_CONDITIONAL([BUILD_PKI],[test "x$ENABLED_PKI" = "xyes"])
|
||||||
AM_CONDITIONAL([BUILD_DES3],[test "x$ENABLED_DES3" = "xyes"])
|
AM_CONDITIONAL([BUILD_DES3],[test "x$ENABLED_DES3" = "xyes"])
|
||||||
AM_CONDITIONAL([BUILD_PKCS7],[test "x$ENABLED_PKCS7" = "xyes"])
|
AM_CONDITIONAL([BUILD_PKCS7],[test "x$ENABLED_PKCS7" = "xyes"])
|
||||||
@ -5130,15 +5105,12 @@ echo "---"
|
|||||||
echo "Generating user options header..."
|
echo "Generating user options header..."
|
||||||
|
|
||||||
OPTION_FILE="wolfssl/options.h"
|
OPTION_FILE="wolfssl/options.h"
|
||||||
#if
|
|
||||||
#OPTION_FILE+="cyassl/options.h"
|
|
||||||
#fi
|
|
||||||
rm -f $OPTION_FILE
|
rm -f $OPTION_FILE
|
||||||
|
|
||||||
echo "/* wolfssl options.h" > $OPTION_FILE
|
echo "/* wolfssl options.h" > $OPTION_FILE
|
||||||
echo " * generated from configure options" >> $OPTION_FILE
|
echo " * generated from configure options" >> $OPTION_FILE
|
||||||
echo " *" >> $OPTION_FILE
|
echo " *" >> $OPTION_FILE
|
||||||
echo " * Copyright (C) 2006-2015 wolfSSL Inc." >> $OPTION_FILE
|
echo " * Copyright (C) 2006-2020 wolfSSL Inc." >> $OPTION_FILE
|
||||||
echo " *" >> $OPTION_FILE
|
echo " *" >> $OPTION_FILE
|
||||||
echo " * This file is part of wolfSSL. (formerly known as CyaSSL)" >> $OPTION_FILE
|
echo " * This file is part of wolfSSL. (formerly known as CyaSSL)" >> $OPTION_FILE
|
||||||
echo " *" >> $OPTION_FILE
|
echo " *" >> $OPTION_FILE
|
||||||
@ -5154,7 +5126,7 @@ echo "extern \"C\" {" >> $OPTION_FILE
|
|||||||
echo "#endif" >> $OPTION_FILE
|
echo "#endif" >> $OPTION_FILE
|
||||||
echo "" >> $OPTION_FILE
|
echo "" >> $OPTION_FILE
|
||||||
|
|
||||||
for option in $OPTION_FLAGS; do
|
for option in $CPPFLAGS $AM_CPPFLAGS $CFLAGS $AM_CFLAGS; do
|
||||||
defonly=`echo $option | sed 's/^-D//'`
|
defonly=`echo $option | sed 's/^-D//'`
|
||||||
if test "$defonly" != "$option"
|
if test "$defonly" != "$option"
|
||||||
then
|
then
|
||||||
|
Reference in New Issue
Block a user