autotools try fix 2

This commit is contained in:
Viktor Szakats 2025-08-01 02:56:47 +02:00
parent edbe142e3c
commit 48254f9d06
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
3 changed files with 34 additions and 15 deletions

View file

@ -1284,9 +1284,14 @@ AS_HELP_STRING([--without-ca-embed], [Don't embed a default CA bundle in the cur
CURL_CA_EMBED=''
if test "x$want_ca_embed" != "xno" -a "x$want_ca_embed" != "xunset" -a -f "$want_ca_embed"; then
CURL_CA_EMBED="$want_ca_embed"
AC_SUBST(CURL_CA_EMBED)
AC_MSG_RESULT([$want_ca_embed])
if test -n "$PERL"; then
CURL_CA_EMBED="$want_ca_embed"
AC_SUBST(CURL_CA_EMBED)
AC_MSG_RESULT([$want_ca_embed])
else
AC_MSG_RESULT([no])
AC_MSG_WARN([perl was not found. Will not do CA embed.])
fi
else
AC_MSG_RESULT([no])
fi

View file

@ -280,6 +280,11 @@ AS_HELP_STRING([--with-rustls=PATH],[where to look for Rustls, PATH points to th
fi
])
AC_PATH_PROG(PERL, perl,,
$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin)
AC_SUBST(PERL)
AM_CONDITIONAL(PERL, test -n "$PERL")
TEST_NGHTTPX=nghttpx
AC_ARG_WITH(test-nghttpx,dnl
AS_HELP_STRING([--with-test-nghttpx=PATH],[where to find nghttpx for testing]),
@ -1056,7 +1061,10 @@ AS_HELP_STRING([--disable-docs],[Disable documentation]),
AC_MSG_RESULT(yes)
BUILD_DOCS=1
)
if test -z "$PERL" -a "x$BUILD_DOCS" != "x0"; then
AC_MSG_WARN([perl was not found. Will not build documentation.])
BUILD_DOCS=0
fi
dnl ************************************************************
dnl disable C code generation support
@ -4218,16 +4226,6 @@ fi
CURL_CHECK_NONBLOCKING_SOCKET
AC_PATH_PROG(PERL, perl,,
$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin)
AC_SUBST(PERL)
if test "x$BUILD_DOCS" != "x0" -o "x$USE_MANUAL" != "x0" -o "x$CURL_CA_EMBED" != "x"; then
if test -z "$PERL"; then
AC_MSG_ERROR([perl was not found, needed for docs, manual and CA embed])
fi
fi
dnl set variable for use in automakefile(s)
AM_CONDITIONAL(BUILD_DOCS, test x"$BUILD_DOCS" = x1)

View file

@ -132,14 +132,16 @@ HUGEIT_0 = @echo " HUGE " $@;
HUGEIT_1 =
HUGEIT_ = $(HUGEIT_0)
curl_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_MANUAL
curl_CPPFLAGS = $(AM_CPPFLAGS)
if USE_MANUAL
# Here are the stuff to create a built-in manual
curl_CPPFLAGS += -DUSE_MANUAL
$(ASCIIPAGE):
cd $(top_builddir)/docs && $(MAKE)
if PERL
if HAVE_LIBZ
# This generates the tool_hugehelp.c file in both uncompressed and
# compressed formats.
@ -162,6 +164,20 @@ $(HUGE): $(ASCIIPAGE) $(MKHELP)
echo '#include "tool_setup.h"' >> $(HUGE); \
$(PERL) $(MKHELP) < $(ASCIIPAGE) >> $(HUGE) )
endif
else # PERL
$(HUGE):
(if [ -f "$(srcdir)/tool_hugehelp.c" ]; then \
cp -p "$(srcdir)/tool_hugehelp.c" .; \
else \
echo '/* !checksrc! disable COPYRIGHT all */' > $(HUGE); \
echo '#include "tool_hugehelp.h"' >> $(HUGE); \
echo 'void hugehelp(void) {}' >> $(HUGE); \
echo 'void showhelp(const char *trigger, const char *arg, const char *endarg)' >> $(HUGE); \
echo '{' >> $(HUGE); \
echo ' (void)trigger; (void)arg; (void)endarg;' >> $(HUGE); \
echo '}' >> $(HUGE); \
fi)
endif
else # USE_MANUAL
# built-in manual has been disabled, make a blank file