I ran into the same problem here:
Building lighttpd-1.4.59 as non-root user
mobile$ ./autogen.sh
main::scan_file() called too early to check prototype at
/usr/bin/aclocal line 622. autom4te: cannot open
autom4te.cache/requests: Permission denied aclocal:
/usr/bin/autom4te failed with exit status: 1 autoreconf: aclocal
failed with exit status: 1 build requires autoconf automake libtool m4
pcre pcre-devel pkg-config
Building lighttpd-1.4.59 as root user
root# ./autogen.sh
main::scan_file() called too early to check prototype at
/usr/bin/aclocal line 622. libtoolize: $pkgltdldir is not a
directory: `/syslol/share/libtool' autoreconf: libtoolize failed
with exit status: 1 build requires autoconf automake libtool m4 pcre
pcre-devel pkg-config
The ./autogen.sh tries to locate the `/syslol/share/libtool' libtool directory from the given path directory.
Therefore, create the directory tree `/syslol/share/libtool' as follows
root# mkdir -p /syslol/share/libtool
Let's find libtool directory
root# find / -type d -name libtool
/share/libtool
Add a symbolic link to reference the `/share/libtool' directory
root# ln -s /share/libtool/* /syslol/share/libtool/
Run the build a second time
root# ./autogen.sh
main::scan_file() called too early to check prototype at
/usr/bin/aclocal line 622. libtoolize: $aclocaldir is not a directory:
`/syslol/share/aclocal' autoreconf: libtoolize failed with exit status: 1 build requires autoconf automake libtool m4 pcre pcre-devel
pkg-config
This shows that we also need to link aclocal directory to this path `/syslol/share/aclocal'
Create aclocal within the /syslol/share directory
root# mkdir -p /syslol/share/aclocal
Lets find the location of aclocal directory :
root# find / -type d -name aclocal
/share/aclocal
/usr/local/share/aclocal
/usr/share/aclocal
We'll choose the /share/aclocal/ path for linking
root# ln -s /share/aclocal/* /syslol/share/aclocal/
Third dry run:
root# ./autogen.sh
main::scan_file() called too early to check prototype at /usr/bin/aclocal line 622.
'libtoolize: putting auxiliary files in.'.
libtoolize: copying file ./ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR,m4'.
libtoolize: copying file m4/libtool.m4' libtoolize: copying filem4/ltoptions.m4'
libtoolize: copying file m4/ltsugar.m4' libtoolize: copying filem4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
main::scan_file() called too early to check prototype at /usr/bin/aclocal line 622.
Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/${ <-- HERE ([^ \t=:+{}]+)}/ at /usr/bin/automake line 4153.
configure.ac:24: require Automake 1.13, but have 1.11.2
autoreconf: automake failed with exit status: 1
build requires autoconf automake libtool m4 pcre pcre-devel pkg-config
We've fixed the path problem, though still have automake problem Have to update Automake for a succcesful build.
Distributed automake version files can be found at Versions and for current I found at Automake version 1.13
Lets replace version automake version 1.11.2 with version 1.13
Backup the original binary
mobile$ which automake
/usr/bin/automake
root # mv /usr/bin/automake /usr/bin/automake1.11.2
Creating a new automake config file with content of version 1.13
root # cat > /usr/bin/automake
paste content from site here
^D
Add execute permission
root # chmod +x /usr/bin/automake
Fourth compilation
root # ./autogen.sh
main::scan_file() called too early to check prototype at /usr/bin/aclocal line 622.
libtoolize: putting auxiliary files in .'. libtoolize: copying file./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, m4'. libtoolize: copying filem4/libtool.m4'
libtoolize: copying file m4/ltoptions.m4' libtoolize: copying filem4/ltsugar.m4'
libtoolize: copying file m4/ltversion.m4' libtoolize: copying filem4/lt~obsolete.m4'
main::scan_file() called too early to check prototype at /usr/bin/aclocal line 622.
Now type './configure ...' and 'make' to compile.
We have a successful build