autotools

Build 32bit on 64 bit Linux using an automake configure script?

纵然是瞬间 提交于 2019-11-27 17:06:35
I'm using a 64bit system but want a set of 32bit binaries. What options must I pass to a configure script to generate a 32bit/x86 makefile? Passing the following argument to configure script allowed me to build the 32bit library on 64bit Linux ./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" Jack's answer is incomplete. You need compiler/libc support for 32-bit compilation. In some distros like Ubuntu, what you need to do is install packages gcc-multilib and/or g++-multilib : sudo apt-get install gcc-multilib g++-multilib Then you can call configure as you

Getting started with autotools

我是研究僧i 提交于 2019-11-27 16:58:18
Anyone recommend how a person could get started with autotools in building a C project? Follow the autotools tutorial . You can also get the autobook . Chapter 4 covers a minimal GNU autotools project. Alexandre Duret-Lutz 's tutorial is my resource of choice. There are also: Autotools: a practitioner's guide to Autoconf, Automake and Libtool Autotools Mythbuster To me, the autobook is not up to date anymore and more difficult to read. However it still contains interesting chapters like Writing Portable Bourne Shell . Also, consider learning about non-recursive automake which addresses the

What are Makefile.am and Makefile.in?

核能气质少年 提交于 2019-11-27 16:33:46
These two files are mostly seen in open source projects. What are they for, and how do they work? Sean A.O. Harney Makefile.am is a programmer-defined file and is used by automake to generate the Makefile.in file (the .am stands for a uto m ake). The configure script typically seen in source tarballs will use the Makefile.in to generate a Makefile . The configure script itself is generated from a programmer-defined file named either configure.ac or configure.in (deprecated). I prefer .ac (for a uto c onf) since it differentiates it from the generated Makefile.in files and that way I can have

Symbols from convenience library not getting exported in executable

假装没事ソ 提交于 2019-11-27 14:50:13
I have a program, myprogram , which is linked with a static convenience library, call it libconvenience.a , which contains a function, func() . The function func() isn't called anywhere in myprogram ; it needs to be able to be called from a plugin library, plugin.so . The symbol func() is not getting exported dynamically in myprogram . If I run nm myprogram | grep func I get nothing. However, it isn't missing from libconvenience.a : nm libconvenience/libconvenience.a | grep func 00000000 T func I am using automake, but if I do the last linking step by hand on the command line instead, it doesn

Can CMake generate configure file?

匆匆过客 提交于 2019-11-27 13:23:30
问题 I need the configure file to transpile from C++ to JS, I'm trying to use emscripten in a project. Emscripte comes with a tool called emconfigure, that replaces the autoconf configure, But the project I'm building uses cmake as build system and currently (Jan-12) emscripten has only support for autoconf - so I'm bypassing it by generating the configure and doing a port on the make, so there a way to create the configure file from the cmake ?? I'm not talking about the make files.. but the

How to create a shared library (.so) in an automake script?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 11:36:33
问题 given some source file test.cpp I would like to create a shared library libtest.so . I am trying to do this within the scope of an automake file however I cannot seem to get this to work. For example under g++ I do the following: g++ -shared -fPIC test.cpp -o libtest.so then i can create another file that will depend on the shared library as follows: g++ mytest.cpp libtest.so -o blah I have read that automake only supports making shared libraries via libtool. I have tried to get my automake

Make install, but not to default directories?

若如初见. 提交于 2019-11-27 10:07:10
I want to run 'make install' so I have everything I need, but I'd like it to install the things in their own folder as opposed to the system's /usr/bin etc. is that possible? even if it references tools in the /usr/bin etc.? It depends on the package. If the Makefile is generated by GNU autotools ( ./configure ) you can usually set the target location like so: ./configure --prefix=/somewhere/else/than/usr/local If the Makefile is not generated by autotools, but distributed along with the software, simply open it up in an editor and change it. The install target directory is probably defined in

CFLAGS vs CPPFLAGS

杀马特。学长 韩版系。学妹 提交于 2019-11-27 10:05:54
I understand that CFLAGS (or CXXFLAGS for C++) are for the compiler, whereas CPPFLAGS is used by the preprocessor. But I still don't understand the difference. I need to specify an include path for a header file that is included with #include -- because #include is a preprocessor directive, is the preprocessor (CPPFLAGS) the only thing I care about? Under what circumstances do I need to give the compiler an extra include path? In general, if the preprocessor finds and includes needed header files, why does it ever need to be told about extra include directories? What use is CFLAGS at all? (In

error: Libtool library used but 'LIBTOOL' is undefined

我与影子孤独终老i 提交于 2019-11-27 09:54:19
问题 I am trying to automake the OrientDb C++ library, but getting some errors. Makefile.am:10: error: Libtool library used but 'LIBTOOL' is undefined Makefile.am:10: The usual way to define 'LIBTOOL' is to add 'LT_INIT' Makefile.am:10: to 'configure.ac' and run 'aclocal' and 'autoconf' again. Makefile.am:10: If 'LT_INIT' is in 'configure.ac', make sure Makefile.am:10: its definition is in aclocal's search path. https://github.com/tglman/orientdb-c https://github.com/tglman/orientdb-c/wiki/Install

What are the differences between Autotools, Cmake and Scons?

风格不统一 提交于 2019-11-27 09:08:34
问题 What are the differences between Autotools, Cmake and Scons? 回答1: In truth, Autotools' only real 'saving grace' is that it is what all the GNU projects are largely using. Issues with Autotools: Truly ARCANE m4 macro syntax combined with verbose, twisted shell scripting for tests for "compatibility", etc. If you're not paying attention, you will mess up cross-compilation ability (It should clearly be noted that Nokia came up with Scratchbox/Scratchbox2 to side-step highly broken Autotools