-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
734 lines (682 loc) · 20.5 KB
/
configure.in
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
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
dnl Process this file with autoconf to produce a configure script.
dnl
dnl *******************WARNING****************************
dnl Using an autoconf later than 2.61 will result in configure
dnl failing to run on QNX4
dnl *******************WARNING****************************
AC_INIT(Regina Rexx Interpreter, m4_esyscmd_s([grep VER_DOT ./regina.ver | cut -f 2 -d '=']),mark@rexx.org, regina-rexx)
AC_PREFIX_DEFAULT(/usr/local)
. $srcdir/regina.ver
VERSION_NODOT=\"$VER\"
VERSION=\"$VER_DOT\"
VERSION_UNQUOTED=$VER_DOT
VER_DATE=\"$VER_DATE\"
AC_SUBST(VERSION)
AC_SUBST(VERSION_UNQUOTED)
AC_SUBST(VERSION_NODOT)
AC_SUBST(VER_DATE)
AC_SUBST(VER_MAJOR)
AC_SUBST(VER_MINOR)
AC_SUBST(VER_RELEASE)
AC_SUBST(VER_SUPP)
AC_SUBST(VER_SOMAJOR)
AC_SUBST(VER_SOMINOR)
REGINA_PACKAGE_NAME="regina-rexx"
AC_SUBST(REGINA_PACKAGE_NAME)
MH_SET_FULL_PACKAGE_NAME($REGINA_PACKAGE_NAME,$VER_DOT)
cp $srcdir/common/config.guess $srcdir
cp $srcdir/common/config.sub $srcdir
dnl ---------------------- check for C compiler -----------------
dnl Checks for one of the C compilers below - change if yours not there.
MH_PROG_CC
AC_CONFIG_HEADER(config.h)
AC_ISC_POSIX
dnl Checks for system first
AC_CANONICAL_SYSTEM
MH_HAVE_PROTO
if test "$mh_have_proto" = "no"; then
AC_MSG_ERROR(Regina requires an ANSI compiler; cannot continue)
fi
dnl
dnl include our 32/64bit tests
dnl
sinclude(common/inclibarch.m4)
mymakefile="Makefile"
on_qnx4=no
on_beos=no
on_haiku=no
gci_available=no
GCI_CONVERT_HEADER="gci_convert.unsupported"
case "$target" in
*hp-hpux*)
SYS_DEFS="-D_HPUX_SOURCE"
;;
*ibm-aix*)
SYS_DEFS="-D_ALL_SOURCE"
# mymakefile="Makefile.aix"
;;
*apple-darwin*)
dnl valid_arch_flags is set in inclibarch.m4
SYS_DEFS="$valid_arch_flags"
EEXTRA="$valid_arch_flags"
;;
*dec-osf*)
;;
*sequent-dynix*)
;;
i*86*solaris*)
GCI_CONVERT_HEADER="gci_convert.solaris.i86"
gci_available=yes
;;
*solaris*)
GCI_CONVERT_HEADER="gci_convert.solaris.sparc"
gci_available=yes
;;
sparc*sunos*)
;;
*86_64-*linux*)
GCI_CONVERT_HEADER="gci_convert.linux.86_64"
gci_available=yes
;;
i*86-*linux*|*-k*bsd-gnu*|*-gnu*)
GCI_CONVERT_HEADER="gci_convert.linux.i86"
gci_available=yes
;;
alpha*-*linux*)
GCI_CONVERT_HEADER="gci_convert.linux.alpha"
gci_available=yes
;;
powerpc64-*linux*)
GCI_CONVERT_HEADER="gci_convert.linux.powerpc64"
gci_available=yes
;;
*cygwin*)
GCI_CONVERT_HEADER="gci_convert.cygwin.i86"
gci_available=yes
;;
*apple-darwin*)
GCI_CONVERT_HEADER="gci_convert.macX.all"
gci_available=yes
;;
*nto-qnx*)
;;
*qnx*)
on_qnx4=yes
SYS_DEFS="-Q"
;;
*beos*)
on_beos=yes
;;
*haiku*)
on_haiku=yes
;;
*minix*)
SYS_DEFS="-D__MINIX__"
;;
esac
AC_SUBST(SYS_DEFS)
AC_SUBST(GCI_CONVERT_HEADER)
dnl Check for dynamic shared library support libraries
#MH_EXTRA_LIBS=""
#MH_CHECK_LIB(dld dl)
#SHLIBS="${MH_EXTRA_LIBS}"
dnl Check for extra required libraries - don't include libfl or libl
#MH_EXTRA_LIBS=""
#MH_CHECK_LIB(m nsl nsl_s socket net network)
dnl -- check for crypt library and function
REG_CHECK_CRYPT
if test "$on_qnx4" = "no"; then
AC_PROG_LEX
fi
#BOTHLIBS="${LEXLIB} ${MH_EXTRA_LIBS}"
AC_PROG_RANLIB
dnl --------------------- Check for other programs. ---------------
AC_PROG_LN_S
AC_PROG_MAKE_SET
dnl -------------------- Checks for header files. -----------------
AC_HEADER_STDC
AC_CHECK_HEADERS( \
arpa/inet.h \
assert.h \
ctype.h \
crypt.h \
dl.h \
dlfcn.h \
errno.h \
fcntl.h \
fnmatch.h \
grp.h \
readline/history.h \
iconv.h \
inttypes.h \
limits.h \
malloc.h \
math.h \
memory.h \
ncurses.h \
netdb.h \
netinet/in.h \
paths.h \
poll.h \
process.h \
pwd.h \
readline/readline.h \
setjmp.h \
share.h \
signal.h \
socket.h \
stdarg.h \
stdio.h \
statvfs.h \
stdlib.h \
stdint.h \
string.h \
sys/ioctl.h \
sys/mount.h \
sys/poll.h \
sys/resource.h \
sys/select.h \
sys/socket.h \
sys/stat.h \
sys/statfs.h \
sys/statvfs.h \
sys/mman.h \
sys/time.h \
sys/utsname.h \
sys/wait.h \
term.h \
termcap.h \
time.h \
unistd.h \
vfs.h
)
AC_CHECK_FUNCS(sysconf div raise putenv usleep random ftruncate \
memcpy memmove strerror strerror_r gettimeofday ftime poll \
_fullpath vsprintf _splitpath2 _splitpath sigaction strtof \
lstat mkstemp inet_ntop gmtime_r localtime_r \
getgrgid_r getpwuid_r gethostbyname_r \
atoll fseeko ftello getopt_long \
readlink realpath getbootfile tgetstr statfs mbstowcs mmap iconv)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
REG_CHECK_CC_O
REG_CHECK__SIGHANDLER_T
REG_STRUCT_RANDOM_DATA
REG_CHECK_BUILTIN_RETURN_ADDRESS
MH_C_LONG_LONG
REG_CHECK_TYPE_SOCKLEN_T
AC_CHECK_TYPES([union semun],[],[],
[#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>])
REG_CHECK_F_MNTFROMNAME
dnl Checks for library functions.
AC_FUNC_MEMCMP
AC_FUNC_ALLOCA
if test $ac_cv_func_alloca_works = yes; then
ALLOCA=""
ALLOCA_SHO=""
ALLOCA_TSO=""
else
ALLOCA="alloca.o"
ALLOCA_SHO="alloca.so.o"
ALLOCA_TSO="alloca.tso.o"
fi
AC_SUBST(ALLOCA)
AC_SUBST(ALLOCA_SHO)
AC_SUBST(ALLOCA_TSO)
dnl
dnl Test for fnmatch
dnl
if test $ac_cv_header_fnmatch_h = yes; then
FNMATCH=""
FNMATCH_SHO=""
FNMATCH_TSO=""
else
FNMATCH="fnmatch.o"
FNMATCH_SHO="fnmatch.so.o"
FNMATCH_TSO="fnmatch.tso.o"
fi
AC_SUBST(FNMATCH)
AC_SUBST(FNMATCH_SHO)
AC_SUBST(FNMATCH_TSO)
dnl --------------- allow --disable-screen to disable terminal functions
AC_ARG_ENABLE(screen,
[ --disable-screen disable terminal functions],
[with_screen=$enableval],
[with_screen=yes],
)
if test "$with_screen" = no; then
SCREEN_FUNCS="-DNOSCREEN_FUNCS"
REGSCREENUX=""
else
SCREEN_FUNCS=""
REGSCREENUX="regscreenux.\$(OBJ)"
fi
AC_SUBST(SCREEN_FUNCS)
AC_SUBST(REGSCREENUX)
dnl
dnl where are termcap functions
REGUTIL_TERM_LIB=""
#if test "$on_qnx4" = "no"; then
save_LIBS="$LIBS"
AC_SEARCH_LIBS(tgetent,[ncurses termcap curses termlib],REGUTIL_TERM_LIB="$ac_cv_search_tgetent",REGUTIL_TERM_LIB="")
if test "$REGUTIL_TERM_LIB" = "none required" -o "$REGUTIL_TERM_LIB" = "no" -o "$with_screen" = "no"; then
REGUTIL_TERM_LIB=""
fi
LIBS="$save_LIBS"
#fi
dnl where are math functions
REGUTIL_MATH_LIB=""
#if test "$on_qnx4" = "no"; then
save_LIBS="$LIBS"
AC_SEARCH_LIBS(log10,[m c],REGUTIL_MATH_LIB="$ac_cv_search_log10",REGUTIL_MATH_LIB="")
if test "$REGUTIL_MATH_LIB" = "none required" -o "$REGUTIL_MATH_LIB" = "no"; then
REGUTIL_MATH_LIB=""
fi
LIBS="$save_LIBS"
#fi
dnl
dnl where are readline functions
REGUTIL_READLINE_LIB=""
#if test "$on_qnx4" = "no"; then
save_LIBS="$LIBS"
AC_SEARCH_LIBS(add_history,[readline],REGUTIL_READLINE_LIB="$ac_cv_search_add_history",REGUTIL_READLINE_LIB="")
if test "$REGUTIL_READLINE_LIB" = "none required" -o "$REGUTIL_READLINE_LIB" = "no"; then
REGUTIL_READLINE_LIB=""
fi
LIBS="$save_LIBS"
#fi
dnl where is crypt
save_LIBS="$LIBS"
AC_SEARCH_LIBS(crypt,crypt,REGINA_CRYPT_LIB="$ac_cv_search_crypt",REGINA_CRYPT_LIB="")
if test "$REGINA_CRYPT_LIB" = "none required" -o "$REGINA_CRYPT_LIB" = "no"; then
REGINA_CRYPT_LIB=""
fi
LIBS="$save_LIBS"
save_LIBS="$LIBS"
AC_SEARCH_LIBS(dlopen,dl,REGINA_DLOPEN_LIB="$ac_cv_search_dlopen",REGINA_DLOPEN_LIB="")
if test "$REGINA_DLOPEN_LIB" = "none required" -o "$REGINA_DLOPEN_LIB" = "no"; then
REGINA_DLOPEN_LIB=""
fi
LIBS="$save_LIBS"
save_LIBS="$LIBS"
AC_SEARCH_LIBS(shl_load,dld,REGINA_SHL_LOAD_LIB="$ac_cv_search_shl_load",REGINA_SHL_LOAD_LIB="")
if test "$REGINA_SHL_LOAD_LIB" = "none required" -o "$REGINA_SHL_LOAD_LIB" = "no"; then
REGINA_SHL_LOAD_LIB=""
fi
LIBS="$save_LIBS"
save_LIBS="$LIBS"
AC_SEARCH_LIBS(socket,[socket network],REGINA_SOCKET_LIB="$ac_cv_search_socket",REGINA_SOCKET_LIB="")
if test "$REGINA_SOCKET_LIB" = "none required" -o "$REGINA_SOCKET_LIB" = "no"; then
REGINA_SOCKET_LIB=""
fi
LIBS="$save_LIBS"
save_LIBS="$LIBS"
AC_SEARCH_LIBS(gethostbyname,[nsl socket network],REGINA_GETHOSTBYNAME_LIB="$ac_cv_search_gethostbyname",REGINA_GETHOSTBYNAME_LIB="")
if test "$REGINA_GETHOSTBYNAME_LIB" = "none required" -o "$REGINA_GETHOSTBYNAME_LIB" = "no"; then
REGINA_GETHOSTBYNAME_LIB=""
fi
LIBS="$save_LIBS"
AC_SUBST(REGUTIL_TERM_LIB)
AC_SUBST(REGUTIL_MATH_LIB)
#MH_CHECK_LIB(m nsl nsl_s socket net network)
dnl
dnl include our debugging switch checking
dnl
sinclude(common/incdebug.m4)
dnl --------------- allow --with-staticfunctions to enable linking external function packages statically
dnl must be called before MH_SHARED_LIBRARY
AC_ARG_WITH(staticfunctions,
[ --with-staticfunctions enable static linking of external function packages],
[with_staticfunctions=$withval],
[with_staticfunctions=no],
)
if test "$with_staticfunctions" = "yes" -o "$on_qnx4" = "yes"; then
build_static="yes"
else
build_static="no"
fi
dnl --------------- allow --enable-orexx-binary-compatible to enable binary compatibility with ORexx
AC_ARG_ENABLE(orexx-binary-compatible,
[ --enable-orexx-binary-compatible enable binary compatibility with ORexx],
[with_orexx_bc=$enableval],
[with_orexx_bc=no],
)
if test "$with_orexx_bc" = yes; then
OREXX_BINARY_COMPATIBLE="1"
AC_DEFINE(OREXX_BINARY_COMPATIBLE)
fi
dnl --------------- allow --disable-posix-threads to disable multi-threading
AC_ARG_ENABLE(posix-threads,
[ --disable-posix-threads disable POSIX-style multi-threading],
[enable_posix_threads=no],
[enable_posix_threads=yes],
)
dnl if we are building statically, force thread support off
if test "$build_static" = "yes"; then
enable_posix_threads="no"
fi
dnl --------------- allow --disable-gci to disable General Call Interface
AC_ARG_ENABLE(gci,
[ --disable-gci disable General Call Interface],
[with_gci=no],
[with_gci=$gci_available],
)
if test "$with_gci" = yes; then
GCI_SHO="gci_call.so.o gci_convert.so.o gci_execute.so.o gci_helper.so.o gci_prepare.so.o gci_reginabridge.so.o gci_rxfuncdefine.so.o gci_tree.so.o"
HAVE_GCI="-DHAVE_GCI -I\$(gcidir)"
else
GCI_SHO=""
HAVE_GCI=""
fi
AC_SUBST(GCI_SHO)
AC_SUBST(HAVE_GCI)
if test "$ac_cv_func_getopt_long" = yes; then
MY_GETOPT_O=
MY_GETOPT_SO_O=
else
MY_GETOPT_O="mygetopt.\$(OBJ)"
MY_GETOPT_SO_O="mygetopt.so.\$(OBJ)"
fi
AC_SUBST(MY_GETOPT_O)
AC_SUBST(MY_GETOPT_SO_O)
if test "$ac_cv_prog_CC" = "gcc" -o "$ac_cv_prog_CC" = "g++"; then
REG_CHECK_GCC_VERSION_SCRIPT
fi
dnl enable_posix_threads="yes"
REG_CHECK_POSIX_THREADS
if test "$mh_has_pthreads" = yes; then
AC_SEARCH_LIBS(pthread_exit,[pthread pthreads c_r],REGINA_PTHREAD_LIB="$ac_cv_search_pthread_exit",REGINA_PTHREAD_LIB="")
if test "$REGINA_PTHREAD_LIB" = "none required" -o "$REGINA_PTHREAD_LIB" = "no"; then
AC_SEARCH_LIBS(sem_init,[pthread pthreads c_r],REGINA_PTHREAD_LIB="$ac_cv_search_sem_init",REGINA_PTHREAD_LIB="")
if test "$REGINA_PTHREAD_LIB" = "none required" -o "$REGINA_PTHREAD_LIB" = "no"; then
REGINA_PTHREAD_LIB=""
fi
fi
save_cflags="$CFLAGS"
CFLAGS="$CFLAGS $THREADING_COMPILE"
#
# Where we know the format of getgrgid_r() function
# only test for that case
#
if test "$ac_cv_func_getgrgid_r" = yes; then
REG_GETGRGID_R_INT_RETURN_5_PARAMS
if test "$mh_cv_getgrgid_r_int5" = "no"; then
REG_GETGRGID_R_INT_RETURN_4_PARAMS
if test "$mh_cv_getgrgid_r_int4" = "no"; then
REG_GETGRGID_R_STRUCT_RETURN
if test "$mh_cv_getgrgid_r_int4" = "no"; then
REG_GETGRGID_R_STRUCT_RETURN
fi
fi
fi
fi
if test "$ac_cv_func_getpwuid_r" = yes; then
REG_GETPWUID_R_INT_RETURN
if test "$mh_cv_getpwuid_r_int" = "no"; then
REG_GETPWUID_R_STRUCT_RETURN
fi
fi
if test "$ac_cv_func_gethostbyname_r" = yes; then
REG_GETHOSTBYNAME_R_INT_RETURN_6_PARAMS
if test "$mh_cv_gethostbyname_r_int6" = "no"; then
REG_GETHOSTBYNAME_R_STRUCT_RETURN_5_PARAMS
fi
fi
CFLAGS="$save_cflags"
REGINAMULTITHREAD="yes"
else
REGINAMULTITHREAD="no"
fi
AC_SUBST(REGINAMULTITHREAD)
if test "$build_static" = "yes"; then
STATICLD_SHO="staticld.so.o rxpack.so.o"
if test "$on_qnx4" = "yes"; then
with_regutil="yes"
REG_STATIC_LOADING(regutil)
else
REG_STATIC_LOADING
fi
else
STATICLD_SHO=""
dnl --------------- Check how to make shared libraries -------------------
dnl REG_SHARED_LIBRARY must be called after determining if POSIX threads is specified
REG_SHARED_LIBRARY
dnl --------------- Check if underscore is needed in loadable modules ----
dnl MH_CHECK_LEADING_USCORE must be called after processing --with-dlfcn[inc,lib]dir switches
MH_CHECK_LEADING_USCORE
fi
AC_SUBST(STATICLD_SHO)
REG_SET_SHLPST
dnl
dnl Check for large file support
dnl
MH_LARGE_FILE_SUPPORT
dnl libraries for libregina.so.*
#if test "$with_staticfunctions" = "yes"; then
# DYNAMIC_LIBRARY_LIBS=""
#else
# DYNAMIC_LIBRARY_LIBS="$REGINA_CRYPT_LIB $REGINA_PTHREAD_LIB $REGINA_DLOPEN_LIB $REGINA_SHL_LOAD_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB"
# DYNAMIC_REGUTIL_TERM_LIB="$REGUTIL_TERM_LIB"
# AC_SUBST(DYNAMIC_REGUTIL_TERM_LIB)
#fi
#AC_SUBST(DYNAMIC_LIBRARY_LIBS)
dnl libraries for regina, execiser
#DYNAMIC_BINARY_LIBS="-L. -lregina"
#AC_SUBST(DYNAMIC_BINARY_LIBS)
dnl libraries for binaries associated with external queues; rxqueue, rxstack
STACK_BINARY_LIBS="$REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB"
AC_SUBST(STACK_BINARY_LIBS)
dnl libraries for rexx
REXX_BINARY_LIBS="$REGINA_CRYPT_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB $REGUTIL_TERM_LIB $REGUTIL_MATH_LIB $REGUTIL_READLINE_LIB $REGINA_PTHREAD_LIB"
AC_SUBST(REXX_BINARY_LIBS)
#STATIC_BINARY_LIBS="$REGINA_CRYPT_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB $REGUTIL_TERM_LIB $REGINA_PTHREAD_LIB"
#AC_SUBST(STATIC_BINARY_LIBS)
if test "$build_static" = "yes"; then
dnl libraries for adding to regina-config --libs
REGINA_CONFIG_LIBS="$REGINA_CRYPT_LIB $REGINA_PTHREAD_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB $REGUTIL_TERM_LIB $REGUTIL_READLINE_LIB $REGUTIL_MATH_LIB"
dnl libraries for libregina.lib
LIBREGINA_BINARY_LIBS=""
dnl libraries for libregutil
LIBREGUTIL_BINARY_LIBS=""
dnl libraries for regina
REGINA_BINARY_LIBS="${MH_FUNC_LIBS} -L. -lregina $REGINA_CRYPT_LIB $REGINA_PTHREAD_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB $REGUTIL_TERM_LIB $REGUTIL_READLINE_LIB $REGUTIL_MATH_LIB"
dnl libraries for threader
THREADER_BINARY_LIBS="-L. -lrexx $REGINA_PTHREAD_LIB"
dnl libraries for execiser
EXECISER_BINARY_LIBS="-L. -lrexx $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB"
else
dnl libraries for adding to regina-config --libs
REGINA_CONFIG_LIBS=""
dnl libraries for libregina.so
LIBREGINA_BINARY_LIBS="$REGINA_CRYPT_LIB $REGINA_PTHREAD_LIB $REGINA_DLOPEN_LIB $REGINA_SHL_LOAD_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB"
dnl libraries for libregutil
LIBREGUTIL_BINARY_LIBS="$REGUTIL_TERM_LIB $REGUTIL_READLINE_LIB $REGUTIL_MATH_LIB"
dnl libraries for regina
REGINA_BINARY_LIBS="-L. -lregina"
dnl libraries for threader
THREADER_BINARY_LIBS="-L. -lregina $REGINA_PTHREAD_LIB"
dnl libraries for execiser
EXECISER_BINARY_LIBS="-L. -lregina"
fi
AC_SUBST(LIBREGINA_BINARY_LIBS)
AC_SUBST(LIBREGUTIL_BINARY_LIBS)
AC_SUBST(REGINA_BINARY_LIBS)
AC_SUBST(THREADER_BINARY_LIBS)
AC_SUBST(EXECISER_BINARY_LIBS)
AC_SUBST(REGINA_CONFIG_LIBS)
dnl --------------- allow --enable-tracemem to enable internal memory tracing
AC_ARG_ENABLE(tracemem,
[ --enable-tracemem enable memory tracing in debug mode],
[with_tracemem=$enableval],
[with_tracemem=no],
)
if test "$with_tracemem" = yes; then
TRACEMEM="-DTRACEMEM"
else
TRACEMEM=""
fi
AC_SUBST(TRACEMEM)
dnl --------------- allow --disable-flists to disable memory functions
AC_ARG_ENABLE(flists,
[ --disable-flists disable memory management functions],
[with_flists=$enableval],
[with_flists=yes],
)
if test "$with_flists" = no; then
FLISTS="-DNOFLISTS"
else
FLISTS=""
fi
AC_SUBST(FLISTS)
dnl --------------- allow --with-socket to specify socket for rxstack
AC_ARG_WITH(socket,
[ --with-socket=9999 socket to use for external queues (default 5757)],
[with_socket=$withval],
[with_socket=no],
)
if test "$with_socket" = no; then
REXXSOCKET=""
else
REXXSOCKET="-DRXSOCKET=$with_socket"
fi
AC_SUBST(REXXSOCKET)
dnl --------------- allow --with-addon-dir to specify location of external function packages
AC_ARG_WITH(addon-dir,
[ --with-addon-dir=dir location of external function packages (default blank)],
[addonsdir=$withval],
[addonsdir=$libdir/regina-rexx/addons],
)
AC_DEFINE_DIR(HAVE_REGINA_ADDON_DIR,"$addonsdir")
AC_SUBST(addonsdir)
dnl
#MH_CHECK_RPM
MH_CHECK_PACKAGE_BUILDERS()
MH_GET_DISTRO_NAME()
REG_HAVE_SYSTEMD()
dnl --------------- Force definition of pre-compiler macro UNIX ----------
AC_DEFINE(UNIX)
dnl --------------- Check what compiler switch sets unsigned char ----------
REG_CHECK_UNSIGNED_CHAR_COMPILER_SWITCH()
dnl AC_OUTPUT(Makefile)
AC_OUTPUT($mymakefile regina-config rxstack.init.d libregina.pc APKBUILD PackageInfo PackageInfo-devel PackageInfo-lib Regina.spec debian/rules)
chmod 755 regina-config
echo
echo "Regina ($FULL_PACKAGE_NAME) has now been configured with the following options:"
echo
if test "x$SHL_TARGETS" = "x"; then
echo " Dynamic Loading Support: none"
else
echo " Dynamic Loading Support: supported. Extra components: $SHL_TARGETS"
fi
if test "$with_dlfcnincdir" != no ; then
echo " dlfcn headers in: $with_dlfcnincdir"
fi
if test "$with_dlfcnlibdir" != no ; then
echo " dlfcn libraries in: $with_dlfcnlibdir"
fi
myopts="${bitflag}BIT"
if test "$with_debug" = yes ; then
myopts="$myopts DEBUG"
fi
if test "$with_purify" = yes ; then
myopts="$myopts PURIFY"
fi
if test "$with_efence" = yes; then
myopts="$myopts EFENCE"
fi
if test "$with_orexx_bc" = yes; then
myopts="$myopts OREXX_BINARY"
fi
if test "$with_gci" = yes; then
myopts="$myopts GCI"
fi
if test "$with_flists" = no; then
myopts="$myopts NO_FLISTS"
fi
if test "$with_socket" = no; then
myopts="$myopts"
else
myopts="$myopts SOCKET=$with_socket"
fi
if test "$build_static" = "yes"; then
myfuncs=""
if test "$with_testpackage" = "yes"; then
myfuncs="$myfuncs test"
fi
if test "$with_regutil" = "yes"; then
myfuncs="$myfuncs regutil"
fi
if test "$with_rexxcurses" = "yes"; then
myfuncs="$myfuncs rexxcurses"
fi
if test "$with_rexxtk" = "yes"; then
myfuncs="$myfuncs rexxtk"
fi
if test "$with_rexxgd" = "yes"; then
myfuncs="$myfuncs rexxgd"
fi
if test "$with_rexxcurl" = "yes"; then
myfuncs="$myfuncs rexxcurl"
fi
if test "$with_rexxsql" = "yes"; then
myfuncs="$myfuncs rexxsql"
fi
if test "$with_rexxeec" = "yes"; then
myfuncs="$myfuncs rexxeec"
fi
if test "$with_rexxisam" = "yes"; then
myfuncs="$myfuncs rexxisam"
fi
if test "$with_rxsock" = "yes"; then
myfuncs="$myfuncs rxsock"
fi
if test "$with_rexxdw" = "yes"; then
myfuncs="$myfuncs rexxdw"
fi
if test "$with_rexxcsv" = "yes"; then
myfuncs="$myfuncs rexxcsv"
fi
if test "$with_rexxpdf" = "yes"; then
myfuncs="$myfuncs rexxpdf"
fi
if test "$with_rexxws" = "yes"; then
myfuncs="$myfuncs rexxws"
fi
echo " Static Loaded Packages: $myfuncs"
fi
if test "$on_beos" = yes; then
bindir="/boot/home/config/bin"
libdir="/boot/home/config/lib"
fi
if test "$on_haiku" = yes; then
bindir="/boot/home/config/non-packaged/bin"
libdir="/boot/home/config/non-packaged/lib"
addonsdir="/boot/home/config/non-packaged/lib/regina-rexx/addons"
fi
echo " Build options: $myopts"
echo " binaries will be installed in: $bindir"
if test "x$binarybitprefix" = "x32"; then
echo " binaries will have '32' appended to them. eg rexx32, regina32"
fi
echo " libraries will be installed in: $libdir"
echo " addons will be installed in: $addonsdir"
echo " {prefix}: $prefix"
echo " {exec_prefix}: $exec_prefix"
if test "x$rpmtopdir" != "x" ; then
echo " RPM topdir: $rpmtopdir"
fi
if test "x$debtopdir" != "x" ; then
echo " DEB topdir: $debtopdir"
fi
if test "x$apktopdir" != "x" ; then
echo " APK topdir: $apktopdir"
fi
echo
echo "To build the Regina binaries, and dynamically loadable libraries, type 'make'"
echo "To install Regina in the above directories, type 'make install'"
echo