Debian Codegraph @

configure.in

raw ◀ ▶
3 Debian patches touch this file
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
3 dnl *******************WARNING****************************
4 dnl Using an autoconf later than 2.61 will result in configure
5 dnl failing to run on QNX4
6 dnl *******************WARNING****************************
7 AC_INIT(Regina Rexx Interpreter, m4_esyscmd_s([grep VER_DOT ./regina.ver | cut -f 2 -d '=']),[email protected], regina-rexx)
8 AC_PREFIX_DEFAULT(/usr/local)
9
10 . $srcdir/regina.ver
11 VERSION_NODOT=\"$VER\"
12 VERSION=\"$VER_DOT\"
13 VERSION_UNQUOTED=$VER_DOT
14 VER_DATE=\"$VER_DATE\"
15 AC_SUBST(VERSION)
16 AC_SUBST(VERSION_UNQUOTED)
17 AC_SUBST(VERSION_NODOT)
18 AC_SUBST(VER_DATE)
19 AC_SUBST(VER_MAJOR)
20 AC_SUBST(VER_MINOR)
21 AC_SUBST(VER_RELEASE)
22 AC_SUBST(VER_SUPP)
23 AC_SUBST(VER_SOMAJOR)
24 AC_SUBST(VER_SOMINOR)
25 REGINA_PACKAGE_NAME="regina-rexx"
26 AC_SUBST(REGINA_PACKAGE_NAME)
27 MH_SET_FULL_PACKAGE_NAME($REGINA_PACKAGE_NAME,$VER_DOT)
28 cp $srcdir/common/config.guess $srcdir
29 cp $srcdir/common/config.sub $srcdir
30
31 dnl ---------------------- check for C compiler -----------------
32 dnl Checks for one of the C compilers below - change if yours not there.
33 MH_PROG_CC
34
35 AC_CONFIG_HEADER(config.h)
36 AC_ISC_POSIX
37
38 dnl Checks for system first
39 AC_CANONICAL_SYSTEM
40
41 MH_HAVE_PROTO
42 if test "$mh_have_proto" = "no"; then
43 AC_MSG_ERROR(Regina requires an ANSI compiler; cannot continue)
44 fi
45
46 dnl
47 dnl include our 32/64bit tests
48 dnl
49 sinclude(common/inclibarch.m4)
50
51 mymakefile="Makefile"
52 on_qnx4=no
53 on_beos=no
54 on_haiku=no
55 gci_available=no
56 GCI_CONVERT_HEADER="gci_convert.unsupported"
57 case "$target" in
58 *hp-hpux*)
59 SYS_DEFS="-D_HPUX_SOURCE"
60 ;;
61 *ibm-aix*)
62 SYS_DEFS="-D_ALL_SOURCE"
63 # mymakefile="Makefile.aix"
64 ;;
65 *apple-darwin*)
66 dnl valid_arch_flags is set in inclibarch.m4
67 SYS_DEFS="$valid_arch_flags"
68 EEXTRA="$valid_arch_flags"
69 ;;
70 *dec-osf*)
71 ;;
72 *sequent-dynix*)
73 ;;
74 i*86*solaris*)
75 GCI_CONVERT_HEADER="gci_convert.solaris.i86"
76 gci_available=yes
77 ;;
78 *solaris*)
79 GCI_CONVERT_HEADER="gci_convert.solaris.sparc"
80 gci_available=yes
81 ;;
82 sparc*sunos*)
83 ;;
84 *86_64-*linux*)
85 GCI_CONVERT_HEADER="gci_convert.linux.86_64"
86 gci_available=yes
87 ;;
88 i*86-*linux*|*-k*bsd-gnu*|*-gnu*)
89 GCI_CONVERT_HEADER="gci_convert.linux.i86"
90 gci_available=yes
91 ;;
92 alpha*-*linux*)
93 GCI_CONVERT_HEADER="gci_convert.linux.alpha"
94 gci_available=yes
95 ;;
96 powerpc64-*linux*)
97 GCI_CONVERT_HEADER="gci_convert.linux.powerpc64"
98 gci_available=yes
99 ;;
100 *cygwin*)
101 GCI_CONVERT_HEADER="gci_convert.cygwin.i86"
102 gci_available=yes
103 ;;
104 *apple-darwin*)
105 GCI_CONVERT_HEADER="gci_convert.macX.all"
106 gci_available=yes
107 ;;
108 *nto-qnx*)
109 ;;
110 *qnx*)
111 on_qnx4=yes
112 SYS_DEFS="-Q"
113 ;;
114 *beos*)
115 on_beos=yes
116 ;;
117 *haiku*)
118 on_haiku=yes
119 ;;
120 *minix*)
121 SYS_DEFS="-D__MINIX__"
122 ;;
123 esac
124 AC_SUBST(SYS_DEFS)
125
126 AC_SUBST(GCI_CONVERT_HEADER)
127
128 dnl Check for dynamic shared library support libraries
129 #MH_EXTRA_LIBS=""
130 #MH_CHECK_LIB(dld dl)
131 #SHLIBS="${MH_EXTRA_LIBS}"
132
133 dnl Check for extra required libraries - don't include libfl or libl
134 #MH_EXTRA_LIBS=""
135 #MH_CHECK_LIB(m nsl nsl_s socket net network)
136 dnl -- check for crypt library and function
137 REG_CHECK_CRYPT
138 if test "$on_qnx4" = "no"; then
139 AC_PROG_LEX
140 fi
141 #BOTHLIBS="${LEXLIB} ${MH_EXTRA_LIBS}"
142
143 AC_PROG_RANLIB
144
145 dnl --------------------- Check for other programs. ---------------
146 AC_PROG_LN_S
147 AC_PROG_MAKE_SET
148
149 dnl -------------------- Checks for header files. -----------------
150 AC_HEADER_STDC
151 AC_CHECK_HEADERS( \
152 arpa/inet.h \
153 assert.h \
154 ctype.h \
155 crypt.h \
156 dl.h \
157 dlfcn.h \
158 errno.h \
159 fcntl.h \
160 fnmatch.h \
161 grp.h \
162 readline/history.h \
163 iconv.h \
164 inttypes.h \
165 limits.h \
166 malloc.h \
167 math.h \
168 memory.h \
169 ncurses.h \
170 netdb.h \
171 netinet/in.h \
172 paths.h \
173 poll.h \
174 process.h \
175 pwd.h \
176 readline/readline.h \
177 setjmp.h \
178 share.h \
179 signal.h \
180 socket.h \
181 stdarg.h \
•182 stdbool.h \
183 stdio.h \
184 statvfs.h \
185 stdlib.h \
186 stdint.h \
187 string.h \
188 sys/ioctl.h \
189 sys/mount.h \
190 sys/poll.h \
191 sys/resource.h \
192 sys/select.h \
193 sys/socket.h \
194 sys/stat.h \
195 sys/statfs.h \
196 sys/statvfs.h \
197 sys/mman.h \
198 sys/time.h \
199 sys/utsname.h \
200 sys/wait.h \
201 term.h \
202 termcap.h \
203 time.h \
204 unistd.h \
205 vfs.h
206 )
207
208 AC_CHECK_FUNCS(sysconf div raise putenv usleep random ftruncate \
209 memcpy memmove strerror strerror_r gettimeofday ftime poll \
210 _fullpath vsprintf _splitpath2 _splitpath sigaction strtof \
211 lstat mkstemp inet_ntop gmtime_r localtime_r \
212 getgrgid_r getpwuid_r gethostbyname_r \
213 atoll fseeko ftello getopt_long \
214 readlink realpath getbootfile tgetstr statfs mbstowcs mmap iconv)
215
216 dnl Checks for typedefs, structures, and compiler characteristics.
217 AC_C_CONST
218 AC_TYPE_SIZE_T
219 AC_HEADER_TIME
220 AC_STRUCT_TM
221 REG_CHECK_CC_O
222 REG_CHECK__SIGHANDLER_T
223 REG_STRUCT_RANDOM_DATA
224 REG_CHECK_BUILTIN_RETURN_ADDRESS
225 MH_C_LONG_LONG
226 REG_CHECK_TYPE_SOCKLEN_T
227 AC_CHECK_TYPES([union semun],[],[],
228 [#include <sys/types.h>
229 #include <sys/ipc.h>
230 #include <sys/sem.h>])
231
232 REG_CHECK_F_MNTFROMNAME
233
234 dnl Checks for library functions.
235 AC_FUNC_MEMCMP
236 AC_FUNC_ALLOCA
237 if test $ac_cv_func_alloca_works = yes; then
238 ALLOCA=""
239 ALLOCA_SHO=""
240 ALLOCA_TSO=""
241 else
242 ALLOCA="alloca.o"
243 ALLOCA_SHO="alloca.so.o"
244 ALLOCA_TSO="alloca.tso.o"
245 fi
246 AC_SUBST(ALLOCA)
247 AC_SUBST(ALLOCA_SHO)
248 AC_SUBST(ALLOCA_TSO)
249 dnl
250 dnl Test for fnmatch
251 dnl
252 if test $ac_cv_header_fnmatch_h = yes; then
253 FNMATCH=""
254 FNMATCH_SHO=""
255 FNMATCH_TSO=""
256 else
257 FNMATCH="fnmatch.o"
258 FNMATCH_SHO="fnmatch.so.o"
259 FNMATCH_TSO="fnmatch.tso.o"
260 fi
261 AC_SUBST(FNMATCH)
262 AC_SUBST(FNMATCH_SHO)
263 AC_SUBST(FNMATCH_TSO)
264
265 dnl --------------- allow --disable-screen to disable terminal functions
266 AC_ARG_ENABLE(screen,
267 [ --disable-screen disable terminal functions],
268 [with_screen=$enableval],
269 [with_screen=yes],
270 )
271 if test "$with_screen" = no; then
272 SCREEN_FUNCS="-DNOSCREEN_FUNCS"
273 REGSCREENUX=""
274 else
275 SCREEN_FUNCS=""
276 REGSCREENUX="regscreenux.\$(OBJ)"
277 fi
278 AC_SUBST(SCREEN_FUNCS)
279 AC_SUBST(REGSCREENUX)
280
281 dnl
282 dnl where are termcap functions
283 REGUTIL_TERM_LIB=""
284 #if test "$on_qnx4" = "no"; then
285 save_LIBS="$LIBS"
286 AC_SEARCH_LIBS(tgetent,[ncurses termcap curses termlib],REGUTIL_TERM_LIB="$ac_cv_search_tgetent",REGUTIL_TERM_LIB="")
287 if test "$REGUTIL_TERM_LIB" = "none required" -o "$REGUTIL_TERM_LIB" = "no" -o "$with_screen" = "no"; then
288 REGUTIL_TERM_LIB=""
289 fi
290 LIBS="$save_LIBS"
291 #fi
292 dnl where are math functions
293 REGUTIL_MATH_LIB=""
294 #if test "$on_qnx4" = "no"; then
295 save_LIBS="$LIBS"
296 AC_SEARCH_LIBS(log10,[m c],REGUTIL_MATH_LIB="$ac_cv_search_log10",REGUTIL_MATH_LIB="")
297 if test "$REGUTIL_MATH_LIB" = "none required" -o "$REGUTIL_MATH_LIB" = "no"; then
298 REGUTIL_MATH_LIB=""
299 fi
300 LIBS="$save_LIBS"
301 #fi
302
303 dnl
304 dnl where are readline functions
305 REGUTIL_READLINE_LIB=""
306 #if test "$on_qnx4" = "no"; then
307 save_LIBS="$LIBS"
308 AC_SEARCH_LIBS(add_history,[readline],REGUTIL_READLINE_LIB="$ac_cv_search_add_history",REGUTIL_READLINE_LIB="")
309 if test "$REGUTIL_READLINE_LIB" = "none required" -o "$REGUTIL_READLINE_LIB" = "no"; then
310 REGUTIL_READLINE_LIB=""
311 fi
312 LIBS="$save_LIBS"
313 #fi
314
315 dnl where is crypt
316 save_LIBS="$LIBS"
317 AC_SEARCH_LIBS(crypt,crypt,REGINA_CRYPT_LIB="$ac_cv_search_crypt",REGINA_CRYPT_LIB="")
318 if test "$REGINA_CRYPT_LIB" = "none required" -o "$REGINA_CRYPT_LIB" = "no"; then
319 REGINA_CRYPT_LIB=""
320 fi
321 LIBS="$save_LIBS"
322
323 save_LIBS="$LIBS"
324 AC_SEARCH_LIBS(dlopen,dl,REGINA_DLOPEN_LIB="$ac_cv_search_dlopen",REGINA_DLOPEN_LIB="")
325 if test "$REGINA_DLOPEN_LIB" = "none required" -o "$REGINA_DLOPEN_LIB" = "no"; then
326 REGINA_DLOPEN_LIB=""
327 fi
328 LIBS="$save_LIBS"
329
330 save_LIBS="$LIBS"
331 AC_SEARCH_LIBS(shl_load,dld,REGINA_SHL_LOAD_LIB="$ac_cv_search_shl_load",REGINA_SHL_LOAD_LIB="")
332 if test "$REGINA_SHL_LOAD_LIB" = "none required" -o "$REGINA_SHL_LOAD_LIB" = "no"; then
333 REGINA_SHL_LOAD_LIB=""
334 fi
335 LIBS="$save_LIBS"
336
337 save_LIBS="$LIBS"
338 AC_SEARCH_LIBS(socket,[socket network],REGINA_SOCKET_LIB="$ac_cv_search_socket",REGINA_SOCKET_LIB="")
339 if test "$REGINA_SOCKET_LIB" = "none required" -o "$REGINA_SOCKET_LIB" = "no"; then
340 REGINA_SOCKET_LIB=""
341 fi
342 LIBS="$save_LIBS"
343
344 save_LIBS="$LIBS"
345 AC_SEARCH_LIBS(gethostbyname,[nsl socket network],REGINA_GETHOSTBYNAME_LIB="$ac_cv_search_gethostbyname",REGINA_GETHOSTBYNAME_LIB="")
346 if test "$REGINA_GETHOSTBYNAME_LIB" = "none required" -o "$REGINA_GETHOSTBYNAME_LIB" = "no"; then
347 REGINA_GETHOSTBYNAME_LIB=""
348 fi
349 LIBS="$save_LIBS"
350 AC_SUBST(REGUTIL_TERM_LIB)
351 AC_SUBST(REGUTIL_MATH_LIB)
352
353 #MH_CHECK_LIB(m nsl nsl_s socket net network)
354 dnl
355 dnl include our debugging switch checking
356 dnl
357 sinclude(common/incdebug.m4)
358
359 dnl --------------- allow --with-staticfunctions to enable linking external function packages statically
360 dnl must be called before MH_SHARED_LIBRARY
361 AC_ARG_WITH(staticfunctions,
362 [ --with-staticfunctions enable static linking of external function packages],
363 [with_staticfunctions=$withval],
364 [with_staticfunctions=no],
365 )
366 if test "$with_staticfunctions" = "yes" -o "$on_qnx4" = "yes"; then
367 build_static="yes"
368 else
369 build_static="no"
370 fi
371
372 dnl --------------- allow --enable-orexx-binary-compatible to enable binary compatibility with ORexx
373 AC_ARG_ENABLE(orexx-binary-compatible,
374 [ --enable-orexx-binary-compatible enable binary compatibility with ORexx],
375 [with_orexx_bc=$enableval],
376 [with_orexx_bc=no],
377 )
378 if test "$with_orexx_bc" = yes; then
379 OREXX_BINARY_COMPATIBLE="1"
380 AC_DEFINE(OREXX_BINARY_COMPATIBLE)
381 fi
382
383 dnl --------------- allow --disable-posix-threads to disable multi-threading
384 AC_ARG_ENABLE(posix-threads,
385 [ --disable-posix-threads disable POSIX-style multi-threading],
386 [enable_posix_threads=no],
387 [enable_posix_threads=yes],
388 )
389 dnl if we are building statically, force thread support off
390 if test "$build_static" = "yes"; then
391 enable_posix_threads="no"
392 fi
393
394 dnl --------------- allow --disable-gci to disable General Call Interface
395 AC_ARG_ENABLE(gci,
396 [ --disable-gci disable General Call Interface],
397 [with_gci=no],
398 [with_gci=$gci_available],
399 )
400 if test "$with_gci" = yes; then
401 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"
402 HAVE_GCI="-DHAVE_GCI -I\$(gcidir)"
403 else
404 GCI_SHO=""
405 HAVE_GCI=""
406 fi
407 AC_SUBST(GCI_SHO)
408 AC_SUBST(HAVE_GCI)
409
410 if test "$ac_cv_func_getopt_long" = yes; then
411 MY_GETOPT_O=
412 MY_GETOPT_SO_O=
413 else
414 MY_GETOPT_O="mygetopt.\$(OBJ)"
415 MY_GETOPT_SO_O="mygetopt.so.\$(OBJ)"
416 fi
417 AC_SUBST(MY_GETOPT_O)
418 AC_SUBST(MY_GETOPT_SO_O)
419
•420 case "$ac_cv_prog_CC" in
421 *gcc*|*g++*)
422 REG_CHECK_GCC_VERSION_SCRIPT
423 ;;
424 esac
425
426 dnl enable_posix_threads="yes"
427 REG_CHECK_POSIX_THREADS
428 if test "$mh_has_pthreads" = yes; then
429 AC_SEARCH_LIBS(pthread_exit,[pthread pthreads c_r],REGINA_PTHREAD_LIB="$ac_cv_search_pthread_exit",REGINA_PTHREAD_LIB="")
430 if test "$REGINA_PTHREAD_LIB" = "none required" -o "$REGINA_PTHREAD_LIB" = "no"; then
431 AC_SEARCH_LIBS(sem_init,[pthread pthreads c_r],REGINA_PTHREAD_LIB="$ac_cv_search_sem_init",REGINA_PTHREAD_LIB="")
432 if test "$REGINA_PTHREAD_LIB" = "none required" -o "$REGINA_PTHREAD_LIB" = "no"; then
433 REGINA_PTHREAD_LIB=""
434 fi
435 fi
436 save_cflags="$CFLAGS"
437 CFLAGS="$CFLAGS $THREADING_COMPILE"
438 #
439 # Where we know the format of getgrgid_r() function
440 # only test for that case
441 #
442 if test "$ac_cv_func_getgrgid_r" = yes; then
443 REG_GETGRGID_R_INT_RETURN_5_PARAMS
444 if test "$mh_cv_getgrgid_r_int5" = "no"; then
445 REG_GETGRGID_R_INT_RETURN_4_PARAMS
446 if test "$mh_cv_getgrgid_r_int4" = "no"; then
447 REG_GETGRGID_R_STRUCT_RETURN
448 if test "$mh_cv_getgrgid_r_int4" = "no"; then
449 REG_GETGRGID_R_STRUCT_RETURN
450 fi
451 fi
452 fi
453 fi
454 if test "$ac_cv_func_getpwuid_r" = yes; then
455 REG_GETPWUID_R_INT_RETURN
456 if test "$mh_cv_getpwuid_r_int" = "no"; then
457 REG_GETPWUID_R_STRUCT_RETURN
458 fi
459 fi
460 if test "$ac_cv_func_gethostbyname_r" = yes; then
461 REG_GETHOSTBYNAME_R_INT_RETURN_6_PARAMS
462 if test "$mh_cv_gethostbyname_r_int6" = "no"; then
463 REG_GETHOSTBYNAME_R_STRUCT_RETURN_5_PARAMS
464 fi
465 fi
466
467 CFLAGS="$save_cflags"
468 REGINAMULTITHREAD="yes"
469 else
470 REGINAMULTITHREAD="no"
471 fi
472 AC_SUBST(REGINAMULTITHREAD)
473 if test "$build_static" = "yes"; then
474 STATICLD_SHO="staticld.so.o rxpack.so.o"
475 if test "$on_qnx4" = "yes"; then
476 with_regutil="yes"
477 REG_STATIC_LOADING(regutil)
478 else
479 REG_STATIC_LOADING
480 fi
481 else
482 STATICLD_SHO=""
483 dnl --------------- Check how to make shared libraries -------------------
484 dnl REG_SHARED_LIBRARY must be called after determining if POSIX threads is specified
485 REG_SHARED_LIBRARY
486
487 dnl --------------- Check if underscore is needed in loadable modules ----
488 dnl MH_CHECK_LEADING_USCORE must be called after processing --with-dlfcn[inc,lib]dir switches
489 MH_CHECK_LEADING_USCORE
490 fi
491 AC_SUBST(STATICLD_SHO)
492 REG_SET_SHLPST
493
494 dnl
495 dnl Check for large file support
496 dnl
497 MH_LARGE_FILE_SUPPORT
498 dnl libraries for libregina.so.*
499 #if test "$with_staticfunctions" = "yes"; then
500 # DYNAMIC_LIBRARY_LIBS=""
501 #else
502 # DYNAMIC_LIBRARY_LIBS="$REGINA_CRYPT_LIB $REGINA_PTHREAD_LIB $REGINA_DLOPEN_LIB $REGINA_SHL_LOAD_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB"
503 # DYNAMIC_REGUTIL_TERM_LIB="$REGUTIL_TERM_LIB"
504 # AC_SUBST(DYNAMIC_REGUTIL_TERM_LIB)
505 #fi
506 #AC_SUBST(DYNAMIC_LIBRARY_LIBS)
507 dnl libraries for regina, execiser
508 #DYNAMIC_BINARY_LIBS="-L. -lregina"
509 #AC_SUBST(DYNAMIC_BINARY_LIBS)
510
511
512 dnl libraries for binaries associated with external queues; rxqueue, rxstack
513 STACK_BINARY_LIBS="$REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB"
514 AC_SUBST(STACK_BINARY_LIBS)
515 dnl libraries for rexx
516 REXX_BINARY_LIBS="$REGINA_CRYPT_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB $REGUTIL_TERM_LIB $REGUTIL_MATH_LIB $REGUTIL_READLINE_LIB $REGINA_PTHREAD_LIB"
517 AC_SUBST(REXX_BINARY_LIBS)
518 #STATIC_BINARY_LIBS="$REGINA_CRYPT_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB $REGUTIL_TERM_LIB $REGINA_PTHREAD_LIB"
519 #AC_SUBST(STATIC_BINARY_LIBS)
520 if test "$build_static" = "yes"; then
521 dnl libraries for adding to regina-config --libs
522 REGINA_CONFIG_LIBS="$REGINA_CRYPT_LIB $REGINA_PTHREAD_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB $REGUTIL_TERM_LIB $REGUTIL_READLINE_LIB $REGUTIL_MATH_LIB"
523 dnl libraries for libregina.lib
524 LIBREGINA_BINARY_LIBS=""
525 dnl libraries for libregutil
526 LIBREGUTIL_BINARY_LIBS=""
527 dnl libraries for regina
528 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"
529 dnl libraries for threader
530 THREADER_BINARY_LIBS="-L. -lrexx $REGINA_PTHREAD_LIB"
531 dnl libraries for execiser
532 EXECISER_BINARY_LIBS="-L. -lrexx $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB"
533 else
534 dnl libraries for adding to regina-config --libs
535 REGINA_CONFIG_LIBS=""
536 dnl libraries for libregina.so
537 LIBREGINA_BINARY_LIBS="$REGINA_CRYPT_LIB $REGINA_PTHREAD_LIB $REGINA_DLOPEN_LIB $REGINA_SHL_LOAD_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB"
538 dnl libraries for libregutil
539 LIBREGUTIL_BINARY_LIBS="$REGUTIL_TERM_LIB $REGUTIL_READLINE_LIB $REGUTIL_MATH_LIB"
540 dnl libraries for regina
541 REGINA_BINARY_LIBS="-L. -lregina"
542 dnl libraries for threader
543 THREADER_BINARY_LIBS="-L. -lregina $REGINA_PTHREAD_LIB"
544 dnl libraries for execiser
545 EXECISER_BINARY_LIBS="-L. -lregina"
546 fi
547 AC_SUBST(LIBREGINA_BINARY_LIBS)
548 AC_SUBST(LIBREGUTIL_BINARY_LIBS)
549 AC_SUBST(REGINA_BINARY_LIBS)
550 AC_SUBST(THREADER_BINARY_LIBS)
551 AC_SUBST(EXECISER_BINARY_LIBS)
552 AC_SUBST(REGINA_CONFIG_LIBS)
553
554 dnl --------------- allow --enable-tracemem to enable internal memory tracing
555 AC_ARG_ENABLE(tracemem,
556 [ --enable-tracemem enable memory tracing in debug mode],
557 [with_tracemem=$enableval],
558 [with_tracemem=no],
559 )
560 if test "$with_tracemem" = yes; then
561 TRACEMEM="-DTRACEMEM"
562 else
563 TRACEMEM=""
564 fi
565 AC_SUBST(TRACEMEM)
566
567 dnl --------------- allow --disable-flists to disable memory functions
568 AC_ARG_ENABLE(flists,
569 [ --disable-flists disable memory management functions],
570 [with_flists=$enableval],
571 [with_flists=yes],
572 )
573 if test "$with_flists" = no; then
574 FLISTS="-DNOFLISTS"
575 else
576 FLISTS=""
577 fi
578 AC_SUBST(FLISTS)
579
580 dnl --------------- allow --with-socket to specify socket for rxstack
581 AC_ARG_WITH(socket,
582 [ --with-socket=9999 socket to use for external queues (default 5757)],
583 [with_socket=$withval],
584 [with_socket=no],
585 )
586 if test "$with_socket" = no; then
587 REXXSOCKET=""
588 else
589 REXXSOCKET="-DRXSOCKET=$with_socket"
590 fi
591 AC_SUBST(REXXSOCKET)
592
593 dnl --------------- allow --with-addon-dir to specify location of external function packages
594 AC_ARG_WITH(addon-dir,
595 [ --with-addon-dir=dir location of external function packages (default libdir/regina-rexx/addons)],
596 [addonsdir=$withval],
597 [addonsdir=$libdir/regina-rexx/addons],
598 )
599 AC_DEFINE_DIR(HAVE_REGINA_ADDON_DIR,"$addonsdir")
600 AC_SUBST(addonsdir)
601
602 dnl --------------- allow --with-brew-addon-dir to specify location HomeBrew internal addons dir
603 AC_ARG_WITH(brew-addon-dir,
604 [ --with-brew-addon-dir=dir location of HomeBrew internal addons dir (default blank)],
605 [brewaddonsdir=$withval],
606 [brewaddonsdir=""],
607 )
608 AC_SUBST(brewaddonsdir)
609
610 dnl
611 #MH_CHECK_RPM
612 MH_CHECK_PACKAGE_BUILDERS()
613 MH_GET_DISTRO_NAME()
614 REG_HAVE_SYSTEMD()
615
616 dnl --------------- Force definition of pre-compiler macro UNIX ----------
617 AC_DEFINE(UNIX)
618
619 dnl --------------- Check what compiler switch sets unsigned char ----------
620 REG_CHECK_UNSIGNED_CHAR_COMPILER_SWITCH()
621
622 dnl AC_OUTPUT(Makefile)
623
•624 AC_OUTPUT($mymakefile regina-config rxstack.init.d libregina.pc APKBUILD PackageInfo PackageInfo-devel PackageInfo-lib Regina.spec)
625 chmod 755 regina-config
626 echo
627 echo "Regina ($FULL_PACKAGE_NAME) has now been configured with the following options:"
628 echo
629 if test "x$SHL_TARGETS" = "x"; then
630 echo " Dynamic Loading Support: none"
631 else
632 echo " Dynamic Loading Support: supported. Extra components: $SHL_TARGETS"
633 fi
634 if test "$with_dlfcnincdir" != no ; then
635 echo " dlfcn headers in: $with_dlfcnincdir"
636 fi
637 if test "$with_dlfcnlibdir" != no ; then
638 echo " dlfcn libraries in: $with_dlfcnlibdir"
639 fi
640
641 myopts="${bitflag}BIT"
642 if test "$with_debug" = yes ; then
643 myopts="$myopts DEBUG"
644 fi
645 if test "$with_purify" = yes ; then
646 myopts="$myopts PURIFY"
647 fi
648 if test "$with_efence" = yes; then
649 myopts="$myopts EFENCE"
650 fi
651 if test "$with_orexx_bc" = yes; then
652 myopts="$myopts OREXX_BINARY"
653 fi
654 if test "$with_gci" = yes; then
655 myopts="$myopts GCI"
656 fi
657 if test "$with_flists" = no; then
658 myopts="$myopts NO_FLISTS"
659 fi
660 if test "$with_socket" = no; then
661 myopts="$myopts"
662 else
663 myopts="$myopts SOCKET=$with_socket"
664 fi
665
666 if test "$build_static" = "yes"; then
667 myfuncs=""
668 if test "$with_testpackage" = "yes"; then
669 myfuncs="$myfuncs test"
670 fi
671 if test "$with_regutil" = "yes"; then
672 myfuncs="$myfuncs regutil"
673 fi
674 if test "$with_rexxcurses" = "yes"; then
675 myfuncs="$myfuncs rexxcurses"
676 fi
677 if test "$with_rexxtk" = "yes"; then
678 myfuncs="$myfuncs rexxtk"
679 fi
680 if test "$with_rexxgd" = "yes"; then
681 myfuncs="$myfuncs rexxgd"
682 fi
683 if test "$with_rexxcurl" = "yes"; then
684 myfuncs="$myfuncs rexxcurl"
685 fi
686 if test "$with_rexxsql" = "yes"; then
687 myfuncs="$myfuncs rexxsql"
688 fi
689 if test "$with_rexxeec" = "yes"; then
690 myfuncs="$myfuncs rexxeec"
691 fi
692 if test "$with_rexxisam" = "yes"; then
693 myfuncs="$myfuncs rexxisam"
694 fi
695 if test "$with_rxsock" = "yes"; then
696 myfuncs="$myfuncs rxsock"
697 fi
698 if test "$with_rexxdw" = "yes"; then
699 myfuncs="$myfuncs rexxdw"
700 fi
701 if test "$with_rexxcsv" = "yes"; then
702 myfuncs="$myfuncs rexxcsv"
703 fi
704 if test "$with_rexxpdf" = "yes"; then
705 myfuncs="$myfuncs rexxpdf"
706 fi
707 if test "$with_rexxws" = "yes"; then
708 myfuncs="$myfuncs rexxws"
709 fi
710 echo " Static Loaded Packages: $myfuncs"
711 fi
712
713 if test "$on_beos" = yes; then
714 bindir="/boot/home/config/bin"
715 libdir="/boot/home/config/lib"
716 fi
717
718 if test "$on_haiku" = yes; then
719 bindir="/boot/home/config/non-packaged/bin"
720 libdir="/boot/home/config/non-packaged/lib"
721 addonsdir="/boot/home/config/non-packaged/lib/regina-rexx/addons"
722 fi
723
724 echo " Build options: $myopts"
725 echo " binaries will be installed in: $bindir"
726 if test "x$binarybitprefix" = "x32"; then
727 echo " binaries will have '32' appended to them. eg rexx32, regina32"
728 fi
729 echo " libraries will be installed in: $libdir"
730 echo " addons will be installed in: $addonsdir"
731 echo " {prefix}: $prefix"
732 echo " {exec_prefix}: $exec_prefix"
733 if test "x$rpmtopdir" != "x" ; then
734 echo " RPM topdir: $rpmtopdir"
735 fi
736 if test "x$debtopdir" != "x" ; then
737 echo " DEB topdir: $debtopdir"
738 fi
739 if test "x$apktopdir" != "x" ; then
740 echo " APK topdir: $apktopdir"
741 fi
742 echo
743 echo "To build the Regina binaries, and dynamically loadable libraries, type 'make'"
744 echo "To install Regina in the above directories, type 'make install'"
745 echo