Gentoo Archives: gentoo-dev

From: Chris White <chriswhite@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Unofficial Gentoo Development Guide and Autotools
Date: Thu, 19 May 2005 17:53:18
Message-Id: 428CD2A8.5040508@gentoo.org
In Reply to: [gentoo-dev] Unofficial Gentoo Development Guide and Autotools by Ciaran McCreesh
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Ciaran McCreesh wrote:
5 > It came to my attention during a recent discussion on -core that a
6 > significant number of devs don't have a clue how autotools work and find
7 > any kind of patching that involves tinkering with configure.ac /
8 > Makefile.am level stuff to be very tricky. Clearly, this isn't good,
9 > because a significant number of upstream devs don't have a clue what
10 > they're doing either.
11 >
12 > I've added, improved and fixed a fair number of other things in other
13 > sections too (some of these thanks to content I've received from other
14 > devs and not-yet-devs), so if your favourite section had a big fat TODO
15 > on it last time you looked it may be worth checking again. And if it
16 > still has a big fat TODO, feel free to contribute :)
17
18 Another thing I'd mention too is that one can also check configure.ac to
19 check requirements for the package (use flags as well). I've seen one
20 too many pages where maintainers list a small number of deps, and after
21 reading the configure.ac file, find a ton more. Examples as follows:
22
23
24 AM_PATH_LIBFAME(0.8.10,
25 AC_DEFINE(HAVE_NEW_LIBFAME,1,[Define this if you have libfame
26 0.8.10 or above]))
27
28 This tells us that we need libfame >=0.8.10 . Therefore, in our deps
29 section, we know to have >=media-libs/libfame-0.8.10 . You can also
30 check for things that need other support enabled. For example:
31
32 AC_MSG_CHECKING(for vidix support)
33 if test x"$check_vidix" = "xyes" -a x"$ac_cv_prog_AWK" != "xno"; then
34 if test x"$no_x" != "xyes" -o x"$have_fb" = "xyes"; then
35 case "$host_or_hostalias" in
36 i?86-*-linux* | k?-*-linux* | athlon-*-linux*)
37 enable_vidix="yes"
38 enable_linux="yes"
39 ;;
40 i386-*-freebsd*)
41 enable_vidix="yes"
42 enable_dha_kmod="no"
43 ;;
44 *)
45 enable_dha_kmod="no"
46 enable_vidix="no"
47 ;;
48 esac
49 fi
50 fi
51
52 If you don't have x or framebuffer enabled, vidix doesn't work.
53 Sometimes, there's other ways that things are checked for besides
54 libraries. As shown here:
55
56 AC_CHECK_LIB(mng, mng_initialize,
57 [ AC_CHECK_HEADER(libmng.h,
58 [ have_libmng=yes
59 MNG_LIBS="-lmng" ],
60 AC_MSG_RESULT([*** All libmng dependent parts will be
61 disabled ***]))],
62 AC_MSG_RESULT([*** All libmng dependent parts will be disabled
63 ***]))
64 AM_CONDITIONAL(HAVE_LIBMNG, test x"$have_libmng" = "xyes")
65 AC_SUBST(MNG_LIBS)
66
67 The configure script will check for libmng.h and run off of that.
68 You're probably going to need to patch that.. because if the script's
69 lib checking functionality isn't lib64 friendly, you're gonna see a
70 whole world of chaos. So basically, check stuff like that out.
71 Sometimes however, you're going to get stuff that you can only check by
72 header. Most of the time it's kernel/system based. For example:
73
74 AC_MSG_CHECKING(for Sun audio support)
75 have_sunaudio=no
76 AC_TRY_COMPILE([
77 #include <sys/types.h>
78 #include <sys/audioio.h>
79 ],[
80 audio_info_t audio_info;
81 AUDIO_INITINFO(&audio_info);
82 ],[
83 have_sunaudio=yes
84 ])
85 AC_MSG_RESULT($have_sunaudio)
86 AM_CONDITIONAL(HAVE_SUNAUDIO, test x"$have_sunaudio" = "xyes")
87
88 Can only check for sun audio by testing kernel headers. There's no real
89 library. Looking out for stuff like this is a real big help to figuring
90 out what on earth your package needs.
91
92 Chris White
93 -----BEGIN PGP SIGNATURE-----
94 Version: GnuPG v1.4.0 (GNU/Linux)
95 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
96
97 iD8DBQFCjNKoFdQwWVoAgN4RArwWAKC2l9NppEReMPWEmqd6xpAPchTC9gCgiIYN
98 3ezPqSvy5vJBtM3Gaeu3ZUs=
99 =TKT3
100 -----END PGP SIGNATURE-----
101 --
102 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Unofficial Gentoo Development Guide and Autotools Mike Frysinger <vapier@g.o>