编译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. powerdesigner 外键生成sql语句设置在创建表里面

    根据情况需要将创建外键表的sql语句生成在创建表的sql语句中,如下设置:

  2. tomcat 路径"/"表示根目录

  3. CSS优化压缩

    顾名思义缩写有简写意思,那就总结一下CSS缩写知识点.为什么要让CSS属性缩写?1.简化代码.一些CSS属性简写可以减少CSS代码从而减少CSS文件的占用字节.加快网页下载速度和网页加载速度.2.优化 ...

  4. Codeforces Round #350 (Div. 2) A

    A. Holidays time limit per test 1 second memory limit per test 256 megabytes input standard input ou ...

  5. Eclipse来push,fetch,rebase代码

    如何与项目里的其他人一起合作项目,提交代码并更新呢?这里提出我比最近用到的两种工具:一种是Eclipse,另外一个是SourceTree.个人推荐从事Java开发的话,可以用Eclipse.当然,还有 ...

  6. bzoj 1201[HNOI2005]数三角形 1202 [HNOI2005]狡猾的商人 暴力 权值并查集

    [HNOI2005]数三角形 Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 349  Solved: 234[Submit][Status][Disc ...

  7. 移动端list布局,左边固定,右边自适应

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8&quo ...

  8. Java多线程调试如何完成信息输出处理

    转载自:http://developer.51cto.com/art/201003/189078.htm Java多线程调试是很繁琐的,但是还是需要我们不断进行相关的学习.下面我们就来看看在Java多 ...

  9. VC++中编译C出错:error C2143: syntax error : missing ';' before 'type'

    转摘自:http://preceo.blog.51cto.com/6225017/1130931 近来写程序时发现了一个问题,用 VC 编译 C语言是 总是提示一个错误:error C2143: sy ...

  10. jquery.cookie.js 的使用指南

    转自:http://www.cnblogs.com/yjzhu/p/4359420.html 介绍: jquery.cookie.js 是一款轻量级的 cookie 插件,可以读取,写入和删除 coo ...