编译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的问题的更多相关文章

  1. 如何根据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 ...

  2. configure.ac和Makefile.am的格式解析概述

    1. configure.ac和Makefile.am的格式解析概述 1.1. Autotools相关工具链 1.1.1. Autotools 1.1.2. 其他相关工具 1.2. 工具链的流程 1. ...

  3. automake中Makefile.am和configure.ac的格式及编译过程

    step1:写Makefile.am step2:执行autoscan,会生成configurae.scan,修改configure.scan内容之后,命名为configure.ac step3:执行 ...

  4. 编写configure.ac

    configure.ac由一些宏组成(如果已经有源代码,你可以运行autoscan来产生一个configure.scan文件,在此基础修改成configure.ac将更加方便) 最基本的组成可以是下面 ...

  5. 懒人学习automake, Makefile.am,configure.ac(转)

    已经存在Makefile.am,如何生成Makefile? 步骤: [root@localhost hello]# autoscan .///在当前文件夹中搜索 [root@localhost hel ...

  6. 懒人学习automake, Makefile.am,configure.ac

    已经存在Makefile.am,如何生成Makefile? 步骤: [root@localhost hello]# autoscan .///在当前文件夹中搜索 [root@localhost hel ...

  7. configure.ac:32: error: possibly undefined macro: AC_DEFINE

    在ubuntu 下编译snappy时,在检查依赖关系时,处理autoconf的包时,在相关依赖包都已经安装的情况下,报如下错误,死活不过. configure.ac:32: error: possib ...

  8. 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:// ...

  9. 解决 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 ...

随机推荐

  1. 2018牛客多校第一场 D.Two Graphs

    题意: n个点,m1条边的图E1,n个点,m2条边的图E2.求图E2有多少子图跟图E1同构. 题解: 用STL的全排列函数next_permutation()枚举映射.对于每一种映射枚举每一条边判断合 ...

  2. MFC随机数

    void CMFCDemoDlg::OnClickedGetrand() { wchar_t str[]; //srand((unsigned)time(NULL)); int num = rand( ...

  3. http get post 参数校验

    spring boot 常见http get ,post请求参数处理   在定义一个Rest接口时通常会利用GET.POST.PUT.DELETE来实现数据的增删改查:这几种方式有的需要传递参数,后台 ...

  4. [bzoj 2844]线性基+高斯消元

    题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=2844 又用到线性基+高斯消元的套路题了,因为经过高斯消元以后的线性基有非常好的序关系,所以 ...

  5. bzoj 1110 [POI2007]砝码Odw 贪心+进制转化

    [POI2007]砝码Odw Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 661  Solved: 366[Submit][Status][Disc ...

  6. rman备份与异机恢复

    一.rman备份脚本并为定时任务 #!/bin/bashsource ~/.bash_profileexport LANG=en_USBACKUP_DATE=`date +%d`#RMAN_LOG_F ...

  7. 播放video

    <html> <head> <title> four in one vedio</title> <style type="text/cs ...

  8. 普通table表格样式及代码大全

     普通table表格样式及代码大全(全)(一) 单实线边框表格 <table style="border-collapse: collapse" borderColor=#0 ...

  9. linux网络编程系列-TCP/IP模型

    ### OSI:open system interconnection ### 开放系统互联网模型是由ISO国际标准化组织定义的网络分层模型,共七层 1. 物理层:物理定义了所有电子及物理设备的规范, ...

  10. 关于MyBatis的collection集合中只能取到一条数据的问题

    问题:在涉及多表查询的时候,使用collection元素来映射集合属性时,出现了只能查询到一条数据的情况,但用sql语句在数据库中查询会有多条记录. 解决:如果两表联查,主表和明细表的主键都是id的话 ...