am__fastdepCXX does not appear in AM_CONDITIONAL

上一篇 / 下一篇  2009-08-14 15:03:33 / 个人分类:linux os


ERROR LOG:
licaijun@licaijun:~/workspace/minigui-test/mgeff/libmgeff$ ./autogen.sh
/usr/share/automake-1.10/am/depend2.am: am__fastdepCXX does not appear in AM_CONDITIONAL
/usr/share/automake-1.10/am/depend2.am:   The usual way to define `am__fastdepCXX' is to add `AC_PROG_CXX'
/usr/share/automake-1.10/am/depend2.am:   to `configure.in' and run `aclocal' and `autoconf' again.
src/Makefile.am: C++ source seen but `CXX' is undefined
src/Makefile.am:   The usual way to define `CXX' is to add `AC_PROG_CXX'
src/Makefile.am:   to `configure.in' and run `autoconf' again.


fix this problem:

Beforelibtool 2.2, as soon as a project started using the support provided by this package, checks for C++ and Fortran compilers were added. These checks, lengthy, and pointless for C-only projects, often caused grief to the point that many different hacks, using M4 directives, were used and suggested between different guides.

With the new release series, this problem has been solved,LT_INITnow only checks for the actual compilers as declared by the project itself. While this works for most projects, there are a few where this caused further problems, and further grief.

The problem appears evident when building packages written in C++ (but Fortran is mostly the same) that don't check for the proper compiler, since theautomakeexecution will start reporting problems that “am__fastdepCXXdoes not appear inAM_CONDITIONAL”:

% automake --add-missing --copy --foreign
/usr/share/automake-1.10/am/depend2.am: am__fastdepCXX does not appear in AM_CONDITIONAL
/usr/share/automake-1.10/am/depend2.am: The usual way to define `am__fastdepCXX' is to add `AC_PROG_CXX'
/usr/share/automake-1.10/am/depend2.am: to `configure.ac' and run `aclocal' and `autoconf' again.
cjeca32/Makefile.am: C++ source seen but `CXX' is undefined
cjeca32/Makefile.am: The usual way to define `CXX' is to add `AC_PROG_CXX'
cjeca32/Makefile.am: to `configure.ac' and run `autoconf' again.

The main problem here is that the error (divided in two parts) is actually meaningful only in the second part, for most people, since the first three lines sound like gibberish for the common users.

The second part of the error actually tells you exactly what to do: addingAC_PROG_CXXtoconfigure.ac; even better, before the initialisation call.

Example 4.1.  Properly Fix missing C++ support with libtool 2.2

dnl configure.ac
AC_INIT
AM_INIT_AUTOMAKE

dnl add this
AC_PROG_CXX

AC_PROG_LIBTOOL

Please note here, that the functionAC_PROG_LIBTOOLin this snipped is the deprecated 1.5-compatible form. ofLT_INIT. Since the error shown above happens during portingtolibtool2.2, it's unlikely that the new form. is found. See???.



TAG:

 

评分:0

我来说两句

Open Toolbar