configure.ac中AC_CHECK_LIB的问题
编译Linux程序时,使用configure.ac生成的configure程序,时常会出现AC_CHECK_LIB检查某个库失败
而相应库通常是存在的,只是依赖于其他的库,此时,需要乃至AC_CHECK_LIB的other_libs参数
比如将,
AC_CHECK_HEADERS([usrsctp.h],
[AC_CHECK_LIB([usrsctp], [usrsctp_init],
[with_sctp="yes"; USRSCTP_LIBS="-lusrsctp -lpthread"],
[with_sctp="no"])],[with_sctp="no"]
)
修改为:
AC_CHECK_HEADERS([usrsctp.h],
[AC_CHECK_LIB([usrsctp], [usrsctp_init],
[with_sctp="yes"; USRSCTP_LIBS="-lusrsctp -lpthread"],
[with_sctp="no"]
,["-lpthread"])],[with_sctp="no"]
)
就能解决usrsctp包依赖于pthread库,导致的编译前找不到usrsctp库的问题
configure.ac中AC_CHECK_LIB的问题的更多相关文章
- 如何根据configure.ac和Makefile.am为开源代码产生当前平台的Makefile
1 2 3 4 5 6 7 8 9 //根据configure.in和Makefile.am生成makefile的步骤,基于UBUNTU 12.04 1.autoscan (可选) 2.aclocal ...
- configure.ac和Makefile.am的格式解析概述
1. configure.ac和Makefile.am的格式解析概述 1.1. Autotools相关工具链 1.1.1. Autotools 1.1.2. 其他相关工具 1.2. 工具链的流程 1. ...
- automake中Makefile.am和configure.ac的格式及编译过程
step1:写Makefile.am step2:执行autoscan,会生成configurae.scan,修改configure.scan内容之后,命名为configure.ac step3:执行 ...
- 编写configure.ac
configure.ac由一些宏组成(如果已经有源代码,你可以运行autoscan来产生一个configure.scan文件,在此基础修改成configure.ac将更加方便) 最基本的组成可以是下面 ...
- 懒人学习automake, Makefile.am,configure.ac(转)
已经存在Makefile.am,如何生成Makefile? 步骤: [root@localhost hello]# autoscan .///在当前文件夹中搜索 [root@localhost hel ...
- 懒人学习automake, Makefile.am,configure.ac
已经存在Makefile.am,如何生成Makefile? 步骤: [root@localhost hello]# autoscan .///在当前文件夹中搜索 [root@localhost hel ...
- configure.ac:32: error: possibly undefined macro: AC_DEFINE
在ubuntu 下编译snappy时,在检查依赖关系时,处理autoconf的包时,在相关依赖包都已经安装的情况下,报如下错误,死活不过. configure.ac:32: error: possib ...
- configure.ac:20: error: Autoconf version 2.65 or higher is required
安装thrift例如,下面的问题出现: configure.ac:20: error: Autoconf version 2.65 or higher is required wget http:// ...
- 解决 configure.ac:17: error: possibly undefined macro: AC_PROG_LIBTOOL
当安装configure.ac:17: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are le ...
随机推荐
- BZOJ1009: [HNOI2008]GT考试 矩阵快速幂+kmp+dp
这个题你发现打暴力的话可以记忆化搜素加剪枝,那么意味着可以递推,我们搜的话就是1010^9我们就往下匹配遇到匹配成功就return,那么我们可以想一下什么决定了状态,我们考虑kmp的过程,对于我们目前 ...
- MySQL使用笔记(六)条件数据记录查询
By francis_hao Dec 17,2016 条件数据记录查询 mysql> select field1,field2-- from table_name where 条件; 其中 ...
- oracle数据库导入导出方法
Oracle Database 10g以后引入了最新的数据泵(Data Dump)技术,使DBA或开发人员可以将数据库元数据(对象定义)和数据快速移动到另一个oracle数据库中. 数据泵导出导入(E ...
- [NOI2003] 文本编辑器 (splay)
复制炸格式了,就不贴题面了 [NOI2003] 文本编辑器 Solution 对于光标的移动,我们只要记录一下现在在哪里就可以了 Insert操作:手动维护中序遍历结果,即每次取中点像线段树一样一样递 ...
- The xor-longest Path [Trie]
The xo-longest Path 题目描述 给定一棵\(n≤100 000\)个点的带权树,求树上最长的异或和路径. 输入 多组数据.每组数据第一行一个整数n(\(1≤n≤100 00\),接下 ...
- C. Annoying Present SB题
C. Annoying Present time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- commons
<!-- https://mvnrepository.com/artifact/commons-lang/commons-lang --> <dependency> <g ...
- C语言编译各过程
1.预处理 此阶段主要完成#符号后面的各项内容到源文件的替换,往往一些莫名其妙的错误都是出现在头文件中的,要在工程中注意积累一些错误知识. (1).#ifdef等内容,完成条件编译内容的替换 (2). ...
- [BZOJ1005]Prufer数列+排列组合
一棵树的Prufer数列 每次在剩下的树中找到标号最小的叶子节点(对于无根树而言即是度数为1的节点),删去. 同时将其父节点(即与其相连的唯一点)加入Prufer数列当中. 一个Prufer数列所对应 ...
- JAVA Eclipse 教程
http://www.runoob.com/eclipse/eclipse-tutorial.html