Merge pull request #9097 from neheb/softe
[feed/packages.git] / libs / gnutls / patches / 001-no-autogen.patch
1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
2 diff --git a/configure.ac b/configure.ac
3 index 2112606601..e0c5c25d5b 100644
4 --- a/configure.ac
5 +++ b/configure.ac
6 @@ -735,7 +735,7 @@ if test "$enable_tools" != "no" || test "$enable_doc" != "no"; then
7 *** autogen not found. Will not link against system libopts.
8 *** ]])
9 dnl simulate specifying option on the command line
10 - enable_local_libopts=yes
11 + included_libopts=yes
12 fi
13 LIBOPTS_CHECK([src/libopts])
14 if test "$NEED_LIBOPTS_DIR" = "true";then
15 diff --git a/src/Makefile.am b/src/Makefile.am
16 index 0374924c53..8dac61cac5 100644
17 --- a/src/Makefile.am
18 +++ b/src/Makefile.am
19 @@ -272,6 +272,25 @@ libcmd_systemkey_la_LIBADD += $(LTLIBREADLINE) $(INET_PTON_LIB) $(LIB_CLOCK_GETT
20
21 SUFFIXES = .stamp .def .c.bak .h.bak
22
23 +if NEED_LIBOPTS
24 +# case --enable-local-libopts: We only call AUTOGEN if the .bak files are not present.
25 +# Normally we wouldn't want to call AUTOGEN here as it is explicitly asked not to, but
26 +# in certain CI systems, we need to use this
27 +# our CI systems, which work on
28 +.def.stamp:
29 + b=`echo $@ | sed 's/.stamp$$//'`; \
30 + if ! test -f $${srcdir}$${b}.c.bak;then \
31 + echo $${srcdir}$${b}.c.bak; \
32 + $(AUTOGEN) $<; \
33 + else \
34 + srcdir=$(srcdir)/; \
35 + rm -f $${b}.c $${b}.h; \
36 + cp -p $${srcdir}$${b}.c.bak $${b}.c; \
37 + cp -p $${srcdir}$${b}.h.bak $${b}.h; \
38 + fi
39 + touch $@
40 +else
41 +# default case. We call autogen, and if that fails we resort to the bundled files.
42 .def.stamp:
43 $(AM_V_GEN) $(AUTOGEN) $< || { \
44 srcdir=''; \
45 @@ -281,6 +300,7 @@ SUFFIXES = .stamp .def .c.bak .h.bak
46 cp -p $${srcdir}$${b}.h.bak $${b}.h; \
47 } && \
48 touch $@
49 +endif
50
51 .c.c.bak:
52 -@rm -f $@