mirror of
https://github.com/curl/curl.git
synced 2026-08-26 00:13:34 +03:00
build: use configurehelp.pm.in with autotools and cmake
Before this patch, each build tool generated `tests/configurehelp.pm` manually. Ref: https://github.com/curl/curl/pull/14802#issuecomment-2332734326 Closes #14819
This commit is contained in:
parent
7100c5bc9b
commit
867c187fdf
5 changed files with 62 additions and 60 deletions
32
acinclude.m4
32
acinclude.m4
|
|
@ -1518,44 +1518,20 @@ AC_DEFUN([CURL_CHECK_PKGCONFIG], [
|
|||
])
|
||||
|
||||
|
||||
dnl CURL_GENERATE_CONFIGUREHELP_PM
|
||||
dnl CURL_PREPARE_CONFIGUREHELP_PM
|
||||
dnl -------------------------------------------------
|
||||
dnl Generate test harness configurehelp.pm module, defining and
|
||||
dnl Prepare test harness configurehelp.pm module, defining and
|
||||
dnl initializing some perl variables with values which are known
|
||||
dnl when the configure script runs. For portability reasons, test
|
||||
dnl harness needs information on how to run the C preprocessor.
|
||||
|
||||
AC_DEFUN([CURL_GENERATE_CONFIGUREHELP_PM], [
|
||||
AC_DEFUN([CURL_PREPARE_CONFIGUREHELP_PM], [
|
||||
AC_REQUIRE([AC_PROG_CPP])dnl
|
||||
tmp_cpp=`eval echo "$ac_cpp" 2>/dev/null`
|
||||
if test -z "$tmp_cpp"; then
|
||||
tmp_cpp='cpp'
|
||||
fi
|
||||
cat >./tests/configurehelp.pm <<_EOF
|
||||
[@%:@] This is a generated file. Do not edit.
|
||||
|
||||
package configurehelp;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Exporter;
|
||||
|
||||
use vars qw(
|
||||
@ISA
|
||||
@EXPORT_OK
|
||||
\$Cpreprocessor
|
||||
);
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
|
||||
@EXPORT_OK = qw(
|
||||
\$Cpreprocessor
|
||||
);
|
||||
|
||||
\$Cpreprocessor = '$tmp_cpp';
|
||||
|
||||
1;
|
||||
_EOF
|
||||
AC_SUBST(CURL_CPP, $tmp_cpp)
|
||||
])
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue