Hi all. I'm starting to use autoconf version 2.13 (Debian testing package), and would like that it tells me whether the iostream headers are installed or not. My configure.in is:
<--------------- configure.in ------------->
# -*- Autoconf -*- # Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57) AC_INIT([Foo Library], [1.0], [Ramón <me@xxxxxxxxxx>]) AC_CONFIG_SRCDIR([src/Exception.h]) AC_CONFIG_AUX_DIR([./aux-build-tools])
AC_CONFIG_HEADER([config.h])
# Where to install the things AC_SUBST(prefix, "/tmp/test")
# Only if you are not writting Makefile.in by hand # We get Makefile.in from Makefile.am AM_INIT_AUTOMAKE
# Checks for programs. AC_PROG_CXX AC_PROG_CXXCPP AC_PROG_RANLIB AC_PROG_INSTALL
# Checks for header files. AC_PATH_X AC_HEADER_STDC AC_CHECK_HEADERS([malloc.h stdlib.h]) AC_CHECK_HEADERS([iostream])
# Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T
# Checks for library functions. AC_CHECK_FUNCS([floor memset pow sqrt])
AC_CONFIG_FILES([Makefile]) AC_OUTPUT
<--------------- end of configure.in ------------->
When I do
$ autoreconf && ./configure
I get (I haven't written the Makefile.in yet, but I think it does not have to do with the problem):
<--------------- stdout ------------->
checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking whether make sets $(MAKE)... yes checking for working aclocal-1.4... found checking for working autoconf... found checking for working automake-1.4... found checking for working autoheader... found checking for working makeinfo... found checking for g++... g++ checking for C++ compiler default output... a.out checking whether the C++ compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for ranlib... ranlib checking for a BSD-compatible install... /usr/bin/install -c checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for X... no checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking for stdlib.h... (cached) yes checking iostream usability... no checking iostream presence... no checking for iostream... no checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for an ANSI C-conforming const... yes checking for inline... inline checking for size_t... yes checking for floor... no checking for memset... yes checking for pow... no checking for sqrt... no configure: creating ./config.status config.status: creating Makefile config.status: error: cannot find input file: Makefile.in
<--------------- end of stdout ------------->
The problem, I believe, is that I get
checking iostream usability... no checking iostream presence... no checking for iostream... no
but I have it
$ ls /usr/include/c++/3.3/iostream -l -rw-r--r-- 1 root root 3,0K 2003-11-12 10:56 /usr/include/c++/3.3/iostream
and the compiler seems happy with this example:
I have this code snippet:
/* * test.cpp */
#include <iostream>
int main() { std::cout << "Hello World!" << std::endl; return 0; }
and can compile it with $ g++ -o test test.cpp and run it $ ./test Hello World!
where
$ g++ --version g++ (GCC) 3.3.2 (Debian)
I have also tried with
AC_CHECK_HEADERS([c++/3.3/iostream])
and
AC_CHECK_HEADERS([/usr/include/c++/3.3/iostream])
but it doesn't work. Am I trying to do something that cannot be done, or in a wrong way?
Cheers,
Ramón.
--
Ramón Casero Cañas
web: http://www.robots.ox.ac.uk/~rcasero/ jabber: rcasero@xxxxxxxxxx