wslay
wslay copied to clipboard
config error
./configure: line 16016: syntax error near unexpected token 0.20' ./configure: line 16016:
PKG_PROG_PKG_CONFIG(0.20)'
The cause is probably "0.20" is not quoted by []. PKG_PROG_PKG_CONFIG([0.20])
will fix the problem.
Hm, it is already quoted. Probably, pkg-config is missing. Could you check that pkg-config is installed on your system?
I'd bet installing pkgconfig to the environment fixes the problem. The fact that PKG_PROG_PKG_CONFIG
appears in configure
is a sign that pkgconfig is missing (if it is installed then the call should have been inline-expanded by autoconf).
Actually I just faced the same problem when trying to install nghttp2 on FreeBSD; install pkgconf (= pkgconfig) fixed the issue.
So, what we should do? I have the same error on Ubuntu 14.04.2.
Actually, repeating all sequence AFTER installing pkg-config
helps me (NOTE: don't ever touch your ./configure
file!):
$ autoreconf -i
$ automake
$ autoconf
$ ./configure
$ make
It is very strange. It works for me for years. We have experimental cmake support. Probably it could work.
I had this same problem in MinGW because the pkg-config that comes installed doesn't include the pkg.m4 macro so there is no PKG_PROG_PKG_CONFIG. To remedy this I built pkg-config and installed it. I had a hiccup building because it couldn't find a suitable memory barrier, so I used mfence. If you're using MinGW here's how you can do it (mostly a c&p from my e-mail to the openssl mailing list):
Get the latest version at http://pkgconfig.freedesktop.org/releases/?C=M;O=D
CFLAGS="-g -O2 -DMemoryBarrier\\(\\)=asm\\(\\\"mfence\\;\\\"\\)" ./configure --with-internal-glib >config.out 2>&1
make V=1 >make.out 2>&1
make install
So pkg.m4 can be found add /usr/local/share/aclocal to the aclocal dirlist if it's not there already:
grep -E "^/usr/local/share/aclocal$" /mingw/share/aclocal/dirlist 2>/dev/null
if [[ $? -ne 0 ]]; then echo /usr/local/share/aclocal >> /mingw/share/aclocal/dirlist; fi
aclocal.m4 included in wslay distribution includes definition of PKG_PROG_PKG_CONFIG, so it should work. It is true that pkg-config binary is required. If you are compiling from git, then yes, you have to somehow install pkg-config.
I confirm I have had the exact same problem here, after installing pkg-config, I was still having the issue. But I did as suggested by @avesus (restarted from autoreconf -i) and I managed to build. My platform is 14.04.2 LTS for ARM64...
Thanks for this !
@tatsuhiro-t Same for me. @avesus's suggestion fixed the issue.
My platform is 16.04 for ARM64, installed pkg-config and still not working using @avesus 's solution...
aclocal: installing 'm4/pkg.m4' from '/usr/share/aclocal/pkg.m4'
configure.ac:731: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
configure.ac:731: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
configure.ac:731: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
@avesus Thanks, it works!