mosquitto: fix build
[oi-userland.git] / components / developer / openjade / patches / openjade-01-macros.patch
blob1b574aaa35edf900ff9f2813e4dd769e58775946
1 --- /dev/null
2 +++ openjade-1.3.2/config/acinclude.m4
3 @@ -0,0 +1,61 @@
4 +dnl Configure-time switch with default
5 +dnl
6 +dnl Each switch defines an --enable-FOO and --disable-FOO option in
7 +dnl the resulting configure script.
8 +dnl
9 +dnl Usage:
10 +dnl SMR_SWITCH(name, description, default, pos-def, neg-def)
11 +dnl
12 +dnl where:
13 +dnl
14 +dnl name name of switch; generates --enable-name & --disable-name
15 +dnl options
16 +dnl description help string is set to this prefixed by "enable" or
17 +dnl "disable", whichever is the non-default value
18 +dnl default either "on" or "off"; specifies default if neither
19 +dnl --enable-name nor --disable-name is specified
20 +dnl pos-def a symbol to AC_DEFINE if switch is on (optional)
21 +dnl neg-def a symbol to AC_DEFINE if switch is off (optional)
22 +dnl
23 +AC_DEFUN(SMR_SWITCH, [
24 + AC_MSG_CHECKING(whether to enable $2)
25 + AC_ARG_ENABLE(
26 + $1,
27 + ifelse($3, on,
28 + [ --disable-[$1] disable [$2]],
29 + [ --enable-[$1] enable [$2]]),
30 + [ if test "$enableval" = yes; then
31 + AC_MSG_RESULT(yes)
32 + ifelse($4, , , AC_DEFINE($4))
33 + else
34 + AC_MSG_RESULT(no)
35 + ifelse($5, , , AC_DEFINE($5))
36 + fi ],
37 + ifelse($3, on,
38 + [ AC_MSG_RESULT(yes)
39 + ifelse($4, , , AC_DEFINE($4)) ],
40 + [ AC_MSG_RESULT(no)
41 + ifelse($5, , , AC_DEFINE($5))]))])
43 +dnl
44 +dnl Examine size_t and define SIZE_T_IS_UINT, if size_t is an unsigned int
45 +dnl
46 +AC_DEFUN(OJ_SIZE_T_IS_UINT,[
47 + AC_REQUIRE([AC_TYPE_SIZE_T])
48 + AC_MSG_CHECKING(whether size_t is unsigned int)
49 + ac_cv_size_t_is_uint=no
50 + AC_LANG_SAVE
51 + AC_LANG_CPLUSPLUS
52 + AC_TRY_COMPILE([#include <unistd.h>
54 + template<class T> class foo { };
56 + ], [
57 + foo<size_t> x;
58 + foo<unsigned int> y;
59 + x = y;
60 + ],ac_cv_size_t_is_uint=yes)
61 + AC_LANG_RESTORE
62 + AC_MSG_RESULT($ac_cv_size_t_is_uint)
63 + test "$ac_cv_size_t_is_uint" = "yes" && AC_DEFINE(SIZE_T_IS_UINT)
64 +])
65 --- openjade-1.3.2/config/aclocal.m4.orig
66 +++ openjade-1.3.2/config/aclocal.m4
67 @@ -3352,7 +3352,7 @@
68 dnl the resulting configure script.
69 dnl
70 dnl Usage:
71 -dnl smr_SWITCH(name, description, default, pos-def, neg-def)
72 +dnl SMR_SWITCH(name, description, default, pos-def, neg-def)
73 dnl
74 dnl where:
75 dnl
76 @@ -3365,7 +3365,7 @@
77 dnl pos-def a symbol to AC_DEFINE if switch is on (optional)
78 dnl neg-def a symbol to AC_DEFINE if switch is off (optional)
79 dnl
80 -AC_DEFUN(smr_SWITCH, [
81 +AC_DEFUN(SMR_SWITCH, [
82 AC_MSG_CHECKING(whether to enable $2)
83 AC_ARG_ENABLE(
84 $1,
85 --- openjade-1.3.2/config/configure.in.orig
86 +++ openjade-1.3.2/config/configure.in
87 @@ -243,8 +243,8 @@
88 dnl
89 dnl optional backends
90 dnl
91 -smr_SWITCH(mif, support for FrameMaker MIF output, on, JADE_MIF, DUMMY)
92 -smr_SWITCH(html, support for HTML+CSS output, on, JADE_HTML, DUMMY)
93 +SMR_SWITCH(mif, support for FrameMaker MIF output, on, JADE_MIF, DUMMY)
94 +SMR_SWITCH(html, support for HTML+CSS output, on, JADE_HTML, DUMMY)
97 dnl
98 --- openjade-1.3.2/jade/Makefile.sub.orig
99 +++ openjade-1.3.2/jade/Makefile.sub
100 @@ -4,7 +4,7 @@
101 INCLUDE=-I$(srcdir)/../grove -I$(srcdir)/../spgrove -I$(srcdir)/../style
102 # XLIBS=../style/libostyle.a ../spgrove/libospgrove.a ../grove/libogrove.a \
103 # ../lib/libosp.a
104 -XLIBS=../style/libostyle.a ../spgrove/libospgrove.a ../grove/libogrove.a $(splibdir)/libosp.a
105 +XLIBS=../style/libostyle.a ../spgrove/libospgrove.a ../grove/libogrove.a $(splibdir)/libosp.so
106 GENSRCS=JadeMessages.h HtmlMessages.h RtfMessages.h TeXMessages.h \
107 HtmlFOTBuilder_inst.cxx RtfFOTBuilder_inst.cxx TeXFOTBuilder_inst.cxx \
108 TransformFOTBuilder_inst.cxx MifMessages.h MifFOTBuilder_inst.cxx