#!/bin/sh -e
## compiler_defaults.dpatch by Eduard Bloch <blade@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"

case "$1" in
       -patch) patch $patch_opts -p1 < $0;;
       -unpatch) patch $patch_opts -p1 -R < $0;;
        *)
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
                exit 1;;
esac

exit 0

@DPATCH@
diff -urNad /home/inet/cvs/icewm-1.2/src/Makefile.in icewm-1.2/src/Makefile.in
--- /home/inet/cvs/icewm-1.2/src/Makefile.in	2004-04-27 23:58:46.000000000 +0200
+++ icewm-1.2/src/Makefile.in	2004-04-27 23:59:55.000000000 +0200
@@ -10,8 +10,11 @@
 
 ################################################################################
 
-CXX =           @CXX@
-LD =            @CXX_LINK@
+# C++ code should be compiled with g++ but linked with gcc and -lsupc++
+# to avoid libstdc++ dependency
+#
+CXX =           g++
+LD =            gcc
 EXEEXT =        @EXEEXT@
 
 DEBUG =         @DEBUG@
@@ -36,7 +39,7 @@
 CXXFLAGS =      @CXXFLAGS@ $(DEBUG) $(DEFS) \
 	        @CORE_CFLAGS@ @IMAGE_CFLAGS@ @AUDIO_CFLAGS@ # `fc-config --cflags`
 LFLAGS =	@LDFLAGS@
-LIBS =          @LIBS@
+LIBS =        -lsupc++  @LIBS@
 
 CORE_LIBS =     @CORE_LIBS@ # `fc-config --libs`
 IMAGE_LIBS =    @IMAGE_LIBS@
