diff options
Diffstat (limited to 'meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch')
-rw-r--r-- | meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch b/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch new file mode 100644 index 0000000000..4eb61ff2ec --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch | |||
@@ -0,0 +1,89 @@ | |||
1 | From 56ef434e454bcc82c162a83d9bcb076d4fc72b7f Mon Sep 17 00:00:00 2001 | ||
2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
3 | Date: Thu, 9 Jan 2014 14:30:26 +0800 | ||
4 | Subject: [PATCH] Fix libtool detection | ||
5 | |||
6 | Upstream-Status: pending | ||
7 | |||
8 | Use LT_INIT instead of the deprecated AC_PROG_LIBTOOL to detect libtool, so it | ||
9 | can work with our libtoolize and libtool. | ||
10 | |||
11 | Simplify the detection of ltdl. It will find the ltdl from the sysroot; the | ||
12 | switch --with-system-libltdl is no longer needed. The code is copied from | ||
13 | pulseaudio configure.ac, together with the comment paragraph. | ||
14 | |||
15 | Also patch autogen.sh so it uses autoreconf, which handles libtoolize better. | ||
16 | |||
17 | Signed-off-by: Jesse Zhang <sen.zhang@windriver.com> | ||
18 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
19 | --- | ||
20 | autogen.sh | 5 +---- | ||
21 | configure.ac | 36 ++++++++++++++++++++++++++++++++++++ | ||
22 | 2 files changed, 37 insertions(+), 4 deletions(-) | ||
23 | |||
24 | diff --git a/autogen.sh b/autogen.sh | ||
25 | index 3418673..e42c3d5 100755 | ||
26 | --- a/autogen.sh | ||
27 | +++ b/autogen.sh | ||
28 | @@ -5,10 +5,7 @@ parentdir=`dirname $0` | ||
29 | cd $parentdir | ||
30 | parentdir=`pwd` | ||
31 | |||
32 | -libtoolize -f -c | ||
33 | -#aclocal | ||
34 | -autoheader | ||
35 | -autoconf | ||
36 | +autoreconf -Wcross --verbose --install --force | ||
37 | |||
38 | mysubdirs="$mysubdirs `find src/modules/ -name configure -print | sed 's%/configure%%'`" | ||
39 | mysubdirs=`echo $mysubdirs` | ||
40 | diff --git a/configure.ac b/configure.ac | ||
41 | index e73e4ad..066d3d7 100644 | ||
42 | --- a/configure.ac | ||
43 | +++ b/configure.ac | ||
44 | @@ -205,6 +205,42 @@ dnl # See if we have Git. | ||
45 | dnl # | ||
46 | AC_CHECK_PROG(GIT, git, yes, no) | ||
47 | |||
48 | +#### libtool stuff #### | ||
49 | + | ||
50 | +dnl set this shit so it doesn't force CFLAGS... | ||
51 | +LTCFLAGS=" " | ||
52 | + | ||
53 | +LT_PREREQ(2.2) | ||
54 | +LT_INIT([dlopen disable-static]) | ||
55 | + | ||
56 | +dnl Unfortunately, even up to libtool 2.2.6a there is no way to know | ||
57 | +dnl exactly which version of libltdl is present in the system, so we | ||
58 | +dnl just assume that it's a working version as long as we have the | ||
59 | +dnl library and the header files. | ||
60 | +dnl | ||
61 | +dnl As an extra safety device, check for lt_dladvise_init() which is | ||
62 | +dnl only implemented in libtool 2.x, and refine as we go if we have | ||
63 | +dnl refined requirements. | ||
64 | +dnl | ||
65 | +dnl Check the header files first since the system may have a | ||
66 | +dnl libltdl.so for runtime, but no headers, and we want to bail out as | ||
67 | +dnl soon as possible. | ||
68 | +dnl | ||
69 | +dnl We don't need any special variable for this though, since the user | ||
70 | +dnl can give the proper place to find libltdl through the standard | ||
71 | +dnl variables like LDFLAGS and CPPFLAGS. | ||
72 | + | ||
73 | +AC_CHECK_HEADER([ltdl.h], | ||
74 | + [AC_CHECK_LIB([ltdl], [lt_dladvise_init], [LIBLTDL=-lltdl], [LIBLTDL=])], | ||
75 | + [LIBLTDL=]) | ||
76 | + | ||
77 | +AS_IF([test "x$LIBLTDL" = "x"], | ||
78 | + [AC_MSG_ERROR([Unable to find libltdl version 2. Makes sure you have libtool 2.2 or later installed.])]) | ||
79 | +AC_SUBST([LIBLTDL]) | ||
80 | +LTDL_SUBDIRS= | ||
81 | +INCLTDL=-DWITH_SYSTEM_LTDL | ||
82 | +AC_SUBST(LTDL_SUBDIRS) | ||
83 | + | ||
84 | dnl Put this in later, when all distributed modules use autoconf. | ||
85 | dnl AC_ARG_WITH(disablemodulefoo, | ||
86 | dnl [ --without-rlm_foo Disables module compilation. Module list:] | ||
87 | -- | ||
88 | 1.8.3 | ||
89 | |||