PATCH: Amaya 1.3b build FAILS on i586-pc-linux-gnu (Red Hat 5.1).

Problems:

1.  Separate libXp.so in XFree86 3.3.2.3 that needs to be linked with
(should be a test macro in configure.in) 

2.  make install attempts to install java libs even if --enable-java is
NOT specified, failing with a fatal error.

3.  cpp is in /lib, which is not in the default PATH, and the batch tools
cannot find it.  configure correctly sets CPP to "gcc -E", however it
appears that the batch tools have "cpp" hardcoded in them.  Furthermore,
even gcc -E will fail because it will think that the input files are
object files due to their extension, and will not preprocess them.

4.  Compile of pluginlib/pluginapi.c fails with CE_FALSE being an
undefined symbol.

Tentative patch is below.  Even with this patch there are numerous
compilation warnings about unused local variables and uninitialized
variables being possibly used.

--
Sam


diff -U 3 -r ../../SOURCES/Thot/amaya/Makefile.in ./amaya/Makefile.in
--- ../../SOURCES/Thot/amaya/Makefile.in	Mon Oct 12 06:11:21 1998
+++ ./amaya/Makefile.in	Thu Dec  3 22:40:49 1998
@@ -10,11 +10,14 @@
 include ../Options
 
 INCLUDES= -DHAVE_CONFIG_H $(AMAYA_INCLUDES) $(X_FLAGS)
+
+XMLIB = -lXm
+
 LIBS	=  $(LIBWWW_LIBS) $(AMAYA_JAVA_LIBS) $(AMAYA_PLUGIN_LIBS) \
 	  $(AMAYA_MATH_LIBS) $(AMAYA_GRAPH_LIBS) $(AMAYA_ILU_LIBS) \
           -L../tablelib -L../thotlib -L.. -lThotTable -lThotEditor \
           $(AMAYA_OPTION_EXTRA_LIBS) $(IMGLIBS) \
-	  $(MOTIF_LIBRARIES) -lXm $(X_LIBS) -lXt $(X_PRE_LIBS) \
+	  $(MOTIF_LIBRARIES) $(XMLIB) $(X_LIBS) -lXt $(X_PRE_LIBS) \
 	  -lXext -lX11 $(X_EXTRA_LIBS) @LIBS@ @EXTRA_LIBS@ -lm
 
 CONFIGFILES=XKeysymDB thot.ini amaya.keyboard en-amayadialogue \
@@ -308,7 +311,7 @@
 	  done ; done)
 	(for i in $(CONFIGFILES) ; do \
 	  for file in `$(ECHO) $(THOTDIR)/config/$$i` ; do \
-	    $(INSTALL_DATA) $$file $(datadir)/thot/config ; \
+	    $(INSTALL_DATA) $$file $(datadir)/thot/config 2>/dev/null || true ; \
 	  done ; done)
 	(for i in $(DICOFILES) ; do \
 	  for file in `$(ECHO) $(THOTDIR)/dicopar/$$i` ; do \
diff -U 3 -r ../../SOURCES/Thot/batch/Makefile.in ./batch/Makefile.in
--- ../../SOURCES/Thot/batch/Makefile.in	Thu Aug 27 03:59:24 1998
+++ ./batch/Makefile.in	Thu Dec  3 21:54:44 1998
@@ -26,7 +26,7 @@
 LANGUAGES=*.GRM *.LAN *.LST
 
 .c.o :
-	$(CC) -DCPP="$(CPP)" $(CFLAGS) $(INCLUDES) -c $< -o $@
+	$(CC) '-DCPP="'"$(CPP)"' -x c"' $(CFLAGS) $(INCLUDES) -c $< -o $@
 
 all : ../bin $(GRMS) $(COMPILERS) \
           ../bin/printstr ../bin/rescandialogue
diff -U 3 -r ../../SOURCES/Thot/batch/app.c ./batch/app.c
--- ../../SOURCES/Thot/batch/app.c	Tue Mar 10 06:41:19 1998
+++ ./batch/app.c	Thu Dec  3 21:40:57 1998
@@ -1557,7 +1557,7 @@
    if (!error)
      {
         /* prepare the cpp command */
-	strcpy (cmd, "cpp ");
+	strcpy (cmd, CPP " ");
         param = 1;
 	while (param < argc && argv[param][0] == '-')
 	  {
diff -U 3 -r ../../SOURCES/Thot/batch/prs.c ./batch/prs.c
--- ../../SOURCES/Thot/batch/prs.c	Wed Apr 29 12:32:00 1998
+++ ./batch/prs.c	Thu Dec  3 21:54:01 1998
@@ -6227,7 +6227,7 @@
    if (!error)
      {
         /* prepare the cpp command */
-	strcpy (cmd, "cpp ");
+	strcpy (cmd, CPP " ");
         param = 1;
 	while (param < argc && argv[param][0] == '-')
 	  {
diff -U 3 -r ../../SOURCES/Thot/batch/str.c ./batch/str.c
--- ../../SOURCES/Thot/batch/str.c	Wed Sep  9 11:34:55 1998
+++ ./batch/str.c	Thu Dec  3 21:41:03 1998
@@ -2815,7 +2815,7 @@
    if (!error)
      {
         /* prepare the cpp command */
-	strcpy (cmd, "cpp ");
+	strcpy (cmd, CPP " ");
         param = 1;
 	while (param < argc && argv[param][0] == '-')
 	  {
diff -U 3 -r ../../SOURCES/Thot/batch/tra.c ./batch/tra.c
--- ../../SOURCES/Thot/batch/tra.c	Tue Apr  1 10:18:21 1997
+++ ./batch/tra.c	Thu Dec  3 21:40:13 1998
@@ -3190,7 +3190,7 @@
    if (!error)
      {
         /* prepare the cpp command */
-	strcpy (cmd, "cpp ");
+	strcpy (cmd, CPP " ");
         param = 1;
 	while (param < argc && argv[param][0] == '-')
 	  {
diff -U 3 -r ../../SOURCES/Thot/configure ./configure
--- ../../SOURCES/Thot/configure	Mon Oct 12 06:11:07 1998
+++ ./configure	Thu Dec  3 22:21:47 1998
@@ -2562,7 +2562,7 @@
 
 fi
 
-
+X_PRE_LIBS="-lXp ${X_PRE_LIBS}"
 
 ac_header_dirent=no
 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
diff -U 3 -r ../../SOURCES/Thot/configure.in ./configure.in
--- ../../SOURCES/Thot/configure.in	Mon Oct 12 06:11:10 1998
+++ ./configure.in	Thu Dec  3 22:21:42 1998
@@ -62,7 +62,7 @@
 AC_CHECK_LIB(dl, dlopen)
 AC_PATH_X
 AC_PATH_XTRA
-
+X_PRE_LIBS="-lXp ${X_PRE_LIBS}"
 dnl
 dnl Checks for header files.
 dnl
diff -U 3 -r ../../SOURCES/Thot/pluginlib/pluginapi.c ./pluginlib/pluginapi.c
--- ../../SOURCES/Thot/pluginlib/pluginapi.c	Fri Feb  6 12:26:51 1998
+++ ./pluginlib/pluginapi.c	Thu Dec  3 22:02:51 1998
@@ -614,7 +614,7 @@
 #         ifdef PLUGIN_DEBUG
           printf ("AM_geturl: Passing the stream to AMAYA\n");
 #         endif
-          GetHTMLDocument (url, NULL, 0, 0, CE_FALSE, TRUE, NULL, NULL);
+          GetHTMLDocument (url, NULL, 0, 0, CE_ABSOLUTE, TRUE, NULL, NULL);
 	}
       else
 	{

Received on Friday, 4 December 1998 08:05:09 UTC