XYZ File Manager
Current Path:
/usr/bin
usr
/
bin
/
📁
..
📄
7za
(49 B)
📄
[
(51.8 KB)
📄
aclocal
(35.52 KB)
📄
aclocal-1.16
(35.52 KB)
📄
addr2line
(27.74 KB)
📄
ar
(55.98 KB)
📄
arch
(31.66 KB)
📄
arpaname
(15.11 KB)
📄
as
(710.31 KB)
📄
aspell
(151.12 KB)
📄
autoconf
(14.42 KB)
📄
autoheader
(8.33 KB)
📄
autom4te
(31.43 KB)
📄
automake
(251.93 KB)
📄
automake-1.16
(251.93 KB)
📄
autoreconf
(20.57 KB)
📄
autoscan
(16.72 KB)
📄
autoupdate
(33.08 KB)
📄
awk
(698.17 KB)
📄
b2sum
(51.79 KB)
📄
base32
(35.69 KB)
📄
base64
(35.7 KB)
📄
basename
(35.67 KB)
📄
basenc
(48.02 KB)
📄
bash
(1.32 MB)
📄
bashbug-64
(6.91 KB)
📄
bunzip2
(39.62 KB)
📄
bzcat
(39.62 KB)
📄
bzcmp
(2.09 KB)
📄
bzdiff
(2.09 KB)
📄
bzgrep
(2.01 KB)
📄
bzip2
(39.62 KB)
📄
bzip2recover
(15.4 KB)
📄
bzless
(1.23 KB)
📄
bzmore
(1.23 KB)
📄
c++
(1.04 MB)
📄
c++filt
(27.18 KB)
📄
cagefs_enter.proxied
(1.27 KB)
📄
cal
(52.01 KB)
📄
captoinfo
(87.8 KB)
📄
cat
(35.66 KB)
📄
catchsegv
(3.21 KB)
📄
cc
(0 B)
📄
ccmake
(6.96 MB)
📄
chcon
(60.24 KB)
📄
chgrp
(56.19 KB)
📄
chmod
(56.16 KB)
📄
chown
(60.19 KB)
📄
chrt
(27.48 KB)
📄
cksum
(35.57 KB)
📄
clear
(15.16 KB)
📄
cloudlinux-awp-user
(1.78 KB)
📄
clwpos-user
(1.78 KB)
📄
cmake
(7.45 MB)
📄
cmp
(40.13 KB)
📄
col
(23.41 KB)
📄
colcrt
(15.38 KB)
📄
colrm
(15.36 KB)
📄
column
(35.52 KB)
📄
comm
(35.75 KB)
📄
cp
(149.24 KB)
📄
cpack
(7.35 MB)
📄
cpp
(1.04 MB)
📄
csplit
(108.88 KB)
📄
ctest
(8.31 MB)
📄
curl
(248.49 KB)
📄
cut
(47.8 KB)
📄
cyrusbdb2current
(1.58 MB)
📄
date
(104.05 KB)
📄
dbiprof
(6.06 KB)
📄
delv
(45.38 KB)
📄
df
(84.73 KB)
📄
diff
(194.7 KB)
📄
diff3
(52.3 KB)
📄
dig
(136.59 KB)
📄
dir
(137.65 KB)
📄
dircolors
(39.8 KB)
📄
dirname
(31.48 KB)
📄
dltest
(15.68 KB)
📄
dnstap-read
(23.19 KB)
📄
du
(149.44 KB)
📄
echo
(35.48 KB)
📄
ed
(52.51 KB)
📄
egrep
(32 B)
📄
enchant
(23.73 KB)
📄
enchant-lsmod
(15.8 KB)
📄
env
(44.23 KB)
📄
eps2eps
(643 B)
📄
eqn
(189.52 KB)
📄
ex
(1.38 MB)
📄
expand
(39.73 KB)
📄
expr
(108.6 KB)
📄
factor
(72.05 KB)
📄
false
(27.47 KB)
📄
fc-cache
(139 B)
📄
fc-cache-64
(23.17 KB)
📄
fc-cat
(19.16 KB)
📄
fc-conflist
(15.13 KB)
📄
fc-list
(15.13 KB)
📄
fc-match
(15.13 KB)
📄
fc-pattern
(15.14 KB)
📄
fc-query
(15.13 KB)
📄
fc-scan
(15.14 KB)
📄
fc-validate
(15.14 KB)
📄
fgrep
(32 B)
📄
file
(27.74 KB)
📄
find
(284.95 KB)
📄
flock
(23.56 KB)
📄
fmt
(39.77 KB)
📄
fold
(39.71 KB)
📄
free
(23.36 KB)
📄
funzip
(31.42 KB)
📄
g++
(1.04 MB)
📄
gawk
(698.17 KB)
📄
gcc-ar
(27.81 KB)
📄
gcc-nm
(27.8 KB)
📄
gcc-ranlib
(27.82 KB)
📄
gcov-dump
(283.74 KB)
📄
gcov-tool
(312.46 KB)
📄
gem
(542 B)
📄
gencat
(27.45 KB)
📄
geoiplookup
(15.86 KB)
📄
geoiplookup6
(15.81 KB)
📄
geqn
(189.52 KB)
📄
getconf
(35.23 KB)
📄
getent
(35.86 KB)
📄
getopt
(23.45 KB)
📄
ghostscript
(15.13 KB)
📄
gifdiff
(55.9 KB)
📄
gifsicle
(194.05 KB)
📄
git
(4.06 MB)
📄
git-receive-pack
(4.06 MB)
📄
git-shell
(770.68 KB)
📄
git-upload-archive
(4.06 MB)
📄
git-upload-pack
(4.06 MB)
📄
gm
(15.67 KB)
📄
gmake
(249.8 KB)
📄
gneqn
(916 B)
📄
gnroff
(3.21 KB)
📄
gpg
(1.07 MB)
📄
gpg-agent
(342.25 KB)
📄
gpg-error
(36.1 KB)
📄
gpgsplit
(27.49 KB)
📄
gpgv
(295.42 KB)
📄
gpic
(201.72 KB)
📄
gprof
(101.48 KB)
📄
grep
(154.49 KB)
📄
groff
(96.77 KB)
📄
grops
(167.26 KB)
📄
grotty
(122.2 KB)
📄
groups
(35.66 KB)
📄
gs
(15.13 KB)
📄
gsnd
(281 B)
📄
gsoelim
(0 B)
📄
gtar
(514.27 KB)
📄
gtbl
(130.86 KB)
📄
gtroff
(732.07 KB)
📄
gunzip
(2.29 KB)
📄
gzexe
(6.3 KB)
📄
gzip
(89.63 KB)
📄
hdu
(18.09 KB)
📄
head
(43.8 KB)
📄
hexdump
(51.59 KB)
📄
host
(108.57 KB)
📄
hostid
(31.66 KB)
📄
hostname
(23.84 KB)
📄
hunspell
(102.67 KB)
📄
iconv
(64.09 KB)
📄
id
(39.71 KB)
📄
idn
(35.8 KB)
📄
ifnames
(4.03 KB)
📄
infocmp
(63.69 KB)
📄
infotocap
(87.8 KB)
📄
install
(149.29 KB)
📄
ionice
(15.4 KB)
📄
ipcrm
(19.41 KB)
📄
ipcs
(39.52 KB)
📄
isosize
(15.34 KB)
📄
ispell
(992 B)
📄
isql
(40.01 KB)
📄
iusql
(31.95 KB)
📄
join
(51.9 KB)
📄
jpegoptim
(48.83 KB)
📄
kill
(31.47 KB)
📄
ld
(1.71 MB)
📄
ld.bfd
(1.71 MB)
📄
ldd
(5.32 KB)
📄
less
(197.9 KB)
📄
lessecho
(15.37 KB)
📄
lesskey
(24.8 KB)
📄
lesspipe.sh
(3.5 KB)
📄
link
(31.66 KB)
📄
ln
(60.16 KB)
📄
locale
(59.08 KB)
📄
localedef
(314.06 KB)
📄
logger
(36.16 KB)
📄
login
(43.62 KB)
📄
logname
(31.66 KB)
📄
look
(19.36 KB)
📄
ls
(137.64 KB)
📄
lto-dump
(26.58 MB)
📄
m4
(240.4 KB)
📄
make
(249.8 KB)
📄
make-dummy-cert
(614 B)
📄
mariadb
(5.12 MB)
📄
mariadb-access
(109.48 KB)
📄
mariadb-admin
(4.89 MB)
📄
mariadb-binlog
(5.16 MB)
📄
mariadb-check
(4.89 MB)
📄
mariadb-conv
(4.6 MB)
📄
mariadb-convert-table-format
(4.28 KB)
📄
mariadb-dump
(4.99 MB)
📄
mariadb-dumpslow
(8.19 KB)
📄
mariadb-embedded
(24.72 MB)
📄
mariadb-find-rows
(3.35 KB)
📄
mariadb-hotcopy
(34.67 KB)
📄
mariadb-import
(5 MB)
📄
mariadb-plugin
(4.58 MB)
📄
mariadb-secure-installation
(13.66 KB)
📄
mariadb-setpermission
(17.7 KB)
📄
mariadb-show
(4.88 MB)
📄
mariadb-slap
(4.89 MB)
📄
mariadb-tzinfo-to-sql
(4.57 MB)
📄
mariadb-waitpid
(4.56 MB)
📄
mc
(1.22 MB)
📄
mcdiff
(1.22 MB)
📄
mcedit
(1.22 MB)
📄
mcookie
(27.5 KB)
📄
mcview
(1.22 MB)
📄
md5sum
(39.64 KB)
📄
mesg
(15.33 KB)
📄
mkdir
(68.31 KB)
📄
mkfifo
(39.83 KB)
📄
mknod
(43.88 KB)
📄
mktemp
(39.8 KB)
📄
more
(43.63 KB)
📄
msmtp
(133.98 KB)
📄
msmtpd
(35.65 KB)
📄
msql2mysql
(1.42 KB)
📄
mv
(141.17 KB)
📄
my_print_defaults
(4.56 MB)
📄
mysql
(5.12 MB)
📄
mysql_config
(4.47 KB)
📄
mysql_find_rows
(3.35 KB)
📄
mysql_waitpid
(4.56 MB)
📄
mysqlaccess
(109.48 KB)
📄
mysqladmin
(4.89 MB)
📄
mysqlbinlog
(5.16 MB)
📄
mysqlcheck
(4.89 MB)
📄
mysqldump
(4.99 MB)
📄
mysqlimport
(5 MB)
📄
mysqlshow
(4.88 MB)
📄
mytop
(72.03 KB)
📄
namei
(23.41 KB)
📄
nano
(346.2 KB)
📄
neqn
(916 B)
📄
nice
(35.67 KB)
📄
nl
(100.71 KB)
📄
nm
(44.71 KB)
📄
nohup
(35.58 KB)
📄
nproc
(35.69 KB)
📄
nroff
(3.21 KB)
📄
nslookup
(112.52 KB)
📄
nsupdate
(71.8 KB)
📄
numfmt
(55.83 KB)
📄
objcopy
(185.37 KB)
📄
objdump
(413.09 KB)
📄
od
(64.06 KB)
📄
odbc_config
(15.7 KB)
📄
odbcinst
(23.9 KB)
📄
openssl
(1.01 MB)
📄
optipng
(92.02 KB)
📄
pango-list
(19.11 KB)
📄
pango-segmentation
(19.13 KB)
📄
pango-view
(60.17 KB)
📄
passwd
(1.26 KB)
📄
paste
(35.58 KB)
📄
patch
(195.02 KB)
📄
pathchk
(35.66 KB)
📄
pdf2dsc
(701 B)
📄
pdf2ps
(913 B)
📄
perldoc
(118 B)
📄
pgrep
(31.42 KB)
📄
php
(10.1 MB)
📄
php-cgi
(8.1 MB)
📄
phpize
(4.97 KB)
📄
pic
(201.72 KB)
📄
piconv
(8.08 KB)
📄
ping
(76.51 KB)
📄
pinky
(35.61 KB)
📄
pkill
(31.42 KB)
📄
pmap
(35.39 KB)
📄
pod2man
(14.68 KB)
📄
pod2text
(10.55 KB)
📄
pod2usage
(4.01 KB)
📄
post-grohtml
(199.76 KB)
📄
pr
(72.28 KB)
📄
pre-grohtml
(92.92 KB)
📄
precat
(5.53 KB)
📄
preunzip
(5.53 KB)
📄
prezip
(5.53 KB)
📄
prezip-bin
(15.69 KB)
📄
printenv
(31.47 KB)
📄
printf
(51.77 KB)
📄
ps
(141.15 KB)
📄
ps2ascii
(635 B)
📄
ps2epsi
(1.24 KB)
📄
ps2pdf
(276 B)
📄
ps2pdf12
(219 B)
📄
ps2pdf13
(219 B)
📄
ps2pdf14
(219 B)
📄
ps2pdfwr
(1.06 KB)
📄
ps2ps
(651 B)
📄
ps2ps2
(673 B)
📄
ptx
(129.03 KB)
📄
pwd
(35.7 KB)
📄
pwdx
(15.28 KB)
📄
pydoc
(78 B)
📄
pydoc3
(78 B)
📄
pydoc3.9
(78 B)
📄
python
(15.09 KB)
📄
python3
(15.09 KB)
📄
python3.9
(15.09 KB)
📄
ranlib
(56 KB)
📄
readelf
(667.28 KB)
📄
readlink
(39.69 KB)
📄
realpath
(39.77 KB)
📄
recode
(31.93 KB)
📄
red
(92 B)
📄
rename
(23.41 KB)
📄
renew-dummy-cert
(729 B)
📄
renice
(15.36 KB)
📄
replace
(4.54 MB)
📄
reset
(27.34 KB)
📄
restic
(28.4 MB)
📄
rev
(15.35 KB)
📄
rm
(60.21 KB)
📄
rmdir
(43.61 KB)
📄
rnano
(346.2 KB)
📄
rsync
(559.16 KB)
📄
rsync-ssl
(5.01 KB)
📄
ruby
(15.27 KB)
📄
run-with-aspell
(89 B)
📄
runcon
(35.65 KB)
📄
rvi
(1.38 MB)
📄
rview
(1.38 MB)
📄
rvim
(3.84 MB)
📄
scalar
(819.34 KB)
📄
scl
(39.55 KB)
📄
scl_enabled
(262 B)
📄
scl_source
(1.88 KB)
📄
scp
(133.06 KB)
📄
script
(51.75 KB)
📄
sdiff
(44.2 KB)
📄
sed
(114.01 KB)
📄
seq
(47.79 KB)
📄
setsid
(15.34 KB)
📄
setterm
(35.52 KB)
📄
sftp
(141.05 KB)
📄
sh
(1.32 MB)
📄
sha1sum
(39.64 KB)
📄
sha224sum
(39.64 KB)
📄
sha256sum
(39.64 KB)
📄
sha384sum
(39.64 KB)
📄
sha512sum
(39.64 KB)
📄
shred
(51.88 KB)
📄
shuf
(48.01 KB)
📄
size
(31.61 KB)
📄
skill
(31.4 KB)
📄
slabtop
(23.42 KB)
📄
sleep
(35.65 KB)
📄
slencheck
(15.71 KB)
📄
snice
(31.4 KB)
📄
soelim
(0 B)
📄
sort
(113.09 KB)
📄
spell
(125 B)
📄
split
(52.31 KB)
📄
sprof
(35.45 KB)
📄
sqlite3
(1.52 MB)
📄
ssh
(843.53 KB)
📄
ssh-add
(164.86 KB)
📄
ssh-agent
(281.02 KB)
📄
ssh-copy-id
(12.38 KB)
📄
ssh-keygen
(455.04 KB)
📄
ssh-keyscan
(197.43 KB)
📄
stat
(80.06 KB)
📄
stdbuf
(43.74 KB)
📄
strace
(2.08 MB)
📄
strings
(31.74 KB)
📄
strip
(185.36 KB)
📄
stty
(75.83 KB)
📄
sum
(35.59 KB)
📄
svn
(446.56 KB)
📄
svnadmin
(136.45 KB)
📄
svndumpfilter
(44.15 KB)
📄
svnfsfs
(44.03 KB)
📄
svnlook
(92.23 KB)
📄
svnrdump
(56.23 KB)
📄
svnserve
(112.91 KB)
📄
svnsync
(68.41 KB)
📄
svnversion
(15.72 KB)
📄
sync
(35.54 KB)
📄
tabs
(19.16 KB)
📄
tac
(104.6 KB)
📄
tail
(68.09 KB)
📄
tar
(514.27 KB)
📄
taskset
(23.41 KB)
📄
tbl
(130.86 KB)
📄
tclsh
(15.69 KB)
📄
tclsh8.6
(15.69 KB)
📄
tee
(35.69 KB)
📄
test
(43.79 KB)
📄
tic
(87.8 KB)
📄
timeout
(40.17 KB)
📄
tload
(19.34 KB)
📄
tmpwatch
(36.03 KB)
📄
toe
(23.23 KB)
📄
top
(132.27 KB)
📄
touch
(92.03 KB)
📄
tput
(27.25 KB)
📄
tr
(47.87 KB)
📄
tree
(85.45 KB)
📄
troff
(732.07 KB)
📄
true
(27.47 KB)
📄
truncate
(35.66 KB)
📄
tset
(27.34 KB)
📄
tsort
(47.79 KB)
📄
tty
(31.65 KB)
📄
tzselect
(14.99 KB)
📄
ul
(23.45 KB)
📄
uname
(31.66 KB)
📄
unexpand
(39.73 KB)
📄
uniq
(43.83 KB)
📄
unlink
(31.66 KB)
📄
unrar
(347.02 KB)
📄
unzip
(196.14 KB)
📄
unzipsfx
(87.89 KB)
📄
uptime
(15.29 KB)
📄
users
(35.68 KB)
📄
utmpdump
(23.4 KB)
📄
vdir
(137.65 KB)
📄
vi
(691 B)
📄
view
(150 B)
📄
vim
(3.84 MB)
📄
vimdiff
(3.84 MB)
📄
vimtutor
(2.07 KB)
📄
vmstat
(39.41 KB)
📄
watch
(27.87 KB)
📄
wc
(43.73 KB)
📄
wget
(521.41 KB)
📄
whereis
(32.03 KB)
📄
which
(27.89 KB)
📄
who
(51.77 KB)
📄
whoami
(31.66 KB)
📄
word-list-compress
(15.7 KB)
📄
x86_64-redhat-linux-c++
(1.04 MB)
📄
x86_64-redhat-linux-g++
(1.04 MB)
📄
x86_64-redhat-linux-gcc-11
(1.04 MB)
📄
xargs
(64.09 KB)
📄
xmlcatalog
(23.15 KB)
📄
xmllint
(80.55 KB)
📄
xmlwf
(39.63 KB)
📄
xsltproc
(31.23 KB)
📄
xxd
(19.31 KB)
📄
yes
(31.51 KB)
📄
zcat
(1.94 KB)
📄
zcmp
(1.64 KB)
📄
zdiff
(6.31 KB)
📄
zegrep
(33 B)
📄
zfgrep
(33 B)
📄
zforce
(2.04 KB)
📄
zgrep
(7.93 KB)
📄
zip
(221.09 KB)
📄
zipcloak
(75.7 KB)
📄
zipgrep
(2.89 KB)
📄
zipinfo
(196.14 KB)
📄
zipnote
(67.61 KB)
📄
zipsplit
(63.58 KB)
📄
zless
(2.16 KB)
📄
zmore
(1.8 KB)
📄
znew
(4.47 KB)
📄
zsoelim
(0 B)
Editing: autoscan
#! /usr/bin/perl -w # -*- perl -*- # Generated from autoscan.in; do not edit by hand. # autoscan - Create configure.scan (a preliminary configure.ac) for a package. # Copyright (C) 1994, 1999-2012 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 <http://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; 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 Autom4te::ChannelDefs; use Autom4te::Configure_ac; use Autom4te::General; use Autom4te::FileUtils; use Autom4te::XFile; use File::Basename; use File::Find; use strict; use vars qw(@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 $configure_scan = 'configure.scan'; 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: <http://www.gnu.org/software/autoconf/>. General help using GNU software: <http://www.gnu.org/gethelp/>. "; # $version # -------- $version = "autoscan (GNU Autoconf) 2.69 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+/Autoconf: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>, <http://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 "< " . open_quote ($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 "< " . open_quote ($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 "< " . open_quote ($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 "< " . open_quote ($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 "> " . open_quote ($configure_scan); print $file ("# -*- Autoconf -*-\n" . "# Process this file with autoconf to produce a configure script.\n" . "\n" . "AC_PREREQ([2.69])\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))); verb "running: $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 "> " . open_quote ("$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:
Upload File
Create Folder