File srilm-1.6.0-sanity.patch of Package srilm

Index: common/Makefile.machine.i686-gcc4
===================================================================
--- common/Makefile.machine.i686-gcc4.orig
+++ common/Makefile.machine.i686-gcc4
@@ -13,7 +13,7 @@
 #
 
    # Use the GNU C compiler.
-   GCC_FLAGS = -mtune=pentium3 -Wall -Wno-unused-variable -Wno-uninitialized
+   GCC_FLAGS = -Wall -Wno-unused-variable -Wno-uninitialized $(RPM_FLAGS)
    CC = $(GCC_PATH)gcc $(GCC_FLAGS) -Wimplicit-int
    CXX = $(GCC_PATH)g++ $(GCC_FLAGS) -DINSTANTIATE_TEMPLATES
 
@@ -50,7 +50,7 @@
 
    # Tcl support (standard in Linux)
    TCL_INCLUDE = 
-   TCL_LIBRARY = -ltcl
+   TCL_LIBRARY = -ltcl8.5
 
    # No ranlib
    RANLIB = :
Index: common/Makefile.machine.i686
===================================================================
--- common/Makefile.machine.i686.orig
+++ common/Makefile.machine.i686
@@ -13,7 +13,7 @@
 #
 
    # Use the GNU C compiler.
-   GCC_FLAGS = -m32 -mtune=pentium3 -Wall -Wno-unused-variable -Wno-uninitialized
+   GCC_FLAGS = -m32 -Wall -Wno-unused-variable -Wno-uninitialized $(RPM_FLAGS)
    CC = $(GCC_PATH)gcc $(GCC_FLAGS)
    CXX = $(GCC_PATH)g++ $(GCC_FLAGS) -DINSTANTIATE_TEMPLATES
 
@@ -26,8 +26,8 @@
    EXPORT_LDFLAGS = -s
 
    # Shared compilation flags.
-   CFLAGS = -D_FILE_OFFSET_BITS=64 $(ADDITIONAL_CFLAGS) $(INCLUDES)
-   CXXFLAGS = -D_FILE_OFFSET_BITS=64 $(ADDITIONAL_CXXFLAGS) $(INCLUDES)
+   CFLAGS = $(RPM_FLAGS)  $(ADDITIONAL_CFLAGS) $(INCLUDES)
+   CXXFLAGS = $(RPM_FLAGS)  $(ADDITIONAL_CXXFLAGS) $(INCLUDES)
 
    # Shared linking flags.
    LDFLAGS = $(ADDITIONAL_LDFLAGS) -L$(SRILM_LIBDIR)
@@ -50,7 +50,7 @@
 
    # Tcl support (standard in Linux)
    TCL_INCLUDE = 
-   TCL_LIBRARY = -ltcl
+   TCL_LIBRARY = -ltcl8.5
 
    # No ranlib
    RANLIB = :
Index: sbin/machine-type
===================================================================
--- sbin/machine-type.orig
+++ sbin/machine-type
@@ -67,8 +67,8 @@ if [ $# -gt 0 ]; then
 			;;
 		i686)	MACHINE_TYPE=i686
 			;;
-		x86_64) #MACHINE_TYPE=i686-m64
-			MACHINE_TYPE=i686
+		x86_64)
+				MACHINE_TYPE=i686-m64
 			;;
 		esac
 		;;
Index: common/Makefile.common.variables
===================================================================
--- common/Makefile.common.variables.orig
+++ common/Makefile.common.variables
@@ -67,10 +67,10 @@ AR_OUTPUT_OPTION = $@
 DEMANGLE_FILTER = 2>&1 | c++filt
 
 # Path to GNU awk; used in editing scripts 
-GAWK = /usr/local/bin/gawk
+GAWK = /usr/bin/gawk
 
 # Path to Perl; used in editing scripts 
-PERL = /usr/local/bin/perl
+PERL = /usr/bin/perl
 
 # Keep the source and object files in separate directories.
 OUTPUT_OPTION = -o $@
@@ -95,6 +95,8 @@ SYMBOL_PREFIX =
 # (for others override in Makefile.machine.*)
 PIC_FLAG = -fPIC
 
+RPM_FLAGS = $(CFLAGS)
+
 # Include machine-type dependent variables
 include $(SRILM)/common/Makefile.machine.$(MACHINE_TYPE)
 
Index: common/Makefile.machine.i686-m64
===================================================================
--- common/Makefile.machine.i686-m64.orig
+++ common/Makefile.machine.i686-m64
@@ -13,7 +13,7 @@
 #
 
    # Use the GNU C compiler.
-   GCC_FLAGS = -march=athlon64 -m64 -Wall -Wno-unused-variable -Wno-uninitialized
+   GCC_FLAGS = -m64 -Wall -Wno-unused-variable -Wno-uninitialized $(RPM_FLAGS)
    CC = $(GCC_PATH)gcc $(GCC_FLAGS) -Wimplicit-int
    CXX = $(GCC_PATH)g++ $(GCC_FLAGS) -DINSTANTIATE_TEMPLATES
 
@@ -50,8 +50,7 @@
 
    # Tcl support (standard in Linux)
    TCL_INCLUDE = 
-   TCL_LIBRARY =
-   NO_TCL = 1
+   TCL_LIBRARY = -ltcl8.5
 
    # No ranlib
    RANLIB = :