| 1 |
dnl dnl |
| 2 |
dnl This is an autoconf script. |
| 3 |
dnl To rebuild the `configure' script from this, execute the command |
| 4 |
dnl autoconf |
| 5 |
dnl in the directory containing this script. |
| 6 |
dnl |
| 7 |
dnl AUTOCONF configuration for ECL |
| 8 |
dnl Giuseppe Attardi 25.1.1994 |
| 9 |
dnl |
| 10 |
|
| 11 |
AC_INIT([ecl],[24.5.10],[]) |
| 12 |
AC_REVISION([$Revision$]) |
| 13 |
AC_CONFIG_SRCDIR([bare.lsp.in]) |
| 14 |
AC_CONFIG_AUX_DIR([gmp]) |
| 15 |
AC_PREREQ(2.69) |
| 16 |
|
| 17 |
dnl ----------------------------------------------------------------------- |
| 18 |
dnl Make sure we do not configure within source directory |
| 19 |
if test -f configure; then |
| 20 |
AC_MSG_ERROR([This program cannot be built within the source directory]) |
| 21 |
fi |
| 22 |
|
| 23 |
dnl ----------------------------------------------------------------------- |
| 24 |
dnl Configure switches |
| 25 |
|
| 26 |
AC_ARG_WITH(cross_config, |
| 27 |
AS_HELP_STRING( [--with-cross-config=f], |
| 28 |
[supply configuration for a cross compiler]), |
| 29 |
[], [with_cross_config="`pwd`/cross_config"]) |
| 30 |
|
| 31 |
AC_ARG_ENABLE(shared, |
| 32 |
AS_HELP_STRING( [--enable-shared], |
| 33 |
[enable loading compiled files (default=YES)]), |
| 34 |
[], [enable_shared=yes]) |
| 35 |
|
| 36 |
AC_ARG_ENABLE(rpath, |
| 37 |
AS_HELP_STRING( [--enable-rpath], |
| 38 |
[hard-code the location of the ECL shared library.] |
| 39 |
[(no|yes, default=NO)]), |
| 40 |
[], [enable_rpath=yes] ) |
| 41 |
|
| 42 |
AC_ARG_ENABLE(threads, |
| 43 |
AS_HELP_STRING( [--enable-threads], |
| 44 |
[support for native threads (yes|no|auto, default=auto).]), |
| 45 |
[], [enable_threads=auto]) |
| 46 |
|
| 47 |
AC_ARG_ENABLE(boehm, |
| 48 |
AS_HELP_STRING( [--enable-boehm], |
| 49 |
[use the Boehm-Weiser garbage collector] |
| 50 |
[(no|included|system|auto, default=auto)] ), |
| 51 |
[], [enable_boehm=auto] ) |
| 52 |
|
| 53 |
AC_ARG_ENABLE(libatomic, |
| 54 |
AS_HELP_STRING( [--enable-libatomic], |
| 55 |
[version of the libatomic-ops library] |
| 56 |
[(auto|included|system, default=auto)] ), |
| 57 |
[], [enable_libatomic=auto] ) |
| 58 |
|
| 59 |
AC_ARG_ENABLE(soname, |
| 60 |
AS_HELP_STRING( [--enable-soname], |
| 61 |
[link and install the library using version numbers] |
| 62 |
[(no|yes, default=yes)]), |
| 63 |
[], [enable_soname=yes] ) |
| 64 |
|
| 65 |
AC_ARG_ENABLE(gmp, |
| 66 |
AS_HELP_STRING( [--enable-gmp], |
| 67 |
[version of the GMP library] |
| 68 |
[(portable|included|system|auto, default=auto)] ), |
| 69 |
[], [enable_gmp=auto] ) |
| 70 |
|
| 71 |
dnl GMP library options |
| 72 |
AC_ARG_WITH(C-gmp, |
| 73 |
AS_HELP_STRING( [--with-C-gmp], |
| 74 |
[Deprecated! See --enable-gmp]), |
| 75 |
[with_c_gmp=yes; with_system_gmp=no], [with_c_gmp=no]) |
| 76 |
|
| 77 |
AC_ARG_WITH(system-gmp, |
| 78 |
AS_HELP_STRING( [--with-system-gmp], |
| 79 |
[Deprecated! See --enable-gmp]), |
| 80 |
[], [with_system_gmp="auto"]) |
| 81 |
|
| 82 |
AC_ARG_WITH(gmp, |
| 83 |
AS_HELP_STRING( [--with-gmp=args], |
| 84 |
[Deprecated! See --with-gmp-args]), |
| 85 |
[], [with_gmp_args=""]) |
| 86 |
|
| 87 |
AC_ARG_WITH(gmp-args, |
| 88 |
AS_HELP_STRING( [--with-gmp-args=args], |
| 89 |
[supply arguments for configuring GMP library]), |
| 90 |
[], [with_gmp_args=""]) |
| 91 |
|
| 92 |
AC_ARG_WITH(gmp-prefix, |
| 93 |
AS_HELP_STRING( [--with-gmp-prefix=path], |
| 94 |
[prefix for system GMP includes and libraries] ), |
| 95 |
[GMP_INCDIR="$withval/include"; GMP_LIBDIR="$withval/lib"], []) |
| 96 |
|
| 97 |
AC_ARG_WITH(gmp-incdir, |
| 98 |
AS_HELP_STRING( [--with-gmp-incdir=path], |
| 99 |
[path to system GMP includes (overrides prefix)] ), |
| 100 |
[GMP_INCDIR="$withval"], []) |
| 101 |
|
| 102 |
AC_ARG_WITH(gmp-libdir, |
| 103 |
AS_HELP_STRING( [--with-gmp-libdir=path], |
| 104 |
[path to system GMP libraries (overrides prefix)] ), |
| 105 |
[GMP_LIBDIR="$withval"], []) |
| 106 |
|
| 107 |
dnl LIBFFI library options |
| 108 |
AC_ARG_WITH(libffi-prefix, |
| 109 |
AS_HELP_STRING( [--with-libffi-prefix=path], |
| 110 |
[prefix for system LIBFFI includes and libraries] ), |
| 111 |
[LIBFFI_INCDIR="$withval/include"; LIBFFI_LIBDIR="$withval/lib"], []) |
| 112 |
|
| 113 |
AC_ARG_WITH(libffi-incdir, |
| 114 |
AS_HELP_STRING( [--with-libffi-incdir=path], |
| 115 |
[path to system LIBFFI includes (overrides prefix)] ), |
| 116 |
[LIBFFI_INCDIR="$withval"], []) |
| 117 |
|
| 118 |
AC_ARG_WITH(libffi-libdir, |
| 119 |
AS_HELP_STRING( [--with-libffi-libdir=path], |
| 120 |
[path to system LIBFFI libraries (overrides prefix)] ), |
| 121 |
[LIBFFI_LIBDIR="$withval"], []) |
| 122 |
|
| 123 |
dnl LIBGC library options |
| 124 |
AC_ARG_WITH(libgc-prefix, |
| 125 |
AS_HELP_STRING( [--with-libgc-prefix=path], |
| 126 |
[prefix for system LIBGC includes and libraries] ), |
| 127 |
[LIBGC_INCDIR="$withval/include"; LIBGC_LIBDIR="$withval/lib"], []) |
| 128 |
|
| 129 |
AC_ARG_WITH(libgc-incdir, |
| 130 |
AS_HELP_STRING( [--with-libgc-incdir=path], |
| 131 |
[path to system LIBGC includes (overrides prefix)] ), |
| 132 |
[LIBGC_INCDIR="$withval"], []) |
| 133 |
|
| 134 |
AC_ARG_WITH(libgc-libdir, |
| 135 |
AS_HELP_STRING( [--with-libgc-libdir=path], |
| 136 |
[path to system LIBGC libraries (overrides prefix)] ), |
| 137 |
[LIBGC_LIBDIR="$withval"], []) |
| 138 |
|
| 139 |
AC_ARG_WITH(cxx, |
| 140 |
AS_HELP_STRING( [--with-cxx], |
| 141 |
[build ECL using C++ compiler (default=NO)]), |
| 142 |
[], [with_cxx=no]) |
| 143 |
|
| 144 |
AC_ARG_WITH(tcp, |
| 145 |
AS_HELP_STRING( [--with-tcp], |
| 146 |
[include socket interface (yes|builtin|no, default=YES)]), |
| 147 |
[], [with_tcp=yes]) |
| 148 |
|
| 149 |
AC_ARG_WITH(serve_event, |
| 150 |
AS_HELP_STRING( [--with-serve-event], |
| 151 |
[include serve-event module (yes|builtin|no, default=YES)]), |
| 152 |
[], [with_serve_event=${enable_shared}]) |
| 153 |
|
| 154 |
AC_ARG_WITH(clos-streams, |
| 155 |
AS_HELP_STRING( [--with-clos-streams], |
| 156 |
[user defined stream objects (yes|builtin|no, default=YES)]), |
| 157 |
[], [with_clos_streams=yes]) |
| 158 |
|
| 159 |
AC_ARG_WITH(cmuformat, |
| 160 |
AS_HELP_STRING( [--with-cmuformat], |
| 161 |
[use CMUCL's FORMAT routine (default=YES)]), |
| 162 |
[], [with_cmuformat=${with_clos_streams}]) |
| 163 |
|
| 164 |
AC_ARG_WITH(asdf, |
| 165 |
AS_HELP_STRING( [--with-asdf], |
| 166 |
[include ASDF building facility] |
| 167 |
[(yes|builtin|no, default=YES)]), |
| 168 |
[], [with_asdf=yes]) |
| 169 |
|
| 170 |
AC_ARG_WITH(defsystem, |
| 171 |
AS_HELP_STRING( [--with-defsystem], |
| 172 |
[include DEFSYSTEM building facility] |
| 173 |
[(yes|builtin|no, default=NO)]), |
| 174 |
[], [with_defsystem=no]) |
| 175 |
|
| 176 |
AC_ARG_WITH(cmp, |
| 177 |
AS_HELP_STRING( [--with-cmp], |
| 178 |
[build the compiler (yes|builtin|no, default=YES)] ), |
| 179 |
[], [with_cmp=yes]) |
| 180 |
|
| 181 |
AC_ARG_WITH(bytecmp, |
| 182 |
AS_HELP_STRING( [--with-bytecmp], |
| 183 |
[build the bytecodes compiler (yes|builtin|no, default=YES)] ), |
| 184 |
[], [with_bytecmp=yes]) |
| 185 |
|
| 186 |
AC_ARG_WITH(rt, |
| 187 |
AS_HELP_STRING( [--with-rt], |
| 188 |
[Deprecated! include MIT-RT testing environment] |
| 189 |
[(yes|builtin|no, default=NO)]), |
| 190 |
[], [with_rt=no]) |
| 191 |
|
| 192 |
AC_ARG_WITH(profile, |
| 193 |
AS_HELP_STRING( [--with-profile], |
| 194 |
[Deprecated! include CMUCL's simple profiler] |
| 195 |
[(yes|builtin|no, default=NO)]), |
| 196 |
[], [with_profile=no]) |
| 197 |
|
| 198 |
AC_ARG_WITH(dffi, |
| 199 |
AS_HELP_STRING( [--with-dffi], |
| 200 |
[dynamic foreign function interface] |
| 201 |
[(system|included|auto|no, default=AUTO if libffi available)]), |
| 202 |
[enable_libffi=${withval}], [enable_libffi=auto]) |
| 203 |
|
| 204 |
AC_ARG_WITH(fpe, |
| 205 |
AS_HELP_STRING( [--with-fpe], |
| 206 |
[detect floating point exceptions] |
| 207 |
[(default=YES)]), |
| 208 |
[], [with_fpe=yes]) |
| 209 |
|
| 210 |
AC_ARG_WITH(signed-zero, |
| 211 |
AS_HELP_STRING( [--with-signed-zero={yes|no}], |
| 212 |
[allow for IEEE signed zeros (default=YES).]), |
| 213 |
[], [with_signed_zero="yes"]) |
| 214 |
|
| 215 |
AC_ARG_WITH(ieee-fp, |
| 216 |
AS_HELP_STRING( [--with-ieee-fp={yes|no}], |
| 217 |
[full IEEE floating point system, including denormals (default=YES).] |
| 218 |
[Implies signed-zero]), |
| 219 |
[], [with_ieee_fp="yes"]) |
| 220 |
|
| 221 |
AC_ARG_WITH(sse, |
| 222 |
AS_HELP_STRING( [--with-sse={yes|no|auto}], |
| 223 |
[implement SSE intrinsics in ECL (default=NO).] |
| 224 |
[Only works when supported by the compiler]), |
| 225 |
[], [with_sse="no"]) |
| 226 |
|
| 227 |
AC_ARG_ENABLE(unicode, |
| 228 |
AS_HELP_STRING( [--enable-unicode={32|16|no}], |
| 229 |
[enable support for unicode (default=32)]), |
| 230 |
[], [enable_unicode=32]) |
| 231 |
|
| 232 |
AC_ARG_ENABLE(c99complex, |
| 233 |
AS_HELP_STRING( [--enable-c99complex], |
| 234 |
[include support for c99 complex floats] |
| 235 |
[(default=auto)]), |
| 236 |
[enable_c99complex=${enableval}], [enable_c99complex=auto]) |
| 237 |
|
| 238 |
AC_ARG_ENABLE(smallcons, |
| 239 |
AS_HELP_STRING( [--enable-smallcons], |
| 240 |
[use small (2 words) cons types. Requires Boehm-Weiser gc.] |
| 241 |
[(default=YES)]), |
| 242 |
[enable_smallcons=${enableval}],[enable_smallcons=yes]) |
| 243 |
|
| 244 |
AC_ARG_ENABLE(gengc, |
| 245 |
AS_HELP_STRING( [--enable-gengc], |
| 246 |
[use generational garbage collection. Requires Boehm-Weiser gc.] |
| 247 |
[(no|yes, default=NO)]), |
| 248 |
[enable_gengc=${enableval}], [enable_gengc=no] ) |
| 249 |
|
| 250 |
AC_ARG_ENABLE(precisegc, |
| 251 |
AS_HELP_STRING( [--enable-precisegc], |
| 252 |
[use type information during garbage collection. Requires Boehm-Weiser gc (EXPERIMENTAL).] |
| 253 |
[(no|yes, default=NO)]), |
| 254 |
[enable_precisegc=${enableval}], [enable_precisegc=no] ) |
| 255 |
|
| 256 |
AC_ARG_ENABLE(serialization, |
| 257 |
AS_HELP_STRING( [--enable-serialization], |
| 258 |
[use serialization framework instead of the reader to save externalizable objects in compiled files (EXPERIMENTAL).] |
| 259 |
[(no|yes, default=NO)]), |
| 260 |
[], [enable_serialization=no] ) |
| 261 |
|
| 262 |
AC_ARG_ENABLE(debug, |
| 263 |
AS_HELP_STRING( [--enable-debug], |
| 264 |
[enable various debugging features] |
| 265 |
[(default=NO)]), |
| 266 |
[DEBUG_CFLAGS="-g -O0"; CFLAGS="$CFLAGS -g -O0"],[]) |
| 267 |
|
| 268 |
AC_ARG_WITH(debug-cflags, |
| 269 |
AS_HELP_STRING( [--with-debug-cflags], |
| 270 |
[add debug flags to the compiler invocation] |
| 271 |
[(yes,no,actual flags,default=YES)]), |
| 272 |
[],[with_debug_cflags="no"]) |
| 273 |
|
| 274 |
AC_ARG_WITH(profile-cflags, |
| 275 |
AS_HELP_STRING( [--with-profile-cflags], |
| 276 |
[add profiling flags to the compiler invocation] |
| 277 |
[(yes,no,actual flags,default=NO)]), |
| 278 |
[],[with_profile_cflags="no"]) |
| 279 |
|
| 280 |
AC_ARG_WITH(extra-files, |
| 281 |
AS_HELP_STRING( [--with-extra-files], |
| 282 |
[list of additional source files (default="")]), |
| 283 |
[with_extra_files="${withval}"], [with_extra_files=""]) |
| 284 |
|
| 285 |
AC_ARG_WITH(init-form, |
| 286 |
AS_HELP_STRING( [--with-init-form], |
| 287 |
[lisp forms to execute at startup (default="(si::top-level t)")]), |
| 288 |
[with_init_form="${withval}"], [with_init_form=""]) |
| 289 |
|
| 290 |
AC_ARG_ENABLE(manual, |
| 291 |
AS_HELP_STRING( [--enable-manual={auto|html|info|no}], |
| 292 |
[Enable building of the manual] |
| 293 |
[(default=AUTO)]), |
| 294 |
[enable_manual=${enableval}], |
| 295 |
[enable_manual=auto]) |
| 296 |
|
| 297 |
dnl ----------------------------------------------------------------------- |
| 298 |
dnl Installation directories |
| 299 |
AC_ARG_VAR([ecldir], [the directory where *.fas files are installed]) |
| 300 |
test -z "${ecldir}" && ecldir="${libdir}/ecl-${PACKAGE_VERSION}" |
| 301 |
AC_SUBST([ecldir]) |
| 302 |
|
| 303 |
dnl ----------------------------------------------------------------------- |
| 304 |
dnl Initialize variables. |
| 305 |
boehm_configure_flags="" |
| 306 |
|
| 307 |
AC_EXEEXT dnl Guess whether .exe is needed for executables |
| 308 |
AC_SUBST(buildir) dnl For top-level Makefile.in |
| 309 |
AC_SUBST(ECL_CFLAGS) dnl Similar, but specific to ECL (see src/util/ecl-config) |
| 310 |
AC_SUBST(DEBUG_CFLAGS) |
| 311 |
AC_SUBST(GMP_CPPFLAGS) dnl CFLAGS needed for compiling with system GMP library |
| 312 |
AC_SUBST(GMP_LDFLAGS) dnl LDFLAGS needed for compiling with system GMP library |
| 313 |
AC_SUBST(LIBFFI_LDFLAGS) dnl LDFLAGS needed for compiling with system LIBFFI library |
| 314 |
AC_SUBST(FASL_LIBS) dnl Libraries to link into all ecl code but not |
| 315 |
dnl into helper programs. |
| 316 |
AC_SUBST(CORE_LIBS, []) dnl Locally compiled libs to link into |
| 317 |
dnl ecl/ecl_min/libecl.so and nowhere else. |
| 318 |
AC_SUBST(SHARED_LDFLAGS) dnl Flags for shared libraries linker |
| 319 |
AC_SUBST(BUNDLE_LDFLAGS) dnl Flags for FASL files linker |
| 320 |
AC_SUBST(PROGRAM_LDFLAGS) dnl Flags for executable program linker |
| 321 |
AC_SUBST(EXTRA_OBJS) dnl Extra *.o files to be compiled into libecl.a |
| 322 |
AC_SUBST(TARGETS, ['bin/ecl$(EXE)'])dnl Versions of ECL to be built |
| 323 |
AC_SUBST(SUBDIRS, ['c doc']) dnl Subdirectories that make should process |
| 324 |
AC_SUBST(LIBRARIES, []) dnl GMP, Boehm's GC, etc |
| 325 |
AC_SUBST(LSP_LIBRARIES) dnl Libraries produced by lisp translator |
| 326 |
AC_SUBST(COMPILATION_FEATURES, ['']) dnl Symbols to add to *FEATURES* for conditional compilation |
| 327 |
AC_SUBST(LSP_FEATURES, ["${LSP_FEATURES} :ecl :common :common-lisp :ansi-cl :ffi :prefixed-api :cdr-14 :package-local-nicknames :clos :ecl-pde :long-float"]) dnl Symbols to add to *FEATURES* in the final executable |
| 328 |
|
| 329 |
|
| 330 |
dnl ----------------------------------------------------------------------- |
| 331 |
dnl Guess operating system of host. |
| 332 |
AC_CANONICAL_BUILD |
| 333 |
AC_CANONICAL_HOST |
| 334 |
|
| 335 |
|
| 336 |
dnl ===================================================================== |
| 337 |
dnl Checks for programs |
| 338 |
AC_PROG_CC # sets variable CC |
| 339 |
AC_PROG_CC_C99 # checks that CC by default accepts C99 code, if not, |
| 340 |
# tries adding -std=gnu-99, if this has no effect, throws an error. |
| 341 |
AC_PROG_CXX # sets variable CXX |
| 342 |
AC_PROG_CPP # sets variable CPP |
| 343 |
AC_PROG_RANLIB # sets variable RANLIB |
| 344 |
AC_PROG_INSTALL # sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM |
| 345 |
AC_PROG_LN_S # sets variable LN_S |
| 346 |
AC_PROG_MAKE_SET # set $(MAKE) if needed |
| 347 |
AC_PROG_RANLIB # set variable RANLIB |
| 348 |
AC_CHECK_TOOL([AR],[ar]) # set variable AR to appropriate `ar' program |
| 349 |
AC_CHECK_PROGS([CTAGS],[exctags ectags ctags]) # set variable CTAGS to ctags program if found |
| 350 |
AC_CHECK_PROGS([ETAGS],[etags emacs-etags]) # set variable ETAGS to etags program if found |
| 351 |
|
| 352 |
dnl ----------------------------------------------------------------------- |
| 353 |
dnl Checks which do not come with autoconf (must be after AC_PROG_CC) |
| 354 |
ECL_MAKE_ABSOLUTE_SRCDIR |
| 355 |
ECL_CROSS_CONFIG |
| 356 |
ECL_GUESS_HOST_OS |
| 357 |
|
| 358 |
if test "${enable_manual}" != "no"; then |
| 359 |
AC_MSG_CHECKING([whether to build the manual; finding install-info...]) |
| 360 |
AC_PATH_PROG([INSTALL_INFO], [install-info], []) |
| 361 |
if test "x${INSTALL_INFO}" = "x"; then |
| 362 |
if test "${enable_manual}" = "auto"; then |
| 363 |
AC_MSG_RESULT([ Not building the manual: no install-info found.]) |
| 364 |
enable_manual=no |
| 365 |
elif test "${enable_manual}" = "info"; then |
| 366 |
AC_MSG_ERROR([Unable to build the manual: install-info not found.]) |
| 367 |
fi |
| 368 |
else |
| 369 |
AC_MSG_RESULT([ install-info found.]) |
| 370 |
AC_MSG_CHECKING([for working makeinfo...]) |
| 371 |
AC_PATH_PROG([MAKEINFO], [makeinfo], []) |
| 372 |
if test "x${MAKEINFO}" = "x"; then |
| 373 |
if test "${enable_manual}" = "auto"; then |
| 374 |
AC_MSG_RESULT([ Not building the manual: no makeinfo found.]) |
| 375 |
enable_manual=no |
| 376 |
else |
| 377 |
AC_MSG_ERROR([Unable to build the manual: makeinfo not found.]) |
| 378 |
fi |
| 379 |
elif test "x`echo \"@inlinefmtifelse{html, foo, bar}\" | makeinfo 2>&1 | grep Unknown`" != "x"; then |
| 380 |
if test "${enable_manual}" = "auto"; then |
| 381 |
AC_MSG_RESULT([ Not building the manual: broken/outdated makeinfo.]) |
| 382 |
enable_manual=no |
| 383 |
else |
| 384 |
AC_MSG_ERROR([Unable to build the manual: broken/outdated makeinfo.]) |
| 385 |
fi |
| 386 |
else |
| 387 |
AC_MSG_RESULT([ Will build the manual.]) |
| 388 |
fi |
| 389 |
fi |
| 390 |
fi |
| 391 |
if test "${enable_manual}" != "no"; then |
| 392 |
AC_SUBST(INSTALL_INFO) |
| 393 |
AC_SUBST(MAKEINFO) |
| 394 |
if test "${enable_manual}" = "html"; then |
| 395 |
AC_SUBST(MANUAL_MAKE_TARGET, ['html']) |
| 396 |
AC_SUBST(MANUAL_INSTALL_TARGET, ['install-html']) |
| 397 |
AC_SUBST(MANUAL_UNINSTALL_TARGET, ['uninstall-html']) |
| 398 |
else |
| 399 |
AC_SUBST(MANUAL_MAKE_TARGET, ['info']) |
| 400 |
AC_SUBST(MANUAL_INSTALL_TARGET, ['install-info']) |
| 401 |
AC_SUBST(MANUAL_UNINSTALL_TARGET, ['uninstall-info']) |
| 402 |
fi |
| 403 |
fi |
| 404 |
|
| 405 |
dnl ====================================================================== |
| 406 |
dnl GNU multiprecision library |
| 407 |
dnl |
| 408 |
dnl This a multi-stage process. First we have to detect whether we must build |
| 409 |
dnl the GMP library. If this is the case, then we may have to detect the |
| 410 |
dnl build flags for the library, because GMP may choose to build for 64 |
| 411 |
dnl or 32 bits executables and ECL has to be compiled / linked using precisely |
| 412 |
dnl the same flags |
| 413 |
dnl |
| 414 |
if test "x$GMP_INCDIR" != "x"; then |
| 415 |
GMP_CPPFLAGS="-I$GMP_INCDIR" |
| 416 |
fi |
| 417 |
if test "x$GMP_LIBDIR" != "x"; then |
| 418 |
GMP_LDFLAGS="-L$GMP_LIBDIR" |
| 419 |
if test "$enable_rpath" = "yes"; then |
| 420 |
if (echo "$ECL_LDRPATH" | grep '~A') > /dev/null; then |
| 421 |
GMP_LDFLAGS=`echo $ECL_LDRPATH | sed "s,~A,$GMP_LIBDIR,"`" $GMP_LDFLAGS" |
| 422 |
fi |
| 423 |
fi |
| 424 |
fi |
| 425 |
CPPFLAGS="$CPPFLAGS $GMP_CPPFLAGS" |
| 426 |
LDFLAGS="$LDFLAGS $GMP_LDFLAGS" |
| 427 |
|
| 428 |
AS_CASE([${enable_gmp}], |
| 429 |
[portable], [with_system_gmp=no; with_c_gmp=yes], |
| 430 |
[included], [with_system_gmp=no], |
| 431 |
[system], [with_system_gmp=yes], |
| 432 |
[AC_CHECK_LIB( [gmp], [__gmpz_init], |
| 433 |
[with_system_gmp=yes], |
| 434 |
[with_system_gmp=no] )]) |
| 435 |
|
| 436 |
ECL_GMP_HEADER= |
| 437 |
if test "${with_system_gmp}" = "yes"; then |
| 438 |
AC_CHECK_LIB( [gmp], [__gmpz_init], |
| 439 |
[FASL_LIBS="${FASL_LIBS} -lgmp"], |
| 440 |
[AC_MSG_ERROR([System gmp library requested but not found.])]) |
| 441 |
AC_CHECK_HEADER( [gmp.h], [ECL_GMP_HEADER='gmp.h'] ) |
| 442 |
if test "x$ECL_GMP_HEADER" = "x"; then |
| 443 |
AC_CHECK_HEADER( [gmp/gmp.h], [ECL_GMP_HEADER='gmp/gmp.h'] ) |
| 444 |
fi |
| 445 |
else |
| 446 |
SUBDIRS="${SUBDIRS} gmp" |
| 447 |
CORE_LIBS="-leclgmp ${CORE_LIBS}" |
| 448 |
if test ${enable_shared} = "no"; then |
| 449 |
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclgmp.${LIBEXT}" |
| 450 |
fi |
| 451 |
fi |
| 452 |
|
| 453 |
dnl ---------------------------------------------------------------------- |
| 454 |
dnl Configure local GMP if needed |
| 455 |
AC_SUBST(ECL_GMP_HEADER) |
| 456 |
EXTRA_OBJS="${EXTRA_OBJS} big.o" |
| 457 |
if test "x${with_system_gmp}" = "xno" ; then |
| 458 |
AC_MSG_NOTICE(Configuring included GMP library:) |
| 459 |
test -d gmp && rm -rf gmp |
| 460 |
if test -z "$gmp_build"; then |
| 461 |
gmp_build="${build}" |
| 462 |
fi |
| 463 |
if test "x$with_c_gmp" = "xyes"; then |
| 464 |
gmp_build=`echo ${gmp_build} | sed 's,@<:@^-@:>@*\(-.*\),none\1,'` |
| 465 |
echo '***' |
| 466 |
echo '***' BUILDING GMP WITH C! |
| 467 |
echo '***' This is a last resort, either because of license or |
| 468 |
echo '***' porting issues. |
| 469 |
echo '***' |
| 470 |
fi |
| 471 |
ECL_GMP_HEADER='ecl/gmp.h' |
| 472 |
if test "x$ABI" = "x"; then |
| 473 |
GMP_ABI="" |
| 474 |
else |
| 475 |
GMP_ABI="ABI=$ABI" |
| 476 |
fi |
| 477 |
# Crosscompilation for Android on Darwin requires replacing 'NM=nm' |
| 478 |
# below with 'NM=$PLATFORM_PREFIX/bin/arm-linux-androideabi-nm'. |
| 479 |
mkdir gmp |
| 480 |
dnl Notice we need -DPIC to force the assembler to generate PIC code |
| 481 |
(destdir=`${PWDCMD}`; cd gmp && CC="${CC} ${PICFLAG}" \ |
| 482 |
$srcdir/gmp/configure --disable-shared --prefix=${destdir} \ |
| 483 |
-infodir=${destdir}/doc --includedir=${destdir}/ecl --with-pic \ |
| 484 |
--libdir=${destdir} --build=${gmp_build} --host=${host_alias} \ |
| 485 |
CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS" CC="${CC} ${PICFLAG}" \ |
| 486 |
"$GMP_ABI" $with_gmp_args) |
| 487 |
if test ! -f gmp/config.status; then |
| 488 |
AC_MSG_ERROR([Failed to configure the GMP library.]) |
| 489 |
fi |
| 490 |
else |
| 491 |
if test "x$ECL_GMP_HEADER" = "x"; then |
| 492 |
AC_MSG_ERROR([Can not find GMP header.]) |
| 493 |
fi |
| 494 |
fi |
| 495 |
|
| 496 |
dnl ----------------------------------------------------------------------- |
| 497 |
dnl GMP-based search of C/C++ compiler and linker flags |
| 498 |
AC_MSG_CHECKING([GMP autoconf]) |
| 499 |
AC_MSG_RESULT(["${with_system_gmp}.${enable_slow_config}"]) |
| 500 |
if test "x${enable_slow_config}" = "xyes"; then |
| 501 |
with_system_gmp=no |
| 502 |
fi |
| 503 |
if test "x${with_system_gmp}" = "xno"; then |
| 504 |
ECL_GMP_BASED_CONFIG |
| 505 |
fi |
| 506 |
|
| 507 |
dnl ====================================================================== |
| 508 |
dnl LIBFFI library |
| 509 |
if test "x$LIBFFI_INCDIR" != "x"; then |
| 510 |
LIBFFI_CPPFLAGS="-I$LIBFFI_INCDIR" |
| 511 |
fi |
| 512 |
if test "x$LIBFFI_LIBDIR" != "x"; then |
| 513 |
LIBFFI_LDFLAGS="-L$LIBFFI_LIBDIR" |
| 514 |
if test "$enable_rpath" = "yes"; then |
| 515 |
if (echo "$ECL_LDRPATH" | grep '~A') > /dev/null; then |
| 516 |
LIBFFI_LDFLAGS=`echo $ECL_LDRPATH | sed "s,~A,$LIBFFI_LIBDIR,"`" $LIBFFI_LDFLAGS" |
| 517 |
fi |
| 518 |
fi |
| 519 |
fi |
| 520 |
CPPFLAGS="$CPPFLAGS $LIBFFI_CPPFLAGS" |
| 521 |
LDFLAGS="$LDFLAGS $LIBFFI_LDFLAGS" |
| 522 |
|
| 523 |
dnl ====================================================================== |
| 524 |
dnl LIBGC library |
| 525 |
if test "x$LIBGC_INCDIR" != "x"; then |
| 526 |
LIBGC_CPPFLAGS="-I$LIBGC_INCDIR" |
| 527 |
fi |
| 528 |
if test "x$LIBGC_LIBDIR" != "x"; then |
| 529 |
LIBGC_LDFLAGS="-L$LIBGC_LIBDIR" |
| 530 |
if test "$enable_rpath" = "yes"; then |
| 531 |
if (echo "$ECL_LDRPATH" | grep '~A') > /dev/null; then |
| 532 |
LIBGC_LDFLAGS=`echo $ECL_LDRPATH | sed "s,~A,$LIBGC_LIBDIR,"`" $LIBGC_LDFLAGS" |
| 533 |
fi |
| 534 |
fi |
| 535 |
fi |
| 536 |
CPPFLAGS="$CPPFLAGS $LIBGC_CPPFLAGS" |
| 537 |
LDFLAGS="$LDFLAGS $LIBGC_LDFLAGS" |
| 538 |
|
| 539 |
dnl ===================================================================== |
| 540 |
dnl Checks for libraries |
| 541 |
|
| 542 |
AC_CHECK_LIB(sun, getpwnam) # on IRIX adds -lsun |
| 543 |
AC_SEARCH_LIBS([strerror],[cposix]) |
| 544 |
|
| 545 |
dnl ---------------------------------------------------------------------- |
| 546 |
dnl Profiling & debug flags |
| 547 |
dnl |
| 548 |
if test "$with_debug_cflags" = "yes"; then |
| 549 |
with_debug_cflags="-g" |
| 550 |
fi |
| 551 |
if test "$with_debug_cflags" != "no"; then |
| 552 |
DEBUG_CFLAGS="$with_debug_cflags" |
| 553 |
CFLAGS="$with_debug_cflags $CFLAGS" |
| 554 |
CXXFLAGS="$with_debug_cflags $CXXFLAGS" |
| 555 |
LDFLAGS="$with_debug_cflags $LDFLAGS" |
| 556 |
fi |
| 557 |
if test "$with_profile_cflags" = "yes"; then |
| 558 |
with_profile_cflags="-pg" |
| 559 |
fi |
| 560 |
if test "$with_profile_cflags" != "no"; then |
| 561 |
CFLAGS="$with_profile_cflags $CFLAGS" |
| 562 |
CXXFLAGS="$with_profile_cflags $CFLAGS" |
| 563 |
LDFLAGS="$with_profile_cflags $LDFLAGS" |
| 564 |
fi |
| 565 |
|
| 566 |
dnl ---------------------------------------------------------------------- |
| 567 |
dnl Version of the compiler |
| 568 |
ECL_CMPDIR=cmp |
| 569 |
AC_SUBST(ECL_CMPDIR) |
| 570 |
|
| 571 |
dnl ---------------------------------------------------------------------- |
| 572 |
dnl Native thread support |
| 573 |
if test "${enable_threads}" = "auto"; then |
| 574 |
AC_MSG_CHECKING([for threads support]) |
| 575 |
if test -z "${THREAD_OBJ}"; then |
| 576 |
AC_MSG_RESULT([no]) |
| 577 |
enable_threads="no" |
| 578 |
else |
| 579 |
AC_MSG_RESULT([yes]) |
| 580 |
enable_threads="yes" |
| 581 |
fi |
| 582 |
fi |
| 583 |
if test "${enable_threads}" = "yes" ; then |
| 584 |
if test -z "${THREAD_OBJ}"; then |
| 585 |
AC_MSG_ERROR([Threads aren't supported on this system.]) |
| 586 |
else |
| 587 |
LIBS="${THREAD_LIBS} ${LIBS}" |
| 588 |
CFLAGS="${CFLAGS} ${THREAD_CFLAGS}" |
| 589 |
ECL_PTHREAD_EXTENSIONS |
| 590 |
boehm_configure_flags="${boehm_configure_flags} ${THREAD_GC_FLAGS}" |
| 591 |
for k in $THREAD_OBJ; do EXTRA_OBJS="$EXTRA_OBJS ${k}.${OBJEXT}"; done |
| 592 |
AC_MSG_CHECKING([for thread object files]) |
| 593 |
AC_MSG_RESULT([${THREAD_OBJ}]) |
| 594 |
AC_DEFINE( [ECL_THREADS], [1], [Userland threads?]) |
| 595 |
fi |
| 596 |
ECL_ADD_FEATURE(threads) |
| 597 |
ECL_ADD_FEATURE(ecl-read-write-lock) |
| 598 |
else |
| 599 |
boehm_configure_flags="${boehm_configure_flags} --disable-threads" |
| 600 |
fi |
| 601 |
|
| 602 |
dnl ---------------------------------------------------------------------- |
| 603 |
dnl Boehm-Weiser garbage collector |
| 604 |
if test ${enable_boehm} = "no" ; then |
| 605 |
AC_MSG_ERROR([Boehm GC library is currently needed to build ECL]); |
| 606 |
EXTRA_OBJS="${EXTRA_OBJS} alloc.${OBJEXT} gbc.${OBJEXT}" |
| 607 |
enable_smallcons="no" |
| 608 |
else |
| 609 |
ECL_BOEHM_GC |
| 610 |
ECL_ADD_FEATURE(boehm-gc) |
| 611 |
ECL_ADD_FEATURE(ecl-weak-hash) |
| 612 |
fi |
| 613 |
if test ${enable_smallcons} = "yes" ; then |
| 614 |
AC_DEFINE([ECL_SMALL_CONS], [], [ECL_SMALL_CONS]) |
| 615 |
fi |
| 616 |
|
| 617 |
ECL_LIBFFI |
| 618 |
|
| 619 |
dnl ---------------------------------------------------------------------- |
| 620 |
dnl SONAME is only active when SONAME_LDFLAGS and SONAME are non nil |
| 621 |
dnl |
| 622 |
AC_MSG_CHECKING(for soname flags) |
| 623 |
PACKAGE_MAJOR=`echo ${PACKAGE_VERSION} | sed -e 's,\(.*\)\..*\..*,\1,g'` |
| 624 |
PACKAGE_MINOR=`echo ${PACKAGE_VERSION} | sed -e 's,.*\.\(.*\)\..*,\1,g'` |
| 625 |
PACKAGE_LEAST=`echo ${PACKAGE_VERSION} | sed -e 's,.*\..*\.\(.*\),\1,g'` |
| 626 |
if test "${enable_soname}" != yes; then |
| 627 |
SONAME='' |
| 628 |
SONAME1='' |
| 629 |
SONAME2='' |
| 630 |
SONAME3='' |
| 631 |
SONAME_ALIASES='' |
| 632 |
SONAME_LDFLAGS='' |
| 633 |
AC_MSG_RESULT([none]) |
| 634 |
else |
| 635 |
i="${PACKAGE_MAJOR}.${PACKAGE_MINOR}.${PACKAGE_LEAST}" |
| 636 |
SONAME3=`echo $SONAME | sed "s,.SOVERSION,.$i,g"` |
| 637 |
i="${PACKAGE_MAJOR}.${PACKAGE_MINOR}" |
| 638 |
SONAME2=`echo $SONAME | sed "s,.SOVERSION,.$i,g"` |
| 639 |
i="${PACKAGE_MAJOR}" |
| 640 |
SONAME1=`echo $SONAME | sed "s,.SOVERSION,.$i,g"` |
| 641 |
SONAME=`echo $SONAME | sed "s,.SOVERSION,,g"` |
| 642 |
SONAME_LDFLAGS=`echo $SONAME_LDFLAGS | sed "s,SONAME,$SONAME2,g"` |
| 643 |
AC_MSG_RESULT([${SONAME_LDFLAGS}]) |
| 644 |
fi |
| 645 |
AC_SUBST(SONAME3) |
| 646 |
AC_SUBST(SONAME2) |
| 647 |
AC_SUBST(SONAME1) |
| 648 |
AC_SUBST(SONAME) |
| 649 |
AC_SUBST(SONAME_LDFLAGS) |
| 650 |
|
| 651 |
dnl Related to that, the package version number |
| 652 |
ECL_VERSION_NUMBER=$(($PACKAGE_MAJOR * 10000 + $PACKAGE_MINOR * 100 + $PACKAGE_LEAST)) |
| 653 |
AC_SUBST(ECL_VERSION_NUMBER) |
| 654 |
|
| 655 |
dnl ---------------------------------------------------------------------- |
| 656 |
dnl Deactivate floating point exceptions if asked to |
| 657 |
if test "${with_ieee_fp}" = yes; then |
| 658 |
with_signed_zero="yes" |
| 659 |
AC_DEFINE([ECL_IEEE_FP], [], [ECL_IEEE_FP]) |
| 660 |
ECL_ADD_FEATURE(ieee-floating-point) |
| 661 |
fi |
| 662 |
if test "${with_fpe}" != yes; then |
| 663 |
AC_DEFINE([ECL_AVOID_FPE_H], [], [ECL_AVOID_FPE_H]) |
| 664 |
fi |
| 665 |
if test "${with_signed_zero}" = yes; then |
| 666 |
AC_DEFINE([ECL_SIGNED_ZERO], [], [ECL_SIGNED_ZERO]) |
| 667 |
fi |
| 668 |
if test "${with_ieee_fp}" != yes -o "${with_fpe}" = yes; then |
| 669 |
ECL_ADD_FEATURE(floating-point-exceptions) |
| 670 |
fi |
| 671 |
|
| 672 |
dnl ===================================================================== |
| 673 |
dnl Checks for header files |
| 674 |
|
| 675 |
dnl !!! autoscan |
| 676 |
AC_PATH_X |
| 677 |
AC_HEADER_DIRENT |
| 678 |
AC_HEADER_STDBOOL |
| 679 |
AC_HEADER_STDC |
| 680 |
AC_HEADER_TIME |
| 681 |
AC_CHECK_HEADERS( [fcntl.h limits.h netdb.h netinet/in.h] \ |
| 682 |
[stddef.h stdlib.h string.h sys/param.h] \ |
| 683 |
[sys/socket.h sys/time.h unistd.h fenv.h] \ |
| 684 |
[sched.h] ) |
| 685 |
dnl !!! end autoscan |
| 686 |
|
| 687 |
AC_CHECK_HEADERS( [sys/utsname.h float.h pwd.h dlfcn.h link.h] \ |
| 688 |
[mach-o/dyld.h dirent.h sys/ioctl.h sys/select.h] \ |
| 689 |
[sys/wait.h] ) |
| 690 |
|
| 691 |
|
| 692 |
AC_CHECK_HEADERS([ulimit.h], [], [], |
| 693 |
[[#ifdef HAVE_ULIMIT_H |
| 694 |
# include <ulimit.h> |
| 695 |
#endif |
| 696 |
]]) |
| 697 |
|
| 698 |
dnl ===================================================================== |
| 699 |
dnl Checks for typedefs, structures, and compiler characteristics. |
| 700 |
|
| 701 |
dnl !!! autoscan |
| 702 |
AC_C_CONST dnl !!! DNLed |
| 703 |
AC_C_INLINE |
| 704 |
AC_TYPE_SIZE_T dnl !!! DNLed |
| 705 |
AC_STRUCT_TM |
| 706 |
AC_C_VOLATILE |
| 707 |
AC_CHECK_TYPES([ptrdiff_t]) |
| 708 |
ECL_LONG_LONG |
| 709 |
dnl !!! end autoscan |
| 710 |
|
| 711 |
dnl !!! dnled in original |
| 712 |
dnl AC_TYPE_PID_T # DEFS pid_t |
| 713 |
dnl AC_TYPE_UID_T # DEFS uid_t, gid_t |
| 714 |
dnl AC_TYPE_OFF_T # DEFS off_t |
| 715 |
dnl AC_C_CHAR_UNSIGNED # DEFS __CHAR_UNSIGNED__ if char is unsigned |
| 716 |
dnl !!! end dnled |
| 717 |
|
| 718 |
AC_C_BIGENDIAN([ECL_ADD_FEATURE(big-endian)], [ECL_ADD_FEATURE(little-endian)], |
| 719 |
[AC_DEFINE(WORDS_BIGENDIAN, [/* EDIT! - Undefine if small endian */])]) |
| 720 |
|
| 721 |
dnl ---------------------------------------------------------------------- |
| 722 |
dnl This flag is an optimization for GNU |
| 723 |
dnl if test "${GCC}" = "yes"; then |
| 724 |
dnl CFLAGS="${CFLAGS} -fstrict-aliasing" |
| 725 |
dnl fi |
| 726 |
|
| 727 |
dnl ---------------------------------------------------------------------- |
| 728 |
dnl Check the appropriate type for cl_fixnum/cl_index |
| 729 |
ECL_FIXNUM_TYPE |
| 730 |
ECL_INTEGER_TYPES |
| 731 |
|
| 732 |
ECL_LINEFEED_MODE |
| 733 |
ECL_FIND_SETJMP |
| 734 |
ECL_FILE_STRUCTURE |
| 735 |
ECL_FPE_MODEL |
| 736 |
ECL_SSE |
| 737 |
ECL_COMPLEX_C99 |
| 738 |
|
| 739 |
dnl ----------------------------------------------------------------------- |
| 740 |
dnl Stack size and growth direction |
| 741 |
ECL_STACK_DIRECTION |
| 742 |
ECL_STACK_SIZE |
| 743 |
|
| 744 |
dnl ===================================================================== |
| 745 |
dnl Checks for library functions |
| 746 |
|
| 747 |
dnl !!! autoscan |
| 748 |
AC_FUNC_CLOSEDIR_VOID |
| 749 |
AC_FUNC_ERROR_AT_LINE |
| 750 |
AC_FUNC_FORK |
| 751 |
AC_PROG_GCC_TRADITIONAL |
| 752 |
AC_FUNC_MALLOC |
| 753 |
AC_FUNC_MEMCMP |
| 754 |
AC_FUNC_MMAP |
| 755 |
AC_FUNC_REALLOC |
| 756 |
AC_FUNC_SELECT_ARGTYPES |
| 757 |
AC_TYPE_SIGNAL |
| 758 |
AC_FUNC_STAT |
| 759 |
AC_FUNC_STRTOD |
| 760 |
AC_CHECK_FUNCS( [floor getcwd gethostbyaddr gethostbyname getpagesize] \ |
| 761 |
[memmove memset mkdir putenv socket sqrt] \ |
| 762 |
[strcasecmp strchr strerror strtol] ) |
| 763 |
dnl !!! end autoscan |
| 764 |
|
| 765 |
AC_CHECK_FUNCS( [nanosleep alarm times select setenv putenv] \ |
| 766 |
[lstat mkstemp sigprocmask isatty tzset] \ |
| 767 |
[gettimeofday getrusage system clock_gettime] ) |
| 768 |
|
| 769 |
AC_CHECK_FUNCS( [expf powf logf sqrtf cosf sinf tanf sinhf coshf tanhf] \ |
| 770 |
[floorf ceilf fabsf frexpf ldexpf log1p log1pf log1pl] \ |
| 771 |
[copysign] ) |
| 772 |
|
| 773 |
AC_CHECK_FUNCS( [sched_yield uname fseeko dladdr backtrace backtrace_symbols] ) |
| 774 |
|
| 775 |
AC_CHECK_HEADER( [sys/mman.h], |
| 776 |
AC_DEFINE([ECL_USE_MPROTECT], [], [ECL_USE_MPROTECT]) |
| 777 |
AC_DEFINE([HAVE_SYS_MMAN_H], [], [HAVE_SYS_MMAN_H]) |
| 778 |
) |
| 779 |
|
| 780 |
ECL_POSIX_ENVIRON |
| 781 |
|
| 782 |
ECL_FLOATING_POINT_EXCEPTIONS |
| 783 |
|
| 784 |
dnl ===================================================================== |
| 785 |
dnl Checks for system services |
| 786 |
|
| 787 |
dnl ===================================================================== |
| 788 |
dnl Final pass over configuration files |
| 789 |
dnl |
| 790 |
dnl Notice that we build ${builddir}/ecl/configpre.h from |
| 791 |
dnl ${srcdir}/ecl/config.h.in, and then use all AC_DEF* to build |
| 792 |
dnl ecl/config.h from ecl/configpre.h |
| 793 |
|
| 794 |
dnl ---------------------------------------------------------------------- |
| 795 |
dnl Do we use C or C++ compiler to compile ecl? |
| 796 |
if test ${with_cxx} = "no" ; then |
| 797 |
AC_SUBST([ECL_CC], [${CC}]) |
| 798 |
else |
| 799 |
AC_SUBST([ECL_CC], [${CXX}]) |
| 800 |
AC_DEFINE([ECL_CXX_CORE], [1], |
| 801 |
[Do we use C or C++ compiler to compile ecl?]) |
| 802 |
boehm_configure_flags="${boehm_configure_flags} --enable-cplusplus" |
| 803 |
ECL_ADD_FEATURE(cxx-core) |
| 804 |
fi |
| 805 |
|
| 806 |
ECL_LIBATOMIC_OPS |
| 807 |
|
| 808 |
dnl ---------------------------------------------------------------------- |
| 809 |
dnl Lisp library and libecl features |
| 810 |
if test ${enable_shared} = "yes"; then |
| 811 |
AC_DEFINE(ENABLE_DLOPEN, [1], [Allow loading dynamically linked code]) |
| 812 |
LSP_LIBRARIES="${SHAREDPREFIX}ecl.${SHAREDEXT}" |
| 813 |
ECL_ADD_LISP_MODULE([dlopen]) |
| 814 |
ECL_ADD_FEATURE(dlopen) |
| 815 |
else |
| 816 |
enable_soname=no |
| 817 |
LSP_LIBRARIES="${LIBPREFIX}ecl.${LIBEXT}" |
| 818 |
ECL_LDRPATH='' |
| 819 |
fi |
| 820 |
|
| 821 |
if test "x${enable_rpath}" = "xno"; then |
| 822 |
ECL_LDRPATH='' |
| 823 |
fi |
| 824 |
|
| 825 |
if test "${with_cmuformat}" = "yes"; then |
| 826 |
with_clos_streams="yes" |
| 827 |
AC_DEFINE([ECL_CMU_FORMAT], [1], [Use CMU Common-Lisp's FORMAT routine]) |
| 828 |
ECL_ADD_FEATURE(cmu-format) |
| 829 |
fi |
| 830 |
|
| 831 |
if test "${with_clos_streams}" = "yes"; then |
| 832 |
AC_DEFINE( ECL_CLOS_STREAMS, [1], |
| 833 |
[Allow STREAM operations to work on arbitrary objects]) |
| 834 |
ECL_ADD_FEATURE(clos-streams) |
| 835 |
fi |
| 836 |
|
| 837 |
if test "${with_cmp}" = "builtin"; then |
| 838 |
ECL_ADD_BUILTIN_MODULE([cmp]) |
| 839 |
with_cmp=yes |
| 840 |
fi |
| 841 |
if test "${with_cmp}" = "yes"; then |
| 842 |
ECL_ADD_LISP_MODULE([cmp]) |
| 843 |
fi |
| 844 |
|
| 845 |
if test "${with_tcp}" = "builtin"; then |
| 846 |
ECL_ADD_BUILTIN_MODULE([sockets]) |
| 847 |
with_tcp=yes |
| 848 |
fi |
| 849 |
if test "${with_tcp}" = "yes"; then |
| 850 |
AC_DEFINE(ECL_TCP, [1], [Network streams]) |
| 851 |
EXTRA_OBJS="${EXTRA_OBJS} tcp.${OBJEXT}" |
| 852 |
ECL_ADD_LISP_MODULE([sockets]) |
| 853 |
LIBS="${LIBS} ${TCPLIBS}" |
| 854 |
fi |
| 855 |
|
| 856 |
if test "${with_serve_event}" = "builtin"; then |
| 857 |
ECL_ADD_BUILTIN_MODULE([serve_event]) |
| 858 |
with_serve_event=yes |
| 859 |
fi |
| 860 |
if test "${with_serve_event}" = "yes"; then |
| 861 |
case "${host_os}" in |
| 862 |
mingw*|cygwin*) ;; |
| 863 |
*) |
| 864 |
ECL_ADD_LISP_MODULE([serve-event]) |
| 865 |
;; |
| 866 |
esac |
| 867 |
fi |
| 868 |
|
| 869 |
if test "${with_asdf}" = "builtin"; then |
| 870 |
ECL_ADD_BUILTIN_MODULE([asdf]) |
| 871 |
with_asdf=yes |
| 872 |
fi |
| 873 |
if test "${with_asdf}" = "yes"; then |
| 874 |
ECL_ADD_LISP_MODULE([asdf]) |
| 875 |
fi |
| 876 |
|
| 877 |
if test "${with_defsystem}" = "builtin"; then |
| 878 |
ECL_ADD_BUILTIN_MODULE([defsystem]) |
| 879 |
with_defsystem=yes |
| 880 |
fi |
| 881 |
if test "${with_defsystem}" = "yes"; then |
| 882 |
ECL_ADD_LISP_MODULE([defsystem]) |
| 883 |
fi |
| 884 |
|
| 885 |
if test "${with_profile}" = "builtin"; then |
| 886 |
ECL_ADD_BUILTIN_MODULE([profile]) |
| 887 |
with_profile=yes |
| 888 |
fi |
| 889 |
if test "${with_profile}" = "yes"; then |
| 890 |
if test "${enable_boehm}" != "no"; then |
| 891 |
ECL_ADD_LISP_MODULE([profile]) |
| 892 |
fi |
| 893 |
fi |
| 894 |
|
| 895 |
if test "${with_bytecmp}" = "builtin"; then |
| 896 |
ECL_ADD_BUILTIN_MODULE([bytecmp]) |
| 897 |
with_bytecmp=yes |
| 898 |
fi |
| 899 |
if test "${with_bytecmp}" = "yes"; then |
| 900 |
ECL_ADD_LISP_MODULE([bytecmp]) |
| 901 |
fi |
| 902 |
|
| 903 |
if test "${with_rt}" = "builtin"; then |
| 904 |
ECL_ADD_BUILTIN_MODULE([rt]) |
| 905 |
with_rt=yes |
| 906 |
fi |
| 907 |
if test "${with_rt}" = "yes"; then |
| 908 |
ECL_ADD_LISP_MODULE([rt]) |
| 909 |
fi |
| 910 |
|
| 911 |
if test "x${enable_unicode}" != "xno"; then |
| 912 |
if test "${enable_unicode}" = 16; then |
| 913 |
AC_DEFINE([ECL_UNICODE], [16], [Support for Unicode]) |
| 914 |
CHAR_CODE_LIMIT=65536 |
| 915 |
ECL_CHARACTER=$ECL_INT16_T |
| 916 |
EXTRA_OBJS="$EXTRA_OBJS unicode/ucd16.o unicode/ucd16-0000.o unicode/ucd16-0016.o unicode/ucd16-0032.o unicode/ucd16-0048.o unicode/ucd16-0064.o" |
| 917 |
else |
| 918 |
AC_DEFINE([ECL_UNICODE], [21], [Support for Unicode]) |
| 919 |
CHAR_CODE_LIMIT=1114112 |
| 920 |
ECL_CHARACTER=$ECL_INT32_T |
| 921 |
EXTRA_OBJS="$EXTRA_OBJS unicode/ucd.o unicode/ucd-0000.o unicode/ucd-0016.o unicode/ucd-0032.o unicode/ucd-0048.o unicode/ucd-0064.o unicode/ucd-0080.o unicode/ucd-0096.o unicode/ucd-0112.o unicode/ucd-0128.o unicode/ucd-0144.o" |
| 922 |
fi |
| 923 |
AC_DEFINE([ECL_UNICODE_NAMES], [1], [Link in the database of Unicode names]) |
| 924 |
EXTRA_OBJS="$EXTRA_OBJS unicode/ucd_names_char.o unicode/ucd_names_codes.o unicode/ucd_names_pair.o unicode/ucd_names_str.o" |
| 925 |
AC_CHECK_HEADERS([wchar.h]) |
| 926 |
ECL_ADD_FEATURE(unicode) |
| 927 |
else |
| 928 |
CHAR_CODE_LIMIT=256 |
| 929 |
ECL_CHARACTER="int" |
| 930 |
fi |
| 931 |
AC_SUBST(ECL_CHARACTER) |
| 932 |
AC_SUBST(CHAR_CODE_LIMIT) |
| 933 |
|
| 934 |
AC_SUBST(ECL_EXTRA_LISP_FILES) |
| 935 |
ECL_EXTRA_LISP_FILES="" |
| 936 |
for i in $with_extra_files; do |
| 937 |
ECL_EXTRA_LISP_FILES="${ECL_EXTRA_LISP_FILES} \"$i\"" |
| 938 |
done |
| 939 |
AC_SUBST(ECL_INIT_FORM) |
| 940 |
echo ${with_init_form} = init form |
| 941 |
if test "x${with_init_form}" = "x"; then |
| 942 |
ECL_INIT_FORM='(SI::TOP-LEVEL T)' |
| 943 |
else |
| 944 |
ECL_INIT_FORM="${with_init_form}" |
| 945 |
fi |
| 946 |
|
| 947 |
ECL_ADD_FEATURE(${ARCHITECTURE}) |
| 948 |
|
| 949 |
AC_CONFIG_FILES([ |
| 950 |
bare.lsp |
| 951 |
lsp/load.lsp |
| 952 |
clos/load.lsp |
| 953 |
cmp/load.lsp |
| 954 |
../Makefile |
| 955 |
Makefile |
| 956 |
c/Makefile |
| 957 |
doc/Makefile |
| 958 |
doc/ecl.man |
| 959 |
doc/ecl-config.man |
| 960 |
ecl/configpre.h:h/config.h.in |
| 961 |
ecl/configpre-int.h:h/config-internal.h.in |
| 962 |
bin/ecl-config.pre:util/ecl-config |
| 963 |
lsp/config.lsp:lsp/config.lsp.in |
| 964 |
compile.pre:compile.lsp.in |
| 965 |
cmp/cmpdefs.pre:cmp/cmpdefs.lsp |
| 966 |
tests/config.lsp |
| 967 |
tests/Makefile |
| 968 |
c/ecl_features.h |
| 969 |
]) |
| 970 |
|
| 971 |
AC_CONFIG_HEADERS([ecl/config.h:ecl/configpre.h]) |
| 972 |
AC_CONFIG_HEADERS([ecl/config-internal.h:ecl/configpre-int.h]) |
| 973 |
AC_OUTPUT |
| 974 |
|
| 975 |
for i in $srcdir/c/*/; do mkdir -p c/`basename $i`; done |