autotools

autotools: force make not to rebuild configure/Makefile

雨燕双飞 提交于 2019-11-30 15:34:28
问题 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

GNU Autotools: rebuild without version info

爷,独闯天下 提交于 2019-11-30 13:13:51
I need to build a lib that is configured with autotools. The usual configure && make && make install steps produce versioned shared lib, something like libfoo.so.x.x Is it possible to modify configure.ac or Makefile.am (and of course follow up with autoreconf ) so that un-versioned lib is build. Thank you! Yes, assuming that the library is built with libtool , you can remove the version information by adding the -avoid-version flag to the library's LDFLAGS. For example, if before there was libfoo_la_LDFLAGS = -version-info 1:0 you would change it to libfoo_la_LDFLAGS = -avoid-version . After

Where to add a CFLAG, such as -std=gnu99, into an autotools project

回眸只為那壹抹淺笑 提交于 2019-11-30 11:53:02
问题 I have a simple Autotools C project (not C++). CFLAGs (by inspection) seem to be -g -O2 . I want all of the generated make files to also have -std=gnu99 appended to the CFLAGs, because I use for (int i = 0; i < MAX; i++) and similar. I can obviously hack the Makefile, but this gets overwritten on ./configure . Where is the correct place to add (or change) CFLAGs which are required by the code (as opposed to those CFLAGs which the user might want to change)? (Note this is partial duplicate of

How can an autotools user specify a combination of static & dynamic linking?

牧云@^-^@ 提交于 2019-11-30 09:04:27
I'm building a program with autoconf, automake, and libtool. My work requires that I statically link (most) libraries. This hasn't been a problem in the past because I could statically link everything with -all-static . Now it's a problem because I have to use a library which is only dynamic; it was given to us by a thirdparty, and we don't have the source. Of course, -all-static now causes the build to fail. Is it possible to tell libtool to statically link everything, except for this one library? Is it possible to have libtool do any combination of static and dynamic linking, or is it all or

Automake generating binaries to bin/ instead of in src/

旧时模样 提交于 2019-11-30 06:27:26
I searched for the answer to this question but couldn't find any good. Maybe they're old and something has changed, so I ask again. I have a directory structure as: my_project src bin I want that, when I do make in the root dir, the binaries are put in ./bin, instead of cluttering ./src. But how? EDIT: I am using C++. My Makefile.am has nothing special. Just the bin_PROGRAM and _SOURCES variables. When I run make, the binaries generated are put into ./src. I simply want them in ./bin. You've got the wrong idea here. Your build tree is wherever you run configure . That's how autoconf is

Autotools : how to set global compilation flag

ε祈祈猫儿з 提交于 2019-11-30 06:25:35
I have a project with several sources directories : src/A /B /C In each, the Makefile.am contains AM_CXXFLAGS = -fPIC -Wall -Wextra How can avoid repeating this in each source folder ? I tried to modifiy src/Makefile.am and the configure.in, but without success. I thought I could use AC_PROG_CXX to set the compilation flags globally but can't find much documentation on how to use those macro (do you have any pointer to such a documentation ?). Thanks in advance adl You can do several things: (1) One solution is to include a common makefile fragment on all your Makefile.am s: include $(top

Placing header files in a subdirectory of /usr/include with automake?

本小妞迷上赌 提交于 2019-11-30 04:57:47
If I write a library, and have header files for development included, and have a src/Makefile.am like this: AM_CFLAGS = -std=c99 -Wall -Werror -Os lib_LTLIBRARIES = libmylibrary.la libmylibrary_la_SOURCES = a.c b.c include_HEADERS = a.h b.h Everything works nicely. However, a.h and b.h are installed directly under /usr/include (or /usr/local/include ). What should I do to get them installed, in a subdirectory specific to my library, e.g. /usr/include/mylibrary ? ptomato As well as pkginclude_HEADERS , which you mention, you can also install header files into an arbitrary subdirectory of /usr

Where to add a CFLAG, such as -std=gnu99, into an autotools project

浪尽此生 提交于 2019-11-30 01:38:15
I have a simple Autotools C project (not C++). CFLAGs (by inspection) seem to be -g -O2 . I want all of the generated make files to also have -std=gnu99 appended to the CFLAGs, because I use for (int i = 0; i < MAX; i++) and similar. I can obviously hack the Makefile, but this gets overwritten on ./configure . Where is the correct place to add (or change) CFLAGs which are required by the code (as opposed to those CFLAGs which the user might want to change)? (Note this is partial duplicate of Where to add a CFLAG, such as -std=gnu99, into an (Eclipse CDT) autotools project as I was getting

installed libtool but libtoolize not found

做~自己de王妃 提交于 2019-11-29 20:26:15
im trying to build libxml2 from source on my mac. so i have autoconf libtool and automake installed using mac ports autoconf and automake seem to be working fine as expected. i try running autogen.sh first. libtoolize --version unfortunately gives -bash: libtoolize: command not found i try running (again) sudo port install libtool ---> Cleaning libtool ---> Scanning binaries for linking errors: 100.0% ---> No broken files found. i try locate libtool and it seems to be installed fine /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool /Applications

GNU Autotools: rebuild without version info

对着背影说爱祢 提交于 2019-11-29 18:52:55
问题 I need to build a lib that is configured with autotools. The usual configure && make && make install steps produce versioned shared lib, something like libfoo.so.x.x Is it possible to modify configure.ac or Makefile.am (and of course follow up with autoreconf ) so that un-versioned lib is build. Thank you! 回答1: Yes, assuming that the library is built with libtool , you can remove the version information by adding the -avoid-version flag to the library's LDFLAGS. For example, if before there