Here is a small report on my efforts to build the rae branch on gcc
2.8.x and compaq cxx 6.1.

* Gcc 2.8.1: things seems to works except that, since there is no
  namespace support, everything is declared in global namespace. The
  solution is to add a few #ifdef in PopupBase.h and Popups.h. If done
  correclty, it would be very transparent. Allan, what are the classes
  from SigC which are needed?

* Compaq cxx: the main problem that I have is with xforms callbacks,
  which have to be wrapped with a C function (because cxx says that C
  linkage is not compatible with C++ linkage, and it is right). Should
  I add those wrappers, or do you have a better idea? Here is the
  error message I get:

cxx: Warning: ../../../sigc++/sigc++config.h, line 33: unrecognized
          preprocessing directive
#warning "Unknown architecture (send me gcc --dumpspecs)"
-^

[BTW, what should I do with that?]

cxx: Error: ../../../../rae/src/frontends/xforms/FormCopyright.C, line 57: 
          argument of type "void (*)(FL_OBJECT *, long)" is incompatible with
          parameter of type "FL_CALLBACKPTR"
        fl_set_object_callback(obj, FormCopyright::CopyrightOKCB, 0);
------------------------------------^
cxx: Error: ../../../../rae/src/frontends/xforms/FormCopyright.C, line 73: 
          argument of type "int (*)(FL_FORM *, void *)" is incompatible with
          parameter of type "FL_FORM_ATCLOSE"
                                    FormCopyright::CopyrightWMHideCB, 0);
------------------------------------^
cxx: Info: 2 errors detected in the compilation of 
"../../../../rae/src/frontends/xforms/FormCopyright.C".


For reference, I append the current diff between cvs and my
repository. I'll commit the configure changes soon.

JMarc

? sigc++/acinclude.m4
Index: acinclude.m4
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/acinclude.m4,v
retrieving revision 1.13.2.4
diff -u -r1.13.2.4 acinclude.m4
--- acinclude.m4        2000/02/08 10:26:15     1.13.2.4
+++ acinclude.m4        2000/03/02 16:39:38
@@ -187,6 +187,7 @@
       2.7*) CXXFLAGS="$lyx_opt";;
       2.95.1) CXXFLAGS="-g $lyx_opt -fpermissive -fno-rtti";;
       2.95.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
+      *2.91.*) CXXFLAGS="-g $lyx_opt -Wno-return-type -fno-exceptions -fno-rtti";;
       *)    CXXFLAGS="-g $lyx_opt -fno-exceptions -fno-rtti";;
     esac
   else
@@ -849,28 +850,16 @@
  AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5,($ac_cv_func_select_arg5))
 ])
 
-### Check if which frontend we want to use the default is XForms
+### Check which frontend we want to use. The default is XForms
 ###
 AC_DEFUN(LYX_USE_FRONTEND,
 [AC_MSG_CHECKING(what frontend should be used as main GUI)
 AC_ARG_WITH(frontend,
   [  --with-frontend[=value] Use THIS frontend as main GUI:
                           Possible values: xforms,kde],
-  [lyx_use_frontend="$withval"], [lyx_use_frontend=""])
-AC_MSG_RESULT([$lyx_use_frontend])
-if test x$lyx_use_frontend = xkde; then
-  lyx_flags="$lyx_flags frontend-kde"
-  KDE_DO_IT_ALL
-  FRONTEND="kde"
-  FRONTEND_GUILIB="\${top_builddir}/src/frontends/kde/libkde.la"
-  FRONTEND_LDFLAGS="\$(QT_LDFLAGS) \$(KDE_LDFLAGS)"
-  FRONTEND_INCLUDES="\$(QT_INCLUDES) \$(KDE_INCLUDES)"
-  FRONTEND_LIBS="\$(KDE_LIBS)"
-  AC_DEFINE(KDEGUI)
-else
-  FRONTEND="xforms"
-  FRONTEND_GUILIB="\${top_builddir}/src/frontends/xforms/libxforms.la"
-fi
+  [lyx_use_frontend="$withval"], [lyx_use_frontend="xforms"])
+AC_MSG_RESULT($lyx_use_frontend)
+lyx_flags="$lyx_flags frontend-$lyx_use_frontend"
 AC_SUBST(FRONTEND)
 AC_SUBST(FRONTEND_GUILIB)
 AC_SUBST(FRONTEND_LDFLAGS)
Index: configure.in
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.in,v
retrieving revision 1.13.2.6
diff -u -r1.13.2.6 configure.in
--- configure.in        2000/02/22 07:21:45     1.13.2.6
+++ configure.in        2000/03/02 16:39:38
@@ -117,14 +117,25 @@
 ### Check which libsigc++ we're using
 LYX_WITH_SIGC
 
-### check wich frontend we want to use
-# first set the defaults XForms for now
-FRONTEND="xforms"
-AC_SUBST(FRONTEND)
-FRONTEND_GUILIB="\${top_builddir}/src/frontends/xforms/libxforms.la"
-AC_SUBST(FRONTEND_GUILIB)
-
+### check which frontend we want to use
 LYX_USE_FRONTEND
+dnl The code below is not in a macro, because this would cause big
+dnl problems with the AC_REQUIRE contained in KDE_DO_IT_ALL.  
+case "$lyx_use_frontend" in 
+  kde) 
+    KDE_DO_IT_ALL
+    FRONTEND="kde"
+    FRONTEND_GUILIB="\${top_builddir}/src/frontends/kde/libkde.la"
+    FRONTEND_LDFLAGS="\$(QT_LDFLAGS) \$(KDE_LDFLAGS)"
+    FRONTEND_INCLUDES="\$(QT_INCLUDES) \$(KDE_INCLUDES)"
+    FRONTEND_LIBS="\$(KDE_LIBS)"
+    AC_DEFINE(KDEGUI);;
+  xforms) 
+    FRONTEND="xforms"
+    FRONTEND_GUILIB="\${top_builddir}/src/frontends/xforms/libxforms.la";;
+  *)
+    LYX_ERROR(Unknown frontend $lyx_use_frontend);;
+esac
 
 ### Check for X libraries
 # Check for the pt library (for SCO, needed for X)
Index: config/lyxinclude.m4
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v
retrieving revision 1.3.2.6
diff -u -r1.3.2.6 lyxinclude.m4
--- config/lyxinclude.m4        2000/02/22 07:21:45     1.3.2.6
+++ config/lyxinclude.m4        2000/03/02 16:39:38
@@ -850,28 +850,16 @@
  AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5,($ac_cv_func_select_arg5))
 ])
 
-### Check if which frontend we want to use the default is XForms
+### Check which frontend we want to use. The default is XForms
 ###
 AC_DEFUN(LYX_USE_FRONTEND,
 [AC_MSG_CHECKING(what frontend should be used as main GUI)
 AC_ARG_WITH(frontend,
   [  --with-frontend[=value] Use THIS frontend as main GUI:
                           Possible values: xforms,kde],
-  [lyx_use_frontend="$withval"], [lyx_use_frontend=""])
-AC_MSG_RESULT([$lyx_use_frontend])
-if test x$lyx_use_frontend = xkde; then
-  lyx_flags="$lyx_flags frontend-kde"
-  KDE_DO_IT_ALL
-  FRONTEND="kde"
-  FRONTEND_GUILIB="\${top_builddir}/src/frontends/kde/libkde.la"
-  FRONTEND_LDFLAGS="\$(QT_LDFLAGS) \$(KDE_LDFLAGS)"
-  FRONTEND_INCLUDES="\$(QT_INCLUDES) \$(KDE_INCLUDES)"
-  FRONTEND_LIBS="\$(KDE_LIBS)"
-  AC_DEFINE(KDEGUI)
-else
-  FRONTEND="xforms"
-  FRONTEND_GUILIB="\${top_builddir}/src/frontends/xforms/libxforms.la"
-fi
+  [lyx_use_frontend="$withval"], [lyx_use_frontend="xforms"])
+AC_MSG_RESULT($lyx_use_frontend)
+lyx_flags="$lyx_flags frontend-$lyx_use_frontend"
 AC_SUBST(FRONTEND)
 AC_SUBST(FRONTEND_GUILIB)
 AC_SUBST(FRONTEND_LDFLAGS)
Index: sigc++/Makefile.am
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/sigc++/Attic/Makefile.am,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 Makefile.am
--- sigc++/Makefile.am  2000/02/22 03:23:59     1.1.2.4
+++ sigc++/Makefile.am  2000/03/02 16:39:38
@@ -27,7 +27,7 @@
 
 
 %.h: $(M4_DIR)/%.h.m4 $(M4_DIR)/template.macros.m4        
-       m4 $(M4_INCLUDES) $(DEFINES) $<  > $@
+       $(M4) $(M4_INCLUDES) $(DEFINES) $<  > $@
 
 all-local: $(noinst_LTLIBRARIES) 
 
Index: src/frontends/include/DialogBase.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/include/Attic/DialogBase.h,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 DialogBase.h
--- src/frontends/include/DialogBase.h  2000/02/08 10:26:16     1.1.2.2
+++ src/frontends/include/DialogBase.h  2000/03/02 16:39:38
@@ -14,7 +14,11 @@
     satisfy that request.  Thus a dialog will have to "pull" the necessary
     details from the core of the program.
  */
+#ifdef SIGC_CXX_NAMESPACES
 class DialogBase : public SigC::Object
+#else
+class DialogBase : public Object
+#endif
 {
 public:
        /**@name Constructors and Deconstructors */
Index: src/frontends/include/Dialogs.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/include/Attic/Dialogs.h,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 Dialogs.h
--- src/frontends/include/Dialogs.h     2000/01/30 04:48:15     1.1.2.1
+++ src/frontends/include/Dialogs.h     2000/03/02 16:39:38
@@ -10,8 +10,12 @@
 #include <vector>
 #include <sigc++/signal_system.h>
 
+using std::vector;
+
+#ifdef SIGC_CXX_NAMESPACES
 using SigC::Signal0;
 using SigC::Signal1;
+#endif
 
 #include "LString.h"
 
Index: src/insets/insetbib.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetbib.h,v
retrieving revision 1.6.2.3
diff -u -r1.6.2.3 insetbib.h
--- src/insets/insetbib.h       2000/02/22 07:22:33     1.6.2.3
+++ src/insets/insetbib.h       2000/03/02 16:39:38
@@ -43,13 +43,13 @@
        unsigned char Editable() const {
                return 1;
        }
-private:
        ///
        struct Holder {
                InsetCitation * inset;
                BufferView * view;
        };
 
+private:
        ///
        Holder holder;
 };
@@ -90,15 +90,15 @@
         void setCounter(int);
         ///
         int  getCounter() const { return counter; }
-
- private:
-       ///
-        int counter;
        ///
        struct Holder {
                InsetBibKey * inset;
                BufferView * view;
        };
+
+ private:
+       ///
+        int counter;
 
        ///
        Holder holder;

Reply via email to