autotools

Cross-compile Apache Portable Runtime to the iPhone

有些话、适合烂在心里 提交于 2019-12-20 21:06:12
问题 This is a followup to a previous question on cross-compiling for the iPhone: Cross-compile Autotools-based Libraries for Official iPhone SDK Basically, I am trying to compile the Apache Portable Runtime (APR) version 1.3.8 (latest) for the iPhone. I am currently running into the following error during the configuration step: checking for working PROCESS_SHARED locks... configure: error: in `/Users/michaelsafyan/Downloads/apr-1.3.8': configure: error: cannot run test program while cross

Install data directory tree with massive number of files using automake

断了今生、忘了曾经 提交于 2019-12-20 17:41:42
问题 I have a data directory which I would like automake to generate install and uninstall targets for. Essentially, I just want to copy this directory verbatim to the DATA directory, Normally, I might list all the files individually, like dist_whatever_DATA=dir/subdir/filea ... But the problem arises when my directory structure looks like this *root *subdir *~10 files *subdir *~10 files *subdir *~700 files *subdir ... ~20 subdirs I just cannot list all 1000+ files included as part of my Makefile

Install arbitrary data files in fixed location with Automake?

时光总嘲笑我的痴心妄想 提交于 2019-12-19 07:24:37
问题 How can I tell automake to install arbitrary data files in places I want? I have some files I need to put in specific places, e.g. " datafile1 ", in my project, needs to be copied to " /usr/MyProduct/flash_memory ". " /usr/MyProduct/flash_memory " is an absolute path that I can't change. " datafile1 " is a binary data file that is not "built" by make , but just needs to be copied by make install . I can't bear on make dist . It needs to be copied by make install (its a long explanation, so,

How to check header files and library functions in CMake like it is done in Autotools?

无人久伴 提交于 2019-12-19 05:12:38
问题 I'm currently converting a small C project from autotools to CMake. In the old configure.in I checked every header and library function for existence using the following lines: # Checks for header files AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h time.h math.h sys/stat.h errno.h unistd.h fcntl.h signal.h]) # Checks for library functions AC_FUNC_FORK AC_CHECK_FUNCS([time localtime mktime gmtime exit fork chdir atol signal]) AC_FUNC_STRFTIME It's what many autotools projects do AFAIK. Despite the

Autotools : how to set global compilation flag

走远了吗. 提交于 2019-12-18 12:18:24
问题 I have a project with several sources directories : src/A /B /C In each, the Makefile.am contains AM_CXXFLAGS = -fPIC -Wall -Wextra How can avoid repeating this in each source folder ? I tried to modifiy src/Makefile.am and the configure.in, but without success. I thought I could use AC_PROG_CXX to set the compilation flags globally but can't find much documentation on how to use those macro (do you have any pointer to such a documentation ?). Thanks in advance 回答1: You can do several things:

CFLAGS vs CPPFLAGS

删除回忆录丶 提交于 2019-12-17 08:03:39
问题 I understand that CFLAGS (or CXXFLAGS for C++) are for the compiler, whereas CPPFLAGS is used by the preprocessor. But I still don't understand the difference. I need to specify an include path for a header file that is included with #include -- because #include is a preprocessor directive, is the preprocessor (CPPFLAGS) the only thing I care about? Under what circumstances do I need to give the compiler an extra include path? In general, if the preprocessor finds and includes needed header

CFLAGS vs CPPFLAGS

随声附和 提交于 2019-12-17 08:03:15
问题 I understand that CFLAGS (or CXXFLAGS for C++) are for the compiler, whereas CPPFLAGS is used by the preprocessor. But I still don't understand the difference. I need to specify an include path for a header file that is included with #include -- because #include is a preprocessor directive, is the preprocessor (CPPFLAGS) the only thing I care about? Under what circumstances do I need to give the compiler an extra include path? In general, if the preprocessor finds and includes needed header

Linux GNU C语言项目组织工具 autotools 使用

 ̄綄美尐妖づ 提交于 2019-12-15 20:08:16
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 转载说明 : 虽然没有开发过C语言的大型项目,但一直对C语言的项目组织比较感兴趣。当然不是Visual Sutdio,CodeBlock 这类IDE的项目组织,而是GNU 系列开源工具。 如果在用过Linux系统就知道安装开源软件的这三个命令: ./configure (./config) make make install(./make uninstall) 这类软件大多数开源软件都是采用GNU 构建体系,具体表现在autotools 系列工具。转载的这篇博文就是autools 系列软件的使用流程。 注1 :安装软件时建议采用apt-get install gcc make autoconf automake libtool libsysfs-dev 命令安装。适用于 debian 或基于 debian的系统。采用原文的 源码安装,会出现下面的错误 configure.ac:17: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoreconf:

GNU 构建系统

痴心易碎 提交于 2019-12-15 20:03:30
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 需要整理关于 ' GNU构建系统 ' 的文章 Autoconf, Automake and Libtool http://sources.redhat.com/autobook /autobook/autobook_toc.html http://sources.redhat.com/autobook/autobook/autobook_toc.html#SEC_Contents Autoconf http://zh.wikipedia.org/wiki/Autoconf GNU构建系统 http://zh.wikipedia.org/wiki/GNU%E6%9E%84%E5%BB%BA%E7%B3%BB%E7%BB%9F Autotoolset Tutorial http://autotoolset.sourceforge.net/tutorial.html http://hi.baidu.com/aflyhorse1990/blog/item/516201520880bd030df3e322.html Automake Manual http://www.gnu.org/software/automake/manual/html_node/index.html Autoconf Manual http:/

Autoconf problem: “error: C compiler cannot create executables”

人走茶凉 提交于 2019-12-13 16:08:12
问题 I'm trying to build a program I've written in C using GNU autotools, but I evidently have it set up wrong because when configure runs, it spits out: configure: error: C compiler cannot create executables If I look in config.log , I see: configure:2846: checking for C compiler default output file name configure:2868: gcc conftest.c >&5 conftest.c:3:25: warning: missing terminating " character conftest.c:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token configure: