1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-04 09:43:08 +02:00

Remove autoconf/make build.

2.54.0 is the last release to support the autoconf/make build. Remove the autoconf/make build to reduce maintenance going forward.
This commit is contained in:
David Steele 2024-10-21 13:32:35 +03:00 committed by GitHub
parent 4125f726a8
commit 89c9baba72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 22 additions and 10878 deletions

View File

@ -164,7 +164,7 @@ jobs:
uses: actions/checkout@v4
- name: Install Packages
run: sudo apt-get install -y --no-install-recommends libyaml-dev
run: sudo apt-get install -y --no-install-recommends libyaml-dev meson
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
@ -172,7 +172,7 @@ jobs:
languages: ${{matrix.language}}
- name: Build
run: ${GITHUB_WORKSPACE?}/src/configure && make -j 2
run: meson setup ${HOME?}/build ${GITHUB_WORKSPACE?} && ninja -C ${HOME?}/build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

View File

@ -191,23 +191,3 @@ Commit and push to integration:
git commit -m "Begin v2.15.0 development."
git push origin integration
```
## Update automake/config scripts
These scripts are required by `src/config` and should be updated after each release, when needed. Note that these files are updated very infrequently.
Check the latest version of `automake` and see if it is > `1.16.5`:
```
https://git.savannah.gnu.org/gitweb/?p=automake.git
```
If so, update the version above and copy `lib/install-sh` from the `automake` repo to the `pgbackrest` repo at `[repo]/src/build/install-sh`:
```
wget -O pgbackrest/src/build/install-sh '[URL]'
```
Get the latest versions of `config.sub` and `config.guess`. These files are not versioned so the newest version is pulled at the beginning of the release cycle to allow time to test stability.
```
wget -O pgbackrest/src/build/config.guess 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
wget -O pgbackrest/src/build/config.sub 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'
```

View File

@ -1,2 +1,16 @@
<release date="XXXX-XX-XX" version="2.55dev" title="UNDER DEVELOPMENT">
<release-core-list>
<release-improvement-list>
<release-item>
<github-pull-request id="2470"/>
<release-item-contributor-list>
<release-item-contributor id="david.steele"/>
<release-item-reviewer id="david.christensen"/>
</release-item-contributor-list>
<p>Remove <proper>autoconf</proper>/<proper>make</proper> build.</p>
</release-item>
</release-improvement-list>
</release-core-list>
</release>

View File

@ -587,14 +587,10 @@
<execute-list host="{[br-install-host]}">
<title>Copy <backrest/> binary from build host</title>
<execute if="{[os-type-is-debian]}" user="root">
<execute user="root">
<exe-cmd>scp {[host-build]}:{[build-meson-path]}/src/pgbackrest /usr/bin</exe-cmd>
<exe-cmd-extra>2>&amp;1</exe-cmd-extra>
</execute>
<execute if="{[os-type-is-rhel]}" user="root">
<exe-cmd>scp {[host-build]}:{[build-br-path]}/src/pgbackrest /usr/bin</exe-cmd>
<exe-cmd-extra>2>&amp;1</exe-cmd-extra>
</execute>
<execute user="root">
<exe-cmd>chmod 755 /usr/bin/pgbackrest</exe-cmd>
@ -1006,10 +1002,6 @@
<p>When building from source it is best to use a build host rather than building on production. Many of the tools required for the build should generally not be installed in production. <backrest/> consists of a single executable so it is easy to copy to a new host once it is built.</p>
<p if="{[os-type-is-rhel]}">The preferred build method is <proper>meson</proper>/<proper>ninja</proper>, see <link url="user-guide.html#build">Build</link>. The <proper>autoconf</proper>/<proper>make</proper> method is shown here for legacy purposes.</p>
<p if="{[os-type-is-debian]}">The preferred build method is <proper>meson</proper>/<proper>ninja</proper> as shown below. The <proper>autoconf</proper>/<proper>make</proper> method is also provided for legacy purposes, see <link url="user-guide-rhel.html#build">Build</link>.</p>
<execute-list host="{[host-build]}">
<title>Download version <id>{[version]}</id> of <backrest/> to <path>{[build-path]}</path> path</title>
@ -1055,14 +1047,14 @@
<execute if="{[os-type-is-rhel]}" user="root" pre="y">
<exe-cmd>
yum install make gcc postgresql{[pg-version-nodot]}-devel openssl-devel
yum install meson gcc postgresql{[pg-version-nodot]}-devel openssl-devel
libxml2-devel lz4-devel libzstd-devel bzip2-devel libyaml-devel libssh2-devel
</exe-cmd>
<exe-cmd-extra>-y 2>&amp;1</exe-cmd-extra>
</execute>
</execute-list>
<execute-list if="{[os-type-is-debian]}" host="{[host-build]}">
<execute-list host="{[host-build]}">
<title>Configure and compile <backrest/></title>
<execute>
@ -1072,15 +1064,6 @@
<exe-cmd>ninja -C {[build-meson-path]}</exe-cmd>
</execute>
</execute-list>
<execute-list if="{[os-type-is-rhel]}" host="{[host-build]}">
<title>Configure and compile <backrest/></title>
<execute>
<exe-cmd>cd {[build-br-path]}/src &amp;&amp; ./configure &amp;&amp; make</exe-cmd>
<exe-cmd-extra>-j 4</exe-cmd-extra>
</execute>
</execute-list>
</section>
<!-- ======================================================================================================================= -->
@ -3883,11 +3866,9 @@
Once the stress test has been run, it is common to perform some additional tests with a custom/debug build.
To initialize the build, run the following. This only needs to be done once per doc build or branch change, though running it more that once only costs additional time:
docker exec -it doc-build bash -c 'rm -rf /build/dev && mkdir -p /build/dev && cd /build/dev && /pgbackrest/src/configure -\-enable-test'
docker exec -it doc-build bash -c 'rm -rf /build/dev && meson setup -Dbuildtype=debug /build/dev /pgbackrest'
One each host where a new build is required, run the following. This will build pgbackrest, copy it to the host, and display the build time for sanity:
docker exec -it <container> bash -c 'ssh build make -C /build/dev -j 8 && scp build:/build/dev/pgbackrest /usr/bin && ls -lah /usr/bin/pgbackrest'
docker exec -it <container> bash -c 'ssh build ninja -C /build/dev && scp build:/build/dev/src/pgbackrest /usr/bin && ls -lah /usr/bin/pgbackrest'
============================================================================================================================ -->
<section id="stress" if="'{[stress]}' eq 'y'">

View File

@ -1,306 +0,0 @@
####################################################################################################################################
# pgBackRest Makefile
####################################################################################################################################
####################################################################################################################################
# List of required source files. main.c should always be listed last and the rest in alpha order.
####################################################################################################################################
SRCS_COMMON = \
common/compress/bz2/common.c \
common/compress/bz2/compress.c \
common/debug.c \
common/encode.c \
common/error/error.c \
common/io/filter/buffer.c \
common/io/filter/filter.c \
common/io/filter/group.c \
common/io/filter/sink.c \
common/io/bufferRead.c \
common/io/bufferWrite.c \
common/io/io.c \
common/io/read.c \
common/io/write.c \
common/log.c \
common/memContext.c \
common/stackTrace.c \
common/time.c \
common/type/blob.c \
common/type/buffer.c \
common/type/convert.c \
common/type/keyValue.c \
common/type/list.c \
common/type/object.c \
common/type/pack.c \
common/type/stringId.c \
common/type/stringList.c \
common/type/stringStatic.c \
common/type/stringZ.c \
common/type/variant.c \
common/type/variantList.c \
common/user.c \
common/wait.c \
config/common.c \
storage/posix/read.c \
storage/posix/storage.c \
storage/posix/write.c \
storage/iterator.c \
storage/list.c \
storage/read.c \
storage/storage.c \
storage/write.c
SRCS = \
command/annotate/annotate.c \
command/archive/common.c \
command/archive/find.c \
command/archive/get/file.c \
command/archive/get/get.c \
command/archive/get/protocol.c \
command/archive/push/file.c \
command/archive/push/protocol.c \
command/archive/push/push.c \
command/backup/backup.c \
command/backup/blockIncr.c \
command/backup/blockMap.c \
command/backup/common.c \
command/backup/pageChecksum.c \
command/backup/protocol.c \
command/backup/file.c \
command/check/check.c \
command/check/common.c \
command/check/report.c \
command/expire/expire.c \
command/exit.c \
command/help/help.c \
command/info/info.c \
command/command.c \
command/control/common.c \
command/control/start.c \
command/control/stop.c \
command/local/local.c \
command/lock.c \
command/manifest/manifest.c \
command/repo/common.c \
command/repo/get.c \
command/repo/ls.c \
command/repo/put.c \
command/repo/rm.c \
command/restore/blockChecksum.c \
command/restore/blockDelta.c \
command/restore/file.c \
command/restore/protocol.c \
command/restore/restore.c \
command/remote/remote.c \
command/server/ping.c \
command/server/server.c \
command/stanza/common.c \
command/stanza/create.c \
command/stanza/delete.c \
command/stanza/upgrade.c \
command/verify/file.c \
command/verify/protocol.c \
command/verify/verify.c \
common/compress/helper.c \
common/compress/bz2/decompress.c \
common/compress/gz/common.c \
common/compress/gz/compress.c \
common/compress/gz/decompress.c \
common/compress/lz4/common.c \
common/compress/lz4/compress.c \
common/compress/lz4/decompress.c \
common/compress/zst/common.c \
common/compress/zst/compress.c \
common/compress/zst/decompress.c \
common/crypto/cipherBlock.c \
common/crypto/common.c \
common/crypto/hash.c \
common/crypto/xxhash.c \
common/error/retry.c \
common/exec.c \
common/fork.c \
common/ini.c \
common/io/client.c \
common/io/fd.c \
common/io/fdRead.c \
common/io/fdWrite.c \
common/io/filter/size.c \
common/io/http/client.c \
common/io/http/common.c \
common/io/http/header.c \
common/io/http/query.c \
common/io/http/request.c \
common/io/http/response.c \
common/io/http/session.c \
common/io/http/url.c \
common/io/limitRead.c \
common/io/server.c \
common/io/session.c \
common/io/socket/address.c \
common/io/socket/client.c \
common/io/socket/common.c \
common/io/socket/server.c \
common/io/socket/session.c \
common/io/tls/client.c \
common/io/tls/common.c \
common/io/tls/server.c \
common/io/tls/session.c \
common/lock.c \
common/regExp.c \
common/stat.c \
common/type/json.c \
common/type/string.c \
common/type/xml.c \
config/config.c \
config/exec.c \
config/load.c \
config/parse.c \
config/protocol.c \
db/db.c \
db/helper.c \
db/protocol.c \
info/info.c \
info/infoArchive.c \
info/infoBackup.c \
info/manifest.c \
info/infoPg.c \
postgres/client.c \
postgres/interface.c \
postgres/interface/crc32.c \
postgres/interface/page.c \
protocol/client.c \
protocol/helper.c \
protocol/parallel.c \
protocol/parallelJob.c \
protocol/server.c \
storage/azure/helper.c \
storage/azure/read.c \
storage/azure/storage.c \
storage/azure/write.c \
storage/cifs/helper.c \
storage/cifs/storage.c \
storage/gcs/helper.c \
storage/gcs/read.c \
storage/gcs/storage.c \
storage/gcs/write.c \
storage/helper.c \
storage/remote/read.c \
storage/remote/protocol.c \
storage/remote/storage.c \
storage/remote/write.c \
storage/s3/helper.c \
storage/s3/read.c \
storage/s3/storage.c \
storage/s3/write.c \
storage/sftp/helper.c \
storage/sftp/read.c \
storage/sftp/storage.c \
storage/sftp/write.c
####################################################################################################################################
# Compiler options
####################################################################################################################################
CC = @CC@
CFLAGS = $(CFLAGS_EXTRA) @CFLAGS@
CPPFLAGS = @CPPFLAGS@ -I. -I@srcdir@
LDFLAGS = $(LDFLAGS_EXTRA) @LDFLAGS@
LIBS = @LIBS@
LIBS_BUILD = @LIBS_BUILD@
####################################################################################################################################
# Directory options
####################################################################################################################################
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
BUILDDIR=.build
####################################################################################################################################
# Compile and link pgbackrest
####################################################################################################################################
OBJS_PGBACKREST = $(patsubst %.c,$(BUILDDIR)/%.o,$(SRCS_COMMON) $(SRCS) main.c)
pgbackrest: $(OBJS_PGBACKREST)
$(CC) -o pgbackrest $(OBJS_PGBACKREST) $(LDFLAGS) $(LIBS)
####################################################################################################################################
# Compile and link code builder
####################################################################################################################################
SRCS_BUILD_CODE = \
build/common/regExp.c \
build/common/render.c \
build/common/string.c \
build/common/xml.c \
build/common/yaml.c \
build/config/parse.c \
build/config/render.c \
build/error/parse.c \
build/error/render.c \
build/help/parse.c \
build/help/render.c \
build/postgres/parse.c \
build/postgres/render.c \
build/main.c
OBJS_BUILD_CODE = $(patsubst %.c,$(BUILDDIR)/%.o,$(SRCS_COMMON) $(SRCS_BUILD_CODE))
build-code: $(OBJS_BUILD_CODE) build/postgres/postgres.yaml build/config/config.yaml build/help/help.xml
$(CC) -o build-code $(OBJS_BUILD_CODE) $(LDFLAGS) $(LIBS) $(LIBS_BUILD)
# Build help.auto.c.inc
command/help/help.auto.c.inc: build-code
./build-code help $(VPATH)
# Build interface.auto.c.inc
postgres/interface.auto.c.inc: build-code
./build-code postgres $(VPATH)
####################################################################################################################################
# Installation. DESTDIR can be used to modify the install location.
####################################################################################################################################
install: pgbackrest
install -d $(DESTDIR)$(bindir)
install -m 755 pgbackrest $(DESTDIR)$(bindir)
####################################################################################################################################
# Uninstallation. DESTDIR should be set to the same value as when installed.
####################################################################################################################################
uninstall:
rm -f $(DESTDIR)$(bindir)/pgbackrest
####################################################################################################################################
# Clean
####################################################################################################################################
.PHONY = clean
# Clean build files and executable created by make
clean:
rm -rf $(BUILDDIR)
rm -f pgbackrest build-code command/help/help.auto.c.inc postgres/interface.auto.c.inc
.PHONY = clean-all
# Do clean and also remove all output from configure
clean-all: clean
rm -f build.auto.h config.log config.status Makefile
####################################################################################################################################
# Special per-object flags
####################################################################################################################################
$(BUILDDIR)/postgres/interface/page.o: CFLAGS += @CFLAGS_PAGE_CHECKSUM@
$(BUILDDIR)/postgres/interface.o: postgres/interface.auto.c.inc
$(BUILDDIR)/main.o: command/help/help.auto.c.inc
####################################################################################################################################
# Compile and generate dependencies
####################################################################################################################################
$(BUILDDIR)/%.o : %.c
@if test ! -d $(@D); then mkdir -p $(@D); fi
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< -MMD -MP -MF $(BUILDDIR)/$*.dep
# Recursive wildcard function
rwildcard = $(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
# Include dependency files
DEP_FILES = $(call rwildcard,$(BUILDDIR),*.dep)
-include $(DEP_FILES)

View File

@ -1,53 +0,0 @@
/***********************************************************************************************************************************
Build Flags Generated by Configure
***********************************************************************************************************************************/
#include "version.h"
// Are test code and asserts disabled? NDEBUG can be confusing to work with because, when debugging, #ifndef NDEBUG must be used for
// #defines, so also #define DEBUG in this case to make #ifdefs simpler.
#undef NDEBUG
#ifndef NDEBUG
#define DEBUG
#endif
// Does the compiler provide _Static_assert()?
#undef HAVE_STATIC_ASSERT
// Does the compiler provide __builtin_types_compatible_p()?
#undef HAVE_BUILTIN_TYPES_COMPATIBLE_P
// Is libbacktrace present?
#undef HAVE_LIBBACKTRACE
// Is liblz4 present?
#undef HAVE_LIBLZ4
// Is libzstd present?
#undef HAVE_LIBZST
// Is libssh2 present?
#undef HAVE_LIBSSH2
// Configuration path
#undef CFGOPTDEF_CONFIG_PATH
// Require zlib const input buffer
#define ZLIB_CONST
// Indicate that a function does not return
#define FN_NO_RETURN __attribute__((__noreturn__))
// Indicate that a function should always be inlined
#define FN_INLINE_ALWAYS __attribute__((always_inline)) static inline
// Indicate that a function is formatted like printf (and provide format and args position)
#define FN_PRINTF(fmt, args) __attribute__((format(printf, fmt, args)))
// Indicate that a function is formatted like strftime (and provide format position)
#define FN_STRFTIME(fmt) __attribute__((format(strftime, fmt, 0)))
// Extern function/variable required by other compilation units. Changing these to static is a meson-only feature.
#define FN_EXTERN extern
#define VR_EXTERN_DECLARE extern
#define VR_EXTERN_DEFINE

67
src/build/aclocal.m4 vendored
View File

@ -1,67 +0,0 @@
# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# 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.
# 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.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's compiler
# or gives an error. (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 6
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS

1812
src/build/config.guess vendored

File diff suppressed because it is too large Load Diff

1971
src/build/config.sub vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,191 +0,0 @@
# Initialize configuration
# ----------------------------------------------------------------------------------------------------------------------------------
AC_PREREQ([2.71])
AC_INIT([pgBackRest], [2.55dev])
AC_CONFIG_SRCDIR([version.h])
AC_CONFIG_AUX_DIR(build)
# Don't add any CFLAGS by default (otherwise -g -O2 will be added)
# ----------------------------------------------------------------------------------------------------------------------------------
: ${CFLAGS=""}
# Build C standard based on the host type. C99 is required and other flags are added depending on the host.
# ----------------------------------------------------------------------------------------------------------------------------------
AC_PROG_CC
AC_CANONICAL_HOST
AC_SUBST(CFLAGS, "${CFLAGS} -std=c99")
case $host_os in
darwin*)
AC_SUBST(CPPFLAGS, "${CPPFLAGS} -D_DARWIN_C_SOURCE")
;;
linux*)
AC_SUBST(CPPFLAGS, "${CPPFLAGS} -D_POSIX_C_SOURCE=200809L")
;;
esac
# Check if the C compiler supports _Static_assert()
#
# Test the syntax ({_Static_assert(...)}) because gcc-style compound expressions are needed to wrap it into macros.
# ----------------------------------------------------------------------------------------------------------------------------------
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [({_Static_assert(1, "foo");})])], [AC_DEFINE(HAVE_STATIC_ASSERT)])
# Check if the C compiler supports __builtin_types_compatible_p()
# ----------------------------------------------------------------------------------------------------------------------------------
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([], [[int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];]])],
[AC_DEFINE(HAVE_BUILTIN_TYPES_COMPATIBLE_P)])
# Include the build directory
# ----------------------------------------------------------------------------------------------------------------------------------
AC_SUBST(CPPFLAGS, "${CPPFLAGS} -I.")
# Check backtrace library
# ----------------------------------------------------------------------------------------------------------------------------------
AC_CHECK_LIB(
[backtrace], [backtrace_full],
[AC_CHECK_HEADER(backtrace.h, [AC_DEFINE(HAVE_LIBBACKTRACE) AC_SUBST(LIBS, "${LIBS} -lbacktrace")],
[AC_MSG_ERROR([header file <backtrace.h> is required])])])
# Check required pq library
# ----------------------------------------------------------------------------------------------------------------------------------
AC_ARG_VAR(PG_CONFIG, [path to pg_config utility])dnl
if test -z "$PG_CONFIG"; then
PG_CONFIG="pg_config"
fi
AC_CHECK_PROG(PG_CONFIG_EXISTS, [${PG_CONFIG?}], ["yes"], ["no"])
if test ${PG_CONFIG_EXISTS?} == yes
then
AC_SUBST(CPPFLAGS, "${CPPFLAGS} -I`${PG_CONFIG?} --includedir`")
AC_SUBST(LDFLAGS, "${LDFLAGS} -L`${PG_CONFIG?} --libdir`")
fi
AC_CHECK_LIB([pq], [PQconnectdb], [], [AC_MSG_ERROR([library 'pq' is required])])
AC_CHECK_HEADER(libpq-fe.h, [], [AC_MSG_ERROR([header file <libpq-fe.h> is required])])
# Check required openssl libraries
# ----------------------------------------------------------------------------------------------------------------------------------
AC_CHECK_LIB([crypto], [EVP_get_digestbyname], [], [AC_MSG_ERROR([library 'crypto' is required])])
AC_CHECK_LIB([ssl], [SSL_new], [], [AC_MSG_ERROR([library 'ssl' is required])])
# Check required xml library
# ----------------------------------------------------------------------------------------------------------------------------------
AC_ARG_VAR(XML2_CONFIG, [path to xml2 config utility])dnl
if test -z "$XML2_CONFIG"; then
XML2_CONFIG="pkg-config libxml-2.0"
fi
AC_CHECK_PROG(XML2_CONFIG_EXISTS, [${XML2_CONFIG?}], ["yes"], ["no"])
if test ${XML2_CONFIG_EXISTS?} == yes
then
AC_SUBST(CPPFLAGS, "$CPPFLAGS `${XML2_CONFIG?} --cflags`")
fi
AC_CHECK_LIB([xml2], [xmlSaveToBuffer], [], [AC_MSG_ERROR([library 'xml2' is required])])
AC_CHECK_HEADER(libxml/parser.h, [], [AC_MSG_ERROR([header file <libxml/parser.h> is required])])
# Check required yaml library (only required for build)
# ----------------------------------------------------------------------------------------------------------------------------------
AC_CHECK_LIB(
[yaml], [yaml_parser_initialize], [AC_SUBST(LIBS_BUILD, "${LIBS_BUILD} -lyaml")], [AC_MSG_ERROR([library 'yaml' is required])])
AC_CHECK_HEADER(zlib.h, [], [AC_MSG_ERROR([header file <yaml.h> is required])])
# Check required gz library
# ----------------------------------------------------------------------------------------------------------------------------------
AC_CHECK_LIB([z], [deflate], [], [AC_MSG_ERROR([library 'z' is required])])
AC_CHECK_HEADER(zlib.h, [], [AC_MSG_ERROR([header file <zlib.h> is required])])
# Check required bzip2 library
# ----------------------------------------------------------------------------------------------------------------------------------
AC_CHECK_LIB([bz2], [BZ2_bzCompress], [], [AC_MSG_ERROR([library 'bz2' is required])])
AC_CHECK_HEADER(bzlib.h, [], [AC_MSG_ERROR([header file <bzlib.h> is required])])
# Check optional lz4 library
# ----------------------------------------------------------------------------------------------------------------------------------
AC_CHECK_LIB(
[lz4], [LZ4F_isError],
[AC_CHECK_HEADER(lz4frame.h, [AC_DEFINE(HAVE_LIBLZ4) AC_SUBST(LIBS, "${LIBS} -llz4")],
[AC_MSG_ERROR([header file <lz4frame.h> is required])])])
# Check optional libSSH2 library
# ----------------------------------------------------------------------------------------------------------------------------------
AC_CHECK_LIB(
[ssh2], [libssh2_init],
[AC_CHECK_HEADER(libssh2.h, [AC_DEFINE(HAVE_LIBSSH2) AC_SUBST(LIBS, "${LIBS} -lssh2")],
[AC_MSG_ERROR([header file <libssh2.h> is required])])])
AC_CHECK_LIB(
[ssh2], [libssh2_sftp_init],
[AC_CHECK_HEADER(libssh2_sftp.h, [],
[AC_MSG_ERROR([header file <libssh2_sftp.h> is required])])])
# Check optional zst library. Ignore any versions below 1.0.
# ----------------------------------------------------------------------------------------------------------------------------------
AC_CHECK_LIB(
[zstd], [ZSTD_isError],
[AC_CHECK_HEADER(zstd.h,
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <zstd.h>],
[#if ZSTD_VERSION_MAJOR < 1
#error "ZSTD_VERSION_MAJOR must be >= 1"
#endif])],
[AC_DEFINE(HAVE_LIBZST) AC_SUBST(LIBS, "${LIBS} -lzstd")])],
[AC_MSG_ERROR([header file <zstd.h> is required])])])
# Set configuration path
# ----------------------------------------------------------------------------------------------------------------------------------
AC_ARG_WITH(
[configdir], [AS_HELP_STRING([--with-configdir=DIR], [default configuration path])],
[AC_DEFINE_UNQUOTED([CFGOPTDEF_CONFIG_PATH], ["${withval}"])],
[AC_DEFINE_UNQUOTED([CFGOPTDEF_CONFIG_PATH], ["/etc/" PROJECT_BIN])])
# Set warnings and optimizations based on build type (i.e. production or test)
# ----------------------------------------------------------------------------------------------------------------------------------
AC_SUBST(CFLAGS, "${CFLAGS} -Wall -Wextra -Wno-missing-field-initializers -Wno-implicit-fallthrough")
# -Wno-clobbered is not supported on all compilers
AX_CHECK_COMPILE_FLAG([-Wno-clobbered], [AC_SUBST(CFLAGS, "${CFLAGS} -Wno-clobbered")], [], [-Werror])
AC_ARG_ENABLE(
test, [AS_HELP_STRING([--enable-test], [enable internal test code and assertions for debugging])])
if test "$enable_test" != yes
then
AC_DEFINE(NDEBUG)
# Enable optimizations if not testing and they have not been disabled
AC_ARG_ENABLE(optimize, [AS_HELP_STRING([--disable-optimize], [disable compiler optimizations])])
if test "$enable_optimize" != no
then
AC_SUBST(CFLAGS, "${CFLAGS} -O2")
AC_SUBST(CFLAGS_PAGE_CHECKSUM, "-funroll-loops -ftree-vectorize")
fi
else
# Check for optional warnings (note that these must be checked before the additional warnings below are added)
AX_CHECK_COMPILE_FLAG([-Wformat-signedness], [AC_SUBST(CFLAGS, "${CFLAGS} -Wformat-signedness")], [], [-Werror])
AX_CHECK_COMPILE_FLAG([-Wduplicated-branches], [AC_SUBST(CFLAGS, "${CFLAGS} -Wduplicated-branches")], [], [-Werror])
AX_CHECK_COMPILE_FLAG([-Wduplicated-cond], [AC_SUBST(CFLAGS, "${CFLAGS} -Wduplicated-cond")], [], [-Werror])
# Add additional warnings
AC_SUBST(CFLAGS, "${CFLAGS} -Wwrite-strings -Wconversion -Wformat=2 -Wformat-nonliteral -Wstrict-prototypes -Wpointer-arith")
AC_SUBST(CFLAGS, "${CFLAGS} -Wvla")
# Add error on warnings and stop on first error
AC_SUBST(CFLAGS, "${CFLAGS} -Werror -Wfatal-errors")
# Add debug info
AC_SUBST(CFLAGS, "${CFLAGS} -g")
fi
# Write output
# ----------------------------------------------------------------------------------------------------------------------------------
AC_CONFIG_HEADERS([build.auto.h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View File

@ -1,541 +0,0 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2020-11-14.01; # 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.
tab=' '
nl='
'
IFS=" $tab$nl"
# Set DOITPROG to "echo" to test this script.
doit=${DOITPROG-}
doit_exec=${doit:-exec}
# 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_mkdir=
# Desired mode of installed file.
mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
is_target_a_directory=possibly
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 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.
-p pass -p to $cpprog.
-s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-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
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
"
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
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;;
-S) backupsuffix="$2"
shift;;
-t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
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
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
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=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
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.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0
else
dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# 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
# The $RANDOM variable is not portable (e.g., dash). Use it
# here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap '
ret=$?
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/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.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# 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
oIFS=$IFS
IFS=/
set -f
set fnord $dstdir
shift
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=${dstdirslash}_inst.$$_
rmtmp=${dstdirslash}_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 &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$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` &&
set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# 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 "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd "$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 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

5753
src/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -675,18 +675,6 @@ meson_options.txt:
class: build
type: meson
src/Makefile.in:
class: build
type: make
src/build.auto.h.in:
class: core
type: c/h
src/build/aclocal.m4:
class: build
type: make
src/build/common/exec.c:
class: build
type: c
@ -743,14 +731,6 @@ src/build/common/yaml.h:
class: build
type: c/h
src/build/config.guess:
class: build
type: make
src/build/config.sub:
class: build
type: make
src/build/config/config.yaml:
class: build
type: yaml
@ -771,10 +751,6 @@ src/build/config/render.h:
class: build
type: c/h
src/build/configure.ac:
class: build
type: make
src/build/error/error.yaml:
class: build
type: yaml
@ -797,7 +773,7 @@ src/build/error/render.h:
src/build/help/help.xml:
class: build
type: make
type: xml
src/build/help/parse.c:
class: build
@ -815,10 +791,6 @@ src/build/help/render.h:
class: build
type: c/h
src/build/install-sh:
class: build
type: make
src/build/main.c:
class: build
type: c
@ -2035,10 +2007,6 @@ src/config/protocol.h:
class: core
type: c/h
src/configure:
class: build
type: make
src/db/db.c:
class: core
type: c

View File

@ -79,8 +79,8 @@ sub codeCountScan
{
$strClass = 'doc/core';
}
elsif ($strFile =~ '^build/' || $strFile eq 'src/Makefile.in' || $strFile eq 'src/configure' ||
$strFile =~ '^src/build/' || $strFile =~ 'meson\.build$' || $strFile =~ 'meson_options\.txt$')
elsif ($strFile =~ '^build/' || $strFile =~ '^src/build/' || $strFile =~ 'meson\.build$' ||
$strFile =~ 'meson_options\.txt$')
{
$strClass = 'build';
}
@ -134,11 +134,6 @@ sub codeCountScan
$strType = 'yaml';
$strForceLang = 'YAML';
}
elsif ($strFile =~ 'Makefile\.in$' || $strFile =~ '^src\/configure' || $strFile =~ '^src\/build\/')
{
$strType = 'make';
$strForceLang = 'make';
}
elsif ($strFile =~ 'meson\.build$' || $strFile =~ 'meson_options\.txt$')
{
$strType = 'meson';

View File

@ -429,104 +429,6 @@ eval
}
}
# Auto-generate configure files unless --min-gen specified
#-------------------------------------------------------------------------------------------------------------------------------
if (!$bMinGen)
{
&log(INFO, "autogenerate configure");
# Auto-generate version for configure.ac script
#-----------------------------------------------------------------------------------------------------------------------
my $strConfigureAcOld = ${$oStorageTest->get("${strBackRestBase}/src/build/configure.ac")};
my $strConfigureAcNew;
foreach my $strLine (split("\n", $strConfigureAcOld))
{
if ($strLine =~ /^AC_INIT\(/)
{
$strLine = 'AC_INIT([' . PROJECT_NAME . '], [' . PROJECT_VERSION . '])';
}
$strConfigureAcNew .= "${strLine}\n";
}
# Save into the src dir
my @stryBuilt;
my $strBuilt = 'src/build/configure.ac';
if (buildPutDiffers($oStorageBackRest, "${strBackRestBase}/${strBuilt}", $strConfigureAcNew))
{
push(@stryBuilt, $strBuilt);
}
# Error when checking that files have already been generated but they change
if ($bGenCheck && @stryBuilt)
{
confess &log(
ERROR,
"unexpected autogeneration of version in configure.ac script: " . join(', ', @stryBuilt) . ":\n" .
trim(executeTest("git -C ${strBackRestBase} diff")));
}
&log(INFO,
" autogenerated version in configure.ac script: " . (@stryBuilt ? join(', ', @stryBuilt) : 'no changes'));
# Auto-generate configure script
#-----------------------------------------------------------------------------------------------------------------------
# Set build file
@stryBuilt = ();
$strBuilt = 'src/configure';
# Get configure.ac and configure to see if anything has changed
my $strConfigureAc = ${$oStorageBackRest->get('src/build/configure.ac')};
my $strConfigureAcHash = sha1_hex($strConfigureAc);
my $rstrConfigure = $oStorageBackRest->get($oStorageBackRest->openRead($strBuilt, {bIgnoreMissing => true}));
# Check if configure needs to be regenerated
if (!defined($rstrConfigure) || !defined($$rstrConfigure) ||
$strConfigureAcHash ne substr($$rstrConfigure, length($$rstrConfigure) - 41, 40))
{
# Generate aclocal.m4
my $strAcLocal = executeTest("cd ${strBackRestBase}/src/build && aclocal --OUT=-");
$strAcLocal = trim($strAcLocal) . "\n";
buildPutDiffers($oStorageBackRest, "${strBackRestBase}/src/build/aclocal.m4", $strAcLocal);
# Generate configure
my $strConfigure = executeTest("cd ${strBackRestBase}/src/build && autoconf --output=-");
$strConfigure =
trim($strConfigure) . "\n\n# Generated from src/build/configure.ac sha1 ${strConfigureAcHash}\n";
# Remove cache created by autconf
executeTest("rm -rf ${strBackRestBase}/src/build/autom4te.cache");
# Remove unused options from help
my $strDirList =
"sbin|libexec|sysconf|sharedstate|localstate|runstate|lib|include|oldinclude|dataroot|data|info" .
"|locale|man|doc|html|dvi|pdf|ps";
$strConfigure =~ s/^ --(${strDirList})*dir=DIR.*\n//mg;
# Save into the src dir
$oStorageBackRest->put(
$oStorageBackRest->openWrite("${strBackRestBase}/${strBuilt}", {strMode => '0755'}), $strConfigure);
# Add to built list
push(@stryBuilt, $strBuilt);
}
# Error when checking that files have already been generated but they change
if ($bGenCheck && @stryBuilt)
{
confess &log(
ERROR,
"unexpected autogeneration of configure script: " . join(', ', @stryBuilt) . ":\n" .
trim(executeTest("git -C ${strBackRestBase} diff")));
}
&log(INFO, " autogenerated configure script: " . (@stryBuilt ? join(', ', @stryBuilt) : 'no changes'));
}
# Auto-generate version for root meson.build script
#-------------------------------------------------------------------------------------------------------------------------------
my $strMesonBuildOld = ${$oStorageTest->get("${strBackRestBase}/meson.build")};
@ -651,8 +553,6 @@ eval
if ($strFile eq 'doc/doc.pl' ||
$strFile eq 'doc/release.pl' ||
$strFile eq 'src/build/install-sh' ||
$strFile eq 'src/configure' ||
$strFile eq 'test/ci.pl' ||
$strFile eq 'test/test.pl' ||
$hManifest->{$strFile}{type} eq 'd')