From b1594980fcc6e1ecf6029e444a796a52be89631d Mon Sep 17 00:00:00 2001 From: Dianne Skoll Date: Sun, 13 Feb 2022 10:42:50 -0500 Subject: [PATCH] Add --disable-perl-build-artifacts flag to configure. --- configure | 25 +++++++++++++++++++++++++ configure.in | 12 ++++++++++++ rem2pdf/Makefile.top.in | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/configure b/configure index beb57a88..2ca51930 100755 --- a/configure +++ b/configure @@ -622,6 +622,7 @@ ac_includes_default="\ ac_header_list= ac_subst_vars='LTLIBOBJS LIBOBJS +PERLARTIFACTS VERSION EGREP GREP @@ -681,6 +682,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_perl_build_artifacts ' ac_precious_vars='build_alias host_alias @@ -1305,6 +1307,13 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-perl-build-artifacts + Disable perllocal.pod and .packlist generation + Some influential environment variables: CC C compiler command CFLAGS C compiler flags @@ -2292,6 +2301,15 @@ EOF ac_config_headers="$ac_config_headers src/config.h" +# Check whether --enable-perl-build-artifacts was given. +if test "${enable_perl_build_artifacts+set}" = set; then : + enableval=$enable_perl_build_artifacts; ac_cv_perlartifacts=$enableval +else + ac_cv_perlartifacts=yes +fi + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3958,6 +3976,12 @@ if test "$GCC" = yes; then CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes" fi +if test "$ac_cv_perlartifacts" = "yes" ; then + PERLARTIFACTS= +else + PERLARTIFACTS='NO_PACKLIST=1 NO_PERLLOCAL=1' +fi + for ac_func in setenv unsetenv glob mbstowcs setlocale initgroups do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -3973,6 +3997,7 @@ done VERSION=03.04.00 + ac_config_files="$ac_config_files src/Makefile www/Makefile src/version.h rem2html/Makefile rem2pdf/Makefile.PL rem2pdf/Makefile.top rem2pdf/bin/rem2pdf" cat >confcache <<\_ACEOF diff --git a/configure.in b/configure.in index b495b5ed..de249178 100644 --- a/configure.in +++ b/configure.in @@ -13,6 +13,11 @@ cat <<'EOF' EOF AC_CONFIG_HEADER(src/config.h) + +AC_ARG_ENABLE(perl-build-artifacts, +[ --disable-perl-build-artifacts + Disable perllocal.pod and .packlist generation], ac_cv_perlartifacts=$enableval, ac_cv_perlartifacts=yes) + AH_BOTTOM([#include ]) dnl Checks for programs. @@ -45,9 +50,16 @@ if test "$GCC" = yes; then CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes" fi +if test "$ac_cv_perlartifacts" = "yes" ; then + PERLARTIFACTS= +else + PERLARTIFACTS='NO_PACKLIST=1 NO_PERLLOCAL=1' +fi + AC_CHECK_FUNCS(setenv unsetenv glob mbstowcs setlocale initgroups) VERSION=03.04.00 AC_SUBST(VERSION) AC_SUBST(PERL) +AC_SUBST(PERLARTIFACTS) AC_OUTPUT(src/Makefile www/Makefile src/version.h rem2html/Makefile rem2pdf/Makefile.PL rem2pdf/Makefile.top rem2pdf/bin/rem2pdf) chmod a+x rem2pdf/bin/rem2pdf diff --git a/rem2pdf/Makefile.top.in b/rem2pdf/Makefile.top.in index 7be2ba9a..05a54592 100644 --- a/rem2pdf/Makefile.top.in +++ b/rem2pdf/Makefile.top.in @@ -39,4 +39,4 @@ install: exit 1; Makefile: Makefile.PL - $(PERL) Makefile.PL INSTALL_BASE=$(INSTALL_BASE) || true + $(PERL) Makefile.PL @PERLARTIFACTS@ INSTALL_BASE=$(INSTALL_BASE) || true