From: Ole Streicher <olebole@debian.org>
Date: Fri, 10 Jan 2025 13:25:24 +0100
Subject: Use  as linker in c++ libraries

This is a minimal, Debian specific patch and not portable f.e. to Mac
and other systems.

Closes: #1092642
---
 ds9/tclconfig/tcl.m4       | 4 ++--
 fitsy/tclconfig/tcl.m4     | 4 ++--
 tclconfig/tcl.m4           | 4 ++--
 tclfitsy/tclconfig/tcl.m4  | 4 ++--
 tclxmlrpc/tclconfig/tcl.m4 | 4 ++--
 tksao/tclconfig/tcl.m4     | 2 +-
 vector/tclconfig/tcl.m4    | 4 ++--
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/ds9/tclconfig/tcl.m4 b/ds9/tclconfig/tcl.m4
index abfd43a..3e29a64 100644
--- a/ds9/tclconfig/tcl.m4
+++ b/ds9/tclconfig/tcl.m4
@@ -1512,7 +1512,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
 	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
 
 	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
+	    SHLIB_LD='${CXX} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
 
 	    case $system in
@@ -4069,4 +4069,4 @@ AC_DEFUN([TEA_ZIPFS_SUPPORT], [
 
 # Local Variables:
 # mode: autoconf
-# End:
\ No newline at end of file
+# End:
diff --git a/fitsy/tclconfig/tcl.m4 b/fitsy/tclconfig/tcl.m4
index abfd43a..3e29a64 100644
--- a/fitsy/tclconfig/tcl.m4
+++ b/fitsy/tclconfig/tcl.m4
@@ -1512,7 +1512,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
 	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
 
 	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
+	    SHLIB_LD='${CXX} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
 
 	    case $system in
@@ -4069,4 +4069,4 @@ AC_DEFUN([TEA_ZIPFS_SUPPORT], [
 
 # Local Variables:
 # mode: autoconf
-# End:
\ No newline at end of file
+# End:
diff --git a/tclconfig/tcl.m4 b/tclconfig/tcl.m4
index abfd43a..3e29a64 100644
--- a/tclconfig/tcl.m4
+++ b/tclconfig/tcl.m4
@@ -1512,7 +1512,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
 	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
 
 	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
+	    SHLIB_LD='${CXX} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
 
 	    case $system in
@@ -4069,4 +4069,4 @@ AC_DEFUN([TEA_ZIPFS_SUPPORT], [
 
 # Local Variables:
 # mode: autoconf
-# End:
\ No newline at end of file
+# End:
diff --git a/tclfitsy/tclconfig/tcl.m4 b/tclfitsy/tclconfig/tcl.m4
index abfd43a..3e29a64 100644
--- a/tclfitsy/tclconfig/tcl.m4
+++ b/tclfitsy/tclconfig/tcl.m4
@@ -1512,7 +1512,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
 	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
 
 	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
+	    SHLIB_LD='${CXX} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
 
 	    case $system in
@@ -4069,4 +4069,4 @@ AC_DEFUN([TEA_ZIPFS_SUPPORT], [
 
 # Local Variables:
 # mode: autoconf
-# End:
\ No newline at end of file
+# End:
diff --git a/tclxmlrpc/tclconfig/tcl.m4 b/tclxmlrpc/tclconfig/tcl.m4
index abfd43a..3e29a64 100644
--- a/tclxmlrpc/tclconfig/tcl.m4
+++ b/tclxmlrpc/tclconfig/tcl.m4
@@ -1512,7 +1512,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
 	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
 
 	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
+	    SHLIB_LD='${CXX} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
 
 	    case $system in
@@ -4069,4 +4069,4 @@ AC_DEFUN([TEA_ZIPFS_SUPPORT], [
 
 # Local Variables:
 # mode: autoconf
-# End:
\ No newline at end of file
+# End:
diff --git a/tksao/tclconfig/tcl.m4 b/tksao/tclconfig/tcl.m4
index 7842ff3..74db82c 100644
--- a/tksao/tclconfig/tcl.m4
+++ b/tksao/tclconfig/tcl.m4
@@ -1512,7 +1512,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
 	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
 
 	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
+	    SHLIB_LD='${CXX} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
 
 	    case $system in
diff --git a/vector/tclconfig/tcl.m4 b/vector/tclconfig/tcl.m4
index abfd43a..3e29a64 100644
--- a/vector/tclconfig/tcl.m4
+++ b/vector/tclconfig/tcl.m4
@@ -1512,7 +1512,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
 	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
 
 	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
-	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
+	    SHLIB_LD='${CXX} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
 
 	    case $system in
@@ -4069,4 +4069,4 @@ AC_DEFUN([TEA_ZIPFS_SUPPORT], [
 
 # Local Variables:
 # mode: autoconf
-# End:
\ No newline at end of file
+# End:
