--- jade-1.2.1.orig/Makefile.lib.in +++ jade-1.2.1/Makefile.lib.in @@ -9,6 +9,8 @@ CLEANFILES=-r lib$(LIB).la $(OBJS) $(COBJS) $(LT_OBJS) core .libs Makefile.lt +LIB_THREADS=@LIB_THREADS@ + all: lib$(LIB).la pure: all @@ -17,7 +19,7 @@ lib$(LIB).la: $(LT_OBJS) $(LIBTOOL) --mode=link $(CC) -o lib$(LIB).la $(LT_OBJS) \ - -rpath $(libdir) -version-info $(LTVERSION) + -rpath $(libdir) -version-info $(LTVERSION) $(DEPLIBS) install: $(LIBTOOL) --mode=install $(INSTALL) lib$(LIB).la $(libdir) --- jade-1.2.1.orig/config/configure.in +++ jade-1.2.1/config/configure.in @@ -52,20 +52,6 @@ then CXXFLAGS="$CXXFLAGS -fno-implicit-templates" fi -AC_LANG_CPLUSPLUS - -CXsave="$CXXFLAGS" -CXXFLAGS=-ansi -AC_CACHE_CHECK(for -ansi support, - ac_cv_c_cmdline_ansi, - AC_TRY_LINK([],[],ac_cv_c_cmdline_ansi=yes, - ac_cv_c_cmdline_ansi=no)) -if test "$ac_cv_c_cmdline_ansi" = "yes" - then - CXXFLAGS="$CXXFLAGS $CXsave" - else - CXXFLAGS="$CXsave" -fi dnl dnl Checks for header files. @@ -90,6 +76,12 @@ AC_CHECK_TYPE(sig_atomic_t,int) fi +dnl +dnl the following tests require c++, not c; note that if you switch this +dnl earlier, AC_C_CONST will fail, at least +dnl +AC_LANG_CPLUSPLUS + AC_CACHE_CHECK(support for bool, ac_cv_typedef_bool, AC_TRY_LINK(,bool x; x=(false | true);, @@ -110,6 +102,11 @@ AC_CHECK_FUNC(setlocale,AC_DEFINE(SP_HAVE_LOCALE)) AC_CHECK_LIB(intl,gettext,AC_DEFINE(SP_HAVE_GETTEXT) LIBS="$LIBS -lintl") +dnl +dnl Check for thread support. +AC_CHECK_LIB(threads,cthread_fork,LIB_THREADS="-lthreads",LIB_THREADS="") +AC_SUBST(LIB_THREADS) + dnl dnl ANSI templates dnl @@ -151,10 +148,20 @@ dnl Framemaker support dnl AC_ARG_ENABLE(mif, -[ --enable-mif bind in support for FrameMaker MIF output], +[ --enable-mif include support for FrameMaker MIF output], if test $enableval then AC_DEFINE(JADE_MIF) + fi) + +dnl +dnl HTML backend support +dnl +AC_ARG_ENABLE(html, +[ --enable-html include support for HTML output], + if test $enableval + then + AC_DEFINE(JADE_HTML) fi) --- jade-1.2.1.orig/grove/Makefile.sub +++ jade-1.2.1/grove/Makefile.sub @@ -1,2 +1,3 @@ LIB=grove +DEPLIBS=-lm OBJS=Node.o LocNode.o --- jade-1.2.1.orig/include/config.h +++ jade-1.2.1/include/config.h @@ -37,7 +37,7 @@ #define SP_STAT_BLKSIZE #endif -#ifdef __MACH__ +#if (defined __MACH__) && (! defined __GNU__) #define SP_MUTEX_MACH #endif --- jade-1.2.1.orig/jade/MifFOTBuilder_inst.cxx +++ jade-1.2.1/jade/MifFOTBuilder_inst.cxx @@ -371,6 +371,7 @@ #endif #endif #endif +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 #ifdef __DECCXX #pragma define_template Vector #else @@ -381,6 +382,7 @@ template class Vector; #else typedef Vector Dummy_27; +#endif #endif #endif #endif --- jade-1.2.1.orig/jade/MifFOTBuilder_inst.m4 +++ jade-1.2.1/jade/MifFOTBuilder_inst.m4 @@ -39,7 +39,9 @@ __instantiate(Vector) __instantiate(Vector) __instantiate(Vector) +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 __instantiate(Vector) +#endif __instantiate(`PointerTable, StringHash, MifDoc::Ruling>') __instantiate(`PointerTableIter, StringHash, MifDoc::Ruling>') __instantiate(Vector) --- jade-1.2.1.orig/lib/Makefile.sub +++ jade-1.2.1/lib/Makefile.sub @@ -1,5 +1,6 @@ LIB=sp INCLUDE=-I$(srcdir)/../generic +DEPLIBS=-lm MSGGENFLAGS=-l COMMON_OBJS=Allocator.o Link.o IListBase.o TypeId.o assert.o ENTMGR_OBJS=CharsetInfo.o EntityCatalog.o EntityDecl.o EntityManager.o \ --- jade-1.2.1.orig/lib/entmgr_inst.cxx +++ jade-1.2.1/lib/entmgr_inst.cxx @@ -429,6 +429,7 @@ #endif #endif #endif +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 #ifdef __DECCXX #pragma define_template Vector > #else @@ -442,6 +443,7 @@ #endif #endif #endif +#endif #ifdef __DECCXX #pragma define_template Owner #else @@ -559,6 +561,7 @@ #endif #endif #endif +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 #ifdef __DECCXX #pragma define_template SharedXcharMap #else @@ -572,6 +575,7 @@ #endif #endif #endif +#endif #ifdef __DECCXX #pragma define_template SharedXcharMap #else @@ -585,6 +589,7 @@ #endif #endif #endif +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 #ifdef __DECCXX #pragma define_template String #else @@ -598,6 +603,7 @@ #endif #endif #endif +#endif #ifdef __DECCXX #pragma define_template String #else @@ -624,6 +630,7 @@ #endif #endif #endif +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 #ifdef __DECCXX #pragma define_template XcharMap #else @@ -637,6 +644,7 @@ #endif #endif #endif +#endif #ifdef __DECCXX #pragma define_template XcharMap #else @@ -663,6 +671,7 @@ #endif #endif #endif +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 #ifdef __DECCXX #pragma define_template Vector #else @@ -686,6 +695,7 @@ template class SubstTable; #else typedef SubstTable Dummy_49; +#endif #endif #endif #endif --- jade-1.2.1.orig/lib/entmgr_inst.m4 +++ jade-1.2.1/lib/entmgr_inst.m4 @@ -61,7 +61,9 @@ __instantiate(`RangeMap') __instantiate(Vector) __instantiate(Vector) +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 __instantiate(Vector >) +#endif __instantiate(Owner) __instantiate(ISet) __instantiate(Vector >) @@ -71,16 +73,24 @@ __instantiate(Vector >) __instantiate(SubstTable) __instantiate(SharedXcharMap) +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 __instantiate(SharedXcharMap) +#endif __instantiate(SharedXcharMap) +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 __instantiate(String) +#endif __instantiate(String) __instantiate(XcharMap) +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 __instantiate(XcharMap) +#endif __instantiate(XcharMap) __instantiate(Vector) +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 __instantiate(Vector) __instantiate(SubstTable) +#endif __instantiate(CharMap) #ifdef SP_MULTI_BYTE __instantiate(CharMapPage) --- jade-1.2.1.orig/lib/parser_inst.cxx +++ jade-1.2.1/lib/parser_inst.cxx @@ -1337,6 +1337,7 @@ #endif #endif #endif +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 #ifdef __DECCXX #pragma define_template Vector #else @@ -1347,6 +1348,7 @@ template class Vector; #else typedef Vector Dummy_97; +#endif #endif #endif #endif --- jade-1.2.1.orig/lib/parser_inst.m4 +++ jade-1.2.1/lib/parser_inst.m4 @@ -165,7 +165,9 @@ __instantiate(Vector) __instantiate(Vector) __instantiate(Vector) +#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95 __instantiate(Vector) +#endif __instantiate(NamedTable) __instantiate(NamedTableIter) --- jade-1.2.1.orig/spgrove/Makefile.sub +++ jade-1.2.1/spgrove/Makefile.sub @@ -1,5 +1,6 @@ LIB=spgrove INCLUDE=-I$(srcdir)/../grove +DEPLIBS=-lm -L$(TOP)/grove/.libs -lgrove -L$(TOP)/lib/.libs -lsp $(LIB_THREADS) OBJS=GroveApp.o GroveBuilder.o SdNode.o GENSRCS=grove_inst.cxx --- jade-1.2.1.orig/spgrove/threads.h +++ jade-1.2.1/spgrove/threads.h @@ -141,7 +141,7 @@ #endif /* _MSC_VER && _MT */ -#ifdef __MACH__ +#if (defined __MACH__) || (defined __GNU__) // For Mach, using C Threads. May or may not work as-is on your Mach-based OS. // Written by Raf Schietekat on 1996-11-10. @@ -158,6 +158,13 @@ #undef catch // don't want ASSERT to clash with ASSERT in SP's macros.h #undef ASSERT +#elif defined __GNU__ +// catch is a reserved word in C++, it's only used to declare a struct member +#define catch catch22 +#include +#undef catch +// don't want ASSERT to clash with ASSERT in SP's macros.h +#undef ASSERT #else // Change to whatever works for you, and tell James Clark (or me). // catch is a reserved word in C++, it's only used to declare a struct member @@ -295,7 +302,7 @@ #endif /* SP_NO_BLOCK */ -#endif /* __MACH__ */ +#endif /* __MACH__ || __GNU__ */ #ifdef SP_USE_PTHREADS --- jade-1.2.1.orig/style/Makefile.sub +++ jade-1.2.1/style/Makefile.sub @@ -1,4 +1,6 @@ LIB=style +DEPLIBS=-lm -L$(TOP)/grove/.libs -lgrove -L$(TOP)/lib/.libs -lsp \ + -L$(TOP)/spgrove/.libs -lspgrove OBJS=Collector.o \ DssslApp.o \ DssslSpecEventHandler.o \