autoconf

Why doesn't autoconf pass the AC_CHECK_HEADER test when the .h is file clearly available?

别来无恙 提交于 2019-12-04 02:43:20
I am having a bear of a time getting autoconf to check for the presence of a particular header file. Let's call the header dependency "inky.h", and let's say that inky is a library that was installed (seperately) with the prefix set to "/usr/local". This put "inky.h" in /usr/local/inky/inky.h and libinky.so in /usr/local/lib. Now, I'm trying to verify the presence of inky.h in my applications configure.ac as follows: dnl # Setup temp LDFLAGS and look for inky library/header LDFLAGS_SAVE=${LDFLAGS}; CPPFLAGS_SAVE=${CPPFLAGS}; dnl # Look for inky on the user specified inky install path LDFLAGS =

Autoconf check for struct flock

ぃ、小莉子 提交于 2019-12-04 01:45:37
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)? You can use this autoconf macro to find if a certain member of struct flock exists: AC_CHECK_MEMBERS([struct flock.l_type],[],[],[[#include <fcntl.h>]]) Github has a variety of autoconf files you can look at for additional ideas by searching

Autoconf check for program and fail if not found

北城余情 提交于 2019-12-04 01:11:45
I'm creating a project and using GNU Autoconf tools to do the configuring and making. I've set up all my library checking and header file checking but can't seem to figure out how to check if an executable exists on the system and fail if it doesn't exist. I've tried: AC_CHECK_PROG(TEST,testprogram,testprogram,AC_MSG_ERROR(Cannot find testprogram.)) When I configure it runs and outputs: Checking for testprogram... find: `testprogram. 15426 5 ': No such file or directory but does not fail. Try this which is what I just lifted from a project of mine, it looks for something called quantlib-config

How to install and use libtool shared library (.lo files)?

房东的猫 提交于 2019-12-03 21:34:39
So after I ran libtool and got out a libfoo.lo and foo.o file from my library source, how do I convert the libfoo.lo file into a normal Linux shared library, like libfoo.so.1.0.0 so I can install and link to it on my target system? From the outputs mentioned in the question, it looks like you ran libtool with --mode=compile mode. You will need to run libtool again with --mode=link to produce .a and .so libraries. libtool is just a simple wrapper for gcc, ln ar and ranlib which is needed to produce libraries. All it does is run gcc adding the necessary options to ensure that your static and

configure does not recognize androideabi

我的未来我决定 提交于 2019-12-03 18:28:41
问题 I am trying to compile a library using android-ndk-r5 standalone toolchain and autotools. When doing a ./configure, it fails with: $ ./configure --host=arm-linux-androideabi ...snip... checking host system type... Invalid configuration `arm-linux-androideabi': system `androideabi' not recognized configure: error: /bin/sh ./config.sub arm-linux-androideabi failed Explicitly setting CC and CXX does not work either (configure says to use --host). The NDK docs and various materials online seems

Howto add a link to a library in autoconf configure script / makefile

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 17:06:53
问题 I am an autotools newb and I have difficulties figuring out howto easily link a specific library into one of the configured targets. I have a source package that I want to build the usual way: ./configure && make && make install Unfortunately one of the cpps has a missing reference to another library. Compiling it by hand (adjusting the commandline) works. But I would rather "patch" the compile script. Where is the standard place to edit linking references? undefined reference to `boost:

autotools: force make not to rebuild configure/Makefile

北城余情 提交于 2019-12-03 13:53:55
I have a project with autotools: automake, autoconf. I want to prohibit make from remaking files configure , Makefile.in , etc; just to do compile job. Some of files are edited by hand, and I know that I should not to do this. (Or the project was updated from CVS with all generated files stored in CVS). But at the moment I have no correct version autotools installed. What must be modification times of this files (which must be newer/older): aclocal.m4 configure.in confdb/ax_prefix_config_h.m4 Makefile.am Makefile.in Makefile configure config.status Or: what sequence of touch commands must I do

How to point autoconf/automake to non-standard packages

匆匆过客 提交于 2019-12-03 13:13:18
问题 I'm trying to build ZooKeeper on a RedHat Linux box. (Exactly what ZooKeeper is is probably not important :-) When I follow the package instructions, I get: $ autoreconf -if aclocal:configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in library aclocal:configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in library configure.ac:33: error: possibly undefined macro: AM_PATH_CPPUNIT If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf

./configure with a specified version of g++

核能气质少年 提交于 2019-12-03 11:07:00
问题 How to tell to a 'configure' file to compile with a specified version of g++ ? Thanks. 回答1: In a bash shell you can do something like this: ./configure CC=gcc-2.95 There will be similar techniques for other shells but I couldn't help you with the specifics. If your project is C++ the variable you need to define is CXX . 来源: https://stackoverflow.com/questions/2621019/configure-with-a-specified-version-of-g

How to include .m4 files in Autoconf?

和自甴很熟 提交于 2019-12-03 10:50:22
问题 I have downloaded a macro from Autoconf Archive, and I want to use it. What do I have to put in my configure.ac file to make use this macro? 回答1: You may want to add AC_CONFIG_MACRO_DIR to configure.ac to the directory where the macro is: AC_CONFIG_MACRO_DIR([path/to/macros]) You'll need to invoke the macro somewhere in this file also. and in Makefile.am you'll probably need to set up ACLOCAL_AMFLAGS (if you are using automake): ACLOCAL_AMFLAGS = -I path/to/macros Then invoke autoreconf -fvi