autoconf

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

Autoconf — including a static library (newbie)

回眸只為那壹抹淺笑 提交于 2019-12-04 10:15:23
问题 I am trying to migrate my application from manual build to autoconf, which is working very nicely so far. But I have one static library that I can't figure out how to integrate. That library will NOT be located in the usual library locations - the location of the binary (.a file) and header (.h file) will be given as a configure argument. (Notably, even if I move the .a file to /usr/lib or anywhere else I can think of, it still won't work.) It is also not named traditionally (it does not

Check framework example giving me error when running './configure'

孤街浪徒 提交于 2019-12-04 09:15:43
I'm building the check framework example 'check_money', but it's not building on my machine. The error is: configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.." I've tried installing it using: libtoolize --force aclocal autoheader automake --force-missing --add-missing autoconf ./configure It's still giving me the same error. So, I copied the same directory to another directory and ran: autoreconf --install ./configure And it's still giving me the same error. I don't know what else to try. I'm on Mac OS X Mavericks (10.9) Autoconf 2.69 Automake 1.15 Libtool 2

autoconf/automake: conditional compilation based on presence of library?

狂风中的少年 提交于 2019-12-04 08:26:38
问题 I need to conditionally compile some code based on the presence of a library. Seems like this should be easy with autoconf/automake but I can't figure it out. For example, if there is a PNG library present, I want to include code to use it. My configure.ac has: AC_CHECK_LIB([png], [png_create_write_struct_2]) and my Makefile.am has: if USE_LIBPNG libdev_la_SOURCES += png.c endif (which adds png.c to the list of sources for libdev so it gets compiled). An automake conditional like USE_LIBPNG

how to set include paths with autotools

爷,独闯天下 提交于 2019-12-04 07:59:57
问题 I'm working on a C++ project that uses autoconf & automake , and I'm struggling to correctly set up the include paths in *CPPFLAGS . I've read about 3 hours worth of documents, and I can't figure it out yet. I'm not looking for a hack, but for the correct way to do this. Here is my conundrum. As I see it, there are 3 completely different sources for include paths: External libraries that must be installed along with my package, which are configured by configure --with-XXX=<PATH> . Within my

Alternatives to Autoconf and Autotools? [closed]

a 夏天 提交于 2019-12-04 07:27:42
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm a very frequent user of the GNU Autotools (mostly Autoconf, occasionally Libtool). I'm working on a project where portability is

Why does autoconf erroneously find a function which isn't available later?

人走茶凉 提交于 2019-12-04 06:06:55
问题 On a Linux system I configured a software package (llvm) and autoconf finds the arc4random function. Here an extraction of the output during configuration: checking for strerror... yes checking for strerror_r... yes checking for setenv... yes checking for arc4random... yes checking for strtoll... yes checking for strtoq... yes checking for sysconf... yes Configuring goes fine. Later, when building the package I get an error about an undeclared specifier arc4random : [removed]/lib/Support/Unix

How to disable C compiler in C++ Autotools project

时光毁灭记忆、已成空白 提交于 2019-12-04 05:53:13
问题 I'm in the early stages of adding Autotools support to a C++ library. At this point I'm running autoreconf with the following configuration. $ cat Makefile.am AUTOMAKE_OPTIONS = foreign bin_PROGRAMS=cryptest $ cat configure.ac AC_INIT(Crypto++, 6.0, http://www.cryptopp.com/wiki/Bug_Report) AM_INIT_AUTOMAKE AC_PROG_CXX AC_CONFIG_FILES([Makefile]) It is producing: $ autoreconf --install --force /usr/share/automake-1.15/am/depend2.am: error: am__fastdepCC does not appear in AM_CONDITIONAL /usr

Autotools cross compilation and generated sources

三世轮回 提交于 2019-12-04 04:48:49
问题 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

Autoconf subdirectories with subpackages depending on each other?

主宰稳场 提交于 2019-12-04 04:38:05
I've got a large project on my hand (master) that is split into several components (liba, b, c, d) to ease building and maintenance. When building the whole package, all of the subcomponents must be built in sequence, and some of these packages depend upon each other. In more explicit terms, liba is a prerequisite for b, c and d, and the presence of liba is checked by the configure script. This check is definitely necessary to give user-friendly error messages when building the b distribution on its own. However, when building the master package and all its subpackages, liba is built as a