autoconf

how to set include paths with autotools

徘徊边缘 提交于 2019-12-02 19:20:34
I'm working on a C++ project that uses autoconf & automake , and I'm struggling to correctly set up the include paths in *CPPFLAGS . I've read about 3 hours worth of documents, and I can't figure it out yet. I'm not looking for a hack, but for the correct way to do this. Here is my conundrum. As I see it, there are 3 completely different sources for include paths: External libraries that must be installed along with my package, which are configured by configure --with-XXX=<PATH> . Within my package, some source files use #include <file.h> even when file.h is part of the package, so to compile

Any difference between configure.ac and configure.in, and Makefile.am and Makefile.in?

半腔热情 提交于 2019-12-02 17:32:00
I have seen both in different things I have configured. What I the difference? Is it notable to use only one? Or does it not matter which one to use? configure.ac and configure.in are two possible names for the master Autoconf source file, which is processed by autoconf to generate the configure shell script. configure.ac is preferred for new packages, configure.in is an older name which still works. (The .in suffix is now recommended to be used only for files which will be processed by config.status , which is the result of running configure .) Makefile.am is an Automake source file. Automake

How to tell Autoconf “require symbol A or B” from LIB?

≡放荡痞女 提交于 2019-12-02 14:46:11
问题 I'm trying to configure Postgres 9.5.4 for OpenSSL 1.1.0. Configure is dying because it can't find SSL_library_init in OpenSSL 1.1.0. OpenSSL 1.1.0 provides OPENSSL_init_ssl instead of SSL_library_init . So Autoconf needs to check for either SSL_library_init or OPENSSL_init_ssl . Postgres uses the following test: AC_CHECK_LIB(ssl, SSL_library_init, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])]) How do I modify that [rule?] to look for either SSL_library_init or OPENSSL_init_ssl

Alternatives to Autoconf and Autotools? [closed]

雨燕双飞 提交于 2019-12-02 14:06:26
I'm a very frequent user of the GNU Autotools (mostly Autoconf , occasionally Libtool ). I'm working on a project where portability is going to be a sticking point.. Yet, the rest of the team is just not comfortable working with m4 . I got this in my inbox from not one, but four people: Anyway, perhaps someone could recommend something Python or PHP based? I'm working on the C end of a much larger tree; I can be sure either Python or PHP 5 will be present, as they are prerequisites. I have heard good things about CMake which tries to solve the same problems. Here is the wikipedia article

How to tell Autoconf “require symbol A or B” from LIB?

守給你的承諾、 提交于 2019-12-02 12:09:40
I'm trying to configure Postgres 9.5.4 for OpenSSL 1.1.0 . Configure is dying because it can't find SSL_library_init in OpenSSL 1.1.0. OpenSSL 1.1.0 provides OPENSSL_init_ssl instead of SSL_library_init . So Autoconf needs to check for either SSL_library_init or OPENSSL_init_ssl . Postgres uses the following test: AC_CHECK_LIB(ssl, SSL_library_init, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])]) How do I modify that [rule?] to look for either SSL_library_init or OPENSSL_init_ssl ? Naively, I changed configure.in to the following, which did not work. The best I can tell, my

Why does autoconf erroneously find a function which isn't available later?

删除回忆录丶 提交于 2019-12-02 10:45:04
On a Linux system I configured a software package (llvm) and autoconf finds the arc4random function. Here an extraction of the output during configuration: checking for strerror... yes checking for strerror_r... yes checking for setenv... yes checking for arc4random... yes checking for strtoll... yes checking for strtoq... yes checking for sysconf... yes Configuring goes fine. Later, when building the package I get an error about an undeclared specifier arc4random : [removed]/lib/Support/Unix/Process.inc:368:10: error: use of undeclared identifier 'arc4random' return arc4random(); ^ Here the

Autotools cross compilation and generated sources

孤街浪徒 提交于 2019-12-02 01:40:39
I'm trying to create a library using autotools (autoconf, automake, libtool) as a build system. The library has to be cross-compileable, but one of the steps of building it is to generate sources by executable built from sources during the whole process. The problem is I cannot use automake's system to build the intermediate binary because when it's cross compile it wouldn't run on '--build' to generate sources. One way to work this around it to create separate autools project to build intermediate binaries but I want to avoid it because there are many headers and other "data" files common for

How do I combine AC_SUBST and AC_DEFINE?

放肆的年华 提交于 2019-12-01 18:21:43
问题 I've a configure.ac file containing lines like: AC_DEFINE(CONF_XDISP, ":8", "X screen number") These constants are used in the C source for setting compile defaults. I also have a configuration file conf/bumblebee.conf in which these defaults need to be set. I'm told that AC_SUBST can be used to get @CONF_XDISP@ substituted for ":8" such that the below line: VGL_DISPLAY=@CONF_XDISP@ becomes: VGL_DISPLAY=":8" Making an AC_SUBST line for each AC_DEFINE does not look the best way to me as it

Should a “configure” script be distributed if configure.ac is available?

流过昼夜 提交于 2019-12-01 17:13:51
Currently, our installation instructions are: autoreconf -fi ./configure ... The autoreconf step generates the configure file from configure.ac and Makefile.in from Makefile.in . If one of the dependencies (say pkg-config ) is not installed, both configure and autoreconf fail although the latter prints a cryptic error message. When releasing source tarballs, should the configure script be supplied in the package or not? What other files need to be included if it has to be distributed? The directories build-aux and autom4te.cache and files aclocal.m4 were also created. In an SCM repository,

How do I get autotools to compile with the Intel compiler?

女生的网名这么多〃 提交于 2019-12-01 15:56:13
I want my code to compile with the Intel compiler(s) or with gcc/g++ depending on a configure argument. Is this possible? What do I need to put in my configure.ac and Makefile.am files to make this happen? If you want to use a compiler other than gcc when you compile, pass 'CC=/path/to/compiler' as an argument to configure. (That is, run ./configure CC=/path. Do not use the form CC=/path ./configure.) If you want the default compiler to be something other than gcc, you can put CC=${CC-/path/to/default/compiler} in configure.ac before the invocation of AC_PROG_CC. I would do this: AC_PROG_CC(