automake

Automake: How to use a header from one library in a another library in a sister directory

醉酒当歌 提交于 2019-12-11 19:28:18
问题 My directory set up: libone one.c one.h Makefile.am libtwo two.c #includes one.h two.h Makefile.am ... Makefile.am configure.ac ... Now when I do autoreconf -fvi and configure and make, I get the error from two.c: could not find one.h. How do I setup the include paths in Makefile.am's? Any help appreciated. 回答1: Either do it the quick'n'dirty way #include "../libone/one.h" or (preferred, because then it doesn't matter whether one.h is installed or in the source tree or split out into a

How do I include mysql.h and my_global.h into the Makefile.am?

让人想犯罪 __ 提交于 2019-12-11 16:27:18
问题 I'm trying to create a C program that can communicate with MySQL database via these two header files: mysql.h my_global.h MySQL comes with mysql_config script that you can execute to find out where the include files and library files reside in the system. I was wondering how would you define it in the Makefile.am? I currently have the following: bin_PROGRAMS = db db_SOURCES = db.c db.h db_CFLAGS = -Wall `mysql_config --cflags --libs` Is this the correct way? 回答1: I would search for mysql

Mixing C++98 and C++11 source in automake/gcc

你离开我真会死。 提交于 2019-12-11 16:15:46
问题 I have a list of cpp files in project which is built using automake tools. Some of them are written using pre-C++11 standard (ie C++98) and they cannot compile with c++11 flag of gcc (-std=c++11). Latest cpp files are using C++11 standard and they need -std=c++11 flag in compile. Can I define in Automake two lists of cpp source files and give different compilation flags? 回答1: This is ripped directly from Setting per-file flags with automake You may bundle your c++11 code into a lib and

Debian dropped support for .la files; how do I build now?

亡梦爱人 提交于 2019-12-11 10:34:36
问题 Background I recently came across the fuppes UPnP media server and it seemed great. I installed it on my home server and started using it to stream video to my XBox. It worked really really well and I was happy with it. Then I upgraded my servers distribution and fuppes stopped working; I now know that it's because various libraries have depreciated, most specifically debian has started dropping the .la libtool files from the majority of their packages. The Problem / Question So my question

What is the difference between DEFS and CPPFLAGS in autoconf and automake

那年仲夏 提交于 2019-12-11 09:41:17
问题 I already read about the difference between CFLAGS and CPPFLAGS. But my Makefile.am currently uses both DEFS and CPPFLAGS and I am not sure about the difference. DEFS += -DLOCALEDIR=\"$(localedir)\" -DDATADIR=\"$(datadir)\" -DPKGDATADIR=\"$(pkgdatadir)\" and: src_foo_CPPFLAGS = \ $(AM_CPPFLAGS) \ -I$(top_builddir)/src \ -DDATADIR='"$(datadir)"' \ -DMODULEDIR='"$(moduledir)"' \ -DLIBEXECDIR='"$(libexecdir)"' Both the CPPFLAGS and the DEFS seems to create defines with the -D option. So whats

placing object files in different directories in nonrecursive build

二次信任 提交于 2019-12-11 07:38:21
问题 Background We build .mex files for both Matlab and Octave. The source code is common to both Matlab and Octave but with slight modifications here and there (taken care of via macro conditionals in the code). For reference, the source structure is: mex/ | ------------------------------ | | sources/ build/ | | ----------- ------------------------------- | | | | | | mex1/ ... mexN/ octave/ mex1.am ... mexN.am matlab/ | | | ----------- ------------- ------------- | | | | | | file1.cc ... fileM.cc

Autoconf Append to Output Variable and Program Specific LIBS

浪尽此生 提交于 2019-12-11 05:13:49
问题 Using autoconf in configure.ac I need to append to an output variable. Specifically I want to append to the LIBS variable differently for each of my programs (myprogram1 and myprogram2 in the Makefile.am). Lets imagine myprogram1 requires a -lboost_python and myprogram2 requires -losg. Essentially some programs require certain libs while others do not. Here is an example of what I am doing. Of course AC_SUBST does an assignment (= vs +=) from what I understand so that doesn't work. AC_CHECK

cygwin $'\r': command not found error

别说谁变了你拦得住时间么 提交于 2019-12-11 01:32:03
问题 I revised a project a bit, under debugging it worked fine. When I try to build it without debugging, it is showing errors, could not fix it. $ make Making all in third_party make[1]: Entering directory '/cygdrive/c/Users/alimjan/Documents/fast-hlground/slim-2.2.7/third_party' Making all in zdelta-2.1 make[2]: Entering directory '/cygdrive/c/Users/alimjan/Documents/fast-hlground/slim-2.2.7/third_party/zdelta-2.1' gcc -DHAVE_CONFIG_H -I. -I../../src -Wall -export-dynamic -O3 -fopenmp -MT

what is the difference between AM_LDFLAGS and LDFLAGS

泪湿孤枕 提交于 2019-12-10 20:51:24
问题 I want to know what is the difference between AM_LDFLAGS and LDFLAGS, as I've faced an error error: AM_LDFLAGS must be set with '=' before using '+=' while I was using AM_LDFLAGS in a foreach loop my make file code is as shown below: program_INCLUDE_DIRS := /usr/bin/PR__bin program_LIBRARY_DIRS := /usr/lib/PR__lib CFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) AM_LDFLAGS += $(foreach librarydir,$(program_LIBRARY_DIRS),-L$(librarydir)) 回答1: If that error is complaining

Build m4, autoconf, automake, libtool on unix

拟墨画扇 提交于 2019-12-10 19:59:49
问题 I'm trying to setup PHP, apache environment on HP-UX server. While install i'm using usual commands of "./configur, make, make install". Here when I'm trying to install PCRE I got an error like follows. CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/ubuntu/softwares/m4-1.4.17/build-aux/missing aclocal-1.14 -I m4 /home/ubuntu/softwares/m4-1.4.17/build-aux/missing: line 81: aclocal-1.14: command not found WARNING: 'aclocal-1.14' is missing on your system. You should only need it if you