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,20 +7,22 @@ compiler: gcc
env: env:
global: global:
- OPENSSL_VERSION=1.0.1r - OPENSSL_VERSION=1.0.1t
- OPENSSL_CRYPTO_CFLAGS="-I${HOME}/image/include"
- OPENSSL_CRYPTO_LIBS="-L${HOME}/image/lib -lcrypto"
matrix: matrix:
fast_finish: true fast_finish: true
include: include:
- compiler: ": Win32" - compiler: ": Win32"
env: CHOST=i686-w64-mingw32 m=mingw env: CHOST=i686-w64-mingw32 CONFIG=""
- compiler: ": Win64" - 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: exclude:
- compiler: gcc - compiler: gcc
addons: addons:
apt: apt:
packages: packages:
@ -30,20 +32,14 @@ addons:
before_script: before_script:
- unset CC; unset CXX - 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: script:
- cppcheck --force --enable=warning,missingInclude --error-exitcode=1 . >build.log 2>&1 || (cat build.log && exit 1) - cppcheck --force --enable=warning,missingInclude --error-exitcode=1 . >build.log 2>&1 || (cat build.log && exit 1)
- mkdir image - if [[ $CONFIG != *"--disable-password-change"* ]]; then . .travis-build-openssl.sh; fi
- tar zxf download-cache/openssl-${OPENSSL_VERSION}.tar.gz && cd openssl-${OPENSSL_VERSION} - autoreconf -i -v
- ./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) - ./configure --prefix=/ --libdir=/lib --host=$CHOST --build=x86_64-pc-linux-gnu --program-prefix='' $CONFIG && make
- 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
cache: cache:
apt: true apt: true
directories: directories:
- download-cache - download-cache

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

Loading…
Cancel
Save