多年来,这一直在困扰我,但是我一直在忽略它,就像我怀疑其他人一样。

AM_INIT_AUTOMAKE([dist-bzip2])
AC_PROG_CC
AC_PROG_LIBTOOL
AC_C_INLINE
AM_PROG_CC_C_O

在我的configure.ac文件中,配置将进入我的c编译器,但随后继续:

checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking the maximum length of command line arguments... 1966080

这并没有真正伤害任何东西,它只是增加了视觉噪音,并使事情需要更长的时间来运行 - 但它并不重要,但是多年来一直困扰着我。

我已经尝试使用 - with-tags = c,ac_lang([c])和其他几个带有壳变量的技巧(绝对感觉像是错误的方法...),看看我是否可以关闭它。

有人知道AutoConf/Automake/libtool Blessed方法仅对C进行配置探测?

有帮助吗?

解决方案

如果您使用libtool 1.5或更早,则必须诉诸肮脏的技巧。将其放在您的configure.ac中:

m4_defun([_LT_AC_LANG_CXX_CONFIG], [:])
m4_defun([_LT_AC_LANG_F77_CONFIG], [:])

或者,您可以切换到Libtool 2.2或更高版本,它会自动(更明智地)检测到要查找的编译器。

其他提示

正如Ptomato所说,正确的方法是使用现代的Libtool。在configure.ac:ac:

# Set up libtool. The argument enables support for win32 DLLs
# and replaces AC_LIBTOOL_WIN32_DLL.
LT_INIT([win32-dll])
# Add C support to libtool
AC_PROG_CC
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top