autoconf

Library resolution with autoconf?

♀尐吖头ヾ 提交于 2019-12-17 22:23:12
问题 I'm building my first autoconf managed package. However I can't find any simple examples anywhere of how to specify a required library, and find that library where it might be in various different places. I've currently got: AC_CHECK_LIB(['event'], ['event_init']) but: It doesn't find the version installed in /opt/local/lib It doesn't complain if the library isn't actually found I need to set the include path to /opt/local/include too any help, or links to decent tutorials much appreciated...

How to add include and lib paths to configure/make cycle?

我的未来我决定 提交于 2019-12-17 21:28:01
问题 I need a place to install libraries in a linux box I have no su access to. I'm using ~/local[/bin,/lib,/include], but I don't know how can I tell ./configure to look for libraries there (particularly, I'm trying to compile emacs, which needs libgif, which doesn't come in my distro). I tried adding export PATH=$PATH:~/local/bin export LD_LIBRARY_PATH=~/local/lib export C_INCLUDE_PATH=~/local/include export CPLUS_INCLUDE_PATH=~/local/include to .bashrc but it doesn't seem to work. 回答1: You want

CFLAGS vs CPPFLAGS

删除回忆录丶 提交于 2019-12-17 08:03:39
问题 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

CFLAGS vs CPPFLAGS

随声附和 提交于 2019-12-17 08:03:15
问题 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

Autoconf problem: “error: C compiler cannot create executables”

人走茶凉 提交于 2019-12-13 16:08:12
问题 I'm trying to build a program I've written in C using GNU autotools, but I evidently have it set up wrong because when configure runs, it spits out: configure: error: C compiler cannot create executables If I look in config.log , I see: configure:2846: checking for C compiler default output file name configure:2868: gcc conftest.c >&5 conftest.c:3:25: warning: missing terminating " character conftest.c:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token configure:

Making os independent configure file which checks for curl dependency

允我心安 提交于 2019-12-13 08:41:18
问题 I am making a configure.ac file which checks for library dependency. The complete code is, AC_CONFIG_AUX_DIR([build-aux]) AC_INIT([myprogram], [0.1], []) AM_INIT_AUTOMAKE AC_PROG_CC AC_CHECK_LIB([curl], [curl_easy_setopt], [echo "libcurl library is present" > /dev/tty], [echo "libcurl library is not present" > /dev/tty] ) AC_CHECK_LIB([sqlite3], [sqlite3_open], [echo "sqlite3 library is present" > /dev/tty], [echo "sqlite library is not present" > /dev/tty] ) AC_CHECK_LIB([pthread], [pthread

VPATH out-of-source build

北慕城南 提交于 2019-12-13 03:39:00
问题 Background We build .mex files for both Matlab and Octave. The source code is common to both Matlab and Octave but with slight modifications here and there (taken care of via macro conditionals in the code). For reference, the source structure is: root_dir/ | --------------------------------------------------- | | | | configure.ac mex/ Makefile.am non-mex-source/ | ------------------------------ | | sources/ build/ | | ----------- ------------------------------- | | | | | | mex1/ ... mexN/

What directory should I use for “error: 'extra_PROGRAMS' is used but 'extradir' is undefined”?

南楼画角 提交于 2019-12-13 03:21:24
问题 I have a autoconf/automake system that has a stand-alone target called stand . I don't want stand to be normally built, so I have this in my Makefile.am: bin_PROGRAMS = grace extra_PROGRAMS = stand ... stand_SOURCES = stand.cpp barry.cpp ... This has worked for a while, but automake just got updated on my system and I'm now getting this error: src/Makefile.am:4: error: 'extra_PROGRAMS' is used but 'extradir' is undefined src/Makefile.am:66: warning: variable 'stand_SOURCES' is defined but no

How, when, where to set script variables of libtool? (e.g. hardcode_minus_L)

非 Y 不嫁゛ 提交于 2019-12-13 03:12:48
问题 Long story short: I worked on relative rpath linking with this script (that uses automake, autoconf, libtool). The problem is that the final rpath / runpath entry in the binary executable or so file still has the absolute path: it turned out libtool is configured by default like this with hardcode_libdir_flag_spec to include any -L value if it's set in LDFLAGS The only question remains: how and at which point (what's the proper way) can I set other libtool variables, like hardcode_minus_L .

Autoconf spaces in path

╄→гoц情女王★ 提交于 2019-12-12 22:22:49
问题 I just converted a c++ project to a autotools project and written a few lines in configure.ac from here. Build fails saying "sh: /home/me/bla: No such file or directory" when my path should be "bla bla". The problem is I didn't write any path anywhere. What shoul I do? Except for renaming the path... Doh! 回答1: Sorry, there are just a few things that you can't do with autoconf and have a path with spaces in the name is one of them. 来源: https://stackoverflow.com/questions/16194124/autoconf