autotools

Libtool issue while compiling Liblinphone

安稳与你 提交于 2019-12-12 05:14:28
问题 I'm trying to compile this lib: https://github.com/BelledonneCommunications/linphone-iphone During generation I get this: /linphone-iphone/submodules/build/..//externals/speex/libspeex/cb_search.c libtool: Version mismatch error. This is libtool 2.4.6, but the libtool: definition of this LT_INIT comes from libtool 2.4.2. libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6 libtool: and run autoconf again. make[4]: *** [cb_search.lo] Error 63 make[3]: *** [all-recursive]

Properly include GLib headers with autotools

白昼怎懂夜的黑 提交于 2019-12-12 04:53:19
问题 In my normal dev environment (ubuntu), I don't have any issues linking against GLib-2.0, however when I attempt to build on fresh install of Debian Squeeze, I run into errors linking GLib. configure.ac: ... AC_PROG_CC AM_PROG_CC_C_O CFLAGS="$CFLAGS -Wall -W -Wno-unused-parameter -std=c99 -pedantic" PKG_CHECK_MODULES(MYAPP, [glib-2.0 >= 2.3.0 gthread-2.0]) LIBS="$LIBS $MYAPP_LIBS" AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT Autotools appears to pass the correct options to gcc: -I/usr

Makefile.am - Manual target prerequisite + addprefix?

微笑、不失礼 提交于 2019-12-12 01:33:41
问题 I have a autotool project where part of the source code is downloaded dynamically from the net (because of IP rights preventing direct redistribution) and then built. I have a Makefile.am that works but I'm not happy about some of it's aspects. Here it is: INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) AM_CFLAGS = -fPIC -Wall ${SYMBOL_VISIBILITY} LIBVERSION=0:0:0 REFSRC_PATH=refsrc REFSRC_SRC=refsrc/dtx.c refsrc/globdefs.c refsrc/host.c refsrc/mathhalf.c refsrc/sp_enc.c

Does libtool strip all options with -M?

耗尽温柔 提交于 2019-12-11 17:13:09
问题 I'm trying to track down a failure to link with a mapfile on Solaris. The missing mapfile causes the following error when I try to run our self tests: $ ./cryptestcwd v ld.so.1: cryptestcwd: fatal: /export/home/cryptopp/.libs/libcryptopp.so.6: hardware capability (CA_SUNW_HW_1) unsupported: 0x4800000 [ AES SSE4.1 ] Killed I've gotten as far as this Automake rule. libcryptopp_la_LINK , which I believe is the shared object, is missing AM_LDFLAGS . AM_LDFLAGS holds the -M cryptopp.mapfile option

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

How to configure application which uses Autotools to build to external directory?

对着背影说爱祢 提交于 2019-12-11 15:05:49
问题 I've got application which uses Autotools (Autoconf, Automake etc) which builds object and binary files into project directory. It is not convenient, I'd like to have separate directory for them, e.g. "build" directory. I.e. I need "shadow build". Could anybody advise how this could be done? 回答1: The Autotools support out-of-source building by default, as described in the Automake manual. In a nutshell, you create a directory, anywhere, into which the build results should go. You make that

LDFLAGS usage in autotools with libtool

♀尐吖头ヾ 提交于 2019-12-11 11:49:20
问题 Depending on the OS, I define a special LDFLAGS in my configure.ac: AC_CANONICAL_HOST if test "$host_os" = cygwin then LDFLAGS="$LDFLAGS -Wl,-no-undefined" export LDFLAGS fi AC_SUBST([LDFLAGS]) The package uses AC_PROG_LIBTOOL and when LDFLAGS is passed to libtool, the -Wl prefix remains, and the linker doesn't understand the option. If I remove this prefix, the AC_PROG_CXX macro fails, because GCC chokes on -no-undefined by itself. What am I doing wrong? LDFLAGS is not mentioned the Makefile

How to configure the source file directory and install location using GNU Autotools

感情迁移 提交于 2019-12-11 08:26:24
问题 I want a project directory like this: app/ | src/ Makefile All of the .cpp and .hpp, .h files are in the src subdirectory. How can I configure Makefile.am or configure.ac to let the generated Makefile using the directory /src as the source directory? And how to let the generated executable into a specified directory like /usr/opt ? Another question is that If I want to make my program as a .so library, how to achieve my goal to make it install into /usr/lib or /usr/local/lib ? And how to make

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