autoconf

`./configure` options for cross compile?

*爱你&永不变心* 提交于 2019-12-22 08:08:49
问题 As far as I know, ./configure script is generated with GNU Autoconf . I don't know about Autoconf at all. How do these tools work, and how can I use this ./configure script to make source to cross-compile? 回答1: This is a pretty good little article to read on how to cross-compile: http://linux.bytesex.org/cross-compiler.html. The main part in cross-compiling is setting the configure flags for the compiler to poinst to the target architecture and platform: ./configure --target=sparc-linux -

AS_IF and AC_MSG_ERROR: error: possibly undefined macro

折月煮酒 提交于 2019-12-22 05:50:16
问题 I encounter such errors when trying to build libnice-0.1.10. For solution, I am following possibly undefined macro: AC_MSG_ERROR, but still not getting there. some program version uname: 3.5.0-23-generic m4: 1.4.16 automake: 1.14.1 autoconf: 2.69 libtoolize: 2.4.2 I also add ACLOCAL_FLAGS="-I /.../share/aclocal" in bashrc. Here is what is reported from autogen. $ ./autogen.sh configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd m4/gtk-doc.m4:7: GTK_DOC_CHECK is

How to upgrade openssl 0.9.8 to 1.0.2 with mod_ssl in Apache 2.2.9

微笑、不失礼 提交于 2019-12-22 00:35:35
问题 I am asked to recompile mo_ssl with openssl 1.0.2 in SuseSE11SP3. However, I am a newbie to Suse, but know a little bit of linux. OS : Suse SE11SP3 Openssl : 0.9.8j <-which comes with original Suse linux Web Server : Apache httpd 2.2.9 Here is limitation I have. I cannot use zypper or rpm because company security policy does not allow me to do it. It is absurd, this is how it goes here. Another limitation I have is this system is used by other web servers which I don't have permission. I have

autoconf-generated Makefile does not pass flags for library headers when using PKG_CHECK_MODULES

笑着哭i 提交于 2019-12-21 20:55:16
问题 My project depends upon a library (more precisely, GTK+) so I added the following configurations in my configure.ac : PKG_CHECK_MODULES([GTK], [gtk+-2.0]) AC_SUBST([GTK_CFLAGS]) AC_SUBST([GTK_LIBS]) My Makefile.am is: bin_PROGRAMS = secretary secretary_SOURCES = secretary.c For its turn, my secretary.c is as follows: #include <gtk/gtk.h> int main(int argc, char *argv[]) { gtk_init(&argc, &argv); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_show(window); gtk_main();

Autoconf check for struct flock

我的未来我决定 提交于 2019-12-21 07:23:55
问题 fcntl() uses struct flock structure to define and check file locks. Unfortunately, on different Unix systems the fields in this structure are in different order. Does anybody know how one could check for it with autoconf or at least check if the structure is in specific format (e.g. the question would be - does the struct format matches the Linux format)? 回答1: You can use this autoconf macro to find if a certain member of struct flock exists: AC_CHECK_MEMBERS([struct flock.l_type],[],[],[[

Autotools - tar This does not look like a tar archive

守給你的承諾、 提交于 2019-12-21 03:27:25
问题 After running make distcheck I get the message that I have successfully built the package and is ready for distribution. If I untar the tar.gz with tar -zxvf hello-0.2.tar.gz it successfully extracts all of its contents. However, when I try to extract them in different machines I get: tar: This does not look like a tar archive tar: Skipping to next header tar: Exiting with failure status due to previous errors The weird thing is that it was working before. On the machine I'm trying to build

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

Tips on how to deploy C++ code to work every where

假如想象 提交于 2019-12-20 09:54:08
问题 I'm not talking about making portable code. This is more a question of distribution. I have a medium-sized project. It has several dependencies on common libraries (eg openssl, zlib, etc). It compiles fine on my machine and now it's time to give it to the world. Essentially build engineering at its finest. I want to make installers for Windows, Linux, MacOSX, etc. I want to make a downloadable tar ball that will make the code work with a ./configure and a make (probably via autoconf). It

Autobook中文版(七)—9.一个小的GNU Autotools项目

点点圈 提交于 2019-12-19 17:51:16
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 9.一个小的GNU Autotools项目 原文:http://www.sourceware.org/autobook/ 本章介绍一个真实的小例子,演示一些GNU Autotools具有的特性,指明一些GNU Autotools使用上的陷阱。所有的源码能被下载从本书的主页上。这篇文章是我多年使用GNU Autotools的经验,你应该能够很容易地在你的项目里应用这些。首先,我将讲述在项目早期阶段遇到的一些问题。然后举例说明所涉及的问题,继续给你展示一个我的项目所使用的技术的基本结构,接着是可移植命令行shell库的实现细节。然后用一个小的shell库的实例程序结束本章。 后面,在12. A Large GNU Autotools Project and 20. A Complex GNU Autotools Project,这个例子将被逐渐地扩展,介绍一下新的GNU Autotools特性。 9.1 GNU Autotools 实战 这章详细讲述在这个项目开始的时候我遇到的一些具体的问题,是一些典型的,你可能想要在自己的项目中使用的技术,要不是那个正确的解决方案不可能立即明白的。如果你偶然遇到了类似的情况,你总是能够回来参考这章。我将介绍一下项目的架构,以便你做出更好的权衡,你可能有一个相对于我这里的项目

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: