+sub kpsewhich {
+ my ($dw, $type, $package) = @_;
+ $package =~ s/[^-_0-9A-Za-z]//g;
+ my $type_desc = $type eq 'cls' ? 'document class' : 'package';
+
+ eval { require String::ShellQuote; 1 } or warn "can't load String::ShellQuote" && return;
+ $dw = String::ShellQuote::shell_quote $dw;
+ my $e_package = String::ShellQuote::shell_quote $package;
+ my $e_type = String::ShellQuote::shell_quote $type;
+
+ my $exit = system(qq|TEXINPUTS=".:$dw:" kpsewhich $e_package.$e_type > /dev/null|);
+ my $res = $exit > 0 ? 0 : 1;
+
+ print_result("Looking for LaTeX $type_desc $package", $res);
+ if (!$res) {
+ print STDERR <<EOL if $v && !$check{s};
++------------------------------------------------------------------------------+
+ LaTeX $type_desc $package could not be loaded.
+
+ On Debian you may find the needed *.deb package with:
+ apt-file search $package.$type
+
+ Maybe you need to install apt-file first by:
+ aptitude install apt-file && apt-file update
++------------------------------------------------------------------------------+
+EOL
+ }
+}
+
+sub check_pdfinfo {
+ my $line = "Looking for pdfinfo executable";
+ my $shell_out = `pdfinfo -v 2>&1 | grep version 2> /dev/null`;
+ my ($label,$vers,$ver_string) = split / /,$shell_out;
+ if ( $label && $label eq 'pdfinfo' ) {
+ chop $ver_string;
+ print_line($line, $ver_string, 'green');
+ } else {
+ print_line($line, 'not installed','red');
+ my %modinfo = ( debian => 'poppler-utils' );
+ push @missing_modules, \%modinfo;
+
+ }
+}
+
+sub check_aqbanking {
+ my $aqbin = $::lx_office_conf{applications}->{aqbanking};
+ if ( !$aqbin ) {
+ print_line('Looking for aqbanking executable', 'not configured','red');
+ }
+ else {
+ my $line = "Looking for aqbanking executable '".$aqbin."'";
+ my $shell_out = `$aqbin versions 2>&1 | grep AqBanking-CLI 2> /dev/null`;
+ my ($label,$version) = split /:/,$shell_out;
+ if ( $label && $label eq ' AqBanking-CLI' ) {
+ chop $version;
+ print_line($line, $version, 'green');
+ } else {
+ print_line($line, 'not installed','red');
+ my %modinfo = ( name => 'aqbanking' );
+ push @missing_modules, \%modinfo;
+ }
+ }
+}
+
+sub check_module {