Index: /gsdl/trunk/configure
===================================================================
--- /gsdl/trunk/configure	(revision 15550)
+++ /gsdl/trunk/configure	(revision 15551)
@@ -311,5 +311,5 @@
 
 ac_subdirs_all="$ac_subdirs_all packages indexers"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PACKAGE VERSION USE_FASTCGI USE_LANGACTION USE_CORBA MICO_DIR USE_Z3950 USE_YAZ ENABLE_ACCENTFOLD CFLAGS CC LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX AWK YACC build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB MICO_VER CPP EGREP U ANSI2KNR ALLOCA LIBOBJS STATIC GDBM_LIBPATH GDBM_INCLUDE gsdlos MODULEDIRS subdirs LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PACKAGE VERSION USE_FASTCGI USE_LANGACTION USE_CORBA MICO_DIR USE_Z3950 USE_YAZ ENABLE_ACCENTFOLD LDFLAGS CFLAGS CC CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX AWK YACC build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB COMPAT32BITFLAGS MICO_VER CPP EGREP U ANSI2KNR ALLOCA LIBOBJS STATIC GDBM_LIBPATH GDBM_INCLUDE gsdlos MODULEDIRS subdirs LTLIBOBJS'
 ac_subst_files=''
 
@@ -1427,7 +1427,9 @@
 
 LDFLAGS=$LDFLAGS
+
 if test -z "$CFLAGS"; then
 CFLAGS=-O2
 fi
+
 
 
@@ -3103,4 +3105,28 @@
   RANLIB="$ac_cv_prog_RANLIB"
 fi
+
+
+echo "$as_me:$LINENO: checking to see if architecture is 64-bit" >&5
+echo $ECHO_N "checking to see if architecture is 64-bit... $ECHO_C" >&6
+arch_64bit=no
+case "$host_cpu" in
+x86_64) arch_64bit=yes ;;
+esac
+
+if test "$arch_64bit" = yes; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  if test -z "$COMPAT32BITFLAGS" ; then
+    COMPAT32BITFLAGS="-m32"
+  fi
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  if test -z "$COMPAT32BITFLAGS" ; then
+    COMPAT32BITFLAGS=
+  fi
+fi
+export COMPAT32BITFLAGS
+
 
 
@@ -8040,7 +8066,7 @@
 s,@USE_YAZ@,$USE_YAZ,;t t
 s,@ENABLE_ACCENTFOLD@,$ENABLE_ACCENTFOLD,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
 s,@CFLAGS@,$CFLAGS,;t t
 s,@CC@,$CC,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
 s,@CPPFLAGS@,$CPPFLAGS,;t t
 s,@ac_ct_CC@,$ac_ct_CC,;t t
@@ -8071,4 +8097,5 @@
 s,@RANLIB@,$RANLIB,;t t
 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@COMPAT32BITFLAGS@,$COMPAT32BITFLAGS,;t t
 s,@MICO_VER@,$MICO_VER,;t t
 s,@CPP@,$CPP,;t t
Index: /gsdl/trunk/configure.in
===================================================================
--- /gsdl/trunk/configure.in	(revision 15550)
+++ /gsdl/trunk/configure.in	(revision 15551)
@@ -73,4 +73,5 @@
 dnl Checks for programs.
 LDFLAGS=$LDFLAGS
+AC_SUBST(LDFLAGS)
 dnl only set CFLAGS if not already set in environment
 if test -z "$CFLAGS"; then
@@ -78,4 +79,5 @@
 fi
 AC_SUBST(CFLAGS)
+
 
 AC_PROG_CC
@@ -92,4 +94,25 @@
 AC_PROG_MAKE_SET
 AC_PROG_RANLIB
+
+AC_MSG_CHECKING(to see if architecture is 64-bit)
+arch_64bit=no
+case "$host_cpu" in
+x86_64) arch_64bit=yes ;;
+esac
+
+if test "$arch_64bit" = yes; then
+  AC_MSG_RESULT(yes)
+  if test -z "$COMPAT32BITFLAGS" ; then
+    COMPAT32BITFLAGS="-m32"
+  fi
+else
+  AC_MSG_RESULT(no)
+  if test -z "$COMPAT32BITFLAGS" ; then
+    COMPAT32BITFLAGS=
+  fi
+fi
+export COMPAT32BITFLAGS
+AC_SUBST(COMPAT32BITFLAGS)
+
 
 #moved CORBA MICO directory test to get version of MICO
Index: /gsdl/trunk/packages/configure
===================================================================
--- /gsdl/trunk/packages/configure	(revision 15550)
+++ /gsdl/trunk/packages/configure	(revision 15551)
@@ -220,5 +220,5 @@
 gzip -dc expat-1.95.8.tar.gz | tar -xf -
 cd "$PACKAGES/expat/expat-1.95.8" && \
-./configure $CACHE_FILE --disable-shared --with-pic --prefix=$PACKAGES/expat --bindir="$bindir" $HOSTTARGETFLAGS $ENVIRONMENT
+CFLAGS="$CFLAGS $COMPAT32BITFLAGS" CXXFLAGS="$CXXFLAGS $COMPAT32BITFLAGS" LDFLAGS="$LDFLAGS $COMPAT32BITFLAGS" ./configure $CACHE_FILE --disable-shared --with-pic --prefix=$PACKAGES/expat --bindir="$bindir" $HOSTTARGETFLAGS $ENVIRONMENT
 
 # configure XML::Parser perl module
Index: /gsdl/trunk/src/colservr/Makefile.in
===================================================================
--- /gsdl/trunk/src/colservr/Makefile.in	(revision 15550)
+++ /gsdl/trunk/src/colservr/Makefile.in	(revision 15551)
@@ -32,7 +32,7 @@
 AR = ar
 CC = @CC@
-CPP = @CXX@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CXXFLAGS@
+CXX = @CXX@
+CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@
+CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
 DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER
 # Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist!
@@ -45,5 +45,5 @@
 
 COMPILE = $(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES)
-CPPCOMPILE = $(CPP) -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
+CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
 
 
@@ -55,5 +55,5 @@
 .SUFFIXES: .cpp .o
 .cpp.o:
-	$(CPPCOMPILE) $< 
+	$(CXXCOMPILE) $< 
 
 
@@ -133,3 +133,3 @@
 
 depend:
-	makedepend -Y -- $(DEFS) $(INCLUDES) $(CPPFLAGS) -- $(SOURCES)
+	makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Index: /gsdl/trunk/src/gdbmedit/db2txt/Makefile.in
===================================================================
--- /gsdl/trunk/src/gdbmedit/db2txt/Makefile.in	(revision 15550)
+++ /gsdl/trunk/src/gdbmedit/db2txt/Makefile.in	(revision 15551)
@@ -30,10 +30,11 @@
 AR = ar
 CC = @CC@
-CPP = @CXX@
-CCFLAGS = -Wall @CFLAGS@ 
+CXX = @CXX@
+CFLAGS = -Wall @CFLAGS@ @COMPAT32BITFLAGS@
+CXXFLAGS= -Wall @CXXFLAGS@ @COMPAT32BITFLAGS@
 DEFS = @DEFS@
 RANLIB = @RANLIB@
 INCLUDES = -I../../../lib @GDBM_INCLUDE@
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
 DPLIBS = 
 LIBS = @GDBM_LIBPATH@ -lgdbm @LIBS@
@@ -41,8 +42,8 @@
 INSTALL = @INSTALL@
  
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CCFLAGS)
-CPPCOMPILE = $(CPP) -c $(DEFS) $(INCLUDES) $(CCFLAGS)
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
+CXXCOMPILE = $(CXX) -c $(DEFS) $(INCLUDES) $(CXXFLAGS)
 LINK = $(CC) $(LDFLAGS) -o $@
-CPPLINK = $(CPP) $(LDFLAGS) -o $@
+CXXLINK = $(CXX) $(LDFLAGS) -o $@
  
 .SUFFIXES:
@@ -53,5 +54,5 @@
 .SUFFIXES: .cpp .o
 .cpp.o:
-	$(CPPCOMPILE) $< 
+	$(CXXCOMPILE) $< 
  
 
@@ -77,5 +78,5 @@
 
 depend:
-	makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
+	makedepend -Y -- $(DEFS) $(INCLUDES) $(CFLAGS) -- $(SOURCES)
 
 
@@ -85,3 +86,3 @@
 
 db2txt: $(DB2TXT_OBJS) $(DPLIBS)
-	$(CPPLINK) $(DB2TXT_OBJS) $(LIBS) 
+	$(CXXLINK) $(DB2TXT_OBJS) $(LIBS) 
Index: /gsdl/trunk/src/gdbmedit/gdbmget/Makefile.in
===================================================================
--- /gsdl/trunk/src/gdbmedit/gdbmget/Makefile.in	(revision 15550)
+++ /gsdl/trunk/src/gdbmedit/gdbmget/Makefile.in	(revision 15551)
@@ -30,10 +30,11 @@
 AR = ar
 CC = @CC@
-CPP = @CXX@
-CCFLAGS = -Wall @CFLAGS@ 
+CXX = @CXX@
+CFLAGS = -Wall @CFLAGS@ @COMPAT32BITFLAGS@
+CXXFLAGS = -Wall @CXXFLAGS@ @COMPAT32BITFLAGS@
 DEFS = @DEFS@
 RANLIB = @RANLIB@
 INCLUDES = -I../../lib @GDBM_INCLUDE@
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
 DPLIBS = 
 LIBS = @GDBM_LIBPATH@ -lgdbm @LIBS@
@@ -41,8 +42,8 @@
 INSTALL = @INSTALL@
  
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CCFLAGS)
-CPPCOMPILE = $(CPP) -c $(DEFS) $(INCLUDES) $(CCFLAGS)
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
+CXXCOMPILE = $(CXX) -c $(DEFS) $(INCLUDES) $(CXXFLAGS)
 LINK = $(CC) $(LDFLAGS) -o $@
-CPPLINK = $(CPP) $(LDFLAGS) -o $@
+CXXLINK = $(CXX) $(LDFLAGS) -o $@
  
 .SUFFIXES:
@@ -53,5 +54,5 @@
 .SUFFIXES: .cpp .o
 .cpp.o:
-	$(CPPCOMPILE) $< 
+	$(CXXCOMPILE) $< 
  
 
@@ -77,5 +78,5 @@
 
 depend:
-	makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
+	makedepend -Y -- $(DEFS) $(INCLUDES) $(CFLAGS) -- $(SOURCES)
 
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Index: /gsdl/trunk/src/gdbmedit/gdbmset/Makefile.in
===================================================================
--- /gsdl/trunk/src/gdbmedit/gdbmset/Makefile.in	(revision 15550)
+++ /gsdl/trunk/src/gdbmedit/gdbmset/Makefile.in	(revision 15551)
@@ -30,10 +30,11 @@
 AR = ar
 CC = @CC@
-CPP = @CXX@
-CCFLAGS = -Wall @CFLAGS@ 
+CXX = @CXX@
+CFLAGS = -Wall @CFLAGS@ @COMPAT32BITFLAGS@
+CXXFLAGS = -Wall @CXXFLAGS@ @COMPAT32BITFLAGS@
 DEFS = @DEFS@
 RANLIB = @RANLIB@
 INCLUDES = -I../../lib @GDBM_INCLUDE@
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
 DPLIBS = 
 LIBS = @GDBM_LIBPATH@ -lgdbm @LIBS@
@@ -41,8 +42,8 @@
 INSTALL = @INSTALL@
  
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CCFLAGS)
-CPPCOMPILE = $(CPP) -c $(DEFS) $(INCLUDES) $(CCFLAGS)
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
+CXXCOMPILE = $(CXX) -c $(DEFS) $(INCLUDES) $(CXXFLAGS)
 LINK = $(CC) $(LDFLAGS) -o $@
-CPPLINK = $(CPP) $(LDFLAGS) -o $@
+CXXLINK = $(CXX) $(LDFLAGS) -o $@
  
 .SUFFIXES:
@@ -53,5 +54,5 @@
 .SUFFIXES: .cpp .o
 .cpp.o:
-	$(CPPCOMPILE) $< 
+	$(CXXCOMPILE) $< 
  
 
@@ -77,5 +78,5 @@
 
 depend:
-	makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
+	makedepend -Y -- $(DEFS) $(INCLUDES) $(CFLAGS) -- $(SOURCES)
 
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Index: /gsdl/trunk/src/gdbmedit/txt2db/Makefile.in
===================================================================
--- /gsdl/trunk/src/gdbmedit/txt2db/Makefile.in	(revision 15550)
+++ /gsdl/trunk/src/gdbmedit/txt2db/Makefile.in	(revision 15551)
@@ -29,10 +29,11 @@
 AR = ar
 CC = @CC@
-CPP = @CXX@
-CCFLAGS = -Wall @CFLAGS@
+CXX = @CXX@
+CFLAGS = -Wall @CFLAGS@ @COMPAT32BITFLAGS@
+CXXFLAGS = -Wall @CXXFLAGS@ @COMPAT32BITFLAGS@
 DEFS = @DEFS@
 RANLIB = @RANLIB@
 INCLUDES = -I../../../lib @GDBM_INCLUDE@
-LDFLAGS = @LDFLAGS@ 
+LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@ 
 INDEXERS_DIR=../../../indexers
 DPLIBS = ../../../lib/gsdllib.a $(INDEXERS_DIR)/mg/lib/unitool.o
@@ -41,10 +42,10 @@
 INSTALL = @INSTALL@
  
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CCFLAGS)
-CPPCOMPILE = $(CPP) -c $(DEFS) $(INCLUDES) $(CCFLAGS)
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
+CXXCOMPILE = $(CXX) -c $(DEFS) $(INCLUDES) $(CXXFLAGS)
 MCOMPILE = ../../../bin/linux/mico-c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
 LINK = $(CC) $(LDFLAGS) -o $@
 MLINK = ../../../bin/linux/mico-ld $(LDFLAGS) -lmico2.2.7 -o $@
-CPPLINK = $(CPP) $(LDFLAGS) -o $@
+CXXLINK = $(CXX) $(LDFLAGS) -o $@
  
 .SUFFIXES:
@@ -55,5 +56,5 @@
 .SUFFIXES: .cpp .o
 .cpp.o:
-	$(CPPCOMPILE) $< 
+	$(CXXCOMPILE) $< 
  
 .SUFFIXES: .mpp .o
@@ -82,5 +83,5 @@
 
 depend:
-	makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
+	makedepend -Y -- $(DEFS) $(INCLUDES) $(CFLAGS) -- $(SOURCES)
 
 
@@ -90,5 +91,5 @@
 
 txt2db: $(TXT2DB_OBJS) $(DPLIBS)
-	$(CPPLINK) $(TXT2DB_OBJS) $(LIBS)
+	$(CXXLINK) $(TXT2DB_OBJS) $(LIBS)
 
 
Index: /gsdl/trunk/src/oaiservr/Makefile.in
===================================================================
--- /gsdl/trunk/src/oaiservr/Makefile.in	(revision 15550)
+++ /gsdl/trunk/src/oaiservr/Makefile.in	(revision 15551)
@@ -40,15 +40,17 @@
 endif
 
+CC = @CC@
+CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@
 
-CPP = @CXX@
-CPPFLAGS = @CXXFLAGS@
+CXX = @CXX@
+CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
 INCLUDES = -I$(GSDL_DIR)/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(RECPT_DIR) -I$(INDEXERS_DIR)/mgpp/text
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
 LIBS = @LIBS@ @GDBM_LIBPATH@ -lgdbm -L$(PACKAGES_DIR)/expat/lib -lexpat $(ACCENTFOLD_LIBS)
 INSTALL = @INSTALL@
 
 
-CPPCOMPILE = $(CPP) -c $(CPPFLAGS) $(INCLUDES)
-CPPLINK = $(CPP) $(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(INCLUDES)
+CXXLINK = $(CXX) $(LDFLAGS) -o $@
 
 
@@ -56,5 +58,5 @@
 .SUFFIXES: .cpp .o
 .cpp.o:
-	$(CPPCOMPILE) -o $@ $< 
+	$(CXXCOMPILE) -o $@ $< 
 
 
@@ -121,5 +123,5 @@
 
 oaiserver: $(EXECUTABLE_OBJECTS)
-	$(CPPLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
+	$(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
 
 all: $(EXECUTABLE)
@@ -135,3 +137,3 @@
 
 depend:
-	makedepend -Y -- $(DEFS) $(INCLUDES) $(CPPFLAGS) -- $(SOURCES)
+	makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Index: /gsdl/trunk/src/recpt/Makefile.in
===================================================================
--- /gsdl/trunk/src/recpt/Makefile.in	(revision 15550)
+++ /gsdl/trunk/src/recpt/Makefile.in	(revision 15551)
@@ -63,6 +63,8 @@
 
 
-CPP = @CXX@
-CPPFLAGS = @CXXFLAGS@
+CC = @CC@
+CFLAGS=@CFLAGS@ @COMPAT32BITFLAGS@
+CXX = @CXX@
+CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
 DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DHAVE_CONFIG_H $(FASTCGI_DEFS) $(Z3950_DEFS)
 INCLUDES = @GDBM_INCLUDE@ -I. -I$(GSDL_DIR) -I$(GSDL_DIR)/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) \
@@ -70,11 +72,11 @@
         -I$(PACKAGES_DIR)/expat/include $(FASTCGI_INCLUDES) $(Z3950_INCLUDES)
 INSTALL = @INSTALL@
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
 LIBS = @LIBS@ @GDBM_LIBPATH@ -lgdbm -L$(PACKAGES_DIR)/expat/lib -lexpat $(ACCENTFOLD_LIBS) \
 	$(FASTCGI_LIBS) $(Z3950_LIBS)
 
 
-CPPCOMPILE = $(CPP) -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
-CPPLINK = $(CPP) $(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
+CXXLINK = $(CXX) $(LDFLAGS) -o $@
 
 
@@ -82,5 +84,5 @@
 .SUFFIXES: .cpp .o
 .cpp.o:
-	$(CPPCOMPILE) $< 
+	$(CXXCOMPILE) $< 
 
 
@@ -190,5 +192,5 @@
 
 library: $(EXECUTABLE_OBJECTS)
-	$(CPPLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
+	$(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
 
 all: $(EXECUTABLE)
@@ -204,3 +206,3 @@
 
 depend:
-	makedepend -Y -- $(DEFS) $(INCLUDES) $(CPPFLAGS) -- $(SOURCES)
+	makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
