autotools

Autoconf uses wrong AR on OS X

╄→гoц情女王★ 提交于 2019-12-07 11:19:48
问题 I'm testing on OS X. We have a configure.ac and Makefile.am . Autotools is selecting the wrong AR and ARFLAGS for the platform. It happens with (and without) AM_PROG_AR in Makefile.am : $ egrep 'AR =|ARFLAGS =' Makefile AMTAR = $${TAR-tar} AR = ar ac_ct_AR = ar Autoconf should be using Apple's libtool (not to be confused Autotools' libtool ) and libtool 's flags. Apple's libtool properly handles fat libraries and cross-compiles. It should be something like: AR = /usr/bin/libtool ARFLAGS =

What does the gcc -R parameter do?

馋奶兔 提交于 2019-12-07 03:33:53
问题 I am trying to run an autotools configure script for the bson-cpp project, and it fails because it cannot determine what flags it needs to compile with boost_filesystem. A quick look at confg.log shows: g++ -o conftest -g -O2 -pthread -L/usr/local/lib -R/usr/local/lib -L/usr/local/libexec conftest.o -lboost_filesystem-mt -lboost_system-mt >&5 g++: error: unrecognized option '-R' So, naturally, I tried to find out what the R option does, but I can't seem to find it documented anywhere. I've

How to handle subprojects with autotools?

放肆的年华 提交于 2019-12-06 19:29:48
问题 I have some C++ project build by autotools. The project uses some libraries, also written by me. Source of libraries are imported to the project as submodules of git. Each library has its own autotools files. Say, I have: src/<my src files> modules/libfoo/ libbar/ Makefile.am Configure.in <other autotools junk> What I want is to somehow include libraries into main project compilation chain. I guess that just including subdir to Makefile.am is not enough, because some checks can be reformed in

why is “autoreconf” not used often?

余生长醉 提交于 2019-12-06 17:19:23
问题 I am newbie of Autotools. From my understanding, one would use the following basic steps to build software using Autotools: autoreconf --install ./configure make However, I noticed that most open source software packages (on Linux) does not need the step 1. They most time just need step 2 and 3 to build. It seems that they already are packaged with Makefile.in . I am wondering why? Do they manually code the Makefile.in , or the software developer uses autoreconf to generate the Makefile.in

How to pass extra custom ./configure autotools options to a Buildroot package?

只谈情不闲聊 提交于 2019-12-06 12:06:28
E.g., I want to add the options --enable-foo --enable-bar to a ./configure command. Many ./configure options can be set indirectly through BR2_ configs, but many software have so many options that it would be infeasible to have one BR2_ config for every possible ./configure option. Is there a general mechanism that works for all autotools packages? I think there is no current general method as of 2017.02, since package/pkg-autotools.mk contains: # Configure package for target define $(2)_CONFIGURE_CMDS (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache && \ $$(TARGET_CONFIGURE_OPTS) \ $$(TARGET

automake Environment Variable Condition

≯℡__Kan透↙ 提交于 2019-12-06 10:28:45
I have a file Makefile.am I am using to generate a Makefile. In the generated Makefile I want to have something like: ifndef SOURCECODEPATH SOURCECODEPATH := /home/root/source_code_path endif It seems so simple, does anyone know how I can do it? Use the AM_CONDITIONAL macro in configure.ac . The script sets a variable you can test, e.g., a variable that is set to non-empty if the condition is enabled: AM_CONDITIONAL([ENABLE_SOURCECODEPATH], [test "x$ac_srcpath" != "x"]) Then in Makefile.am : if !ENABLE_SOURCECODEPATH SOURCECODEPATH = ... endif However, since you are explicitly defining the

Integrate qt project with autotool

我是研究僧i 提交于 2019-12-06 09:55:29
问题 Can any one give me a step by step instruction to integrate a QT project with autotool project. 回答1: configure.ac : PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.4.0], [ AC_PATH_PROGS(MOC, [moc-qt4 moc], moc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin) AC_PATH_PROG(RCC, rcc, rcc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin) AC_PATH_PROGS(UIC, [uic-qt4 uic], uic,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin) ], [ AC_MSG_ERROR([Qt 4 library not found]) ]) Makefile.am :

Using git for distribution with autotools

廉价感情. 提交于 2019-12-06 07:56:42
I have been looking about this subject for a while and I think I know all I need about "should I put my autotools generated files in my repo?". I agree with everyone who says that you should not and include just wat is needed to generate them. Althought I think this is the right approach for development purposes I write a framework which uses git for version control (in the develop branches) and uses the master branch to distribute the code. My question is, is there an easy way to include in git the same files that will be included in the dist package by autotools?. The idea is that every user

automake and custom rpath

半腔热情 提交于 2019-12-06 07:31:23
I have to ship a third-party library with an application. Because I don't want to set LD_LIBRARY_PATH by hand or require any wrapper script I want automake to set a custom rpath . Unfortunately libtool has its own -rpath option and adding -Wl,-rpath,/foo/bar to LDFLAGS only results in g++: unrecognized option '-rpath' because libtool seems to get confused with the command line options. The same happens with the alternative form -Wl,-rpath -Wl,/foo/bar . Is there any way to specify a custom rpath without libtool interference? As you said, libtool has its own -rpath option. Any reason you don't

Linphone configuration results in multiple undefined Autotools macros

懵懂的女人 提交于 2019-12-06 05:26:32
I have downloaded the Linphone opensource and build using MINGW. I have followed the steps given by the README.mingw. When I use the command "./autogen.sh", I got the following error. + aclocal -I m4 -I /usr/local/share/aclocal -I /share/aclocal aclocal:m4/po.m4:36: warning: macro `AM_PATH_PROG_WITH_TEST' not found in librar y aclocal:m4/po.m4:61: warning: macro `AM_PATH_PROG_WITH_TEST' not found in librar y aclocal:m4/po.m4:78: warning: macro `AM_PATH_PROG_WITH_TEST' not found in librar y aclocal:m4/gettext.m4:170: warning: macro `AM_ICONV_LINK' not found in library configure.ac:185: warning: