1 |
vapier 15/06/03 04:06:08 |
2 |
|
3 |
Modified: autotools.eclass |
4 |
Log: |
5 |
set the default m4 system dir to the SYSROOT when it is available |
6 |
|
7 |
Revision Changes Path |
8 |
1.176 eclass/autotools.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools.eclass?rev=1.176&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools.eclass?rev=1.176&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools.eclass?r1=1.175&r2=1.176 |
13 |
|
14 |
Index: autotools.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v |
17 |
retrieving revision 1.175 |
18 |
retrieving revision 1.176 |
19 |
diff -u -r1.175 -r1.176 |
20 |
--- autotools.eclass 20 May 2015 05:57:38 -0000 1.175 |
21 |
+++ autotools.eclass 3 Jun 2015 04:06:08 -0000 1.176 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2015 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.175 2015/05/20 05:57:38 vapier Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.176 2015/06/03 04:06:08 vapier Exp $ |
27 |
|
28 |
# @ECLASS: autotools.eclass |
29 |
# @MAINTAINER: |
30 |
@@ -591,6 +591,17 @@ |
31 |
echo ${include_opts} |
32 |
} |
33 |
autotools_m4dir_include() { _autotools_m4dir_include ${AT_M4DIR} ; } |
34 |
-autotools_m4sysdir_include() { _autotools_m4dir_include $(eval echo ${AT_SYS_M4DIR}) ; } |
35 |
+autotools_m4sysdir_include() { |
36 |
+ # First try to use the paths the system integrator has set up. |
37 |
+ local paths=( $(eval echo ${AT_SYS_M4DIR}) ) |
38 |
+ |
39 |
+ if [[ ${#paths[@]} -eq 0 && -n ${SYSROOT} ]] ; then |
40 |
+ # If they didn't give us anything, then default to the SYSROOT. |
41 |
+ # This helps when cross-compiling. |
42 |
+ local path="${SYSROOT}/usr/share/aclocal" |
43 |
+ [[ -d ${path} ]] && paths+=( "${path}" ) |
44 |
+ fi |
45 |
+ _autotools_m4dir_include "${paths[@]}" |
46 |
+} |
47 |
|
48 |
fi |