autoconf

PKG_CHECK_MODULES considered harmful?

こ雲淡風輕ζ 提交于 2019-11-27 01:43:32
Various developers discourage the usage of the PKG_CHECK_MODULES (for example, in this answer ) but there is no clear, comprehensive explanation of their reasons as far as I've looked for. So, I ask: Why would PKG_CHECK_MODULES be harmful? What are the alternatives? I, for one, used it for the first time today. I found it invaluably useful, specially for dealing with pretty intricate library sets, such as GTK+, where I have all these dependencies: -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr

Append compile flags to CFLAGS and CXXFLAGS while configuration/make

风格不统一 提交于 2019-11-27 00:53:06
问题 The project that I am trying to build has default flags CFLAGS = -Wall -g -O2 CXXFLAGS = -g -O2 I need to append a flag -w to both these variables (to remove: 'consider all warnings as errors') I have a method to work it out, give make 'CFLAGS=-Wall -g -O2 -w'; 'CXXFLAGS=-g -O2 -w' OR Run ./configure and statically modify Makefile But I want to append my options with the existing options while running configure or make The post Where to add a CFLAG, such as -std=gnu99, into an autotools

Autotools build fails due to subdir-objects option in AM_INIT_AUTOMAKE

谁说胖子不能爱 提交于 2019-11-26 21:53:33
问题 I'm currently working on a C++ project which relies on recursive automake for building. I want to build a shared library and the Makefile.am in the src directory of the library looks like # ... # Library name lib_LTLIBRARIES = libadapter-@MY_API_VERSION@.la # Sources libadapter_@MY_API_VERSION@_la_SOURCES = \ $(top_builddir)/src/sourceA.cpp \ $(top_builddir)/src/sourceB.cpp # ... Since version 1.14, automake issues a warning when the subdir-objects option is not specified in AM_INIT_AUTOMAKE

What's the difference of “./configure” option “--build”, “--host” and “--target”?

大城市里の小女人 提交于 2019-11-26 17:01:49
The script ./configure accepts 3 options --build , --host and --target . I'm confusing their roles. What's the difference and semantics of them? user124850 As noted in this blog post and alluded to in the GCC Configure Terms , --target only applies when you are compiling toolchains. When you are doing normal cross-compilation of a library or binary you use --build=the architecture of the build machine --host=the architecture that you want the file to run on However, when you are building toolchains, things can get more complicated. I think that the following is correct (though I can't say I've

$PHP_AUTOCONF errors on mac os x 10.7.3 when trying to install pecl extensions

谁都会走 提交于 2019-11-26 15:08:30
问题 I am trying to setup my machine with pecl_http and memcache and in both cases, I get similar errors. This is on MAC OS X 10.7.3 (lion) and I also have XCODE installed on it. I also installed Zend Server community edition before running these commands and have CFLAGS='-arch i386 -arch x86_64' environment variables set. So please help with what I need to do bash-3.2# **sudo pecl install pecl_http-1.7.1** downloading pecl_http-1.7.1.tgz ... Starting to download pecl_http-1.7.1.tgz (174,098 bytes

How to determine host value for configure when using cross compiler

自古美人都是妖i 提交于 2019-11-26 14:08:41
问题 General question: If I use a cross compiler, how can I tell the value of the "--host" option I should give when I run configure? Specific: I'm using cross compiler for arm64 arch. What is the correct "--host" value to use? 回答1: If I use a cross compiler, how can I tell the value of the --host option I should give when I run ./configure ? Three machines must be distinguished when discussing toolchain creation The build machine , where the toolchain is built. The host machine , where the

PKG_CHECK_MODULES considered harmful?

泄露秘密 提交于 2019-11-26 09:46:17
问题 Various developers discourage the usage of the PKG_CHECK_MODULES (for example, in this answer) but there is no clear, comprehensive explanation of their reasons as far as I\'ve looked for. So, I ask: Why would PKG_CHECK_MODULES be harmful? What are the alternatives? I, for one, used it for the first time today. I found it invaluably useful, specially for dealing with pretty intricate library sets, such as GTK+, where I have all these dependencies: -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I

What's the difference of “./configure” option “--build”, “--host” and “--target”?

末鹿安然 提交于 2019-11-26 04:59:21
问题 The script ./configure accepts 3 options --build , --host and --target . I\'m confusing their roles. What\'s the difference and semantics of them? 回答1: As noted in this blog post and alluded to in the GCC Configure Terms, --target only applies when you are compiling toolchains. When you are doing normal cross-compilation of a library or binary you use --build=the architecture of the build machine --host=the architecture that you want the file to run on However, when you are building