Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am using autotools for building my C++ application. In my configure.ac I have the following line:

AX_CHECK_COMPILE_FLAG([-Wall], [CPPFLAGS="$CPPFLAGS -Wall"])

which causes the following error when executing ./configure (after running autoreconf -i):

./configure: line 3825: syntax error near unexpected token `-Wall,'
./configure: line 3825: `AX_CHECK_COMPILE_FLAG(-Wall, CPPFLAGS="$CPPFLAGS -Wall")'

My system: Linux web 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux

On my Ubuntu machine it works well, why do I get this error?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
470 views
Welcome To Ask or Share your Answers For Others

1 Answer

autoreconf isn't magic (though I encounter package maintainers who obviously believe this). When you ran autoreconf, it failed to find the AX_CHECK_COMPILE_FLAG macro, and produced a corrupt configure script. Usually that produces an error/diagnostic message at the same time.

'AX_CHECK_COMPILE_FLAG` comes from the autoconf archive project, and Debian has a package which provides this, named autoconf-archive. Likely, you forgot to install it:

sudo apt-get install autoconf-archive

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

Just Browsing Browsing

[5] html - How to create even cell spacing within a

548k questions

547k answers

4 comments

86.3k users

...