automake

How can I specify that I want C++0x in Makefile.am?

亡梦爱人 提交于 2019-12-02 07:16:06
Currently my project has the following simple tree: ./Makefile.am ./configure.ac ./README ./src/main.cpp ./src/Makefile.am ./bin I'm trying to following the following tutorial: http://www.gnu.org/software/automake/manual/automake.html#Hello-World How can I instruct configure.ac to use the C++0x extensions? In particular, what if the hello-world line in main.cpp file is as follows: cout << ([] () {return "Hello, World!";}) () << endl; Issuing "make" results in an error. If you're using gcc (looks like you are) then from the libstdc++ manual they have autoconf examples for checking c++ base

How can I specify that I want C++0x in Makefile.am?

落花浮王杯 提交于 2019-12-02 06:40:40
问题 Currently my project has the following simple tree: ./Makefile.am ./configure.ac ./README ./src/main.cpp ./src/Makefile.am ./bin I'm trying to following the following tutorial: http://www.gnu.org/software/automake/manual/automake.html#Hello-World How can I instruct configure.ac to use the C++0x extensions? In particular, what if the hello-world line in main.cpp file is as follows: cout << ([] () {return "Hello, World!";}) () << endl; Issuing "make" results in an error. 回答1: If you're using

Autotools cross compilation and generated sources

孤街浪徒 提交于 2019-12-02 01:40:39
I'm trying to create a library using autotools (autoconf, automake, libtool) as a build system. The library has to be cross-compileable, but one of the steps of building it is to generate sources by executable built from sources during the whole process. The problem is I cannot use automake's system to build the intermediate binary because when it's cross compile it wouldn't run on '--build' to generate sources. One way to work this around it to create separate autools project to build intermediate binaries but I want to avoid it because there are many headers and other "data" files common for

How do I get autotools to compile with the Intel compiler?

女生的网名这么多〃 提交于 2019-12-01 15:56:13
I want my code to compile with the Intel compiler(s) or with gcc/g++ depending on a configure argument. Is this possible? What do I need to put in my configure.ac and Makefile.am files to make this happen? If you want to use a compiler other than gcc when you compile, pass 'CC=/path/to/compiler' as an argument to configure. (That is, run ./configure CC=/path. Do not use the form CC=/path ./configure.) If you want the default compiler to be something other than gcc, you can put CC=${CC-/path/to/default/compiler} in configure.ac before the invocation of AC_PROG_CC. I would do this: AC_PROG_CC(

How do I get autotools to compile with the Intel compiler?

℡╲_俬逩灬. 提交于 2019-12-01 14:39:42
问题 I want my code to compile with the Intel compiler(s) or with gcc/g++ depending on a configure argument. Is this possible? What do I need to put in my configure.ac and Makefile.am files to make this happen? 回答1: If you want to use a compiler other than gcc when you compile, pass 'CC=/path/to/compiler' as an argument to configure. (That is, run ./configure CC=/path. Do not use the form CC=/path ./configure.) If you want the default compiler to be something other than gcc, you can put CC=${CC-

Where to put helper-scripts with GNU autoconf/automake?

大城市里の小女人 提交于 2019-12-01 11:46:49
I'm working on a project that will be distributed with GNU autoconf/automake, and I have a set of bash scripts which call awk scripts. I would like the bash scripts to end up in the $PATH, but not the awk scripts. How should I insert these into the project? Should they be put in with other binaries? Also, is there a way to determine the final location of the file after installation? I presume that /usr/local/bin isn't always where the executables end up... Add something like this to Makefile.am scriptsdir = $(prefix)/bin scripts_DATA = awkscript1 awkscript2 In this case it will install

Install arbitrary data files in fixed location with Automake?

做~自己de王妃 提交于 2019-12-01 05:11:49
How can I tell automake to install arbitrary data files in places I want? I have some files I need to put in specific places, e.g. " datafile1 ", in my project, needs to be copied to " /usr/MyProduct/flash_memory ". " /usr/MyProduct/flash_memory " is an absolute path that I can't change. " datafile1 " is a binary data file that is not "built" by make , but just needs to be copied by make install . I can't bear on make dist . It needs to be copied by make install (its a long explanation, so, pelase just take this into account). I rather not use install-hook , but prefer to have a more elegant

Setting per-file flags with automake

邮差的信 提交于 2019-12-01 04:11:32
Is there a way set flags on a per-file basis with automake? In particular, if I have a c++ project and want to compile with -WAll all the files except one for which I want to disable a particular warning, what could I do? I tried something like: CXXFLAGS = -WAll ... bin_PROGRAMS = test test_SOURCES = main.cpp utility.cpp utility_o_CXXFLAGS = $(CXXFLAGS) -Wno-unused-value but it didn't work. EDITED: removed reference to automake manual, which was actually misleading (thanks to Douglas Leeder). Automake only supports per-target flags, while you want per-object flags. One way around is to create

Setting per-file flags with automake

别说谁变了你拦得住时间么 提交于 2019-12-01 01:45:58
问题 Is there a way set flags on a per-file basis with automake? In particular, if I have a c++ project and want to compile with -WAll all the files except one for which I want to disable a particular warning, what could I do? I tried something like: CXXFLAGS = -WAll ... bin_PROGRAMS = test test_SOURCES = main.cpp utility.cpp utility_o_CXXFLAGS = $(CXXFLAGS) -Wno-unused-value but it didn't work. EDITED: removed reference to automake manual, which was actually misleading (thanks to Douglas Leeder).

How do I troubleshoot boost library/header inclusion via autoconf/automake?

我的未来我决定 提交于 2019-12-01 01:04:55
I'm new to autom4te, and I'm trying to use autoconf/automake to build and link a C++ program on multiple architectures. Complicating the linking is the fact that the project requires boost (filesystem, system, program_options). I'm using boost.m4 (from http://github.com/tsuna/boost.m4/tree/ ), and it seems to locate all the libraries and headers successfully. Unfortunately, linking still fails, leaving me confused. These are the relevant lines of configure.ac : AC_CONFIG_MACRO_DIR([m4]) # ... AC_PROG_CXX AC_PROG_LIBTOOL # ... BOOST_REQUIRE([1.41.0]) BOOST_FILESYSTEM BOOST_SYSTEM BOOST_PROGRAM