File: 0002-Read-TCL-compiler-linker-flags-from-tclConfig.sh-if-.patch

package info (click to toggle)
nbdkit 1.42.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,700 kB
  • sloc: ansic: 59,169; sh: 16,858; makefile: 6,452; python: 1,837; cpp: 1,116; perl: 502; ml: 498; tcl: 62
file content (29 lines) | stat: -rw-r--r-- 1,006 bytes parent folder | download
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
From: Hilko Bengen <bengen@debian.org>
Date: Tue, 4 Sep 2018 16:39:46 +0200
Subject: Read TCL compiler/linker flags from tclConfig.sh if pkg-config fails

---
 configure.ac | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index eafae94..e5d0f37 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1140,8 +1140,14 @@ AS_IF([test "x$enable_tcl" != "xno"],[
         AC_SUBST([TCL_CFLAGS])
         AC_SUBST([TCL_LIBS])
     ],[
-        AC_MSG_WARN([Tcl not found])
-        enable_tcl=no
+        AS_IF([test -x /usr/lib/tclConfig.sh],[
+            AC_MSG_NOTICE([Reading Tcl configuration from tclConfig.sh])
+            AC_SUBST([TCL_CFLAGS], [`. /usr/lib/tclConfig.sh; echo "$TCL_INCLUDE_SPEC"`])
+            AC_SUBST([TCL_LIBS], [`. /usr/lib/tclConfig.sh; echo "$TCL_LIB_SPEC"`])
+        ],[
+            AC_MSG_WARN([Tcl not found])
+            enable_tcl=no
+        ])
     ])
 ])
 AM_CONDITIONAL([HAVE_TCL],[test "x$enable_tcl" = "xyes"])