autotools

Autoconf subdirectories with subpackages depending on each other?

主宰稳场 提交于 2019-12-04 04:38:05
I've got a large project on my hand (master) that is split into several components (liba, b, c, d) to ease building and maintenance. When building the whole package, all of the subcomponents must be built in sequence, and some of these packages depend upon each other. In more explicit terms, liba is a prerequisite for b, c and d, and the presence of liba is checked by the configure script. This check is definitely necessary to give user-friendly error messages when building the b distribution on its own. However, when building the master package and all its subpackages, liba is built as a

mingw32-make tries to create subfolder .lib an illegal name

这一生的挚爱 提交于 2019-12-04 02:22:05
问题 I am trying to compile a project that required freetype library so I was figuring out how to install freetype to mingw32 and the more safer way is to compile it. Anyway the problem was compiling freetype-2.4.11 I went into bash provided in msys I did ./configure within freetype's main dir and everything looks fine next I did mingw32-make which created the problem libtool: compile: gcc -pedantic -ansi -Ig:/Downloads/freetype-2.4.11/objs -I./b uilds/unix -Ig:/Downloads/freetype-2.4.11/include

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

Force linking a static library into a shared one with Libtool

99封情书 提交于 2019-12-04 01:26:30
I have a library ( libfoo ) that is compiled using libtool into two objects: libfoo.a and libfoo.so. I have to create, using libtool also, another library ( libbar ) that will be a single shared library (libbar.so) containing all libfoo's code. In order to do this, I have to force libbar to link against libfoo.a , and not libfoo.so. I am in an autotools environment, so I have to solve this using standard configure.in or Makefile.am rules. I tried several things, like in configure.in : LDFLAGS="$LDFLAGS "-Wl,-Bstatic -lfoo -Wl,-Bdynamic" That always results in the -Wl flags on the linking line;

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

autotools syntax error with ax_check_compile_flag

梦想的初衷 提交于 2019-12-03 20:48:17
问题 I am using autotools for building my C++ application. In my configure.ac I have the following line: AX_CHECK_COMPILE_FLAG([-Wall], [CPPFLAGS="$CPPFLAGS -Wall"]) which causes the following error when executing ./configure (after running autoreconf -i ): ./configure: line 3825: syntax error near unexpected token `-Wall,' ./configure: line 3825: `AX_CHECK_COMPILE_FLAG(-Wall, CPPFLAGS="$CPPFLAGS -Wall")' My system: Linux web 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux On my

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:

Adding a path to AC_CHECK_LIB

六月ゝ 毕业季﹏ 提交于 2019-12-03 14:06:36
I have the following problem with configure.ac: I would like to add a library search path because the libraries I have to use are in some crazy folders. My idea is to do this with an option: AC_ARG_WITH([cplex-lib-path], [AS_HELP_STRING([--with-cplex-libs], [location of the CPLEX library])], [CPLEX_LIBS="-L$withval --lcplex"], []) If someone specifies the library path I would of course like to see if the library can be found: AC_CHECK_LIB([cplex], [CPXcreateprob], [], [ AC_MSG_ERROR([Could not find CPLEX library]) ]) However, I would like to add the CPLEX_LIBS to the library search path of AC

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