automake

Can I install a systemd file during distcheck using $dc_install_base?

拜拜、爱过 提交于 2020-01-04 02:12:20
问题 I have the following Autotools code for installing a systemd service file, which must be installed outside of $prefix to a directory given by a pkg-config variable: (I know this is not proper, but I can't change the way systemd works.) configure.ac AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) AC_SUBST([systemdsystemunitdir], [

MacOS - automake: command not found

谁说胖子不能爱 提交于 2020-01-02 10:06:05
问题 I am trying to install automake on MacOS using brew . From terminal I write, brew install automake says Warning: automake-1.15 already installed . When I then try automake version it responds -bash: automake: command not found . I am using OS X El Capitan. $ automake version -bash: automake: command not found $ brew install automake Warning: automake-1.15 already installed $ automake version -bash: automake: command not found 回答1: The solution had to do with brew having failed to link the

Correcting the GCC command line ordering using Automake

喜欢而已 提交于 2020-01-01 04:58:06
问题 I have an autotools project that compiles just fine on the Mac, but under Linux (Ubuntu 12.04.1 LTS) the command lines passed to gcc have the libraries out of order relative to the object files. For example, autotools generates the following command to compile my code, a single file named test.c into a binary named test : gcc -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -lglib-2.0 -o test test-test.o This command line fails with: /home/user/glib-test/test.c:4:

Thrift官方安装手冊(译)

╄→尐↘猪︶ㄣ 提交于 2019-12-30 23:56:30
本篇是Thrift官网安装文档的翻译,原地址 点击这里 。Thrift之前是不支持Windows的。可是似乎0.9版本号以后已经支持Window了。介绍了Thrift安装的环境要求以及在centos,Debian/Ubuntu,OS X和Windows下的安装过程。并提出了一些安装过程中可能遇到的问题和解决的方法。适用于thrift0.9版本号。 1 Thrift的环境要求 Apache的Thrift的编译器为支持可移植由C++语言编写而成。但在安装到某些系统中时要求有一定的环境要求。在以下的指南中选择你要安装的系统開始吧。 Centos 6.5 Install Debian/Ubuntu install OS X Install Windows Install 1.1 基本环境要求 一个相对posix兼容* NIX系统 Windows下可用的Cywin或者MinGW g++ 4.2 boost 1.53.0 生成编译器时还须要支持lex和yacc的执行时库 1.2 编译源代码的环境要求 GNU的编译工具: autoconf 2.65 automake 1.9 libtool 1.5.24 pkg-config autoconf macros (pkg.m4) lex and yacc (开发主要使用flex和bison) libssl-dev 1.3 语言要求

Unit tests using Automake

谁说我不能喝 提交于 2019-12-30 09:44:08
问题 I am working in a project with other people in the team using GNU autotools. In the project we are using unit test for each non trivial C++ class. I found out that there is support for unit testing. For that I am using this structure: ./ + tests/ + Makefile.am + classA_test.cc .... + classB_test.cc + src/ + lib/ + Makefile.am The problem comes since my main Makefile.am is using subdir-objects options --note that I am not using recursive makefile for the source files--, I cannot export my

GNU autotools: Debug/Release targets?

霸气de小男生 提交于 2019-12-29 02:21:47
问题 I've been looking for this for a while: I'm currently converting a medium-size program to autotools, coming from an Eclipse-based method (with makefiles) I'm always used to having a "debug" build, with all debug symbols and no optimizations, and a "release" build, without debug symbols and best optimizations. Now I'm trying to replicate this in some way with autotools, so I can (perhaps) do something like: ./configure make debug Which would have all debug symbols and no optimizations, and

Fail to Link Portaudio Library

旧城冷巷雨未停 提交于 2019-12-25 12:40:12
问题 I have made a simple Makefile project using Portaudio libraries and the project has been working fine with the following Makefile: CXXFLAGS = -O2 -g -Wall -fmessage-length=0 OBJS = RecAudio.o LIBS = ../Portaudio/portaudio/lib/.libs/libportaudio.a -lpthread -lrt -lasound #LIBS = -lportaudio -lpthread -lrt -lasound TARGET = RecAudio $(TARGET): $(OBJS) $(CXX) -o $(TARGET) $(OBJS) $(LIBS) all: $(TARGET) clean: rm -f $(OBJS) $(TARGET) I'll try to integrate Portaudio libraries into another project

How to build in a separate directory with autotool

给你一囗甜甜゛ 提交于 2019-12-25 01:32:14
问题 I have a working directory as below: ./ |----HelloWorld/ |----|----main.cpp |----|----Makefile.am |----Pet/ |----|----Pet.h |----|----Pet.cpp |----build/ |----configure.ac |----Makefile.am I would like to use the autotool to construct makefile and then build the project in the build directory. The ./configure.ac is # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([Hello], [1.0], [qub@oregonstate.edu]) AM_INIT_AUTOMAKE([-Wall -Werror

Link errors while using G++ for MPI code

空扰寡人 提交于 2019-12-24 15:24:48
问题 My code is as simple as this: #include <mpi.h> int main(int argc, char**args) { MPI_Init(&argc, &args); int mpiSize; int mpiRank; MPI_Comm_size(MPI_COMM_WORLD, &mpiSize); MPI_Comm_rank(MPI_COMM_WORLD, &mpiRank); MPI_Finalize(); } I first compile it to object file: g++ -c src/mpitest.cpp -o src/mpitest.o Then I can easily use mpicxx: mpicxx src/mpitest.o -o mpi But I want to use g++ instead, because It's easier for automake, so I tried: mpicxx src/mpitest.o -o mpi -show It prints out: g++ src

Find the GCC Version

孤街浪徒 提交于 2019-12-24 12:14:28
问题 Using autoconf/automake how does one find the GCC version on the system? To get the python version installed you'd use AM_PATH_PYTHON, and then the PYTHON_VERSION variable would be available. Is there something similar for the GCC version? (Also, is it possible to get the major, minor and patch level of gcc?) 回答1: A quick search reveals the ax_gcc_version macro which should give you the GCC_VERSION variable. Unfortunately, that macro depends on AX_GCC_OPTION which has recently been deprecated