comparison configure.in @ 153:25f70ba0133c r20-3b3

Import from CVS: tag r20-3b3
author cvs
date Mon, 13 Aug 2007 09:38:25 +0200
parents 59463afc5666
children 43dd3413c7c7
comparison
equal deleted inserted replaced
152:4c132ee2d62b 153:25f70ba0133c
1 dnl Define our own header notice with own copyrights 1 dnl Define our own header notice with own copyrights
2 define([PRINT_VAR],[ifelse([$#] ,0, , [$#], 1, echo "[$1] = $[$1]", echo "[$1] = $[$1]"
3 [PRINT_VAR(builtin([shift],$@))])])
4 define([AC_INIT_NOTICE], 2 define([AC_INIT_NOTICE],
5 [#### Configuration script for XEmacs. Largely divergent from FSF. 3 [#### Configuration script for XEmacs. Largely divergent from FSF.
6 #### Guess values for system-dependent variables and create Makefiles. 4 #### Guess values for system-dependent variables and create Makefiles.
7 #### Generated automatically using autoconf version] AC_ACVERSION [ 5 #### Generated automatically using autoconf version] AC_ACVERSION [
8 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. 6 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
57 dnl - no cache file 55 dnl - no cache file
58 dnl - non-standard options 56 dnl - non-standard options
59 dnl - suport for extra-verbosity 57 dnl - suport for extra-verbosity
60 dnl - ordinary libs are handled separately from X libs (might be a mistake) 58 dnl - ordinary libs are handled separately from X libs (might be a mistake)
61 dnl - various random kludges (e.g. -with-dnet=no 59 dnl - various random kludges (e.g. -with-dnet=no
60
61 dnl PRINT_VAR(var, var, ...) prints values of shell variables
62 define([PRINT_VAR],[ifelse([$#] ,0, , [$#], 1, echo "[$1]=\"$[$1]\"", echo "[$1] = $[$1]"
63 [PRINT_VAR(builtin([shift],$@))])])
62 64
63 dnl Disable cache files: 65 dnl Disable cache files:
64 dnl This is controversial, but I am convinced this is the right way to go, 66 dnl This is controversial, but I am convinced this is the right way to go,
65 dnl at least by default. Otherwise there are too many surprises. 67 dnl at least by default. Otherwise there are too many surprises.
66 define([AC_CACHE_LOAD], )dnl 68 define([AC_CACHE_LOAD], )dnl
195 dnl ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' 197 dnl ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
196 dnl # $c_switch_x_machine $c_switch_x_system 198 dnl # $c_switch_x_machine $c_switch_x_system
197 dnl # $ld_switch_x_machine $ld_switch_x_system 199 dnl # $ld_switch_x_machine $ld_switch_x_system
198 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' 200 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
199 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run' 201 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
200 xe_libs='$xe_check_libs $X_PRE_LIBS $libs_x $X_EXTRA_LIBS $LIBS $libs_machine $libs_system $libs_standard' 202 xe_libs='$xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
201 ac_cpp='$CPP '"$xe_cppflags" 203 ac_cpp='$CPP '"$xe_cppflags"
202 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&AC_FD_CC' 204 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&AC_FD_CC'
203 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&AC_FD_CC' 205 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&AC_FD_CC'
204 cross_compiling=no 206 cross_compiling=no
205 ]) 207 ])
230 define([AC_INIT_PARSE_ARGS],[ 232 define([AC_INIT_PARSE_ARGS],[
231 dnl Initialize some variables set by options. 233 dnl Initialize some variables set by options.
232 dnl The variables have the same names as the options, with 234 dnl The variables have the same names as the options, with
233 dnl dashes changed to underlines. 235 dnl dashes changed to underlines.
234 build=NONE 236 build=NONE
235 cache_file=/dev/null
236 exec_prefix=NONE 237 exec_prefix=NONE
237 host=NONE 238 host=NONE
238 no_create= 239 no_create=
239 nonopt=NONE 240 nonopt=NONE
240 no_recursion= 241 no_recursion=
247 srcdir= 248 srcdir=
248 target=NONE 249 target=NONE
249 verbose= 250 verbose=
250 x_includes=NONE 251 x_includes=NONE
251 x_libraries=NONE 252 x_libraries=NONE
253
254 dnl Allow this script to work with zsh, by setting sh emulation options
255 if test -n "$ZSH_VERSION"; then
256 setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
257 setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
258 setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
259 setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
260 fi
261
252 dnl Installation directory options. 262 dnl Installation directory options.
253 dnl These are left unexpanded so users can "make install exec_prefix=/foo" 263 dnl These are left unexpanded so users can "make install exec_prefix=/foo"
254 dnl and all the variables that are supposed to be based on exec_prefix 264 dnl and all the variables that are supposed to be based on exec_prefix
255 dnl by default will actually change. 265 dnl by default will actually change.
256 dnl Use braces instead of parens because sh, perl, etc. also accept them. 266 dnl Use braces instead of parens because sh, perl, etc. also accept them.
290 progname="`echo $0 | sed 's:^\./\./:\./:'`" 300 progname="`echo $0 | sed 's:^\./\./:\./:'`"
291 301
292 dnl ----------------------------- 302 dnl -----------------------------
293 dnl Establish some default values 303 dnl Establish some default values
294 dnl ----------------------------- 304 dnl -----------------------------
295
296 dnl Prevent autoconf2 caching
297 cache_file=/dev/null
298 305
299 XE_APPEND(lib-src, MAKE_SUBDIR) 306 XE_APPEND(lib-src, MAKE_SUBDIR)
300 307
301 dnl run_in_place='no' 308 dnl run_in_place='no'
302 prefix='/usr/local' 309 prefix='/usr/local'
333 use_system_malloc='default' 340 use_system_malloc='default'
334 energize_version='' 341 energize_version=''
335 native_sound_lib='' 342 native_sound_lib=''
336 dnl make normal error-checking be the default in alpha and beta versions, so 343 dnl make normal error-checking be the default in alpha and beta versions, so
337 dnl that bugs get noticed. Change this for released versions. 344 dnl that bugs get noticed. Change this for released versions.
338 error_check_default='yes' 345 error_check_default="yes"
339 error_check_extents=$error_check_default 346 error_check_extents=$error_check_default
340 error_check_typecheck=$error_check_default 347 error_check_typecheck=$error_check_default
341 error_check_bufpos=$error_check_default 348 error_check_bufpos=$error_check_default
342 error_check_gc=$error_check_default 349 error_check_gc=$error_check_default
343 error_check_malloc=$error_check_default 350 error_check_malloc=$error_check_default
347 dnl Default to --extra-verbose when debugging 354 dnl Default to --extra-verbose when debugging
348 extra_verbose=$error_check_default 355 extra_verbose=$error_check_default
349 dnl use-assertions should be 'yes' by default. Too many people in this 356 dnl use-assertions should be 'yes' by default. Too many people in this
350 dnl world have core dumps turned off by default or \"cannot find where the 357 dnl world have core dumps turned off by default or \"cannot find where the
351 dnl core file went\". At least we should get some useful output ... 358 dnl core file went\". At least we should get some useful output ...
352 use_assertions='yes' 359 use_assertions="yes"
353 dnl the following is set to yes or no later. 360 dnl the following is set to yes or no later.
354 with_gif='' 361 with_gif=""
355 dnl the following is set to yes or no later. 362 dnl the following is set to yes or no later.
356 with_toolbars='' 363 with_toolbars=""
357 use_union_type='no' 364 use_union_type="no"
358 with_dnet='' 365 with_dnet=""
359 366
360 dnl On Sun systems, people sometimes set up the variable CPP 367 dnl On Sun systems, people sometimes set up the variable CPP
361 dnl with a value that is a directory, not an executable at all. 368 dnl with a value that is a directory, not an executable at all.
362 dnl Detect that case, and ignore that value. 369 dnl Detect that case, and ignore that value.
363 test -n "$CPP" -a -d "$CPP" && CPP= 370 test -n "$CPP" -a -d "$CPP" && CPP=
449 (not yet implemented). 456 (not yet implemented).
450 457
451 458
452 TTY options: 459 TTY options:
453 460
461 --with-tty=no Don't support TTY-s.
454 --with-ncurses (*) Use the ncurses library for tty support. 462 --with-ncurses (*) Use the ncurses library for tty support.
455 --with-gpm (*) Compile in support for General Purpose Mouse. 463 --with-gpm (*) Compile in support for General Purpose Mouse.
456 464
457 465
458 Additional features: 466 Additional features:
459 467
460 --with-tooltalk (*) Support the ToolTalk IPC protocol. 468 --with-tooltalk (*) Support the ToolTalk IPC protocol.
476 --with-sound=nas Compile with network sound support. 484 --with-sound=nas Compile with network sound support.
477 --with-sound=both Compile with native and network sound support. 485 --with-sound=both Compile with native and network sound support.
478 --native-sound-lib=LIB Native sound support library. Needed on Suns 486 --native-sound-lib=LIB Native sound support library. Needed on Suns
479 with --with-sound=both because both sound libraries 487 with --with-sound=both because both sound libraries
480 are called libaudio. 488 are called libaudio.
481 --with-mocklisp Compile with Mocklisp support. Don't do this
482 unless you have a Mocklisp program that you need
483 to run.
484 --with-pop support POP for mail retrieval 489 --with-pop support POP for mail retrieval
485 --with-kerberos support Kerberos-authenticated POP 490 --with-kerberos support Kerberos-authenticated POP
486 --with-hesiod support Hesiod to get the POP server host 491 --with-hesiod support Hesiod to get the POP server host
487 --with-dnet (*) Compile with support for DECnet. 492 --with-dnet (*) Compile with support for DECnet.
488 --mail-locking=TYPE (*) Specify the locking to be used by movemail to prevent 493 --mail-locking=TYPE (*) Specify the locking to be used by movemail to prevent
581 quoted_arguments= 586 quoted_arguments=
582 for i in "$@"; do 587 for i in "$@"; do
583 case "$i" in 588 case "$i" in
584 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 589 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
585 | --no-cr | --no-c) ;; 590 | --no-cr | --no-c) ;;
586 -norecursion | --norecursion | --norecursio | --norecursi \ 591 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
587 | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;; 592 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
588 *) 593 *)
589 quoted_i="`echo $i | sed $quoted_sed_magic`" 594 quoted_i="`echo $i | sed $quoted_sed_magic`"
590 quoted_arguments="$quoted_arguments '$quoted_i'" ;; 595 quoted_arguments="$quoted_arguments '$quoted_i'" ;;
591 esac 596 esac
592 done 597 done
660 with_i18n3 | \ 665 with_i18n3 | \
661 with_mule | \ 666 with_mule | \
662 with_canna | \ 667 with_canna | \
663 with_wnn | \ 668 with_wnn | \
664 with_wnn6 | \ 669 with_wnn6 | \
665 with_mocklisp | \
666 with_energize | \ 670 with_energize | \
667 with_workshop | \ 671 with_workshop | \
668 with_sparcworks | \ 672 with_sparcworks | \
669 with_tooltalk | \ 673 with_tooltalk | \
670 with_pop | \ 674 with_pop | \
689 esac 693 esac
690 eval "$opt=\"$val\"" ;; 694 eval "$opt=\"$val\"" ;;
691 695
692 696
693 dnl Options that take a user-supplied value, as in --puresize=8000000 697 dnl Options that take a user-supplied value, as in --puresize=8000000
698 dnl The cache-file option is ignored (for compatibility with other configures)
694 srcdir | \ 699 srcdir | \
695 compiler | \ 700 compiler | \
696 puresize | \ 701 puresize | \
702 cache_file | \
697 native_sound_lib | \ 703 native_sound_lib | \
698 x_includes | \ 704 x_includes | \
699 x_libraries | \ 705 x_libraries | \
700 site_includes | \ 706 site_includes | \
701 site_libraries | \ 707 site_libraries | \
1672 CPP_to_sh(LD_SWITCH_SYSTEM, ld_switch_system) 1678 CPP_to_sh(LD_SWITCH_SYSTEM, ld_switch_system)
1673 CPP_to_sh(UNEXEC, unexec, unexec.o) 1679 CPP_to_sh(UNEXEC, unexec, unexec.o)
1674 CPP_to_sh(C_DEBUG_SWITCH, c_debug_switch, -g) 1680 CPP_to_sh(C_DEBUG_SWITCH, c_debug_switch, -g)
1675 CPP_to_sh(C_OPTIMIZE_SWITCH, c_optimize_switch, -O) 1681 CPP_to_sh(C_OPTIMIZE_SWITCH, c_optimize_switch, -O)
1676 1682
1683 CPP_boolean_to_sh(ORDINARY_LINK, ordinary_link)
1677 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc) 1684 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc)
1678 CPP_boolean_to_sh(TERMINFO, have_terminfo) 1685 CPP_boolean_to_sh(TERMINFO, have_terminfo)
1679 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock) 1686 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock)
1680 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf) 1687 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf)
1681 1688
1702 dnl The value of CPP is a quoted variable reference, so we need to do this 1709 dnl The value of CPP is a quoted variable reference, so we need to do this
1703 dnl to get its actual value... 1710 dnl to get its actual value...
1704 CPP=`eval "echo $CPP"` 1711 CPP=`eval "echo $CPP"`
1705 eval `$CPP -Isrc $tempcname \ 1712 eval `$CPP -Isrc $tempcname \
1706 | grep 'configure___' \ 1713 | grep 'configure___' \
1707 | sed -n -e 's/^configure___ \([[^=]]*=\)\(.*\)$/\1"\2"/p'` 1714 | sed -n -e 's/^configure___ \([[^= ]]* *=\)\(.*\)$/\1\`echo \2\`/p'`
1708 if test -z "$SPECIFIED_CFLAGS"; then 1715 if test -z "$SPECIFIED_CFLAGS"; then
1709 eval `$CPP -Isrc -DTHIS_IS_CONFIGURE $tempcname \ 1716 eval `$CPP -Isrc -DTHIS_IS_CONFIGURE $tempcname \
1710 | grep 'configure___' \ 1717 | grep 'configure___' \
1711 | sed -n -e 's/^configure___ \([[^=]]*=\)\(.*\)$/\1"\2"/p'` 1718 | sed -n -e 's/^configure___ \([[^= ]]* *=\)\(.*\)$/\1\`echo \2\`/p'`
1712 else 1719 else
1713 REAL_CFLAGS="$CFLAGS" 1720 REAL_CFLAGS="$CFLAGS"
1714 fi 1721 fi
1722
1715 rm $tempcname 1723 rm $tempcname
1724
1725 dnl Non-ordinary link usually requires -lc
1726 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
1716 1727
1717 dnl override CFLAGS if user wishes 1728 dnl override CFLAGS if user wishes
1718 test "$cflags" != "NO_CFLAGS_DEFINED" && REAL_CFLAGS="$cflags" 1729 test "$cflags" != "NO_CFLAGS_DEFINED" && REAL_CFLAGS="$cflags"
1719 1730
1720 dnl Add unexec object to link line 1731 dnl Add unexec object to link line
2051 2062
2052 dnl make sure we can find Intrinsic.h 2063 dnl make sure we can find Intrinsic.h
2053 AC_CHECK_HEADER(X11/Intrinsic.h, , 2064 AC_CHECK_HEADER(X11/Intrinsic.h, ,
2054 [AC_MSG_ERROR("Unable to find X11 header files.")]) 2065 [AC_MSG_ERROR("Unable to find X11 header files.")])
2055 2066
2056 dnl -lXt -lX11 are required 2067 dnl -lXt and -lX11 are required
2057 dnl Some broken systems require the magic "-b i486-linuxaout" flag 2068 dnl Some broken systems require the magic "-b i486-linuxaout" flag
2058 AC_CHECK_LIB(X11, XOpenDisplay, have_lib_x11=yes) 2069 AC_CHECK_LIB(X11, XOpenDisplay, have_lib_x11=yes)
2059 if test "$have_lib_x11" != "yes"; then 2070 if test "$have_lib_x11" != "yes"; then
2060 AC_CHECK_LIB(X11, XGetFontProperty, 2071 AC_CHECK_LIB(X11, XGetFontProperty,
2061 ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site", 2072 ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site",
2063 -b i486-linuxaout) 2074 -b i486-linuxaout)
2064 fi 2075 fi
2065 libs_x="-lX11" 2076 libs_x="-lX11"
2066 test "$extra_verbose" = "yes" && echo " Setting libs_x to \"-lX11\"" 2077 test "$extra_verbose" = "yes" && echo " Setting libs_x to \"-lX11\""
2067 2078
2079 dnl Autodetect -lXext
2080 AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x))
2081
2082 dnl Require -lXt
2068 case "$canonical" in *-sunos4.* ) # Bug workaround 2083 case "$canonical" in *-sunos4.* ) # Bug workaround
2069 ld_switch_x_site="$ld_switch_x_site -u _XtToolkitInitialize" ;; 2084 ld_switch_x_site="$ld_switch_x_site -u _XtToolkitInitialize" ;;
2070 esac 2085 esac
2071 AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x), 2086 AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x),
2072 [AC_MSG_ERROR("Unable to find X11 libraries.")]) 2087 [AC_MSG_ERROR("Unable to find X11 libraries.")])
2089 AC_MSG_RESULT(yes) 2104 AC_MSG_RESULT(yes)
2090 AC_DEFINE(HAVE_XFREE386) 2105 AC_DEFINE(HAVE_XFREE386)
2091 else 2106 else
2092 AC_MSG_RESULT(no) 2107 AC_MSG_RESULT(no)
2093 fi 2108 fi
2094
2095 dnl Autodetect -lXext
2096 AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x))
2097 2109
2098 dnl autodetect -lXmu 2110 dnl autodetect -lXmu
2099 case "$canonical" in *-sunos4.* ) # Bug workaround 2111 case "$canonical" in *-sunos4.* ) # Bug workaround
2100 ld_switch_x_site="$ld_switch_x_site -u _get_applicationShellWidgetClass" ;; 2112 ld_switch_x_site="$ld_switch_x_site -u _get_applicationShellWidgetClass" ;;
2101 esac 2113 esac
2466 linux* | decosf4-0* | aix4* ) XE_ADD_OBJS(realpath.o) ;; 2478 linux* | decosf4-0* | aix4* ) XE_ADD_OBJS(realpath.o) ;;
2467 * ) 2479 * )
2468 AC_CHECK_FUNCS(realpath) 2480 AC_CHECK_FUNCS(realpath)
2469 test "$ac_cv_func_realpath" != "yes" && XE_ADD_OBJS(realpath.o) ;; 2481 test "$ac_cv_func_realpath" != "yes" && XE_ADD_OBJS(realpath.o) ;;
2470 esac 2482 esac
2471
2472 dnl mocklisp support - probably should excise it...
2473 test "$with_mocklisp" = "yes" && XE_ADD_OBJS(mocklisp.o)
2474 2483
2475 dnl If netdb.h does not declare h_errno, we must declare it by hand. 2484 dnl If netdb.h does not declare h_errno, we must declare it by hand.
2476 AC_MSG_CHECKING(whether netdb declares h_errno) 2485 AC_MSG_CHECKING(whether netdb declares h_errno)
2477 AC_TRY_LINK([#include <netdb.h>], 2486 AC_TRY_LINK([#include <netdb.h>],
2478 [return h_errno;], 2487 [return h_errno;],
2573 2582
2574 dnl Check whether strcoll exists and works correctly. (This does more 2583 dnl Check whether strcoll exists and works correctly. (This does more
2575 dnl than just check for its existence.) If so, it defines HAVE_STRCOLL. 2584 dnl than just check for its existence.) If so, it defines HAVE_STRCOLL.
2576 AC_FUNC_STRCOLL 2585 AC_FUNC_STRCOLL
2577 2586
2578 AC_FUNC_MMAP 2587 dnl We used to call AC_FUNC_MMAP here
2588 dnl Instead we now use following, suggested by Neal Becker
2589 AC_MSG_CHECKING(for working mmap)
2590 AC_TRY_RUN([#include <stdio.h>
2591 #include <unistd.h>
2592 #include <fcntl.h>
2593 #include <sys/mman.h>
2594
2595 #ifndef MAP_VARIABLE
2596 #define MAP_VARIABLE 0
2597 #endif
2598
2599 #ifndef MAP_FAILED
2600 #define MAP_FAILED -1
2601 #endif
2602
2603 int main (int argc, char *argv[])
2604 {
2605 int fd = -1;
2606 caddr_t p;
2607 #ifndef MAP_ANONYMOUS
2608 fd = open ("/dev/zero", O_RDWR);
2609 if (fd < 0)
2610 return 1;
2611 #define MAP_ANONYMOUS 0
2612 #endif
2613 if (mmap(0, 1024, PROT_READ | PROT_WRITE,
2614 MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
2615 fd, 0) != (void *) MAP_FAILED)
2616 return 0;
2617 perror ("conftest: mmap failed");
2618 return 1;
2619 }], have_mmap=yes, have_mmap=no)
2620 AC_MSG_RESULT($have_mmap)
2621 test "$have_mmap" = "yes" && AC_DEFINE(HAVE_MMAP)
2579 2622
2580 dnl rel_alloc requires either GNU malloc or system malloc with mmap 2623 dnl rel_alloc requires either GNU malloc or system malloc with mmap
2581 dnl We only turn rel_alloc on by default if mmap is available. 2624 dnl We only turn rel_alloc on by default if mmap is available.
2582 test "$GNU_MALLOC" != "yes" -a "$ac_cv_func_mmap_fixed_mapped" != "yes" && rel_alloc=no 2625 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
2583 test "$rel_alloc" = "default" -a "$ac_cv_func_mmap_fixed_mapped" = "yes" && rel_alloc=yes 2626 test "$rel_alloc" = "default" -a "$have_mmap" = "yes" && rel_alloc=yes
2584 test "$rel_alloc" = "yes" && AC_DEFINE(REL_ALLOC) 2627 test "$rel_alloc" = "yes" && AC_DEFINE(REL_ALLOC)
2585 2628
2586 dnl Check for Internet sockets. 2629 dnl Check for Internet sockets.
2587 AC_CHECK_FUNC(socket, 2630 AC_CHECK_FUNC(socket,
2588 [AC_CHECK_HEADER(netinet/in.h, 2631 [AC_CHECK_HEADER(netinet/in.h,
2725 dnl TERMIOS systems may have termio.h, but not vice-versa, I think. 2768 dnl TERMIOS systems may have termio.h, but not vice-versa, I think.
2726 AC_CHECK_HEADER(termios.h, [AC_DEFINE(HAVE_TERMIOS)], 2769 AC_CHECK_HEADER(termios.h, [AC_DEFINE(HAVE_TERMIOS)],
2727 [AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO)])]) 2770 [AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO)])])
2728 2771
2729 dnl Autodetect gpm 2772 dnl Autodetect gpm
2730 #### Attn: Bill Perry: Remove next line when GPM support is added
2731 test -z "$with_gpm" && with_gpm=no
2732
2733 test -z "$with_gpm" && { AC_CHECK_HEADER(gpm.h, , with_gpm=no) } 2773 test -z "$with_gpm" && { AC_CHECK_HEADER(gpm.h, , with_gpm=no) }
2734 test -z "$with_gpm" && { AC_CHECK_LIB(gpm, connect_to_gpm, with_gpm=yes, with_gpm=no) } 2774 test -z "$with_gpm" && { AC_CHECK_LIB(gpm, Gpm_Open, with_gpm=yes, with_gpm=no) }
2735 if test "$with_gpm" = "yes"; then 2775 if test "$with_gpm" = "yes"; then
2736 AC_DEFINE(HAVE_GPM) 2776 AC_DEFINE(HAVE_GPM)
2737 XE_ADD_OBJS(gpmevent.o) 2777 XE_ADD_OBJS(gpmevent.o)
2738 XE_PREPEND(-lgpm, LIBS) 2778 XE_PREPEND(-lgpm, LIBS)
2739 fi 2779 fi
2747 AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h) 2787 AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h)
2748 AC_CHECK_HEADER(ncurses/term.h, term_h_path=ncurses/term.h) 2788 AC_CHECK_HEADER(ncurses/term.h, term_h_path=ncurses/term.h)
2749 XE_ADD_OBJS(terminfo.o) 2789 XE_ADD_OBJS(terminfo.o)
2750 XE_PREPEND(-lncurses, LIBS) 2790 XE_PREPEND(-lncurses, LIBS)
2751 2791
2752 if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then 2792 if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
2753 dnl Try again, and check for the bogus ncurses/ include bug. 2793 dnl Try again, and check for the bogus ncurses/ include bug.
2754 dnl (i.e. ncurses/curses.h bogusly includes <unctrl.h> instead of 2794 dnl (i.e. ncurses/curses.h bogusly includes <unctrl.h> instead of
2755 dnl <ncurses/unctrl.h>) 2795 dnl <ncurses/unctrl.h>)
2756 save_c_switch_site="$c_switch_site" 2796 save_c_switch_site="$c_switch_site"
2757 c_switch_site="$c_switch_site -I/usr/include/ncurses" 2797 c_switch_site="$c_switch_site -I/usr/include/ncurses"
2758 AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h) 2798 AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h)
2759 if test "$ac_cv_header_ncurses_curses_h" = "yes"; 2799 if test "$ac_cv_header_ncurses_curses_h" = "yes"
2760 then AC_MSG_WARN("Your system has the bogus ncurses include bug.") 2800 then AC_MSG_WARN("Your system has the bogus ncurses include bug.")
2761 else c_switch_site="$save_c_switch_site" 2801 else c_switch_site="$save_c_switch_site"
2762 fi 2802 fi
2763 fi 2803 fi
2764 else dnl "$with_ncurses" = "no" 2804 else dnl "$with_ncurses" = "no"
2767 XE_ADD_OBJS(terminfo.o) 2807 XE_ADD_OBJS(terminfo.o)
2768 if test -n "$libs_termcap"; then 2808 if test -n "$libs_termcap"; then
2769 XE_PREPEND($libs_termcap, LIBS) 2809 XE_PREPEND($libs_termcap, LIBS)
2770 else 2810 else
2771 for lib in curses termlib termcap; do 2811 for lib in curses termlib termcap; do
2772 AC_CHECK_LIB($lib, tgetent, [XE_PREPEND(-l${lib}, LIBS)]; break) 2812 AC_CHECK_LIB($lib, tgetent, XE_PREPEND(-l${lib}, LIBS); break)
2773 done 2813 done
2774 fi 2814 fi
2775 else dnl "$have_terminfo" = "no" && "with_ncurses" = "no" 2815 else dnl "$have_terminfo" = "no" && "with_ncurses" = "no"
2776 XE_ADD_OBJS(tparam.o) 2816 XE_ADD_OBJS(tparam.o)
2777 dnl The HP-UX curses library seems to have a badly broken version of select(2) 2817 dnl The HP-UX curses library seems to have a badly broken version of select(2)
2779 dnl Emacs suprocesses to hang (e.g. TeX compilation w/ AUCTeX) */ 2819 dnl Emacs suprocesses to hang (e.g. TeX compilation w/ AUCTeX) */
2780 case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac 2820 case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
2781 if test -n "$libs_termcap"; then 2821 if test -n "$libs_termcap"; then
2782 XE_PREPEND($libs_termcap, LIBS) 2822 XE_PREPEND($libs_termcap, LIBS)
2783 else 2823 else
2784 AC_CHECK_LIB(curses, tgetent, [XE_PREPEND(-lcurses, LIBS)],[ 2824 AC_CHECK_LIB(curses, tgetent, XE_PREPEND(-lcurses, LIBS),
2785 AC_CHECK_LIB(termcap, tgetent, [XE_PREPEND(-ltermcap, LIBS)], [ 2825 AC_CHECK_LIB(termcap, tgetent, XE_PREPEND(-ltermcap, LIBS),
2786 XE_ADD_OBJS(termcap.o)])]) 2826 XE_ADD_OBJS(termcap.o)))
2787 fi 2827 fi
2788 fi 2828 fi
2789 fi 2829 fi
2790 AC_DEFINE_UNQUOTED(CURSES_H_PATH, "${curses_h_path-curses.h}") 2830 AC_DEFINE_UNQUOTED(CURSES_H_PATH, "${curses_h_path-curses.h}")
2791 AC_DEFINE_UNQUOTED(TERM_H_PATH, "${term_h_path-term.h}") 2831 AC_DEFINE_UNQUOTED(TERM_H_PATH, "${term_h_path-term.h}")
2886 2926
2887 dnl -------------------------------- 2927 dnl --------------------------------
2888 dnl Compute SUBST-itutable variables 2928 dnl Compute SUBST-itutable variables
2889 dnl -------------------------------- 2929 dnl --------------------------------
2890 dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM) 2930 dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM)
2891 c_switch_general="-DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system" 2931 dnl Use `echo ...` to remove extraneous blanks
2892 c_switch_window_system="$c_switch_x_site $X_CFLAGS" 2932 c_switch_general=`echo -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system`
2893 c_switch_all="$c_switch_general $c_switch_window_system" 2933 c_switch_window_system=`echo $c_switch_x_site $X_CFLAGS`
2894 ld_switch_general="$ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run" 2934 c_switch_all=`echo $c_switch_general $c_switch_window_system`
2895 ld_switch_window_system="$ld_switch_x_site" 2935 ld_switch_general=`echo $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run`
2896 ld_switch_all="$ld_switch_general $ld_switch_window_system" 2936 ld_switch_window_system=`echo $ld_switch_x_site`
2897 ld_libs_general="$LIBS $libs_machine $libs_system $libs_standard" 2937 ld_switch_all=`echo $ld_switch_general $ld_switch_window_system`
2898 ld_libs_window_system="$X_PRE_LIBS $libs_x $X_EXTRA_LIBS" 2938 ld_libs_general=`echo $LIBS $libs_machine $libs_system $libs_standard`
2899 ld_libs_all="$ld_libs_window_system $ld_libs_general" 2939 ld_libs_window_system=`echo $X_EXTRA_LIBS $libs_x $X_PRE_LIBS`
2940 ld_libs_all=`echo $ld_libs_window_system $ld_libs_general`
2900 2941
2901 dnl Compute lists of Makefiles and subdirs 2942 dnl Compute lists of Makefiles and subdirs
2902 SRC_SUBDIR_DEPS="$MAKE_SUBDIR" 2943 SRC_SUBDIR_DEPS="$MAKE_SUBDIR"
2903 AC_SUBST(SRC_SUBDIR_DEPS) 2944 AC_SUBST(SRC_SUBDIR_DEPS)
2904 XE_APPEND(src, MAKE_SUBDIR) 2945 XE_APPEND(src, MAKE_SUBDIR)
2905 internal_makefile_list="Makefile" 2946 internal_makefile_list="Makefile"
2906 SUBDIR_MAKEFILES='' 2947 SUBDIR_MAKEFILES=''
2907 test -d lock || mkdir lock 2948 test -d lock || mkdir lock
2908 for dir in $MAKE_SUBDIR; do 2949 for dir in $MAKE_SUBDIR; do
2909 test -d "$dir" || mkdir "$dir" 2950 test -d "$dir" || mkdir "$dir"
2910 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $dir/Makefile" 2951 SUBDIR_MAKEFILES=`echo $SUBDIR_MAKEFILES $dir/Makefile`
2911 internal_makefile_list="$internal_makefile_list $dir/Makefile.in" 2952 internal_makefile_list=`echo $internal_makefile_list $dir/Makefile.in`
2912 done 2953 done
2913 AC_SUBST(MAKE_SUBDIR) 2954 AC_SUBST(MAKE_SUBDIR)
2914 AC_SUBST(SUBDIR_MAKEFILES) 2955 AC_SUBST(SUBDIR_MAKEFILES)
2915 2956
2916 if test "$extra_verbose" = "yes"; then 2957 if test "$extra_verbose" = "yes"; then
2922 echo "" 2963 echo ""
2923 fi 2964 fi
2924 2965
2925 dnl Create some auxiliary files 2966 dnl Create some auxiliary files
2926 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then 2967 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
2927 echo "creating src/gdbinit" 2968 echo "creating src/gdbinit"; echo ""
2928 echo "source $srcdir/src/gdbinit" > src/gdbinit 2969 echo "source $srcdir/src/gdbinit" > src/gdbinit
2929 fi 2970 fi
2930 2971
2931 dnl Create top level .sbinit for Sun compilers 2972 dnl Create top level .sbinit for Sun compilers
2932 AC_TRY_COMPILE([],[#ifndef __SUNPRO_C 2973 AC_TRY_COMPILE([],[#ifndef __SUNPRO_C
2933 #error No Sun source browser capability 2974 #error No Sun source browser capability
2934 #endif 2975 #endif
2935 ],[echo "creating .sbinit" 2976 ],[echo "creating .sbinit"; echo ""
2936 ( echo "# For use with Sun WorkShop's Source browser." 2977 ( echo "# For use with Sun WorkShop's Source browser."
2937 echo "# See sbquery(1) and sbinit(4) for more information" 2978 echo "# See sbquery(1) and sbinit(4) for more information"
2938 for dir in $MAKE_SUBDIR; do echo "import $dir"; done 2979 for dir in $MAKE_SUBDIR; do echo "import $dir"; done
2939 ) > .sbinit 2980 ) > .sbinit
2940 ]) 2981 ])
3025 if test "$GNU_MALLOC" = "yes"; then AC_DEFINE(GNU_MALLOC) 3066 if test "$GNU_MALLOC" = "yes"; then AC_DEFINE(GNU_MALLOC)
3026 elif test "$use_system_malloc" = "yes"; then AC_DEFINE(USE_SYSTEM_MALLOC) 3067 elif test "$use_system_malloc" = "yes"; then AC_DEFINE(USE_SYSTEM_MALLOC)
3027 fi 3068 fi
3028 test "$with_motif" = "yes" && AC_DEFINE(LWLIB_USES_MOTIF) 3069 test "$with_motif" = "yes" && AC_DEFINE(LWLIB_USES_MOTIF)
3029 test "$with_i18n3" = "yes" && AC_DEFINE(I18N3) 3070 test "$with_i18n3" = "yes" && AC_DEFINE(I18N3)
3030 test "$with_mocklisp" = "yes" && AC_DEFINE(MOCKLISP_SUPPORT)
3031 test "$with_gcc" = "yes" && AC_DEFINE(USE_GCC) 3071 test "$with_gcc" = "yes" && AC_DEFINE(USE_GCC)
3032 test "$with_term" = "yes" && AC_DEFINE(HAVE_TERM) 3072 test "$with_term" = "yes" && AC_DEFINE(HAVE_TERM)
3033 test "$external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET) 3073 test "$external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET)
3034 test "$with_gnu_make" = "yes" && AC_DEFINE(USE_GNU_MAKE) 3074 test "$with_gnu_make" = "yes" && AC_DEFINE(USE_GNU_MAKE)
3035 test "$no_doc_file" = "yes" && AC_DEFINE(NO_DOC_FILE) 3075 test "$no_doc_file" = "yes" && AC_DEFINE(NO_DOC_FILE)
3099 if test "$with_xmu" != yes -a "$with_x11" = yes; then 3139 if test "$with_xmu" != yes -a "$with_x11" = yes; then
3100 echo " No Xmu; substituting equivalent routines." 3140 echo " No Xmu; substituting equivalent routines."
3101 fi 3141 fi
3102 3142
3103 test "$with_gif" = yes && echo " Compiling in support for GIF image conversion." 3143 test "$with_gif" = yes && echo " Compiling in support for GIF image conversion."
3104 if test "$with_xpm" = yes; then 3144 if test "$with_xpm" = yes; then
3105 echo " Compiling in support for XPM images." 3145 echo " Compiling in support for XPM images."
3106 else 3146 else
3107 echo " --------------------------------------------------------------------" 3147 echo " --------------------------------------------------------------------"
3108 echo " WARNING: Compiling without XPM support." 3148 echo " WARNING: Compiling without XPM support."
3109 echo " WARNING: You should strongly considering installing XPM." 3149 echo " WARNING: You should strongly considering installing XPM."
3141 test "$with_i18n3" = yes && echo " Compiling in I18N support, level 3 (doesn't currently work)." 3181 test "$with_i18n3" = yes && echo " Compiling in I18N support, level 3 (doesn't currently work)."
3142 3182
3143 test "$with_cde" = yes && echo " Compiling in support for CDE." 3183 test "$with_cde" = yes && echo " Compiling in support for CDE."
3144 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." 3184 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk."
3145 test "$with_offix" = yes && echo " Compiling in support for OffiX." 3185 test "$with_offix" = yes && echo " Compiling in support for OffiX."
3146 test "$with_mocklisp" = yes && echo " Compiling in support for Mocklisp."
3147 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." 3186 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop."
3148 test "$with_energize" = yes && echo " Compiling in support for Lucid Energize (doesn't currently work)." 3187 test "$with_energize" = yes && echo " Compiling in support for Lucid Energize (doesn't currently work)."
3149 case "$with_menubars" in 3188 case "$with_menubars" in
3150 lucid ) echo " Using the Lucid menubar." ;; 3189 lucid ) echo " Using the Lucid menubar." ;;
3151 motif ) echo " Using the Motif menubar." 3190 motif ) echo " Using the Motif menubar."