File: configure.in

package info (click to toggle)
openjade 1.4devel1-21.3
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 5,328 kB
  • ctags: 15,078
  • sloc: cpp: 90,082; sh: 7,479; ansic: 1,793; lisp: 894; perl: 604; makefile: 393; sed: 93
file content (243 lines) | stat: -rw-r--r-- 7,576 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
AC_REVISION([$Id: configure.in,v 1.25 2001/07/20 06:19:24 adicarlo Exp $])
dnl
dnl  Process this file with autoconf to produce a configure script.
dnl
dnl  Copyright (C) 1998 Cees A. de Groot, 1999 Matthias Clasen
dnl

dnl
dnl  Credits: this autoconf script was largely "inspired" <g> by the
dnl  autoconf script around SP made by Henry Thompson.
dnl

dnl Initialization
AC_INIT([OpenJade], [1.4devel], [], [OpenJade])
AC_CONFIG_SRCDIR(dsssl)
AM_INIT_AUTOMAKE([foreign])
AM_CONFIG_HEADER([config.h])
AM_SANITY_CHECK
AM_MAINTAINER_MODE
AC_USE_SYSTEM_EXTENSIONS

dnl Use different names than usually to avoid conflicts.
AC_DEFINE_UNQUOTED(OPENJADE_PACKAGE, "$PACKAGE", [Package name])
AC_DEFINE_UNQUOTED(OPENJADE_VERSION, "$VERSION", [Package version])

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_INSTALL
AC_PROG_LN_S
dnl AC_PROG_RANLIB
AC_PROG_MAKE_SET
AC_PATH_PROGS(PERL, perl, perl)
AM_PROG_LIBTOOL

dnl Checks for libraries.
AC_CHECK_LIB(pthread,pthread_create,,AC_CHECK_LIB(threads,cthread_fork))
AM_GNU_GETTEXT
AM_GNU_GETTEXT_VERSION([0.19.2])
AC_CHECK_HEADERS([locale.h])
AC_DEFINE_DIR(OPENJADE_LOCALE_DIR, datadir/locale, [location of message catalogs])
OPENJADE_MESSAGE_DOMAIN=jade
AC_DEFINE_UNQUOTED(OPENJADE_MESSAGE_DOMAIN, "$OPENJADE_MESSAGE_DOMAIN", [message domain])
AC_SUBST(OPENJADE_MESSAGE_DOMAIN)
AC_CHECK_LIB(w,wcscoll)

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([limits.h])
AC_LANG([C++]) 
AC_CHECK_HEADERS(new cassert)

dnl Checks for typedefs, structures and compiler characteristics.
AC_TYPE_SIZE_T
AC_CHECK_MEMBERS([struct stat.st_blksize])
AC_CACHE_CHECK(for sig_atomic_t in signal.h,
    ac_cv_have_sig_atomic_t,
    AC_TRY_LINK([#include <signal.h>],sig_atomic_t x;,
        ac_cv_have_sig_atomic_t=yes,
        ac_cv_have_sig_atomic_t=no))
if test "$ac_cv_have_sig_atomic_t" = "no"
then
    AC_CHECK_TYPE(sig_atomic_t,int)
fi
AC_CHECK_SIZEOF(size_t)
AC_CHECK_SIZEOF(unsigned int)
AC_CHECK_SIZEOF(unsigned short)
OJ_CHECK_SIZEOF(wchar_t, wchar.h)
AC_CXX_BOOL
if test "$ac_cv_cxx_bool" = yes; then
  AC_CHECK_SIZEOF(bool)
fi
AC_CXX_MUTABLE
AC_CXX_TYPENAME
AC_CXX_NEW_FOR_SCOPING
AC_CXX_PLACEMENT_OPERATOR_DELETE
AC_CXX_DYNAMIC_CAST
AC_CXX_NAMESPACES
AC_CXX_EXPLICIT_INSTANTIATIONS
AC_CACHE_CHECK(for placement operator new,
ac_cv_cxx_placement_operator_new,
[AC_TRY_COMPILE([#include <stddef.h>
#ifdef HAVE_NEW
#include <new>
#else
#include <new.h>
#endif
class A {
public:
  A() {};
};
A* foo()
{
  void *x;
  A *bar = new (x) A;
  return bar;
};],,
   ac_cv_cxx_placement_operator_new=yes,
   ac_cv_cxx_placement_operator_new=no)
])
if test "$ac_cv_cxx_placement_operator_new" = yes; then
  AC_DEFINE(HAVE_PLACEMENT_OPERATOR_NEW,1,
            [define if placement operator new is declared])
fi
AC_CACHE_CHECK(whether the C++ compiler supports the std namespace,
ac_cv_cxx_namespace_std,
[AC_TRY_COMPILE([
#ifdef HAVE_NEW
#include <new>
#else
#include <new.h>
#endif],[
std::set_new_handler(0);],
   ac_cv_cxx_namespace_std=yes,
   ac_cv_cxx_namespace_std=no)
])
if test "$ac_cv_cxx_namespace_std" = yes; then
  AC_DEFINE(HAVE_NAMESPACE_STD,1,
            [define if the C++ compiler supports the std namespace])
fi
if test "$GXX"; then
dnl These need tests for non-GNU compilers
  AC_CACHE_CHECK(whether GNU C++ supports automatic template instantiation,
                 ac_cv_c_gnu_automatic_templates,
                 AC_EGREP_CPP(yes,[
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 8)
  yes
#endif
                 ],
                 ac_cv_c_gnu_automatic_templates=yes,
                 ac_cv_c_gnu_automatic_templates=no))
  if test "$ac_cv_c_gnu_automatic_templates" = yes; then
    AC_DEFINE(SP_DEFINE_TEMPLATES,1,
              [define this to include template definitions in the headers])
  else
    AC_DEFINE(SP_MANUAL_INST,1,
              [define this to compile explicit template instantiations])
    CXXFLAGS="$CXXFLAGS -fno-implicit-templates"
  fi
  AC_CACHE_CHECK(whether GNU C++ links with libg++ if we include new.h,
                 ac_cv_cxx_gnu_avoid_new_h,
                 AC_EGREP_CPP(yes,[
#if (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
  yes
#endif
                 ],
                 ac_cv_cxx_gnu_avoid_new_h=yes,
                 ac_cv_cxx_gnu_avoid_new_h=no))
  if test "$ac_cv_cxx_gnu_avoid_new_h" = yes; then
    AC_DEFINE(SP_NEW_H_MISSING,1,
              [define this if your system misses new.h])
    AC_CACHE_CHECK(whether to declare set_new_handler extern "C",
                    ac_cv_cxx_new_handler_extern_c,
                    [AC_TRY_LINK([
typedef void (*new_handler)();
new_handler set_new_handler(new_handler);],[
set_new_handler(0);],
                      ac_cv_cxx_new_handler_extern_c=no,
                      ac_cv_cxx_new_handler_extern_c=yes)
                    ])
    if test "$ac_cv_cxx_new_handler_extern_c" = yes; then
      AC_DEFINE(SP_SET_NEW_HANDLER_EXTERN_C,1,
                [define this if  set_new_handler() has to be declared extern "C"])
    fi
  fi
fi
AC_CACHE_CHECK(whether new_handler accepts size_t and returns int,
ac_cv_cxx_fancy_new_handler,
[AC_TRY_COMPILE([
#include <stddef.h>
#include <new.h>
int oom(size_t) { }],[set_new_handler(oom);],
   ac_cv_cxx_fancy_new_handler=yes,
   ac_cv_cxx_fancy_new_handler=no)
])
if test "$ac_cv_cxx_fancy_new_handler" = yes; then
  AC_DEFINE(SP_FANCY_NEW_HANDLER,1,
            [define this if the new handler takes size_t and returns int])
fi

dnl Checks for library functions.
AC_REPLACE_FUNCS(memcmp)
AC_CHECK_FUNCS(setlocale)

dnl Checks for system services.

dnl Package options.
dnl AC_ARG_PROGRAM dnl complains about multiple invocations, though this is only explicit one
AC_DEFINE_UNQUOTED(DEFAULT_SCHEME_BUILTINS,"$prefix/share/sgml/$PACKAGE/builtins.dsl",
                   [set this to the location of builtins.dsl])
AC_DEFINE(SP_MULTI_BYTE,1,
          [define this to build a multi-byte version])
AC_MSG_CHECKING(whether to run the grove builder in a separate thread)
AC_ARG_ENABLE(threads,
changequote(<,>)dnl
<  --enable-threads        run grove builder in a separate thread [default=no]>,
changequote([,])dnl
  [if test "$enableval" != "no"; then
    AC_DEFINE(USE_THREADS,1,
              [define this to build the grove in a separate thread, if possible])
    AC_MSG_RESULT(yes)
  else 
    AC_MSG_RESULT(no)
  fi],
  AC_MSG_RESULT(no))
AC_MSG_CHECKING(whether to build the Framemaker MIF backend)
AC_ARG_ENABLE(mif,
changequote(<,>)dnl
<  --enable-mif            build the FrameMaker MIF backend [default=yes]>,
changequote([,])dnl
  [if test "$enableval" = "yes"; then
    AC_DEFINE(JADE_MIF,1,
              [define this to build the mif backend])
    AC_MSG_RESULT(yes)
  else 
    AC_MSG_RESULT(no)
  fi],
  AC_DEFINE(JADE_MIF,1,
            [define this to build the mif backend])
  AC_MSG_RESULT(yes))
AC_MSG_CHECKING(whether to build the HTML+CSS backend)
AC_ARG_ENABLE(html,
changequote(<,>)dnl
<  --enable-html           build the HTML+CSS backend [default=yes]>,
changequote([,])dnl
  [if test "$enableval" = "yes"; then
    AC_DEFINE(JADE_HTML,1,
              [define this to build the html backend])
    AC_MSG_RESULT(yes)
  else
    AC_MSG_RESULT(no)
  fi],
  AC_DEFINE(JADE_HTML,1,
            [define this to build the html backend])
  AC_MSG_RESULT(yes))

dnl AC_SUBST(LIBOBJS)
AC_OUTPUT([${PACKAGE}-${VERSION}.spec:spec.in Makefile msggen.pl style/Makefile
	grove/Makefile spgrove/Makefile jade/Makefile dsssl/Makefile
	jadedoc/Makefile jadedoc/images/Makefile intl/Makefile contrib/Makefile
	unicode/Makefile po/Makefile.in])