automake

libtool doesn't provide library dependencies to link

给你一囗甜甜゛ 提交于 2019-12-14 03:52:20
问题 I am using libtool 2.2.6b on ubuntu lucid, and libtool 2.4.2 on ubuntu precise. On lucid my project will link properly. On precise it fails to link. Here's example code that demonstrates my problem; configure.ac AC_INIT([ltp], [0.0.1], [someone]) AM_INIT_AUTOMAKE AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([.m4]) AC_CONFIG_FILES([Makefile foo/Makefile bar/Makefile wah/Makefile]) AC_PROG_CXX AC_PROG_LIBTOOL AM_SANITY_CHECK AC_LANG_CPLUSPLUS AC_OUTPUT Makefile.am SUBDIRS = foo bar wah

automake with fortran: order of file

こ雲淡風輕ζ 提交于 2019-12-13 15:50:23
问题 I am facing a small problem when trying to build my code with autotools. My file structure is: $ tree . |-- configure.ac |-- Makefile.am `-- src |-- constants.f90 |-- environment.f90 |-- init.f90 |-- main.f90 `-- util.f90 (deleted possibly unnecessary lines) and my Makefile.am is: #SUBDIRS= help bin_PROGRAMS = scasr scasr_SOURCES = \ src/constants.f90 src/environment.f90 src/util.f90 \ src/init.f90 src/main.f90 scasr_LDADD = EXTRA_DIST= autogen.sh CLEANFILES =*.mod The problem is src/(*.f90)

Get libtool library output filename

╄→尐↘猪︶ㄣ 提交于 2019-12-13 06:48:17
问题 I'm trying to define an Automake rule that will generate a text file containing the full path to a libtool library that will be built and installed by the same Makefile. Is there a straightforward way of retrieving the output filename for a libtool library (with the correct extension for the platform the program is being built on)? For example, I am trying to write something like this: lib_LTLIBRARIES = libfoo.la bar.txt: echo $(prefix)/lib/$(libfoo_la) >$@ Where $(libfoo_la) would expand to

VPATH out-of-source build

北慕城南 提交于 2019-12-13 03:39:00
问题 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: root_dir/ | --------------------------------------------------- | | | | configure.ac mex/ Makefile.am non-mex-source/ | ------------------------------ | | sources/ build/ | | ----------- ------------------------------- | | | | | | mex1/ ... mexN/

What directory should I use for “error: 'extra_PROGRAMS' is used but 'extradir' is undefined”?

南楼画角 提交于 2019-12-13 03:21:24
问题 I have a autoconf/automake system that has a stand-alone target called stand . I don't want stand to be normally built, so I have this in my Makefile.am: bin_PROGRAMS = grace extra_PROGRAMS = stand ... stand_SOURCES = stand.cpp barry.cpp ... This has worked for a while, but automake just got updated on my system and I'm now getting this error: src/Makefile.am:4: error: 'extra_PROGRAMS' is used but 'extradir' is undefined src/Makefile.am:66: warning: variable 'stand_SOURCES' is defined but no

X-I.: command not found, and failed to build certain kind of software, what's wrong?

你离开我真会死。 提交于 2019-12-12 14:12:09
问题 the error message is as follows: ./libtool: line 1129: X-I.: command not found ./libtool: line 1129: X-DLT_CONFIG_H=<config.h>: command not found ./libtool: line 1129: X-DLTDL: command not found ./libtool: line 1129: X-I.: command not found ./libtool: line 1129: X-I.: command not found ./libtool: line 1129: X-Ilibltdl: command not found ./libtool: line 1129: X-I./libltdl: No such file or directory ./libtool: line 1129: X-I./libltdl: No such file or directory ./libtool: line 1129: X-g: command

Makefile.am create empty directory

吃可爱长大的小学妹 提交于 2019-12-12 11:46:27
问题 Using autotools, I need to create an empty directory tree when typing make install, like: /etc/myprg/ |-- foo right now, I do this by specifying empty targets, like this: myprgdir = $(sysconfdir)/myprg/ myprgfoodir = $(sysconfdir)/myprg/foo and then dist_myprg_DATA = dist_myprgfoo_DATA = But, I wonder if a better way to do something like this exists! 回答1: Perhaps like this: install-data-local: $(MKDIR_P) $(DESTDIR)$(sysconfdir)/myprg/foo uninstall-local: rmdir $(DESTDIR)$(sysconfdir)/myprg

why autogen.sh failed even with the correct autoconf?

霸气de小男生 提交于 2019-12-12 09:58:20
问题 autogen.sh failed, the output shows that i need an autoconf of higher version. but in fact i have a 2.6x autoconf.... why it still failed? [mirror@home 4]$ ./autogen.sh + autoreconf -i -f -v autoreconf: Entering directory `.' autoreconf: configure.in: not using Gettext autoreconf: running: aclocal --force -I m4 configure.in:4: error: Autoconf version 2.60 or higher is required configure.in:4: the top level autom4te: /usr/bin/m4 failed with exit status: 63 aclocal: autom4te failed with exit

Best way to add generated files to distribution?

若如初见. 提交于 2019-12-12 05:30:58
问题 I have a quite complex (C++) project using autoconf / automake, which includes some "generated" files (foo.yy -> foo.cc). Actual builds are done using a "control script" (Gentoo .ebuild for those familiar with the concept), on various platforms. Now, one of the target platforms does not properly support the foo.yy -> foo.cc step, and has to use the foo.cc file generated on a Linux box. Now I have two ways to go about this: 1) Check in foo.cc into the project repository and somehow patch

undefined reference when using local header file

為{幸葍}努か 提交于 2019-12-12 01:58:46
问题 I encountered an undefined reference error when working with automake, which only occurs when a certain local header file ( include/lmp2atomstyle.h , which is required by a library within the same repository) exists in the repository. I was working on combining multiple automake project source folders, lmpio and lmp2atomstyle , into a single one for convenience. Both projects are libraries which also provide a small program each for testing. After manually merging Makefile.am , lmp2atomstyle