| 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 |
stdio.h \ |
| 183 |
statvfs.h \ |
| 184 |
stdlib.h \ |
| 185 |
stdint.h \ |
| 186 |
string.h \ |
| 187 |
sys/ioctl.h \ |
| 188 |
sys/mount.h \ |
| 189 |
sys/poll.h \ |
| 190 |
sys/resource.h \ |
| 191 |
sys/select.h \ |
| 192 |
sys/socket.h \ |
| 193 |
sys/stat.h \ |
| 194 |
sys/statfs.h \ |
| 195 |
sys/statvfs.h \ |
| 196 |
sys/mman.h \ |
| 197 |
sys/time.h \ |
| 198 |
sys/utsname.h \ |
| 199 |
sys/wait.h \ |
| 200 |
term.h \ |
| 201 |
termcap.h \ |
| 202 |
time.h \ |
| 203 |
unistd.h \ |
| 204 |
vfs.h |
| 205 |
) |
| 206 |
|
| 207 |
AC_CHECK_FUNCS(sysconf div raise putenv usleep random ftruncate \ |
| 208 |
memcpy memmove strerror strerror_r gettimeofday ftime poll \ |
| 209 |
_fullpath vsprintf _splitpath2 _splitpath sigaction strtof \ |
| 210 |
lstat mkstemp inet_ntop gmtime_r localtime_r \ |
| 211 |
getgrgid_r getpwuid_r gethostbyname_r \ |
| 212 |
atoll fseeko ftello getopt_long \ |
| 213 |
readlink realpath getbootfile tgetstr statfs mbstowcs mmap iconv) |
| 214 |
|
| 215 |
dnl Checks for typedefs, structures, and compiler characteristics. |
| 216 |
AC_C_CONST |
| 217 |
AC_TYPE_SIZE_T |
| 218 |
AC_HEADER_TIME |
| 219 |
AC_STRUCT_TM |
| 220 |
REG_CHECK_CC_O |
| 221 |
REG_CHECK__SIGHANDLER_T |
| 222 |
REG_STRUCT_RANDOM_DATA |
| 223 |
REG_CHECK_BUILTIN_RETURN_ADDRESS |
| 224 |
MH_C_LONG_LONG |
| 225 |
REG_CHECK_TYPE_SOCKLEN_T |
| 226 |
AC_CHECK_TYPES([union semun],[],[], |
| 227 |
[#include <sys/types.h> |
| 228 |
#include <sys/ipc.h> |
| 229 |
#include <sys/sem.h>]) |
| 230 |
|
| 231 |
REG_CHECK_F_MNTFROMNAME |
| 232 |
|
| 233 |
dnl Checks for library functions. |
| 234 |
AC_FUNC_MEMCMP |
| 235 |
AC_FUNC_ALLOCA |
| 236 |
if test $ac_cv_func_alloca_works = yes; then |
| 237 |
ALLOCA="" |
| 238 |
ALLOCA_SHO="" |
| 239 |
ALLOCA_TSO="" |
| 240 |
else |
| 241 |
ALLOCA="alloca.o" |
| 242 |
ALLOCA_SHO="alloca.so.o" |
| 243 |
ALLOCA_TSO="alloca.tso.o" |
| 244 |
fi |
| 245 |
AC_SUBST(ALLOCA) |
| 246 |
AC_SUBST(ALLOCA_SHO) |
| 247 |
AC_SUBST(ALLOCA_TSO) |
| 248 |
dnl |
| 249 |
dnl Test for fnmatch |
| 250 |
dnl |
| 251 |
if test $ac_cv_header_fnmatch_h = yes; then |
| 252 |
FNMATCH="" |
| 253 |
FNMATCH_SHO="" |
| 254 |
FNMATCH_TSO="" |
| 255 |
else |
| 256 |
FNMATCH="fnmatch.o" |
| 257 |
FNMATCH_SHO="fnmatch.so.o" |
| 258 |
FNMATCH_TSO="fnmatch.tso.o" |
| 259 |
fi |
| 260 |
AC_SUBST(FNMATCH) |
| 261 |
AC_SUBST(FNMATCH_SHO) |
| 262 |
AC_SUBST(FNMATCH_TSO) |
| 263 |
|
| 264 |
dnl --------------- allow --disable-screen to disable terminal functions |
| 265 |
AC_ARG_ENABLE(screen, |
| 266 |
[ --disable-screen disable terminal functions], |
| 267 |
[with_screen=$enableval], |
| 268 |
[with_screen=yes], |
| 269 |
) |
| 270 |
if test "$with_screen" = no; then |
| 271 |
SCREEN_FUNCS="-DNOSCREEN_FUNCS" |
| 272 |
REGSCREENUX="" |
| 273 |
else |
| 274 |
SCREEN_FUNCS="" |
| 275 |
REGSCREENUX="regscreenux.\$(OBJ)" |
| 276 |
fi |
| 277 |
AC_SUBST(SCREEN_FUNCS) |
| 278 |
AC_SUBST(REGSCREENUX) |
| 279 |
|
| 280 |
dnl |
| 281 |
dnl where are termcap functions |
| 282 |
REGUTIL_TERM_LIB="" |
| 283 |
#if test "$on_qnx4" = "no"; then |
| 284 |
save_LIBS="$LIBS" |
| 285 |
AC_SEARCH_LIBS(tgetent,[ncurses termcap curses termlib],REGUTIL_TERM_LIB="$ac_cv_search_tgetent",REGUTIL_TERM_LIB="") |
| 286 |
if test "$REGUTIL_TERM_LIB" = "none required" -o "$REGUTIL_TERM_LIB" = "no" -o "$with_screen" = "no"; then |
| 287 |
REGUTIL_TERM_LIB="" |
| 288 |
fi |
| 289 |
LIBS="$save_LIBS" |
| 290 |
#fi |
| 291 |
dnl where are math functions |
| 292 |
REGUTIL_MATH_LIB="" |
| 293 |
#if test "$on_qnx4" = "no"; then |
| 294 |
save_LIBS="$LIBS" |
| 295 |
AC_SEARCH_LIBS(log10,[m c],REGUTIL_MATH_LIB="$ac_cv_search_log10",REGUTIL_MATH_LIB="") |
| 296 |
if test "$REGUTIL_MATH_LIB" = "none required" -o "$REGUTIL_MATH_LIB" = "no"; then |
| 297 |
REGUTIL_MATH_LIB="" |
| 298 |
fi |
| 299 |
LIBS="$save_LIBS" |
| 300 |
#fi |
| 301 |
|
| 302 |
dnl |
| 303 |
dnl where are readline functions |
| 304 |
REGUTIL_READLINE_LIB="" |
| 305 |
#if test "$on_qnx4" = "no"; then |
| 306 |
save_LIBS="$LIBS" |
| 307 |
AC_SEARCH_LIBS(add_history,[readline],REGUTIL_READLINE_LIB="$ac_cv_search_add_history",REGUTIL_READLINE_LIB="") |
| 308 |
if test "$REGUTIL_READLINE_LIB" = "none required" -o "$REGUTIL_READLINE_LIB" = "no"; then |
| 309 |
REGUTIL_READLINE_LIB="" |
| 310 |
fi |
| 311 |
LIBS="$save_LIBS" |
| 312 |
#fi |
| 313 |
|
| 314 |
dnl where is crypt |
| 315 |
save_LIBS="$LIBS" |
| 316 |
AC_SEARCH_LIBS(crypt,crypt,REGINA_CRYPT_LIB="$ac_cv_search_crypt",REGINA_CRYPT_LIB="") |
| 317 |
if test "$REGINA_CRYPT_LIB" = "none required" -o "$REGINA_CRYPT_LIB" = "no"; then |
| 318 |
REGINA_CRYPT_LIB="" |
| 319 |
fi |
| 320 |
LIBS="$save_LIBS" |
| 321 |
|
| 322 |
save_LIBS="$LIBS" |
| 323 |
AC_SEARCH_LIBS(dlopen,dl,REGINA_DLOPEN_LIB="$ac_cv_search_dlopen",REGINA_DLOPEN_LIB="") |
| 324 |
if test "$REGINA_DLOPEN_LIB" = "none required" -o "$REGINA_DLOPEN_LIB" = "no"; then |
| 325 |
REGINA_DLOPEN_LIB="" |
| 326 |
fi |
| 327 |
LIBS="$save_LIBS" |
| 328 |
|
| 329 |
save_LIBS="$LIBS" |
| 330 |
AC_SEARCH_LIBS(shl_load,dld,REGINA_SHL_LOAD_LIB="$ac_cv_search_shl_load",REGINA_SHL_LOAD_LIB="") |
| 331 |
if test "$REGINA_SHL_LOAD_LIB" = "none required" -o "$REGINA_SHL_LOAD_LIB" = "no"; then |
| 332 |
REGINA_SHL_LOAD_LIB="" |
| 333 |
fi |
| 334 |
LIBS="$save_LIBS" |
| 335 |
|
| 336 |
save_LIBS="$LIBS" |
| 337 |
AC_SEARCH_LIBS(socket,[socket network],REGINA_SOCKET_LIB="$ac_cv_search_socket",REGINA_SOCKET_LIB="") |
| 338 |
if test "$REGINA_SOCKET_LIB" = "none required" -o "$REGINA_SOCKET_LIB" = "no"; then |
| 339 |
REGINA_SOCKET_LIB="" |
| 340 |
fi |
| 341 |
LIBS="$save_LIBS" |
| 342 |
|
| 343 |
save_LIBS="$LIBS" |
| 344 |
AC_SEARCH_LIBS(gethostbyname,[nsl socket network],REGINA_GETHOSTBYNAME_LIB="$ac_cv_search_gethostbyname",REGINA_GETHOSTBYNAME_LIB="") |
| 345 |
if test "$REGINA_GETHOSTBYNAME_LIB" = "none required" -o "$REGINA_GETHOSTBYNAME_LIB" = "no"; then |
| 346 |
REGINA_GETHOSTBYNAME_LIB="" |
| 347 |
fi |
| 348 |
LIBS="$save_LIBS" |
| 349 |
AC_SUBST(REGUTIL_TERM_LIB) |
| 350 |
AC_SUBST(REGUTIL_MATH_LIB) |
| 351 |
|
| 352 |
#MH_CHECK_LIB(m nsl nsl_s socket net network) |
| 353 |
dnl |
| 354 |
dnl include our debugging switch checking |
| 355 |
dnl |
| 356 |
sinclude(common/incdebug.m4) |
| 357 |
|
| 358 |
dnl --------------- allow --with-staticfunctions to enable linking external function packages statically |
| 359 |
dnl must be called before MH_SHARED_LIBRARY |
| 360 |
AC_ARG_WITH(staticfunctions, |
| 361 |
[ --with-staticfunctions enable static linking of external function packages], |
| 362 |
[with_staticfunctions=$withval], |
| 363 |
[with_staticfunctions=no], |
| 364 |
) |
| 365 |
if test "$with_staticfunctions" = "yes" -o "$on_qnx4" = "yes"; then |
| 366 |
build_static="yes" |
| 367 |
else |
| 368 |
build_static="no" |
| 369 |
fi |
| 370 |
|
| 371 |
dnl --------------- allow --enable-orexx-binary-compatible to enable binary compatibility with ORexx |
| 372 |
AC_ARG_ENABLE(orexx-binary-compatible, |
| 373 |
[ --enable-orexx-binary-compatible enable binary compatibility with ORexx], |
| 374 |
[with_orexx_bc=$enableval], |
| 375 |
[with_orexx_bc=no], |
| 376 |
) |
| 377 |
if test "$with_orexx_bc" = yes; then |
| 378 |
OREXX_BINARY_COMPATIBLE="1" |
| 379 |
AC_DEFINE(OREXX_BINARY_COMPATIBLE) |
| 380 |
fi |
| 381 |
|
| 382 |
dnl --------------- allow --disable-posix-threads to disable multi-threading |
| 383 |
AC_ARG_ENABLE(posix-threads, |
| 384 |
[ --disable-posix-threads disable POSIX-style multi-threading], |
| 385 |
[enable_posix_threads=no], |
| 386 |
[enable_posix_threads=yes], |
| 387 |
) |
| 388 |
dnl if we are building statically, force thread support off |
| 389 |
if test "$build_static" = "yes"; then |
| 390 |
enable_posix_threads="no" |
| 391 |
fi |
| 392 |
|
| 393 |
dnl --------------- allow --disable-gci to disable General Call Interface |
| 394 |
AC_ARG_ENABLE(gci, |
| 395 |
[ --disable-gci disable General Call Interface], |
| 396 |
[with_gci=no], |
| 397 |
[with_gci=$gci_available], |
| 398 |
) |
| 399 |
if test "$with_gci" = yes; then |
| 400 |
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" |
| 401 |
HAVE_GCI="-DHAVE_GCI -I\$(gcidir)" |
| 402 |
else |
| 403 |
GCI_SHO="" |
| 404 |
HAVE_GCI="" |
| 405 |
fi |
| 406 |
AC_SUBST(GCI_SHO) |
| 407 |
AC_SUBST(HAVE_GCI) |
| 408 |
|
| 409 |
if test "$ac_cv_func_getopt_long" = yes; then |
| 410 |
MY_GETOPT_O= |
| 411 |
MY_GETOPT_SO_O= |
| 412 |
else |
| 413 |
MY_GETOPT_O="mygetopt.\$(OBJ)" |
| 414 |
MY_GETOPT_SO_O="mygetopt.so.\$(OBJ)" |
| 415 |
fi |
| 416 |
AC_SUBST(MY_GETOPT_O) |
| 417 |
AC_SUBST(MY_GETOPT_SO_O) |
| 418 |
|
| 419 |
if test "$ac_cv_prog_CC" = "gcc" -o "$ac_cv_prog_CC" = "g++"; then |
| 420 |
REG_CHECK_GCC_VERSION_SCRIPT |
| 421 |
fi |
| 422 |
|
| 423 |
dnl enable_posix_threads="yes" |
| 424 |
REG_CHECK_POSIX_THREADS |
| 425 |
if test "$mh_has_pthreads" = yes; then |
| 426 |
AC_SEARCH_LIBS(pthread_exit,[pthread pthreads c_r],REGINA_PTHREAD_LIB="$ac_cv_search_pthread_exit",REGINA_PTHREAD_LIB="") |
| 427 |
if test "$REGINA_PTHREAD_LIB" = "none required" -o "$REGINA_PTHREAD_LIB" = "no"; then |
| 428 |
AC_SEARCH_LIBS(sem_init,[pthread pthreads c_r],REGINA_PTHREAD_LIB="$ac_cv_search_sem_init",REGINA_PTHREAD_LIB="") |
| 429 |
if test "$REGINA_PTHREAD_LIB" = "none required" -o "$REGINA_PTHREAD_LIB" = "no"; then |
| 430 |
REGINA_PTHREAD_LIB="" |
| 431 |
fi |
| 432 |
fi |
| 433 |
save_cflags="$CFLAGS" |
| 434 |
CFLAGS="$CFLAGS $THREADING_COMPILE" |
| 435 |
# |
| 436 |
# Where we know the format of getgrgid_r() function |
| 437 |
# only test for that case |
| 438 |
# |
| 439 |
if test "$ac_cv_func_getgrgid_r" = yes; then |
| 440 |
REG_GETGRGID_R_INT_RETURN_5_PARAMS |
| 441 |
if test "$mh_cv_getgrgid_r_int5" = "no"; then |
| 442 |
REG_GETGRGID_R_INT_RETURN_4_PARAMS |
| 443 |
if test "$mh_cv_getgrgid_r_int4" = "no"; then |
| 444 |
REG_GETGRGID_R_STRUCT_RETURN |
| 445 |
if test "$mh_cv_getgrgid_r_int4" = "no"; then |
| 446 |
REG_GETGRGID_R_STRUCT_RETURN |
| 447 |
fi |
| 448 |
fi |
| 449 |
fi |
| 450 |
fi |
| 451 |
if test "$ac_cv_func_getpwuid_r" = yes; then |
| 452 |
REG_GETPWUID_R_INT_RETURN |
| 453 |
if test "$mh_cv_getpwuid_r_int" = "no"; then |
| 454 |
REG_GETPWUID_R_STRUCT_RETURN |
| 455 |
fi |
| 456 |
fi |
| 457 |
if test "$ac_cv_func_gethostbyname_r" = yes; then |
| 458 |
REG_GETHOSTBYNAME_R_INT_RETURN_6_PARAMS |
| 459 |
if test "$mh_cv_gethostbyname_r_int6" = "no"; then |
| 460 |
REG_GETHOSTBYNAME_R_STRUCT_RETURN_5_PARAMS |
| 461 |
fi |
| 462 |
fi |
| 463 |
|
| 464 |
CFLAGS="$save_cflags" |
| 465 |
REGINAMULTITHREAD="yes" |
| 466 |
else |
| 467 |
REGINAMULTITHREAD="no" |
| 468 |
fi |
| 469 |
AC_SUBST(REGINAMULTITHREAD) |
| 470 |
if test "$build_static" = "yes"; then |
| 471 |
STATICLD_SHO="staticld.so.o rxpack.so.o" |
| 472 |
if test "$on_qnx4" = "yes"; then |
| 473 |
with_regutil="yes" |
| 474 |
REG_STATIC_LOADING(regutil) |
| 475 |
else |
| 476 |
REG_STATIC_LOADING |
| 477 |
fi |
| 478 |
else |
| 479 |
STATICLD_SHO="" |
| 480 |
dnl --------------- Check how to make shared libraries ------------------- |
| 481 |
dnl REG_SHARED_LIBRARY must be called after determining if POSIX threads is specified |
| 482 |
REG_SHARED_LIBRARY |
| 483 |
|
| 484 |
dnl --------------- Check if underscore is needed in loadable modules ---- |
| 485 |
dnl MH_CHECK_LEADING_USCORE must be called after processing --with-dlfcn[inc,lib]dir switches |
| 486 |
MH_CHECK_LEADING_USCORE |
| 487 |
fi |
| 488 |
AC_SUBST(STATICLD_SHO) |
| 489 |
REG_SET_SHLPST |
| 490 |
|
| 491 |
dnl |
| 492 |
dnl Check for large file support |
| 493 |
dnl |
| 494 |
MH_LARGE_FILE_SUPPORT |
| 495 |
dnl libraries for libregina.so.* |
| 496 |
#if test "$with_staticfunctions" = "yes"; then |
| 497 |
# DYNAMIC_LIBRARY_LIBS="" |
| 498 |
#else |
| 499 |
# DYNAMIC_LIBRARY_LIBS="$REGINA_CRYPT_LIB $REGINA_PTHREAD_LIB $REGINA_DLOPEN_LIB $REGINA_SHL_LOAD_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB" |
| 500 |
# DYNAMIC_REGUTIL_TERM_LIB="$REGUTIL_TERM_LIB" |
| 501 |
# AC_SUBST(DYNAMIC_REGUTIL_TERM_LIB) |
| 502 |
#fi |
| 503 |
#AC_SUBST(DYNAMIC_LIBRARY_LIBS) |
| 504 |
dnl libraries for regina, execiser |
| 505 |
#DYNAMIC_BINARY_LIBS="-L. -lregina" |
| 506 |
#AC_SUBST(DYNAMIC_BINARY_LIBS) |
| 507 |
|
| 508 |
|
| 509 |
dnl libraries for binaries associated with external queues; rxqueue, rxstack |
| 510 |
STACK_BINARY_LIBS="$REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB" |
| 511 |
AC_SUBST(STACK_BINARY_LIBS) |
| 512 |
dnl libraries for rexx |
| 513 |
REXX_BINARY_LIBS="$REGINA_CRYPT_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB $REGUTIL_TERM_LIB $REGUTIL_MATH_LIB $REGUTIL_READLINE_LIB $REGINA_PTHREAD_LIB" |
| 514 |
AC_SUBST(REXX_BINARY_LIBS) |
| 515 |
#STATIC_BINARY_LIBS="$REGINA_CRYPT_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB $REGUTIL_TERM_LIB $REGINA_PTHREAD_LIB" |
| 516 |
#AC_SUBST(STATIC_BINARY_LIBS) |
| 517 |
if test "$build_static" = "yes"; then |
| 518 |
dnl libraries for adding to regina-config --libs |
| 519 |
REGINA_CONFIG_LIBS="$REGINA_CRYPT_LIB $REGINA_PTHREAD_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB $REGUTIL_TERM_LIB $REGUTIL_READLINE_LIB $REGUTIL_MATH_LIB" |
| 520 |
dnl libraries for libregina.lib |
| 521 |
LIBREGINA_BINARY_LIBS="" |
| 522 |
dnl libraries for libregutil |
| 523 |
LIBREGUTIL_BINARY_LIBS="" |
| 524 |
dnl libraries for regina |
| 525 |
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" |
| 526 |
dnl libraries for threader |
| 527 |
THREADER_BINARY_LIBS="-L. -lrexx $REGINA_PTHREAD_LIB" |
| 528 |
dnl libraries for execiser |
| 529 |
EXECISER_BINARY_LIBS="-L. -lrexx $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB" |
| 530 |
else |
| 531 |
dnl libraries for adding to regina-config --libs |
| 532 |
REGINA_CONFIG_LIBS="" |
| 533 |
dnl libraries for libregina.so |
| 534 |
LIBREGINA_BINARY_LIBS="$REGINA_CRYPT_LIB $REGINA_PTHREAD_LIB $REGINA_DLOPEN_LIB $REGINA_SHL_LOAD_LIB $REGINA_SOCKET_LIB $REGINA_GETHOSTBYNAME_LIB" |
| 535 |
dnl libraries for libregutil |
| 536 |
LIBREGUTIL_BINARY_LIBS="$REGUTIL_TERM_LIB $REGUTIL_READLINE_LIB $REGUTIL_MATH_LIB" |
| 537 |
dnl libraries for regina |
| 538 |
REGINA_BINARY_LIBS="-L. -lregina" |
| 539 |
dnl libraries for threader |
| 540 |
THREADER_BINARY_LIBS="-L. -lregina $REGINA_PTHREAD_LIB" |
| 541 |
dnl libraries for execiser |
| 542 |
EXECISER_BINARY_LIBS="-L. -lregina" |
| 543 |
fi |
| 544 |
AC_SUBST(LIBREGINA_BINARY_LIBS) |
| 545 |
AC_SUBST(LIBREGUTIL_BINARY_LIBS) |
| 546 |
AC_SUBST(REGINA_BINARY_LIBS) |
| 547 |
AC_SUBST(THREADER_BINARY_LIBS) |
| 548 |
AC_SUBST(EXECISER_BINARY_LIBS) |
| 549 |
AC_SUBST(REGINA_CONFIG_LIBS) |
| 550 |
|
| 551 |
dnl --------------- allow --enable-tracemem to enable internal memory tracing |
| 552 |
AC_ARG_ENABLE(tracemem, |
| 553 |
[ --enable-tracemem enable memory tracing in debug mode], |
| 554 |
[with_tracemem=$enableval], |
| 555 |
[with_tracemem=no], |
| 556 |
) |
| 557 |
if test "$with_tracemem" = yes; then |
| 558 |
TRACEMEM="-DTRACEMEM" |
| 559 |
else |
| 560 |
TRACEMEM="" |
| 561 |
fi |
| 562 |
AC_SUBST(TRACEMEM) |
| 563 |
|
| 564 |
dnl --------------- allow --disable-flists to disable memory functions |
| 565 |
AC_ARG_ENABLE(flists, |
| 566 |
[ --disable-flists disable memory management functions], |
| 567 |
[with_flists=$enableval], |
| 568 |
[with_flists=yes], |
| 569 |
) |
| 570 |
if test "$with_flists" = no; then |
| 571 |
FLISTS="-DNOFLISTS" |
| 572 |
else |
| 573 |
FLISTS="" |
| 574 |
fi |
| 575 |
AC_SUBST(FLISTS) |
| 576 |
|
| 577 |
dnl --------------- allow --with-socket to specify socket for rxstack |
| 578 |
AC_ARG_WITH(socket, |
| 579 |
[ --with-socket=9999 socket to use for external queues (default 5757)], |
| 580 |
[with_socket=$withval], |
| 581 |
[with_socket=no], |
| 582 |
) |
| 583 |
if test "$with_socket" = no; then |
| 584 |
REXXSOCKET="" |
| 585 |
else |
| 586 |
REXXSOCKET="-DRXSOCKET=$with_socket" |
| 587 |
fi |
| 588 |
AC_SUBST(REXXSOCKET) |
| 589 |
|
| 590 |
dnl --------------- allow --with-addon-dir to specify location of external function packages |
| 591 |
AC_ARG_WITH(addon-dir, |
| 592 |
[ --with-addon-dir=dir location of external function packages (default libdir/regina-rexx/addons)], |
| 593 |
[addonsdir=$withval], |
| 594 |
[addonsdir=$libdir/regina-rexx/addons], |
| 595 |
) |
| 596 |
AC_DEFINE_DIR(HAVE_REGINA_ADDON_DIR,"$addonsdir") |
| 597 |
AC_SUBST(addonsdir) |
| 598 |
|
| 599 |
dnl --------------- allow --with-brew-addon-dir to specify location HomeBrew internal addons dir |
| 600 |
AC_ARG_WITH(brew-addon-dir, |
| 601 |
[ --with-brew-addon-dir=dir location of HomeBrew internal addons dir (default blank)], |
| 602 |
[brewaddonsdir=$withval], |
| 603 |
[brewaddonsdir=""], |
| 604 |
) |
| 605 |
AC_SUBST(brewaddonsdir) |
| 606 |
|
| 607 |
dnl |
| 608 |
#MH_CHECK_RPM |
| 609 |
MH_CHECK_PACKAGE_BUILDERS() |
| 610 |
MH_GET_DISTRO_NAME() |
| 611 |
REG_HAVE_SYSTEMD() |
| 612 |
|
| 613 |
dnl --------------- Force definition of pre-compiler macro UNIX ---------- |
| 614 |
AC_DEFINE(UNIX) |
| 615 |
|
| 616 |
dnl --------------- Check what compiler switch sets unsigned char ---------- |
| 617 |
REG_CHECK_UNSIGNED_CHAR_COMPILER_SWITCH() |
| 618 |
|
| 619 |
dnl AC_OUTPUT(Makefile) |
| 620 |
|
| 621 |
AC_OUTPUT($mymakefile regina-config rxstack.init.d libregina.pc APKBUILD PackageInfo PackageInfo-devel PackageInfo-lib Regina.spec debian/rules) |
| 622 |
chmod 755 regina-config |
| 623 |
echo |
| 624 |
echo "Regina ($FULL_PACKAGE_NAME) has now been configured with the following options:" |
| 625 |
echo |
| 626 |
if test "x$SHL_TARGETS" = "x"; then |
| 627 |
echo " Dynamic Loading Support: none" |
| 628 |
else |
| 629 |
echo " Dynamic Loading Support: supported. Extra components: $SHL_TARGETS" |
| 630 |
fi |
| 631 |
if test "$with_dlfcnincdir" != no ; then |
| 632 |
echo " dlfcn headers in: $with_dlfcnincdir" |
| 633 |
fi |
| 634 |
if test "$with_dlfcnlibdir" != no ; then |
| 635 |
echo " dlfcn libraries in: $with_dlfcnlibdir" |
| 636 |
fi |
| 637 |
|
| 638 |
myopts="${bitflag}BIT" |
| 639 |
if test "$with_debug" = yes ; then |
| 640 |
myopts="$myopts DEBUG" |
| 641 |
fi |
| 642 |
if test "$with_purify" = yes ; then |
| 643 |
myopts="$myopts PURIFY" |
| 644 |
fi |
| 645 |
if test "$with_efence" = yes; then |
| 646 |
myopts="$myopts EFENCE" |
| 647 |
fi |
| 648 |
if test "$with_orexx_bc" = yes; then |
| 649 |
myopts="$myopts OREXX_BINARY" |
| 650 |
fi |
| 651 |
if test "$with_gci" = yes; then |
| 652 |
myopts="$myopts GCI" |
| 653 |
fi |
| 654 |
if test "$with_flists" = no; then |
| 655 |
myopts="$myopts NO_FLISTS" |
| 656 |
fi |
| 657 |
if test "$with_socket" = no; then |
| 658 |
myopts="$myopts" |
| 659 |
else |
| 660 |
myopts="$myopts SOCKET=$with_socket" |
| 661 |
fi |
| 662 |
|
| 663 |
if test "$build_static" = "yes"; then |
| 664 |
myfuncs="" |
| 665 |
if test "$with_testpackage" = "yes"; then |
| 666 |
myfuncs="$myfuncs test" |
| 667 |
fi |
| 668 |
if test "$with_regutil" = "yes"; then |
| 669 |
myfuncs="$myfuncs regutil" |
| 670 |
fi |
| 671 |
if test "$with_rexxcurses" = "yes"; then |
| 672 |
myfuncs="$myfuncs rexxcurses" |
| 673 |
fi |
| 674 |
if test "$with_rexxtk" = "yes"; then |
| 675 |
myfuncs="$myfuncs rexxtk" |
| 676 |
fi |
| 677 |
if test "$with_rexxgd" = "yes"; then |
| 678 |
myfuncs="$myfuncs rexxgd" |
| 679 |
fi |
| 680 |
if test "$with_rexxcurl" = "yes"; then |
| 681 |
myfuncs="$myfuncs rexxcurl" |
| 682 |
fi |
| 683 |
if test "$with_rexxsql" = "yes"; then |
| 684 |
myfuncs="$myfuncs rexxsql" |
| 685 |
fi |
| 686 |
if test "$with_rexxeec" = "yes"; then |
| 687 |
myfuncs="$myfuncs rexxeec" |
| 688 |
fi |
| 689 |
if test "$with_rexxisam" = "yes"; then |
| 690 |
myfuncs="$myfuncs rexxisam" |
| 691 |
fi |
| 692 |
if test "$with_rxsock" = "yes"; then |
| 693 |
myfuncs="$myfuncs rxsock" |
| 694 |
fi |
| 695 |
if test "$with_rexxdw" = "yes"; then |
| 696 |
myfuncs="$myfuncs rexxdw" |
| 697 |
fi |
| 698 |
if test "$with_rexxcsv" = "yes"; then |
| 699 |
myfuncs="$myfuncs rexxcsv" |
| 700 |
fi |
| 701 |
if test "$with_rexxpdf" = "yes"; then |
| 702 |
myfuncs="$myfuncs rexxpdf" |
| 703 |
fi |
| 704 |
if test "$with_rexxws" = "yes"; then |
| 705 |
myfuncs="$myfuncs rexxws" |
| 706 |
fi |
| 707 |
echo " Static Loaded Packages: $myfuncs" |
| 708 |
fi |
| 709 |
|
| 710 |
if test "$on_beos" = yes; then |
| 711 |
bindir="/boot/home/config/bin" |
| 712 |
libdir="/boot/home/config/lib" |
| 713 |
fi |
| 714 |
|
| 715 |
if test "$on_haiku" = yes; then |
| 716 |
bindir="/boot/home/config/non-packaged/bin" |
| 717 |
libdir="/boot/home/config/non-packaged/lib" |
| 718 |
addonsdir="/boot/home/config/non-packaged/lib/regina-rexx/addons" |
| 719 |
fi |
| 720 |
|
| 721 |
echo " Build options: $myopts" |
| 722 |
echo " binaries will be installed in: $bindir" |
| 723 |
if test "x$binarybitprefix" = "x32"; then |
| 724 |
echo " binaries will have '32' appended to them. eg rexx32, regina32" |
| 725 |
fi |
| 726 |
echo " libraries will be installed in: $libdir" |
| 727 |
echo " addons will be installed in: $addonsdir" |
| 728 |
echo " {prefix}: $prefix" |
| 729 |
echo " {exec_prefix}: $exec_prefix" |
| 730 |
if test "x$rpmtopdir" != "x" ; then |
| 731 |
echo " RPM topdir: $rpmtopdir" |
| 732 |
fi |
| 733 |
if test "x$debtopdir" != "x" ; then |
| 734 |
echo " DEB topdir: $debtopdir" |
| 735 |
fi |
| 736 |
if test "x$apktopdir" != "x" ; then |
| 737 |
echo " APK topdir: $apktopdir" |
| 738 |
fi |
| 739 |
echo |
| 740 |
echo "To build the Regina binaries, and dynamically loadable libraries, type 'make'" |
| 741 |
echo "To install Regina in the above directories, type 'make install'" |
| 742 |
echo |