Autotools syntax error with ax_check_compile_flag

I am using autotools to build 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 this works well, why am I getting this error?

+5
source share
1 answer

autoreconf not magic (although I meet proponents of packages that obviously believe in that). When you started autoreconf , it could not find the macro AX_CHECK_COMPILE_FLAG and created a damaged configure script. This usually creates an error / diagnostic message at the same time.

'AX_CHECK_COMPILE_FLAG` comes from the autoconf file project, and Debian has a package that provides this, called autoconf-archive . You probably forgot to install it:

 sudo apt-get install autoconf-archive 
+11
source

All Articles