blob: 392d81ceabec9269c7a5ceb3246eb5d77e62657a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
--- libtool-1.5.10/libtool.m4.orig 2004-12-11 13:28:30.494718288 -0500
+++ libtool-1.5.10/libtool.m4 2004-12-11 13:31:51.452168112 -0500
@@ -227,6 +227,14 @@
[pic_mode=default])
test -z "$pic_mode" && pic_mode=default
+# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
+#
+# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
+# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
+# calls AC_LIBTOOL_CONFIG and creates libtool.
+#
+_LT_VERSION_CHECK
+
# Use C for the default configuration in the libtool script
tagname=
AC_LIBTOOL_LANG_C_CONFIG
@@ -234,6 +242,41 @@
])# AC_LIBTOOL_SETUP
+# _LT_VERSION_CHECK
+# -----------------
+AC_DEFUN([_LT_VERSION_CHECK],
+[AC_MSG_CHECKING([for correct ltmain.sh version])
+if test -z "$ltmain"; then
+ AC_MSG_RESULT(no)
+ echo
+ echo "*** [Gentoo] sanity check failed! ***"
+ echo "*** \$ltmain is not defined, please check the patch for consistency! ***"
+ echo
+ exit 1
+fi
+gentoo_lt_version="@_LT_VERSION@"
+gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 's|^[[:space:]]*VERSION=||'`
+if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then
+ AC_MSG_RESULT(no)
+ echo
+ echo "*** [Gentoo] sanity check failed! ***"
+ echo "*** libtool.m4 and ltmain.sh have a version mismatch! ***"
+ echo "*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***"
+ echo
+ echo "Please run:"
+ echo
+ echo " libtoolize --copy --force"
+ echo
+ echo "if appropriate, please contact the maintainer of this"
+ echo "package (or your distribution) for help."
+ echo
+ exit 1
+else
+ AC_MSG_RESULT(yes)
+fi
+])# _LT_VERSION_CHECK
+
+
# _LT_AC_SYS_COMPILER
# -------------------
AC_DEFUN([_LT_AC_SYS_COMPILER],
|