|
| Hi,
I'm trying to learn the 'GNU Autotools' basics so I started with a simple
C++ 'Hello World' program and wrote a 'Makefile.am' and a 'configure.in'.
I'm following the 'GNU Autotools' book.
Makefile.am:
bin_PROGRAMS = hello
hello_SOURCES = hello.cpp
configure.in:
AC_INIT(hello.cpp)
AM_INIT_AUTOMAKE(hello, 0.1)
AC_PROG_CXX
AC_OUTPUT(Makefile)
Then, I run 'aclocal', 'autoconf', 'touch NEWS README AUTHORS ChangeLog',
and 'automake --add-missing'. Afterwards I try to test it so I run
'./configure' and make. When I do make I get:
c++ -DPACKAGE=\"hello\" -DVERSION=\"0.1\" -I. -I. -c hello.cpp
c++: "-c" is not a valid option to the preprocessor
I think the problem would be solved if I could tell make to use g++ and not
c++ as the compiler. Any idea what autoconf macro can do that? Or I'm
looking on the wrong place? I'm reading the autoconf manual but can't find
it.
Any ideas?
I'm running Mandrake Linux 9.0, aclocal 1.4-p6, autoconf 2.13, and automake
1.4-p6 (libtool is version 1.4.2 but that doesn't seem to matter here)
Thanks,
Nick
|
|