Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
snap /
gnome-42-2204 /
202 /
usr /
bin /
[ HOME SHELL ]
Name
Size
Permission
Action
X11
[ DIR ]
drwxr-xr-x
aclocal-1.16
35.18
KB
-rwxr-xr-x
appstreamcli
118.23
KB
-rwxr-xr-x
appstream-compose
26.3
KB
-rwxr-xr-x
appstream-util
98.3
KB
-rwxr-xr-x
autoconf
14.85
KB
-rwxr-xr-x
autoheader
8.82
KB
-rwxr-xr-x
autom4te
32.69
KB
-rwxr-xr-x
automake-1.16
255.91
KB
-rwxr-xr-x
autoreconf
26.3
KB
-rwxr-xr-x
autoscan
16.77
KB
-rwxr-xr-x
autoupdate
33.22
KB
-rwxr-xr-x
broadwayd
130.21
KB
-rwxr-xr-x
bwrap
70.47
KB
-rwxr-xr-x
c89-gcc
428
B
-rwxr-xr-x
c99-gcc
454
B
-rwxr-xr-x
cairo-trace
2.95
KB
-rwxr-xr-x
canberra-gtk-play
18.2
KB
-rwxr-xr-x
corelist
15.01
KB
-rwxr-xr-x
cpan
8.16
KB
-rwxr-xr-x
cpan5.34-x86_64-linux-gnu
8.18
KB
-rwxr-xr-x
curl-config
6.52
KB
-rwxr-xr-x
dazzle-list-counters
14.13
KB
-rwxr-xr-x
debconf
2.79
KB
-rwxr-xr-x
debconf-apt-progress
11.27
KB
-rwxr-xr-x
debconf-communicate
608
B
-rwxr-xr-x
debconf-copydb
1.68
KB
-rwxr-xr-x
debconf-escape
647
B
-rwxr-xr-x
debconf-set-selections
2.92
KB
-rwxr-xr-x
debconf-show
1.78
KB
-rwxr-xr-x
derb
26.88
KB
-rwxr-xr-x
desktop-file-edit
96.44
KB
-rwxr-xr-x
desktop-file-install
96.44
KB
-rwxr-xr-x
desktop-file-validate
76.69
KB
-rwxr-xr-x
dh_autotools-dev_restoreconfig
1.79
KB
-rwxr-xr-x
dh_autotools-dev_updateconfig
1.81
KB
-rwxr-xr-x
dh_girepository
12.88
KB
-rwxr-xr-x
dumpsexp
18.3
KB
-rwxr-xr-x
enc2xs
40.84
KB
-rwxr-xr-x
encguess
3.01
KB
-rwxr-xr-x
envsubst
34.38
KB
-rwxr-xr-x
fc-cache
22.23
KB
-rwxr-xr-x
fc-cat
18.23
KB
-rwxr-xr-x
fc-conflist
14.23
KB
-rwxr-xr-x
fc-list
14.23
KB
-rwxr-xr-x
fc-match
14.23
KB
-rwxr-xr-x
fc-pattern
14.23
KB
-rwxr-xr-x
fc-query
14.23
KB
-rwxr-xr-x
fc-scan
14.23
KB
-rwxr-xr-x
fc-validate
14.23
KB
-rwxr-xr-x
file
26.56
KB
-rwxr-xr-x
fribidi
26.99
KB
-rwxr-xr-x
gapplication
22.21
KB
-rwxr-xr-x
gdbus
54.21
KB
-rwxr-xr-x
gdbus-codegen
1.99
KB
-rwxr-xr-x
gdk-pixbuf-csource
14.15
KB
-rwxr-xr-x
gdk-pixbuf-pixdata
14.13
KB
-rwxr-xr-x
gdk-pixbuf-thumbnailer
18.21
KB
-rwxr-xr-x
genbrk
14.78
KB
-rwxr-xr-x
gencat
26.37
KB
-rwxr-xr-x
gencfu
14.73
KB
-rwxr-xr-x
gencnval
26.61
KB
-rwxr-xr-x
gendict
26.78
KB
-rwxr-xr-x
genrb
147.91
KB
-rwxr-xr-x
getconf
34.29
KB
-rwxr-xr-x
getent
38.65
KB
-rwxr-xr-x
gettext
34.38
KB
-rwxr-xr-x
gettextize
41.28
KB
-rwxr-xr-x
gettext.sh
5.07
KB
-rwxr-xr-x
gio
102.23
KB
-rwxr-xr-x
gio-querymodules
18.13
KB
-rwxr-xr-x
gjs
26.7
KB
-rwxr-xr-x
gjs-console
26.7
KB
-rwxr-xr-x
glib-compile-schemas
66.21
KB
-rwxr-xr-x
gobject-query
14.14
KB
-rwxr-xr-x
gpg-error-config
2.04
KB
-rwxr-xr-x
gpgrt-config
13.11
KB
-rwxr-xr-x
gresource
26.13
KB
-rwxr-xr-x
gsettings
30.21
KB
-rwxr-xr-x
gsound-play
18.21
KB
-rwxr-xr-x
gtk4-broadwayd
150.22
KB
-rwxr-xr-x
gtk4-encode-symbolic-svg
8.58
MB
-rwxr-xr-x
gtk4-launch
18.29
KB
-rwxr-xr-x
gtk4-query-settings
14.13
KB
-rwxr-xr-x
gtk4-rendernode-tool
30.13
KB
-rwxr-xr-x
gtk-encode-symbolic-svg
22.24
KB
-rwxr-xr-x
gtk-launch
18.29
KB
-rwxr-xr-x
gtk-query-settings
14.13
KB
-rwxr-xr-x
gtk-update-icon-cache
38.57
KB
-rwxr-xr-x
hb-info
54.21
KB
-rwxr-xr-x
hb-ot-shape-closure
46.21
KB
-rwxr-xr-x
hb-shape
50.21
KB
-rwxr-xr-x
hb-subset
46.18
KB
-rwxr-xr-x
hb-view
82.35
KB
-rwxr-xr-x
hmac256
18.7
KB
-rwxr-xr-x
iconv
66.41
KB
-rwxr-xr-x
icuexportdata
30.98
KB
-rwxr-xr-x
icuinfo
14.62
KB
-rwxr-xr-x
ifnames
4.08
KB
-rwxr-xr-x
instmodsh
4.27
KB
-rwxr-xr-x
ispell-wrapper
7.05
KB
-rwxr-xr-x
itstool
67.8
KB
-rwxr-xr-x
js102
28.97
MB
-rwxr-xr-x
js102-config
2.03
KB
-rwxr-xr-x
json-glib-format
18.38
KB
-rwxr-xr-x
json-glib-validate
14.24
KB
-rwxr-xr-x
json_pp
4.88
KB
-rwxr-xr-x
ldd
5.32
KB
-rwxr-xr-x
libgcrypt-config
4.52
KB
-rwxr-xr-x
libinput
62.35
KB
-rwxr-xr-x
libnetcfg
15.41
KB
-rwxr-xr-x
libpng16-config
2.41
KB
-rwxr-xr-x
libpng-config
2.41
KB
-rwxr-xr-x
libtool
366.5
KB
-rwxr-xr-x
libtoolize
128.35
KB
-rwxr-xr-x
libwacom-list-devices
14.24
KB
-rwxr-xr-x
libwacom-list-local-devices
18.29
KB
-rwxr-xr-x
libwacom-show-stylus
5.99
KB
-rwxr-xr-x
libwacom-update-db
8.99
KB
-rwxr-xr-x
locale
57.56
KB
-rwxr-xr-x
localedef
326.96
KB
-rwxr-xr-x
lzmainfo
14.23
KB
-rwxr-xr-x
m4
154.37
KB
-rwxr-xr-x
makeconv
50.89
KB
-rwxr-xr-x
mako-render
961
B
-rwxr-xr-x
markdown_py
973
B
-rwxr-xr-x
mpicalc
22.3
KB
-rwxr-xr-x
msgattrib
26.38
KB
-rwxr-xr-x
msgcat
26.38
KB
-rwxr-xr-x
msgcmp
26.38
KB
-rwxr-xr-x
msgcomm
26.38
KB
-rwxr-xr-x
msgconv
22.38
KB
-rwxr-xr-x
msgen
22.38
KB
-rwxr-xr-x
msgexec
22.38
KB
-rwxr-xr-x
msgfilter
34.38
KB
-rwxr-xr-x
msgfmt
82.59
KB
-rwxr-xr-x
msggrep
114.46
KB
-rwxr-xr-x
msginit
66.39
KB
-rwxr-xr-x
msgmerge
74.41
KB
-rwxr-xr-x
msgunfmt
34.39
KB
-rwxr-xr-x
msguniq
22.38
KB
-rwxr-xr-x
ngettext
34.38
KB
-rwxr-xr-x
nspr-config
2.58
KB
-rwxr-xr-x
nss-config
2.31
KB
-rwxr-xr-x
p11-kit
170.45
KB
-rwxr-xr-x
pango-list
18.13
KB
-rwxr-xr-x
pango-segmentation
18.21
KB
-rwxr-xr-x
pango-view
66.42
KB
-rwxr-xr-x
pcre2-config
1.93
KB
-rwxr-xr-x
pcre-config
2.29
KB
-rwxr-xr-x
pdfattach
22.21
KB
-rwxr-xr-x
pdfdetach
26.32
KB
-rwxr-xr-x
pdffonts
22.33
KB
-rwxr-xr-x
pdfimages
42.33
KB
-rwxr-xr-x
pdfinfo
62.33
KB
-rwxr-xr-x
pdfseparate
22.21
KB
-rwxr-xr-x
pdfsig
42.6
KB
-rwxr-xr-x
pdftocairo
190.3
KB
-rwxr-xr-x
pdftohtml
118.23
KB
-rwxr-xr-x
pdftoppm
34.24
KB
-rwxr-xr-x
pdftops
34.34
KB
-rwxr-xr-x
pdftotext
50.34
KB
-rwxr-xr-x
pdfunite
34.21
KB
-rwxr-xr-x
perl5.34-x86_64-linux-gnu
14.3
KB
-rwxr-xr-x
perlbug
44.12
KB
-rwxr-xr-x
perldoc
125
B
-rwxr-xr-x
perlivp
10.61
KB
-rwxr-xr-x
perlthanks
44.12
KB
-rwxr-xr-x
piconv
8.16
KB
-rwxr-xr-x
pip
225
B
-rwxr-xr-x
pip3
225
B
-rwxr-xr-x
pip3.10
225
B
-rwxr-xr-x
pipewire
14.38
KB
-rwxr-xr-x
pkgdata
43.53
KB
-rwxr-xr-x
pldd
22.37
KB
-rwxr-xr-x
pod2html
4.04
KB
-rwxr-xr-x
pod2man
14.68
KB
-rwxr-xr-x
pod2text
10.55
KB
-rwxr-xr-x
pod2usage
4.01
KB
-rwxr-xr-x
podchecker
3.57
KB
-rwxr-xr-x
psl
22.16
KB
-rwxr-xr-x
psl-make-dafsa
22.21
KB
-rwxr-xr-x
ptar
3.48
KB
-rwxr-xr-x
ptardiff
2.58
KB
-rwxr-xr-x
ptargrep
4.29
KB
-rwxr-xr-x
pw-cat
138.38
KB
-rwxr-xr-x
pw-cli
134.38
KB
-rwxr-xr-x
pw-dot
34.38
KB
-rwxr-xr-x
pw-dsdplay
138.38
KB
-rwxr-xr-x
pw-dump
94.38
KB
-rwxr-xr-x
pw-link
30.38
KB
-rwxr-xr-x
pw-loopback
18.38
KB
-rwxr-xr-x
pw-metadata
14.38
KB
-rwxr-xr-x
pw-mididump
34.38
KB
-rwxr-xr-x
pw-midiplay
138.38
KB
-rwxr-xr-x
pw-midirecord
138.38
KB
-rwxr-xr-x
pw-mon
90.42
KB
-rwxr-xr-x
pw-play
138.38
KB
-rwxr-xr-x
pw-profiler
26.38
KB
-rwxr-xr-x
pw-record
138.38
KB
-rwxr-xr-x
pw-reserve
26.38
KB
-rwxr-xr-x
pw-top
30.38
KB
-rwxr-xr-x
pw-v4l2
1.95
KB
-rwxr-xr-x
py3compile
12.89
KB
-rwxr-xr-x
py3versions
11.63
KB
-rwxr-xr-x
python3.10
5.67
MB
-rwxr-xr-x
recode-sr-latin
14.38
KB
-rwxr-xr-x
rsvg-convert
5.53
MB
-rwxr-xr-x
secret-tool
22.21
KB
-rwxr-xr-x
select-default-iwrap
474
B
-rwxr-xr-x
session-migration
22.15
KB
-rwxr-xr-x
shasum
9.75
KB
-rwxr-xr-x
spa-acp-tool
268.12
KB
-rwxr-xr-x
spa-inspect
78.48
KB
-rwxr-xr-x
spa-json-dump
14.3
KB
-rwxr-xr-x
spa-monitor
14.48
KB
-rwxr-xr-x
spa-resample
30.6
KB
-rwxr-xr-x
splain
18.96
KB
-rwxr-xr-x
streamzip
7.75
KB
-rwxr-xr-x
tzselect
15.02
KB
-rwxr-xr-x
uconv
54.83
KB
-rwxr-xr-x
unxz
82.52
KB
-rwxr-xr-x
update-desktop-database
22.38
KB
-rwxr-xr-x
update-mime-database
58.23
KB
-rwxr-xr-x
xdg-dbus-proxy
50.14
KB
-rwxr-xr-x
xdg-user-dir
234
B
-rwxr-xr-x
xdg-user-dirs-update
26.23
KB
-rwxr-xr-x
xml2-config
1.44
KB
-rwxr-xr-x
xmlcatalog
22.3
KB
-rwxr-xr-x
xmllint
78.95
KB
-rwxr-xr-x
xz
82.52
KB
-rwxr-xr-x
xzcat
82.52
KB
-rwxr-xr-x
xzcmp
6.86
KB
-rwxr-xr-x
xzdiff
6.86
KB
-rwxr-xr-x
xzegrep
5.87
KB
-rwxr-xr-x
xzfgrep
5.87
KB
-rwxr-xr-x
xzgrep
5.87
KB
-rwxr-xr-x
xzless
1.76
KB
-rwxr-xr-x
xzmore
2.11
KB
-rwxr-xr-x
zdump
26.21
KB
-rwxr-xr-x
zipdetails
58.66
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : autoscan
#! /usr/bin/perl # -*- perl -*- # Generated from bin/autoscan.in; do not edit by hand. # autoscan - Create configure.scan (a preliminary configure.ac) for a package. # Copyright (C) 1994, 1999-2017, 2020-2021 Free Software Foundation, # Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. # Written by David MacKenzie <djm@gnu.ai.mit.edu>. eval 'case $# in 0) exec /usr/bin/perl -S "$0";; *) exec /usr/bin/perl -S "$0" "$@";; esac' if 0; use 5.006; use strict; use warnings FATAL => 'all'; BEGIN { my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '/usr/share/autoconf'; unshift @INC, $pkgdatadir; # Override SHELL. On DJGPP SHELL may not be set to a shell # that can handle redirection and quote arguments correctly, # e.g.: COMMAND.COM. For DJGPP always use the shell that configure # has detected. $ENV{'SHELL'} = '/bin/sh' if ($^O eq 'dos'); } use File::Basename; use File::Find; use Autom4te::ChannelDefs; use Autom4te::Configure_ac; use Autom4te::FileUtils; use Autom4te::General; use Autom4te::XFile; my (@cfiles, @makefiles, @shfiles, @subdirs, %printed); # The kind of the words we are looking for. my @kinds = qw (function header identifier program makevar librarie); # For each kind, the default macro. my %generic_macro = ( 'function' => 'AC_CHECK_FUNCS', 'header' => 'AC_CHECK_HEADERS', 'identifier' => 'AC_CHECK_TYPES', 'program' => 'AC_CHECK_PROGS', 'library' => 'AC_CHECK_LIB' ); my %kind_comment = ( 'function' => 'Checks for library functions.', 'header' => 'Checks for header files.', 'identifier' => 'Checks for typedefs, structures, and compiler characteristics.', 'program' => 'Checks for programs.', ); # $USED{KIND}{ITEM} is the list of locations where the ITEM (of KIND) was # used in the user package. # For instance $USED{function}{alloca} is the list of 'file:line' where # 'alloca (...)' appears. my %used = (); # $MACRO{KIND}{ITEM} is the list of macros to use to test ITEM. # Initialized from lib/autoscan/*. E.g., $MACRO{function}{alloca} contains # the singleton AC_FUNC_ALLOCA. Some require several checks. my %macro = (); # $NEEDED_MACROS{MACRO} is an array of locations requiring MACRO. # E.g., $NEEDED_MACROS{AC_FUNC_ALLOC} the list of 'file:line' containing # 'alloca (...)'. my %needed_macros = ( 'AC_PREREQ' => [$me], ); my $log; # Autoconf and lib files. my $autom4te = $ENV{'AUTOM4TE'} || '/usr/bin/autom4te'; my $autoconf = "$autom4te --language=autoconf"; my @prepend_include; my @include = ('/usr/share/autoconf'); # $help # ----- $help = "Usage: $0 [OPTION]... [SRCDIR] Examine source files in the directory tree rooted at SRCDIR, or the current directory if none is given. Search the source files for common portability problems, check for incompleteness of 'configure.ac', and create a file 'configure.scan' which is a preliminary 'configure.ac' for that package. -h, --help print this help, then exit -V, --version print version number, then exit -v, --verbose verbosely report processing -d, --debug don't remove temporary files Library directories: -B, --prepend-include=DIR prepend directory DIR to search path -I, --include=DIR append directory DIR to search path Report bugs to <bug-autoconf\@gnu.org>. GNU Autoconf home page: <https://www.gnu.org/software/autoconf/>. General help using GNU software: <https://www.gnu.org/gethelp/>. "; # $version # -------- $version = "autoscan (GNU Autoconf) 2.71 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+/Autoconf: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>, <https://gnu.org/licenses/exceptions.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. "; ## ------------------------ ## ## Command line interface. ## ## ------------------------ ## # parse_args () # ------------- # Process any command line arguments. sub parse_args () { getopt ('I|include=s' => \@include, 'B|prepend-include=s' => \@prepend_include); die "$me: too many arguments Try '$me --help' for more information.\n" if @ARGV > 1; my $srcdir = $ARGV[0] || "."; verb "srcdir = $srcdir"; chdir $srcdir || error "cannot cd to $srcdir: $!"; } # init_tables () # -------------- # Put values in the tables of what to do with each token. sub init_tables () { # The data file format supports only one line of macros per function. # If more than that is required for a common portability problem, # a new Autoconf macro should probably be written for that case, # instead of duplicating the code in lots of configure.ac files. my $file = find_file ("autoscan/autoscan.list", reverse (@prepend_include), @include); my $table = new Autom4te::XFile ($file, "<"); my $tables_are_consistent = 1; while ($_ = $table->getline) { # Ignore blank lines and comments. next if /^\s*$/ || /^\s*\#/; # '<kind>: <word> <macro invocation>' or... # '<kind>: <word> warn: <message>'. if (/^(\S+):\s+(\S+)\s+(\S.*)$/) { my ($kind, $word, $macro) = ($1, $2, $3); error "$file:$.: invalid kind: $_" unless grep { $_ eq $kind } @kinds; push @{$macro{$kind}{$word}}, $macro; } else { error "$file:$.: invalid definition: $_"; } } if ($debug) { foreach my $kind (@kinds) { foreach my $word (sort keys %{$macro{$kind}}) { print "$kind: $word: @{$macro{$kind}{$word}}\n"; } } } } # used ($KIND, $WORD, [$WHERE]) # ----------------------------- # $WORD is used as a $KIND. sub used ($$;$) { my ($kind, $word, $where) = @_; $where ||= "$File::Find::name:$."; if ( # Check for all the libraries. But '-links' is certainly a # 'find' argument, and '-le', a 'test' argument. ($kind eq 'library' && $word !~ /^(e|inks)$/) # Other than libraries are to be checked only if listed in # the Autoscan library files. || defined $macro{$kind}{$word} ) { push (@{$used{$kind}{$word}}, $where); } } ## ----------------------- ## ## Scanning source files. ## ## ----------------------- ## # scan_c_file ($FILE-NAME) # ------------------------ sub scan_c_file ($) { my ($file_name) = @_; push @cfiles, $File::Find::name; # Nonzero if in a multiline comment. my $in_comment = 0; my $file = new Autom4te::XFile ($file_name, "<"); while ($_ = $file->getline) { # Strip out comments. if ($in_comment && s,^.*?\*/,,) { $in_comment = 0; } # The whole line is inside a comment. next if $in_comment; # All on one line. s,/\*.*?\*/,,g; # Starting on this line. if (s,/\*.*$,,) { $in_comment = 1; } # Preprocessor directives. if (s/^\s*\#\s*//) { if (/^include\s*<([^>]*)>/) { used ('header', $1); } if (s/^(if|ifdef|ifndef|elif)\s+//) { foreach my $word (split (/\W+/)) { used ('identifier', $word) unless $word eq 'defined' || $word !~ /^[a-zA-Z_]/; } } # Ignore other preprocessor directives. next; } # Remove string and character constants. s,\"[^\"]*\",,g; s,\'[^\']*\',,g; # Tokens in the code. # Maybe we should ignore function definitions (in column 0)? while (s/\b([a-zA-Z_]\w*)\s*\(/ /) { used ('function', $1); } while (s/\b([a-zA-Z_]\w*)\b/ /) { used ('identifier', $1); } } $file->close; } # scan_makefile($MAKEFILE-NAME) # ----------------------------- sub scan_makefile ($) { my ($file_name) = @_; push @makefiles, $File::Find::name; my $file = new Autom4te::XFile ($file_name, "<"); while ($_ = $file->getline) { # Strip out comments. s/#.*//; # Variable assignments. while (s/\b([a-zA-Z_]\w*)\s*=/ /) { used ('makevar', $1); } # Be sure to catch a whole word. For instance 'lex$U.$(OBJEXT)' # is a single token. Otherwise we might believe 'lex' is needed. foreach my $word (split (/\s+/)) { # Libraries. if ($word =~ /^-l([a-zA-Z_]\w*)$/) { used ('library', $1); } # Tokens in the code. # We allow some additional characters, e.g., '+', since # autoscan/programs includes 'c++'. if ($word =~ /^[a-zA-Z_][\w+]*$/) { used ('program', $word); } } } $file->close; } # scan_sh_file($SHELL-SCRIPT-NAME) # -------------------------------- sub scan_sh_file ($) { my ($file_name) = @_; push @shfiles, $File::Find::name; my $file = new Autom4te::XFile ($file_name, "<"); while ($_ = $file->getline) { # Strip out comments and variable references. s/#.*//; s/\$\{[^\}]*}//g; s/@[^@]*@//g; # Tokens in the code. while (s/\b([a-zA-Z_]\w*)\b/ /) { used ('program', $1); } } $file->close; } # scan_file () # ------------ # Called by &find on each file. $_ contains the current file name with # the current directory of the walk through. sub scan_file () { # Wanted only if there is no corresponding FILE.in. return if -f "$_.in"; # Save $_ as Find::File requires it to be preserved. local $_ = $_; # Strip a useless leading './'. $File::Find::name =~ s,^\./,,; if ($_ ne '.' and -d $_ and -f "$_/configure.in" || -f "$_/configure.ac" || -f "$_/configure.gnu" || -f "$_/configure") { $File::Find::prune = 1; push @subdirs, $File::Find::name; } if (/\.[chlym](\.in)?$/) { used 'program', 'cc', $File::Find::name; scan_c_file ($_); } elsif (/\.(cc|cpp|cxx|CC|C|hh|hpp|hxx|HH|H|yy|ypp|ll|lpp)(\.in)?$/) { used 'program', 'c++', $File::Find::name; scan_c_file ($_); } elsif ((/^((?:GNUm|M|m)akefile)(\.in)?$/ && ! -f "$1.am") || /^(?:GNUm|M|m)akefile(\.am)?$/) { scan_makefile ($_); } elsif (/\.sh(\.in)?$/) { scan_sh_file ($_); } } # scan_files () # ------------- # Read through the files and collect lists of tokens in them # that might create nonportabilities. sub scan_files () { find (\&scan_file, '.'); if ($verbose) { print "cfiles: @cfiles\n"; print "makefiles: @makefiles\n"; print "shfiles: @shfiles\n"; foreach my $kind (@kinds) { print "\n$kind:\n"; foreach my $word (sort keys %{$used{$kind}}) { print "$word: @{$used{$kind}{$word}}\n"; } } } } ## ----------------------- ## ## Output configure.scan. ## ## ----------------------- ## # output_kind ($FILE, $KIND) # -------------------------- sub output_kind ($$) { my ($file, $kind) = @_; # Lists of words to be checked with the generic macro. my @have; print $file "\n# $kind_comment{$kind}\n" if exists $kind_comment{$kind}; foreach my $word (sort keys %{$used{$kind}}) { # Output the needed macro invocations in configure.scan if not # already printed, and remember these macros are needed. foreach my $macro (@{$macro{$kind}{$word}}) { if ($macro =~ /^warn:\s+(.*)/) { my $message = $1; foreach my $location (@{$used{$kind}{$word}}) { warn "$location: warning: $message\n"; } } elsif (exists $generic_macro{$kind} && $macro eq $generic_macro{$kind}) { push (@have, $word); push (@{$needed_macros{"$generic_macro{$kind}([$word])"}}, @{$used{$kind}{$word}}); } else { if (! $printed{$macro}) { print $file "$macro\n"; $printed{$macro} = 1; } push (@{$needed_macros{$macro}}, @{$used{$kind}{$word}}); } } } print $file "$generic_macro{$kind}([" . join(' ', sort(@have)) . "])\n" if @have; } # output_libraries ($FILE) # ------------------------ sub output_libraries ($) { my ($file) = @_; print $file "\n# Checks for libraries.\n"; foreach my $word (sort keys %{$used{'library'}}) { print $file "# FIXME: Replace 'main' with a function in '-l$word':\n"; print $file "AC_CHECK_LIB([$word], [main])\n"; } } # output ($CONFIGURE_SCAN) # ------------------------ # Print a proto configure.ac. sub output ($) { my $configure_scan = shift; my %unique_makefiles; my $file = new Autom4te::XFile ($configure_scan, ">"); print $file ("# -*- Autoconf -*-\n" . "# Process this file with autoconf to produce a configure script.\n" . "\n" . "AC_PREREQ([2.71])\n" . "AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])\n"); if (defined $cfiles[0]) { print $file "AC_CONFIG_SRCDIR([$cfiles[0]])\n"; print $file "AC_CONFIG_HEADERS([config.h])\n"; } output_kind ($file, 'program'); output_kind ($file, 'makevar'); output_libraries ($file); output_kind ($file, 'header'); output_kind ($file, 'identifier'); output_kind ($file, 'function'); print $file "\n"; if (@makefiles) { # Change DIR/Makefile.in to DIR/Makefile. foreach my $m (@makefiles) { $m =~ s/\.(?:in|am)$//; $unique_makefiles{$m}++; } print $file ("AC_CONFIG_FILES([", join ("\n ", sort keys %unique_makefiles), "])\n"); } if (@subdirs) { print $file ("AC_CONFIG_SUBDIRS([", join ("\n ", sort @subdirs), "])\n"); } print $file "AC_OUTPUT\n"; $file->close; } ## --------------------------------------- ## ## Checking the accuracy of configure.ac. ## ## --------------------------------------- ## # &check_configure_ac ($CONFIGURE_AC) # ----------------------------------- # Use autoconf to check if all the suggested macros are included # in CONFIGURE_AC. sub check_configure_ac ($) { my ($configure_ac) = @_; # Find what needed macros are invoked in CONFIGURE_AC. # I'd be very happy if someone could explain to me why sort (uniq ...) # doesn't work properly: I need 'uniq (sort ...)'. --akim my $trace_option = join (' --trace=', '', uniq (sort (map { s/\(.*//; $_ } keys %needed_macros))); # Suppress all warnings from the subsidiary autoconf invocation. local $ENV{WARNINGS} = 'none'; verb "running: WARNINGS=none $autoconf $trace_option $configure_ac"; my $traces = new Autom4te::XFile "$autoconf $trace_option $configure_ac |"; while ($_ = $traces->getline) { chomp; my ($file, $line, $macro, @args) = split (/:/, $_); if ($macro =~ /^AC_CHECK_(HEADER|FUNC|TYPE|MEMBER)S$/) { # To be rigorous, we should distinguish between space and comma # separated macros. But there is no point. foreach my $word (split (/\s|,/, $args[0])) { # AC_CHECK_MEMBERS wants 'struct' or 'union'. if ($macro eq "AC_CHECK_MEMBERS" && $word =~ /^stat.st_/) { $word = "struct " . $word; } delete $needed_macros{"$macro([$word])"}; } } else { delete $needed_macros{$macro}; } } $traces->close; # Report the missing macros. foreach my $macro (sort keys %needed_macros) { warn ("$configure_ac: warning: missing $macro wanted by: " . (${$needed_macros{$macro}}[0]) . "\n"); print $log "$me: warning: missing $macro wanted by: \n"; foreach my $need (@{$needed_macros{$macro}}) { print $log "\t$need\n"; } } } ## -------------- ## ## Main program. ## ## -------------- ## parse_args; $log = new Autom4te::XFile ("$me.log", ">"); $autoconf .= " --debug" if $debug; $autoconf .= " --verbose" if $verbose; $autoconf .= join (' --include=', '', map { shell_quote ($_) } @include); $autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include); my $configure_ac = find_configure_ac; init_tables; scan_files; output ('configure.scan'); if (-f $configure_ac) { check_configure_ac ($configure_ac); } # This close is really needed. For some reason, probably best named # a bug, it seems that the dtor of $LOG is not called automatically # at END. It results in a truncated file. $log->close; exit 0; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End:
Close