diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index bb21d7d38c31cc09f74bc1b1988d6a6cfc858a91..56f284d75c91fdddd61988fde0250d2bd0edb566 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.14 1997/03/26 06:53:57 scrappy Exp $
+#    $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.15 1997/04/02 18:10:32 scrappy Exp $
 #
 # NOTES
 #    Essentially all Postgres make files include this file and use the 
@@ -146,6 +146,11 @@ ENFORCE_ALIGNMENT= true
 # Comment out PROFILE to generate a profile version of the binaries
 #PROFILE= -p -non_shared
 
+# Define USE_LOCALE to get Postgres work (sort, search)
+# with national alphabet. Remember to define environment variables
+# $LC_COLLATE and $LC_CTYPE before starting postmaster !
+USE_LOCALE = 1
+
 # If you plan to use Kerberos for authentication...
 #
 # Comment out KRBVERS if you do not use Kerberos.
@@ -716,6 +721,11 @@ ifndef CASSERT
    CFLAGS+= -DNO_ASSERT_CHECKING
 endif
 
+ifdef USE_LOCALE
+ CFLAGS+= -DUSE_LOCALE
+endif
+
+
 ifdef PROFILE
    CFLAGS+= $(PROFILE)
    LDFLAGS+= $(PROFILE)
diff --git a/src/backend/bootstrap/Makefile b/src/backend/bootstrap/Makefile
index 6702bce1b615668427a37c889500116ff199bd4f..0c3567e7e205afe614b754e0abc7cdd9bcde6b1a 100644
--- a/src/backend/bootstrap/Makefile
+++ b/src/backend/bootstrap/Makefile
@@ -4,7 +4,7 @@
 #    Makefile for the bootstrap module
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.4 1996/11/14 07:33:20 bryanh Exp $
+#    $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.5 1997/04/02 18:10:46 scrappy Exp $
 #
 #
 # We must build bootparse.c and bootscanner.c with yacc and lex and sed,
@@ -27,13 +27,6 @@ INCLUDE_OPT= -I.. \
 
 CFLAGS+= $(INCLUDE_OPT) 
 
-ifeq ($(CC), gcc)
-# Until we figure out how to get rid of the warnings in this directory,
-# we must turn off any -Werror that is in CFLAGS now.  These options only
-# exist for the gcc compiler.
-CFLAGS+= -Wno-error
-endif
-
 BOOTYACCS= bootstrap_tokens.h bootparse.c
 
 OBJS= bootparse.o bootscanner.o bootstrap.o 
diff --git a/src/backend/main/main.c b/src/backend/main/main.c
index aa8d9836d55c68b79409b670ec0bae96d89fc5f1..2fa7a46242cfc395ac6c841ed0dd90e8c8978a46 100644
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -7,13 +7,16 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.3 1996/11/14 20:49:09 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.4 1997/04/02 18:11:08 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#ifdef USE_LOCALE  
+  #include <locale.h>
+#endif
 #include "postgres.h"
 #include "miscadmin.h"
 #include "bootstrap/bootstrap.h"	/* for BootstrapMain() */
@@ -31,6 +34,10 @@ int
 main(int argc, char *argv[])
 {
     int len;
+#ifdef USE_LOCALE
+    setlocale(LC_CTYPE,""); /* take locale information from an environment */
+    setlocale(LC_COLLATE,"");
+#endif
 #if defined(NOFIXADE) || defined(NOPRINTADE)
     /*
      * Must be first so that the bootstrap code calls it, too.
diff --git a/src/backend/optimizer/geqo/Makefile b/src/backend/optimizer/geqo/Makefile
index fac006c6db368c4eab858ea4d3620e75a687b480..217c6bcb8a0df300daad44157db33ccf94c89790 100644
--- a/src/backend/optimizer/geqo/Makefile
+++ b/src/backend/optimizer/geqo/Makefile
@@ -5,7 +5,7 @@
 #
 # Copyright (c) 1994, Regents of the University of California
 #
-# $Id: Makefile,v 1.3 1997/03/14 16:02:40 scrappy Exp $
+# $Id: Makefile,v 1.4 1997/04/02 18:11:49 scrappy Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -16,7 +16,7 @@ INCLUDE_OPT = -I../.. \
               -I../../port/$(PORTNAME) \
               -I../../../include
 
-CFLAGS+=$(INCLUDE_OPT) -Wno-error
+CFLAGS+=$(INCLUDE_OPT) 
 
 OBJS =	geqo_copy.o geqo_eval.o geqo_main.o geqo_misc.o \
 	geqo_params.o geqo_paths.o geqo_pool.o geqo_recombination.o \
diff --git a/src/backend/parser/Makefile b/src/backend/parser/Makefile
index 2c9d6616c7a7c7a1c4f29885eaa51ce64b16c134..cee2f1eebebde667666d17947ee05bb2a6231731 100644
--- a/src/backend/parser/Makefile
+++ b/src/backend/parser/Makefile
@@ -4,7 +4,7 @@
 #    Makefile for parser
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.4 1996/11/14 07:33:30 bryanh Exp $
+#    $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.5 1997/04/02 18:12:14 scrappy Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -17,13 +17,6 @@ INCLUDE_OPT= -I.. \
 
 CFLAGS+= $(INCLUDE_OPT)
 
-ifeq ($(CC), gcc)
-# Until we figure out how to get rid of the warnings in this directory,
-# we must turn off any -Werror that is in CFLAGS now.  These options only
-# exist for the gcc compiler.
-CFLAGS+= -Wno-error
-endif
-
 OBJS= analyze.o catalog_utils.o dbcommands.o gram.o \
       keywords.o parser.o parse_query.o scan.o scansup.o sysfunc.o
 
diff --git a/src/backend/postmaster/Makefile b/src/backend/postmaster/Makefile
index 7a771db8eb0efa4e3364318f9d6095a76cd1dbdc..115a403d3a422af0f2776f4671c12bbbf0ca0828 100644
--- a/src/backend/postmaster/Makefile
+++ b/src/backend/postmaster/Makefile
@@ -4,7 +4,7 @@
 #    Makefile for postmaster
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/backend/postmaster/Makefile,v 1.4 1996/12/28 02:12:04 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/backend/postmaster/Makefile,v 1.5 1997/04/02 18:12:39 scrappy Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -17,17 +17,6 @@ INCLUDE_OPT = -I.. \
 
 CFLAGS+=$(INCLUDE_OPT)
 
-ifeq ($(PORTNAME), sparc_solaris)
-
-ifeq ($(CC), gcc)
-# Until we figure out how to get rid of the warnings in this directory,
-# we must turn off any -Werror that is in CFLAGS now.  These options only
-# exist for the gcc compiler.
-CFLAGS+= -Wno-error
-endif
-
-endif
-
 OBJS = postmaster.o
 
 all: SUBSYS.o
diff --git a/src/backend/tcop/Makefile b/src/backend/tcop/Makefile
index a40e3e717e5950c54e6cc9bd16e22751d98ef48d..e0790234e100988e6839e6ba58880db09d1cf451 100644
--- a/src/backend/tcop/Makefile
+++ b/src/backend/tcop/Makefile
@@ -4,7 +4,7 @@
 #    Makefile for tcop
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.9 1997/03/25 02:35:22 scrappy Exp $
+#    $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.10 1997/04/02 18:13:01 scrappy Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -17,13 +17,6 @@ INCLUDE_OPT= -I.. \
 
 CFLAGS+= $(INCLUDE_OPT)
 
-ifeq ($(CC), gcc)
-# Until we figure out how to get rid of the warnings in this directory,
-# we must turn off any -Werror that is in CFLAGS now.  These options only
-# exist for the gcc compiler.
-CFLAGS+= -Wno-error
-endif
-
 OBJS= aclchk.o dest.o fastpath.o postgres.o pquery.o utility.o variable.o
 
 all: SUBSYS.o
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 88eec7a68308d5de96b2e80623ac5dcf2be61eb4..f4ab1a6f585c6b4da8ac7b1405b1e519f725965e 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.11 1997/03/14 23:21:12 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.12 1997/04/02 18:13:24 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -311,7 +311,11 @@ text_lt(struct varlena *arg1, struct varlena *arg2)
 	    len--;
 	}
     if (len)
+#ifdef USE_LOCALE
+        return (bool) (strcoll(a2p,a1p));
+#else
 	return (bool) (*a1p < *a2p);
+#endif
     else
 	return (bool) (arg1->vl_len < arg2->vl_len);
 }
@@ -342,7 +346,11 @@ text_le(struct varlena *arg1, struct varlena *arg2)
 	    len--;
 	}
     if (len)
+#ifdef USE_LOCALE
+        return (bool) (strcoll(a2p,a1p));
+#else
 	return (bool) (*a1p < *a2p);
+#endif
     else
 	return ((bool) VARSIZE(arg1) <= VARSIZE(arg2));
 }
diff --git a/src/interfaces/libpgtcl/Makefile b/src/interfaces/libpgtcl/Makefile
index 6780b71c694697511135bd84d19ea253fcc3f720..059072c9ffb0e774ff424c4d860e12c68c8d01d2 100644
--- a/src/interfaces/libpgtcl/Makefile
+++ b/src/interfaces/libpgtcl/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.11 1997/03/25 09:19:41 scrappy Exp $
+#    $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.12 1997/04/02 18:13:47 scrappy Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -25,11 +25,6 @@ ifdef KRBVERS
 CFLAGS+= $(KRBFLAGS)
 endif
 
-ifeq ($(CC), gcc)
-  CFLAGS+= -Wno-error
-endif
-
-
 shlib             := 
 install-shlib-dep :=