autotools

AS_IF and AC_MSG_ERROR: error: possibly undefined macro

折月煮酒 提交于 2019-12-22 05:50:16
问题 I encounter such errors when trying to build libnice-0.1.10. For solution, I am following possibly undefined macro: AC_MSG_ERROR, but still not getting there. some program version uname: 3.5.0-23-generic m4: 1.4.16 automake: 1.14.1 autoconf: 2.69 libtoolize: 2.4.2 I also add ACLOCAL_FLAGS="-I /.../share/aclocal" in bashrc. Here is what is reported from autogen. $ ./autogen.sh configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd m4/gtk-doc.m4:7: GTK_DOC_CHECK is

autoconf-generated Makefile does not pass flags for library headers when using PKG_CHECK_MODULES

笑着哭i 提交于 2019-12-21 20:55:16
问题 My project depends upon a library (more precisely, GTK+) so I added the following configurations in my configure.ac : PKG_CHECK_MODULES([GTK], [gtk+-2.0]) AC_SUBST([GTK_CFLAGS]) AC_SUBST([GTK_LIBS]) My Makefile.am is: bin_PROGRAMS = secretary secretary_SOURCES = secretary.c For its turn, my secretary.c is as follows: #include <gtk/gtk.h> int main(int argc, char *argv[]) { gtk_init(&argc, &argv); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_show(window); gtk_main();

Force linking a static library into a shared one with Libtool

喜欢而已 提交于 2019-12-21 07:37:36
问题 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

Macro definitions for headers, where to put them?

不打扰是莪最后的温柔 提交于 2019-12-21 07:24:22
问题 When defining macros that headers rely on, such as _FILE_OFFSET_BITS , FUSE_USE_VERSION , _GNU_SOURCE among others, where is the best place to put them? Some possibilities I've considered include At the top of the any source files that rely on definitions exposed by headers included in that file Immediately before the include for the relevant header(s) Define at the CPPFLAGS level via the compiler? (such as -D_FILE_OFFSET_BITS=64 ) for the: Entire source repo The whole project Just the

Autoconf check for struct flock

我的未来我决定 提交于 2019-12-21 07:23:55
问题 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)? 回答1: You can use this autoconf macro to find if a certain member of struct flock exists: AC_CHECK_MEMBERS([struct flock.l_type],[],[],[[

Autotools: how to cleanup files created by “./configure” in lighttpd project?

风流意气都作罢 提交于 2019-12-21 06:48:54
问题 I'm trying out lighttpd for an embedded Linux project. I got the latest source package and started writing a master Makefile encapsulating all configure, compile, install (for testing) etc stuff. And vice-versa, I want to cleanup every step. After the cleanup there should be no generated files anymore. This is important for repetitive testing. I wonder if there is a way to do a complete cleanup of what ./configure generated? I'm not familiar with autotools in details. Any hints? 回答1: I

How do I get rid of LD_LIBRARY_PATH at run-time?

半世苍凉 提交于 2019-12-21 03:58:27
问题 I am building a C++ application that uses Intel's IPP library. This library is installed by default in /opt and requires you to set LD_LIBRARY_PATH both for compiling and for running your software (if you choose the shared library linking, which I did). I already modified my configure.ac / Makefile.am so that I do not need to set that variable when compiling, but I still can't find the shared library at run-time; how do I do that? I'm compiling with the -Wl, -R/path/to/libdir flag using g++

Why has nobody created an open source build system for the brain dead? [closed]

坚强是说给别人听的谎言 提交于 2019-12-21 03:46:28
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I want to build a shared library. GNU/Linux is the development and target platform. C is the implementation language. I can't decide how I want to setup the build system and keep flitting around three options

Autotools - tar This does not look like a tar archive

守給你的承諾、 提交于 2019-12-21 03:27:25
问题 After running make distcheck I get the message that I have successfully built the package and is ready for distribution. If I untar the tar.gz with tar -zxvf hello-0.2.tar.gz it successfully extracts all of its contents. However, when I try to extract them in different machines I get: tar: This does not look like a tar archive tar: Skipping to next header tar: Exiting with failure status due to previous errors The weird thing is that it was working before. On the machine I'm trying to build

Cross-compile Apache Portable Runtime to the iPhone

﹥>﹥吖頭↗ 提交于 2019-12-20 21:06:50
问题 This is a followup to a previous question on cross-compiling for the iPhone: Cross-compile Autotools-based Libraries for Official iPhone SDK Basically, I am trying to compile the Apache Portable Runtime (APR) version 1.3.8 (latest) for the iPhone. I am currently running into the following error during the configuration step: checking for working PROCESS_SHARED locks... configure: error: in `/Users/michaelsafyan/Downloads/apr-1.3.8': configure: error: cannot run test program while cross