autoconf

More robust AC_COMPILE_IFELSE feature testing?

我的梦境 提交于 2019-12-08 18:03:41
问题 Autoconf's AC_COMPILE_IFELSE is misdetecting features for us under different compilers, like Sun's C++ compiler and IBM's xlC compiler. AC_COMPILE_IFELSE appears to check return values, but some compilers don't bother to set it or set it to unexpected values. Later, we use options that are not available. In my non-Autoconf build scripts I use "fatal|error|illegal|unrecognized|not found|not exist" to detect a compiler or linker complaint. It is more robust than just checking $? . The test

best practice for building with/out included libraries

孤街醉人 提交于 2019-12-08 09:27:13
问题 a project ships with a copy of library foo , in a filesystem layout like: myproject/ myproject/src/ # sources of my project myproject/libfoo/ # import of "foo" library the standard (autotools-based) build-system builds libfoo, then builds myproject which dynamically links against libfoo . libfoo is basically unmodified (with some minor amendments to properly fit into the build-system). libfoo uses autotools itself, so i'm usually calling configure recursively using AC_CONFIG_SUBDIRS . however

Which processes in the autoconf and automake flowchart are performed by who and when?

一笑奈何 提交于 2019-12-08 06:41:06
问题 In the flowchart of autoconf and automake from https://en.wikipedia.org/wiki/Automake , there are several processes autoscan alocal autoheader autoconf automake configure make Which processes are performed by a user of a software program after he downloaded the distribution of the software program by the party who creates the distribution of the software program from its source code (and who is likely the author of the software program)? I ask this question, because I remember that after I,

Which processes in the autoconf and automake flowchart are performed by who and when?

穿精又带淫゛_ 提交于 2019-12-08 05:18:28
In the flowchart of autoconf and automake from https://en.wikipedia.org/wiki/Automake , there are several processes autoscan alocal autoheader autoconf automake configure make Which processes are performed by a user of a software program after he downloaded the distribution of the software program by the party who creates the distribution of the software program from its source code (and who is likely the author of the software program)? I ask this question, because I remember that after I, as a user of some software program, downloaded its source distribution, the commands I ran to build an

Errors while trying to build GDB for ARM

流过昼夜 提交于 2019-12-08 04:11:43
问题 I'm trying to build GDB (version 8.0) for an arm on my Ubuntu 16.04 machine. I'm planning to debug it directly on the arm machine (currently without a server). I have executed these instructions (as it was explained here) ./configure --target=arm-linux-gnueabi --host=arm-linux-gnueabi --build=x86_64_unknown-linux-gnu make During the linkage the system threw me this error: g++ -std=gnu++11 -g -O2 -static-libstdc++ -static-libgcc \ -o gdb gdb.o arm.o arm-linux.o arm-get-next-pcs.o arm-tdep.o

PKG_CHECK_MODULES breaking in solaris

橙三吉。 提交于 2019-12-08 04:09:00
问题 My project requires dependency of libxml2 am using autotools to check the dependencies & install the same. I declare the dependency of using the following macro in configure.ac echo -n "checking if libxml2 is present... " PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.6.19], [echo "yes (features requiring libxml2 enabled)" AC_DEFINE(HAVE_LIB_XML, 1, [define if libxml2 is present])], [echo "no"] ) The macro works as desired in GNU/Linux . But somehow it fails in Solaris with the following error

How to make configure script check the dependencies

守給你的承諾、 提交于 2019-12-07 12:47:56
问题 I generated a configure script with autoconf to build my project. It works fine unless I don't have some needed library installed. Make returns error when lacking some files, but it should be actually checked by the configure script i think? So my question is: How to modify an autoconf generated script to seek for dependencies and tell the user which libraries it lacks? 回答1: Depends on the dependency, there is no generic solution. There are AC_CHECK_LIB and AC_SEARCH_LIBS macros that may work

“Help” string variable substitution for “configure --help”

点点圈 提交于 2019-12-07 11:36:25
问题 I have a string that I want to use multiple times for the output of configure --help . So I try doing something like this in configure.ac : AC_ARG_ENABLE([foobar], AS_HELP_STRING([--enable-foobar], [$foobar_help_str])) But no expansion or substitution is done, so the output is just $foobar_help_str . 回答1: Define the string as an M4 macro: m4_define([FOOBAR_HELP_STR], [Turn on the foobar features]) AC_ARG_ENABLE([foobar], [AS_HELP_STRING([--enable-foobar], FOOBAR_HELP_STR)]) 回答2: FYI, if you

Autoconf uses wrong AR on OS X

╄→гoц情女王★ 提交于 2019-12-07 11:19:48
问题 I'm testing on OS X. We have a configure.ac and Makefile.am . Autotools is selecting the wrong AR and ARFLAGS for the platform. It happens with (and without) AM_PROG_AR in Makefile.am : $ egrep 'AR =|ARFLAGS =' Makefile AMTAR = $${TAR-tar} AR = ar ac_ct_AR = ar Autoconf should be using Apple's libtool (not to be confused Autotools' libtool ) and libtool 's flags. Apple's libtool properly handles fat libraries and cross-compiles. It should be something like: AR = /usr/bin/libtool ARFLAGS =

update autoconf to at least 2.6

我怕爱的太早我们不能终老 提交于 2019-12-07 08:26:51
问题 I have autoconf 2.59 on CentOS 5.5 and need to upgrade to autoconf 2.6. What is the best approach for this? I tried yum update autoconf but theres no luck 回答1: I'd get it from RPMForge or ATrpms, but I don't see that they have it either. Some other CentOS 3rd party repository might. Download GNU Autoconf and build it. 回答2: You can get the RPM here: http://rpm.pbone.net/index.php3/stat/4/idpl/15945938/dir/redhat_el_5/com/autoconf26x-2.63-4.ius.el5.noarch.rpm.html And install it with YUM: yum