-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfigure.ac
361 lines (294 loc) · 11.5 KB
/
configure.ac
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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
dnl -*- M4 -*-
AC_INIT(omniORB, 4.2.3, [email protected])
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(bin/scripts/omkdirhier)
AC_CONFIG_AUX_DIR(bin/scripts)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CONFIG_HEADERS(include/omniORB4/acconfig.h)
dnl to prevent error from autoreconf while crosscompiling
m4_pattern_allow(PKG_CONFIG_LIBDIR)
dnl ** CFLAGS / CXXFLAGS
if test "${CFLAGS+set}" != set; then
CFLAGS="-O"
fi
if test "${CXXFLAGS+set}" != set; then
CXXFLAGS="-O2"
fi
dnl ** Programs
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AM_PATH_PYTHON
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
dnl ** Cross compilation
if test "$cross_compiling" = yes; then
AC_PATH_PROG(OMNIIDL, omniidl, no)
if test "x$ac_cv_path_OMNIIDL" = "xno"; then
AC_MSG_ERROR(cannot find omniidl on the path)
fi
AC_PATH_PROG(OMKDEPEND, omkdepend, no)
if test "x$ac_cv_path_OMKDEPEND" = "xno"; then
AC_MSG_ERROR(cannot find omkdepend on the path)
fi
fi
AC_SUBST(CROSS_COMPILING, $cross_compiling)
AC_LANG(C++)
dnl OMNI_CHECK_NO_UNIT_AT_A_TIME
dnl if test "x$omni_cv_no_unit_at_a_time" = "xyes"
dnl then
dnl EXTRA_GCC_CXXFLAGS="-fno-unit-at-a-time"
dnl fi
AC_SUBST(EXTRA_GCC_CXXFLAGS)
dnl ** Libraries
OMNI_OPENSSL_ROOT
dnl ** Headers
AC_CHECK_HEADERS(errno.h fcntl.h netdb.h signal.h stdlib.h string.h strings.h)
AC_CHECK_HEADERS(unistd.h nan.h sys/if.h sys/ioctl.h sys/param.h sys/time.h)
AC_CHECK_HEADERS(sys/poll.h ifaddrs.h)
AC_HEADER_TIME
dnl ** Integer representation
AC_C_BIGENDIAN
AC_CHECK_SIZEOF(char, 1)
AC_CHECK_SIZEOF(unsigned char, 1)
AC_CHECK_SIZEOF(bool, 1)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(long long, 8)
AC_CHECK_SIZEOF(float, 4)
AC_CHECK_SIZEOF(double, 8)
AC_CHECK_SIZEOF(long double, 16)
AC_CHECK_SIZEOF(wchar_t, 4)
AC_CHECK_SIZEOF(void*, 4)
dnl ** Structs and members
AC_CHECK_TYPES([struct sockaddr_in6, struct sockaddr_storage, struct lifconf],,,
[#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>])
AC_CHECK_MEMBERS([struct sockaddr_in.sin_len, struct sockaddr_in.sin_zero],,,
[#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>])
dnl ** C++ features
AC_CXX_BOOL
AC_CXX_CONST_CAST
AC_CXX_DYNAMIC_CAST
AC_CXX_REINTERPRET_CAST
AC_CXX_NAMESPACES
AC_CXX_HAVE_STD
AC_CXX_MEMBER_CONSTANTS
OMNI_CXX_CATCH_BY_BASE
OMNI_CXX_NEED_FQ_BASE_CTOR
OMNI_CXX_COVARIANT_RETURNS
OMNI_CXX_LONG_IS_INT
dnl ** Libraries
AC_SEARCH_LIBS(getaddrinfo, [nsl socket])
dnl ** Functions
AC_LANG(C)
AC_CHECK_FUNCS(getaddrinfo gethostname getopt getpid gettimeofday)
AC_CHECK_FUNCS(getnameinfo inet_ntop)
AC_CHECK_FUNCS(isinf insinff isinfl localtime nanosleep poll rand_r sigaction)
AC_CHECK_FUNCS(sigvec snprintf strcasecmp strdup strerror strftime stricmp)
AC_CHECK_FUNCS(strncasecmp strtoul strtoull strtouq uname vprintf vsnprintf)
AC_FUNC_ALLOCA
AC_LANG(C++)
OMNI_HAVE_ISNANORINF
OMNI_HAVE_SIG_IGN
OMNI_GETTIMEOFDAY_TIMEZONE
OMNI_SOCKNAME_ARG
OMNI_SYNC_ADD_SUB_FETCH
dnl ** omniORB config
OMNI_CONFIG_FILE
OMNI_OMNINAMES_LOGDIR
OMNI_DISABLE_STATIC
OMNI_DISABLE_THREAD_TRACING
OMNI_DISABLE_IPV6_CHECK
OMNI_DISABLE_ALLOCA
OMNI_DISABLE_LONGDOUBLE
OMNI_DISABLE_ATOMIC
OMNI_ENABLE_ZIOP
OMNI_ENABLE_CFNETWORK
dnl ** Compiler name
compiler_name="Compiler_Unknown"
if test "$ac_cv_cxx_compiler_gnu" = "yes"; then
compiler_name="Compiler_GCC"
elif test `basename $CXX` = "KCC"; then
compiler_name="Compiler_KCC"
else
case "$host" in
*-*-solaris*)
if $CXX -V 2>&1 | grep '5\.[[0-9]]' >/dev/null 2>&1; then
compiler_name="Compiler_Sun5"
elif $CXX -V 2>&1 | grep '4\.[[0-9]]' >/dev/null 2>&1; then
compiler_name="Compiler_Sun4"
fi
;;
*-*-osf*)
# *UNK* We need to know how to ask DEC CXX what version it is
compiler_name="Compiler_DEC61"
;;
*-*-hpux*)
compiler_name="Compiler_aCC"
;;
*-*-irix*)
compiler_name="Compiler_SGI"
;;
*-*-aix*)
compiler_name="Compiler_xlC"
;;
esac
fi
AC_SUBST(COMPILER_NAME, $compiler_name)
dnl ** Platform name
plat_name="Platform_Unknown"
plat_def="__unknown_platform__"
os_v="0"
case "$host" in
*-*-linux-*) plat_name="Linux"; plat_def="__linux__"; os_v="2";;
*-*-uclinux-*) plat_name="Linux"; plat_def="__linux__"; os_v="2";;
*-*-cygwin*) plat_name="Cygwin"; plat_def="__cygwin__"; os_v="1";;
*-*-solaris*) plat_name="SunOS"; plat_def="__sunos__"; os_v="5";;
*-*-osf3*) plat_name="OSF1"; plat_def="__osf1__"; os_v="3";;
*-*-osf4*) plat_name="OSF1"; plat_def="__osf1__"; os_v="4";;
*-*-osf5*) plat_name="OSF1"; plat_def="__osf1__"; os_v="5";;
*-*-hpux10*) plat_name="HPUX"; plat_def="__hpux__"; os_v="10";;
*-*-hpux11*) plat_name="HPUX"; plat_def="__hpux__"; os_v="11";;
*-*-nextstep*) plat_name="NextStep"; plat_def="__nextstep__"; os_v="3";;
*-*-openstep*) plat_name="NextStep"; plat_def="__nextstep__"; os_v="3";;
*-*-irix*) plat_name="IRIX"; plat_def="__irix__"; os_v="6";;
*-*-aix*) plat_name="AIX"; plat_def="__aix__"; os_v="4";;
*-*-darwin*) plat_name="Darwin"; plat_def="__darwin__"; os_v="1";;
*-*-freebsd3*) plat_name="FreeBSD"; plat_def="__freebsd__"; os_v="3";;
*-*-freebsd4*) plat_name="FreeBSD"; plat_def="__freebsd__"; os_v="4";;
*-*-freebsd5*) plat_name="FreeBSD"; plat_def="__freebsd__"; os_v="5";;
*-*-freebsd6*) plat_name="FreeBSD"; plat_def="__freebsd__"; os_v="6";;
*-*-freebsd7*) plat_name="FreeBSD"; plat_def="__freebsd__"; os_v="7";;
*-*-freebsd8*) plat_name="FreeBSD"; plat_def="__freebsd__"; os_v="8";;
*-*-kfreebsd*) plat_name="kFreeBSD"; plat_def="__FreeBSD_kernel__"; os_v="6";;
*-*-netbsd*) plat_name="NetBSD"; plat_def="__netbsd__"; os_v="1";;
*-*-openbsd*) plat_name="OpenBSD"; plat_def="__openbsd__"; os_v="3";;
*-*-sco*) plat_name="OSR5"; plat_def="__osr5__"; os_v="5";;
*-*-gnu*) plat_name="GNU"; plat_def="__hurd__" ; os_v="0";;
esac
AC_SUBST(PLATFORM_NAME, $plat_name)
AC_SUBST(PLATFORM_DEFINE, $plat_def)
AC_SUBST(OSVERSION, $os_v)
dnl ** Processor
proc_name="UnknownProcessor"
proc_def="__processor_unknown__"
case "$host" in
i?86-*) proc_name="x86Processor"; proc_def="__x86__";;
x86_64-*) proc_name="x8664Processor"; proc_def="__x86_64__";;
sparc-*) proc_name="SparcProcessor"; proc_def="__sparc__";;
alpha*) proc_name="AlphaProcessor"; proc_def="__alpha__";;
m68k-*) proc_name="m68kProcessor"; proc_def="__m68k__";;
mips*) proc_name="IndigoProcessor"; proc_def="__mips__";;
arm-*) proc_name="ArmProcessor"; proc_def="__arm__";;
s390-*) proc_name="s390Processor"; proc_def="__s390__";;
ia64-*) proc_name="ia64Processor"; proc_def="__ia64__";;
hppa*) proc_name="HppaProcessor"; proc_def="__hppa__";;
powerpc*) proc_name="PowerPCProcessor"; proc_def="__powerpc__";;
esac
AC_SUBST(PROCESSOR_NAME, $proc_name)
AC_SUBST(PROCESSOR_DEFINE, $proc_def)
dnl ** Output
AC_CONFIG_FILES(mk/beforeauto.mk mk/afterauto.mk GNUmakefile)
AC_CONFIG_FILES(src/tool/omniidl/python/scripts/omniidl)
AC_CONFIG_FILES(src/tool/omniidl/python3/scripts/omniidl)
AC_CONFIG_FILES(src/appl/GNUmakefile
src/appl/omniMapper/GNUmakefile
src/appl/omniNames/GNUmakefile
src/appl/utils/catior/GNUmakefile
src/appl/utils/convertior/GNUmakefile
src/appl/utils/GNUmakefile
src/appl/utils/genior/GNUmakefile
src/appl/utils/nameclt/GNUmakefile
src/GNUmakefile
src/examples/ami/GNUmakefile
src/examples/anyExample/GNUmakefile
src/examples/bidir/GNUmakefile
src/examples/boa/GNUmakefile
src/examples/call_back/GNUmakefile
src/examples/dii/GNUmakefile
src/examples/GNUmakefile
src/examples/dsi/GNUmakefile
src/examples/echo/GNUmakefile
src/examples/poa/GNUmakefile
src/examples/poa/implicit_activation/GNUmakefile
src/examples/poa/persistent_objref/GNUmakefile
src/examples/poa/servant_manager/GNUmakefile
src/examples/poa/threading/GNUmakefile
src/examples/poa/shortcut/GNUmakefile
src/examples/ssl_echo/GNUmakefile
src/examples/thread/GNUmakefile
src/examples/valuetype/GNUmakefile
src/examples/valuetype/simple/GNUmakefile
src/examples/ziop/GNUmakefile
src/lib/GNUmakefile
src/lib/omniORB/codesets/GNUmakefile
src/lib/omniORB/GNUmakefile
src/lib/omniORB/dynamic/GNUmakefile
src/lib/omniORB/python/omniidl_be/cxx/GNUmakefile
src/lib/omniORB/python/omniidl_be/cxx/dynskel/GNUmakefile
src/lib/omniORB/python/omniidl_be/cxx/header/GNUmakefile
src/lib/omniORB/python/omniidl_be/cxx/impl/GNUmakefile
src/lib/omniORB/python/omniidl_be/cxx/skel/GNUmakefile
src/lib/omniORB/python/omniidl_be/GNUmakefile
src/lib/omniORB/python/GNUmakefile
src/lib/omniORB/python3/omniidl_be/cxx/GNUmakefile
src/lib/omniORB/python3/omniidl_be/cxx/dynskel/GNUmakefile
src/lib/omniORB/python3/omniidl_be/cxx/header/GNUmakefile
src/lib/omniORB/python3/omniidl_be/cxx/impl/GNUmakefile
src/lib/omniORB/python3/omniidl_be/cxx/skel/GNUmakefile
src/lib/omniORB/python3/omniidl_be/GNUmakefile
src/lib/omniORB/python3/GNUmakefile
src/lib/omniORB/orbcore/GNUmakefile
src/lib/omniORB/orbcore/ssl/GNUmakefile
src/lib/omniORB/connections/GNUmakefile
src/lib/omniORB/ziop/GNUmakefile
src/lib/omniORB/ziopdynamic/GNUmakefile
src/lib/omnithread/GNUmakefile
src/services/GNUmakefile
src/services/mklib/GNUmakefile
src/services/mklib/stublib/GNUmakefile
src/services/mklib/dynstublib/GNUmakefile
src/services/mklib/mkBOAlib/GNUmakefile
src/tool/GNUmakefile
src/tool/omkdepend/GNUmakefile
src/tool/omniidl/cxx/cccp/GNUmakefile
src/tool/omniidl/cxx/GNUmakefile
src/tool/omniidl/GNUmakefile
src/tool/omniidl/python/GNUmakefile
src/tool/omniidl/python/omniidl_be/GNUmakefile
src/tool/omniidl/python/omniidl/GNUmakefile
src/tool/omniidl/python/scripts/GNUmakefile
src/tool/omniidl/python3/GNUmakefile
src/tool/omniidl/python3/omniidl_be/GNUmakefile
src/tool/omniidl/python3/omniidl/GNUmakefile
src/tool/omniidl/python3/scripts/GNUmakefile
)
AC_CONFIG_FILES(include/GNUmakefile
include/omniconfig.h
include/omnithread/GNUmakefile
include/omniORB4/GNUmakefile
include/omniORB4/internal/GNUmakefile)
AC_CONFIG_FILES(idl/GNUmakefile
idl/COS/GNUmakefile)
AC_CONFIG_FILES(etc/init.d/omniNames)
AC_CONFIG_FILES(contrib/GNUmakefile
contrib/pkgconfig/GNUmakefile)
AC_OUTPUT([
contrib/pkgconfig/omnithread3.pc
contrib/pkgconfig/omniORB4.pc
contrib/pkgconfig/omniDynamic4.pc
contrib/pkgconfig/omniCOS4.pc
contrib/pkgconfig/omniCOSDynamic4.pc
contrib/pkgconfig/omniConnectionMgmt4.pc
contrib/pkgconfig/omniZIOP4.pc
contrib/pkgconfig/omniZIOPDynamic4.pc
])