autotools

Autoconf uses wrong AR on OS X

橙三吉。 提交于 2019-12-05 12:36:05
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 = -static -o Apple's Porting UNIX/Linux Applications to OS X does not discuss the topic, and I can't find

What is the right way to install header files from some package?

老子叫甜甜 提交于 2019-12-05 11:43:34
I want to build some package from source ( e2fsprogs to be more concrete) and install its header files to my system. After that I will delete the build tree so it will not be accessible anymore. What is the right way to do this? When I want to install program, I make simply: $ ./configure $ make # make install What are the equivalent actions when I want to install headers? For e2fsprogs , quoting verbatim from the INSTALL file shipped with the sources : 7) Install the include files and libraries You can run `make install-libs' to install the include files and libraries. Please note that this

Can't install Thrift on Mac OS 10.9.2

ⅰ亾dé卋堺 提交于 2019-12-05 09:10:15
This problem is like Installing thrift on CentOS 6.5 64 bit and Cassandra PDO , but he is on CentOS, I am runninc MacOS. checking for gawk... (cached) awk checking for ranlib... (cached) ranlib ./configure: line 17029: syntax error near unexpected token `QT,' ./configure: line 17029: ` PKG_CHECK_MODULES(QT, QtCore >= 4.3, QtNetwork >= 4.3, have_qt=yes, have_qt=no)' My envrioment is gcc -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c

AS_IF and AC_MSG_ERROR: error: possibly undefined macro

醉酒当歌 提交于 2019-12-05 08:12:34
I encounter such errors when trying to build libnice-0.1.10. For solution, I am following possibly undefined macro: AC_MSG_ERROR , but still not getting there. some program version uname: 3.5.0-23-generic m4: 1.4.16 automake: 1.14.1 autoconf: 2.69 libtoolize: 2.4.2 I also add ACLOCAL_FLAGS="-I /.../share/aclocal" in bashrc. Here is what is reported from autogen. $ ./autogen.sh configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from... configure.ac:331: the top level configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4

What does the gcc -R parameter do?

别等时光非礼了梦想. 提交于 2019-12-05 06:08:28
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 checked here and here to no avail. What does the option do and how do I tell autotools not to use it? -R

How to install and use libtool shared library (.lo files)?

久未见 提交于 2019-12-05 02:43:24
问题 So after I ran libtool and got out a libfoo.lo and foo.o file from my library source, how do I convert the libfoo.lo file into a normal Linux shared library, like libfoo.so.1.0.0 so I can install and link to it on my target system? 回答1: From the outputs mentioned in the question, it looks like you ran libtool with --mode=compile mode. You will need to run libtool again with --mode=link to produce .a and .so libraries. libtool is just a simple wrapper for gcc, ln ar and ranlib which is needed

How to handle subprojects with autotools?

情到浓时终转凉″ 提交于 2019-12-04 23:55:47
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 configure.am. You can run the configure scripts in the sub-modules by adding the AC_CONFIG_SUBDIRS

why is “autoreconf” not used often?

家住魔仙堡 提交于 2019-12-04 23:03:36
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 before creating the software package? Thanks. The software developer who creates the tarball (or who

How can I define #define in my Make files

雨燕双飞 提交于 2019-12-04 17:21:09
问题 In my c/c++ files, there are multiple #define. As an example: #ifdef LIBVNCSERVER_HAVE_LIBZ /* some code */ #ifdef LIBVNCSERVER_HAVE_LIBJPEG /* some more code */ Can you please tell me how can I modify my Makefile.in so that I have those #define in ALL files during compilation? Thank you. 回答1: -DLIBVNCSERVER_HAVE_LIBZ -DLIBVNCSERVER_HAVE_LIBJPEG You could pass those in CPPFLAGS , CPPFLAGS = -DLIBVNCSERVER_HAVE_LIBZ -DLIBVNCSERVER_HAVE_LIBJPEG or make new variable CUSTOMDEFINES =

autoconf-generated Makefile does not pass flags for library headers when using PKG_CHECK_MODULES

柔情痞子 提交于 2019-12-04 14:53:28
My project depends upon a library (more precisely, GTK+) so I added the following configurations in my configure.ac : PKG_CHECK_MODULES([GTK], [gtk+-2.0]) AC_SUBST([GTK_CFLAGS]) AC_SUBST([GTK_LIBS]) My Makefile.am is: bin_PROGRAMS = secretary secretary_SOURCES = secretary.c For its turn, my secretary.c is as follows: #include <gtk/gtk.h> int main(int argc, char *argv[]) { gtk_init(&argc, &argv); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_show(window); gtk_main(); return 0; } However, when I run make (of course, after calling ./configure ) I got this error: gcc -DHAVE