autotools

GNU Autotools: install binaries into /bin, /sbin, /usr/bin and /usr/sbin, interactions with --prefix and DESTDIR

♀尐吖头ヾ 提交于 2019-12-23 09:35:05
问题 Most packages using autotools are user-level utilities or at least high-enough level to be completely under /usr, or low enough to be entirely below /usr. I'm writing a package that would need to install some files into /bin, some into /sbin, /usr/bin and /usr/sbin. It's replacing several existing binaries that are traditionally placed under those locations. It also needs to install a PAM module in /lib/security (and obviously /usr/lib/security wouldn't work). Now the problem is: default

Building a multi module C project (i.e. solution) with Eclipse CDT

放肆的年华 提交于 2019-12-23 09:03:38
问题 I am moving from Netbeans to Eclipse (on Ubuntu 12.0.4). I have a C application that consists of several sub projects which are libraries (shared and static), as well as stand alone executables. I can't figure out how to create a 'parent' project foo , which contains component projects foobar foofoo barfoo barbar Ideally, I want all the 'component projects' to be created under the folder foo , so that I have a directory structure like this: /path/to/foo/foobar/ (contains foobar project files)

How to get absolute path to top build directory in autoconf configure.ac?

爱⌒轻易说出口 提交于 2019-12-23 07:49:41
问题 I am working on a project which requires a subproject which has its own makefile and configure.ac. The subproject is a program which is used to generate source files for the main project. There is an option to disable the building of this project and attempt to use an installed version instead. In either case I create a variable which is used in my Makefile.am containing the path to the program. My question is, When using the local version of the project, how can I get its location for use in

How do you define the options you see in ./configure --help?

扶醉桌前 提交于 2019-12-23 02:48:18
问题 I'm currently trying to set up a package to be installed with autotools. In most, if not all, major software packages, configure --help lists a large number of options like ./configure --ENABLE-FLOAT, etc. I was wondering where I can define these options. Thanks, Sam 回答1: Use AC_ARG_ENABLE and AC_ARG_WITH in your configure.ac file. 来源: https://stackoverflow.com/questions/2655177/how-do-you-define-the-options-you-see-in-configure-help

How to cross-compile a autotools project for ARM?

喜夏-厌秋 提交于 2019-12-22 13:53:54
问题 I am looking to cross-compile an existing library which uses GNU autotools build system. I have a Linaro arm-gcc toolchain installed in my host machine and I am able to compile small programs directly using arm-gcc. Host machine: Ubuntu 12.04 Intel x64 Target machine: Ubuntu 14.04 ARM 32-bit (a board similar to Raspberry-Pi) I have a library source code which has configure.ac and Makefile.am files for it. I want to compile this code on host machine and generate ARM binaries which can be

automake and custom rpath

非 Y 不嫁゛ 提交于 2019-12-22 12:17:36
问题 I have to ship a third-party library with an application. Because I don't want to set LD_LIBRARY_PATH by hand or require any wrapper script I want automake to set a custom rpath . Unfortunately libtool has its own -rpath option and adding -Wl,-rpath,/foo/bar to LDFLAGS only results in g++: unrecognized option '-rpath' because libtool seems to get confused with the command line options. The same happens with the alternative form -Wl,-rpath -Wl,/foo/bar . Is there any way to specify a custom

Linphone configuration results in multiple undefined Autotools macros

孤街醉人 提交于 2019-12-22 11:37:07
问题 I have downloaded the Linphone opensource and build using MINGW. I have followed the steps given by the README.mingw. When I use the command "./autogen.sh", I got the following error. + aclocal -I m4 -I /usr/local/share/aclocal -I /share/aclocal aclocal:m4/po.m4:36: warning: macro `AM_PATH_PROG_WITH_TEST' not found in librar y aclocal:m4/po.m4:61: warning: macro `AM_PATH_PROG_WITH_TEST' not found in librar y aclocal:m4/po.m4:78: warning: macro `AM_PATH_PROG_WITH_TEST' not found in librar y

How do I get GNU __attribute__((constructor)) to work in a library?

为君一笑 提交于 2019-12-22 09:50:35
问题 I can get GNU __attribute__((constructor)) to work (for a C++ program) if I link all object files together in a single link, but it doesn't work anymore if I store the object file containing the constructor function in a library and then link the library rather than the object file. What am I doing wrong? Makefile.am: SUBDIRS = src src/Makefile.am: bin_PROGRAMS = hello hello_SOURCES = hello.cc register.cc register.hh myfunc.cc src/hello.cc: #include <iostream> // for cout #include <map>

What is the right way to install header files from some package?

爱⌒轻易说出口 提交于 2019-12-22 06:24:36
问题 I want to build some package from source ( e2fsprogs to be more concrete) and install its header files to my system. After that I will delete the build tree so it will not be accessible anymore. What is the right way to do this? When I want to install program, I make simply: $ ./configure $ make # make install What are the equivalent actions when I want to install headers? 回答1: For e2fsprogs , quoting verbatim from the INSTALL file shipped with the sources: 7) Install the include files and

What is the right way to install header files from some package?

十年热恋 提交于 2019-12-22 06:23:56
问题 I want to build some package from source ( e2fsprogs to be more concrete) and install its header files to my system. After that I will delete the build tree so it will not be accessible anymore. What is the right way to do this? When I want to install program, I make simply: $ ./configure $ make # make install What are the equivalent actions when I want to install headers? 回答1: For e2fsprogs , quoting verbatim from the INSTALL file shipped with the sources: 7) Install the include files and