Merge pull request #60 from chipitsine/master

add --disable-password-change option to configure
pull/69/head
Samuli Seppänen 8 years ago committed by GitHub
commit 335c3e3069

@ -0,0 +1,17 @@
#!/bin/bash
if [ ! -d download-cache ]; then mkdir download-cache; fi
if [ ! -f download-cache/openssl-${OPENSSL_VERSION}.tar.gz ]; then wget -O download-cache/openssl-${OPENSSL_VERSION}.tar.gz https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz; fi
mkdir image
tar zxf download-cache/openssl-${OPENSSL_VERSION}.tar.gz && cd openssl-${OPENSSL_VERSION}
if [ "$CHOST" == "i686-w64-mingw32" ]; then export target=mingw; fi
if [ "$CHOST" == "x86_64-w64-mingw32" ]; then export target=mingw64; fi
./Configure --prefix=/ --cross-compile-prefix=${CHOST}- shared $target no-multilib no-capieng --openssldir=/etc/ssl --libdir=/lib -static-libgcc >build.log 2>&1 || (cat build.log && exit 1)
make install INSTALL_PREFIX="${HOME}/image" INSTALLTOP="/" MANDIR="/tmp" >build.log 2>&1 || (cat build.log && exit 1)
cd ..
export OPENSSL_CRYPTO_CFLAGS="-I${HOME}/image/include"
export OPENSSL_CRYPTO_LIBS="-L${HOME}/image/lib -lcrypto"

@ -7,17 +7,19 @@ compiler: gcc
env:
global:
- OPENSSL_VERSION=1.0.1r
- OPENSSL_CRYPTO_CFLAGS="-I${HOME}/image/include"
- OPENSSL_CRYPTO_LIBS="-L${HOME}/image/lib -lcrypto"
- OPENSSL_VERSION=1.0.1t
matrix:
fast_finish: true
include:
- compiler: ": Win32"
env: CHOST=i686-w64-mingw32 m=mingw
env: CHOST=i686-w64-mingw32 CONFIG=""
- compiler: ": Win64"
env: CHOST=x86_64-w64-mingw32 m=mingw64
env: CHOST=x86_64-w64-mingw32 CONFIG=""
- compiler: ": Win32"
env: CHOST=i686-w64-mingw32 CONFIG="--disable-password-change"
- compiler: ": Win64"
env: CHOST=x86_64-w64-mingw32 CONFIG="--disable-password-change"
exclude:
- compiler: gcc
@ -30,20 +32,14 @@ addons:
before_script:
- unset CC; unset CXX
install:
- if [ ! -d download-cache ]; then mkdir download-cache; fi
- if [ ! -f download-cache/openssl-${OPENSSL_VERSION}.tar.gz ]; then wget -O download-cache/openssl-${OPENSSL_VERSION}.tar.gz https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz; fi
script:
- cppcheck --force --enable=warning,missingInclude --error-exitcode=1 . >build.log 2>&1 || (cat build.log && exit 1)
- mkdir image
- tar zxf download-cache/openssl-${OPENSSL_VERSION}.tar.gz && cd openssl-${OPENSSL_VERSION}
- ./Configure --prefix=/ --cross-compile-prefix=${CHOST}- shared $m no-multilib no-capieng --openssldir=/etc/ssl --libdir=/lib -static-libgcc >build.log 2>&1 || (cat build.log && exit 1)
- make install INSTALL_PREFIX="${HOME}/image" INSTALLTOP="/" MANDIR="/tmp" >build.log 2>&1 || (cat build.log && exit 1)
- cd .. && autoreconf -i -v
- ./configure --prefix=/ --libdir=/lib --host=$CHOST --build=x86_64-pc-linux-gnu --program-prefix='' && make
- if [[ $CONFIG != *"--disable-password-change"* ]]; then . .travis-build-openssl.sh; fi
- autoreconf -i -v
- ./configure --prefix=/ --libdir=/lib --host=$CHOST --build=x86_64-pc-linux-gnu --program-prefix='' $CONFIG && make
cache:
apt: true
directories:
- download-cache

@ -38,6 +38,13 @@ AC_ARG_ENABLE(
[enable_distonly="no"]
)
AC_ARG_ENABLE(
[password-change],
[AS_HELP_STRING([--disable-password-change], [disable password change support @<:@default=yes@:>@])],
,
[enable_password_change="yes"]
)
AC_ARG_VAR([MAX_CONFIGS], [specify the maximum number of configs @<:@default=50@:>@])
if test -z "$MAX_CONFIGS"; then
MAX_CONFIGS=50
@ -57,7 +64,6 @@ case "$host" in
;;
esac
PKG_PROG_PKG_CONFIG
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
@ -69,6 +75,8 @@ if test "x$MAKENSIS" = "x"; then
fi
AM_CONDITIONAL([HAVE_NSIS], [test "x$MAKENSIS" != "x"])
if test "${enable_password_change}" = "yes"; then
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES(
[OPENSSL_CRYPTO],
[libcrypto >= 0.9.6],
@ -80,6 +88,9 @@ PKG_CHECK_MODULES(
[test "${enable_distonly}" = "no" && AC_MSG_ERROR([Cannot find OpenSSL library])]
)]
)
else
AC_DEFINE([DISABLE_CHANGE_PASSWORD],[1],[disable password change])
fi
test "${GCC}" = "yes" && CFLAGS="${CFLAGS} -pedantic -Wall -Wextra"

Loading…
Cancel
Save