Mercurial > emacs
comparison configure.in @ 112335:d3c691ea0839
Merge: Automate syncing from gnulib.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Mon, 17 Jan 2011 12:17:27 -0800 |
parents | 56d3e9c28eb0 |
children | 19348bd13f81 |
comparison
equal
deleted
inserted
replaced
112301:4249a8552faf | 112335:d3c691ea0839 |
---|---|
25 | 25 |
26 AC_PREREQ(2.65) | 26 AC_PREREQ(2.65) |
27 AC_INIT(emacs, 24.0.50) | 27 AC_INIT(emacs, 24.0.50) |
28 AC_CONFIG_HEADER(src/config.h:src/config.in) | 28 AC_CONFIG_HEADER(src/config.h:src/config.in) |
29 AC_CONFIG_SRCDIR(src/lisp.h) | 29 AC_CONFIG_SRCDIR(src/lisp.h) |
30 AM_INIT_AUTOMAKE | |
30 | 31 |
31 dnl Support for --program-prefix, --program-suffix and | 32 dnl Support for --program-prefix, --program-suffix and |
32 dnl --program-transform-name options | 33 dnl --program-transform-name options |
33 AC_ARG_PROGRAM | 34 AC_ARG_PROGRAM |
34 | 35 |
636 # Save the value of CFLAGS that the user specified. | 637 # Save the value of CFLAGS that the user specified. |
637 SPECIFIED_CFLAGS="$CFLAGS" | 638 SPECIFIED_CFLAGS="$CFLAGS" |
638 | 639 |
639 dnl Sets GCC=yes if using gcc. | 640 dnl Sets GCC=yes if using gcc. |
640 AC_PROG_CC | 641 AC_PROG_CC |
642 AM_PROG_CC_C_O | |
643 | |
644 # Initialize gnulib right after verifying that the C compiler works. | |
645 gl_EARLY | |
641 | 646 |
642 # On Suns, sometimes $CPP names a directory. | 647 # On Suns, sometimes $CPP names a directory. |
643 if test -n "$CPP" && test -d "$CPP"; then | 648 if test -n "$CPP" && test -d "$CPP"; then |
644 CPP= | 649 CPP= |
645 fi | 650 fi |
682 if test x$GCC = xyes; then | 687 if test x$GCC = xyes; then |
683 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" | 688 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" |
684 else | 689 else |
685 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" | 690 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" |
686 fi | 691 fi |
687 | |
688 dnl checks for Unix variants | |
689 AC_USE_SYSTEM_EXTENSIONS | |
690 | 692 |
691 ### Use -Wno-pointer-sign if the compiler supports it | 693 ### Use -Wno-pointer-sign if the compiler supports it |
692 AC_MSG_CHECKING([whether gcc understands -Wno-pointer-sign]) | 694 AC_MSG_CHECKING([whether gcc understands -Wno-pointer-sign]) |
693 SAVE_CFLAGS="$CFLAGS" | 695 SAVE_CFLAGS="$CFLAGS" |
694 CFLAGS="$CFLAGS -Wno-pointer-sign" | 696 CFLAGS="$CFLAGS -Wno-pointer-sign" |
2625 | 2627 |
2626 | 2628 |
2627 AC_CHECK_FUNCS(gethostname getdomainname dup2 \ | 2629 AC_CHECK_FUNCS(gethostname getdomainname dup2 \ |
2628 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ | 2630 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ |
2629 random lrand48 logb frexp fmod rint cbrt ftime setsid \ | 2631 random lrand48 logb frexp fmod rint cbrt ftime setsid \ |
2630 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ | 2632 strerror fpathconf select euidaccess getpagesize tzset setlocale \ |
2631 utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ | 2633 utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ |
2632 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ | 2634 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ |
2633 sendto recvfrom getsockopt setsockopt getsockname getpeername \ | 2635 sendto recvfrom getsockopt setsockopt getsockname getpeername \ |
2634 gai_strerror mkstemp getline getdelim mremap memmove fsync sync \ | 2636 gai_strerror mkstemp getline getdelim mremap memmove fsync sync \ |
2635 memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \ | 2637 memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \ |
2646 [Define to 1 if you have the `__builtin_unwind_init' function.]) | 2648 [Define to 1 if you have the `__builtin_unwind_init' function.]) |
2647 fi | 2649 fi |
2648 | 2650 |
2649 AC_CHECK_HEADERS(sys/un.h) | 2651 AC_CHECK_HEADERS(sys/un.h) |
2650 | 2652 |
2651 AC_FUNC_MKTIME | |
2652 if test "$ac_cv_func_working_mktime" = no; then | |
2653 AC_DEFINE(BROKEN_MKTIME, 1, [Define to 1 if the mktime function is broken.]) | |
2654 fi | |
2655 | |
2656 AC_FUNC_GETLOADAVG | 2653 AC_FUNC_GETLOADAVG |
2657 | 2654 |
2658 AC_FUNC_FSEEKO | 2655 AC_FUNC_FSEEKO |
2659 | 2656 |
2660 # Configure getopt. | |
2661 m4_include([m4/getopt.m4]) | |
2662 gl_GETOPT_IFELSE([ | |
2663 gl_GETOPT_SUBSTITUTE_HEADER | |
2664 gl_PREREQ_GETOPT | |
2665 GETOPTOBJS='getopt.o getopt1.o' | |
2666 ]) | |
2667 AC_SUBST(GETOPTOBJS) | |
2668 | |
2669 AC_FUNC_GETPGRP | 2657 AC_FUNC_GETPGRP |
2658 | |
2659 # Configure gnulib. | |
2660 gl_INIT | |
2670 | 2661 |
2671 AC_FUNC_STRFTIME | 2662 AC_FUNC_STRFTIME |
2672 | 2663 |
2673 # UNIX98 PTYs. | 2664 # UNIX98 PTYs. |
2674 AC_CHECK_FUNCS(grantpt) | 2665 AC_CHECK_FUNCS(grantpt) |
3028 fi | 3019 fi |
3029 | 3020 |
3030 AC_CHECK_TYPES(size_t) | 3021 AC_CHECK_TYPES(size_t) |
3031 | 3022 |
3032 AC_TYPE_MBSTATE_T | 3023 AC_TYPE_MBSTATE_T |
3033 | |
3034 dnl Restrict could probably be used effectively other than in regex.c. | |
3035 AC_CACHE_CHECK([for C restrict keyword], emacs_cv_c_restrict, | |
3036 [AC_TRY_COMPILE([void fred (int *restrict x);], [], | |
3037 emacs_cv_c_restrict=yes, | |
3038 [AC_TRY_COMPILE([void fred (int *__restrict x);], [], | |
3039 emacs_cv_c_restrict=__restrict, | |
3040 emacs_cv_c_restrict=no)])]) | |
3041 case "$emacs_cv_c_restrict" in | |
3042 yes) emacs_restrict=restrict;; | |
3043 no) emacs_restrict="";; | |
3044 *) emacs_restrict="$emacs_cv_c_restrict";; | |
3045 esac | |
3046 if test "$emacs_restrict" != __restrict; then | |
3047 AC_DEFINE_UNQUOTED(__restrict, $emacs_restrict, | |
3048 [Define to compiler's equivalent of C99 restrict keyword. | |
3049 Don't define if equivalent is `__restrict'.]) | |
3050 fi | |
3051 | 3024 |
3052 AC_CACHE_CHECK([for C restricted array declarations], emacs_cv_c_restrict_arr, | 3025 AC_CACHE_CHECK([for C restricted array declarations], emacs_cv_c_restrict_arr, |
3053 [AC_TRY_COMPILE([void fred (int x[__restrict]);], [], | 3026 [AC_TRY_COMPILE([void fred (int x[__restrict]);], [], |
3054 emacs_cv_c_restrict_arr=yes, emacs_cv_c_restrict_arr=no)]) | 3027 emacs_cv_c_restrict_arr=yes, emacs_cv_c_restrict_arr=no)]) |
3055 if test "$emacs_cv_c_restrict_arr" = yes; then | 3028 if test "$emacs_cv_c_restrict_arr" = yes; then |
3536 /* If make_number is a function, avoid it. */ | 3509 /* If make_number is a function, avoid it. */ |
3537 #define RE_TRANSLATE_P(TBL) (!(INTEGERP (TBL) && XINT (TBL) == 0)) | 3510 #define RE_TRANSLATE_P(TBL) (!(INTEGERP (TBL) && XINT (TBL) == 0)) |
3538 #endif | 3511 #endif |
3539 #endif | 3512 #endif |
3540 | 3513 |
3541 /* Avoid link-time collision with system mktime if we will use our own. */ | |
3542 #if ! HAVE_MKTIME || BROKEN_MKTIME | |
3543 #define mktime emacs_mktime | |
3544 #endif | |
3545 | |
3546 #define my_strftime nstrftime /* for strftime.c */ | 3514 #define my_strftime nstrftime /* for strftime.c */ |
3547 | 3515 |
3548 /* These default definitions are good for almost all machines. | 3516 /* These default definitions are good for almost all machines. |
3549 The exceptions override them in m/MACHINE.h. */ | 3517 The exceptions override them in m/MACHINE.h. */ |
3550 | 3518 |
3745 dnl eg gamedir=${prefix}/var/games/emacs. | 3713 dnl eg gamedir=${prefix}/var/games/emacs. |
3746 dnl Secondly, the GNU Coding standards require that one should be able | 3714 dnl Secondly, the GNU Coding standards require that one should be able |
3747 dnl to run `make prefix=/some/where/else' and override the values set | 3715 dnl to run `make prefix=/some/where/else' and override the values set |
3748 dnl by configure. This also explains the `move-if-change' test and | 3716 dnl by configure. This also explains the `move-if-change' test and |
3749 dnl the use of force in the `epaths-force' rule in Makefile.in. | 3717 dnl the use of force in the `epaths-force' rule in Makefile.in. |
3750 AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile \ | 3718 AC_OUTPUT(Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \ |
3751 doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \ | 3719 doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \ |
3752 doc/lispref/Makefile src/Makefile \ | 3720 doc/lispref/Makefile src/Makefile \ |
3753 lwlib/Makefile lisp/Makefile leim/Makefile test/automated/Makefile, [ | 3721 lwlib/Makefile lisp/Makefile leim/Makefile test/automated/Makefile, [ |
3754 | 3722 |
3755 ### Make the necessary directories, if they don't exist. | 3723 ### Make the necessary directories, if they don't exist. |