Gentoo Archives: gentoo-user

From: David Haller <gentoo@×××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] Anybody really understand the gnu autotools?
Date: Wed, 20 Jun 2012 04:59:31
Message-Id: 20120620013944.GA7193@grusum.endjinn.de
In Reply to: Re: [gentoo-user] [OT] Anybody really understand the gnu autotools? by Michael Orlitzky
1 Hello,
2
3 On Tue, 19 Jun 2012, Michael Orlitzky wrote:
4 >On 06/19/2012 04:40 PM, walt wrote:
5 >> I'm trying to build an xfce4 applet that's not in portage. For
6 >> reasons I don't understand there are some standard gnome headers
7 >> that don't get pulled in during the configure process, like orbit,
8 >> libbonobo and libbonoboui.
9 >>
10 >> I edited the autoconf.in to check for those standard libraries,
11 >> and it did partly work. The generated makefiles now have correct
12 >> entries like LIBBONOBO_CFLAGS.
13 >>
14 >> The problem is that those flags are never used during the compile
15 >> phase. So, anyone know how make that extra step happen?
16
17 Adjust Makefile.am / .in to actually use $(LIBBONOBO_CFLAGS) in those
18 rules (or all if unsure) where they are needed.
19
20 Have a look in the info documentation of automake/autoconf, esp. at
21 the samples.
22
23 >(no, nobody really understands autotools)
24
25 I do. It's just m4 generating shell-scripts (plus some other easily
26 understood bits) from templates. And all is quite well documented.
27
28 Next, you'll tell us cmake/qmake/smake/scons/bjam etc.pp. ad nauseam
29 are better understood and documented and what you have to do to adjust
30 stuff like above. Yeah sure.
31
32 I've been building stuff for 11+ years now, most for a 99'ish
33 platform. In and after say '05 until '10. Believe me, I had to adjust
34 stuff a lot. And autotools was _BY FAR_ always the easiest to do so,
35 almost always just set/export a variable for configure and
36 *tada*. Adjusting min-version of autoconf/-make to my "too old"
37 version and running autoreconf was occasionally needed.
38
39 Sure, if requirements for a lib weren't met, the stuff wouldn't build,
40 but not because of the autotools or their generated makefiles, but
41 just because the lib would not fit.
42
43 No such luck with the other build-systems. With some of above
44 mentioned "build-systems" you have to adjust _system_ files to get
45 them to DTRT. BTDT.
46
47 With the autotools, you could alternatively just use
48
49 CFLAGS += $(pkg-config --cflags libbonobo-2.0)
50 LDFLAGS += $(pkg-config --libs libbonobo-2.0)
51
52 in your Makefile or the corresponding CFLAGS="$CFLAGS $(...)" in an
53 ebuild or .spec or debian/rules or whatever. Piece of cake.
54
55 (and the same for -activation if needed).
56
57 -dnh
58
59 --
60 > Noooo.... Not "She offered her honor, he honored her offer"?
61 ...and so all evening he was honour and offer. -- known

Replies

Subject Author
[gentoo-user] Re: [OT] Anybody really understand the gnu autotools? walt <w41ter@×××××.com>