summaryrefslogtreecommitdiff
blob: 763515533c2607433c413f0eb064ba2bc0a9f21d (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
From 56cde58238898e5659c39f5e713ee0362ba772d9 Mon Sep 17 00:00:00 2001
From: Nick Schermer <nick@xfce.org>
Date: Thu, 03 Nov 2011 18:27:32 +0000
Subject: Add support for LT_PREREQ (bug #6920).

Support LT_PREREQ as the new alternative of AC_PROG_LIBTOOL. If
the latter is used, show a message with information how to switch
to LT_PREREQ.
---
diff --git a/scripts/xdt-autogen.in.in b/scripts/xdt-autogen.in.in
index a7dbd3f..0ba203f 100644
--- a/scripts/xdt-autogen.in.in
+++ b/scripts/xdt-autogen.in.in
@@ -415,7 +415,25 @@ if test -z "${XDT_PROG_LIBTOOLIZE}"; then
   fi
 fi
 for configure_ac_file in $CONFIGURE_AC_FILES; do
+  runlibtoolize=0
   if grep -q "^AC_PROG_LIBTOOL" "${configure_ac_file}"; then
+  cat >&2 <<EOF
+xdt-autogen: It is recommended to use LT_PREREQ([2.2.6]) and
+             LT_INIT([disable-static]) in your configure.ac
+             file and remove AC_PROG_LIBTOOL and AC_DISABLE_STATIC.
+
+             See http://bugzilla.xfce.org/show_bug.cgi?id=6920 for
+             more information.
+
+EOF
+    runlibtoolize=1
+  fi;
+
+  if grep -q "^LT_PREREQ" "${configure_ac_file}"; then
+    runlibtoolize=1
+  fi;
+
+  if test $runlibtoolize -eq 1; then
     (${XDT_PROG_LIBTOOLIZE} --version) </dev/null >/dev/null 2>&0 || {
       cat >&2 <<EOF
 xdt-autogen: You must have "libtool" installed on your system.
@@ -608,7 +626,7 @@ XGETTEXT_ARGS = @XGETTEXT_ARGS@
     fi
   fi
 
-  if grep -q "^AC_PROG_LIBTOOL" "${configure_ac_file}"; then
+  if grep -q -e "^AC_PROG_LIBTOOL" -e "^LT_PREREQ" "${configure_ac_file}"; then
     (echo "Running ${XDT_PROG_LIBTOOLIZE} --force --copy..." &&
      cd "${source_dir}" &&
      ${XDT_PROG_LIBTOOLIZE} --force --copy) || exit 1
--
cgit