title: Autoconf/Automake "configure.ac:2: option `−Wall' not recognized"
body: <p>I'm trying to start with autoconf / automake for a new project. To get started, I'm reading <a href="http://www.lrde.epita.fr/~adl/autotools.html" rel="nofollow noreferrer">"Using GNU Autotools"</a> and trying to build the Hello-World-Tutorial.</p>
  
  <p>The required files from page 96 (real Page=105 because it's a LaTeX-Presentation) <code>configure.ac</code>, <code>Makefile.am</code> and <code>src/Makefile.am</code> look exactly as stated in the document.</p>
  
  <p>After that I tried:</p>
  
  <pre><code>$ autoreconf --install
  configure.ac:2: option `−Wall' not recognized
  autoreconf: automake failed with exit status: 1
  </code></pre>
  
  <p>Well, it seems that automake doesn't like the second line:</p>
  
  <pre><code>AM_INIT_AUTOMAKE([−Wall −Werror foreign])
  </code></pre>
  
  <p>Therefore I executed:</p>
  
  <pre><code>$ autoreconf -v --install
  autoreconf: Entering directory `.'
  autoreconf: configure.ac: not using Gettext
  autoreconf: running: aclocal 
  autoreconf: configure.ac: tracing
  autoreconf: configure.ac: not using Libtool
  autoreconf: running: /usr/bin/autoconf
  autoreconf: running: /usr/bin/autoheader
  autoreconf: running: automake --add-missing --copy --no-force
  configure.ac:2: option `−Wall' not recognized
  autoreconf: automake failed with exit status: 1
  </code></pre>
  
  <p>You can see easily that autoconf runs <code>automake --add-missing --copy --no-force</code> which I repeated with the verbose-option. And it only returns this:</p>
  
  <pre><code>$ automake -v --add-missing --copy --no-force 
  automake: thread 0: reading autoconf --trace=_LT_AC_TAGCONFIG:\$f:\$l::\$d::\$n::\${::}% --trace=AM_ENABLE_MULTILIB:\$f:\$l::\$d::\$n::\${::}% --trace=AM_SILENT_RULES:\$f:\$l::\$d::\$n::\${::}% --trace=AC_INIT:\$f:\$l::\$d::\$n::\${::}% --trace=_AM_COND_IF:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CONFIG_FILES:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CANONICAL_TARGET:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CONFIG_LIBOBJ_DIR:\$f:\$l::\$d::\$n::\${::}% --trace=AC_FC_SRCEXT:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CANONICAL_HOST:\$f:\$l::\$d::\$n::\${::}% --trace=AM_GNU_GETTEXT:\$f:\$l::\$d::\$n::\${::}% --trace=AC_LIBSOURCE:\$f:\$l::\$d::\$n::\${::}% --trace=AM_INIT_AUTOMAKE:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CANONICAL_BUILD:\$f:\$l::\$d::\$n::\${::}% --trace=AM_AUTOMAKE_VERSION:\$f:\$l::\$d::\$n::\${::}% --trace=_AM_SUBST_NOTMAKE:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CONFIG_AUX_DIR:\$f:\$l::\$d::\$n::\${::}% --trace=sinclude:\$f:\$l::\$d::\$n::\${::}% --trace=AM_PROG_CC_C_O:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CONFIG_LINKS:\$f:\$l::\$d::\$n::\${::}% --trace=AC_REQUIRE_AUX_FILE:\$f:\$l::\$d::\$n::\${::}% --trace=m4_sinclude:\$f:\$l::\$d::\$n::\${::}% --trace=LT_SUPPORTED_TAG:\$f:\$l::\$d::\$n::\${::}% --trace=AM_CONDITIONAL:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CONFIG_HEADERS:\$f:\$l::\$d::\$n::\${::}% --trace=AM_MAINTAINER_MODE:\$f:\$l::\$d::\$n::\${::}% --trace=m4_include:\$f:\$l::\$d::\$n::\${::}% --trace=_AM_COND_ELSE:\$f:\$l::\$d::\$n::\${::}% --trace=AM_GNU_GETTEXT_INTL_SUBDIR:\$f:\$l::\$d::\$n::\${::}% --trace=_AM_COND_ENDIF:\$f:\$l::\$d::\$n::\${::}% --trace=AC_SUBST_TRACE:\$f:\$l::\$d::\$n::\${::}%
  configure.ac:2: option `−Wall' not recognized
  </code></pre>
  
  <p>Anybody an idea why this doesn't work? My impression is that none of my files are wrong...</p>
  
  <p>I would like to use it for compiling C++ code for Linux and Windows (using mingw32-g++). Do you know any base where to start and what I have to pay attention for?</p>
  
  <p>I'm on Ubuntu 9.10 64bit.</p>
  
  <p>Any help is appreciated. Thanks in advance, regards</p>