autotools

How do you create tests for “make check” with GNU autotools

心已入冬 提交于 2019-12-02 23:47:23
I'm using GNU autotools for the build system on a particular project. I want to start writing automated tests for verifcation. I would like to just type "make check" to have it automatically run these. My project is in C++, although I am still curious about writing automated tests for other languages as well. Is this compatible with pretty much every unit testing framework out there (I was thinking of using cppunit)? How do I hook these unit testing frameworks into make check? Can I make sure that I don't require the unit test software to be installed to be able to configure and build the rest

how to set include paths with autotools

徘徊边缘 提交于 2019-12-02 19:20:34
I'm working on a C++ project that uses autoconf & automake , and I'm struggling to correctly set up the include paths in *CPPFLAGS . I've read about 3 hours worth of documents, and I can't figure it out yet. I'm not looking for a hack, but for the correct way to do this. Here is my conundrum. As I see it, there are 3 completely different sources for include paths: External libraries that must be installed along with my package, which are configured by configure --with-XXX=<PATH> . Within my package, some source files use #include <file.h> even when file.h is part of the package, so to compile

Automake error './ltmain.sh' not found

强颜欢笑 提交于 2019-12-02 16:44:05
I've installed mingw and msys by using mingw-get-setup.exe . I've also installed Autotools(autoconf, automake,m4,libtool) into C:\/opt/autotools . When I run automake, the following error always occurs: configure.ac:11: error: required file './ltmain.sh' not found If I copy ltmain.sh from libtool’s installed tree, execution will finish normally. How can I configuure automake to find ltmain.sh without copying? In an autoconf / automake / libtool project you have to invoke: libtoolize : this copies/links a few support scripts, including ltmain.sh (which is the main component of libtool). aclocal

Debugging the error “gcc: error: x86_64-linux-gnu-gcc: No such file or directory”

旧街凉风 提交于 2019-12-02 16:05:59
I'm trying to build: https://github.com/kanzure/nanoengineer But it looks like it errors out on: gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/python2.7 -std=c99 x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -MT libstructcompare_a-structcompare.o -MD -MP -MF .deps/libstructcompare_a-structcompare.Tpo -c -o libstructcompare_a-structcompare.o `test -f 'structcompare.c' || echo './'`structcompare.c gcc: error: x86_64-linux-gnu-gcc: No such file or directory x86_64-linux-gnu-gcc definitely exists in /usr/bin (It's a symlink) and the

Building a library using autotools from cmake

烈酒焚心 提交于 2019-12-02 15:48:40
This is my first try with cmake and I would like to have, if possible, some feedbacks about what I did since some problems remain. In the CMakeLists.txt of the library folder, I created two makefile targets: configure-antlr3c and antlr3c . The first target runs the autotools configuration shell script, the second one runs the make executable to build the library: # CMakeLists.txt in libantlr3c-3.1.3 add_custom_target( configure-antlr3c ${SHELL_EXECUTABLE} configure WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) add_custom_target( antlr3c ${MAKE} DEPENDS configure-antlr3c WORKING_DIRECTORY $

Alternatives to Autoconf and Autotools? [closed]

雨燕双飞 提交于 2019-12-02 14:06:26
I'm a very frequent user of the GNU Autotools (mostly Autoconf , occasionally Libtool ). I'm working on a project where portability is going to be a sticking point.. Yet, the rest of the team is just not comfortable working with m4 . I got this in my inbox from not one, but four people: Anyway, perhaps someone could recommend something Python or PHP based? I'm working on the C end of a much larger tree; I can be sure either Python or PHP 5 will be present, as they are prerequisites. I have heard good things about CMake which tries to solve the same problems. Here is the wikipedia article

Why does autoconf erroneously find a function which isn't available later?

删除回忆录丶 提交于 2019-12-02 10:45:04
On a Linux system I configured a software package (llvm) and autoconf finds the arc4random function. Here an extraction of the output during configuration: checking for strerror... yes checking for strerror_r... yes checking for setenv... yes checking for arc4random... yes checking for strtoll... yes checking for strtoq... yes checking for sysconf... yes Configuring goes fine. Later, when building the package I get an error about an undeclared specifier arc4random : [removed]/lib/Support/Unix/Process.inc:368:10: error: use of undeclared identifier 'arc4random' return arc4random(); ^ Here the

Using clang++ for code analysis in an Autotools project in Eclipse

夙愿已清 提交于 2019-12-02 08:23:52
问题 I am using Eclipse 4.2 on Mac OS 10.8, with the command line tools (Xcode 4.6.3) installed. The clang compiler supports C++11 by means of using the following flags: -std=c++11 -stdlib=libc++ . I have an Autotools-managed project in Eclipse. Real compilation works as expected after overriding CXX and CXXFLAFGS environment variables when configure is called. However, the static code analysis in Eclipse continues to use GCC (the version installed with Xcode is GCC 4.2), so there is no support

Makefile.in without Makefile.am in projects

谁都会走 提交于 2019-12-02 06:25:55
问题 In several projects I have seen the Makefile.in without Makefile.am . E.g. bash http://git.savannah.gnu.org/cgit/bash.git/tree/ and dtach http://dtach.cvs.sourceforge.net/viewvc/dtach/dtach/ I always thought that Makefile.in was generated by automake. Also with Makefile.am being a user written file I would not have thought it would be omitted from the code repository. In the bash source tree, the Makefile.in is far too big to be hand written and the Makefile.in in dtach also looks generated.

“Can't locate ExtUtils/MakeMaker.pm in @INC” during git build

左心房为你撑大大i 提交于 2019-12-02 06:07:51
问题 I'm building git on a pretty minimal system (Ubuntu 16.04 docker image) without using the package manager (except for wget , xz-utils , make and gcc ). I thus installed prerequisistes as follows: apt-get update && apt-get install --yes wget xz-utils make gcc wget http://www.cpan.org/src/5.0/perl-5.26.1.tar.gz && tar xf perl-5.26.1.tar.gz && cd perl-5.26.1 && ./configure.gnu && make -j16 && make install && cd .. wget https://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.8.1.tar.xz && tar xf gettext