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 ...
随机推荐
- [LeetCode] 70. Climbing Stairs(斐波那契数列)
[思路] a.因为两种跳法,1阶或者2阶,那么假定第一次跳的是一阶,那么剩下的是n-1个台阶,跳法是f(n-1); b.假定第一次跳的是2阶,那么剩下的是n-2个台阶,跳法是f(n-2) c.由a.b ...
- 配合JAVA的AJAX使用
概要 Ajax是“Asynchronous JavaScript and XML”的简称,即异步的JavaScript和XML. readyState属性用来返回当前的请求状态,有五个可选值.分别是0 ...
- JavaScript获取访问设备信息
<html xmlns=http://www.w3.org/1999/xhtml> <head> <title>JavaScript获取访问设备信息</tit ...
- [LINUX]警告:检测到时钟错误。您的创建可能是不完整的。
[LINUX]警告:检测到时钟错误.您的创建可能是不完整的. 原因: 如果上一次编译时为20071001,你把系统时间改成20070901后再编译就会报这样的错误. 解决: 把时间 ...
- [洛谷P3521][POI2011]ROT-Tree Rotations
题目大意:给一棵$n(n\leqslant2\times10^5)$个叶子的二叉树,可以交换每个点的左右子树,要求前序遍历叶子的逆序对最少.输出最少的逆序对个数 题解:线段树合并,对于每个节点求出交换 ...
- oracle查看字符集和修改字符集
oracle查看字符集和修改字符集 : 查看数据库服务器的字符集: select userenv('language') from dual ; 登陆用dba: 停掉数据库 : shutdown im ...
- Python基础(8)迭代器、生成器
一 什么是迭代 1 重复 2 下一次重复是基于上一次的结果 # while True: # cmd=input('>>: ') # print(cmd) # l=['a','b','c', ...
- Hadoop之yarn调用机制
1,Mapper方法:如果在map方法之前执行一些程序用setup,之后用cleanup.同理在Reducer方法中也有setup和cleanup. 2,map任务是并行执行,没有谁先谁后,如果是两个 ...
- Tomcat部署时war和war exploded区别及验证
war和war exploded的区别 在使用IDEA开发项目的时候,部署Tomcat的时候通常会出现下边的情况: 是选择war还是war exploded 这里首先看一下他们两个的区别: war模式 ...
- Quartus ModelSim联合仿真中的RAM初始化
Modelsim只支持Hex格式的初始化文件,文件需要放在仿真的根目录下,例如:.\simulation\modelsim:并且在利用Quartus宏生成IP时,选择的初始化文件必须用绝对路径!否则M ...