Mercurial > emacs
comparison configure @ 109421:10cf940285f9
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Wed, 30 Jun 2010 22:57:08 +0000 |
parents | 758d2fa60c5c |
children | a17732ef349e |
comparison
equal
deleted
inserted
replaced
109420:c166807ffc89 | 109421:10cf940285f9 |
---|---|
716 LIBS_SYSTEM | 716 LIBS_SYSTEM |
717 C_SWITCH_SYSTEM | 717 C_SWITCH_SYSTEM |
718 UNEXEC_OBJ | 718 UNEXEC_OBJ |
719 C_SWITCH_MACHINE | 719 C_SWITCH_MACHINE |
720 LD_SWITCH_SYSTEM | 720 LD_SWITCH_SYSTEM |
721 cannot_dump | 721 CANNOT_DUMP |
722 MAKEINFO | 722 MAKEINFO |
723 GZIP_PROG | 723 GZIP_PROG |
724 INSTALL_INFO | 724 INSTALL_INFO |
725 RANLIB | 725 RANLIB |
726 INSTALL_DATA | 726 INSTALL_DATA |
4284 test x$cc_specified != xyes | 4284 test x$cc_specified != xyes |
4285 then | 4285 then |
4286 CC="$NON_GNU_CC" | 4286 CC="$NON_GNU_CC" |
4287 fi | 4287 fi |
4288 | 4288 |
4289 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x | 4289 if test x$GCC = xyes; then |
4290 then | 4290 C_OPTIMIZE_SWITCH=-O2 |
4291 CC="$CC $GCC_TEST_OPTIONS" | 4291 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" |
4292 fi | 4292 else |
4293 | 4293 C_OPTIMIZE_SWITCH=-O |
4294 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x | 4294 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" |
4295 then | |
4296 CC="$CC $NON_GCC_TEST_OPTIONS" | |
4297 fi | 4295 fi |
4298 | 4296 |
4299 ac_ext=c | 4297 ac_ext=c |
4300 ac_cpp='$CPP $CPPFLAGS' | 4298 ac_cpp='$CPP $CPPFLAGS' |
4301 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | 4299 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
5426 $as_echo "no" >&6; } | 5424 $as_echo "no" >&6; } |
5427 fi | 5425 fi |
5428 rm -f core conftest.err conftest.$ac_objext \ | 5426 rm -f core conftest.err conftest.$ac_objext \ |
5429 conftest$ac_exeext conftest.$ac_ext | 5427 conftest$ac_exeext conftest.$ac_ext |
5430 | 5428 |
5431 #### Extract some information from the operating system and machine files. | |
5432 | |
5433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the machine- and system-dependent files to find out | |
5434 - which libraries the lib-src programs will want, and | |
5435 - whether the GNU malloc routines are usable..." >&5 | |
5436 $as_echo "$as_me: checking the machine- and system-dependent files to find out | |
5437 - which libraries the lib-src programs will want, and | |
5438 - whether the GNU malloc routines are usable..." >&6;} | |
5439 | |
5440 ### First figure out CFLAGS (which we use for running the compiler here) | |
5441 ### and REAL_CFLAGS (which we use for real compilation). | |
5442 ### The two are the same except on a few systems, where they are made | |
5443 ### different to work around various lossages. For example, | |
5444 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g | |
5445 ### as implying static linking. | |
5446 | |
5447 ### If the CFLAGS env var is specified, we use that value | |
5448 ### instead of the default. | |
5449 | |
5450 ### It's not important that this name contain the PID; you can't run | |
5451 ### two configures in the same directory and have anything work | |
5452 ### anyway. | |
5453 tempcname="conftest.c" | |
5454 | |
5455 echo ' | |
5456 #include "'${srcdir}'/src/'${opsysfile}'" | |
5457 #include "'${srcdir}'/src/'${machfile}'" | |
5458 | |
5459 configure___ LIBX=-lX11 | |
5460 | |
5461 #ifdef CANNOT_DUMP | |
5462 configure___ cannot_dump=yes | |
5463 #else | |
5464 configure___ cannot_dump=no | |
5465 #endif | |
5466 | |
5467 #ifdef SYSTEM_MALLOC | |
5468 configure___ system_malloc=yes | |
5469 #else | |
5470 configure___ system_malloc=no | |
5471 #endif | |
5472 | |
5473 #ifdef USE_MMAP_FOR_BUFFERS | |
5474 configure___ use_mmap_for_buffers=yes | |
5475 #else | |
5476 configure___ use_mmap_for_buffers=no | |
5477 #endif | |
5478 | |
5479 #ifndef C_OPTIMIZE_SWITCH | |
5480 #ifdef __GNUC__ | |
5481 #define C_OPTIMIZE_SWITCH -O2 | |
5482 #else | |
5483 #define C_OPTIMIZE_SWITCH -O | |
5484 #endif | |
5485 #endif | |
5486 | |
5487 #ifndef C_WARNINGS_SWITCH | |
5488 #define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH} | |
5489 #endif | |
5490 | |
5491 #ifdef THIS_IS_CONFIGURE | |
5492 | |
5493 /* Get the CFLAGS for tests in configure. */ | |
5494 #ifdef __GNUC__ | |
5495 configure___ CFLAGS=-g C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | |
5496 #else | |
5497 configure___ CFLAGS='${SPECIFIED_CFLAGS}' | |
5498 #endif | |
5499 | |
5500 #else /* not THIS_IS_CONFIGURE */ | |
5501 | |
5502 /* Get the CFLAGS for real compilation. */ | |
5503 #ifdef __GNUC__ | |
5504 configure___ REAL_CFLAGS=-g C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}' | |
5505 #else | |
5506 configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}' | |
5507 #endif | |
5508 | |
5509 #endif /* not THIS_IS_CONFIGURE */ | |
5510 ' > ${tempcname} | |
5511 | |
5512 LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}" | 5429 LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}" |
5430 | |
5513 | 5431 |
5514 # The value of CPP is a quoted variable reference, so we need to do this | 5432 # The value of CPP is a quoted variable reference, so we need to do this |
5515 # to get its actual value... | 5433 # to get its actual value... |
5516 CPP=`eval "echo $CPP"` | 5434 CPP=`eval "echo $CPP"` |
5517 eval `${CPP} -Isrc ${tempcname} \ | 5435 |
5518 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | 5436 |
5437 ### First figure out CFLAGS (which we use for running the compiler here) | |
5438 ### and REAL_CFLAGS (which we use for real compilation). | |
5439 ### The two are the same except when using GCC where we might use | |
5440 ### extra warning and profiling flags. | |
5441 | |
5442 ### If the CFLAGS env var is specified, we use that value | |
5443 ### instead of the default. | |
5444 | |
5519 if test "x$SPECIFIED_CFLAGS" = x; then | 5445 if test "x$SPECIFIED_CFLAGS" = x; then |
5520 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \ | 5446 CFLAGS="-g $C_OPTIMIZE_SWITCH" |
5521 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | 5447 if test x$GCC = xyes; then |
5448 REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS" | |
5449 else | |
5450 REAL_CFLAGS="$CFLAGS" | |
5451 fi | |
5522 else | 5452 else |
5523 REAL_CFLAGS="$CFLAGS" | 5453 REAL_CFLAGS="$CFLAGS" |
5524 fi | 5454 fi |
5525 rm ${tempcname} | 5455 |
5526 | 5456 |
5457 CANNOT_DUMP=no | |
5458 case "$opsys" in | |
5459 your-opsys-here) | |
5460 CANNOT_DUMP=yes | |
5461 | |
5462 $as_echo "#define CANNOT_DUMP 1" >>confdefs.h | |
5463 | |
5464 ;; | |
5465 esac | |
5527 | 5466 |
5528 | 5467 |
5529 | 5468 |
5530 UNEXEC_OBJ=unexelf.o | 5469 UNEXEC_OBJ=unexelf.o |
5531 case "$opsys" in | 5470 case "$opsys" in |
5954 eval as_val=\$$as_ac_Header | 5893 eval as_val=\$$as_ac_Header |
5955 if test "x$as_val" = x""yes; then : | 5894 if test "x$as_val" = x""yes; then : |
5956 cat >>confdefs.h <<_ACEOF | 5895 cat >>confdefs.h <<_ACEOF |
5957 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | 5896 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
5958 _ACEOF | 5897 _ACEOF |
5959 | 5898 have_sound_header=yes |
5960 fi | 5899 fi |
5961 | 5900 |
5962 done | 5901 done |
5963 | 5902 |
5964 # Emulation library used on NetBSD. | 5903 # Emulation library used on NetBSD. |
6154 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" | 6093 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" |
6155 | 6094 |
6156 $as_echo "#define HAVE_ALSA 1" >>confdefs.h | 6095 $as_echo "#define HAVE_ALSA 1" >>confdefs.h |
6157 | 6096 |
6158 fi | 6097 fi |
6098 | |
6099 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then | |
6100 case "$opsys" in | |
6101 gnu-linux|freebsd|netbsd) | |
6102 | |
6103 $as_echo "#define HAVE_SOUND 1" >>confdefs.h | |
6104 | |
6105 ;; | |
6106 esac | |
6107 fi | |
6108 | |
6159 | 6109 |
6160 fi | 6110 fi |
6161 | 6111 |
6162 for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ | 6112 for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ |
6163 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ | 6113 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ |
7621 $as_echo "$emacs_cv_var___after_morecore_hook" >&6; } | 7571 $as_echo "$emacs_cv_var___after_morecore_hook" >&6; } |
7622 if test $emacs_cv_var___after_morecore_hook = no; then | 7572 if test $emacs_cv_var___after_morecore_hook = no; then |
7623 doug_lea_malloc=no | 7573 doug_lea_malloc=no |
7624 fi | 7574 fi |
7625 | 7575 |
7576 | |
7577 system_malloc=no | |
7578 case "$opsys" in | |
7579 ## darwin ld insists on the use of malloc routines in the System framework. | |
7580 darwin|sol2-10) system_malloc=yes ;; | |
7581 esac | |
7582 | |
7626 if test "${system_malloc}" = "yes"; then | 7583 if test "${system_malloc}" = "yes"; then |
7584 | |
7585 $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h | |
7586 | |
7627 GNU_MALLOC=no | 7587 GNU_MALLOC=no |
7628 GNU_MALLOC_reason=" | 7588 GNU_MALLOC_reason=" |
7629 (The GNU allocators don't work with this system configuration.)" | 7589 (The GNU allocators don't work with this system configuration.)" |
7630 GMALLOC_OBJ= | 7590 GMALLOC_OBJ= |
7631 VMLIMIT_OBJ= | 7591 VMLIMIT_OBJ= |
7656 | 7616 |
7657 if test x"${REL_ALLOC}" = x; then | 7617 if test x"${REL_ALLOC}" = x; then |
7658 REL_ALLOC=${GNU_MALLOC} | 7618 REL_ALLOC=${GNU_MALLOC} |
7659 fi | 7619 fi |
7660 | 7620 |
7621 use_mmap_for_buffers=no | |
7622 case "$opsys" in | |
7623 freebsd|irix6-5) use_mmap_for_buffers=yes ;; | |
7624 esac | |
7661 | 7625 |
7662 | 7626 |
7663 | 7627 |
7664 | 7628 |
7665 for ac_header in $ac_header_list | 7629 for ac_header in $ac_header_list |
7859 | 7823 |
7860 fi | 7824 fi |
7861 rm -f conftest.mmap conftest.txt | 7825 rm -f conftest.mmap conftest.txt |
7862 | 7826 |
7863 if test $use_mmap_for_buffers = yes; then | 7827 if test $use_mmap_for_buffers = yes; then |
7828 | |
7829 $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h | |
7830 | |
7864 REL_ALLOC=no | 7831 REL_ALLOC=no |
7865 fi | 7832 fi |
7866 | 7833 |
7867 LIBS="$LIBS_SYSTEM $LIBS" | 7834 LIBS="$LIBS_SYSTEM $LIBS" |
7868 | 7835 |
8052 REAL_CPPFLAGS="$CPPFLAGS" | 8019 REAL_CPPFLAGS="$CPPFLAGS" |
8053 | 8020 |
8054 if test "${HAVE_X11}" = "yes"; then | 8021 if test "${HAVE_X11}" = "yes"; then |
8055 DEFS="$C_SWITCH_X_SITE $DEFS" | 8022 DEFS="$C_SWITCH_X_SITE $DEFS" |
8056 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" | 8023 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" |
8057 LIBS="$LIBX $LIBS" | 8024 LIBS="-lX11 $LIBS" |
8058 CFLAGS="$C_SWITCH_X_SITE $CFLAGS" | 8025 CFLAGS="$C_SWITCH_X_SITE $CFLAGS" |
8059 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" | 8026 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" |
8060 | 8027 |
8061 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. | 8028 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. |
8062 # This is handled by LD_SWITCH_X_SITE_AUX during the real build, | 8029 # This is handled by LD_SWITCH_X_SITE_AUX during the real build, |
8214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 | 8181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 |
8215 $as_echo "6 or newer" >&6; } | 8182 $as_echo "6 or newer" >&6; } |
8216 | 8183 |
8217 $as_echo "#define HAVE_X11R6 1" >>confdefs.h | 8184 $as_echo "#define HAVE_X11R6 1" >>confdefs.h |
8218 | 8185 |
8186 | |
8187 $as_echo "#define HAVE_X_I18N 1" >>confdefs.h | |
8188 | |
8189 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style | |
8190 ## XIM support. | |
8191 case "$opsys" in | |
8192 sol2-*) : ;; | |
8193 *) | |
8194 $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h | |
8195 | |
8196 ;; | |
8197 esac | |
8219 else | 8198 else |
8220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 | 8199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 |
8221 $as_echo "before 6" >&6; } | 8200 $as_echo "before 6" >&6; } |
8222 fi | 8201 fi |
8223 fi | 8202 fi |