$autoreconf -i ..src/Makefile.am:30: error: liNUX does not appear in AM_CONDITIONALautoreconf: automake Failed with exit status: 1
包含Makefile.am中的错误的部分如下:
if OSX butt_SOURCES += CurrentTrackOSX.h CurrentTrackOSX.mendifif liNUX butt_SOURCES += currentTrack.h currentTracklinux.cppendifif windows butt_SOURCES += currentTrack.h currentTrack.cppendif
我的问题是,如何检查 *** 作系统是否为linux?如果有可能,有没有更好的方法来检查automake中的 *** 作系统?
解决方法 您可以检测它 directly in the Makefile,或者在配置源文件(可能是configure.ac)中定义条件,因为您使用的是autoreconf:# AC_CANONICAL_HOST is needed to access the 'host_os' variable AC_CANONICAL_HOSTbuild_linux=nobuild_windows=nobuild_mac=no# Detect the target systemcase "${host_os}" in linux*) build_linux=yes ;; cygwin*|mingw*) build_windows=yes ;; darwin*) build_mac=yes ;; *) AC_MSG_ERROR(["OS $host_os is not supported"]) ;;esac# Pass the conditionals to automakeAM_CONDITIONAL([liNUX],[test "$build_linux" = "yes"])AM_CONDITIONAL([windows],[test "$build_windows" = "yes"])AM_CONDITIONAL([OSX],[test "$build_mac" = "yes"])
总结Note:
host_os
refers to the target system,so if you are cross-compiling it sets the OS conditional of the system you are compiling to.
以上是内存溢出为你收集整理的linux – 如何使用automake检查 *** 作系统全部内容,希望文章能够帮你解决linux – 如何使用automake检查 *** 作系统所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)