Hello,
here is my situation:
This script
// configure.in
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AC_CHECK_TOOL(CC, gcc, gcc)
AM_PROG_LIBTOOL
Will go and run a macro called AC_LIBTOOL_PROG_COMPILER_NO_RTTI
which tests the availability of the compiler options -fno-rtti
-fno-exceptions by running
gcc -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5
This, unfortunately, breaks under gcc 4, because the .c extension puts
the compiler in C mode (as opposed to C++), hence having it refuse the
C++ specific options as above.
A possible fix would be to run
gcc -c -g -O2 -fno-rtti -fno-exceptions -x c++ conftest.c >&5
(for example having the macro expand to something on the lines of
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti
-fno-exceptions],
lt_cv_prog_compiler_rtti_exceptions,
[-fno-rtti -fno-exceptions -x c++], [],
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag,
$1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti
-fno-exceptions"])
note the added -x c++ only to the actualy compiler invocation).
This behaviour works fine on gcc 2.96, 3.3.2, 3.4.0, 4.0.1 (which are
the ones I could test)
Thank you
Luca
--
Luca Fascione
Pipeline Engineer - Weta Digital
+644 380 9815 (x4904) / +64 21 0764 862
_______________________________________________
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool