autoconf

How to generate a source file when building using autotools

☆樱花仙子☆ 提交于 2019-11-27 23:55:32
问题 With Make, I do something like generated.c: input.txt generator ./generator input.txt > generated.c How would I get equivalent functionality out of autotools? (removing generated.c on cleaning would also be a bonus). 回答1: I'm assuming that input.txt is a source file that is distributed, that you do not want to distribute generated.c (i.e., it must be built by each user), and that generator is a program built by your package too. EXTRA_DIST = input.txt bin_PROGRAMS = prog noinst_PROGRAMS =

Cross-compiling for ARM with Autoconf

跟風遠走 提交于 2019-11-27 21:33:10
I am having trouble cross-compiling a library for my arm board using autconf. I am using this line: ./configure --target=arm-linux --host=arm-linux --prefix=/bla/bla/bla/linux_arm_tool CFLAGS='-m32' make make install When I do file to check it I get: libjpeg.so.8.4.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped That doesn't seem right at all, but I tried using it anyway... and I get: /usr/lib/gcc/arm-linux-gnueabi/4.5.3/../../../../arm-linux-gnueabi/bin/ld: skipping incompatible /bla/bla/bla/bla/../linux_arm_tool/lib/libjpeg.so when searching

Cross-compile to static lib (libgcrypt) for use on iOS

大兔子大兔子 提交于 2019-11-27 18:20:16
问题 I have downloaded latest libgcrypt & libgpg-error libraries from https://www.gnupg.org/download/index.html. I have successfully built (command line) both libraries using ./configure --enable-static --disable-shared; make ; make install on my Mac (Mavericks w/OSX 10.10 & latest Xcode 6.1). I can link just fine to these new libs from an OS X client app I am building. So far, so good. Just perfect. BUT, I also need to build an iOS client using same exact source code. Questions: 1) What are the

How to determine host value for configure when using cross compiler

核能气质少年 提交于 2019-11-27 14:07:18
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? vinay hunachyal 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 toolchain will be executed. The target machine , where the binaries created by the toolchain are

Append compile flags to CFLAGS and CXXFLAGS while configuration/make

谁说胖子不能爱 提交于 2019-11-27 12:38:49
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 project conveniently uses a macro to achieve this. You almost have it right; why did you add the semicolon?

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

一笑奈何 提交于 2019-11-27 10:14:13
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) .....................................done: 174,098 bytes 71 source files, building running: phpize

Confused about configure script and Makefile.in

我们两清 提交于 2019-11-27 10:08:22
问题 I'm currently learning how to use the autoconf / automake toolchain. I seem to have a general understanding of the workflow here - basically you have a configure.ac script which generates an executable configure file. The generated configure script is then executed by the end user to generate Makefile s, so the program can be built/installed. So the installation for a typical end-user is basically: ./configure make make install make clean Okay, now here's where I'm confused: As a developer, I

CFLAGS vs CPPFLAGS

杀马特。学长 韩版系。学妹 提交于 2019-11-27 10:05:54
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 files, why does it ever need to be told about extra include directories? What use is CFLAGS at all? (In

config.site for vendor libs on Fedora x86_64

淺唱寂寞╮ 提交于 2019-11-27 08:26:52
问题 I'm having trouble building a few Autotool-based libraries on Fedora 26, x86_64. The 64-bit Fedora puts third party and vendor libraries in /usr/local/lib64 . Ubuntu 17 uses /usr/local/lib so the same projects build OK. I've been using --libdir=/usr/local/lib64 but three libraries resist it. I lack a config.site for /usr/local so I am trying to add one. The Autoconf manual on Site Defaults is a tad bit confusing to me when it discusses usr/local 's config.site . It says: [discussion of /usr

Autotools check for C++11

*爱你&永不变心* 提交于 2019-11-27 02:06:51
问题 I use AX_CXX_COMPILE_STDCXX_0X (can look on autoconf-archive) to check for c++11 capabilities of the compiler. It correctly determines that -std=c++0x required, but does not add it to CXXFLAGS . I took a look at the macro source and it actually checks but then restores previous flags. What should I do to get CXXFLAGS set to be able to compile c++11 source? Just adding -std=c++0x to AM_CXXFLAGS is not nice solution, because I'd like to put the burden of making the compiler compile in C++11