summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/autogen/files/guile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/autogen/files/guile.patch')
-rw-r--r--meta/recipes-devtools/autogen/files/guile.patch183
1 files changed, 183 insertions, 0 deletions
diff --git a/meta/recipes-devtools/autogen/files/guile.patch b/meta/recipes-devtools/autogen/files/guile.patch
new file mode 100644
index 0000000000..8a77dba01e
--- /dev/null
+++ b/meta/recipes-devtools/autogen/files/guile.patch
@@ -0,0 +1,183 @@
1Disable the autoconf macros that use dpkg (!) and guile-config to determine what
2version and where guile is installed, and just use pkg-config directly (guile-config is a deprecated wrapper around pkg-config).
3
4 Signed-off-by: Ross Burton <ross.burton@intel.com>
5 Upstream-Status: Pending (should be submitted)
6
7diff --git a/config/ag_macros.m4 b/config/ag_macros.m4
8index 9914a65..b6db97a 100644
9--- a/config/ag_macros.m4
10+++ b/config/ag_macros.m4
11@@ -175,123 +175,12 @@ return 0;],
12
13
14 AC_DEFUN([AG_WITHLIB_GUILE],[
15- AC_ARG_WITH([libguile],
16- AS_HELP_STRING([--with-libguile], [libguile installation prefix]),
17- [ag_cv_with_libguile_root=${with_libguile}],
18- AC_CACHE_CHECK([whether with-libguile was specified], ag_cv_with_libguile_root,
19- ag_cv_with_libguile_root=no)
20- ) # end of AC_ARG_WITH libguile
21-
22- if test "${with_libguile+set}" = set && \
23- test "X${withval}" = Xno
24- then ## disabled by request
25- ag_cv_with_libguile_root=no
26- ag_cv_with_libguile_cflags=no
27- ag_cv_with_libguile_libs=no
28- else
29-
30- AC_ARG_WITH([libguile-cflags],
31- AS_HELP_STRING([--with-libguile-cflags], [libguile compile flags]),
32- [ag_cv_with_libguile_cflags=${with_libguile_cflags}],
33- AC_CACHE_CHECK([whether with-libguile-cflags was specified], ag_cv_with_libguile_cflags,
34- ag_cv_with_libguile_cflags=no)
35- ) # end of AC_ARG_WITH libguile-cflags
36-
37- AC_ARG_WITH([libguile-libs],
38- AS_HELP_STRING([--with-libguile-libs], [libguile link command arguments]),
39- [ag_cv_with_libguile_libs=${with_libguile_libs}],
40- AC_CACHE_CHECK([whether with-libguile-libs was specified], ag_cv_with_libguile_libs,
41- ag_cv_with_libguile_libs=no)
42- ) # end of AC_ARG_WITH libguile-libs
43-
44- case "X${ag_cv_with_libguile_cflags}" in
45- Xyes|Xno|X )
46- case "X${ag_cv_with_libguile_root}" in
47- Xyes|Xno|X ) ag_cv_with_libguile_cflags=no ;;
48- * ) ag_cv_with_libguile_cflags=-I${ag_cv_with_libguile_root}/include ;;
49- esac
50- esac
51- case "X${ag_cv_with_libguile_libs}" in
52- Xyes|Xno|X )
53- case "X${ag_cv_with_libguile_root}" in
54- Xyes|Xno|X ) ag_cv_with_libguile_libs=no ;;
55- * ) ag_cv_with_libguile_libs="-L${ag_cv_with_libguile_root}/lib -lguile";;
56- esac
57- esac
58- ag_save_CPPFLAGS="${CPPFLAGS}"
59- ag_save_LIBS="${LIBS}"
60- case "X${ag_cv_with_libguile_cflags}" in
61- Xyes|Xno|X )
62- f=`guile-config compile 2>/dev/null` || f=''
63- test -n "${f}" && ag_cv_with_libguile_cflags="${f}" && \
64- AC_MSG_NOTICE([guile-config used for CFLAGS: $f]) ;;
65- esac
66- case "X${ag_cv_with_libguile_libs}" in
67- Xyes|Xno|X )
68- f=`guile-config link 2>/dev/null` || f=''
69- test -n "${f}" && ag_cv_with_libguile_libs="${f}" && \
70- AC_MSG_NOTICE([guile-config used for LIBS: $f]) ;;
71- esac
72- case "X${ag_cv_with_libguile_cflags}" in
73- Xyes|Xno|X )
74- ag_cv_with_libguile_cflags="" ;;
75- * ) CPPFLAGS="${CPPFLAGS} ${ag_cv_with_libguile_cflags}" ;;
76- esac
77- case "X${ag_cv_with_libguile_libs}" in
78- Xyes|Xno|X )
79- LIBS="${LIBS} -lguile"
80- ag_cv_with_libguile_libs="-lguile" ;;
81- * )
82- LIBS="${LIBS} ${ag_cv_with_libguile_libs}" ;;
83- esac
84- LIBGUILE_CFLAGS=""
85- LIBGUILE_LIBS=""
86- AC_MSG_CHECKING([whether libguile can be linked with])
87- AC_CACHE_VAL([ag_cv_with_libguile],[
88- AC_LINK_IFELSE(
89- [AC_LANG_SOURCE([[@%:@include <libguile.h>
90-@%:@if ((SCM_MAJOR_VERSION * 100) + SCM_MINOR_VERSION) > 200
91-This has not been tested with Guile 2.1. Remove this line to proceed.
92-@%:@endif
93-int main () {
94- SCM fumble = SCM_UNDEFINED;
95- SCM bumble = SCM_UNDEFINED;
96- SCM stumble= SCM_UNDEFINED;
97- long lstumble;
98- stumble = scm_display( fumble, bumble );
99- lstumble = scm_ilength( fumble );
100- stumble = scm_c_eval_string( "stumble" );
101- scm_misc_error( "oops", "bad", bumble );
102- stumble = scm_num_eq_p( fumble, bumble );
103- scm_wrong_type_arg( "oops", 1, bumble );
104- return 0; }]])],
105- [ag_cv_with_libguile=yes],
106- [ag_cv_with_libguile=no]) # end of AC_LINK_IFELSE
107- ]) # end of AC_CACHE_VAL for ag_cv_with_libguile
108- fi ## disabled by request
109- AC_MSG_RESULT([${ag_cv_with_libguile}])
110- AC_SUBST([LIBGUILE_CFLAGS])
111- AC_SUBST([LIBGUILE_LIBS])
112- AC_SUBST([LIBGUILE_PATH])
113- if test "X${ag_cv_with_libguile}" != Xno
114- then[
115- LIBGUILE_CFLAGS="${ag_cv_with_libguile_cflags}"
116- LIBGUILE_LIBS="${ag_cv_with_libguile_libs}"
117- case "${LIBGUILE_LIBS}" in *-L* )
118- LIBGUILE_PATH=`echo ,${LIBGUILE_LIBS} | sed 's/.*[, ]-L[ ]*//;s/[ ].*//'`
119- ;; * ) LIBGUILE_PATH='' ;; esac]
120- CPPFLAGS="@S|@{ag_save_CPPFLAGS}"
121- LIBS="@S|@{ag_save_LIBS}"
122- else
123- CPPFLAGS="${ag_save_CPPFLAGS}"
124- LIBS="${ag_save_LIBS}"
125- LIBGUILE_CFLAGS=''
126- LIBGUILE_LIBS=''
127- LIBGUILE_PATH=''
128- AC_MSG_ERROR([Cannot find libguile. libguile is required. Perhaps you need to install guile-devel?])
129- fi
130+ PKG_PROG_PKG_CONFIG
131+ PKG_CHECK_MODULES(LIBGUILE, [guile-2.0])
132+ case "${LIBGUILE_LIBS}" in *-L* )
133+ LIBGUILE_PATH=`echo ,${LIBGUILE_LIBS} | sed 's/.*[, ]-L[ ]*//;s/[ ].*//'`
134+ ;; * ) LIBGUILE_PATH='' ;; esac
135 AC_SUBST([AG_GUILE])
136-
137 ]) # end of AC_DEFUN of AG_WITHLIB_GUILE
138
139
140@@ -311,40 +200,10 @@ AC_DEFUN([AG_WITHCONF_GUILE_VER],[
141
142
143 AC_DEFUN([AG_TEST_GUILE_VERSION],[
144- AC_MSG_CHECKING([whether the guile version])
145+ PKG_PROG_PKG_CONFIG
146+ AC_MSG_CHECKING([the guile version])
147 AC_CACHE_VAL([ag_cv_test_guile_version],[
148- ag_cv_test_guile_version=`exec 2> /dev/null
149-v=\`guile-config --version 2>&1\`
150-test -n "${v}" && {
151- echo "${v}" | sed 's/.*Guile version *//'
152- exit 0
153-}
154-v=\`guile --version\`
155-test -n "${v}" && {
156- echo "${v}" | sed 's/.*Guile *//;1q'
157- exit 0
158-}
159-v=\`rpm -q --list guile-devel 2>/dev/null | \\
160- grep '/version\\.h' | \\
161- head -1\`
162-test -n "${v}" && {
163- v=\`awk '/^#define SCM_M/{print $2 "=" $3}' $v\`
164- eval "$v"
165- test "X$SCM_MICRO_VERSION" = X || \\
166- SCM_MINOR_VERSION=$SCM_MINOR_VERSION.$SCM_MICRO_VERSION
167- echo "$SCM_MAJOR_VERSION.$SCM_MINOR_VERSION"
168- exit 0
169-}
170-v=\`dpkg --list 2>/dev/null | egrep 'guile-[0-9.]*-dev' | head -1\`
171-test -n "${v}" && {
172- echo "${v}" | sed 's/.*guile-//;s/-dev.*//'
173- exit 0
174-}
175-exit 1`
176- if test $? -ne 0 || test -z "$ag_cv_test_guile_version"
177- then ag_cv_test_guile_version=no
178- fi
179- ]) # end of CACHE_VAL of ag_cv_test_guile_version
180+ ag_cv_test_guile_version=`exec $PKG_CONFIG --modversion guile-2.0`])
181 AC_MSG_RESULT([${ag_cv_test_guile_version}])
182 if test "X${ag_cv_test_guile_version}" != Xno
183 then