Compare commits
32 Commits
ikloecker/
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
5c095553e4 | ||
|
9ab2ce36f9 | ||
|
c69240c843 | ||
|
42e151b34b | ||
|
e6830b58b6 | ||
|
899a572b33 | ||
|
69558f2c0b | ||
|
576d2db9dd | ||
|
aa15a664b3 | ||
|
e46748a0d1 | ||
|
f6d020e24f | ||
|
28542b14c4 | ||
|
2656d3ee5b | ||
|
acf574af64 | ||
|
b7435b31f6 | ||
|
95bd4fa813 | ||
|
de60684500 | ||
|
8b4171680c | ||
|
9c276e762a | ||
|
ec2c6dd8bc | ||
|
6ed5c9a38a | ||
|
7d5df0bf0d | ||
|
09827ffc77 | ||
|
53c367629a | ||
|
c52e1943a7 | ||
|
60b96d149c | ||
|
6c90ec7be2 | ||
|
14b035034a | ||
|
2187a4de8c | ||
|
5b73b0722a | ||
|
3b9815bd8a | ||
|
307256d277 |
59
Makefile.am
59
Makefile.am
@ -1,6 +1,6 @@
|
||||
# Makefile.am - Top level Makefile for GPGME.
|
||||
# Copyright (C) 2000 Werner Koch (dd9jn)
|
||||
# Copyright (C) 2001, 2002, 2004, 2005, 2008, 2009, 2024 g10 Code GmbH
|
||||
# Copyright (C) 2001, 2002, 2004, 2005, 2008, 2009 g10 Code GmbH
|
||||
#
|
||||
# This file is part of GPGME.
|
||||
#
|
||||
@ -70,6 +70,8 @@ distcheck-hook:
|
||||
esac;\
|
||||
done ) | tee $(distdir).swdb
|
||||
|
||||
.PHONY: gen-ChangeLog release sign-release
|
||||
|
||||
gen_start_date = 2011-12-01T00:00:00
|
||||
gen-ChangeLog:
|
||||
if test -d $(top_srcdir)/.git; then \
|
||||
@ -140,58 +142,3 @@ sign-release:
|
||||
echo ' * All done; for checksums see dist/swdb.snippet' ;\
|
||||
echo ' */' ;\
|
||||
)
|
||||
|
||||
languages = $(NESTED_LANGUAGES)
|
||||
|
||||
dist_languages = $(languages:%=dist-%)
|
||||
$(dist_languages):
|
||||
+(set -e;\
|
||||
lang=$$(echo "$@" | sed 's/.*-//');\
|
||||
cd "lang/$$lang";\
|
||||
$(MAKE) dist;\
|
||||
)
|
||||
|
||||
distcheck_languages = $(languages:%=distcheck-%)
|
||||
$(distcheck_languages):
|
||||
+(set -e;\
|
||||
lang=$$(echo "$@" | sed 's/.*-//');\
|
||||
cd "lang/$$lang";\
|
||||
$(MAKE) distcheck;\
|
||||
)
|
||||
|
||||
release_languages = $(languages:%=release-%)
|
||||
$(release_languages):
|
||||
+(set -e;\
|
||||
lang=$$(echo "$@" | sed 's/.*-//');\
|
||||
cd "lang/$$lang";\
|
||||
$(MAKE) release;\
|
||||
)
|
||||
|
||||
sign_release_languages = $(languages:%=sign-release-%)
|
||||
$(sign_release_languages):
|
||||
+(set -e;\
|
||||
lang=$$(echo "$@" | sed 's/.*-//');\
|
||||
cd "lang/$$lang";\
|
||||
$(MAKE) sign-release;\
|
||||
)
|
||||
|
||||
distclean_languages = $(languages:%=distclean-%)
|
||||
$(distclean_languages):
|
||||
+(set -e;\
|
||||
lang=$$(echo "$@" | sed 's/.*-//');\
|
||||
cd "lang/$$lang";\
|
||||
$(MAKE) distclean;\
|
||||
)
|
||||
distclean-local: $(distclean_languages)
|
||||
|
||||
dist-all: dist $(dist_languages)
|
||||
|
||||
distcheck-all: distcheck $(distcheck_languages)
|
||||
|
||||
release-all: release $(release_languages)
|
||||
|
||||
sign-release-all: sign-release $(sign_release_languages)
|
||||
|
||||
.PHONY: gen-ChangeLog release sign-release dist-all $(dist_languages) \
|
||||
distcheck-all $(distcheck_languages) release-all $release_languages) \
|
||||
sign-release-all $(sign_release_languages) $(distclean_languages)
|
||||
|
20
NEWS
20
NEWS
@ -9,27 +9,43 @@ Noteworthy changes in version 1.24.0 (unrelease)
|
||||
|
||||
* Add information about designated revocation keys. [T7118]
|
||||
|
||||
* New context flag "import-options". [T7152]
|
||||
|
||||
* cpp: Provide information about designated revocation keys for a Key.
|
||||
[T7118]
|
||||
|
||||
* cpp: Add safer member function returning text describing an error.
|
||||
[T5960]
|
||||
|
||||
* qt: Build QGpgME for Qt 5 and Qt 6 simultaneously. [T7205]
|
||||
|
||||
* qt: Install headers for Qt 5 and Qt 6 in separate folders. [T7161]
|
||||
|
||||
* qt: Allow reading the data to decrypt/encrypt/sign/verify directly from
|
||||
files. [T6550]
|
||||
|
||||
* qt: Allow writing the decrypted/encrypted/signed/verified data directly
|
||||
to files. [T6550]
|
||||
|
||||
* qt: Allow specifying import options when importing keys. [T7152]
|
||||
|
||||
* qt: Allow appending a detached signature to an existing file. [T6867]
|
||||
|
||||
* Interface changes relative to the 1.23.2 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
GPGME_ENCRYPT_FILE NEW.
|
||||
GPGME_SIG_MODE_FILE NEW.
|
||||
gpgme_key_t EXTENDED: New field 'revkeys'.
|
||||
gpgme_revocation_key_t NEW.
|
||||
gpgme_set_ctx_flag EXTENDED: New flag 'import-options'.
|
||||
cpp: Context::EncryptFile NEW.
|
||||
cpp: SignatureMode::SignFile NEW.
|
||||
cpp: RevocationKey NEW.
|
||||
cpp: Key::revocationKey NEW.
|
||||
cpp: Key::numRevocationKeys NEW.
|
||||
cpp: Key::revocationKeys NEW.
|
||||
cpp: Error::asStdString NEW.
|
||||
cpp: Error::asString DEPRECATED.
|
||||
qt: DecryptVerifyJob::setInputFile NEW.
|
||||
qt: DecryptVerifyJob::inputFile NEW.
|
||||
qt: DecryptVerifyJob::setOutputFile NEW.
|
||||
@ -60,6 +76,8 @@ Noteworthy changes in version 1.24.0 (unrelease)
|
||||
qt: SignJob::outputFile NEW.
|
||||
qt: SignJob::setSigningFlags NEW.
|
||||
qt: SignJob::signingFlags NEW.
|
||||
qt: SignJob::setAppendSignature NEW.
|
||||
qt: SignJob::appendSignatureEnabled NEW.
|
||||
qt: VerifyDetachedJob::setSignatureFile NEW.
|
||||
qt: VerifyDetachedJob::signatureFile NEW.
|
||||
qt: VerifyDetachedJob::setSignedFile NEW.
|
||||
@ -68,6 +86,8 @@ Noteworthy changes in version 1.24.0 (unrelease)
|
||||
qt: VerifyOpaqueJob::inputFile NEW.
|
||||
qt: VerifyOpaqueJob::setOutputFile NEW.
|
||||
qt: VerifyOpaqueJob::outputFile NEW.
|
||||
qt: ImportJob::setImportOptions NEW.
|
||||
qt: ImportJob::importOptions NEW.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.23.2 (2023-11-28)
|
||||
|
@ -1,67 +0,0 @@
|
||||
#! /bin/sh
|
||||
# autogen-all.sh
|
||||
# Copyright (C) 2024 g10 Code GmbH
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# This script is a helper to run the autogen.sh script for gpgme and the
|
||||
# nested packages of the C++, Qt, and Python bindings.
|
||||
|
||||
prog=$(basename "$0")
|
||||
|
||||
packages=". lang/cpp lang/qt lang/python"
|
||||
|
||||
fatal () {
|
||||
echo "${prog}:" "$*" >&2
|
||||
DIE=yes
|
||||
}
|
||||
|
||||
info () {
|
||||
if [ -z "${SILENT}" ]; then
|
||||
echo "${prog}:" "$*" >&2
|
||||
fi
|
||||
}
|
||||
|
||||
die_p () {
|
||||
if [ "$DIE" = "yes" ]; then
|
||||
echo "autogen.sh: Stop." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
DIE=no
|
||||
SILENT=
|
||||
tmp=$(dirname "$0")
|
||||
tsdir=$(cd "${tmp}"; pwd)
|
||||
|
||||
am_lf='
|
||||
'
|
||||
|
||||
if test x"$1" = x"--help"; then
|
||||
tmp="$(pwd)"
|
||||
cd "$tsdir" || fatal "error cd-ing to $tsdir"
|
||||
die_p
|
||||
./autogen.sh --help | sed "s/autogen.sh/${prog}/" || fatal "error running ./autogen.sh --help"
|
||||
die_p
|
||||
exit 0
|
||||
fi
|
||||
if test x"$1" = x"--silent"; then
|
||||
SILENT=" --silent"
|
||||
fi
|
||||
|
||||
for p in $packages; do
|
||||
info Running ./autogen.sh "$@" in $p ...
|
||||
curdir="$(pwd)"
|
||||
cd "$tsdir/$p" || fatal "error cd-ing to $tsdir/$p"
|
||||
die_p
|
||||
./autogen.sh "$@" | sed "s/autogen.sh/${prog}/" || fatal "error running ./autogen.sh $@"
|
||||
die_p
|
||||
cd "$curdir" || fatal "error cd-ing back to $curdir"
|
||||
die_p
|
||||
done
|
27
autogen.sh
27
autogen.sh
@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# autogen.sh
|
||||
# Copyright (C) 2003, 2014, 2017, 2018, 2022, 2024 g10 Code GmbH
|
||||
# Copyright (C) 2003, 2014, 2017, 2018, 2022 g10 Code GmbH
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
@ -15,7 +15,7 @@
|
||||
# configure it for the respective package. It is maintained as part of
|
||||
# GnuPG and source copied by other packages.
|
||||
#
|
||||
# Version: 2024-05-24
|
||||
# Version: 2023-03-15
|
||||
|
||||
configure_ac="configure.ac"
|
||||
|
||||
@ -72,7 +72,6 @@ FORCE=
|
||||
SILENT=
|
||||
PRINT_HOST=no
|
||||
PRINT_BUILD=no
|
||||
IS_GIT_CLONE=no
|
||||
tmp=$(dirname "$0")
|
||||
tsdir=$(cd "${tmp}"; pwd)
|
||||
|
||||
@ -135,8 +134,6 @@ die_p
|
||||
# these variables are replaced by the actual system root.
|
||||
configure_opts=
|
||||
extraoptions=
|
||||
package_subdir=
|
||||
skip_autoheader=
|
||||
# List of optional variables sourced from autogen.rc and ~/.gnupg-autogen.rc
|
||||
w32_toolprefixes=
|
||||
w32_extraoptions=
|
||||
@ -217,18 +214,6 @@ if [ -f "$HOME/.gnupg-autogen.rc" ]; then
|
||||
fi
|
||||
|
||||
|
||||
# Find the .git directory (or file for work trees)
|
||||
if [ -e .git ]; then
|
||||
IS_GIT_CLONE=yes
|
||||
elif [ -n "${package_subdir}" ]; then
|
||||
# Look for .git in root of package containing the nested package
|
||||
package_subdir=${package_subdir#/}
|
||||
root_path=${tsdir%/${package_subdir}}
|
||||
if [ -e "${root_path}/.git" ]; then
|
||||
IS_GIT_CLONE=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
# **** FIND VERSION ****
|
||||
# This is a helper for the configure.ac M4 magic
|
||||
# Called
|
||||
@ -258,7 +243,7 @@ if [ "$myhost" = "find-version" ]; then
|
||||
fi
|
||||
|
||||
beta=no
|
||||
if [ $IS_GIT_CLONE = yes ]; then
|
||||
if [ -e .git ]; then
|
||||
ingit=yes
|
||||
tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null)
|
||||
if [ -n "$tmp" ]; then
|
||||
@ -515,10 +500,8 @@ if [ -n "${ACLOCAL_FLAGS}" ]; then
|
||||
fi
|
||||
info "Running $ACLOCAL ${aclocal_flags} ..."
|
||||
$ACLOCAL ${aclocal_flags}
|
||||
if [ -z "${skip_autoheader}" ]; then
|
||||
info "Running autoheader..."
|
||||
$AUTOHEADER
|
||||
fi
|
||||
info "Running autoheader..."
|
||||
$AUTOHEADER
|
||||
info "Running automake --gnu ..."
|
||||
$AUTOMAKE --gnu;
|
||||
info "Running autoconf${FORCE} ..."
|
||||
|
385
configure.ac
385
configure.ac
@ -56,12 +56,31 @@ AC_INIT([mym4_package],[mym4_version],[https://bugs.gnupg.org])
|
||||
LIBGPGME_LT_CURRENT=43
|
||||
LIBGPGME_LT_AGE=32
|
||||
LIBGPGME_LT_REVISION=1
|
||||
|
||||
# If there is an ABI break in gpgmepp or qgpgme also bump the
|
||||
# version in IMPORTED_LOCATION in the GpgmeppConfig-w32.cmake.in.in
|
||||
|
||||
LIBGPGMEPP_LT_CURRENT=26
|
||||
LIBGPGMEPP_LT_AGE=20
|
||||
LIBGPGMEPP_LT_REVISION=1
|
||||
|
||||
LIBQGPGME_LT_CURRENT=20
|
||||
LIBQGPGME_LT_AGE=5
|
||||
LIBQGPGME_LT_REVISION=1
|
||||
################################################
|
||||
|
||||
AC_SUBST(LIBGPGME_LT_CURRENT)
|
||||
AC_SUBST(LIBGPGME_LT_AGE)
|
||||
AC_SUBST(LIBGPGME_LT_REVISION)
|
||||
|
||||
AC_SUBST(LIBGPGMEPP_LT_CURRENT)
|
||||
AC_SUBST(LIBGPGMEPP_LT_AGE)
|
||||
AC_SUBST(LIBGPGMEPP_LT_REVISION)
|
||||
|
||||
AC_SUBST(LIBQGPGME_LT_CURRENT)
|
||||
AC_SUBST(LIBQGPGME_LT_AGE)
|
||||
AC_SUBST(LIBQGPGME_LT_REVISION)
|
||||
|
||||
# If the API is changed in an incompatible way: increment the next counter.
|
||||
GPGME_CONFIG_API_VERSION=1
|
||||
##############################################
|
||||
@ -236,13 +255,9 @@ have_w32_system=no
|
||||
have_w64_system=no
|
||||
have_macos_system=no
|
||||
build_w32_glib=no
|
||||
available_languages="cl"
|
||||
default_languages="cl"
|
||||
for lang in cpp qt python; do
|
||||
if test -d $srcdir/lang/$lang; then
|
||||
available_languages="$available_languages $lang"
|
||||
fi
|
||||
done
|
||||
build_w32_qt=no
|
||||
available_languages="cl cpp python qt qt5 qt6"
|
||||
default_languages="cl cpp python qt5 qt6"
|
||||
case "${host}" in
|
||||
x86_64-*mingw32*)
|
||||
have_w64_system=yes
|
||||
@ -323,14 +338,47 @@ if test x$fixed_search_path != x ; then
|
||||
[Locate binaries only via this PATH])
|
||||
fi
|
||||
|
||||
# Option --enable-reduce-relocations
|
||||
#
|
||||
# Allow building the Qt 6 bindings explicitly with -fPIC if the automatic
|
||||
# detection fails. Note: We assume that this flag is always available (unless
|
||||
# we built for Windows).
|
||||
AC_ARG_ENABLE([reduce-relocations],
|
||||
AS_HELP_STRING([--enable-reduce-relocations],
|
||||
[build Qt 6 bindings with -fPIC (default is
|
||||
auto)]),
|
||||
[use_reduce_relocations="$enableval"],
|
||||
[use_reduce_relocations=""])
|
||||
|
||||
# Option --enable-no-direct-extern-access
|
||||
#
|
||||
# Some distributions build Qt 6 with -mno-direct-extern-access. Libraries and
|
||||
# applications using Qt then must also be build with this flag. As workaround
|
||||
# for a bug in Qt's pkgconfig files which don't have this flag we allow
|
||||
# building with this flag explicitly.
|
||||
AC_LANG_PUSH(C++)
|
||||
AX_CHECK_COMPILE_FLAG([-mno-direct-extern-access],
|
||||
[have_no_direct_extern_access="yes"],
|
||||
[have_no_direct_extern_access="no"],
|
||||
[-Werror])
|
||||
AC_LANG_POP()
|
||||
AC_ARG_ENABLE([no-direct-extern-access],
|
||||
AS_HELP_STRING([--enable-no-direct-extern-access],
|
||||
[build Qt 6 bindings with
|
||||
-mno-direct-extern-access (default is auto)]),
|
||||
[use_no_direct_extern_access="$enableval"],
|
||||
[use_no_direct_extern_access=""])
|
||||
|
||||
|
||||
# Note: You need to declare all possible languages also in
|
||||
# lang/Makefile.am's DIST_SUBDIRS.
|
||||
AC_ARG_ENABLE([languages],
|
||||
AS_HELP_STRING([--enable-languages=languages],
|
||||
[enable only specific language bindings]),
|
||||
[enable only specific language bindings:
|
||||
cl cpp python qt5 qt6]),
|
||||
[enabled_languages=`echo $enableval | \
|
||||
tr ',:' ' ' | tr '[A-Z]' '[a-z]'`],
|
||||
tr ',:' ' ' | tr '[A-Z]' '[a-z]' | \
|
||||
sed 's/c++/cpp/'`],
|
||||
[enabled_languages="maybe"])
|
||||
if test "x$enabled_languages" = "x" \
|
||||
-o "$enabled_languages" = "no"; then
|
||||
@ -353,23 +401,265 @@ for language in $enabled_languages; do
|
||||
fi
|
||||
done
|
||||
|
||||
AC_SUBST(ENABLED_LANGUAGES, $enabled_languages)
|
||||
|
||||
nested_languages=
|
||||
LIST_MEMBER("cpp", $enabled_languages)
|
||||
# Check whether qt5 and/or qt6 are enabled
|
||||
want_qt5="no"
|
||||
LIST_MEMBER("qt5", $enabled_languages)
|
||||
if test "$found" = "1"; then
|
||||
nested_languages="$nested_languages cpp"
|
||||
if test "$explicit_languages" = "1"; then
|
||||
want_qt5="yes"
|
||||
else
|
||||
want_qt5="maybe"
|
||||
fi
|
||||
# Remove qt5; further down qt will be added
|
||||
enabled_languages=$(echo $enabled_languages | sed 's/qt5//')
|
||||
fi
|
||||
want_qt6="no"
|
||||
LIST_MEMBER("qt6", $enabled_languages)
|
||||
if test "$found" = "1"; then
|
||||
if test "$explicit_languages" = "1"; then
|
||||
want_qt6="yes"
|
||||
else
|
||||
want_qt6="maybe"
|
||||
fi
|
||||
# Remove qt6; further down qt will be added
|
||||
enabled_languages=$(echo $enabled_languages | sed 's/qt6//')
|
||||
fi
|
||||
|
||||
# Check whether qt is enabled; if yes then it has been enabled explicitly
|
||||
want_qt="no"
|
||||
LIST_MEMBER("qt", $enabled_languages)
|
||||
if test "$found" = "1"; then
|
||||
nested_languages="$nested_languages qt"
|
||||
fi
|
||||
LIST_MEMBER("python", $enabled_languages)
|
||||
if test "$found" = "1"; then
|
||||
nested_languages="$nested_languages python"
|
||||
# Ignore qt if specified together with qt5 or qt6
|
||||
if test "$want_qt5" = "no" -a "$want_qt6" = "no"; then
|
||||
want_qt="yes"
|
||||
fi
|
||||
# Remove qt
|
||||
enabled_languages=$(echo $enabled_languages | sed 's/qt//')
|
||||
AC_MSG_WARN([[
|
||||
***
|
||||
*** Language binding "qt" is deprecated and will be removed in a future version.
|
||||
*** Use "qt5" and/or "qt6" instead.
|
||||
***]])
|
||||
fi
|
||||
|
||||
AC_SUBST(NESTED_LANGUAGES, $nested_languages)
|
||||
# Ensure that pkg-config is available for all calls of FIND_QT5/FIND_QT6
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
# Check for Qt 5 (if qt5 or qt is enabled)
|
||||
if test "$want_qt" = "yes"; then
|
||||
want_qt5="maybe"
|
||||
fi
|
||||
if test "$want_qt5" != "no"; then
|
||||
FIND_QT5
|
||||
if test "$have_qt5_libs" = "yes"; then
|
||||
want_qt5="yes"
|
||||
elif test "$want_qt5" = "yes"; then
|
||||
AC_MSG_ERROR([[
|
||||
***
|
||||
*** Qt5 (Qt5Core) is required for the Qt 5 binding.
|
||||
***]])
|
||||
else
|
||||
want_qt5="no"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for Qt 6 (if qt6 is enabled or if qt is enabled and Qt 5 wasn't found)
|
||||
if test "$want_qt" = "yes" -a "$have_qt5_libs" != "yes"; then
|
||||
want_qt6="maybe"
|
||||
fi
|
||||
if test "$want_qt6" != "no"; then
|
||||
FIND_QT6
|
||||
if test "$have_qt6_libs" = "yes"; then
|
||||
want_qt6="yes";
|
||||
elif test "$want_qt6" = "yes"; then
|
||||
AC_MSG_ERROR([[
|
||||
***
|
||||
*** Qt6 (Qt6Core) is required for the Qt 6 binding.
|
||||
***]])
|
||||
else
|
||||
want_qt6="no"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check if any Qt was found (if qt is enabled)
|
||||
if test "$want_qt" = "yes" -a "$have_qt5_libs" != "yes" -a "$have_qt6_libs" != "yes"; then
|
||||
AC_MSG_ERROR([[
|
||||
***
|
||||
*** Qt5 (Qt5Core) or Qt6 (Qt6Core) is required for the Qt bindings.
|
||||
***]])
|
||||
fi
|
||||
|
||||
# Check that cpp is enabled if qt5 or qt6 is enabled and was found
|
||||
if test "$want_qt5" = "yes" -o "$want_qt6" = "yes"; then
|
||||
LIST_MEMBER("cpp", $enabled_languages)
|
||||
if test "$found" = "0"; then
|
||||
AC_MSG_ERROR([[
|
||||
***
|
||||
*** The Qt bindings depend on the C++ binding.
|
||||
***]])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Enable C++ 17 if qt6 is requested
|
||||
if test "$want_qt6" = "yes"; then
|
||||
AX_CXX_COMPILE_STDCXX(17, noext, optional)
|
||||
if test "$HAVE_CXX17" != "1"; then
|
||||
if test "$explicit_languages" = "1"; then
|
||||
AC_MSG_ERROR([[
|
||||
***
|
||||
*** A compiler with c++17 support is required for the Qt 6 binding.
|
||||
***]])
|
||||
else
|
||||
want_qt6="no"
|
||||
AC_MSG_WARN([[
|
||||
***
|
||||
*** No c++17 support detected. Qt 6 binding will be disabled.
|
||||
***]])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Enable C++ 11 if cpp is requested (unless C++ 17 was already enabled)
|
||||
LIST_MEMBER("cpp", $enabled_languages)
|
||||
if test "$found" = "1" -a "$HAVE_CXX17" != "1"; then
|
||||
AX_CXX_COMPILE_STDCXX(11, noext, optional)
|
||||
if test "$HAVE_CXX11" != "1"; then
|
||||
if test "$explicit_languages" = "1"; then
|
||||
AC_MSG_ERROR([[
|
||||
***
|
||||
*** A compiler with c++11 support is required for the C++ binding.
|
||||
***]])
|
||||
else
|
||||
enabled_languages=$(echo $enabled_languages | sed 's/cpp//')
|
||||
want_qt5="no"
|
||||
AC_MSG_WARN([[
|
||||
***
|
||||
*** No c++11 support detected. C++ and Qt 5 bindings will be disabled.
|
||||
***]])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now append qt to the list of language bindings (to enable the subdir in lang)
|
||||
if test "$want_qt5" = "yes" -o "$want_qt6" = "yes"; then
|
||||
enabled_languages=$(echo $enabled_languages qt)
|
||||
fi
|
||||
|
||||
# Check whether compiler supports visibility attribute (if cpp language is enabled)
|
||||
LIST_MEMBER("cpp", $enabled_languages)
|
||||
if test "$found" = "1"; then
|
||||
AX_GCC_FUNC_ATTRIBUTE(visibility)
|
||||
if test "$ax_cv_have_func_attribute_visibility" = "yes"; then
|
||||
GPGME_CPP_CFLAGS="$GPGME_CPP_CFLAGS -fvisibility=hidden"
|
||||
if test "$want_qt5" = "yes"; then
|
||||
GPGME_QT5_CFLAGS="$GPGME_QT5_CFLAGS -fvisibility=hidden"
|
||||
fi
|
||||
if test "$want_qt6" = "yes"; then
|
||||
GPGME_QT6_CFLAGS="$GPGME_QT6_CFLAGS -fvisibility=hidden"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(GPGME_CPP_CFLAGS)
|
||||
|
||||
AM_CONDITIONAL(WANT_QT5, test "$want_qt5" = yes)
|
||||
AM_CONDITIONAL(WANT_QT6, test "$want_qt6" = yes)
|
||||
|
||||
# Check for tools for building the Qt binding docs
|
||||
if test "$want_qt5" = "yes" -o "$want_qt6" = "yes"; then
|
||||
AC_CHECK_PROGS([DOXYGEN], [doxygen])
|
||||
if test -z "$DOXYGEN"; then
|
||||
# This is not highlighted because it's not really important.
|
||||
AC_MSG_WARN([Doxygen not found - Qt binding doc will not be built.])
|
||||
fi
|
||||
AC_CHECK_PROGS([GRAPHVIZ], [dot])
|
||||
if test -z "$GRAPHVIZ"; then
|
||||
AC_MSG_WARN([Graphviz not found - Qt binding doc will not have diagrams.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN],
|
||||
[test -n "$DOXYGEN"])
|
||||
if test -n "$GRAPHVIZ"; then
|
||||
HAVE_DOT="YES"
|
||||
else
|
||||
HAVE_DOT="NO"
|
||||
fi
|
||||
AC_SUBST(HAVE_DOT)
|
||||
|
||||
# Python bindings.
|
||||
LIST_MEMBER("python", $enabled_languages)
|
||||
found_py=$found
|
||||
if test "$found_py" = "1"; then
|
||||
AX_PKG_SWIG
|
||||
if test -z "$SWIG"; then
|
||||
if test "$explicit_languages" = "1"; then
|
||||
AC_MSG_ERROR([[
|
||||
***
|
||||
*** You need SWIG to build the Python bindings.
|
||||
***]])
|
||||
else
|
||||
enabled_languages=$(echo $enabled_languages | sed 's/python//')
|
||||
fi
|
||||
else
|
||||
# Reset the version collecting vars.
|
||||
PYTHONS=
|
||||
PYTHON_VERSIONS=
|
||||
|
||||
if test "$found_py" = "1" -o "$found_py3" = "1"; then
|
||||
# Reset everything, so that we can look for another Python.
|
||||
m4_foreach([mym4pythonver],
|
||||
[[2.7],[3.6],[3.8],[3.9],[3.10],[3.11],[3.12],[all]],
|
||||
[unset PYTHON
|
||||
unset PYTHON_VERSION
|
||||
unset PYTHON_CPPFLAGS
|
||||
unset PYTHON_LDFLAGS
|
||||
unset PYTHON_LIBS
|
||||
unset PYTHON_SITE_PKG
|
||||
unset PYTHON_EXTRA_LIBS
|
||||
unset PYTHON_EXTRA_LDFLAGS
|
||||
unset ac_cv_path_PYTHON
|
||||
unset am_cv_pathless_PYTHON
|
||||
unset am_cv_python_version
|
||||
unset am_cv_python_platform
|
||||
unset am_cv_python_pythondir
|
||||
unset am_cv_python_pyexecdir
|
||||
AM_PATH_PYTHON(mym4pythonver, [
|
||||
AX_PYTHON_DEVEL([], [true])
|
||||
if test "$PYTHON_VERSION"; then
|
||||
PYTHONS="$(echo $PYTHONS $PYTHON)"
|
||||
PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)"
|
||||
fi
|
||||
], :, m4_if([mym4pythonver],[all],[],[python]mym4pythonver))
|
||||
])
|
||||
fi
|
||||
|
||||
# Recover some values lost in the second attempt to find Python.
|
||||
PYTHON="$(echo $PYTHONS | cut -d ' ' -f 1)"
|
||||
PYTHON_VERSION="$(echo $PYTHON_VERSIONS | cut -d ' ' -f 1)"
|
||||
|
||||
# Remove duplicates.
|
||||
PYTHONS="$(echo $PYTHONS | tr '[[:space:]]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')"
|
||||
PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS | tr '[[:space:]]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')"
|
||||
|
||||
if test "$PYTHON_VERSIONS"; then
|
||||
enabled_languages_v=$(echo $enabled_languages | sed -Ee "s/python[[23]]?/python ($PYTHON_VERSIONS)/")
|
||||
enabled_languages=$(echo $enabled_languages | sed -Ee "s/python[[23]]?/python/")
|
||||
else
|
||||
if test "$explicit_languages" = "1"; then
|
||||
AC_MSG_ERROR([[
|
||||
***
|
||||
*** Please install the python development packages.
|
||||
***]])
|
||||
else
|
||||
enabled_languages=$(echo $enabled_languages | sed 's/python//')
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(PYTHONS, $PYTHONS)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLED_LANGUAGES, $enabled_languages)
|
||||
|
||||
#
|
||||
# Provide information about the build.
|
||||
@ -765,9 +1055,7 @@ case "$libdir" in
|
||||
GPGME_CONFIG_LIBS="-L\${libdir} $GPGME_CONFIG_LIBS"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
GPGME_CONFIG_LIBS="-L\${libdir} $GPGME_CONFIG_LIBS"
|
||||
;;
|
||||
*) GPGME_CONFIG_LIBS="-L\${libdir} $GPGME_CONFIG_LIBS" ;;
|
||||
esac
|
||||
|
||||
AC_SUBST(GPGME_CONFIG_API_VERSION)
|
||||
@ -841,27 +1129,48 @@ AC_CONFIG_FILES(Makefile src/Makefile
|
||||
src/gpgme-glib.pc
|
||||
src/gpgme.h)
|
||||
AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config)
|
||||
AC_CONFIG_FILES(lang/cpp/Makefile lang/cpp/src/Makefile)
|
||||
AC_CONFIG_FILES(lang/cpp/tests/Makefile)
|
||||
AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig-w32.cmake.in)
|
||||
AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig.cmake.in)
|
||||
AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfigVersion.cmake)
|
||||
AC_CONFIG_FILES(lang/cpp/src/gpgmepp_version.h)
|
||||
AC_CONFIG_FILES(lang/qt/Makefile lang/qt/src/Makefile)
|
||||
if test "$want_qt5" = "yes"; then
|
||||
AC_CONFIG_FILES(lang/qt/src/QGpgmeConfig-w32.cmake.in)
|
||||
AC_CONFIG_FILES(lang/qt/src/QGpgmeConfig.cmake.in)
|
||||
AC_CONFIG_FILES(lang/qt/src/QGpgmeConfigVersion.cmake)
|
||||
fi
|
||||
if test "$want_qt6" = "yes"; then
|
||||
AC_CONFIG_FILES(lang/qt/src/QGpgmeQt6Config-w32.cmake.in)
|
||||
AC_CONFIG_FILES(lang/qt/src/QGpgmeQt6Config.cmake.in)
|
||||
AC_CONFIG_FILES(lang/qt/src/QGpgmeQt6ConfigVersion.cmake)
|
||||
fi
|
||||
AC_CONFIG_FILES(lang/qt/tests/Makefile)
|
||||
AC_CONFIG_FILES(lang/qt/src/qgpgme_version.h)
|
||||
AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd])
|
||||
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([lang/qt/doc/Doxyfile])])
|
||||
AC_CONFIG_FILES([lang/js/Makefile lang/js/src/Makefile
|
||||
lang/js/BrowserTestExtension/Makefile
|
||||
lang/js/DemoExtension/Makefile])
|
||||
|
||||
# Call ./configure scripts of nested packages recursively.
|
||||
LIST_MEMBER("cpp", $enabled_languages)
|
||||
if test "$found" = "1"; then
|
||||
AC_CONFIG_SUBDIRS([lang/cpp])
|
||||
fi
|
||||
LIST_MEMBER("qt", $enabled_languages)
|
||||
if test "$found" = "1"; then
|
||||
AC_CONFIG_SUBDIRS([lang/qt])
|
||||
fi
|
||||
LIST_MEMBER("python", $enabled_languages)
|
||||
if test "$found" = "1"; then
|
||||
AC_CONFIG_SUBDIRS([lang/python])
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES(lang/qt/doc/Makefile)
|
||||
AC_CONFIG_FILES([lang/python/Makefile
|
||||
lang/python/version.py
|
||||
lang/python/tests/Makefile
|
||||
lang/python/src/Makefile
|
||||
lang/python/examples/Makefile
|
||||
lang/python/doc/Makefile])
|
||||
AC_CONFIG_FILES([lang/python/setup.py], [chmod a+x lang/python/setup.py])
|
||||
AC_OUTPUT
|
||||
|
||||
if test "$want_qt5" = "yes" -a "$want_qt6" = "yes"; then
|
||||
enabled_languages_v=$(echo ${enabled_languages_v:-$enabled_languages} | sed "s/qt/qt (Qt 5, Qt 6)/")
|
||||
elif test "$want_qt5" = "yes"; then
|
||||
enabled_languages_v=$(echo ${enabled_languages_v:-$enabled_languages} | sed "s/qt/qt (Qt 5)/")
|
||||
elif test "$want_qt6" = "yes"; then
|
||||
enabled_languages_v=$(echo ${enabled_languages_v:-$enabled_languages} | sed "s/qt/qt (Qt 6)/")
|
||||
fi
|
||||
|
||||
echo "
|
||||
GPGME v${VERSION} has been configured as follows:
|
||||
|
||||
|
@ -3279,6 +3279,12 @@ The string given in @var{value} is passed to the GnuPG engine to use as
|
||||
filter when importing keys. Valid values are documented in the GnuPG
|
||||
manual and the gpg man page under the option @option{--import-filter}.
|
||||
|
||||
@item "import-options"
|
||||
@since{1.24.0}
|
||||
The string given in @var{value} is passed to the GnuPG engine to use as
|
||||
options when importing keys. Valid values are documented in the GnuPG
|
||||
manual and the gpg man page under the option @option{--import-options}.
|
||||
|
||||
@item "no-auto-check-trustdb"
|
||||
@since{1.19.0}
|
||||
Setting the @var{value} to "1" forces the GPG backend to disable the
|
||||
|
@ -18,6 +18,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
SUBDIRS = $(ENABLED_LANGUAGES)
|
||||
DIST_SUBDIRS = cl js
|
||||
DIST_SUBDIRS = cl cpp qt python js
|
||||
|
||||
EXTRA_DIST = README
|
||||
|
10
lang/cpp/.gitignore
vendored
10
lang/cpp/.gitignore
vendored
@ -1,10 +0,0 @@
|
||||
# GnuPG exclusions
|
||||
/aclocal.m4
|
||||
/autom4te.cache
|
||||
/configure
|
||||
/config-to-make-autoheader-happy.h.in
|
||||
/VERSION
|
||||
Makefile.in
|
||||
|
||||
# Hidden files
|
||||
*~
|
@ -1,49 +0,0 @@
|
||||
Package: gpgmepp
|
||||
Homepage: https://gnupg.org/software/gpgme/
|
||||
Download: https://gnupg.org/ftp/gcrypt/gpgme/
|
||||
Repository: git://git.gnupg.org/gpgme.git
|
||||
Maintainer: Werner Koch <wk@gnupg.org>
|
||||
Bug reports: https://bugs.gnupg.org
|
||||
Security related bug reports: security@gnupg.org
|
||||
License (software): LGPL-2.0-or-later
|
||||
License (tests): GPL-2.0-only, GPL-2.0-or-later
|
||||
|
||||
|
||||
GpgME++ is free software. See the files COPYING.LIB, COPYING.LESSER,
|
||||
and COPYING for copying conditions. License copyright years may be
|
||||
listed using range notation, e.g., 2000-2013, indicating that every
|
||||
year in the range, inclusive, is a copyrightable year that would
|
||||
otherwise be listed individually.
|
||||
|
||||
|
||||
List of Copyright holders
|
||||
=========================
|
||||
|
||||
Copyright (C) 1992-2022 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000 Werner Koch
|
||||
Copyright (C) 2001-2024 g10 Code GmbH
|
||||
Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010
|
||||
Klarälvdalens Datakonsult AB
|
||||
Copyright (C) 2004-2016 several members of the KDE community
|
||||
(see git log of gpgmepp repository in KDE's git)
|
||||
Copyright (C) 2016, 2017
|
||||
Bundesamt für Sicherheit in der Informationstechnik
|
||||
Copyright (C) 2016, 2018 Intevation GmbH
|
||||
|
||||
|
||||
Authors with a DCO
|
||||
==================
|
||||
|
||||
Daniel Kahn Gillmor <dkg@fifthhorseman.net>
|
||||
2014-09-24:878ul9w4j8.fsf@alice.fifthhorseman.net:
|
||||
|
||||
|
||||
Copyright 2001, 2002, 2012, 2013 g10 Code GmbH
|
||||
|
||||
This file is free software; as a special exception the author gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
modifications, as long as this notice is preserved.
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
340
lang/cpp/COPYING
340
lang/cpp/COPYING
@ -1,340 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
@ -1,508 +0,0 @@
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations
|
||||
below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
^L
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it
|
||||
becomes a de-facto standard. To achieve this, non-free programs must
|
||||
be allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
^L
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control
|
||||
compilation and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
^L
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
^L
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at least
|
||||
three years, to give the same user the materials specified in
|
||||
Subsection 6a, above, for a charge no more than the cost of
|
||||
performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
^L
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
^L
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply, and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License
|
||||
may add an explicit geographical distribution limitation excluding those
|
||||
countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
^L
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
^L
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms
|
||||
of the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library.
|
||||
It is safest to attach them to the start of each source file to most
|
||||
effectively convey the exclusion of warranty; and each file should
|
||||
have at least the "copyright" line and a pointer to where the full
|
||||
notice is found.
|
||||
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
your school, if any, to sign a "copyright disclaimer" for the library,
|
||||
if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James
|
||||
Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
@ -1,481 +0,0 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
@ -1,17 +0,0 @@
|
||||
No ChangeLog file
|
||||
=================
|
||||
|
||||
Do not modify the ChangeLog file of GpgME++. Since GpgME++ was added
|
||||
to gpgme we put change information only in the GIT commit log, and
|
||||
generate a top-level ChangeLog file from logs at "make dist" time.
|
||||
As such, there are strict requirements on the form of the commit log
|
||||
messages. See doc/HACKING (of gpgme) for details.
|
||||
|
||||
Change information before GpgME++ was added to gpgme can be found in
|
||||
the KDE repositories from where GpgME++ has been imported.
|
||||
|
||||
|
||||
Local Variables:
|
||||
buffer-read-only: t
|
||||
mode: text
|
||||
End:
|
236
lang/cpp/INSTALL
236
lang/cpp/INSTALL
@ -1,236 +0,0 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
6. Often, you can also type `make uninstall' to remove the installed
|
||||
files again.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
@ -1,17 +1,15 @@
|
||||
# Makefile.am - Top level Makefile for GPGME++.
|
||||
# Copyright (C) 2000 Werner Koch (dd9jn)
|
||||
# Copyright (C) 2001, 2002, 2004, 2005, 2008, 2009, 2024 g10 Code GmbH
|
||||
# Makefile.am for GPGMEPP.
|
||||
# Copyright (C) 2016 Bundesamt für Sicherheit in der Informationstechnik
|
||||
# Software engineering by Intevation GmbH
|
||||
#
|
||||
# This file is part of GPGME++, the C++ API binding for GPGME.
|
||||
# This file is part of GPGMEPP.
|
||||
#
|
||||
# GPGME++ is free software; you can redistribute it and/or modify it
|
||||
# GPGME-CL is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GPGME++ is distributed in the hope that it will be useful,
|
||||
# GPGME-CL is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
@ -20,22 +18,6 @@
|
||||
# License along with this program; if not, see <https://gnu.org/licenses/>.
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# Location of the released tarball archives. This is prefixed by
|
||||
# the variable RELEASE_ARCHIVE in ~/.gnupg-autogen.rc. For example:
|
||||
# RELEASE_ARCHIVE=user@host:archive/tarballs
|
||||
RELEASE_ARCHIVE_SUFFIX = gpgme
|
||||
# The variable RELEASE_SIGNKEY in ~/.gnupg-autogen.rc is used
|
||||
# to specify the key for signing. For example:
|
||||
# RELEASE_SIGNKEY=D8692123C4065DEA5E0F3AB5249B39D24F25E3B6
|
||||
|
||||
|
||||
# Autoconf flags
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = autogen.sh autogen.rc README VERSION
|
||||
|
||||
if RUN_GPG_TESTS
|
||||
tests = tests
|
||||
else
|
||||
@ -44,89 +26,4 @@ endif
|
||||
|
||||
SUBDIRS = src ${tests}
|
||||
|
||||
dist-hook: gen-ChangeLog
|
||||
|
||||
distcheck-hook:
|
||||
set -e; ( \
|
||||
pref="#+macro: gpgmepp_" ;\
|
||||
reldate="$$(date -u +%Y-%m-%d)" ;\
|
||||
echo "$${pref}ver $(PACKAGE_VERSION)" ;\
|
||||
echo "$${pref}date $${reldate}" ;\
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do \
|
||||
case "$$i" in *.tar.bz2) \
|
||||
echo "$${pref}size $$(wc -c <$$i|awk '{print int($$1/1024)}')k" ;\
|
||||
echo "$${pref}sha1 $$(sha1sum <$$i|cut -d' ' -f1)" ;\
|
||||
echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\
|
||||
esac;\
|
||||
done ) | tee $(distdir).swdb
|
||||
|
||||
.PHONY: gen-ChangeLog release sign-release
|
||||
|
||||
gen_start_date = 2011-12-01T00:00:00
|
||||
gen-ChangeLog:
|
||||
if test -d $(top_srcdir)/.git; then \
|
||||
(cd $(top_srcdir) && \
|
||||
$(GITLOG_TO_CHANGELOG) --append-dot --tear-off \
|
||||
--amend=build-aux/git-log-fix \
|
||||
--since=$(gen_start_date) ) > $(distdir)/cl-t; \
|
||||
cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
|
||||
rm -f $(distdir)/ChangeLog; \
|
||||
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
|
||||
fi
|
||||
|
||||
|
||||
# Macro to help the release target.
|
||||
RELEASE_NAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
|
||||
|
||||
release:
|
||||
+(set -e;\
|
||||
if [ "$(abs_top_builddir)" = "$(abs_top_srcdir)" ]; then \
|
||||
echo "error: build directory must not be the source directory" >&2;\
|
||||
exit 2;\
|
||||
fi ;\
|
||||
echo "/* Build started at $$(date -uIseconds) */" ;\
|
||||
cd $(top_srcdir); \
|
||||
./autogen.sh --force; \
|
||||
cd $(abs_top_builddir); \
|
||||
rm -rf dist; mkdir dist ; cd dist ; \
|
||||
$(abs_top_srcdir)/configure --enable-maintainer-mode; \
|
||||
$(MAKE) distcheck; \
|
||||
echo "/* Build finished at $$(date -uIseconds) */" ;\
|
||||
echo "/*" ;\
|
||||
echo " * Please run the final step interactively:" ;\
|
||||
echo " * make sign-release" ;\
|
||||
echo " */" ;\
|
||||
) 2>&1 | tee "$(RELEASE_NAME).buildlog"
|
||||
|
||||
sign-release:
|
||||
+(set -e; \
|
||||
test $$(pwd | sed 's,.*/,,') = dist || cd dist; \
|
||||
x=$$(grep '^RELEASE_ARCHIVE=' $$HOME/.gnupg-autogen.rc|cut -d= -f2);\
|
||||
if [ -z "$$x" ]; then \
|
||||
echo "error: RELEASE_ARCHIVE missing in ~/.gnupg-autogen.rc">&2; \
|
||||
exit 2;\
|
||||
fi;\
|
||||
myarchive="$$x/$(RELEASE_ARCHIVE_SUFFIX)";\
|
||||
x=$$(grep '^RELEASE_SIGNKEY=' $$HOME/.gnupg-autogen.rc|cut -d= -f2);\
|
||||
if [ -z "$$x" ]; then \
|
||||
echo "error: RELEASE_SIGNKEY missing in ~/.gnupg-autogen.rc">&2; \
|
||||
exit 2;\
|
||||
fi;\
|
||||
mysignkey="$$x";\
|
||||
files1="$(RELEASE_NAME).tar.bz2" ;\
|
||||
files2="$(RELEASE_NAME).tar.bz2.sig \
|
||||
$(RELEASE_NAME).swdb \
|
||||
$(RELEASE_NAME).buildlog" ;\
|
||||
echo "/* Signing the source tarball ..." ;\
|
||||
gpg -sbu $$mysignkey $(RELEASE_NAME).tar.bz2 ;\
|
||||
cat $(RELEASE_NAME).swdb >swdb.snippet;\
|
||||
echo >>swdb.snippet ;\
|
||||
sha1sum $${files1} >>swdb.snippet ;\
|
||||
cat "../$(RELEASE_NAME).buildlog" swdb.snippet \
|
||||
| gzip >$(RELEASE_NAME).buildlog ;\
|
||||
echo "Copying to local archive ..." ;\
|
||||
scp -p $${files1} $${files2} $$myarchive/ || true;\
|
||||
echo '/*' ;\
|
||||
echo ' * All done; for checksums see dist/swdb.snippet' ;\
|
||||
echo ' */' ;\
|
||||
)
|
||||
EXTRA_DIST = README
|
||||
|
@ -1,19 +0,0 @@
|
||||
Noteworthy changes in version 1.25.0 (unreleased)
|
||||
-------------------------------------------------
|
||||
|
||||
* First separate release of GpgME++.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.24.x and earlier can be found in the
|
||||
NEWS file of gpgme.
|
||||
|
||||
|
||||
Copyright 2024 g10 Code GmbH
|
||||
|
||||
This file is free software; as a special exception the author gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
modifications, as long as this notice is preserved.
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
@ -1,11 +1,11 @@
|
||||
GpgME++ - C++ bindings/wrapper for GPGME
|
||||
GpgMEpp - C++ bindings/wrapper for GPGME
|
||||
----------------------------------------
|
||||
Based on KF5gpgmepp
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
GpgME++ is a C++ wrapper (or C++ bindings) for the GnuPG project's
|
||||
GpgMEpp is a C++ wrapper (or C++ bindings) for the GnuPG project's
|
||||
gpgme (GnuPG Made Easy) library, version 0.4.4 and later.
|
||||
|
||||
It is fairly complete, with some minor things still missing (in
|
||||
@ -33,17 +33,17 @@ The design principles of this library are as follows:
|
||||
8. Abstraction of GnuPG's edit-key interface by prepared
|
||||
Editinteractor classes.
|
||||
|
||||
GpgME++ was originally developed as part of the KDEPIM community.
|
||||
GpgMEpp was originally developed as part of the KDEPIM community.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
The usage pattern of GpgME++ closely follows GPGMEs core usage
|
||||
The usage pattern of GpgMEpp closely follows GPGMEs core usage
|
||||
pattern so the documentation for GPGME itself provides a good
|
||||
way to start.
|
||||
|
||||
The context structure in GPGME is mapped to a Context object in
|
||||
GpgME++. Additional convenience code provides Data objects and
|
||||
GpgMEpp. Additional convenience code provides Data objects and
|
||||
a Dataprovider interface that can be used to implement GPGME's
|
||||
data with any subclass by implementing the right callbacks.
|
||||
|
||||
@ -71,27 +71,26 @@ Example to set the ownertrust of a key:
|
||||
Examples / Tests
|
||||
----------------
|
||||
|
||||
GpgME++ is tested through the Qt API. You can refer to the
|
||||
GpgMEpp is tested through the Qt API. You can refer to the
|
||||
tests in qt/tests for examples of usage or refer to
|
||||
the actual QGpgME*Job.cpp implementations which rely
|
||||
on GpgME++ and should cover most use cases.
|
||||
on GpgMEpp and should cover most use cases.
|
||||
|
||||
Hacking
|
||||
-------
|
||||
|
||||
GpgME++ follows KDE Coding styles. See:
|
||||
GpgMEpp follows KDE Coding styles. See:
|
||||
https://techbase.kde.org/Policies/Frameworks_Coding_Style
|
||||
for more info.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
GPGME++ is free software; you can redistribute it and/or
|
||||
GPGMEpp is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
GPGME++ is distributed in the hope that it will be useful,
|
||||
GPGMEpp is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Library General Public License for more details.
|
||||
|
@ -1,7 +0,0 @@
|
||||
# autogen.sh configuration for GpgME++ -*- sh -*-
|
||||
|
||||
package_subdir="lang/cpp"
|
||||
|
||||
skip_autoheader="yes"
|
||||
|
||||
final_info="mkdir build && cd build && ../configure --enable-maintainer-mode && make"
|
@ -1,527 +0,0 @@
|
||||
#! /bin/sh
|
||||
# autogen.sh
|
||||
# Copyright (C) 2003, 2014, 2017, 2018, 2022, 2024 g10 Code GmbH
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# This is a generic script to create the configure script and handle cross
|
||||
# build environments. It requires the presence of a autogen.rc file to
|
||||
# configure it for the respective package. It is maintained as part of
|
||||
# GnuPG and source copied by other packages.
|
||||
#
|
||||
# Version: 2024-05-24
|
||||
|
||||
configure_ac="configure.ac"
|
||||
|
||||
cvtver () {
|
||||
awk 'NR==1 {split($NF,A,".");X=1000000*A[1]+1000*A[2]+A[3];print X;exit 0}'
|
||||
}
|
||||
|
||||
check_version () {
|
||||
if [ $(( `("$1" --version || echo "0") | cvtver` >= $2 )) = 1 ]; then
|
||||
return 0
|
||||
fi
|
||||
echo "**Error**: "\`$1\'" not installed or too old." >&2
|
||||
echo ' Version '$3' or newer is required.' >&2
|
||||
[ -n "$4" ] && echo ' Note that this is part of '\`$4\''.' >&2
|
||||
DIE="yes"
|
||||
return 1
|
||||
}
|
||||
|
||||
fatal () {
|
||||
echo "autogen.sh:" "$*" >&2
|
||||
DIE=yes
|
||||
}
|
||||
|
||||
info () {
|
||||
if [ -z "${SILENT}" ]; then
|
||||
echo "autogen.sh:" "$*" >&2
|
||||
fi
|
||||
}
|
||||
|
||||
die_p () {
|
||||
if [ "$DIE" = "yes" ]; then
|
||||
echo "autogen.sh: Stop." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
replace_sysroot () {
|
||||
configure_opts=$(echo $configure_opts | sed "s#@SYSROOT@#${w32root}#g")
|
||||
extraoptions=$(echo $extraoptions | sed "s#@SYSROOT@#${w32root}#g")
|
||||
}
|
||||
|
||||
# Allow to override the default tool names
|
||||
AUTOCONF=${AUTOCONF_PREFIX}${AUTOCONF:-autoconf}${AUTOCONF_SUFFIX}
|
||||
AUTOHEADER=${AUTOCONF_PREFIX}${AUTOHEADER:-autoheader}${AUTOCONF_SUFFIX}
|
||||
|
||||
AUTOMAKE=${AUTOMAKE_PREFIX}${AUTOMAKE:-automake}${AUTOMAKE_SUFFIX}
|
||||
ACLOCAL=${AUTOMAKE_PREFIX}${ACLOCAL:-aclocal}${AUTOMAKE_SUFFIX}
|
||||
|
||||
GETTEXT=${GETTEXT_PREFIX}${GETTEXT:-gettext}${GETTEXT_SUFFIX}
|
||||
MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX}
|
||||
|
||||
DIE=no
|
||||
FORCE=
|
||||
SILENT=
|
||||
PRINT_HOST=no
|
||||
PRINT_BUILD=no
|
||||
IS_GIT_CLONE=no
|
||||
tmp=$(dirname "$0")
|
||||
tsdir=$(cd "${tmp}"; pwd)
|
||||
|
||||
if [ -n "${AUTOGEN_SH_SILENT}" ]; then
|
||||
SILENT=" --silent"
|
||||
fi
|
||||
if test x"$1" = x"--help"; then
|
||||
echo "usage: ./autogen.sh [OPTIONS] [ARGS]"
|
||||
echo " Options:"
|
||||
echo " --silent Silent operation"
|
||||
echo " --force Pass --force to autoconf"
|
||||
echo " --find-version Helper for configure.ac"
|
||||
echo " --git-build Run all commands to build from a Git"
|
||||
echo " --print-host Print only the host triplet"
|
||||
echo " --print-build Print only the build platform triplet"
|
||||
echo " --build-TYPE Configure to cross build for TYPE"
|
||||
echo ""
|
||||
echo " ARGS are passed to configure in --build-TYPE mode."
|
||||
echo " Configuration for this script is expected in autogen.rc"
|
||||
exit 0
|
||||
fi
|
||||
if test x"$1" = x"--silent"; then
|
||||
SILENT=" --silent"
|
||||
shift
|
||||
fi
|
||||
if test x"$1" = x"--force"; then
|
||||
FORCE=" --force"
|
||||
shift
|
||||
fi
|
||||
if test x"$1" = x"--print-host"; then
|
||||
PRINT_HOST=yes
|
||||
shift
|
||||
fi
|
||||
if test x"$1" = x"--print-build"; then
|
||||
PRINT_BUILD=yes
|
||||
shift
|
||||
fi
|
||||
|
||||
|
||||
# Reject unsafe characters in $HOME, $tsdir and cwd. We consider spaces
|
||||
# as unsafe because it is too easy to get scripts wrong in this regard.
|
||||
am_lf='
|
||||
'
|
||||
case `pwd` in
|
||||
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
|
||||
fatal "unsafe working directory name" ;;
|
||||
esac
|
||||
case $tsdir in
|
||||
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
|
||||
fatal "unsafe source directory: \`$tsdir'" ;;
|
||||
esac
|
||||
case $HOME in
|
||||
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
|
||||
fatal "unsafe home directory: \`$HOME'" ;;
|
||||
esac
|
||||
die_p
|
||||
|
||||
|
||||
# List of variables sourced from autogen.rc. The strings '@SYSROOT@' in
|
||||
# these variables are replaced by the actual system root.
|
||||
configure_opts=
|
||||
extraoptions=
|
||||
package_subdir=
|
||||
skip_autoheader=
|
||||
# List of optional variables sourced from autogen.rc and ~/.gnupg-autogen.rc
|
||||
w32_toolprefixes=
|
||||
w32_extraoptions=
|
||||
w64_toolprefixes=
|
||||
w64_extraoptions=
|
||||
amd64_toolprefixes=
|
||||
# End list of optional variables sourced from ~/.gnupg-autogen.rc
|
||||
# What follows are variables which are sourced but default to
|
||||
# environment variables or lacking them hardcoded values.
|
||||
#w32root=
|
||||
#w64root=
|
||||
#amd64root=
|
||||
|
||||
# Convenience option to use certain configure options for some hosts.
|
||||
myhost=""
|
||||
myhostsub=""
|
||||
case "$1" in
|
||||
--find-version)
|
||||
myhost="find-version"
|
||||
SILENT=" --silent"
|
||||
shift
|
||||
;;
|
||||
--git-build)
|
||||
myhost="git-build"
|
||||
shift
|
||||
;;
|
||||
--build-w32)
|
||||
myhost="w32"
|
||||
shift
|
||||
;;
|
||||
--build-w64)
|
||||
myhost="w32"
|
||||
myhostsub="64"
|
||||
shift
|
||||
;;
|
||||
--build-amd64)
|
||||
myhost="amd64"
|
||||
shift
|
||||
;;
|
||||
--build*)
|
||||
fatal "**Error**: invalid build option $1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
die_p
|
||||
|
||||
|
||||
# **** GIT BUILD ****
|
||||
# This is a helper to build from git.
|
||||
if [ "$myhost" = "git-build" ]; then
|
||||
tmp="$(pwd)"
|
||||
cd "$tsdir" || fatal "error cd-ing to $tsdir"
|
||||
./autogen.sh || fatal "error running ./autogen.sh"
|
||||
cd "$tmp" || fatal "error cd-ing back to $tmp"
|
||||
die_p
|
||||
"$tsdir"/configure || fatal "error running $tsdir/configure"
|
||||
die_p
|
||||
make || fatal "error running make"
|
||||
die_p
|
||||
make check || fatal "error running make check"
|
||||
die_p
|
||||
exit 0
|
||||
fi
|
||||
# **** end GIT BUILD ****
|
||||
|
||||
|
||||
# Source our configuration
|
||||
if [ -f "${tsdir}/autogen.rc" ]; then
|
||||
. "${tsdir}/autogen.rc"
|
||||
fi
|
||||
|
||||
# Source optional site specific configuration
|
||||
if [ -f "$HOME/.gnupg-autogen.rc" ]; then
|
||||
info "sourcing extra definitions from $HOME/.gnupg-autogen.rc"
|
||||
. "$HOME/.gnupg-autogen.rc"
|
||||
fi
|
||||
|
||||
|
||||
# Find the .git directory (or file for work trees)
|
||||
if [ -e .git ]; then
|
||||
IS_GIT_CLONE=yes
|
||||
elif [ -n "${package_subdir}" ]; then
|
||||
# Look for .git in root of package containing the nested package
|
||||
package_subdir=${package_subdir#/}
|
||||
root_path=${tsdir%/${package_subdir}}
|
||||
if [ -e "${root_path}/.git" ]; then
|
||||
IS_GIT_CLONE=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
# **** FIND VERSION ****
|
||||
# This is a helper for the configure.ac M4 magic
|
||||
# Called
|
||||
# ./autogen.sh --find-version PACKAGE MAJOR MINOR [MICRO]
|
||||
# returns a complete version string with automatic beta numbering.
|
||||
if [ "$myhost" = "find-version" ]; then
|
||||
package="$1"
|
||||
major="$2"
|
||||
minor="$3"
|
||||
micro="$4"
|
||||
|
||||
if [ -z "$package" -o -z "$major" -o -z "$minor" ]; then
|
||||
echo "usage: ./autogen.sh --find-version PACKAGE MAJOR MINOR [MICRO]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$micro" ]; then
|
||||
matchstr1="$package-$major.[0-9]*"
|
||||
matchstr2="$package-$major-base"
|
||||
matchstr3=""
|
||||
vers="$major.$minor"
|
||||
else
|
||||
matchstr1="$package-$major.$minor.[0-9]*"
|
||||
matchstr2="$package-$major.[0-9]*-base"
|
||||
matchstr3="$package-$major-base"
|
||||
vers="$major.$minor.$micro"
|
||||
fi
|
||||
|
||||
beta=no
|
||||
if [ $IS_GIT_CLONE = yes ]; then
|
||||
ingit=yes
|
||||
tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null)
|
||||
if [ -n "$tmp" ]; then
|
||||
tmp=$(echo "$tmp" | sed s/^"$package"// \
|
||||
| awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}')
|
||||
else
|
||||
# (due tof "-base" in the tag we need to take the 4th field)
|
||||
tmp=$(git describe --match "${matchstr2}" --long 2>/dev/null)
|
||||
if [ -n "$tmp" ]; then
|
||||
tmp=$(echo "$tmp" | sed s/^"$package"// \
|
||||
| awk -F- '$4!=0 && $4 !~ /^beta/ {print"-beta"$4}')
|
||||
elif [ -n "${matchstr3}" ]; then
|
||||
tmp=$(git describe --match "${matchstr3}" --long 2>/dev/null)
|
||||
if [ -n "$tmp" ]; then
|
||||
tmp=$(echo "$tmp" | sed s/^"$package"// \
|
||||
| awk -F- '$4!=0 && $4 !~ /^beta/ {print"-beta"$4}')
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
[ -n "$tmp" ] && beta=yes
|
||||
rev=$(git rev-parse --short HEAD | tr -d '\n\r')
|
||||
rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null)))
|
||||
else
|
||||
ingit=no
|
||||
beta=yes
|
||||
tmp="-unknown"
|
||||
rev="0000000"
|
||||
rvd="0"
|
||||
fi
|
||||
|
||||
echo "$package-$vers$tmp:$beta:$ingit:$vers$tmp:$vers:$tmp:$rev:$rvd:"
|
||||
exit 0
|
||||
fi
|
||||
# **** end FIND VERSION ****
|
||||
|
||||
|
||||
if [ ! -f "$tsdir/build-aux/config.guess" ]; then
|
||||
fatal "$tsdir/build-aux/config.guess not found"
|
||||
exit 1
|
||||
fi
|
||||
build=`$tsdir/build-aux/config.guess`
|
||||
if [ $PRINT_BUILD = yes ]; then
|
||||
echo "$build"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# ******************
|
||||
# W32 build script
|
||||
# ******************
|
||||
if [ "$myhost" = "w32" ]; then
|
||||
case $myhostsub in
|
||||
64)
|
||||
w32root="$w64root"
|
||||
[ -z "$w32root" ] && w32root="$HOME/w64root"
|
||||
toolprefixes="$w64_toolprefixes x86_64-w64-mingw32"
|
||||
extraoptions="$extraoptions $w64_extraoptions"
|
||||
;;
|
||||
*)
|
||||
[ -z "$w32root" ] && w32root="$HOME/w32root"
|
||||
toolprefixes="$w32_toolprefixes i686-w64-mingw32 i586-mingw32msvc"
|
||||
toolprefixes="$toolprefixes i386-mingw32msvc mingw32"
|
||||
extraoptions="$extraoptions $w32_extraoptions"
|
||||
;;
|
||||
esac
|
||||
info "Using $w32root as standard install directory"
|
||||
replace_sysroot
|
||||
|
||||
# Locate the cross compiler
|
||||
crossbindir=
|
||||
for host in $toolprefixes; do
|
||||
if ${host}-gcc --version >/dev/null 2>&1 ; then
|
||||
crossbindir=/usr/${host}/bin
|
||||
conf_CC="CC=${host}-gcc"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if [ -z "$crossbindir" ]; then
|
||||
fatal "cross compiler kit not installed"
|
||||
if [ -z "$myhostsub" ]; then
|
||||
info "Under Debian GNU/Linux, you may install it using"
|
||||
info " apt-get install mingw32 mingw32-runtime mingw32-binutils"
|
||||
fi
|
||||
die_p
|
||||
fi
|
||||
if [ $PRINT_HOST = yes ]; then
|
||||
echo "$host"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f "$tsdir/config.log" ]; then
|
||||
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
|
||||
fatal "Please run a 'make distclean' first"
|
||||
die_p
|
||||
fi
|
||||
fi
|
||||
|
||||
$tsdir/configure --enable-maintainer-mode ${SILENT} \
|
||||
--prefix=${w32root} \
|
||||
--host=${host} --build=${build} SYSROOT=${w32root} \
|
||||
PKG_CONFIG_LIBDIR=${w32root}/lib/pkgconfig \
|
||||
${configure_opts} ${extraoptions} "$@"
|
||||
rc=$?
|
||||
exit $rc
|
||||
fi
|
||||
# ***** end W32 build script *******
|
||||
|
||||
# ***** AMD64 cross build script *******
|
||||
# Used to cross-compile for AMD64 (for testing)
|
||||
if [ "$myhost" = "amd64" ]; then
|
||||
[ -z "$amd64root" ] && amd64root="$HOME/amd64root"
|
||||
info "Using $amd64root as standard install directory"
|
||||
replace_sysroot
|
||||
|
||||
toolprefixes="$amd64_toolprefixes x86_64-linux-gnu amd64-linux-gnu"
|
||||
|
||||
# Locate the cross compiler
|
||||
crossbindir=
|
||||
for host in $toolprefixes ; do
|
||||
if ${host}-gcc --version >/dev/null 2>&1 ; then
|
||||
crossbindir=/usr/${host}/bin
|
||||
conf_CC="CC=${host}-gcc"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if [ -z "$crossbindir" ]; then
|
||||
echo "Cross compiler kit not installed" >&2
|
||||
echo "Stop." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ $PRINT_HOST = yes ]; then
|
||||
echo "$host"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f "$tsdir/config.log" ]; then
|
||||
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
|
||||
echo "Please run a 'make distclean' first" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
$tsdir/configure --enable-maintainer-mode ${SILENT} \
|
||||
--prefix=${amd64root} \
|
||||
--host=${host} --build=${build} \
|
||||
${configure_opts} ${extraoptions} "$@"
|
||||
rc=$?
|
||||
exit $rc
|
||||
fi
|
||||
# ***** end AMD64 cross build script *******
|
||||
|
||||
|
||||
# Grep the required versions from configure.ac
|
||||
autoconf_vers=`sed -n '/^AC_PREREQ(/ {
|
||||
s/^.*(\(.*\))/\1/p
|
||||
q
|
||||
}' ${configure_ac}`
|
||||
autoconf_vers_num=`echo "$autoconf_vers" | cvtver`
|
||||
|
||||
automake_vers=`sed -n '/^min_automake_version=/ {
|
||||
s/^.*="\(.*\)"/\1/p
|
||||
q
|
||||
}' ${configure_ac}`
|
||||
automake_vers_num=`echo "$automake_vers" | cvtver`
|
||||
|
||||
if [ -d "${tsdir}/po" ]; then
|
||||
gettext_vers=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ {
|
||||
s/^.*\[\(.*\)])/\1/p
|
||||
q
|
||||
}' ${configure_ac}`
|
||||
gettext_vers_num=`echo "$gettext_vers" | cvtver`
|
||||
else
|
||||
gettext_vers="n/a"
|
||||
fi
|
||||
|
||||
if [ -z "$autoconf_vers" -o -z "$automake_vers" -o -z "$gettext_vers" ]
|
||||
then
|
||||
echo "**Error**: version information not found in "\`${configure_ac}\'"." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if check_version $AUTOCONF $autoconf_vers_num $autoconf_vers ; then
|
||||
check_version $AUTOHEADER $autoconf_vers_num $autoconf_vers autoconf
|
||||
fi
|
||||
if check_version $AUTOMAKE $automake_vers_num $automake_vers; then
|
||||
check_version $ACLOCAL $automake_vers_num $autoconf_vers automake
|
||||
fi
|
||||
if [ "$gettext_vers" != "n/a" ]; then
|
||||
if check_version $GETTEXT $gettext_vers_num $gettext_vers; then
|
||||
check_version $MSGMERGE $gettext_vers_num $gettext_vers gettext
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$DIE" = "yes" ]; then
|
||||
cat <<EOF
|
||||
|
||||
Note that you may use alternative versions of the tools by setting
|
||||
the corresponding environment variables; see README.GIT for details.
|
||||
|
||||
EOF
|
||||
die_p
|
||||
fi
|
||||
|
||||
# Check the git setup.
|
||||
if [ -d .git ]; then
|
||||
CP="cp -p"
|
||||
# If we have a GNU cp we can add -v
|
||||
if cp --version >/dev/null 2>/dev/null; then
|
||||
[ -z "${SILENT}" ] && CP="$CP -v"
|
||||
fi
|
||||
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
|
||||
[ -z "${SILENT}" ] && cat <<EOF
|
||||
*** Activating trailing whitespace git pre-commit hook. ***
|
||||
For more information see this thread:
|
||||
https://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084.html
|
||||
To deactivate this pre-commit hook again move .git/hooks/pre-commit
|
||||
and .git/hooks/pre-commit.sample out of the way.
|
||||
EOF
|
||||
$CP .git/hooks/pre-commit.sample .git/hooks/pre-commit
|
||||
chmod +x .git/hooks/pre-commit
|
||||
fi
|
||||
|
||||
if [ "$gettext_vers" != "n/a" ]; then
|
||||
tmp=$(git config --get filter.cleanpo.clean)
|
||||
if [ "$tmp" != \
|
||||
"awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'" ]
|
||||
then
|
||||
info "*** Adding GIT filter.cleanpo.clean configuration."
|
||||
git config --add filter.cleanpo.clean \
|
||||
"awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'"
|
||||
fi
|
||||
fi
|
||||
if [ -f build-aux/git-hooks/commit-msg -a ! -f .git/hooks/commit-msg ] ; then
|
||||
[ -z "${SILENT}" ] && cat <<EOF
|
||||
*** Activating commit log message check hook. ***
|
||||
EOF
|
||||
$CP build-aux/git-hooks/commit-msg .git/hooks/commit-msg
|
||||
chmod +x .git/hooks/commit-msg
|
||||
if [ x"${display_name}" != x ]; then
|
||||
git config format.subjectPrefix "PATCH ${display_name}"
|
||||
git config sendemail.to "${patches_to}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
aclocal_flags="-I m4"
|
||||
if [ -n "${extra_aclocal_flags}" ]; then
|
||||
aclocal_flags="${aclocal_flags} ${extra_aclocal_flags}"
|
||||
fi
|
||||
if [ -n "${ACLOCAL_FLAGS}" ]; then
|
||||
aclocal_flags="${aclocal_flags} ${ACLOCAL_FLAGS}"
|
||||
fi
|
||||
info "Running $ACLOCAL ${aclocal_flags} ..."
|
||||
$ACLOCAL ${aclocal_flags}
|
||||
if [ -z "${skip_autoheader}" ]; then
|
||||
info "Running autoheader..."
|
||||
$AUTOHEADER
|
||||
fi
|
||||
info "Running automake --gnu ..."
|
||||
$AUTOMAKE --gnu;
|
||||
info "Running autoconf${FORCE} ..."
|
||||
$AUTOCONF${FORCE}
|
||||
|
||||
info "You may now run:${am_lf} ${final_info}"
|
@ -1,347 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
1754
lang/cpp/build-aux/config.guess
vendored
1754
lang/cpp/build-aux/config.guess
vendored
File diff suppressed because it is too large
Load Diff
1890
lang/cpp/build-aux/config.sub
vendored
1890
lang/cpp/build-aux/config.sub
vendored
File diff suppressed because it is too large
Load Diff
@ -1,791 +0,0 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
@ -1,527 +0,0 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-11-20.07; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
@ -1,68 +0,0 @@
|
||||
#
|
||||
# This is a sed script to patch the generated libtool,
|
||||
# which works well against both of libtool 2.4.2 and 2.4.7.
|
||||
#
|
||||
# You may use this work under the terms of a Creative Commons CC0 1.0
|
||||
# License/Waiver.
|
||||
#
|
||||
# CC0 Public Domain Dedication
|
||||
# https://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
#
|
||||
# This sed script applys two hunks of the patch:
|
||||
#
|
||||
# Part1: after the comment "# bleh windows"
|
||||
# Part2: after the comment "#extension on DOS 8.3..."
|
||||
#
|
||||
# Only when those two parts are patched correctly, it exits with 0 or
|
||||
# else, it exits with 1
|
||||
#
|
||||
|
||||
# Find the part 1, by the comment
|
||||
/^[ \t]*# bleh windows$/b part1_start
|
||||
# Not found the part1, raise an error
|
||||
$ q1
|
||||
b
|
||||
|
||||
:part1_start
|
||||
n
|
||||
# The first line in the part 1 must be the begining of the case statement.
|
||||
/^[ \t]*case \$host in$/! q1
|
||||
n
|
||||
# Insert the entry for x86_64-*mingw32*, for modified versuffix.
|
||||
i\
|
||||
x86_64-*mingw32*)
|
||||
i\
|
||||
func_arith $current - $age
|
||||
i\
|
||||
major=$func_arith_result
|
||||
i\
|
||||
versuffix="6-$major"
|
||||
i\
|
||||
;;
|
||||
:part1_0
|
||||
# Find the end of the case statement
|
||||
/^[ \t]*esac$/b find_part2
|
||||
# Not found the end of the case statement, raise an error
|
||||
$ q1
|
||||
n
|
||||
b part1_0
|
||||
|
||||
:find_part2
|
||||
/^[ \t]*# extension on DOS 8.3 file.*systems.$/b part2_process
|
||||
# Not found the part2, raise an error
|
||||
$ q1
|
||||
n
|
||||
b find_part2
|
||||
|
||||
:part2_process
|
||||
$ q1
|
||||
s/^[ \t]*\(versuffix=\)\(.*\)\(-$major\)\(.*\)$/\t case \$host in\n\t x86_64-*mingw32*)\n\t \1\26\3\4\n\t ;;\n\t *)\n\t \1\2\3\4\n\t ;;\n\t esac/
|
||||
t part2_done
|
||||
n
|
||||
b part2_process
|
||||
|
||||
:part2_done
|
||||
$ q0
|
||||
n
|
||||
b part2_done
|
File diff suppressed because it is too large
Load Diff
@ -1,215 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=https://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
@ -1,482 +0,0 @@
|
||||
# configure.ac for GPGME++
|
||||
# Copyright (C) 2000 Werner Koch (dd9jn)
|
||||
# Copyright (C) 2001-2021, 2024 g10 Code GmbH
|
||||
#
|
||||
# This file is part of GPGME++.
|
||||
#
|
||||
# GPGME++ is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as
|
||||
# published by the Free Software Foundation; either version 2.1 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# GPGME++ is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, see <https://gnu.org/licenses/>.
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
# (Process this file with autoconf to produce a configure script.)
|
||||
AC_PREREQ([2.69])
|
||||
min_automake_version="1.14"
|
||||
|
||||
# To build a release you need to create a tag with the version number
|
||||
# "gpgmepp-n.m.k" and run "./autogen.sh --force". Please bump the
|
||||
# version number immediately after the release and do another commit
|
||||
# and push so that the git magic is able to work. If you start a new
|
||||
# series by bumping the minor (m) remember to also create a tag named
|
||||
# "gpgmepp-n.m-base" as the start point for beta numbering. See below
|
||||
# for the LT versions.
|
||||
m4_define([mym4_package],[gpgmepp])
|
||||
m4_define([mym4_major], [1])
|
||||
m4_define([mym4_minor], [24])
|
||||
m4_define([mym4_micro], [0])
|
||||
|
||||
# Below is m4 magic to extract and compute the git revision number,
|
||||
# the decimalized short revision number, a beta version string and a
|
||||
# flag indicating a development version (mym4_isbeta). Note that the
|
||||
# m4 processing is done by autoconf and not during the configure run.
|
||||
m4_define([mym4_verslist], m4_split(m4_esyscmd([./autogen.sh --find-version] \
|
||||
mym4_package mym4_major mym4_minor mym4_micro),[:]))
|
||||
m4_define([mym4_isbeta], m4_argn(2, mym4_verslist))
|
||||
m4_define([mym4_version], m4_argn(4, mym4_verslist))
|
||||
m4_define([mym4_revision], m4_argn(7, mym4_verslist))
|
||||
m4_define([mym4_revision_dec], m4_argn(8, mym4_verslist))
|
||||
m4_esyscmd([echo ]mym4_version[>VERSION])
|
||||
AC_INIT([mym4_package],[mym4_version],[https://bugs.gnupg.org])
|
||||
|
||||
# LT Version numbers, remember to change them just *before* a release.
|
||||
# (Code changed: REVISION++)
|
||||
# (Interfaces added/removed/changed: CURRENT++, REVISION=0)
|
||||
# (Interfaces added: AGE++)
|
||||
# (Interfaces removed: AGE=0)
|
||||
#
|
||||
# If there is an ABI break in gpgmepp also bump the version in
|
||||
# IMPORTED_LOCATION in the GpgmeppConfig-w32.cmake.in.in
|
||||
LIBGPGMEPP_LT_CURRENT=26
|
||||
LIBGPGMEPP_LT_AGE=20
|
||||
LIBGPGMEPP_LT_REVISION=1
|
||||
################################################
|
||||
|
||||
AC_SUBST(LIBGPGMEPP_LT_CURRENT)
|
||||
AC_SUBST(LIBGPGMEPP_LT_AGE)
|
||||
AC_SUBST(LIBGPGMEPP_LT_REVISION)
|
||||
|
||||
##############################################
|
||||
|
||||
NEED_GPG_ERROR_VERSION=1.47
|
||||
|
||||
# We need GpgME matching the minor version of GpgME++
|
||||
NEED_GPGME_VERSION=mym4_major.mym4_minor.0
|
||||
|
||||
VERSION_MAJOR=mym4_major
|
||||
VERSION_MINOR=mym4_minor
|
||||
VERSION_MICRO=mym4_micro
|
||||
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip])
|
||||
AM_MAINTAINER_MODE
|
||||
AC_CANONICAL_HOST
|
||||
AM_SILENT_RULES
|
||||
AC_ARG_VAR(SYSROOT,[locate config scripts also below that directory])
|
||||
|
||||
# Enable GNU extensions on systems that have them.
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
# Taken from mpfr-4.0.1, then modified for LDADD_FOR_TESTS_KLUDGE
|
||||
dnl Under Linux, make sure that the old dtags are used if LD_LIBRARY_PATH
|
||||
dnl is defined. The issue is that with the new dtags, LD_LIBRARY_PATH has
|
||||
dnl the precedence over the run path, so that if a compatible MPFR library
|
||||
dnl is installed in some directory from $LD_LIBRARY_PATH, then the tested
|
||||
dnl MPFR library will be this library instead of the MPFR library from the
|
||||
dnl build tree. Other OS with the same issue might be added later.
|
||||
dnl
|
||||
dnl References:
|
||||
dnl https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859732
|
||||
dnl http://lists.gnu.org/archive/html/libtool/2017-05/msg00000.html
|
||||
dnl
|
||||
dnl We need to check whether --disable-new-dtags is supported as alternate
|
||||
dnl linkers may be used (e.g., with tcc: CC=tcc LD=tcc).
|
||||
dnl
|
||||
case $host in
|
||||
*-*-linux*)
|
||||
if test -n "$LD_LIBRARY_PATH"; then
|
||||
saved_LDFLAGS="$LDFLAGS"
|
||||
LDADD_FOR_TESTS_KLUDGE="-Wl,--disable-new-dtags"
|
||||
LDFLAGS="$LDFLAGS $LDADD_FOR_TESTS_KLUDGE"
|
||||
AC_MSG_CHECKING(whether --disable-new-dtags is supported by the linker)
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||
int main (void) { return 0; }
|
||||
]])],
|
||||
[AC_MSG_RESULT(yes (use it since LD_LIBRARY_PATH is set))],
|
||||
[AC_MSG_RESULT(no)
|
||||
LDADD_FOR_TESTS_KLUDGE=""
|
||||
])
|
||||
LDFLAGS="$saved_LDFLAGS"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([LDADD_FOR_TESTS_KLUDGE])
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CXX
|
||||
|
||||
# Note: A suitable gitlog-to-changelog script can be found in GnuPG master.
|
||||
AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog, [gitlog-to-changelog])
|
||||
|
||||
AC_SUBST(VERSION_MAJOR)
|
||||
AC_SUBST(VERSION_MINOR)
|
||||
AC_SUBST(VERSION_MICRO)
|
||||
|
||||
VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_major \
|
||||
mym4_minor mym4_micro)
|
||||
AC_SUBST(VERSION_NUMBER)
|
||||
|
||||
# We need to compile and run a program on the build machine. A
|
||||
# comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in
|
||||
# the AC archive is broken for autoconf 2.57. Given that there is no
|
||||
# newer version of that macro, we assume that it is also broken for
|
||||
# autoconf 2.61 and thus we use a simple but usually sufficient
|
||||
# approach.
|
||||
AC_MSG_CHECKING(for cc for build)
|
||||
if test "$cross_compiling" = "yes"; then
|
||||
CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
|
||||
else
|
||||
CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
|
||||
fi
|
||||
AC_MSG_RESULT($CC_FOR_BUILD)
|
||||
AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
|
||||
|
||||
|
||||
# Don't default to build static libs.
|
||||
LT_PREREQ([2.2.6])
|
||||
LT_INIT([win32-dll disable-static])
|
||||
LT_LANG([Windows Resource])
|
||||
|
||||
# For now we hardcode the use of version scripts. It would be better
|
||||
# to write a test for this or even implement this within libtool.
|
||||
have_ld_version_script=no
|
||||
case "${host}" in
|
||||
*-*-linux*)
|
||||
have_ld_version_script=yes
|
||||
;;
|
||||
*-*-gnu*)
|
||||
have_ld_version_script=yes
|
||||
;;
|
||||
*-apple-darwin*)
|
||||
AC_DEFINE(_DARWIN_C_SOURCE, 1,
|
||||
Expose all libc features (__DARWIN_C_FULL).)
|
||||
AC_DEFINE(_XOPEN_SOURCE, 500, Activate POSIX interface on MacOS X)
|
||||
;;
|
||||
esac
|
||||
|
||||
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
|
||||
|
||||
#
|
||||
# Specify how we support our local modification of libtool for Windows
|
||||
# 64-bit. Options are:
|
||||
#
|
||||
# (1) apply: when appying patch fails, it results failure of entire build
|
||||
# (2) never: never apply the patch (no try)
|
||||
# (3) try: use patched if it goes well, use original if fails
|
||||
#
|
||||
AC_ARG_WITH([libtool-modification],
|
||||
AS_HELP_STRING([--with-libtool-modification=apply|never|try],
|
||||
[how to handle libtool modification (default=never)]),
|
||||
build_libtool_modification=$withval,
|
||||
build_libtool_modification=never)
|
||||
|
||||
#
|
||||
# Apply a patch (locally maintained one of ours) to libtool
|
||||
#
|
||||
case $host in
|
||||
x86_64-*mingw32*)
|
||||
AC_CONFIG_COMMANDS([libtool-patch],[[
|
||||
if test "$build_selection" = never; then
|
||||
echo "patch not applied"
|
||||
elif (mv -f libtool libtool.orig; \
|
||||
sed -f $srcdir/build-aux/libtool-patch.sed libtool.orig >libtool); then
|
||||
echo "applied successfully"
|
||||
elif test "$build_selection" = try; then
|
||||
mv -f libtool.orig libtool
|
||||
echo "patch failed, thus, using original"
|
||||
else
|
||||
echo "patch failed"
|
||||
as_fn_exit 1
|
||||
fi
|
||||
]],[build_selection=$build_libtool_modification])
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
GPG_DEFAULT=no
|
||||
GPGSM_DEFAULT=no
|
||||
GPGCONF_DEFAULT=no
|
||||
G13_DEFAULT=no
|
||||
component_system=None
|
||||
have_dosish_system=no
|
||||
have_android_system=no
|
||||
have_w32_system=no
|
||||
have_w64_system=no
|
||||
have_macos_system=no
|
||||
case "${host}" in
|
||||
x86_64-*mingw32*)
|
||||
have_w64_system=yes
|
||||
;;
|
||||
*-linux-androideabi)
|
||||
have_android_system=yes
|
||||
;;
|
||||
*-apple-darwin*)
|
||||
have_macos_system=yes
|
||||
;;
|
||||
esac
|
||||
case "${host}" in
|
||||
*-mingw32*)
|
||||
have_dosish_system=yes
|
||||
have_w32_system=yes
|
||||
GPG_DEFAULT='c:\\gnupg\\gpg.exe'
|
||||
GPGSM_DEFAULT='c:\\gnupg\\gpgsm.exe'
|
||||
GPGCONF_DEFAULT='c:\\gnupg\\gpgconf.exe'
|
||||
G13_DEFAULT='c:\\gnupg\\g13.exe'
|
||||
#component_system='COM+'
|
||||
;;
|
||||
*)
|
||||
|
||||
# XXX: Probably use exec-prefix here?
|
||||
# GPG_DEFAULT='/usr/bin/gpg'
|
||||
# GPGSM_DEFAULT='/usr/bin/gpgsm'
|
||||
# GPGCONF_DEFAULT='/usr/bin/gpgconf'
|
||||
# G13_DEFAULT='/usr/bin/g13'
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$have_dosish_system" = yes; then
|
||||
AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
|
||||
[Defined if we run on some of the PCDOS like systems
|
||||
(DOS, Windoze. OS/2) with special properties like
|
||||
no file modes])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
|
||||
|
||||
if test "$have_w32_system" = yes; then
|
||||
AC_DEFINE(HAVE_W32_SYSTEM,1,
|
||||
[Defined if we run on any kind of W32 API based system])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
|
||||
|
||||
if test "$have_w64_system" = yes; then
|
||||
AC_DEFINE(HAVE_W64_SYSTEM,1,
|
||||
[Defined if we run on a 64 bit W32 API based system])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_W64_SYSTEM, test "$have_w64_system" = yes)
|
||||
|
||||
if test "$have_android_system" = yes; then
|
||||
AC_DEFINE(HAVE_ANDROID_SYSTEM,1, [Defined if we build for an Android system])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_ANDROID_SYSTEM, test "$have_android_system" = yes)
|
||||
|
||||
if test "$have_macos_system" = yes; then
|
||||
AC_DEFINE(HAVE_MACOS_SYSTEM,1,
|
||||
[Defined if we build for an MacOS system])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_MACOS_SYSTEM, test "$have_macos_system" = yes)
|
||||
|
||||
|
||||
# Require C++ 11
|
||||
AX_CXX_COMPILE_STDCXX(11, noext, optional)
|
||||
if test "$HAVE_CXX11" != "1"; then
|
||||
AC_MSG_ERROR([[
|
||||
***
|
||||
*** A compiler with c++11 support is required for the C++ binding.
|
||||
***]])
|
||||
fi
|
||||
|
||||
# Check whether compiler supports visibility attribute
|
||||
AX_GCC_FUNC_ATTRIBUTE(visibility)
|
||||
if test "$ax_cv_have_func_attribute_visibility" = "yes"; then
|
||||
GPGMEPP_CFLAGS="$GPGMEPP_CFLAGS -fvisibility=hidden"
|
||||
fi
|
||||
AC_SUBST(GPGMEPP_CFLAGS)
|
||||
|
||||
#
|
||||
# Provide information about the build.
|
||||
#
|
||||
BUILD_REVISION="mym4_revision"
|
||||
AC_SUBST(BUILD_REVISION)
|
||||
AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION",
|
||||
[GIT commit id revision used to build this package])
|
||||
|
||||
|
||||
#
|
||||
# Options to disable some regression tests
|
||||
#
|
||||
run_tests="yes"
|
||||
AC_ARG_ENABLE(tests,
|
||||
AS_HELP_STRING([--disable-tests], [disable regression tests]),
|
||||
run_tests=$enableval)
|
||||
AM_CONDITIONAL(RUN_GPG_TESTS, test "$run_tests" = "yes")
|
||||
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS_ONCE([unistd.h])
|
||||
|
||||
|
||||
# Type checks.
|
||||
AC_CHECK_SIZEOF(unsigned int)
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
|
||||
# Checks for compiler features.
|
||||
if test "$GCC" = yes; then
|
||||
if test "$USE_MAINTAINER_MODE" = "yes"; then
|
||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-shadow"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Checks for library functions.
|
||||
AC_MSG_NOTICE([checking for libraries])
|
||||
|
||||
# Checking for libgpg-error.
|
||||
have_gpg_error=no
|
||||
AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
|
||||
have_gpg_error=yes, have_gpg_error=no)
|
||||
AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
|
||||
[The default error source for GPGME.])
|
||||
|
||||
AM_CONDITIONAL(USE_GPGRT_CONFIG, [test -n "$GPGRT_CONFIG" \
|
||||
-a "$ac_cv_path_GPG_ERROR_CONFIG" = no])
|
||||
|
||||
# And for gpgme.
|
||||
have_gpgme=no
|
||||
builddir=`pwd`
|
||||
# Check if gpgmepp is built as nested package of gpgme
|
||||
if test "${srcdir%/lang/cpp}/lang/cpp" == "$srcdir" -a \
|
||||
"${builddir%/lang/cpp}/lang/cpp" == "$builddir"; then
|
||||
AC_MSG_CHECKING(for GpgME - assuming nested build)
|
||||
gpgme_build_dir=${builddir%/lang/cpp}
|
||||
if test -f "$gpgme_build_dir/src/gpgme.h"; then
|
||||
GPGME_CFLAGS="-I$gpgme_build_dir/src"
|
||||
GPGME_LIBS="$gpgme_build_dir/src/libgpgme.la"
|
||||
have_gpgme=yes
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$have_gpgme" = "no"; then
|
||||
AM_PATH_GPGME("$NEED_GPGME_VERSION",
|
||||
have_gpgme=yes, have_gpgme=no)
|
||||
fi
|
||||
|
||||
|
||||
# Substitution used for gpgmepp.pc
|
||||
GPGMEPP_PKGCONFIG_LIBS="-lgpgmepp"
|
||||
GPGMEPP_PKGCONFIG_CFLAGS=""
|
||||
GPGMEPP_PKGCONFIG_HOST="$host"
|
||||
|
||||
case "$includedir" in
|
||||
/usr/include|/include) ;;
|
||||
'${prefix}/include')
|
||||
if test "$prefix" != / -a "$prefix" != /usr; then
|
||||
if test -z "$GPGMEPP_PKGCONFIG_CFLAGS"; then
|
||||
GPGMEPP_PKGCONFIG_CFLAGS="-I\${includedir}"
|
||||
else
|
||||
GPGMEPP_PKGCONFIG_CFLAGS="-I\${includedir} $GPGMEPP_PKGCONFIG_CFLAGS"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if test -z "$GPGMEPP_PKGCONFIG_CFLAGS"; then
|
||||
GPGMEPP_PKGCONFIG_CFLAGS="-I\${includedir}"
|
||||
else
|
||||
GPGMEPP_PKGCONFIG_CFLAGS="-I\${includedir} $GPGMEPP_PKGCONFIG_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case "$libdir" in
|
||||
/usr/lib|/usr/lib64|/lib|/lib64) ;;
|
||||
'${exec_prefix}/lib'|'${exec_prefix}/lib64')
|
||||
if test "$exec_prefix" = "NONE"; then
|
||||
if test "$prefix" != / -a "$prefix" != /usr; then
|
||||
GPGMEPP_PKGCONFIG_LIBS="-L\${libdir} $GPGMEPP_PKGCONFIG_LIBS"
|
||||
fi
|
||||
elif test "$exec_prefix" != / -a "$exec_prefix" != /usr; then
|
||||
GPGMEPP_PKGCONFIG_LIBS="-L\${libdir} $GPGMEPP_PKGCONFIG_LIBS"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
GPGMEPP_PKGCONFIG_LIBS="-L\${libdir} $GPGMEPP_PKGCONFIG_LIBS"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(GPGMEPP_PKGCONFIG_LIBS)
|
||||
AC_SUBST(GPGMEPP_PKGCONFIG_CFLAGS)
|
||||
AC_SUBST(GPGMEPP_PKGCONFIG_HOST)
|
||||
|
||||
|
||||
# Last check.
|
||||
die=no
|
||||
if test "$have_gpg_error" = "no"; then
|
||||
die=yes
|
||||
AC_MSG_NOTICE([[
|
||||
***
|
||||
*** You need libgpg-error to build this program.
|
||||
** This library is for example available at
|
||||
*** https://www.gnupg.org/ftp/gcrypt/libgpg-error/
|
||||
*** (at least version $NEED_GPG_ERROR_VERSION is required.)
|
||||
***]])
|
||||
fi
|
||||
if test "$have_gpgme" = "no"; then
|
||||
die=yes
|
||||
AC_MSG_NOTICE([[
|
||||
***
|
||||
*** You need gpgme to build this program.
|
||||
*** This library is for example available at
|
||||
*** https://www.gnupg.org/ftp/gcrypt/gpgme/
|
||||
*** (at least version $NEED_GPGME_VERSION is required).
|
||||
***]])
|
||||
fi
|
||||
|
||||
if test "$die" = "yes"; then
|
||||
AC_MSG_ERROR([[
|
||||
***
|
||||
*** Required libraries not found. Please consult the above messages
|
||||
*** and install them before running configure again.
|
||||
***]])
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Create config files
|
||||
|
||||
AC_CONFIG_FILES(Makefile src/Makefile)
|
||||
AC_CONFIG_FILES(tests/Makefile)
|
||||
AC_CONFIG_FILES(src/gpgmepp.pc)
|
||||
AC_CONFIG_FILES(src/GpgmeppConfig-w32.cmake.in)
|
||||
AC_CONFIG_FILES(src/GpgmeppConfig.cmake.in)
|
||||
AC_CONFIG_FILES(src/GpgmeppConfigVersion.cmake)
|
||||
AC_CONFIG_FILES(src/gpgmepp_version.h)
|
||||
AC_OUTPUT
|
||||
|
||||
echo "
|
||||
GpgME++ v${VERSION} has been configured as follows:
|
||||
|
||||
Revision: mym4_revision (mym4_revision_dec)
|
||||
Platform: $host
|
||||
"
|
||||
if test "x${gpg_config_script_warn}" != x; then
|
||||
cat <<G10EOF
|
||||
Mismatches between the target platform and the to
|
||||
be used libraries have been been detected for:
|
||||
${gpg_config_script_warn}
|
||||
Please check above for warning messages.
|
||||
|
||||
G10EOF
|
||||
fi
|
@ -1,225 +0,0 @@
|
||||
# gpg-error.m4 - autoconf macro to detect libgpg-error.
|
||||
# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018, 2020, 2021, 2022
|
||||
# g10 Code GmbH
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This file is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# Last-changed: 2023-04-01
|
||||
|
||||
dnl
|
||||
dnl Find gpg-error-config, for backward compatibility
|
||||
dnl
|
||||
dnl _AM_PATH_POSSIBLE_GPG_ERROR_CONFIG
|
||||
AC_DEFUN([_AM_PATH_POSSIBLE_GPG_ERROR_CONFIG],[dnl
|
||||
gpg_error_config_prefix=""
|
||||
dnl --with-libgpg-error-prefix=PFX is the preferred name for this option,
|
||||
dnl since that is consistent with how our three siblings use the directory/
|
||||
dnl package name in --with-$dir_name-prefix=PFX.
|
||||
AC_ARG_WITH(libgpg-error-prefix,
|
||||
AS_HELP_STRING([--with-libgpg-error-prefix=PFX],
|
||||
[prefix where GPG Error is installed (optional)]),
|
||||
[gpg_error_config_prefix="$withval"])
|
||||
|
||||
dnl Accept --with-gpg-error-prefix and make it work the same as
|
||||
dnl --with-libgpg-error-prefix above, for backwards compatibility,
|
||||
dnl but do not document this old, inconsistently-named option.
|
||||
AC_ARG_WITH(gpg-error-prefix,,
|
||||
[gpg_error_config_prefix="$withval"])
|
||||
|
||||
if test x"${GPG_ERROR_CONFIG}" = x ; then
|
||||
if test x"${gpg_error_config_prefix}" != x ; then
|
||||
GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config"
|
||||
else
|
||||
case "${SYSROOT}" in
|
||||
/*)
|
||||
if test -x "${SYSROOT}/bin/gpg-error-config" ; then
|
||||
GPG_ERROR_CONFIG="${SYSROOT}/bin/gpg-error-config"
|
||||
fi
|
||||
;;
|
||||
'')
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no)
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Find gpgrt-config, which uses .pc file
|
||||
dnl (minimum pkg-config functionality, supporting cross build)
|
||||
dnl
|
||||
dnl _AM_PATH_GPGRT_CONFIG
|
||||
AC_DEFUN([_AM_PATH_GPGRT_CONFIG],[dnl
|
||||
AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no, [$prefix/bin:$PATH])
|
||||
if test "$GPGRT_CONFIG" != "no"; then
|
||||
# Determine gpgrt_libdir
|
||||
#
|
||||
# Get the prefix of gpgrt-config assuming it's something like:
|
||||
# <PREFIX>/bin/gpgrt-config
|
||||
gpgrt_prefix=${GPGRT_CONFIG%/*/*}
|
||||
possible_libdir1=${gpgrt_prefix}/lib
|
||||
# Determine by using system libdir-format with CC, it's like:
|
||||
# Normal style: /usr/lib
|
||||
# GNU cross style: /usr/<triplet>/lib
|
||||
# Debian style: /usr/lib/<multiarch-name>
|
||||
# Fedora/openSUSE style: /usr/lib, /usr/lib32 or /usr/lib64
|
||||
# It is assumed that CC is specified to the one of host on cross build.
|
||||
if libdir_candidates=$(${CC:-cc} -print-search-dirs | \
|
||||
sed -n -e "/^libraries/{s/libraries: =//;s/:/\\
|
||||
/g;p;}"); then
|
||||
# From the output of -print-search-dirs, select valid pkgconfig dirs.
|
||||
libdir_candidates=$(for dir in $libdir_candidates; do
|
||||
if p=$(cd $dir 2>/dev/null && pwd); then
|
||||
test -d "$p/pkgconfig" && echo $p;
|
||||
fi
|
||||
done)
|
||||
|
||||
for possible_libdir0 in $libdir_candidates; do
|
||||
# possible_libdir0:
|
||||
# Fallback candidate, the one of system-installed (by $CC)
|
||||
# (/usr/<triplet>/lib, /usr/lib/<multiarch-name> or /usr/lib32)
|
||||
# possible_libdir1:
|
||||
# Another candidate, user-locally-installed
|
||||
# (<gpgrt_prefix>/lib)
|
||||
# possible_libdir2
|
||||
# Most preferred
|
||||
# (<gpgrt_prefix>/<triplet>/lib,
|
||||
# <gpgrt_prefix>/lib/<multiarch-name> or <gpgrt_prefix>/lib32)
|
||||
if test "${possible_libdir0##*/}" = "lib"; then
|
||||
possible_prefix0=${possible_libdir0%/lib}
|
||||
possible_prefix0_triplet=${possible_prefix0##*/}
|
||||
if test -z "$possible_prefix0_triplet"; then
|
||||
continue
|
||||
fi
|
||||
possible_libdir2=${gpgrt_prefix}/$possible_prefix0_triplet/lib
|
||||
else
|
||||
possible_prefix0=${possible_libdir0%%/lib*}
|
||||
possible_libdir2=${gpgrt_prefix}${possible_libdir0#$possible_prefix0}
|
||||
fi
|
||||
if test -f ${possible_libdir2}/pkgconfig/gpg-error.pc; then
|
||||
gpgrt_libdir=${possible_libdir2}
|
||||
elif test -f ${possible_libdir1}/pkgconfig/gpg-error.pc; then
|
||||
gpgrt_libdir=${possible_libdir1}
|
||||
elif test -f ${possible_libdir0}/pkgconfig/gpg-error.pc; then
|
||||
gpgrt_libdir=${possible_libdir0}
|
||||
fi
|
||||
if test -n "$gpgrt_libdir"; then break; fi
|
||||
done
|
||||
fi
|
||||
if test -z "$gpgrt_libdir"; then
|
||||
# No valid pkgconfig dir in any of the system directories, fallback
|
||||
gpgrt_libdir=${possible_libdir1}
|
||||
fi
|
||||
else
|
||||
unset GPGRT_CONFIG
|
||||
fi
|
||||
|
||||
if test -n "$gpgrt_libdir"; then
|
||||
GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir"
|
||||
if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
|
||||
GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
|
||||
AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config])
|
||||
gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion`
|
||||
else
|
||||
gpg_error_config_version=`$GPG_ERROR_CONFIG --version`
|
||||
unset GPGRT_CONFIG
|
||||
fi
|
||||
elif test "$GPG_ERROR_CONFIG" != "no"; then
|
||||
gpg_error_config_version=`$GPG_ERROR_CONFIG --version`
|
||||
unset GPGRT_CONFIG
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION,
|
||||
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
|
||||
dnl
|
||||
dnl Test for libgpg-error and define GPG_ERROR_CFLAGS, GPG_ERROR_LIBS,
|
||||
dnl GPG_ERROR_MT_CFLAGS, and GPG_ERROR_MT_LIBS. The _MT_ variants are
|
||||
dnl used for programs requireing real multi thread support.
|
||||
dnl
|
||||
dnl If a prefix option is not used, the config script is first
|
||||
dnl searched in $SYSROOT/bin and then along $PATH. If the used
|
||||
dnl config script does not match the host specification the script
|
||||
dnl is added to the gpg_config_script_warn variable.
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_GPG_ERROR],[dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([_AM_PATH_POSSIBLE_GPG_ERROR_CONFIG])dnl
|
||||
AC_REQUIRE([_AM_PATH_GPGRT_CONFIG])dnl
|
||||
min_gpg_error_version=ifelse([$1], ,1.33,$1)
|
||||
ok=no
|
||||
if test "$GPG_ERROR_CONFIG" != "no"; then
|
||||
req_major=`echo $min_gpg_error_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
|
||||
req_minor=`echo $min_gpg_error_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
||||
major=`echo $gpg_error_config_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
|
||||
minor=`echo $gpg_error_config_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
|
||||
if test "$major" -gt "$req_major"; then
|
||||
ok=yes
|
||||
else
|
||||
if test "$major" -eq "$req_major"; then
|
||||
if test "$minor" -ge "$req_minor"; then
|
||||
ok=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
|
||||
if test $ok = yes; then
|
||||
GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags`
|
||||
GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs`
|
||||
if test -z "$GPGRT_CONFIG"; then
|
||||
GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null`
|
||||
GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null`
|
||||
else
|
||||
GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null`
|
||||
GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS"
|
||||
GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null`
|
||||
GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS"
|
||||
fi
|
||||
AC_MSG_RESULT([yes ($gpg_error_config_version)])
|
||||
ifelse([$2], , :, [$2])
|
||||
if test -z "$GPGRT_CONFIG"; then
|
||||
gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none`
|
||||
else
|
||||
gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none`
|
||||
fi
|
||||
if test x"$gpg_error_config_host" != xnone ; then
|
||||
if test x"$gpg_error_config_host" != x"$host" ; then
|
||||
AC_MSG_WARN([[
|
||||
***
|
||||
*** The config script "$GPG_ERROR_CONFIG" was
|
||||
*** built for $gpg_error_config_host and thus may not match the
|
||||
*** used host $host.
|
||||
*** You may want to use the configure option --with-libgpg-error-prefix
|
||||
*** to specify a matching config script or use \$SYSROOT.
|
||||
***]])
|
||||
gpg_config_script_warn="$gpg_config_script_warn libgpg-error"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
GPG_ERROR_CFLAGS=""
|
||||
GPG_ERROR_LIBS=""
|
||||
GPG_ERROR_MT_CFLAGS=""
|
||||
GPG_ERROR_MT_LIBS=""
|
||||
AC_MSG_RESULT(no)
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GPG_ERROR_CFLAGS)
|
||||
AC_SUBST(GPG_ERROR_LIBS)
|
||||
AC_SUBST(GPG_ERROR_MT_CFLAGS)
|
||||
AC_SUBST(GPG_ERROR_MT_LIBS)
|
||||
])
|
@ -1,412 +0,0 @@
|
||||
# gpgme.m4 - autoconf macro to detect GPGME.
|
||||
# Copyright (C) 2002, 2003, 2004, 2014, 2018, 2022 g10 Code GmbH
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This file is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# Last-changed: 2024-05-16
|
||||
|
||||
|
||||
dnl
|
||||
dnl Find gpgrt-config, which uses .pc file
|
||||
dnl (minimum pkg-config functionality, supporting cross build)
|
||||
dnl
|
||||
dnl _AM_PATH_GPGRT_CONFIG
|
||||
AC_DEFUN([_AM_PATH_GPGRT_CONFIG],[dnl
|
||||
AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no, [$prefix/bin:$PATH])
|
||||
if test "$GPGRT_CONFIG" != "no"; then
|
||||
# Determine gpgrt_libdir
|
||||
#
|
||||
# Get the prefix of gpgrt-config assuming it's something like:
|
||||
# <PREFIX>/bin/gpgrt-config
|
||||
gpgrt_prefix=${GPGRT_CONFIG%/*/*}
|
||||
possible_libdir1=${gpgrt_prefix}/lib
|
||||
# Determine by using system libdir-format with CC, it's like:
|
||||
# Normal style: /usr/lib
|
||||
# GNU cross style: /usr/<triplet>/lib
|
||||
# Debian style: /usr/lib/<multiarch-name>
|
||||
# Fedora/openSUSE style: /usr/lib, /usr/lib32 or /usr/lib64
|
||||
# It is assumed that CC is specified to the one of host on cross build.
|
||||
if libdir_candidates=$(${CC:-cc} -print-search-dirs | \
|
||||
sed -n -e "/^libraries/{s/libraries: =//;s/:/\\
|
||||
/g;p;}"); then
|
||||
# From the output of -print-search-dirs, select valid pkgconfig dirs.
|
||||
libdir_candidates=$(for dir in $libdir_candidates; do
|
||||
if p=$(cd $dir 2>/dev/null && pwd); then
|
||||
test -d "$p/pkgconfig" && echo $p;
|
||||
fi
|
||||
done)
|
||||
|
||||
for possible_libdir0 in $libdir_candidates; do
|
||||
# possible_libdir0:
|
||||
# Fallback candidate, the one of system-installed (by $CC)
|
||||
# (/usr/<triplet>/lib, /usr/lib/<multiarch-name> or /usr/lib32)
|
||||
# possible_libdir1:
|
||||
# Another candidate, user-locally-installed
|
||||
# (<gpgrt_prefix>/lib)
|
||||
# possible_libdir2
|
||||
# Most preferred
|
||||
# (<gpgrt_prefix>/<triplet>/lib,
|
||||
# <gpgrt_prefix>/lib/<multiarch-name> or <gpgrt_prefix>/lib32)
|
||||
if test "${possible_libdir0##*/}" = "lib"; then
|
||||
possible_prefix0=${possible_libdir0%/lib}
|
||||
possible_prefix0_triplet=${possible_prefix0##*/}
|
||||
if test -z "$possible_prefix0_triplet"; then
|
||||
continue
|
||||
fi
|
||||
possible_libdir2=${gpgrt_prefix}/$possible_prefix0_triplet/lib
|
||||
else
|
||||
possible_prefix0=${possible_libdir0%%/lib*}
|
||||
possible_libdir2=${gpgrt_prefix}${possible_libdir0#$possible_prefix0}
|
||||
fi
|
||||
if test -f ${possible_libdir2}/pkgconfig/gpg-error.pc; then
|
||||
gpgrt_libdir=${possible_libdir2}
|
||||
elif test -f ${possible_libdir1}/pkgconfig/gpg-error.pc; then
|
||||
gpgrt_libdir=${possible_libdir1}
|
||||
elif test -f ${possible_libdir0}/pkgconfig/gpg-error.pc; then
|
||||
gpgrt_libdir=${possible_libdir0}
|
||||
fi
|
||||
if test -n "$gpgrt_libdir"; then break; fi
|
||||
done
|
||||
fi
|
||||
if test -z "$gpgrt_libdir"; then
|
||||
# No valid pkgconfig dir in any of the system directories, fallback
|
||||
gpgrt_libdir=${possible_libdir1}
|
||||
fi
|
||||
else
|
||||
unset GPGRT_CONFIG
|
||||
fi
|
||||
|
||||
if test -n "$gpgrt_libdir"; then
|
||||
GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir"
|
||||
if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
|
||||
GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
|
||||
AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config])
|
||||
gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion`
|
||||
else
|
||||
gpg_error_config_version=`$GPG_ERROR_CONFIG --version`
|
||||
unset GPGRT_CONFIG
|
||||
fi
|
||||
elif test "$GPG_ERROR_CONFIG" != "no"; then
|
||||
gpg_error_config_version=`$GPG_ERROR_CONFIG --version`
|
||||
unset GPGRT_CONFIG
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([_AM_PATH_GPGME_CONFIG],[dnl
|
||||
AC_REQUIRE([_AM_PATH_GPGRT_CONFIG])dnl
|
||||
AC_ARG_WITH(gpgme-prefix,
|
||||
AS_HELP_STRING([--with-gpgme-prefix=PFX],
|
||||
[prefix where GPGME is installed (optional)]),
|
||||
gpgme_config_prefix="$withval", gpgme_config_prefix="")
|
||||
if test x"${GPGME_CONFIG}" = x ; then
|
||||
if test x"${gpgme_config_prefix}" != x ; then
|
||||
GPGME_CONFIG="${gpgme_config_prefix}/bin/gpgme-config"
|
||||
else
|
||||
case "${SYSROOT}" in
|
||||
/*)
|
||||
if test -x "${SYSROOT}/bin/gpgme-config" ; then
|
||||
GPGME_CONFIG="${SYSROOT}/bin/gpgme-config"
|
||||
fi
|
||||
;;
|
||||
'')
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
use_gpgrt_config=""
|
||||
if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
|
||||
if $GPGRT_CONFIG gpgme --exists; then
|
||||
GPGME_CONFIG="$GPGRT_CONFIG gpgme"
|
||||
AC_MSG_NOTICE([Use gpgrt-config as gpgme-config])
|
||||
use_gpgrt_config=yes
|
||||
fi
|
||||
fi
|
||||
if test -z "$use_gpgrt_config"; then
|
||||
AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
|
||||
fi
|
||||
|
||||
if test "$GPGME_CONFIG" != "no" ; then
|
||||
if test -z "$use_gpgrt_config"; then
|
||||
gpgme_version=`$GPGME_CONFIG --version`
|
||||
else
|
||||
gpgme_version=`$GPGME_CONFIG --modversion`
|
||||
fi
|
||||
fi
|
||||
gpgme_version_major=`echo $gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
|
||||
gpgme_version_minor=`echo $gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
|
||||
gpgme_version_micro=`echo $gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([_AM_PATH_GPGME_CONFIG_HOST_CHECK],
|
||||
[
|
||||
if test -z "$use_gpgrt_config"; then
|
||||
gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none`
|
||||
else
|
||||
gpgme_config_host=`$GPGME_CONFIG --variable=host 2>/dev/null || echo none`
|
||||
fi
|
||||
if test x"$gpgme_config_host" != xnone ; then
|
||||
if test x"$gpgme_config_host" != x"$host" ; then
|
||||
AC_MSG_WARN([[
|
||||
***
|
||||
*** The config script "$GPGME_CONFIG" was
|
||||
*** built for $gpgme_config_host and thus may not match the
|
||||
*** used host $host.
|
||||
*** You may want to use the configure option --with-gpgme-prefix
|
||||
*** to specify a matching config script or use \$SYSROOT.
|
||||
***]])
|
||||
gpg_config_script_warn="$gpg_config_script_warn gpgme"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl AM_PATH_GPGME([MINIMUM-VERSION,
|
||||
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
|
||||
dnl Test for libgpgme and define GPGME_CFLAGS and GPGME_LIBS.
|
||||
dnl
|
||||
dnl If a prefix option is not used, the config script is first
|
||||
dnl searched in $SYSROOT/bin and then along $PATH. If the used
|
||||
dnl config script does not match the host specification the script
|
||||
dnl is added to the gpg_config_script_warn variable.
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_GPGME],
|
||||
[ AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
|
||||
tmp=ifelse([$1], ,1:0.4.2,$1)
|
||||
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
|
||||
req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
|
||||
min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
|
||||
else
|
||||
req_gpgme_api=0
|
||||
min_gpgme_version="$tmp"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
|
||||
ok=no
|
||||
if test "$GPGME_CONFIG" != "no" ; then
|
||||
req_major=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
|
||||
req_minor=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
||||
req_micro=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
||||
if test "$gpgme_version_major" -gt "$req_major"; then
|
||||
ok=yes
|
||||
else
|
||||
if test "$gpgme_version_major" -eq "$req_major"; then
|
||||
if test "$gpgme_version_minor" -gt "$req_minor"; then
|
||||
ok=yes
|
||||
else
|
||||
if test "$gpgme_version_minor" -eq "$req_minor"; then
|
||||
if test "$gpgme_version_micro" -ge "$req_micro"; then
|
||||
ok=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $ok = yes; then
|
||||
# If we have a recent GPGME, we should also check that the
|
||||
# API is compatible.
|
||||
if test "$req_gpgme_api" -gt 0 ; then
|
||||
if test -z "$use_gpgrt_config"; then
|
||||
tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
|
||||
else
|
||||
tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0`
|
||||
fi
|
||||
if test "$tmp" -gt 0 ; then
|
||||
if test "$req_gpgme_api" -ne "$tmp" ; then
|
||||
ok=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $ok = yes; then
|
||||
GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
|
||||
GPGME_LIBS=`$GPGME_CONFIG --libs`
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
_AM_PATH_GPGME_CONFIG_HOST_CHECK
|
||||
else
|
||||
GPGME_CFLAGS=""
|
||||
GPGME_LIBS=""
|
||||
AC_MSG_RESULT(no)
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GPGME_CFLAGS)
|
||||
AC_SUBST(GPGME_LIBS)
|
||||
])
|
||||
|
||||
dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION,
|
||||
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
|
||||
dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS
|
||||
dnl and GPGME_PTHREAD_LIBS.
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_GPGME_PTHREAD],[
|
||||
AC_OBSOLETE([$0], [; use AM_PATH_GPGME instead to use GPGME_CFLAGS and GPGME_LIBS])dnl
|
||||
AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
|
||||
tmp=ifelse([$1], ,1:0.4.2,$1)
|
||||
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
|
||||
req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
|
||||
min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
|
||||
else
|
||||
req_gpgme_api=0
|
||||
min_gpgme_version="$tmp"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version)
|
||||
ok=no
|
||||
if test "$GPGME_CONFIG" != "no" ; then
|
||||
req_major=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
|
||||
req_minor=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
||||
req_micro=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
||||
if test "$gpgme_version_major" -gt "$req_major"; then
|
||||
ok=yes
|
||||
else
|
||||
if test "$gpgme_version_major" -eq "$req_major"; then
|
||||
if test "$gpgme_version_minor" -gt "$req_minor"; then
|
||||
ok=yes
|
||||
else
|
||||
if test "$gpgme_version_minor" -eq "$req_minor"; then
|
||||
if test "$gpgme_version_micro" -ge "$req_micro"; then
|
||||
ok=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $ok = yes; then
|
||||
# If we have a recent GPGME, we should also check that the
|
||||
# API is compatible.
|
||||
if test "$req_gpgme_api" -gt 0 ; then
|
||||
if test -z "$use_gpgrt_config"; then
|
||||
tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
|
||||
else
|
||||
tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0`
|
||||
fi
|
||||
if test "$tmp" -gt 0 ; then
|
||||
if test "$req_gpgme_api" -ne "$tmp" ; then
|
||||
ok=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $ok = yes; then
|
||||
GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --cflags`
|
||||
GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --libs`
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
_AM_PATH_GPGME_CONFIG_HOST_CHECK
|
||||
else
|
||||
GPGME_PTHREAD_CFLAGS=""
|
||||
GPGME_PTHREAD_LIBS=""
|
||||
AC_MSG_RESULT(no)
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GPGME_PTHREAD_CFLAGS)
|
||||
AC_SUBST(GPGME_PTHREAD_LIBS)
|
||||
])
|
||||
|
||||
|
||||
dnl AM_PATH_GPGME_GLIB([MINIMUM-VERSION,
|
||||
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
|
||||
dnl Test for libgpgme-glib and define GPGME_GLIB_CFLAGS and GPGME_GLIB_LIBS.
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_GPGME_GLIB],
|
||||
[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
|
||||
tmp=ifelse([$1], ,1:0.4.2,$1)
|
||||
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
|
||||
req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
|
||||
min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
|
||||
else
|
||||
req_gpgme_api=0
|
||||
min_gpgme_version="$tmp"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
|
||||
ok=no
|
||||
if test "$GPGME_CONFIG" != "no" ; then
|
||||
req_major=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
|
||||
req_minor=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
||||
req_micro=`echo $min_gpgme_version | \
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
||||
if test "$gpgme_version_major" -gt "$req_major"; then
|
||||
ok=yes
|
||||
else
|
||||
if test "$gpgme_version_major" -eq "$req_major"; then
|
||||
if test "$gpgme_version_minor" -gt "$req_minor"; then
|
||||
ok=yes
|
||||
else
|
||||
if test "$gpgme_version_minor" -eq "$req_minor"; then
|
||||
if test "$gpgme_version_micro" -ge "$req_micro"; then
|
||||
ok=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $ok = yes; then
|
||||
# If we have a recent GPGME, we should also check that the
|
||||
# API is compatible.
|
||||
if test "$req_gpgme_api" -gt 0 ; then
|
||||
if test -z "$use_gpgrt_config"; then
|
||||
tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
|
||||
else
|
||||
tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0`
|
||||
fi
|
||||
if test "$tmp" -gt 0 ; then
|
||||
if test "$req_gpgme_api" -ne "$tmp" ; then
|
||||
ok=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $ok = yes; then
|
||||
if test -z "$use_gpgrt_config"; then
|
||||
GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags`
|
||||
GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs`
|
||||
else
|
||||
if $GPGRT_CONFIG gpgme-glib --exists; then
|
||||
GPGME_CONFIG="$GPGRT_CONFIG gpgme-glib"
|
||||
GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --cflags`
|
||||
GPGME_GLIB_LIBS=`$GPGME_CONFIG --libs`
|
||||
else
|
||||
ok = no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $ok = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
_AM_PATH_GPGME_CONFIG_HOST_CHECK
|
||||
else
|
||||
GPGME_GLIB_CFLAGS=""
|
||||
GPGME_GLIB_LIBS=""
|
||||
AC_MSG_RESULT(no)
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GPGME_GLIB_CFLAGS)
|
||||
AC_SUBST(GPGME_GLIB_LIBS)
|
||||
])
|
8026
lang/cpp/m4/libtool.m4
vendored
8026
lang/cpp/m4/libtool.m4
vendored
File diff suppressed because it is too large
Load Diff
384
lang/cpp/m4/ltoptions.m4
vendored
384
lang/cpp/m4/ltoptions.m4
vendored
@ -1,384 +0,0 @@
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option `$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl `shared' nor `disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the `shared' and
|
||||
# `disable-shared' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the `static' and
|
||||
# `disable-static' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the `fast-install'
|
||||
# and `disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for lt_pkg in $withval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=default])
|
||||
|
||||
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
123
lang/cpp/m4/ltsugar.m4
vendored
123
lang/cpp/m4/ltsugar.m4
vendored
@ -1,123 +0,0 @@
|
||||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59 which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
23
lang/cpp/m4/ltversion.m4
vendored
23
lang/cpp/m4/ltversion.m4
vendored
@ -1,23 +0,0 @@
|
||||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 3337 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.2])
|
||||
m4_define([LT_PACKAGE_REVISION], [1.3337])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.2'
|
||||
macro_revision='1.3337'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
98
lang/cpp/m4/lt~obsolete.m4
vendored
98
lang/cpp/m4/lt~obsolete.m4
vendored
@ -1,98 +0,0 @@
|
||||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
@ -1,14 +1,14 @@
|
||||
# CMake Config file for GPGME++.
|
||||
# CMake Config file for GPGMEPP.
|
||||
# Copyright (C) 2016 Intevation GmbH
|
||||
#
|
||||
# This file is part of GPGME++.
|
||||
# This file is part of GPGMEPP.
|
||||
#
|
||||
# GPGME++ is free software; you can redistribute it and/or modify it
|
||||
# GPGME-CL is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GPGME++ is distributed in the hope that it will be useful,
|
||||
# GPGME-CL is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
@ -64,7 +64,7 @@ add_library(Gpgmepp SHARED IMPORTED)
|
||||
set_target_properties(Gpgmepp PROPERTIES
|
||||
IMPORTED_IMPLIB "@resolved_libdir@/libgpgmepp.dll.a"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/gpgme++;@resolved_includedir@"
|
||||
INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme.dll.a"
|
||||
INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme.dll.a;@LIBASSUAN_LIBS@"
|
||||
IMPORTED_LOCATION "@resolved_bindir@/libgpgmepp-6.dll"
|
||||
)
|
||||
list(APPEND _IMPORT_CHECK_TARGETS Gpgmepp )
|
||||
|
@ -1,14 +1,14 @@
|
||||
# CMake Config file for GPGME++.
|
||||
# CMake Config file for GPGMEPP.
|
||||
# Copyright (C) 2016 Intevation GmbH
|
||||
#
|
||||
# This file is part of GPGME++.
|
||||
# This file is part of GPGMEPP.
|
||||
#
|
||||
# GPGME++ is free software; you can redistribute it and/or modify it
|
||||
# GPGME-CL is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GPGME++ is distributed in the hope that it will be useful,
|
||||
# GPGME-CL is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
@ -63,7 +63,7 @@ add_library(Gpgmepp SHARED IMPORTED)
|
||||
|
||||
set_target_properties(Gpgmepp PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/gpgme++;@resolved_includedir@"
|
||||
INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme@libsuffix@"
|
||||
INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme@libsuffix@;@LIBASSUAN_LIBS@"
|
||||
IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp@libsuffix@"
|
||||
)
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
# CMake Version file for GPGME++.
|
||||
# CMake Version file for GPGMEPP.
|
||||
# Copyright (C) 2016 Intevation GmbH
|
||||
#
|
||||
# This file is part of GPGME++.
|
||||
# This file is part of GPGMEPP.
|
||||
#
|
||||
# GPGME++ is free software; you can redistribute it and/or modify it
|
||||
# GPGME-CL is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GPGME++ is distributed in the hope that it will be useful,
|
||||
# GPGME-CL is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
|
@ -1,15 +1,15 @@
|
||||
# Makefile.am for GPGME++.
|
||||
# Makefile.am for GPGMEPP.
|
||||
# Copyright (C) 2016 Bundesamt für Sicherheit in der Informationstechnik
|
||||
# Software engineering by Intevation GmbH
|
||||
#
|
||||
# This file is part of GPGME++.
|
||||
# This file is part of GPGMEPP.
|
||||
#
|
||||
# GPGME++ is free software; you can redistribute it and/or modify it
|
||||
# GPGME-CL is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GPGME++ is distributed in the hope that it will be useful,
|
||||
# GPGME-CL is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
@ -19,12 +19,8 @@
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = gpgmepp.pc
|
||||
|
||||
EXTRA_DIST = GpgmeppConfig.cmake.in.in GpgmeppConfigVersion.cmake.in \
|
||||
gpgmepp_version.h.in GpgmeppConfig-w32.cmake.in.in \
|
||||
gpgmepp.pc.in
|
||||
gpgmepp_version.h.in GpgmeppConfig-w32.cmake.in.in
|
||||
|
||||
lib_LTLIBRARIES = libgpgmepp.la
|
||||
|
||||
@ -77,12 +73,12 @@ nodist_gpgmeppinclude_HEADERS = gpgmepp_version.h
|
||||
libgpgmepp_la_SOURCES = $(main_sources) $(gpgmepp_headers) context_vanilla.cpp \
|
||||
$(interface_headers) $(private_gpgmepp_headers)
|
||||
|
||||
AM_CPPFLAGS = @GPGME_CFLAGS@ \
|
||||
@GPGMEPP_CFLAGS@ @GPG_ERROR_CFLAGS@ \
|
||||
AM_CPPFLAGS = -I$(top_builddir)/src \
|
||||
@GPGME_CPP_CFLAGS@ @GPG_ERROR_CFLAGS@ @LIBASSUAN_CFLAGS@ \
|
||||
-DBUILDING_GPGMEPP -Wsuggest-override \
|
||||
-Wzero-as-null-pointer-constant
|
||||
|
||||
libgpgmepp_la_LIBADD = @GPGME_LIBS@
|
||||
libgpgmepp_la_LIBADD = ../../../src/libgpgme.la @LIBASSUAN_LIBS@
|
||||
libgpgmepp_la_LDFLAGS = -no-undefined -version-info \
|
||||
@LIBGPGMEPP_LT_CURRENT@:@LIBGPGMEPP_LT_REVISION@:@LIBGPGMEPP_LT_AGE@
|
||||
|
||||
@ -96,7 +92,7 @@ copied_headers = $(gpgmepp_headers:%=gpgme++/%) $(interface_headers:%=gpgme++/%)
|
||||
|
||||
$(copied_headers): Makefile.am
|
||||
mkdir -p $(builddir)/gpgme++/interfaces
|
||||
echo -n "#include \"$(srcdir)" > "$@"
|
||||
echo -n "#include \"$(abs_srcdir)" > "$@"
|
||||
echo -n "$@" | sed "s/gpgme++//" >> "$@"
|
||||
echo "\"" >> "$@"
|
||||
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "callbacks.h"
|
||||
#include "util.h"
|
||||
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "configuration.h"
|
||||
#include "error.h"
|
||||
#include "util.h"
|
||||
|
@ -21,6 +21,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <context.h>
|
||||
#include <eventloopinteractor.h>
|
||||
#include <trustitem.h>
|
||||
@ -126,6 +130,13 @@ const char *Error::asString() const
|
||||
return mMessage.c_str();
|
||||
}
|
||||
|
||||
std::string Error::asStdString() const
|
||||
{
|
||||
std::string message;
|
||||
format_error(static_cast<gpgme_error_t>(mErr), message);
|
||||
return message;
|
||||
}
|
||||
|
||||
int Error::code() const
|
||||
{
|
||||
return gpgme_err_code(mErr);
|
||||
@ -184,7 +195,7 @@ Error Error::fromCode(unsigned int err, unsigned int src)
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const Error &err)
|
||||
{
|
||||
return os << "GpgME::Error(" << err.encodedError() << " (" << err.asString() << "))";
|
||||
return os << "GpgME::Error(" << err.encodedError() << " (" << err.asStdString() << "))";
|
||||
}
|
||||
|
||||
Context::KeyListModeSaver::KeyListModeSaver(Context *ctx)
|
||||
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
context_glib.cpp - wraps a gpgme key context, gpgme-glib-specific functions
|
||||
Copyright (C) 2007 Klarälvdalens Datakonsult AB
|
||||
2016 Bundesamt für Sicherheit in der Informationstechnik
|
||||
Software engineering by Intevation GmbH
|
||||
|
||||
This file is part of GPGME++.
|
||||
|
||||
GPGME++ is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
GPGME++ is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with GPGME++; see the file COPYING.LIB. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <global.h>
|
||||
|
||||
extern "C" GIOChannel *gpgme_get_fdptr(int);
|
||||
|
||||
GIOChannel *GpgME::getGIOChannel(int fd)
|
||||
{
|
||||
return gpgme_get_fdptr(fd);
|
||||
}
|
||||
|
||||
QIODevice *GpgME::getQIODevice(int fd)
|
||||
{
|
||||
return 0;
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
context_qt.cpp - wraps a gpgme key context, gpgme-qt-specific functions
|
||||
Copyright (C) 2007 Klarälvdalens Datakonsult AB
|
||||
2016 Bundesamt für Sicherheit in der Informationstechnik
|
||||
Software engineering by Intevation GmbH
|
||||
|
||||
This file is part of GPGME++.
|
||||
|
||||
GPGME++ is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
GPGME++ is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with GPGME++; see the file COPYING.LIB. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <global.h>
|
||||
|
||||
extern "C" QIODevice *gpgme_get_fdptr(int);
|
||||
|
||||
GIOChannel *GpgME::getGIOChannel(int)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
QIODevice *GpgME::getQIODevice(int fd)
|
||||
{
|
||||
return gpgme_get_fdptr(fd);
|
||||
}
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <global.h>
|
||||
|
||||
GIOChannel *GpgME::getGIOChannel(int)
|
||||
|
@ -20,6 +20,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "data_p.h"
|
||||
#include "context_p.h"
|
||||
#include <error.h>
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <decryptionresult.h>
|
||||
#include "result_p.h"
|
||||
#include "util.h"
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "defaultassuantransaction.h"
|
||||
#include "error.h"
|
||||
#include "data.h"
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "editinteractor.h"
|
||||
#include "callbacks.h"
|
||||
#include "error.h"
|
||||
@ -134,7 +138,7 @@ public:
|
||||
if (writeAll(fd, result, len) != len) {
|
||||
err = Error::fromSystemError();
|
||||
if (ei->debug) {
|
||||
std::fprintf(ei->debug, "EditInteractor: Could not write to fd %d (%s)\n", fd, err.asString());
|
||||
std::fprintf(ei->debug, "EditInteractor: Could not write to fd %d (%s)\n", fd, err.asStdString().c_str());
|
||||
}
|
||||
goto error;
|
||||
}
|
||||
@ -143,7 +147,7 @@ public:
|
||||
if (writeAll(fd, "\n", 1) != 1) {
|
||||
err = Error::fromSystemError();
|
||||
if (ei->debug) {
|
||||
std::fprintf(ei->debug, "EditInteractor: Could not write to fd %d (%s)\n", fd, err.asString());
|
||||
std::fprintf(ei->debug, "EditInteractor: Could not write to fd %d (%s)\n", fd, err.asStdString().c_str());
|
||||
}
|
||||
goto error;
|
||||
}
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <encryptionresult.h>
|
||||
#include "result_p.h"
|
||||
#include "util.h"
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "engineinfo.h"
|
||||
|
||||
#include <gpgme.h>
|
||||
|
@ -47,7 +47,11 @@ public:
|
||||
explicit Error(unsigned int e) : mErr(e), mMessage() {}
|
||||
|
||||
const char *source() const;
|
||||
const char *asString() const;
|
||||
/* This function is deprecated. Use asStdString() instead. asString() may
|
||||
* return wrongly encoded (i.e. not UTF-8) results on Windows for the main
|
||||
* thread if the function was first called from a secondary thread. */
|
||||
GPGMEPP_DEPRECATED const char *asString() const;
|
||||
std::string asStdString() const;
|
||||
|
||||
int code() const;
|
||||
int sourceID() const;
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <eventloopinteractor.h>
|
||||
|
||||
#include <context.h>
|
||||
|
@ -23,6 +23,10 @@
|
||||
*/
|
||||
|
||||
// -*- c++ -*-
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "exception.h"
|
||||
|
||||
#include <gpgme.h>
|
||||
|
@ -21,6 +21,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "gpgaddexistingsubkeyeditinteractor.h"
|
||||
|
||||
#include "error.h"
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "gpgadduserideditinteractor.h"
|
||||
|
||||
#include "error.h"
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "gpgagentgetinfoassuantransaction.h"
|
||||
#include "error.h"
|
||||
#include "data.h"
|
||||
|
@ -21,6 +21,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "gpggencardkeyinteractor.h"
|
||||
|
||||
#include "error.h"
|
||||
|
@ -1,13 +0,0 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
includedir=@includedir@
|
||||
libdir=@libdir@
|
||||
host=@GPGMEPP_PKGCONFIG_HOST@
|
||||
|
||||
Name: gpgmepp
|
||||
Description: GnuPG Made Easy (C++ binding)
|
||||
Requires.private: gpg-error, gpgme
|
||||
Version: @PACKAGE_VERSION@
|
||||
Cflags: @GPGMEPP_PKGCONFIG_CFLAGS@
|
||||
Libs: @GPGMEPP_PKGCONFIG_LIBS@
|
||||
URL: https://www.gnupg.org/software/gpgme/index.html
|
@ -21,6 +21,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "gpgrevokekeyeditinteractor.h"
|
||||
|
||||
#include "error.h"
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "gpgsetexpirytimeeditinteractor.h"
|
||||
#include "error.h"
|
||||
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "gpgsetownertrusteditinteractor.h"
|
||||
#include "error.h"
|
||||
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "gpgsignkeyeditinteractor.h"
|
||||
#include "error.h"
|
||||
#include "key.h"
|
||||
|
@ -22,6 +22,11 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <importresult.h>
|
||||
#include "result_p.h"
|
||||
|
||||
|
@ -20,6 +20,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <key.h>
|
||||
|
||||
#include "util.h"
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <keygenerationresult.h>
|
||||
#include "result_p.h"
|
||||
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <keylistresult.h>
|
||||
#include "result_p.h"
|
||||
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "scdgetinfoassuantransaction.h"
|
||||
#include "error.h"
|
||||
#include "data.h"
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <signingresult.h>
|
||||
#include "result_p.h"
|
||||
#include "util.h"
|
||||
|
@ -21,6 +21,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "statusconsumerassuantransaction.h"
|
||||
|
||||
#include "data.h"
|
||||
|
@ -20,6 +20,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "swdbresult.h"
|
||||
|
||||
#include <istream>
|
||||
|
@ -20,6 +20,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "tofuinfo.h"
|
||||
|
||||
#include <istream>
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <trustitem.h>
|
||||
|
||||
#include <gpgme.h>
|
||||
|
@ -21,6 +21,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "util.h"
|
||||
|
||||
#include <functional>
|
||||
|
@ -22,6 +22,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <verificationresult.h>
|
||||
#include <notation.h>
|
||||
#include "result_p.h"
|
||||
|
@ -23,6 +23,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <vfsmountresult.h>
|
||||
#include "result_p.h"
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
# Makefile.am - Makefile for GPGME++ tests.
|
||||
# Makefile.am - Makefile for GPGME Cpp tests.
|
||||
# Copyright (C) 2018 Intevation GmbH
|
||||
#
|
||||
# This file is part of GPGME++.
|
||||
# This file is part of GPGME.
|
||||
#
|
||||
# GPGME++ is free software; you can redistribute it and/or modify it
|
||||
# GPGME is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as
|
||||
# published by the Free Software Foundation; either version 2.1 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# GPGME++ is distributed in the hope that it will be useful, but WITHOUT
|
||||
# GPGME is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||
# Public License for more details.
|
||||
@ -20,13 +20,14 @@
|
||||
|
||||
AM_LDFLAGS = -no-install
|
||||
|
||||
LDADD = ../src/libgpgmepp.la \
|
||||
@GPGME_LIBS@ @GPG_ERROR_LIBS@ \
|
||||
LDADD = ../../cpp/src/libgpgmepp.la \
|
||||
../../../src/libgpgme.la @GPG_ERROR_LIBS@ \
|
||||
@LDADD_FOR_TESTS_KLUDGE@ -lstdc++
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src @GPGME_CFLAGS@ \
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \
|
||||
@GPG_ERROR_CFLAGS@ @GPG_ERROR_CFLAGS@ \
|
||||
-DBUILDING_GPGMEPP
|
||||
@LIBASSUAN_CFLAGS@ -DBUILDING_GPGMEPP \
|
||||
-DTOP_SRCDIR="$(top_srcdir)"
|
||||
|
||||
run_getkey_SOURCES = run-getkey.cpp
|
||||
run_keylist_SOURCES = run-keylist.cpp
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*
|
||||
run-getkey.cpp
|
||||
|
||||
This file is part of GPGME++'s test suite.
|
||||
This file is part of GpgMEpp's test suite.
|
||||
Copyright (c) 2018 Intevation GmbH
|
||||
|
||||
GPGME++ is free software; you can redistribute it and/or
|
||||
QGpgME is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
GPGME++ is distributed in the hope that it will be useful,
|
||||
QGpgME is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
@ -29,6 +29,10 @@
|
||||
your version.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "context.h"
|
||||
#include "key.h"
|
||||
|
||||
@ -146,7 +150,7 @@ main (int argc, char **argv)
|
||||
const GpgME::Key key = ctx->key (*argv, err, only_secret);
|
||||
std::stringstream ss;
|
||||
|
||||
ss << "Key " << key << " Err: " << err.asString() << "\n";
|
||||
ss << "Key " << key << " Err: " << err.asStdString() << "\n";
|
||||
|
||||
std::cout << ss.str();
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*
|
||||
run-keylist.cpp
|
||||
|
||||
This file is part of GPGME++'s test suite.
|
||||
This file is part of GpgMEpp's test suite.
|
||||
Copyright (c) 2018 Intevation GmbH
|
||||
|
||||
GPGME++ is free software; you can redistribute it and/or
|
||||
QGpgME is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
GPGME++ is distributed in the hope that it will be useful,
|
||||
QGpgME is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
@ -29,6 +29,10 @@
|
||||
your version.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "context.h"
|
||||
#include "key.h"
|
||||
#include "keylistresult.h"
|
||||
@ -149,7 +153,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
Error err = ctx->startKeyListing (*argv, only_secret);
|
||||
if (err) {
|
||||
std::cout << "Error: " << err.asString() << "\n";
|
||||
std::cout << "Error: " << err.asStdString() << "\n";
|
||||
return -1;
|
||||
}
|
||||
GpgME::Key key;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*
|
||||
run-keylist.cpp
|
||||
|
||||
This file is part of GPGME++'s test suite.
|
||||
This file is part of GpgMEpp's test suite.
|
||||
Copyright (c) 2018 Intevation GmbH
|
||||
|
||||
GPGME++ is free software; you can redistribute it and/or
|
||||
QGpgME is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
GPGME++ is distributed in the hope that it will be useful,
|
||||
QGpgME is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
@ -28,6 +28,9 @@
|
||||
you do not wish to do so, delete this exception statement from
|
||||
your version.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "context.h"
|
||||
#include "key.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
run-wkdlookup.cpp
|
||||
|
||||
This file is part of GPGME++'s test suite.
|
||||
This file is part of GpgMEpp's test suite.
|
||||
Copyright (c) 2021 g10 Code GmbH
|
||||
Software engineering by Ingo Klöcker <dev@ingo-kloecker.de>
|
||||
|
||||
@ -21,6 +21,10 @@
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "context.h"
|
||||
#include "data.h"
|
||||
#include "defaultassuantransaction.h"
|
||||
@ -71,31 +75,31 @@ main (int argc, char **argv)
|
||||
Error err;
|
||||
auto ctx = std::unique_ptr<Context>{Context::createForEngine(AssuanEngine, &err)};
|
||||
if (!ctx) {
|
||||
std::cerr << "Failed to get context (Error: " << err.asString() << ")\n";
|
||||
std::cerr << "Failed to get context (Error: " << err.asStdString() << ")\n";
|
||||
return -1;
|
||||
}
|
||||
|
||||
const std::string dirmngrSocket = GpgME::dirInfo("dirmngr-socket");
|
||||
if ((err = ctx->setEngineFileName(dirmngrSocket.c_str()))) {
|
||||
std::cerr << "Failed to set engine file name (Error: " << err.asString() << ")\n";
|
||||
std::cerr << "Failed to set engine file name (Error: " << err.asStdString() << ")\n";
|
||||
return -1;
|
||||
}
|
||||
if ((err = ctx->setEngineHomeDirectory(""))) {
|
||||
std::cerr << "Failed to set engine home directory (Error: " << err.asString() << ")\n";
|
||||
std::cerr << "Failed to set engine home directory (Error: " << err.asStdString() << ")\n";
|
||||
return -1;
|
||||
}
|
||||
|
||||
// try to connect to dirmngr
|
||||
err = ctx->assuanTransact("GETINFO version");
|
||||
if (err && err.code() != GPG_ERR_ASS_CONNECT_FAILED) {
|
||||
std::cerr << "Failed to start assuan transaction (Error: " << err.asString() << ")\n";
|
||||
std::cerr << "Failed to start assuan transaction (Error: " << err.asStdString() << ")\n";
|
||||
return -1;
|
||||
}
|
||||
if (err.code() == GPG_ERR_ASS_CONNECT_FAILED) {
|
||||
std::cerr << "Starting dirmngr ...\n";
|
||||
auto spawnCtx = std::unique_ptr<Context>{Context::createForEngine(SpawnEngine, &err)};
|
||||
if (!spawnCtx) {
|
||||
std::cerr << "Failed to get context for spawn engine (Error: " << err.asString() << ")\n";
|
||||
std::cerr << "Failed to get context for spawn engine (Error: " << err.asStdString() << ")\n";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -116,7 +120,7 @@ main (int argc, char **argv)
|
||||
ignoreIO, ignoreIO, ignoreIO,
|
||||
Context::SpawnDetached);
|
||||
if (err) {
|
||||
std::cerr << "Failed to start dirmngr (Error: " << err.asString() << ")\n";
|
||||
std::cerr << "Failed to start dirmngr (Error: " << err.asStdString() << ")\n";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -133,7 +137,7 @@ main (int argc, char **argv)
|
||||
const auto cmd = std::string{"WKD_GET "} + email;
|
||||
err = ctx->assuanTransact(cmd.c_str());
|
||||
if (err && err.code() != GPG_ERR_NO_NAME && err.code() != GPG_ERR_NO_DATA) {
|
||||
std::cerr << "Error: WKD_GET returned " << err.asString() << "\n";
|
||||
std::cerr << "Error: WKD_GET returned " << err.asStdString() << "\n";
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
10
lang/python/.gitignore
vendored
10
lang/python/.gitignore
vendored
@ -1,10 +0,0 @@
|
||||
# GnuPG exclusions
|
||||
/aclocal.m4
|
||||
/autom4te.cache
|
||||
/configure
|
||||
/config.h.in
|
||||
/VERSION
|
||||
Makefile.in
|
||||
|
||||
# Hidden files
|
||||
*~
|
@ -1,54 +0,0 @@
|
||||
Package: gpg-py
|
||||
Homepage: https://gnupg.org/software/gpgme/
|
||||
Download: https://gnupg.org/ftp/gcrypt/gpgme/
|
||||
Repository: git://git.gnupg.org/gpgme.git
|
||||
Maintainer: Werner Koch <wk@gnupg.org>
|
||||
Bug reports: https://bugs.gnupg.org
|
||||
Security related bug reports: security@gnupg.org
|
||||
License (software): LGPL-2.1-or-later
|
||||
License (examples, tests): GPL-2.0-or-later
|
||||
|
||||
|
||||
GPGME is free software. See the files COPYING.LESSER and COPYING for
|
||||
copying conditions. License copyright years may be listed using range
|
||||
notation, e.g., 2000-2013, indicating that every year in the range,
|
||||
inclusive, is a copyrightable year that would otherwise be listed
|
||||
individually.
|
||||
|
||||
|
||||
List of Copyright holders
|
||||
=========================
|
||||
|
||||
Copyright (C) 1985, 1986, 1988, 1990-2022 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000 Werner Koch
|
||||
Copyright (C) 2001-2022, 2024 g10 Code GmbH
|
||||
Copyright (C) 2004-2008 Igor Belyi
|
||||
Copyright (C) 2002 John Goerzen
|
||||
Copyright (C) 2008 Bernhard Reiter
|
||||
Copyright (C) 2014, 2015 Martin Albrecht
|
||||
Copyright (C) 2015, 2018, 2019 Ben McGinnes
|
||||
Copyright (C) 2016 Tobias Mueller
|
||||
|
||||
|
||||
Authors with a DCO
|
||||
==================
|
||||
|
||||
Daniel Kahn Gillmor <dkg@fifthhorseman.net>
|
||||
2014-09-24:878ul9w4j8.fsf@alice.fifthhorseman.net:
|
||||
|
||||
Tobias Mueller <muelli@cryptobitch.de>
|
||||
2016-11-23:1479937342.11180.3.camel@cryptobitch.de:
|
||||
|
||||
Ben McGinnes <ben@adversary.org>
|
||||
2017-12-16:20171216002102.l6aejk5xdp6xhtfi@adversary.org:
|
||||
|
||||
|
||||
Copyright 2001, 2002, 2012, 2013 g10 Code GmbH
|
||||
|
||||
This file is free software; as a special exception the author gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
modifications, as long as this notice is preserved.
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
@ -1,340 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
@ -1,508 +0,0 @@
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations
|
||||
below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
^L
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it
|
||||
becomes a de-facto standard. To achieve this, non-free programs must
|
||||
be allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
^L
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control
|
||||
compilation and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
^L
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
^L
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at least
|
||||
three years, to give the same user the materials specified in
|
||||
Subsection 6a, above, for a charge no more than the cost of
|
||||
performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
^L
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
^L
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply, and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License
|
||||
may add an explicit geographical distribution limitation excluding those
|
||||
countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
^L
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
^L
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms
|
||||
of the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library.
|
||||
It is safest to attach them to the start of each source file to most
|
||||
effectively convey the exclusion of warranty; and each file should
|
||||
have at least the "copyright" line and a pointer to where the full
|
||||
notice is found.
|
||||
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
your school, if any, to sign a "copyright disclaimer" for the library,
|
||||
if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James
|
||||
Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
@ -1,17 +0,0 @@
|
||||
No ChangeLog file
|
||||
=================
|
||||
|
||||
Do not modify the ChangeLog file of the Python bindings of GpgME. We
|
||||
put change information only in the GIT commit log, and generate a
|
||||
top-level ChangeLog file from logs at "make dist" time.
|
||||
As such, there are strict requirements on the form of the commit log
|
||||
messages. See doc/HACKING (of gpgme) for details.
|
||||
|
||||
Change information before the Python bindings were added to gpgme
|
||||
can be found in doc/meta/old-commits.log.
|
||||
|
||||
|
||||
Local Variables:
|
||||
buffer-read-only: t
|
||||
mode: text
|
||||
End:
|
@ -1,236 +0,0 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
6. Often, you can also type `make uninstall' to remove the installed
|
||||
files again.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
@ -1,4 +1,4 @@
|
||||
# Makefile.am for the Python bindings of GPGME.
|
||||
# Makefile.am for the Python bindings.
|
||||
# Copyright (C) 2016 g10 Code GmbH
|
||||
#
|
||||
# This file is part of GPGME.
|
||||
@ -17,24 +17,9 @@
|
||||
# License along with this program; if not, see <https://gnu.org/licenses/>.
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# Location of the released tarball archives. This is prefixed by
|
||||
# the variable RELEASE_ARCHIVE in ~/.gnupg-autogen.rc. For example:
|
||||
# RELEASE_ARCHIVE=user@host:archive/tarballs
|
||||
RELEASE_ARCHIVE_SUFFIX = gpgme
|
||||
# The variable RELEASE_SIGNKEY in ~/.gnupg-autogen.rc is used
|
||||
# to specify the key for signing. For example:
|
||||
# RELEASE_SIGNKEY=D8692123C4065DEA5E0F3AB5249B39D24F25E3B6
|
||||
|
||||
|
||||
# Autoconf flags
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = \
|
||||
README \
|
||||
MANIFEST.in \
|
||||
autogen.sh autogen.rc \
|
||||
gpgme.i \
|
||||
helpers.c helpers.h private.h
|
||||
|
||||
@ -52,6 +37,8 @@ prepare: copystamp
|
||||
# For VPATH builds we need to copy some files because Python's
|
||||
# distutils are not VPATH-aware.
|
||||
copystamp:
|
||||
ln -sf "$(top_srcdir)/src/data.h" .
|
||||
ln -sf "$(top_builddir)/conf/config.h" .
|
||||
ln -sf "$(srcdir)/src" gpg
|
||||
touch $@
|
||||
|
||||
@ -84,6 +71,8 @@ upload: python$(PYTHON_VERSION)-gpg-dist/gpg-$(VERSION).tar.gz \
|
||||
twine upload $^
|
||||
|
||||
CLEANFILES = copystamp \
|
||||
config.h \
|
||||
data.h \
|
||||
gpg
|
||||
|
||||
# Remove the rest.
|
||||
@ -121,90 +110,3 @@ uninstall-local:
|
||||
"$(DESTDIR)$${PLATLIB}"/gpg-$$GV-py*.egg-info \
|
||||
"$(DESTDIR)$${PLATLIB}"/gpg-$$normalizedGV-py*.egg ; \
|
||||
done
|
||||
|
||||
dist-hook: gen-ChangeLog
|
||||
|
||||
distcheck-hook:
|
||||
set -e; ( \
|
||||
pref="#+macro: gpg-py_" ;\
|
||||
reldate="$$(date -u +%Y-%m-%d)" ;\
|
||||
echo "$${pref}ver $(PACKAGE_VERSION)" ;\
|
||||
echo "$${pref}date $${reldate}" ;\
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do \
|
||||
case "$$i" in *.tar.bz2) \
|
||||
echo "$${pref}size $$(wc -c <$$i|awk '{print int($$1/1024)}')k" ;\
|
||||
echo "$${pref}sha1 $$(sha1sum <$$i|cut -d' ' -f1)" ;\
|
||||
echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\
|
||||
esac;\
|
||||
done ) | tee $(distdir).swdb
|
||||
|
||||
gen_start_date = 2011-12-01T00:00:00
|
||||
gen-ChangeLog:
|
||||
if test -d $(top_srcdir)/.git; then \
|
||||
(cd $(top_srcdir) && \
|
||||
$(GITLOG_TO_CHANGELOG) --append-dot --tear-off \
|
||||
--amend=build-aux/git-log-fix \
|
||||
--since=$(gen_start_date) ) > $(distdir)/cl-t; \
|
||||
cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
|
||||
rm -f $(distdir)/ChangeLog; \
|
||||
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
|
||||
fi
|
||||
|
||||
|
||||
# Macro to help the release target.
|
||||
RELEASE_NAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
|
||||
|
||||
release:
|
||||
+(set -e;\
|
||||
if [ "$(abs_top_builddir)" = "$(abs_top_srcdir)" ]; then \
|
||||
echo "error: build directory must not be the source directory" >&2;\
|
||||
exit 2;\
|
||||
fi ;\
|
||||
echo "/* Build started at $$(date -uIseconds) */" ;\
|
||||
cd $(top_srcdir); \
|
||||
./autogen.sh --force; \
|
||||
cd $(abs_top_builddir); \
|
||||
rm -rf dist; mkdir dist ; cd dist ; \
|
||||
$(abs_top_srcdir)/configure --enable-maintainer-mode; \
|
||||
$(MAKE) distcheck; \
|
||||
echo "/* Build finished at $$(date -uIseconds) */" ;\
|
||||
echo "/*" ;\
|
||||
echo " * Please run the final step interactively:" ;\
|
||||
echo " * make sign-release" ;\
|
||||
echo " */" ;\
|
||||
) 2>&1 | tee "$(RELEASE_NAME).buildlog"
|
||||
|
||||
sign-release:
|
||||
+(set -e; \
|
||||
test $$(pwd | sed 's,.*/,,') = dist || cd dist; \
|
||||
x=$$(grep '^RELEASE_ARCHIVE=' $$HOME/.gnupg-autogen.rc|cut -d= -f2);\
|
||||
if [ -z "$$x" ]; then \
|
||||
echo "error: RELEASE_ARCHIVE missing in ~/.gnupg-autogen.rc">&2; \
|
||||
exit 2;\
|
||||
fi;\
|
||||
myarchive="$$x/$(RELEASE_ARCHIVE_SUFFIX)";\
|
||||
x=$$(grep '^RELEASE_SIGNKEY=' $$HOME/.gnupg-autogen.rc|cut -d= -f2);\
|
||||
if [ -z "$$x" ]; then \
|
||||
echo "error: RELEASE_SIGNKEY missing in ~/.gnupg-autogen.rc">&2; \
|
||||
exit 2;\
|
||||
fi;\
|
||||
mysignkey="$$x";\
|
||||
files1="$(RELEASE_NAME).tar.bz2" ;\
|
||||
files2="$(RELEASE_NAME).tar.bz2.sig \
|
||||
$(RELEASE_NAME).swdb \
|
||||
$(RELEASE_NAME).buildlog" ;\
|
||||
echo "/* Signing the source tarball ..." ;\
|
||||
gpg -sbu $$mysignkey $(RELEASE_NAME).tar.bz2 ;\
|
||||
cat $(RELEASE_NAME).swdb >swdb.snippet;\
|
||||
echo >>swdb.snippet ;\
|
||||
sha1sum $${files1} >>swdb.snippet ;\
|
||||
cat "../$(RELEASE_NAME).buildlog" swdb.snippet \
|
||||
| gzip >$(RELEASE_NAME).buildlog ;\
|
||||
echo "Copying to local archive ..." ;\
|
||||
scp -p $${files1} $${files2} $$myarchive/ || true;\
|
||||
echo "Uploading documentation ..." ;\
|
||||
$(MAKE) -C doc online; \
|
||||
echo '/*' ;\
|
||||
echo ' * All done; for checksums see dist/swdb.snippet' ;\
|
||||
echo ' */' ;\
|
||||
)
|
||||
|
@ -1,19 +0,0 @@
|
||||
Noteworthy changes in version 1.25.0 (unreleased)
|
||||
-------------------------------------------------
|
||||
|
||||
* First separate release of gpg-py.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.24.x and earlier can be found in the
|
||||
NEWS file of gpgme.
|
||||
|
||||
|
||||
Copyright 2024 g10 Code GmbH
|
||||
|
||||
This file is free software; as a special exception the author gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
modifications, as long as this notice is preserved.
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
@ -1,5 +0,0 @@
|
||||
# autogen.sh configuration for Python bindings of GPGME -*- sh -*-
|
||||
|
||||
package_subdir="lang/python"
|
||||
|
||||
final_info="mkdir build && cd build && ../configure --enable-maintainer-mode && make"
|
@ -1,527 +0,0 @@
|
||||
#! /bin/sh
|
||||
# autogen.sh
|
||||
# Copyright (C) 2003, 2014, 2017, 2018, 2022, 2024 g10 Code GmbH
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# This is a generic script to create the configure script and handle cross
|
||||
# build environments. It requires the presence of a autogen.rc file to
|
||||
# configure it for the respective package. It is maintained as part of
|
||||
# GnuPG and source copied by other packages.
|
||||
#
|
||||
# Version: 2024-05-24
|
||||
|
||||
configure_ac="configure.ac"
|
||||
|
||||
cvtver () {
|
||||
awk 'NR==1 {split($NF,A,".");X=1000000*A[1]+1000*A[2]+A[3];print X;exit 0}'
|
||||
}
|
||||
|
||||
check_version () {
|
||||
if [ $(( `("$1" --version || echo "0") | cvtver` >= $2 )) = 1 ]; then
|
||||
return 0
|
||||
fi
|
||||
echo "**Error**: "\`$1\'" not installed or too old." >&2
|
||||
echo ' Version '$3' or newer is required.' >&2
|
||||
[ -n "$4" ] && echo ' Note that this is part of '\`$4\''.' >&2
|
||||
DIE="yes"
|
||||
return 1
|
||||
}
|
||||
|
||||
fatal () {
|
||||
echo "autogen.sh:" "$*" >&2
|
||||
DIE=yes
|
||||
}
|
||||
|
||||
info () {
|
||||
if [ -z "${SILENT}" ]; then
|
||||
echo "autogen.sh:" "$*" >&2
|
||||
fi
|
||||
}
|
||||
|
||||
die_p () {
|
||||
if [ "$DIE" = "yes" ]; then
|
||||
echo "autogen.sh: Stop." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
replace_sysroot () {
|
||||
configure_opts=$(echo $configure_opts | sed "s#@SYSROOT@#${w32root}#g")
|
||||
extraoptions=$(echo $extraoptions | sed "s#@SYSROOT@#${w32root}#g")
|
||||
}
|
||||
|
||||
# Allow to override the default tool names
|
||||
AUTOCONF=${AUTOCONF_PREFIX}${AUTOCONF:-autoconf}${AUTOCONF_SUFFIX}
|
||||
AUTOHEADER=${AUTOCONF_PREFIX}${AUTOHEADER:-autoheader}${AUTOCONF_SUFFIX}
|
||||
|
||||
AUTOMAKE=${AUTOMAKE_PREFIX}${AUTOMAKE:-automake}${AUTOMAKE_SUFFIX}
|
||||
ACLOCAL=${AUTOMAKE_PREFIX}${ACLOCAL:-aclocal}${AUTOMAKE_SUFFIX}
|
||||
|
||||
GETTEXT=${GETTEXT_PREFIX}${GETTEXT:-gettext}${GETTEXT_SUFFIX}
|
||||
MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX}
|
||||
|
||||
DIE=no
|
||||
FORCE=
|
||||
SILENT=
|
||||
PRINT_HOST=no
|
||||
PRINT_BUILD=no
|
||||
IS_GIT_CLONE=no
|
||||
tmp=$(dirname "$0")
|
||||
tsdir=$(cd "${tmp}"; pwd)
|
||||
|
||||
if [ -n "${AUTOGEN_SH_SILENT}" ]; then
|
||||
SILENT=" --silent"
|
||||
fi
|
||||
if test x"$1" = x"--help"; then
|
||||
echo "usage: ./autogen.sh [OPTIONS] [ARGS]"
|
||||
echo " Options:"
|
||||
echo " --silent Silent operation"
|
||||
echo " --force Pass --force to autoconf"
|
||||
echo " --find-version Helper for configure.ac"
|
||||
echo " --git-build Run all commands to build from a Git"
|
||||
echo " --print-host Print only the host triplet"
|
||||
echo " --print-build Print only the build platform triplet"
|
||||
echo " --build-TYPE Configure to cross build for TYPE"
|
||||
echo ""
|
||||
echo " ARGS are passed to configure in --build-TYPE mode."
|
||||
echo " Configuration for this script is expected in autogen.rc"
|
||||
exit 0
|
||||
fi
|
||||
if test x"$1" = x"--silent"; then
|
||||
SILENT=" --silent"
|
||||
shift
|
||||
fi
|
||||
if test x"$1" = x"--force"; then
|
||||
FORCE=" --force"
|
||||
shift
|
||||
fi
|
||||
if test x"$1" = x"--print-host"; then
|
||||
PRINT_HOST=yes
|
||||
shift
|
||||
fi
|
||||
if test x"$1" = x"--print-build"; then
|
||||
PRINT_BUILD=yes
|
||||
shift
|
||||
fi
|
||||
|
||||
|
||||
# Reject unsafe characters in $HOME, $tsdir and cwd. We consider spaces
|
||||
# as unsafe because it is too easy to get scripts wrong in this regard.
|
||||
am_lf='
|
||||
'
|
||||
case `pwd` in
|
||||
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
|
||||
fatal "unsafe working directory name" ;;
|
||||
esac
|
||||
case $tsdir in
|
||||
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
|
||||
fatal "unsafe source directory: \`$tsdir'" ;;
|
||||
esac
|
||||
case $HOME in
|
||||
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
|
||||
fatal "unsafe home directory: \`$HOME'" ;;
|
||||
esac
|
||||
die_p
|
||||
|
||||
|
||||
# List of variables sourced from autogen.rc. The strings '@SYSROOT@' in
|
||||
# these variables are replaced by the actual system root.
|
||||
configure_opts=
|
||||
extraoptions=
|
||||
package_subdir=
|
||||
skip_autoheader=
|
||||
# List of optional variables sourced from autogen.rc and ~/.gnupg-autogen.rc
|
||||
w32_toolprefixes=
|
||||
w32_extraoptions=
|
||||
w64_toolprefixes=
|
||||
w64_extraoptions=
|
||||
amd64_toolprefixes=
|
||||
# End list of optional variables sourced from ~/.gnupg-autogen.rc
|
||||
# What follows are variables which are sourced but default to
|
||||
# environment variables or lacking them hardcoded values.
|
||||
#w32root=
|
||||
#w64root=
|
||||
#amd64root=
|
||||
|
||||
# Convenience option to use certain configure options for some hosts.
|
||||
myhost=""
|
||||
myhostsub=""
|
||||
case "$1" in
|
||||
--find-version)
|
||||
myhost="find-version"
|
||||
SILENT=" --silent"
|
||||
shift
|
||||
;;
|
||||
--git-build)
|
||||
myhost="git-build"
|
||||
shift
|
||||
;;
|
||||
--build-w32)
|
||||
myhost="w32"
|
||||
shift
|
||||
;;
|
||||
--build-w64)
|
||||
myhost="w32"
|
||||
myhostsub="64"
|
||||
shift
|
||||
;;
|
||||
--build-amd64)
|
||||
myhost="amd64"
|
||||
shift
|
||||
;;
|
||||
--build*)
|
||||
fatal "**Error**: invalid build option $1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
die_p
|
||||
|
||||
|
||||
# **** GIT BUILD ****
|
||||
# This is a helper to build from git.
|
||||
if [ "$myhost" = "git-build" ]; then
|
||||
tmp="$(pwd)"
|
||||
cd "$tsdir" || fatal "error cd-ing to $tsdir"
|
||||
./autogen.sh || fatal "error running ./autogen.sh"
|
||||
cd "$tmp" || fatal "error cd-ing back to $tmp"
|
||||
die_p
|
||||
"$tsdir"/configure || fatal "error running $tsdir/configure"
|
||||
die_p
|
||||
make || fatal "error running make"
|
||||
die_p
|
||||
make check || fatal "error running make check"
|
||||
die_p
|
||||
exit 0
|
||||
fi
|
||||
# **** end GIT BUILD ****
|
||||
|
||||
|
||||
# Source our configuration
|
||||
if [ -f "${tsdir}/autogen.rc" ]; then
|
||||
. "${tsdir}/autogen.rc"
|
||||
fi
|
||||
|
||||
# Source optional site specific configuration
|
||||
if [ -f "$HOME/.gnupg-autogen.rc" ]; then
|
||||
info "sourcing extra definitions from $HOME/.gnupg-autogen.rc"
|
||||
. "$HOME/.gnupg-autogen.rc"
|
||||
fi
|
||||
|
||||
|
||||
# Find the .git directory (or file for work trees)
|
||||
if [ -e .git ]; then
|
||||
IS_GIT_CLONE=yes
|
||||
elif [ -n "${package_subdir}" ]; then
|
||||
# Look for .git in root of package containing the nested package
|
||||
package_subdir=${package_subdir#/}
|
||||
root_path=${tsdir%/${package_subdir}}
|
||||
if [ -e "${root_path}/.git" ]; then
|
||||
IS_GIT_CLONE=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
# **** FIND VERSION ****
|
||||
# This is a helper for the configure.ac M4 magic
|
||||
# Called
|
||||
# ./autogen.sh --find-version PACKAGE MAJOR MINOR [MICRO]
|
||||
# returns a complete version string with automatic beta numbering.
|
||||
if [ "$myhost" = "find-version" ]; then
|
||||
package="$1"
|
||||
major="$2"
|
||||
minor="$3"
|
||||
micro="$4"
|
||||
|
||||
if [ -z "$package" -o -z "$major" -o -z "$minor" ]; then
|
||||
echo "usage: ./autogen.sh --find-version PACKAGE MAJOR MINOR [MICRO]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$micro" ]; then
|
||||
matchstr1="$package-$major.[0-9]*"
|
||||
matchstr2="$package-$major-base"
|
||||
matchstr3=""
|
||||
vers="$major.$minor"
|
||||
else
|
||||
matchstr1="$package-$major.$minor.[0-9]*"
|
||||
matchstr2="$package-$major.[0-9]*-base"
|
||||
matchstr3="$package-$major-base"
|
||||
vers="$major.$minor.$micro"
|
||||
fi
|
||||
|
||||
beta=no
|
||||
if [ $IS_GIT_CLONE = yes ]; then
|
||||
ingit=yes
|
||||
tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null)
|
||||
if [ -n "$tmp" ]; then
|
||||
tmp=$(echo "$tmp" | sed s/^"$package"// \
|
||||
| awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}')
|
||||
else
|
||||
# (due tof "-base" in the tag we need to take the 4th field)
|
||||
tmp=$(git describe --match "${matchstr2}" --long 2>/dev/null)
|
||||
if [ -n "$tmp" ]; then
|
||||
tmp=$(echo "$tmp" | sed s/^"$package"// \
|
||||
| awk -F- '$4!=0 && $4 !~ /^beta/ {print"-beta"$4}')
|
||||
elif [ -n "${matchstr3}" ]; then
|
||||
tmp=$(git describe --match "${matchstr3}" --long 2>/dev/null)
|
||||
if [ -n "$tmp" ]; then
|
||||
tmp=$(echo "$tmp" | sed s/^"$package"// \
|
||||
| awk -F- '$4!=0 && $4 !~ /^beta/ {print"-beta"$4}')
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
[ -n "$tmp" ] && beta=yes
|
||||
rev=$(git rev-parse --short HEAD | tr -d '\n\r')
|
||||
rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null)))
|
||||
else
|
||||
ingit=no
|
||||
beta=yes
|
||||
tmp="-unknown"
|
||||
rev="0000000"
|
||||
rvd="0"
|
||||
fi
|
||||
|
||||
echo "$package-$vers$tmp:$beta:$ingit:$vers$tmp:$vers:$tmp:$rev:$rvd:"
|
||||
exit 0
|
||||
fi
|
||||
# **** end FIND VERSION ****
|
||||
|
||||
|
||||
if [ ! -f "$tsdir/build-aux/config.guess" ]; then
|
||||
fatal "$tsdir/build-aux/config.guess not found"
|
||||
exit 1
|
||||
fi
|
||||
build=`$tsdir/build-aux/config.guess`
|
||||
if [ $PRINT_BUILD = yes ]; then
|
||||
echo "$build"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# ******************
|
||||
# W32 build script
|
||||
# ******************
|
||||
if [ "$myhost" = "w32" ]; then
|
||||
case $myhostsub in
|
||||
64)
|
||||
w32root="$w64root"
|
||||
[ -z "$w32root" ] && w32root="$HOME/w64root"
|
||||
toolprefixes="$w64_toolprefixes x86_64-w64-mingw32"
|
||||
extraoptions="$extraoptions $w64_extraoptions"
|
||||
;;
|
||||
*)
|
||||
[ -z "$w32root" ] && w32root="$HOME/w32root"
|
||||
toolprefixes="$w32_toolprefixes i686-w64-mingw32 i586-mingw32msvc"
|
||||
toolprefixes="$toolprefixes i386-mingw32msvc mingw32"
|
||||
extraoptions="$extraoptions $w32_extraoptions"
|
||||
;;
|
||||
esac
|
||||
info "Using $w32root as standard install directory"
|
||||
replace_sysroot
|
||||
|
||||
# Locate the cross compiler
|
||||
crossbindir=
|
||||
for host in $toolprefixes; do
|
||||
if ${host}-gcc --version >/dev/null 2>&1 ; then
|
||||
crossbindir=/usr/${host}/bin
|
||||
conf_CC="CC=${host}-gcc"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if [ -z "$crossbindir" ]; then
|
||||
fatal "cross compiler kit not installed"
|
||||
if [ -z "$myhostsub" ]; then
|
||||
info "Under Debian GNU/Linux, you may install it using"
|
||||
info " apt-get install mingw32 mingw32-runtime mingw32-binutils"
|
||||
fi
|
||||
die_p
|
||||
fi
|
||||
if [ $PRINT_HOST = yes ]; then
|
||||
echo "$host"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f "$tsdir/config.log" ]; then
|
||||
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
|
||||
fatal "Please run a 'make distclean' first"
|
||||
die_p
|
||||
fi
|
||||
fi
|
||||
|
||||
$tsdir/configure --enable-maintainer-mode ${SILENT} \
|
||||
--prefix=${w32root} \
|
||||
--host=${host} --build=${build} SYSROOT=${w32root} \
|
||||
PKG_CONFIG_LIBDIR=${w32root}/lib/pkgconfig \
|
||||
${configure_opts} ${extraoptions} "$@"
|
||||
rc=$?
|
||||
exit $rc
|
||||
fi
|
||||
# ***** end W32 build script *******
|
||||
|
||||
# ***** AMD64 cross build script *******
|
||||
# Used to cross-compile for AMD64 (for testing)
|
||||
if [ "$myhost" = "amd64" ]; then
|
||||
[ -z "$amd64root" ] && amd64root="$HOME/amd64root"
|
||||
info "Using $amd64root as standard install directory"
|
||||
replace_sysroot
|
||||
|
||||
toolprefixes="$amd64_toolprefixes x86_64-linux-gnu amd64-linux-gnu"
|
||||
|
||||
# Locate the cross compiler
|
||||
crossbindir=
|
||||
for host in $toolprefixes ; do
|
||||
if ${host}-gcc --version >/dev/null 2>&1 ; then
|
||||
crossbindir=/usr/${host}/bin
|
||||
conf_CC="CC=${host}-gcc"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if [ -z "$crossbindir" ]; then
|
||||
echo "Cross compiler kit not installed" >&2
|
||||
echo "Stop." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ $PRINT_HOST = yes ]; then
|
||||
echo "$host"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f "$tsdir/config.log" ]; then
|
||||
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
|
||||
echo "Please run a 'make distclean' first" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
$tsdir/configure --enable-maintainer-mode ${SILENT} \
|
||||
--prefix=${amd64root} \
|
||||
--host=${host} --build=${build} \
|
||||
${configure_opts} ${extraoptions} "$@"
|
||||
rc=$?
|
||||
exit $rc
|
||||
fi
|
||||
# ***** end AMD64 cross build script *******
|
||||
|
||||
|
||||
# Grep the required versions from configure.ac
|
||||
autoconf_vers=`sed -n '/^AC_PREREQ(/ {
|
||||
s/^.*(\(.*\))/\1/p
|
||||
q
|
||||
}' ${configure_ac}`
|
||||
autoconf_vers_num=`echo "$autoconf_vers" | cvtver`
|
||||
|
||||
automake_vers=`sed -n '/^min_automake_version=/ {
|
||||
s/^.*="\(.*\)"/\1/p
|
||||
q
|
||||
}' ${configure_ac}`
|
||||
automake_vers_num=`echo "$automake_vers" | cvtver`
|
||||
|
||||
if [ -d "${tsdir}/po" ]; then
|
||||
gettext_vers=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ {
|
||||
s/^.*\[\(.*\)])/\1/p
|
||||
q
|
||||
}' ${configure_ac}`
|
||||
gettext_vers_num=`echo "$gettext_vers" | cvtver`
|
||||
else
|
||||
gettext_vers="n/a"
|
||||
fi
|
||||
|
||||
if [ -z "$autoconf_vers" -o -z "$automake_vers" -o -z "$gettext_vers" ]
|
||||
then
|
||||
echo "**Error**: version information not found in "\`${configure_ac}\'"." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if check_version $AUTOCONF $autoconf_vers_num $autoconf_vers ; then
|
||||
check_version $AUTOHEADER $autoconf_vers_num $autoconf_vers autoconf
|
||||
fi
|
||||
if check_version $AUTOMAKE $automake_vers_num $automake_vers; then
|
||||
check_version $ACLOCAL $automake_vers_num $autoconf_vers automake
|
||||
fi
|
||||
if [ "$gettext_vers" != "n/a" ]; then
|
||||
if check_version $GETTEXT $gettext_vers_num $gettext_vers; then
|
||||
check_version $MSGMERGE $gettext_vers_num $gettext_vers gettext
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$DIE" = "yes" ]; then
|
||||
cat <<EOF
|
||||
|
||||
Note that you may use alternative versions of the tools by setting
|
||||
the corresponding environment variables; see README.GIT for details.
|
||||
|
||||
EOF
|
||||
die_p
|
||||
fi
|
||||
|
||||
# Check the git setup.
|
||||
if [ -d .git ]; then
|
||||
CP="cp -p"
|
||||
# If we have a GNU cp we can add -v
|
||||
if cp --version >/dev/null 2>/dev/null; then
|
||||
[ -z "${SILENT}" ] && CP="$CP -v"
|
||||
fi
|
||||
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
|
||||
[ -z "${SILENT}" ] && cat <<EOF
|
||||
*** Activating trailing whitespace git pre-commit hook. ***
|
||||
For more information see this thread:
|
||||
https://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084.html
|
||||
To deactivate this pre-commit hook again move .git/hooks/pre-commit
|
||||
and .git/hooks/pre-commit.sample out of the way.
|
||||
EOF
|
||||
$CP .git/hooks/pre-commit.sample .git/hooks/pre-commit
|
||||
chmod +x .git/hooks/pre-commit
|
||||
fi
|
||||
|
||||
if [ "$gettext_vers" != "n/a" ]; then
|
||||
tmp=$(git config --get filter.cleanpo.clean)
|
||||
if [ "$tmp" != \
|
||||
"awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'" ]
|
||||
then
|
||||
info "*** Adding GIT filter.cleanpo.clean configuration."
|
||||
git config --add filter.cleanpo.clean \
|
||||
"awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'"
|
||||
fi
|
||||
fi
|
||||
if [ -f build-aux/git-hooks/commit-msg -a ! -f .git/hooks/commit-msg ] ; then
|
||||
[ -z "${SILENT}" ] && cat <<EOF
|
||||
*** Activating commit log message check hook. ***
|
||||
EOF
|
||||
$CP build-aux/git-hooks/commit-msg .git/hooks/commit-msg
|
||||
chmod +x .git/hooks/commit-msg
|
||||
if [ x"${display_name}" != x ]; then
|
||||
git config format.subjectPrefix "PATCH ${display_name}"
|
||||
git config sendemail.to "${patches_to}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
aclocal_flags="-I m4"
|
||||
if [ -n "${extra_aclocal_flags}" ]; then
|
||||
aclocal_flags="${aclocal_flags} ${extra_aclocal_flags}"
|
||||
fi
|
||||
if [ -n "${ACLOCAL_FLAGS}" ]; then
|
||||
aclocal_flags="${aclocal_flags} ${ACLOCAL_FLAGS}"
|
||||
fi
|
||||
info "Running $ACLOCAL ${aclocal_flags} ..."
|
||||
$ACLOCAL ${aclocal_flags}
|
||||
if [ -z "${skip_autoheader}" ]; then
|
||||
info "Running autoheader..."
|
||||
$AUTOHEADER
|
||||
fi
|
||||
info "Running automake --gnu ..."
|
||||
$AUTOMAKE --gnu;
|
||||
info "Running autoconf${FORCE} ..."
|
||||
$AUTOCONF${FORCE}
|
||||
|
||||
info "You may now run:${am_lf} ${final_info}"
|
@ -1,347 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
1754
lang/python/build-aux/config.guess
vendored
1754
lang/python/build-aux/config.guess
vendored
File diff suppressed because it is too large
Load Diff
1890
lang/python/build-aux/config.sub
vendored
1890
lang/python/build-aux/config.sub
vendored
File diff suppressed because it is too large
Load Diff
@ -1,791 +0,0 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
@ -1,527 +0,0 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-11-20.07; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
@ -1,68 +0,0 @@
|
||||
#
|
||||
# This is a sed script to patch the generated libtool,
|
||||
# which works well against both of libtool 2.4.2 and 2.4.7.
|
||||
#
|
||||
# You may use this work under the terms of a Creative Commons CC0 1.0
|
||||
# License/Waiver.
|
||||
#
|
||||
# CC0 Public Domain Dedication
|
||||
# https://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
#
|
||||
# This sed script applys two hunks of the patch:
|
||||
#
|
||||
# Part1: after the comment "# bleh windows"
|
||||
# Part2: after the comment "#extension on DOS 8.3..."
|
||||
#
|
||||
# Only when those two parts are patched correctly, it exits with 0 or
|
||||
# else, it exits with 1
|
||||
#
|
||||
|
||||
# Find the part 1, by the comment
|
||||
/^[ \t]*# bleh windows$/b part1_start
|
||||
# Not found the part1, raise an error
|
||||
$ q1
|
||||
b
|
||||
|
||||
:part1_start
|
||||
n
|
||||
# The first line in the part 1 must be the begining of the case statement.
|
||||
/^[ \t]*case \$host in$/! q1
|
||||
n
|
||||
# Insert the entry for x86_64-*mingw32*, for modified versuffix.
|
||||
i\
|
||||
x86_64-*mingw32*)
|
||||
i\
|
||||
func_arith $current - $age
|
||||
i\
|
||||
major=$func_arith_result
|
||||
i\
|
||||
versuffix="6-$major"
|
||||
i\
|
||||
;;
|
||||
:part1_0
|
||||
# Find the end of the case statement
|
||||
/^[ \t]*esac$/b find_part2
|
||||
# Not found the end of the case statement, raise an error
|
||||
$ q1
|
||||
n
|
||||
b part1_0
|
||||
|
||||
:find_part2
|
||||
/^[ \t]*# extension on DOS 8.3 file.*systems.$/b part2_process
|
||||
# Not found the part2, raise an error
|
||||
$ q1
|
||||
n
|
||||
b find_part2
|
||||
|
||||
:part2_process
|
||||
$ q1
|
||||
s/^[ \t]*\(versuffix=\)\(.*\)\(-$major\)\(.*\)$/\t case \$host in\n\t x86_64-*mingw32*)\n\t \1\26\3\4\n\t ;;\n\t *)\n\t \1\2\3\4\n\t ;;\n\t esac/
|
||||
t part2_done
|
||||
n
|
||||
b part2_process
|
||||
|
||||
:part2_done
|
||||
$ q0
|
||||
n
|
||||
b part2_done
|
File diff suppressed because it is too large
Load Diff
@ -1,215 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=https://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
@ -1,498 +0,0 @@
|
||||
# configure.ac for Python bindings of GPGME
|
||||
# Copyright (C) 2000 Werner Koch (dd9jn)
|
||||
# Copyright (C) 2001-2021 g10 Code GmbH
|
||||
#
|
||||
# This file is part of GPGME.
|
||||
#
|
||||
# GPGME is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as
|
||||
# published by the Free Software Foundation; either version 2.1 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# GPGME is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, see <https://gnu.org/licenses/>.
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
# (Process this file with autoconf to produce a configure script.)
|
||||
AC_PREREQ([2.69])
|
||||
min_automake_version="1.14"
|
||||
|
||||
# To build a release you need to create a tag with the version number
|
||||
# "gpg-py-n.m.k" and run "./autogen.sh --force". Please bump the
|
||||
# version number immediately after the release and do another commit
|
||||
# and push so that the git magic is able to work. If you start a new
|
||||
# series by bumping the minor (m) remember to also create a tag named
|
||||
# "gpg-py-n.m-base" as the start point for beta numbering. See below
|
||||
# for the LT versions.
|
||||
m4_define([mym4_package],[gpg-py])
|
||||
m4_define([mym4_major], [1])
|
||||
m4_define([mym4_minor], [24])
|
||||
m4_define([mym4_micro], [0])
|
||||
|
||||
# Below is m4 magic to extract and compute the git revision number,
|
||||
# the decimalized short revision number, a beta version string and a
|
||||
# flag indicating a development version (mym4_isbeta). Note that the
|
||||
# m4 processing is done by autoconf and not during the configure run.
|
||||
m4_define([mym4_verslist], m4_split(m4_esyscmd([./autogen.sh --find-version] \
|
||||
mym4_package mym4_major mym4_minor mym4_micro),[:]))
|
||||
m4_define([mym4_isbeta], m4_argn(2, mym4_verslist))
|
||||
m4_define([mym4_version], m4_argn(4, mym4_verslist))
|
||||
m4_define([mym4_revision], m4_argn(7, mym4_verslist))
|
||||
m4_define([mym4_revision_dec], m4_argn(8, mym4_verslist))
|
||||
m4_esyscmd([echo ]mym4_version[>VERSION])
|
||||
AC_INIT([mym4_package],[mym4_version],[https://bugs.gnupg.org])
|
||||
|
||||
################################################
|
||||
|
||||
NEED_GPG_ERROR_VERSION=1.47
|
||||
NEED_GPGME_VERSION=1.7.0
|
||||
|
||||
VERSION_MAJOR=mym4_major
|
||||
VERSION_MINOR=mym4_minor
|
||||
VERSION_MICRO=mym4_micro
|
||||
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip])
|
||||
AM_MAINTAINER_MODE
|
||||
AC_CANONICAL_HOST
|
||||
AM_SILENT_RULES
|
||||
AC_ARG_VAR(SYSROOT,[locate config scripts also below that directory])
|
||||
|
||||
# Enable GNU extensions on systems that have them.
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
# Taken from mpfr-4.0.1, then modified for LDADD_FOR_TESTS_KLUDGE
|
||||
dnl Under Linux, make sure that the old dtags are used if LD_LIBRARY_PATH
|
||||
dnl is defined. The issue is that with the new dtags, LD_LIBRARY_PATH has
|
||||
dnl the precedence over the run path, so that if a compatible MPFR library
|
||||
dnl is installed in some directory from $LD_LIBRARY_PATH, then the tested
|
||||
dnl MPFR library will be this library instead of the MPFR library from the
|
||||
dnl build tree. Other OS with the same issue might be added later.
|
||||
dnl
|
||||
dnl References:
|
||||
dnl https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859732
|
||||
dnl http://lists.gnu.org/archive/html/libtool/2017-05/msg00000.html
|
||||
dnl
|
||||
dnl We need to check whether --disable-new-dtags is supported as alternate
|
||||
dnl linkers may be used (e.g., with tcc: CC=tcc LD=tcc).
|
||||
dnl
|
||||
case $host in
|
||||
*-*-linux*)
|
||||
if test -n "$LD_LIBRARY_PATH"; then
|
||||
saved_LDFLAGS="$LDFLAGS"
|
||||
LDADD_FOR_TESTS_KLUDGE="-Wl,--disable-new-dtags"
|
||||
LDFLAGS="$LDFLAGS $LDADD_FOR_TESTS_KLUDGE"
|
||||
AC_MSG_CHECKING(whether --disable-new-dtags is supported by the linker)
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||
int main (void) { return 0; }
|
||||
]])],
|
||||
[AC_MSG_RESULT(yes (use it since LD_LIBRARY_PATH is set))],
|
||||
[AC_MSG_RESULT(no)
|
||||
LDADD_FOR_TESTS_KLUDGE=""
|
||||
])
|
||||
LDFLAGS="$saved_LDFLAGS"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([LDADD_FOR_TESTS_KLUDGE])
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CXX
|
||||
|
||||
# Note: A suitable gitlog-to-changelog script can be found in GnuPG master.
|
||||
AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog, [gitlog-to-changelog])
|
||||
|
||||
AC_SUBST(VERSION_MAJOR)
|
||||
AC_SUBST(VERSION_MINOR)
|
||||
AC_SUBST(VERSION_MICRO)
|
||||
|
||||
VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_major \
|
||||
mym4_minor mym4_micro)
|
||||
AC_SUBST(VERSION_NUMBER)
|
||||
|
||||
# We need to compile and run a program on the build machine. A
|
||||
# comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in
|
||||
# the AC archive is broken for autoconf 2.57. Given that there is no
|
||||
# newer version of that macro, we assume that it is also broken for
|
||||
# autoconf 2.61 and thus we use a simple but usually sufficient
|
||||
# approach.
|
||||
AC_MSG_CHECKING(for cc for build)
|
||||
if test "$cross_compiling" = "yes"; then
|
||||
CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
|
||||
else
|
||||
CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
|
||||
fi
|
||||
AC_MSG_RESULT($CC_FOR_BUILD)
|
||||
AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
|
||||
|
||||
|
||||
# Don't default to build static libs.
|
||||
LT_PREREQ([2.2.6])
|
||||
LT_INIT([win32-dll disable-static])
|
||||
LT_LANG([Windows Resource])
|
||||
|
||||
# For now we hardcode the use of version scripts. It would be better
|
||||
# to write a test for this or even implement this within libtool.
|
||||
have_ld_version_script=no
|
||||
case "${host}" in
|
||||
*-*-linux*)
|
||||
have_ld_version_script=yes
|
||||
;;
|
||||
*-*-gnu*)
|
||||
have_ld_version_script=yes
|
||||
;;
|
||||
*-apple-darwin*)
|
||||
AC_DEFINE(_DARWIN_C_SOURCE, 1,
|
||||
Expose all libc features (__DARWIN_C_FULL).)
|
||||
AC_DEFINE(_XOPEN_SOURCE, 500, Activate POSIX interface on MacOS X)
|
||||
;;
|
||||
esac
|
||||
|
||||
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
|
||||
|
||||
#
|
||||
# Specify how we support our local modification of libtool for Windows
|
||||
# 64-bit. Options are:
|
||||
#
|
||||
# (1) apply: when appying patch fails, it results failure of entire build
|
||||
# (2) never: never apply the patch (no try)
|
||||
# (3) try: use patched if it goes well, use original if fails
|
||||
#
|
||||
AC_ARG_WITH([libtool-modification],
|
||||
AS_HELP_STRING([--with-libtool-modification=apply|never|try],
|
||||
[how to handle libtool modification (default=never)]),
|
||||
build_libtool_modification=$withval,
|
||||
build_libtool_modification=never)
|
||||
|
||||
#
|
||||
# Apply a patch (locally maintained one of ours) to libtool
|
||||
#
|
||||
case $host in
|
||||
x86_64-*mingw32*)
|
||||
AC_CONFIG_COMMANDS([libtool-patch],[[
|
||||
if test "$build_selection" = never; then
|
||||
echo "patch not applied"
|
||||
elif (mv -f libtool libtool.orig; \
|
||||
sed -f $srcdir/build-aux/libtool-patch.sed libtool.orig >libtool); then
|
||||
echo "applied successfully"
|
||||
elif test "$build_selection" = try; then
|
||||
mv -f libtool.orig libtool
|
||||
echo "patch failed, thus, using original"
|
||||
else
|
||||
echo "patch failed"
|
||||
as_fn_exit 1
|
||||
fi
|
||||
]],[build_selection=$build_libtool_modification])
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
GPG_DEFAULT=no
|
||||
GPGSM_DEFAULT=no
|
||||
GPGCONF_DEFAULT=no
|
||||
G13_DEFAULT=no
|
||||
component_system=None
|
||||
have_dosish_system=no
|
||||
have_android_system=no
|
||||
have_w32_system=no
|
||||
have_w64_system=no
|
||||
have_macos_system=no
|
||||
case "${host}" in
|
||||
x86_64-*mingw32*)
|
||||
have_w64_system=yes
|
||||
;;
|
||||
*-linux-androideabi)
|
||||
have_android_system=yes
|
||||
;;
|
||||
*-apple-darwin*)
|
||||
have_macos_system=yes
|
||||
;;
|
||||
esac
|
||||
case "${host}" in
|
||||
*-mingw32*)
|
||||
have_dosish_system=yes
|
||||
have_w32_system=yes
|
||||
GPG_DEFAULT='c:\\gnupg\\gpg.exe'
|
||||
GPGSM_DEFAULT='c:\\gnupg\\gpgsm.exe'
|
||||
GPGCONF_DEFAULT='c:\\gnupg\\gpgconf.exe'
|
||||
G13_DEFAULT='c:\\gnupg\\g13.exe'
|
||||
#component_system='COM+'
|
||||
;;
|
||||
*)
|
||||
|
||||
# XXX: Probably use exec-prefix here?
|
||||
# GPG_DEFAULT='/usr/bin/gpg'
|
||||
# GPGSM_DEFAULT='/usr/bin/gpgsm'
|
||||
# GPGCONF_DEFAULT='/usr/bin/gpgconf'
|
||||
# G13_DEFAULT='/usr/bin/g13'
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$have_dosish_system" = yes; then
|
||||
AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
|
||||
[Defined if we run on some of the PCDOS like systems
|
||||
(DOS, Windoze. OS/2) with special properties like
|
||||
no file modes])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
|
||||
|
||||
if test "$have_w32_system" = yes; then
|
||||
AC_DEFINE(HAVE_W32_SYSTEM,1,
|
||||
[Defined if we run on any kind of W32 API based system])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
|
||||
|
||||
if test "$have_w64_system" = yes; then
|
||||
AC_DEFINE(HAVE_W64_SYSTEM,1,
|
||||
[Defined if we run on a 64 bit W32 API based system])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_W64_SYSTEM, test "$have_w64_system" = yes)
|
||||
|
||||
if test "$have_android_system" = yes; then
|
||||
AC_DEFINE(HAVE_ANDROID_SYSTEM,1, [Defined if we build for an Android system])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_ANDROID_SYSTEM, test "$have_android_system" = yes)
|
||||
|
||||
if test "$have_macos_system" = yes; then
|
||||
AC_DEFINE(HAVE_MACOS_SYSTEM,1,
|
||||
[Defined if we build for an MacOS system])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_MACOS_SYSTEM, test "$have_macos_system" = yes)
|
||||
|
||||
|
||||
# Python bindings.
|
||||
AX_PKG_SWIG
|
||||
if test -z "$SWIG"; then
|
||||
AC_MSG_ERROR([[
|
||||
***
|
||||
*** You need SWIG to build the Python bindings.
|
||||
***]])
|
||||
else
|
||||
# Reset the version collecting vars.
|
||||
PYTHONS=
|
||||
PYTHON_VERSIONS=
|
||||
|
||||
# Reset everything, so that we can look for another Python.
|
||||
m4_foreach([mym4pythonver],
|
||||
[[2.7],[3.6],[3.8],[3.9],[3.10],[3.11],[3.12],[all]],
|
||||
[unset PYTHON
|
||||
unset PYTHON_VERSION
|
||||
unset PYTHON_CPPFLAGS
|
||||
unset PYTHON_LDFLAGS
|
||||
unset PYTHON_LIBS
|
||||
unset PYTHON_SITE_PKG
|
||||
unset PYTHON_EXTRA_LIBS
|
||||
unset PYTHON_EXTRA_LDFLAGS
|
||||
unset ac_cv_path_PYTHON
|
||||
unset am_cv_pathless_PYTHON
|
||||
unset am_cv_python_version
|
||||
unset am_cv_python_platform
|
||||
unset am_cv_python_pythondir
|
||||
unset am_cv_python_pyexecdir
|
||||
AM_PATH_PYTHON(mym4pythonver, [
|
||||
AX_PYTHON_DEVEL([], [true])
|
||||
if test "$PYTHON_VERSION"; then
|
||||
PYTHONS="$(echo $PYTHONS $PYTHON)"
|
||||
PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)"
|
||||
fi
|
||||
], :, m4_if([mym4pythonver],[all],[],[python]mym4pythonver))
|
||||
])
|
||||
|
||||
# Recover some values lost in the second attempt to find Python.
|
||||
PYTHON="$(echo $PYTHONS | cut -d ' ' -f 1)"
|
||||
PYTHON_VERSION="$(echo $PYTHON_VERSIONS | cut -d ' ' -f 1)"
|
||||
|
||||
# Remove duplicates.
|
||||
PYTHONS="$(echo $PYTHONS | tr '[[:space:]]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')"
|
||||
PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS | tr '[[:space:]]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')"
|
||||
|
||||
if test -z "$PYTHON_VERSIONS"; then
|
||||
AC_MSG_ERROR([[
|
||||
***
|
||||
*** Please install the python development packages.
|
||||
***]])
|
||||
fi
|
||||
|
||||
AC_SUBST(PYTHONS, $PYTHONS)
|
||||
fi
|
||||
|
||||
#
|
||||
# Provide information about the build.
|
||||
#
|
||||
BUILD_REVISION="mym4_revision"
|
||||
AC_SUBST(BUILD_REVISION)
|
||||
AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION",
|
||||
[GIT commit id revision used to build this package])
|
||||
|
||||
|
||||
#
|
||||
# Options to disable some regression tests
|
||||
#
|
||||
run_gpg_test="yes"
|
||||
AC_ARG_ENABLE(gpg-test,
|
||||
AS_HELP_STRING([--disable-gpg-test],[disable GPG regression test]),
|
||||
run_gpg_test=$enableval)
|
||||
AM_CONDITIONAL(RUN_GPG_TESTS, test "$run_gpg_test" = "yes")
|
||||
|
||||
|
||||
# Type checks.
|
||||
AC_CHECK_SIZEOF(unsigned int)
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
|
||||
# Checks for compiler features.
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
|
||||
CFLAGS="$CFLAGS -Wno-format-y2k"
|
||||
|
||||
# If -Wno-missing-field-initializers is supported we can expect a
|
||||
# a larger set of warning options.
|
||||
AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers])
|
||||
_gcc_cflags_save=$CFLAGS
|
||||
CFLAGS="-Wno-missing-field-initializers"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no)
|
||||
AC_MSG_RESULT($_gcc_wopt)
|
||||
CFLAGS=$_gcc_cflags_save;
|
||||
if test x"$_gcc_wopt" = xyes ; then
|
||||
CFLAGS="$CFLAGS -Wno-missing-field-initializers"
|
||||
CFLAGS="$CFLAGS -Wno-sign-compare"
|
||||
CFLAGS="$CFLAGS -Wno-format-zero-length"
|
||||
CFLAGS="$CFLAGS -Wno-format-truncation"
|
||||
CFLAGS="$CFLAGS -Wno-sizeof-pointer-div"
|
||||
fi
|
||||
if test "$USE_MAINTAINER_MODE" = "yes"; then
|
||||
if test x"$_gcc_wopt" = xyes ; then
|
||||
CFLAGS="$CFLAGS -W -Wextra -Wbad-function-cast"
|
||||
CFLAGS="$CFLAGS -Wwrite-strings"
|
||||
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
|
||||
fi
|
||||
CFLAGS="$CFLAGS -Wformat -Wformat-security"
|
||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-shadow"
|
||||
|
||||
AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
|
||||
_gcc_cflags_save=$CFLAGS
|
||||
CFLAGS="-Wpointer-arith"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no)
|
||||
AC_MSG_RESULT($_gcc_wopt)
|
||||
CFLAGS=$_gcc_cflags_save;
|
||||
if test x"$_gcc_wopt" = xyes ; then
|
||||
CFLAGS="$CFLAGS -Wpointer-arith"
|
||||
fi
|
||||
fi
|
||||
if test "$have_w32_system" = yes; then
|
||||
CFLAGS="$CFLAGS -mms-bitfields"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Checks for library functions.
|
||||
AC_MSG_NOTICE([checking for libraries])
|
||||
|
||||
# Checking for libgpg-error.
|
||||
have_gpg_error=no
|
||||
AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
|
||||
have_gpg_error=yes, have_gpg_error=no)
|
||||
AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
|
||||
[The default error source for GPGME.])
|
||||
|
||||
AM_CONDITIONAL(USE_GPGRT_CONFIG, [test -n "$GPGRT_CONFIG" \
|
||||
-a "$ac_cv_path_GPG_ERROR_CONFIG" = no])
|
||||
|
||||
# And for gpgme.
|
||||
have_gpgme=no
|
||||
builddir=`pwd`
|
||||
# Check if Python bindings are built as nested package of gpgme
|
||||
if test "${srcdir%/lang/python}/lang/python" == "$srcdir" -a \
|
||||
"${builddir%/lang/python}/lang/python" == "$builddir"; then
|
||||
AC_MSG_CHECKING(for GpgME - assuming nested build)
|
||||
gpgme_build_dir=${builddir%/lang/python}
|
||||
if test -f "$gpgme_build_dir/src/gpgme.h"; then
|
||||
GPGME_CFLAGS="-I$gpgme_build_dir/src"
|
||||
GPGME_LIBS="-L$gpgme_build_dir/src/.libs -lgpgme"
|
||||
have_gpgme=yes
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$have_gpgme" = "no"; then
|
||||
AM_PATH_GPGME("$NEED_GPGME_VERSION",
|
||||
have_gpgme=yes, have_gpgme=no)
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Other checks
|
||||
#
|
||||
|
||||
# Last check.
|
||||
die=no
|
||||
if test "$have_gpg_error" = "no"; then
|
||||
die=yes
|
||||
AC_MSG_NOTICE([[
|
||||
***
|
||||
*** You need libgpg-error to build this program.
|
||||
** This library is for example available at
|
||||
*** https://www.gnupg.org/ftp/gcrypt/libgpg-error/
|
||||
*** (at least version $NEED_GPG_ERROR_VERSION is required.)
|
||||
***]])
|
||||
fi
|
||||
if test "$have_gpgme" = "no"; then
|
||||
die=yes
|
||||
AC_MSG_NOTICE([[
|
||||
***
|
||||
*** You need gpgme to build this program.
|
||||
*** This library is for example available at
|
||||
*** https://www.gnupg.org/ftp/gcrypt/gpgme/
|
||||
*** (at least version $NEED_GPGME_VERSION is required).
|
||||
***]])
|
||||
fi
|
||||
|
||||
if test "$die" = "yes"; then
|
||||
AC_MSG_ERROR([[
|
||||
***
|
||||
*** Required libraries not found. Please consult the above messages
|
||||
*** and install them before running configure again.
|
||||
***]])
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Create config files
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
version.py
|
||||
tests/Makefile
|
||||
src/Makefile
|
||||
examples/Makefile
|
||||
doc/Makefile])
|
||||
AC_CONFIG_FILES([setup.py], [chmod a+x setup.py])
|
||||
AC_OUTPUT
|
||||
|
||||
echo "
|
||||
GPG-PY v${VERSION} has been configured as follows:
|
||||
|
||||
Revision: mym4_revision (mym4_revision_dec)
|
||||
Platform: $host
|
||||
|
||||
Python versions: $PYTHON_VERSIONS
|
||||
"
|
||||
if test "x${gpg_config_script_warn}" != x; then
|
||||
cat <<G10EOF
|
||||
Mismatches between the target platform and the to
|
||||
be used libraries have been been detected for:
|
||||
${gpg_config_script_warn}
|
||||
Please check above for warning messages.
|
||||
|
||||
G10EOF
|
||||
fi
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user