diff --git a/.travis.yml b/.travis.yml index 6d196d0e..fd12857e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,20 +12,17 @@ perl: install: - true -before_script: - - ./setup/build-devel.sh $HOME/znapzend/thirdparty - script: - - ./configure --prefix=$HOME/znapzend || true - - make get-thirdparty-modules + - ./configure --prefix=$HOME/znapzend - make install - - perl -I$HOME/znapzend/thirdparty/lib/perl5 - -MDevel::Cover=+ignore,thirdparty ./t/znapzend.t $HOME/znapzend || test $? == 1 - - perl -I$HOME/znapzend/thirdparty/lib/perl5 - -MDevel::Cover=+ignore,thirdparty ./t/znapzendzetup.t $HOME/znapzend || test $? == 1 - - perl -I$HOME/znapzend/thirdparty/lib/perl5 - -MDevel::Cover=+ignore,thirdparty ./t/znapzendztatz.t $HOME/znapzend || test $? == 1 - - perl -I$HOME/znapzend/thirdparty/lib/perl5 - -MDevel::Cover=+ignore,thirdparty ./t/autoscrub.t $HOME/znapzend || test $? == 1 - - env PERL5LIB=$HOME/znapzend/thirdparty/lib/perl5 $HOME/znapzend/thirdparty/bin/cover -report coveralls + - PERL_CPANM_HOME=`pwd`/thirdparty PERL_CPANM_OPT="--notest --local-lib "`pwd`/thirdparty perl ./thirdparty/bin/cpanm Devel::Cover::Report::Coveralls + - perl -I./thirdparty/lib/perl5 + -MDevel::Cover=+ignore,thirdparty ./t/znapzend.t ./bin/znapzend || test $? == 1 + - perl -I./thirdparty/lib/perl5 + -MDevel::Cover=+ignore,thirdparty ./t/znapzendzetup.t ./bin/znapzend || test $? == 1 + - perl -I./thirdparty/lib/perl5 + -MDevel::Cover=+ignore,thirdparty ./t/znapzendztatz.t ./bin/znapzend || test $? == 1 + - perl -I./thirdparty/lib/perl5 + -MDevel::Cover=+ignore,thirdparty ./t/autoscrub.t ./bin/znapzend || test $? == 1 + - perl -I./thirdparty/lib/perl5 thirdparty/bin/cover -report coveralls diff --git a/Makefile.am b/Makefile.am index a42e390f..bb765cd7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,9 +30,6 @@ POD = doc/znapzend.pod doc/znapzendzetup.pod doc/znapzendztatz.pod THIRDPARTY_DIR := $(shell pwd)/thirdparty -THIRDPARTY := $(shell test -d thirdparty && find thirdparty/lib/perl5 -type f) - - GENERATED_EXTRADIST = $(MAN) EXTRA_DIST = VERSION COPYRIGHT README.md LICENSE CHANGES AUTHORS PERL_MODULES setup/sdbs.inc $(BIN) $(PM) $(GENERATED_EXTRADIST) init/znapzend.xml.in t/autoscrub.t t/ssh t/znapzend.t t/znapzendztatz.t t/mbuffer t/zfs t/znapzendzetup.t t/zpool @@ -47,9 +44,6 @@ svc_DATA = init/znapzend.xml endif -thirdpartydir = $(prefix) -nobase_thirdparty_DATA = $(THIRDPARTY) - dist_bin_SCRIPTS = $(BIN) imandir = $(mandir)/man1 @@ -66,18 +60,25 @@ README.md COPYRIGHT: configure CHANGES: configure git log --simplify-merges --full-history --no-merges --pretty=format:'%ai %d %s -- %an' > CHANGES - -install-exec-hook: - $(AM_V_GEN)[ "$(PERL5LIB)" != "" ] && cd "$(DESTDIR)$(exec_prefix)" && $(PERL) -i -p -e 's{.*# PERL5LIB}{use lib qw($(PERL5LIB)); # PERL5LIB}' $(BIN) || true - $(AM_V_GEN)cd "$(DESTDIR)$(exec_prefix)" && $(PERL) -i -p -e 's{^#!.*perl.*}{#!$(PERL)};' $(BIN) + +all-local: + $(AM_V_GEN)[ "$(MISSING_PERL_MODULES)" == "" ] || $(GMAKE) get-thirdparty-modules + +install-exec-hook: + $(AM_V_GEN)[ "$(PERL5LIB)" == "" ] || cd "$(DESTDIR)$(exec_prefix)" && $(PERL) -i -p -e 's{.*# PERL5LIB}{use lib qw($(PERL5LIB)); # PERL5LIB}' $(BIN) + $(AM_V_GEN)cd "$(DESTDIR)$(exec_prefix)" && $(PERL) -i -p -e 's{.*# LIBDIR}{use lib qw($(libdir)); # LIBDIR}' $(BIN) + $(AM_V_GEN)cd "$(DESTDIR)$(exec_prefix)" && $(PERL) -i -p -e 's{^#!.*perl.*}{#!$(PERL)};' $(BIN) + $(AM_V_GEN)cp -fr $(THIRDPARTY_DIR)/lib/perl5/* $(DESTDIR)$(libdir) dist-hook: $(POD) $(MAN) CHANGES - $(AM_V_GEN)cd $(distdir) && $(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s+=\s+".+?"/\$$VERSION = "$$d"/;' $(BIN) + $(AM_V_GEN)cd $(distdir) && $(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s+=\s+".+?"/\$$VERSION = "$$d"/;' $(BIN) $(GMAKE) $(MAN) get-thirdparty-modules: - [ -x $(THIRDPARTY_DIR)/bin/cpanm ] || mkdir -p $(THIRDPARTY_DIR)/bin && wget --no-check-certificate -O $(THIRDPARTY_DIR)/bin/cpanm cpanmin.us && chmod 755 $(THIRDPARTY_DIR)/bin/cpanm - echo $(PERL_MODULES) | PERL_CPANM_HOME=$(THIRDPARTY_DIR) PERL_CPANM_OPT="--notest --local-lib $(THIRDPARTY_DIR)" xargs $(PERL) $(THIRDPARTY_DIR)/bin/cpanm + [ -d $(THIRDPARTY_DIR)/bin ] || mkdir -p $(THIRDPARTY_DIR)/bin + [ -x $(THIRDPARTY_DIR)/bin/cpanm ] || ( [ -x $(CURL) ] && $(CURL) --location --insecure https://cpanmin.us > $(THIRDPARTY_DIR)/bin/cpanm cpanmin.us && chmod 755 $(THIRDPARTY_DIR)/bin/cpanm ) + [ -x $(THIRDPARTY_DIR)/bin/cpanm ] || ( [ -x $(WGET) ] && $(WGET) --no-check-certificate -O $(THIRDPARTY_DIR)/bin/cpanm https://cpanmin.us && chmod 755 $(THIRDPARTY_DIR)/bin/cpanm ) + echo $(MISSING_PERL_MODULES) | PERL_CPANM_HOME=$(THIRDPARTY_DIR) PERL_CPANM_OPT="--notest --local-lib $(THIRDPARTY_DIR)" xargs $(PERL) $(THIRDPARTY_DIR)/bin/cpanm test: $(PERL) "-MExtUtils::Command::MM" "-e" "test_harness(1, 'lib','thirdparty/lib/perl5')" t/*.t diff --git a/Makefile.in b/Makefile.in index 77a3d872..b4e7a6da 100644 --- a/Makefile.in +++ b/Makefile.in @@ -138,7 +138,7 @@ am__uninstall_files_from_dir = { \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(imandir)" \ - "$(DESTDIR)$(thirdpartydir)" "$(DESTDIR)$(svcdir)" + "$(DESTDIR)$(svcdir)" SCRIPTS = $(dist_bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -169,7 +169,7 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -DATA = $(iman_DATA) $(nobase_thirdparty_DATA) $(svc_DATA) +DATA = $(iman_DATA) $(svc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -248,6 +248,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +CURL = @CURL@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ @@ -264,6 +265,7 @@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MISSING_PERL_MODULES = @MISSING_PERL_MODULES@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -275,13 +277,13 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL5LIB = @PERL5LIB@ -PERL_MODULES = @PERL_MODULES@ POD2MAN = @POD2MAN@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVCINSTALLDIR = @SVCINSTALLDIR@ VERSION = @VERSION@ +WGET = @WGET@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -330,15 +332,12 @@ PM := $(shell find lib/ -name "*.pm") MAN = man/znapzend.1 man/znapzendzetup.1 man/znapzendztatz.1 POD = doc/znapzend.pod doc/znapzendzetup.pod doc/znapzendztatz.pod THIRDPARTY_DIR := $(shell pwd)/thirdparty -THIRDPARTY := $(shell test -d thirdparty && find thirdparty/lib/perl5 -type f) GENERATED_EXTRADIST = $(MAN) EXTRA_DIST = VERSION COPYRIGHT README.md LICENSE CHANGES AUTHORS PERL_MODULES setup/sdbs.inc $(BIN) $(PM) $(GENERATED_EXTRADIST) init/znapzend.xml.in t/autoscrub.t t/ssh t/znapzend.t t/znapzendztatz.t t/mbuffer t/zfs t/znapzendzetup.t t/zpool YEAR := $(shell date +%Y) DATE := $(shell date +%Y-%m-%d) @ENABLE_SVCINSTALL_TRUE@svcdir = @SVCINSTALLDIR@ @ENABLE_SVCINSTALL_TRUE@svc_DATA = init/znapzend.xml -thirdpartydir = $(prefix) -nobase_thirdparty_DATA = $(THIRDPARTY) dist_bin_SCRIPTS = $(BIN) imandir = $(mandir)/man1 iman_DATA = $(MAN) @@ -438,30 +437,6 @@ uninstall-imanDATA: @list='$(iman_DATA)'; test -n "$(imandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(imandir)'; $(am__uninstall_files_from_dir) -install-nobase_thirdpartyDATA: $(nobase_thirdparty_DATA) - @$(NORMAL_INSTALL) - @list='$(nobase_thirdparty_DATA)'; test -n "$(thirdpartydir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(thirdpartydir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(thirdpartydir)" || exit 1; \ - fi; \ - $(am__nobase_list) | while read dir files; do \ - xfiles=; for file in $$files; do \ - if test -f "$$file"; then xfiles="$$xfiles $$file"; \ - else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ - test -z "$$xfiles" || { \ - test "x$$dir" = x. || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(thirdpartydir)/$$dir'"; \ - $(MKDIR_P) "$(DESTDIR)$(thirdpartydir)/$$dir"; }; \ - echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(thirdpartydir)/$$dir'"; \ - $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(thirdpartydir)/$$dir" || exit $$?; }; \ - done - -uninstall-nobase_thirdpartyDATA: - @$(NORMAL_UNINSTALL) - @list='$(nobase_thirdparty_DATA)'; test -n "$(thirdpartydir)" || list=; \ - $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ - dir='$(DESTDIR)$(thirdpartydir)'; $(am__uninstall_files_from_dir) install-svcDATA: $(svc_DATA) @$(NORMAL_INSTALL) @list='$(svc_DATA)'; test -n "$(svcdir)" || list=; \ @@ -783,10 +758,10 @@ distcleancheck: distclean exit 1; } >&2 check-am: all-am check: check-recursive -all-am: Makefile $(SCRIPTS) $(DATA) +all-am: Makefile $(SCRIPTS) $(DATA) all-local installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(imandir)" "$(DESTDIR)$(thirdpartydir)" "$(DESTDIR)$(svcdir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(imandir)" "$(DESTDIR)$(svcdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -840,8 +815,7 @@ info: info-recursive info-am: -install-data-am: install-imanDATA install-nobase_thirdpartyDATA \ - install-svcDATA +install-data-am: install-imanDATA install-svcDATA install-dvi: install-dvi-recursive @@ -889,12 +863,12 @@ ps: ps-recursive ps-am: uninstall-am: uninstall-dist_binSCRIPTS uninstall-imanDATA \ - uninstall-nobase_thirdpartyDATA uninstall-svcDATA + uninstall-svcDATA .MAKE: $(am__recursive_targets) install-am install-exec-am \ install-strip -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ @@ -904,14 +878,13 @@ uninstall-am: uninstall-dist_binSCRIPTS uninstall-imanDATA \ install-data-am install-dist_binSCRIPTS install-dvi \ install-dvi-am install-exec install-exec-am install-exec-hook \ install-html install-html-am install-imanDATA install-info \ - install-info-am install-man install-nobase_thirdpartyDATA \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip install-svcDATA installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am tags tags-am uninstall uninstall-am \ - uninstall-dist_binSCRIPTS uninstall-imanDATA \ - uninstall-nobase_thirdpartyDATA uninstall-svcDATA + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip install-svcDATA \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-dist_binSCRIPTS uninstall-imanDATA \ + uninstall-svcDATA doc/%.pod: bin/% configure @@ -926,17 +899,24 @@ README.md COPYRIGHT: configure CHANGES: configure git log --simplify-merges --full-history --no-merges --pretty=format:'%ai %d %s -- %an' > CHANGES -install-exec-hook: - $(AM_V_GEN)[ "$(PERL5LIB)" != "" ] && cd "$(DESTDIR)$(exec_prefix)" && $(PERL) -i -p -e 's{.*# PERL5LIB}{use lib qw($(PERL5LIB)); # PERL5LIB}' $(BIN) || true - $(AM_V_GEN)cd "$(DESTDIR)$(exec_prefix)" && $(PERL) -i -p -e 's{^#!.*perl.*}{#!$(PERL)};' $(BIN) +all-local: + $(AM_V_GEN)[ "$(MISSING_PERL_MODULES)" == "" ] || $(GMAKE) get-thirdparty-modules + +install-exec-hook: + $(AM_V_GEN)[ "$(PERL5LIB)" == "" ] || cd "$(DESTDIR)$(exec_prefix)" && $(PERL) -i -p -e 's{.*# PERL5LIB}{use lib qw($(PERL5LIB)); # PERL5LIB}' $(BIN) + $(AM_V_GEN)cd "$(DESTDIR)$(exec_prefix)" && $(PERL) -i -p -e 's{.*# LIBDIR}{use lib qw($(libdir)); # LIBDIR}' $(BIN) + $(AM_V_GEN)cd "$(DESTDIR)$(exec_prefix)" && $(PERL) -i -p -e 's{^#!.*perl.*}{#!$(PERL)};' $(BIN) + $(AM_V_GEN)cp -fr $(THIRDPARTY_DIR)/lib/perl5/* $(DESTDIR)$(libdir) dist-hook: $(POD) $(MAN) CHANGES - $(AM_V_GEN)cd $(distdir) && $(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s+=\s+".+?"/\$$VERSION = "$$d"/;' $(BIN) + $(AM_V_GEN)cd $(distdir) && $(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s+=\s+".+?"/\$$VERSION = "$$d"/;' $(BIN) $(GMAKE) $(MAN) get-thirdparty-modules: - [ -x $(THIRDPARTY_DIR)/bin/cpanm ] || mkdir -p $(THIRDPARTY_DIR)/bin && wget --no-check-certificate -O $(THIRDPARTY_DIR)/bin/cpanm cpanmin.us && chmod 755 $(THIRDPARTY_DIR)/bin/cpanm - echo $(PERL_MODULES) | PERL_CPANM_HOME=$(THIRDPARTY_DIR) PERL_CPANM_OPT="--notest --local-lib $(THIRDPARTY_DIR)" xargs $(PERL) $(THIRDPARTY_DIR)/bin/cpanm + [ -d $(THIRDPARTY_DIR)/bin ] || mkdir -p $(THIRDPARTY_DIR)/bin + [ -x $(THIRDPARTY_DIR)/bin/cpanm ] || ( [ -x $(CURL) ] && $(CURL) --location --insecure https://cpanmin.us > $(THIRDPARTY_DIR)/bin/cpanm cpanmin.us && chmod 755 $(THIRDPARTY_DIR)/bin/cpanm ) + [ -x $(THIRDPARTY_DIR)/bin/cpanm ] || ( [ -x $(WGET) ] && $(WGET) --no-check-certificate -O $(THIRDPARTY_DIR)/bin/cpanm https://cpanmin.us && chmod 755 $(THIRDPARTY_DIR)/bin/cpanm ) + echo $(MISSING_PERL_MODULES) | PERL_CPANM_HOME=$(THIRDPARTY_DIR) PERL_CPANM_OPT="--notest --local-lib $(THIRDPARTY_DIR)" xargs $(PERL) $(THIRDPARTY_DIR)/bin/cpanm test: $(PERL) "-MExtUtils::Command::MM" "-e" "test_harness(1, 'lib','thirdparty/lib/perl5')" t/*.t diff --git a/PERL_MODULES b/PERL_MODULES index a1d86a6c..ac1e8bd2 100644 --- a/PERL_MODULES +++ b/PERL_MODULES @@ -1,2 +1,3 @@ -Mojolicious@5.69 -Mojo::IOLoop::ForkCall@0.15 +Mojolicious@5.72 +Mojo::IOLoop::ForkCall@0.16 + diff --git a/README.md b/README.md index 055b9bef..2c4c38ad 100644 --- a/README.md +++ b/README.md @@ -40,17 +40,13 @@ tar zxvf znapzend-0.14.0.tar.gz cd znapzend-0.14.0 ./configure --prefix=/opt/znapzend-0.14.0 ``` -if configure complains about missing perl modules, run -```sh -make get-thirdparty-modules -``` - -to install the missing modules. NOTE: This will NOT messup your local perl installation! - -Now you can run configure again and then +If configure finds anything noteworthy, it will tell you about it. If any +perl modules are found to be missing, they get installed locally into the znapzend +installation. Your perl installation will not get modified! ```sh +make make install ``` diff --git a/bin/znapzend b/bin/znapzend index 90bdd095..5dd6d0ae 100755 --- a/bin/znapzend +++ b/bin/znapzend @@ -1,9 +1,7 @@ #!/usr/bin/env perl -use FindBin; # PERL5LIB -use lib "$FindBin::Bin/../lib"; -use lib "$FindBin::Bin/../thirdparty/lib/perl5"; +use FindBin; use lib "$FindBin::Bin/../lib", "$FindBin::Bin/../thirdparty/lib/perl5"; # LIBDIR use Getopt::Long qw(:config posix_default no_ignore_case); use Pod::Usage; diff --git a/bin/znapzendzetup b/bin/znapzendzetup index cd3f8479..5eed553d 100755 --- a/bin/znapzendzetup +++ b/bin/znapzendzetup @@ -1,9 +1,7 @@ #!/usr/bin/env perl -use FindBin; # PERL5LIB -use lib "$FindBin::Bin/../lib"; -use lib "$FindBin::Bin/../thirdparty/lib/perl5"; +use FindBin; use lib "$FindBin::Bin/../lib", "$FindBin::Bin/../thirdparty/lib/perl5"; # LIBDIR use Getopt::Long qw(:config posix_default no_ignore_case pass_through); use Pod::Usage; diff --git a/bin/znapzendztatz b/bin/znapzendztatz index 919202c2..a9c74b09 100755 --- a/bin/znapzendztatz +++ b/bin/znapzendztatz @@ -1,9 +1,7 @@ #!/usr/bin/env perl -use FindBin; -# PERL5LIB -use lib "$FindBin::Bin/../lib"; -use lib "$FindBin::Bin/../thirdparty/lib/perl5"; +# PERL5LIB +use FindBin; use lib "$FindBin::Bin/../lib", "$FindBin::Bin/../thirdparty/lib/perl5"; # LIBDIR use Getopt::Long qw(:config posix_default no_ignore_case); use Pod::Usage; diff --git a/configure b/configure index cb65e7d0..e34fca79 100755 --- a/configure +++ b/configure @@ -587,13 +587,15 @@ PACKAGE_URL='' ac_default_prefix=/opt/$PACKAGE_NAME-$PACKAGE_VERSION ac_subst_vars='LTLIBOBJS LIBOBJS -PERL_MODULES +MISSING_PERL_MODULES PERL5LIB ENABLE_SVCINSTALL_FALSE ENABLE_SVCINSTALL_TRUE SVCINSTALLDIR enable_pkgonly GMAKE +WGET +CURL POD2MAN PERL MAINT @@ -2634,6 +2636,88 @@ $as_echo "no" >&6; } fi +# Extract the first word of "curl", so it can be a program name with args. +set dummy curl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_CURL+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $CURL in + [\\/]* | ?:[\\/]*) + ac_cv_path_CURL="$CURL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_CURL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_CURL" && ac_cv_path_CURL="no" + ;; +esac +fi +CURL=$ac_cv_path_CURL +if test -n "$CURL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL" >&5 +$as_echo "$CURL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +# Extract the first word of "wget", so it can be a program name with args. +set dummy wget; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_WGET+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $WGET in + [\\/]* | ?:[\\/]*) + ac_cv_path_WGET="$WGET" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_WGET="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_WGET" && ac_cv_path_WGET="no" + ;; +esac +fi +WGET=$ac_cv_path_WGET +if test -n "$WGET"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WGET" >&5 +$as_echo "$WGET" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + ac_perl_version="5.10.1" @@ -2746,14 +2830,17 @@ fi # Check the necessary Perl modules mod_ok=1 +MISSING_PERL_MODULES="" if test "$enable_pkgonly" != yes; then - for module in Mojolicious Mojo::IOLoop::ForkCall ; do + for module in Mojolicious@5.72 Mojo::IOLoop::ForkCall@0.16 ; do + pure_module=`echo $module|sed 's/@.*//'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for perl module '$module'" >&5 $as_echo_n "checking checking for perl module '$module'... " >&6; } - if ${PERL} -I`dirname $0`/thirdparty/lib/perl5 -I$actual_prefix/thirdparty/lib/perl5 -e 'use '$module 2>/dev/null ; then + if ${PERL} -I`dirname $0`/thirdparty/lib/perl5 -I$actual_prefix/thirdparty/lib/perl5 -e 'use '$pure_module 2>/dev/null ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Ok" >&5 $as_echo "Ok" >&6; } else + MISSING_PERL_MODULES="${MISSING_PERL_MODULES} $module" { $as_echo "$as_me:${as_lineno-$LINENO}: result: Failed" >&5 $as_echo "Failed" >&6; } mod_ok=0 @@ -2761,8 +2848,6 @@ $as_echo "Failed" >&6; } done fi -PERL_MODULES="Mojolicious@5.69 Mojo::IOLoop::ForkCall@0.15 " - ac_config_files="$ac_config_files Makefile lib/Makefile init/znapzend.xml" @@ -3962,30 +4047,26 @@ fi if test x$mod_ok = x0; then cat </dev/null ; then + if ${PERL} -I`dirname $0`/thirdparty/lib/perl5 -I$actual_prefix/thirdparty/lib/perl5 -e 'use '$pure_module 2>/dev/null ; then AC_MSG_RESULT([Ok]) else + MISSING_PERL_MODULES="${MISSING_PERL_MODULES} $module" AC_MSG_RESULT([Failed]) mod_ok=0 fi done fi -PERL_MODULES="m4_esyscmd([tr '\n' ' ' < PERL_MODULES])" - -AC_SUBST(PERL_MODULES) +AC_SUBST(MISSING_PERL_MODULES) AC_CONFIG_FILES([ Makefile @@ -116,30 +119,26 @@ AC_OUTPUT if test x$mod_ok = x0; then cat <