added configure option for reproducible builds (static values in BUILDDATE and BUILDSTR)
This commit is contained in:
parent
88f601c6cf
commit
f47a3e0f0b
18
configure.ac
18
configure.ac
@ -58,6 +58,7 @@ dnl 28-May-2017 tries going for CentOS7 as development platform,
|
||||
dnl lots of cleanup needed for autoconf (2.69),
|
||||
dnl automake (1.13.4), libtool/libltdl (2.4.2)
|
||||
dnl 25-Aug-2020 tries releae 0.8.3
|
||||
dnl 17-Feb-2022 tries add option for reproducible builds
|
||||
dnl
|
||||
dnl
|
||||
|
||||
@ -389,6 +390,23 @@ dnl --with-custom-fwmodule
|
||||
AC_MSG_RESULT($FWLIBS), AC_MSG_RESULT(no))
|
||||
|
||||
|
||||
dnl
|
||||
dnl add
|
||||
dnl --enable-reproducible-build
|
||||
reproducible_build="no"
|
||||
AC_MSG_CHECKING(whether to enable a reproducible build)
|
||||
AC_ARG_ENABLE(reproducible-build,
|
||||
[ --enable-reproducible-build
|
||||
enable reproducible build (default is no)],
|
||||
[ if test "x$enableval" = "xyes"; then
|
||||
reproducible_build="yes"
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
], [AC_MSG_RESULT(no)])
|
||||
AM_CONDITIONAL(REPRODUCIBLE_BUILD, test "x$reproducible_build" = "xyes")
|
||||
|
||||
dnl
|
||||
dnl Checks for header files.
|
||||
dnl
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2002-2017 Thomas Ries <tries@gmx.net>
|
||||
# Copyright (C) 2002-2022 Thomas Ries <tries@gmx.net>
|
||||
#
|
||||
# This file is part of Siproxd.
|
||||
#
|
||||
@ -19,10 +19,18 @@
|
||||
#
|
||||
|
||||
|
||||
if REPRODUCIBLE_BUILD
|
||||
BUILDDATE="\"unknown\""
|
||||
BUILDSTR="\"none\""
|
||||
else
|
||||
BUILDDATE="\"`date -u '+%Y-%m-%dT%H:%M:%S'`\""
|
||||
BUILDSTR="\"`cat .buildno`\""
|
||||
endif
|
||||
|
||||
AM_CFLAGS = -D_GNU_SOURCE $(LTDLDEF) \
|
||||
-Werror-implicit-function-declaration \
|
||||
-DBUILDSTR="\"`cat .buildno`\"" \
|
||||
-DBUILDDATE="\"`date -u '+%Y-%m-%dT%H:%M:%S'`\""
|
||||
-DBUILDSTR=$(BUILDSTR) \
|
||||
-DBUILDDATE=$(BUILDDATE)
|
||||
#&&&INCLUDES = $(LTDLINCL)
|
||||
AM_CPPFLAGS = $(LTDLINCL)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user